[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master b53f392 2/2: Augment database to distinguish
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master b53f392 2/2: Augment database to distinguish CSO tables |
Date: |
Tue, 5 Mar 2019 18:37:34 -0500 (EST) |
branch: master
commit b53f392dfc68f46b59104ea375b5b51e7be82752
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Augment database to distinguish CSO tables
---
cso_tables.cpp | 10 +++++++++-
cso_tables.hpp | 13 ++++++++++++-
dbdict.cpp | 5 +++++
dbdict.hpp | 7 +++++++
dbnames.hpp | 2 ++
dbnames.xpp | 2 ++
oecumenic_enumerations.hpp | 11 +++++++++++
7 files changed, 48 insertions(+), 2 deletions(-)
diff --git a/cso_tables.cpp b/cso_tables.cpp
index 5cf63b6..24b2ee4 100644
--- a/cso_tables.cpp
+++ b/cso_tables.cpp
@@ -25,6 +25,14 @@
/// Just a placeholder for the nonce.
-void cso_tables()
+std::vector<double> const& cso_table
+ (oenum_cso_era // cso_era
+ ,oenum_autopisty // autopisty
+ ,oenum_alb_or_anb // alb_or_anb
+ ,mce_gender // gender
+ ,mce_smoking // smoking
+ )
{
+ static std::vector<double> placeholder {1.0};
+ return placeholder;
}
diff --git a/cso_tables.hpp b/cso_tables.hpp
index c1e8850..dc1d2b7 100644
--- a/cso_tables.hpp
+++ b/cso_tables.hpp
@@ -24,8 +24,19 @@
#include "config.hpp"
+#include "mc_enum.hpp"
+#include "mc_enum_types.hpp"
+#include "oecumenic_enumerations.hpp"
#include "so_attributes.hpp"
-void LMI_SO cso_tables();
+#include <vector>
+
+std::vector<double> const& LMI_SO cso_table
+ (oenum_cso_era
+ ,oenum_autopisty
+ ,oenum_alb_or_anb
+ ,mce_gender
+ ,mce_smoking
+ );
#endif // cso_tables_hpp
diff --git a/dbdict.cpp b/dbdict.cpp
index 7b60cb6..18f5ea9 100644
--- a/dbdict.cpp
+++ b/dbdict.cpp
@@ -167,6 +167,8 @@ void DBDictionary::ascribe_members()
ascribe("SpouseRiderIsQAB" , &DBDictionary::SpouseRiderIsQAB );
ascribe("ChildRiderIsQAB" , &DBDictionary::ChildRiderIsQAB );
ascribe("WpIsQAB" , &DBDictionary::WpIsQAB );
+ ascribe("CsoEra" , &DBDictionary::CsoEra );
+ ascribe("CsoMisprint" , &DBDictionary::CsoMisprint );
ascribe("GuarCoiTable" , &DBDictionary::GuarCoiTable );
ascribe("GuarCoiIsAnnual" , &DBDictionary::GuarCoiIsAnnual );
ascribe("GuarCoiMultiplier" , &DBDictionary::GuarCoiMultiplier );
@@ -537,6 +539,8 @@ void DBDictionary::InitDB()
Add({DB_SmokeOrTobacco , oe_smoker_nonsmoker});
Add({DB_CvatMatChangeDefn , mce_unnecessary_premium});
Add({DB_Effective7702DboRop , mce_option1_for_7702});
+ Add({DB_CsoEra , oe_2017cso});
+ Add({DB_CsoMisprint , oe_orthodox});
Add({DB_SepAcctSpreadMethod , mce_spread_is_effective_annual});
Add({DB_IntSpreadMode , mce_spread_daily});
Add({DB_AssetChargeType , oe_asset_charge_spread});
@@ -668,6 +672,7 @@ sample::sample()
Add({DB_Irc7702NspTable , 0});
Add({DB_SevenPayTable , 10});
+ Add({DB_CsoEra , oe_1980cso});
// Following IRS Notice 88-128, use only the male and female
// tables with no smoker distinction, and a unisex table where
// required by state law.
diff --git a/dbdict.hpp b/dbdict.hpp
index db93e59..fab7c81 100644
--- a/dbdict.hpp
+++ b/dbdict.hpp
@@ -91,6 +91,11 @@ class LMI_SO DBDictionary
,std::string const& file_leaf_name
) const override;
+ // To make sure these members match e_database_key enumerators:
+ // <dbdict.hpp sed -e '/database_entity [A-Z]/!d;s/ database_entity
//;s/ *;$//' >eraseme0
+ // <dbnames.hpp sed -e '/ ,DB_/!d;s/ ,DB_//' >eraseme1
+ // and compare the resulting temporary files.
+
database_entity MinIssAge ;
database_entity MaxIssAge ;
database_entity MaxIncrAge ;
@@ -142,6 +147,8 @@ class LMI_SO DBDictionary
database_entity SpouseRiderIsQAB ;
database_entity ChildRiderIsQAB ;
database_entity WpIsQAB ;
+ database_entity CsoEra ;
+ database_entity CsoMisprint ;
database_entity GuarCoiTable ;
database_entity GuarCoiIsAnnual ;
database_entity GuarCoiMultiplier ;
diff --git a/dbnames.hpp b/dbnames.hpp
index 0fe9bf5..447b0b5 100644
--- a/dbnames.hpp
+++ b/dbnames.hpp
@@ -185,6 +185,8 @@ enum e_database_key
,DB_Topic_MortalityCharges
+ ,DB_CsoEra
+ ,DB_CsoMisprint
,DB_GuarCoiTable
,DB_GuarCoiIsAnnual
,DB_GuarCoiMultiplier
diff --git a/dbnames.xpp b/dbnames.xpp
index 168a3a0..9a33c4f 100644
--- a/dbnames.xpp
+++ b/dbnames.xpp
@@ -90,6 +90,8 @@
{DB_ChildRiderIsQAB,DB_Topic_7702And7702A,"ChildRiderIsQAB","Treat child term
rider as a QAB for 7702 and 7702A: 0=no, 1=yes [not yet implemented]",}, \
{DB_WpIsQAB,DB_Topic_7702And7702A,"WpIsQAB","Treat waiver benefit as a QAB for
7702 and 7702A: 0=no, 1=yes [not yet implemented]",}, \
{DB_Topic_MortalityCharges,DB_FIRST,"Mortality charges","Mortality rates,
limits, conversions, and reentry",}, \
+{DB_CsoEra,DB_Topic_MortalityCharges,"CsoEra","CSO era: 1980, 2001, or
2017",}, \
+{DB_CsoMisprint,DB_Topic_MortalityCharges,"CsoMisprint","For 1980 CSO ANB MNS,
use table F with misprinted value at age 71: 0=no, 1=yes",}, \
{DB_GuarCoiTable,DB_Topic_MortalityCharges,"GuarCoiTable","Guaranteed
mortality charge table (index in mortality table database)",}, \
{DB_GuarCoiIsAnnual,DB_Topic_MortalityCharges,"GuarCoiIsAnnual","Guaranteed
cost of insurance table rates are: 0=monthly, 1=annual",}, \
{DB_GuarCoiMultiplier,DB_Topic_MortalityCharges,"GuarCoiMultiplier","Multiplier
applied to guaranteed cost of insurance charges",}, \
diff --git a/oecumenic_enumerations.hpp b/oecumenic_enumerations.hpp
index dd381c8..903a7bf 100644
--- a/oecumenic_enumerations.hpp
+++ b/oecumenic_enumerations.hpp
@@ -44,6 +44,17 @@ enum oenum_asset_charge_type
,oe_asset_charge_load
};
+enum oenum_autopisty
+ {oe_orthodox
+ ,oe_heterodox
+ };
+
+enum oenum_cso_era
+ {oe_1980cso = 1980
+ ,oe_2001cso = 2001
+ ,oe_2017cso = 2017
+ };
+
enum oenum_elasticity
{oe_inelastic
,oe_elastic