lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 978aa53 3/3: Establish a 'sample' product for


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 978aa53 3/3: Establish a 'sample' product for each ledger type
Date: Fri, 23 Feb 2018 13:47:33 -0500 (EST)

branch: master
commit 978aa531d137d37d83aa4508fe0c8c775b89d48d
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Establish a 'sample' product for each ledger type
    
    The undistributed former 'sample2' product has been renamed for
    uniformity. Delete any leftover 'data/sample2.policy' manually.
---
 dbdict.cpp       |  9 +++++++++
 product_data.cpp | 24 +++++++++++++++++++-----
 2 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/dbdict.cpp b/dbdict.cpp
index 460e457..49e69ff 100644
--- a/dbdict.cpp
+++ b/dbdict.cpp
@@ -956,6 +956,15 @@ void DBDictionary::write_database_files()
     z.Add(database_entity(DB_ExpRatAmortPeriod   , 4.0));
 
     z.WriteDB(AddDataDir("sample.database"));
+
+    z.Add(database_entity(DB_LedgerType          , mce_nasd));
+    z.WriteDB(AddDataDir("sample2nasd.database"));
+
+    z.Add(database_entity(DB_LedgerType          , 
mce_group_private_placement));
+    z.WriteDB(AddDataDir("sample2gpp.database"));
+
+    z.Add(database_entity(DB_LedgerType          , 
mce_individual_private_placement));
+    z.WriteDB(AddDataDir("sample2ipp.database"));
 }
 
 /// Initialize the built-in database for the antediluvian branch.
diff --git a/product_data.cpp b/product_data.cpp
index f4b972d..f5f9042 100644
--- a/product_data.cpp
+++ b/product_data.cpp
@@ -430,14 +430,19 @@ void product_data::redintegrate_ex_post
 /// (rather than defaulted to empty strings), are intended to be
 /// plausible, if perhaps whimsical.
 ///
-/// The 'sample2' product is designed to facilitate replacement of
-/// XSL with wxPdfDoc; it may be removed when that task is complete.
+/// The 'sample2*' products are designed to facilitate replacement of
+/// XSL with wxPdfDoc, and may be removed when that task is complete.
+/// There is one for each supported ledger type:
+///   sample2naic  mce_ill_reg
+///   sample2nasd  mce_nasd
+///   sample2gpp   mce_group_private_placement
+///   sample2ipp   mce_individual_private_placement
 /// "*Filename" members are names of actual lmi product files, or
 /// basenames of mortality-table databases, and their values must
 /// nominate actual files. Member 'InsCoDomicile' is used to
 /// determine retaliatory premium-tax rates, and must be a two-letter
 /// USPS abbreviation. All other members represent text that is used
-/// for formatting reports; in order to make 'sample2' more useful for
+/// for report formatting; in order to make 'sample2*' more useful for
 /// developing and testing reports, each has a nonempty value that is
 /// its member name enclosed in braces ("{}"). Braces aren't otherwise
 /// used in values, so any output substring like "{contract}" here:
@@ -531,7 +536,7 @@ void product_data::write_policy_files()
 
     z.save(AddDataDir("sample.policy"));
 
-    // 'sample2' product
+    // 'sample2*' products
 
     for(auto const& i : z.member_names())
         {
@@ -568,7 +573,16 @@ void product_data::write_policy_files()
     // Other data that affect calculations.
     z.InsCoDomicile              = glossed_string("WI");
 
-    z.save(AddDataDir("sample2.policy"));
+    z.save(AddDataDir("sample2naic.policy"));
+
+    z.DatabaseFilename           = glossed_string("sample2nasd.database");
+    z.save(AddDataDir("sample2nasd.policy"));
+
+    z.DatabaseFilename           = glossed_string("sample2gpp.database");
+    z.save(AddDataDir("sample2gpp.policy"));
+
+    z.DatabaseFilename           = glossed_string("sample2ipp.database");
+    z.save(AddDataDir("sample2ipp.policy"));
 }
 
 /// Load from file. This free function can be invoked across dll



reply via email to

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