lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 05b73fb 1/4: Add an inchoate fourth death ben


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 05b73fb 1/4: Add an inchoate fourth death benefit option
Date: Fri, 29 Jun 2018 19:39:41 -0400 (EDT)

branch: master
commit 05b73fb56aae93e6120d2e6d6d730461102e390e
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Add an inchoate fourth death benefit option
---
 custom_io_1.cpp          |  1 +
 datum_sequence.cpp       |  1 +
 ihs_avmly.cpp            | 19 +++++++++++++++++++
 input_realization.cpp    |  1 +
 ledger_invariant.cpp     |  3 +++
 mc_enum_types.cpp        |  2 +-
 mc_enum_types.xpp        |  2 ++
 mc_enum_types_aux.cpp    |  1 +
 pasting_to_a_census.html |  2 +-
 regex_test.cpp           |  2 +-
 skin.xrc                 |  2 +-
 skin_coli_boli.xrc       |  2 +-
 skin_group_carveout.xrc  |  2 +-
 skin_single_premium.xrc  |  2 +-
 test_coding_rules.cpp    |  1 +
 types.rnc                |  3 +--
 types.xsd                |  2 +-
 17 files changed, 38 insertions(+), 10 deletions(-)

diff --git a/custom_io_1.cpp b/custom_io_1.cpp
index 10167e1..c863dbd 100644
--- a/custom_io_1.cpp
+++ b/custom_io_1.cpp
@@ -251,6 +251,7 @@ bool custom_io_1_read(Input& z, std::string const& filename)
           ("L"   == DeathBenefitOption) ? "a"
         : ("I"   == DeathBenefitOption) ? "b"
 //      : ("ROP" == DeathBenefitOption) ? "rop" // Generally not offered for 
BOLI.
+// DBO3 !! "mdb" might need to be added here
         : throw std::runtime_error(DeathBenefitOption + ": DeathBenefitOption 
not in {L,I}.")
         ;
     // <FaceAmt> and <PremiumAmt> are both specified, so that both can
diff --git a/datum_sequence.cpp b/datum_sequence.cpp
index a593646..03c6a4b 100644
--- a/datum_sequence.cpp
+++ b/datum_sequence.cpp
@@ -319,6 +319,7 @@ std::map<std::string,std::string> const 
dbo_sequence::allowed_keywords() const
         all_keywords["a"  ] = "A"  ;
         all_keywords["b"  ] = "B"  ;
         all_keywords["rop"] = "ROP";
+        all_keywords["mdb"] = "MDB";
         }
     std::map<std::string,std::string> permissible_keywords = all_keywords;
     return permissible_keywords;
diff --git a/ihs_avmly.cpp b/ihs_avmly.cpp
index e717108..a2bdf5f 100644
--- a/ihs_avmly.cpp
+++ b/ihs_avmly.cpp
@@ -903,6 +903,10 @@ void AccountValue::TxOptionChange()
                     {
                     ChangeSpecAmtBy(std::max(0.0, CumPmts));
                     }
+                else if(mce_mdb == old_option) // DBO3 !! reconsider
+                    {
+                    alarum() << "MDB DBO not yet implemented." << LMI_FLUSH;
+                    }
                 else
                     {
                     alarum() << "Unknown death benefit option." << LMI_FLUSH;
@@ -936,6 +940,11 @@ void AccountValue::TxOptionChange()
                 // Do nothing.
                 }
             break;
+        case mce_mdb: // DBO3 !! reconsider
+            {
+            alarum() << "MDB DBO not yet implemented." << LMI_FLUSH;
+            }
+            break;
         }
 }
 
@@ -1605,6 +1614,11 @@ void AccountValue::TxSetDeathBft(bool force_eoy_behavior)
             DB7702A        = ActualSpecAmt + std::max(0.0, CumPmts);
             }
             break;
+        case mce_mdb: // DBO3 !! reconsider
+            {
+            alarum() << "MDB DBO not yet implemented." << LMI_FLUSH;
+            }
+            break;
         }
 
     // Surrender charges are generally ignored here, but any negative
@@ -2566,6 +2580,11 @@ void AccountValue::TxTakeWD()
                 }
             }
             break;
+        case mce_mdb: // DBO3 !! reconsider
+            {
+            alarum() << "MDB DBO not yet implemented." << LMI_FLUSH;
+            }
+            break;
         }
 
     CumPmts     -= NetWD;
diff --git a/input_realization.cpp b/input_realization.cpp
index 5a87fa7..267a484 100644
--- a/input_realization.cpp
+++ b/input_realization.cpp
@@ -582,6 +582,7 @@ std::string Input::RealizeDeathBenefitOption()
             );
         }
 
+    // DBO3 !! Need rules for MDB as well.
     return "";
 }
 
diff --git a/ledger_invariant.cpp b/ledger_invariant.cpp
index 0b1d2b1..c3dcb2c 100644
--- a/ledger_invariant.cpp
+++ b/ledger_invariant.cpp
@@ -682,6 +682,7 @@ void LedgerInvariant::Init(BasicValues const* b)
     std::string dbo_name_option1 = mc_str(mce_option1);
     std::string dbo_name_option2 = mc_str(mce_option2);
     std::string dbo_name_rop     = mc_str(mce_rop    );
+    std::string dbo_name_mdb     = mc_str(mce_mdb    ); // DBO3 !! reconsider
 
     // The antediluvian branch has a null ProductData_ object.
     if(b->ProductData_)
@@ -695,6 +696,7 @@ void LedgerInvariant::Init(BasicValues const* b)
         dbo_name_option1               = p.datum("DboNameLevel"                
   );
         dbo_name_option2               = p.datum("DboNameIncreasing"           
   );
         dbo_name_rop                   = p.datum("DboNameReturnOfPremium"      
   );
+//      dbo_name_mdb                   = // DBO3 !! reconsider
         PolicyForm = p.datum(alt_form ? "PolicyFormAlternative" : 
"PolicyForm");
         PolicyMktgName                 = p.datum("PolicyMktgName"              
   );
         PolicyLegalName                = p.datum("PolicyLegalName"             
   );
@@ -890,6 +892,7 @@ void LedgerInvariant::Init(BasicValues const* b)
          (mce_option1 == init_dbo) ? dbo_name_option1
         :(mce_option2 == init_dbo) ? dbo_name_option2
         :(mce_rop     == init_dbo) ? dbo_name_rop
+        :(mce_mdb     == init_dbo) ? dbo_name_mdb
         :throw std::logic_error("Unrecognized initial death benefit option.")
         ;
 
diff --git a/mc_enum_types.cpp b/mc_enum_types.cpp
index b8f06d4..ff1dfc3 100644
--- a/mc_enum_types.cpp
+++ b/mc_enum_types.cpp
@@ -123,7 +123,7 @@ MC_DEFINE(yes_or_no,2)
 MC_DEFINE(gender,3)
 MC_DEFINE(smoking,3)
 MC_DEFINE(class,4)
-MC_DEFINE(dbopt,3)
+MC_DEFINE(dbopt,4)
 MC_DEFINE(dbopt_7702,2)
 MC_DEFINE(mode,4)
 MC_DEFINE(gen_basis,3)
diff --git a/mc_enum_types.xpp b/mc_enum_types.xpp
index 48e8f1b..27f7b94 100644
--- a/mc_enum_types.xpp
+++ b/mc_enum_types.xpp
@@ -67,11 +67,13 @@
     {mce_option1 \
     ,mce_option2 \
     ,mce_rop \
+    ,mce_mdb \
     };
 #define dbopt_NAMES \
     {"A" \
     ,"B" \
     ,"ROP" \
+    ,"MDB" \
     };
 
 /// 7702 recognizes only the canonical death benefit options 1 and 2.
diff --git a/mc_enum_types_aux.cpp b/mc_enum_types_aux.cpp
index 8f594e2..7069101 100644
--- a/mc_enum_types_aux.cpp
+++ b/mc_enum_types_aux.cpp
@@ -98,6 +98,7 @@ mcenum_dbopt_7702 effective_dbopt_7702
         case mce_option1: return mce_option1_for_7702;
         case mce_option2: return mce_option2_for_7702;
         case mce_rop:     return rop_equivalent      ;
+        case mce_mdb:     return rop_equivalent      ; // DBO3 !! reconsider
         }
     throw "Unreachable--silences a compiler diagnostic.";
 }
diff --git a/pasting_to_a_census.html b/pasting_to_a_census.html
index a78d2d9..ff56d27 100644
--- a/pasting_to_a_census.html
+++ b/pasting_to_a_census.html
@@ -141,7 +141,7 @@ You can use these column headers:
   <tr>
     <td><kbd>DeathBenefitOption</kbd></td>
     <td>&nbsp;&nbsp;&nbsp;</td>
-    <td><a href="sequence_input.html">sequence</a>: <kbd>{a, b, rop}</kbd></td>
+    <td><a href="sequence_input.html">sequence</a>: <kbd>{a, b, rop, 
mdb}</kbd></td>
   </tr>
   <tr>
     <td><kbd>SpecifiedAmount</kbd></td>
diff --git a/regex_test.cpp b/regex_test.cpp
index 9befb59..614e855 100644
--- a/regex_test.cpp
+++ b/regex_test.cpp
@@ -412,7 +412,7 @@ void test_input_sequence_regex()
     X = "(\\-?[0-9.]+|maximum|target|sevenpay|glp|gsp|corridor|salary)";
     R = " *| *" + X + Y + "? *(; *" + X + Y + "? *)*;? *";
     std::cout << "specamt_sequence = xsd:string {pattern = \"" << R << "\"}" 
<< std::endl;
-    X = "(a|b|rop)";
+    X = "(a|b|rop|mdb)";
     R = " *| *" + X + Y + "? *(; *" + X + Y + "? *)*;? *";
     std::cout << "dbo_sequence     = xsd:string {pattern = \"" << R << "\"}" 
<< std::endl;
 }
diff --git a/skin.xrc b/skin.xrc
index 98778af..0e82b9b 100644
--- a/skin.xrc
+++ b/skin.xrc
@@ -2287,7 +2287,7 @@ here, but it looks weird if we don't make this look like 
its siblings.
                     <flag>wxGROW</flag>
                     <object class="InputSequenceEntry" 
name="DeathBenefitOption">
                         <title>Death benefit option</title>
-                        <help>Death benefit option: a (level), b (increasing), 
or rop (return of premium)</help>
+                        <help>Death benefit option: a (level), b (increasing), 
rop (return of premium), or mdb (minimum death benefit)</help>
                         <size>180,-1</size>
                     </object>
                 </object>
diff --git a/skin_coli_boli.xrc b/skin_coli_boli.xrc
index ecaa05c..fa8ff15 100644
--- a/skin_coli_boli.xrc
+++ b/skin_coli_boli.xrc
@@ -2389,7 +2389,7 @@ here, but it looks weird if we don't make this look like 
its siblings.
                     <border>2</border>
                     <object class="InputSequenceEntry" 
name="DeathBenefitOption">
                         <title>Death benefit option</title>
-                        <help>Death benefit option: a (level), b (increasing), 
or rop (return of premium)</help>
+                        <help>Death benefit option: a (level), b (increasing), 
rop (return of premium), or mdb (minimum death benefit)</help>
                     </object>
                 </object>
             </object>
diff --git a/skin_group_carveout.xrc b/skin_group_carveout.xrc
index 9e31864..6428baa 100644
--- a/skin_group_carveout.xrc
+++ b/skin_group_carveout.xrc
@@ -1971,7 +1971,7 @@ here, but it looks weird if we don't make this look like 
its siblings.
                     <border>2</border>
                     <object class="InputSequenceEntry" 
name="DeathBenefitOption">
                         <title>Death benefit option</title>
-                        <help>Death benefit option: a (level), b (increasing), 
or rop (return of premium)</help>
+                        <help>Death benefit option: a (level), b (increasing), 
rop (return of premium), or mdb (minimum death benefit)</help>
                     </object>
                 </object>
             </object>
diff --git a/skin_single_premium.xrc b/skin_single_premium.xrc
index 544e76a..67d8fcc 100644
--- a/skin_single_premium.xrc
+++ b/skin_single_premium.xrc
@@ -1015,7 +1015,7 @@ TODO ?? Revisit this later.
                     <flag>wxGROW</flag>
                     <object class="InputSequenceEntry" 
name="DeathBenefitOption">
                         <title>Death benefit option</title>
-                        <help>Death benefit option: a (level), b (increasing), 
or rop (return of premium)</help>
+                        <help>Death benefit option: a (level), b (increasing), 
rop (return of premium), or mdb (minimum death benefit)</help>
                         <size>180,-1</size>
                     </object>
                 </object>
diff --git a/test_coding_rules.cpp b/test_coding_rules.cpp
index b313fe8..e31da09 100644
--- a/test_coding_rules.cpp
+++ b/test_coding_rules.cpp
@@ -696,6 +696,7 @@ void check_defect_markers(file const& f)
             &&  "COMPILER "    != z[1]
             &&  "CYGWIN "      != z[1]
             &&  "DATABASE "    != z[1]
+            &&  "DBO3 "        != z[1]
             &&  "ET "          != z[1]
             &&  "EVGENIY "     != z[1]
             &&  "IHS "         != z[1]
diff --git a/types.rnc b/types.rnc
index ec1e3df..037c483 100644
--- a/types.rnc
+++ b/types.rnc
@@ -41,8 +41,7 @@ numeric_sequence = xsd:string {pattern = " *| *(\-?[0-9.]+)(( 
+| *, *)(address@hidden *[0
 payment_sequence = xsd:string {pattern = " *| 
*(\-?[0-9.]+|minimum|target|sevenpay|glp|gsp|corridor|table)(( +| *, 
*)(address@hidden *[0-9]+|[a-z]+|[\[\(][^;]+[\]\)]))? *(; 
*(\-?[0-9.]+|minimum|target|sevenpay|glp|gsp|corridor|table)(( +| *, 
*)(address@hidden *[0-9]+|[a-z]+|[\[\(][^;]+[\]\)]))? *)*;? *"}
 mode_sequence    = xsd:string {pattern = " *| 
*(annual|semiannual|quarterly|monthly)(( +| *, *)(address@hidden 
*[0-9]+|[a-z]+|[\[\(][^;]+[\]\)]))? *(; 
*(annual|semiannual|quarterly|monthly)(( +| *, *)(address@hidden 
*[0-9]+|[a-z]+|[\[\(][^;]+[\]\)]))? *)*;? *"}
 specamt_sequence = xsd:string {pattern = " *| 
*(\-?[0-9.]+|maximum|target|sevenpay|glp|gsp|corridor|salary)(( +| *, 
*)(address@hidden *[0-9]+|[a-z]+|[\[\(][^;]+[\]\)]))? *(; 
*(\-?[0-9.]+|maximum|target|sevenpay|glp|gsp|corridor|salary)(( +| *, 
*)(address@hidden *[0-9]+|[a-z]+|[\[\(][^;]+[\]\)]))? *)*;? *"}
-dbo_sequence     = xsd:string {pattern = " *| *(a|b|rop)(( +| *, 
*)(address@hidden *[0-9]+|[a-z]+|[\[\(][^;]+[\]\)]))? *(; *(a|b|rop)(( +| *, 
*)(address@hidden *[0-9]+|[a-z]+|[\[\(][^;]+[\]\)]))? *)*;? *"}
-
+dbo_sequence     = xsd:string {pattern = " *| *(a|b|rop|mdb)(( +| *, 
*)(address@hidden *[0-9]+|[a-z]+|[\[\(][^;]+[\]\)]))? *(; *(a|b|rop|mdb)(( +| 
*, *)(address@hidden *[0-9]+|[a-z]+|[\[\(][^;]+[\]\)]))? *)*;? *"}
 # Numeric-range types.
 
 ## Floating-point number greater than or equal to zero.
diff --git a/types.xsd b/types.xsd
index 224f73c..f5c7241 100644
--- a/types.xsd
+++ b/types.xsd
@@ -65,7 +65,7 @@
   </xs:simpleType>
   <xs:simpleType name="dbo_sequence">
     <xs:restriction base="xs:string">
-      <xs:pattern value=" *| *(a|b|rop)(( +| *, *)(address@hidden 
*[0-9]+|[a-z]+|[\[\(][^;]+[\]\)]))? *(; *(a|b|rop)(( +| *, *)(address@hidden 
*[0-9]+|[a-z]+|[\[\(][^;]+[\]\)]))? *)*;? *"/>
+      <xs:pattern value=" *| *(a|b|rop|mdb)(( +| *, *)(address@hidden 
*[0-9]+|[a-z]+|[\[\(][^;]+[\]\)]))? *(; *(a|b|rop|mdb)(( +| *, 
*)(address@hidden *[0-9]+|[a-z]+|[\[\(][^;]+[\]\)]))? *)*;? *"/>
     </xs:restriction>
   </xs:simpleType>
   <!-- Numeric-range types. -->



reply via email to

[Prev in Thread] Current Thread [Next in Thread]