lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [4822] Rename 'ihs_proddata.?pp' to 'product_data.?pp'


From: Greg Chicares
Subject: [lmi-commits] [4822] Rename 'ihs_proddata.?pp' to 'product_data.?pp'
Date: Thu, 01 Apr 2010 01:10:21 +0000

Revision: 4822
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=4822
Author:   chicares
Date:     2010-04-01 01:10:20 +0000 (Thu, 01 Apr 2010)
Log Message:
-----------
Rename 'ihs_proddata.?pp' to 'product_data.?pp'

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/Makefile.am
    lmi/trunk/generate_product_files.cpp
    lmi/trunk/ihs_acctval.cpp
    lmi/trunk/ihs_avmly.cpp
    lmi/trunk/ihs_basicval.cpp
    lmi/trunk/ihs_database.cpp
    lmi/trunk/input_realization.cpp
    lmi/trunk/ledger_invariant.cpp
    lmi/trunk/mec_server.cpp
    lmi/trunk/my_prod.cpp
    lmi/trunk/objects.make
    lmi/trunk/policy_document.hpp
    lmi/trunk/product_file_test.cpp

Added Paths:
-----------
    lmi/trunk/product_data.cpp
    lmi/trunk/product_data.hpp

Removed Paths:
-------------
    lmi/trunk/ihs_proddata.cpp
    lmi/trunk/ihs_proddata.hpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2010-03-27 18:34:48 UTC (rev 4821)
+++ lmi/trunk/ChangeLog 2010-04-01 01:10:20 UTC (rev 4822)
@@ -24688,3 +24688,29 @@
 to find seems more important than preserving a macro for parallelism
 with related files.
 
+20100327T1834Z <zeitlin> [762]
+
+  Makefile.am
+Fix an incorrect variable name.
+
+20100401T0110Z <address@hidden> [762]
+
+  Makefile.am
+  generate_product_files.cpp
+  ihs_acctval.cpp
+  ihs_avmly.cpp
+  ihs_basicval.cpp
+  ihs_database.cpp
+  ihs_proddata.cpp [expunged]
+  ihs_proddata.hpp [expunged]
+  input_realization.cpp
+  ledger_invariant.cpp
+  mec_server.cpp
+  my_prod.cpp
+  objects.make
+  policy_document.hpp
+  product_data.cpp [new file]
+  product_data.hpp [new file]
+  product_file_test.cpp
+Rename 'ihs_proddata.?pp' to 'product_data.?pp'.
+

Modified: lmi/trunk/Makefile.am
===================================================================
--- lmi/trunk/Makefile.am       2010-03-27 18:34:48 UTC (rev 4821)
+++ lmi/trunk/Makefile.am       2010-04-01 01:10:20 UTC (rev 4822)
@@ -336,7 +336,6 @@
     ihs_irc7702a.cpp \
     ihs_mortal.cpp \
     ihs_pios.cpp \
-    ihs_proddata.cpp \
     ihs_rnddata.cpp \
     mc_enum.cpp \
     mc_enum_types.cpp \
@@ -344,6 +343,7 @@
     md5.cpp \
     mortality_rates_fetch.cpp \
     preferences_model.cpp \
+    product_data.cpp \
     stratified_algorithms.cpp \
     stratified_charges.cpp \
     tn_range_types.cpp \
@@ -736,10 +736,10 @@
   ihs_fpios.cpp \
   ihs_funddata.cpp \
   ihs_pios.cpp \
-  ihs_proddata.cpp \
   ihs_rnddata.cpp \
   miscellany.cpp \
   path_utility.cpp \
+  product_data.cpp \
   product_file_test.cpp \
   rounding_rules.cpp \
   stratified_charges.cpp \
@@ -923,7 +923,6 @@
     ihs_irc7702a.hpp \
     ihs_irc7702.hpp \
     ihs_pios.hpp \
-    ihs_proddata.hpp \
     ihs_rnddata.hpp \
     ihs_server7702.hpp \
     ihs_server7702io.hpp \
@@ -993,6 +992,7 @@
     preferences_view.hpp \
     previewframe_ex.hpp \
     print_matrix.hpp \
+    product_data.hpp \
     product_editor.hpp \
     product_names.hpp \
     progress_meter.hpp \

Modified: lmi/trunk/generate_product_files.cpp
===================================================================
--- lmi/trunk/generate_product_files.cpp        2010-03-27 18:34:48 UTC (rev 
4821)
+++ lmi/trunk/generate_product_files.cpp        2010-04-01 01:10:20 UTC (rev 
4822)
@@ -28,9 +28,9 @@
 
 #include "ihs_dbdict.hpp"
 #include "ihs_funddata.hpp"
-#include "ihs_proddata.hpp"
 #include "ihs_rnddata.hpp"
 #include "main_common.hpp"
+#include "product_data.hpp"
 #include "stratified_charges.hpp"
 
 #include <iostream>

Modified: lmi/trunk/ihs_acctval.cpp
===================================================================
--- lmi/trunk/ihs_acctval.cpp   2010-03-27 18:34:48 UTC (rev 4821)
+++ lmi/trunk/ihs_acctval.cpp   2010-04-01 01:10:20 UTC (rev 4822)
@@ -37,7 +37,6 @@
 #include "ihs_irc7702.hpp"
 #include "ihs_irc7702a.hpp"
 #include "ihs_rnddata.hpp"
-#include "ihs_proddata.hpp"
 #include "input.hpp" // Magic static function.
 #include "interest_rates.hpp"
 #include "ledger.hpp"
@@ -48,6 +47,7 @@
 #include "miscellany.hpp"
 #include "mortality_rates.hpp"
 #include "outlay.hpp"
+#include "product_data.hpp"
 #include "stl_extensions.hpp"
 #include "stratified_algorithms.hpp"
 #include "stratified_charges.hpp"

Modified: lmi/trunk/ihs_avmly.cpp
===================================================================
--- lmi/trunk/ihs_avmly.cpp     2010-03-27 18:34:48 UTC (rev 4821)
+++ lmi/trunk/ihs_avmly.cpp     2010-04-01 01:10:20 UTC (rev 4822)
@@ -35,7 +35,6 @@
 #include "death_benefits.hpp"
 #include "ihs_irc7702.hpp"
 #include "ihs_irc7702a.hpp"
-#include "ihs_proddata.hpp"
 #include "ihs_rnddata.hpp"
 #include "interest_rates.hpp"
 #include "ledger_invariant.hpp"
@@ -46,6 +45,7 @@
 #include "miscellany.hpp"
 #include "mortality_rates.hpp"
 #include "outlay.hpp"
+#include "product_data.hpp"
 #include "stratified_algorithms.hpp"
 #include "stratified_charges.hpp"
 

Modified: lmi/trunk/ihs_basicval.cpp
===================================================================
--- lmi/trunk/ihs_basicval.cpp  2010-03-27 18:34:48 UTC (rev 4821)
+++ lmi/trunk/ihs_basicval.cpp  2010-04-01 01:10:20 UTC (rev 4822)
@@ -41,7 +41,6 @@
 #include "ihs_funddata.hpp"
 #include "ihs_irc7702.hpp"
 #include "ihs_irc7702a.hpp"
-#include "ihs_proddata.hpp"
 #include "ihs_rnddata.hpp"
 #include "ihs_x_type.hpp"
 #include "input.hpp"
@@ -50,6 +49,7 @@
 #include "math_functors.hpp"
 #include "mortality_rates.hpp"
 #include "outlay.hpp"
+#include "product_data.hpp"
 #include "stratified_charges.hpp"
 #include "surrchg_rates.hpp"
 

Modified: lmi/trunk/ihs_database.cpp
===================================================================
--- lmi/trunk/ihs_database.cpp  2010-03-27 18:34:48 UTC (rev 4821)
+++ lmi/trunk/ihs_database.cpp  2010-04-01 01:10:20 UTC (rev 4822)
@@ -37,8 +37,8 @@
 #include "dbnames.hpp"
 #include "ihs_dbdict.hpp"
 #include "ihs_dbvalue.hpp"
-#include "ihs_proddata.hpp"
 #include "oecumenic_enumerations.hpp"
+#include "product_data.hpp"
 #include "yare_input.hpp"
 
 #include <algorithm>

Deleted: lmi/trunk/ihs_proddata.cpp
===================================================================
--- lmi/trunk/ihs_proddata.cpp  2010-03-27 18:34:48 UTC (rev 4821)
+++ lmi/trunk/ihs_proddata.cpp  2010-04-01 01:10:20 UTC (rev 4822)
@@ -1,438 +0,0 @@
-// Product data.
-//
-// Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 
2010 Gregory W. Chicares.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License version 2 as
-// published by the Free Software Foundation.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
-//
-// http://savannah.nongnu.org/projects/lmi
-// email: <address@hidden>
-// snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
-
-// $Id$
-
-// This class contains names of files containing a product's tables as well
-// as strings that are the same for all instances of that product.
-
-// The tables are in SOA table manager binary format.
-
-// The (SOA) table numbers are in the database. To avoid circularity, first
-// instantiate this class, then instantiate the database before reading any
-// tables with the default methods that look to the database for table numbers.
-// This is handled automatically in class BasicValues, where those methods are.
-
-#ifdef __BORLANDC__
-#   include "pchfile.hpp"
-#   pragma hdrstop
-#endif // __BORLANDC__
-
-#include "ihs_proddata.hpp"
-
-#include "alert.hpp"
-#include "assert_lmi.hpp"
-#include "data_directory.hpp"
-#include "platform_dependent.hpp" // access()
-#include "xml_serialize.hpp"
-
-#include <boost/filesystem/convenience.hpp>
-#include <boost/filesystem/path.hpp>
-
-#include <string>
-
-//============================================================================
-TProductData::TProductData()
-{
-}
-
-//============================================================================
-TProductData::~TProductData()
-{
-}
-
-//============================================================================
-TProductData::TProductData(std::string const& a_Filename)
-{
-    Init(a_Filename);
-}
-
-//============================================================================
-void TProductData::Init(std::string const& a_Filename)
-{
-    fs::path path(a_Filename);
-    LMI_ASSERT(a_Filename == path.leaf());
-    path = fs::change_extension(path, ".policy");
-    Read(AddDataDir(path.string()));
-}
-
-namespace
-{
-std::string xml_root_name()
-{
-    return "policy";
-}
-} // Unnamed namespace.
-
-//============================================================================
-void TProductData::Read(std::string const& a_Filename)
-{
-    if(access(a_Filename.c_str(), R_OK))
-        {
-        fatal_error()
-            << "File '"
-            << a_Filename
-            << "' is required but could not be found. Try reinstalling."
-            << LMI_FLUSH
-            ;
-        }
-
-    xml_lmi::dom_parser parser(a_Filename);
-    xml::element const& root = parser.root_node(xml_root_name());
-
-#   define GET_ELEMENT(name) xml_serialize::get_element(root, #name, name)
-
-    GET_ELEMENT(DatabaseFilename              );
-    GET_ELEMENT(FundFilename                  );
-    GET_ELEMENT(CorridorFilename              );
-    GET_ELEMENT(CurrCOIFilename               );
-    GET_ELEMENT(GuarCOIFilename               );
-    GET_ELEMENT(WPFilename                    );
-    GET_ELEMENT(ADDFilename                   );
-    GET_ELEMENT(ChildRiderFilename            );
-    GET_ELEMENT(CurrSpouseRiderFilename       );
-    GET_ELEMENT(GuarSpouseRiderFilename       );
-    GET_ELEMENT(CurrTermFilename              );
-    GET_ELEMENT(GuarTermFilename              );
-    GET_ELEMENT(TableYFilename                );
-    GET_ELEMENT(PremTaxFilename               );
-    GET_ELEMENT(TAMRA7PayFilename             );
-    GET_ELEMENT(TgtPremFilename               );
-    GET_ELEMENT(IRC7702Filename               );
-    GET_ELEMENT(Gam83Filename                 );
-    GET_ELEMENT(SubstdTblMultFilename         );
-    GET_ELEMENT(CurrSpecAmtLoadFilename       );
-    GET_ELEMENT(GuarSpecAmtLoadFilename       );
-    GET_ELEMENT(RoundingFilename              );
-    GET_ELEMENT(TierFilename                  );
-    GET_ELEMENT(PolicyForm                    );
-    GET_ELEMENT(PolicyMktgName                );
-    GET_ELEMENT(PolicyLegalName               );
-    GET_ELEMENT(InsCoShortName                );
-    GET_ELEMENT(InsCoName                     );
-    GET_ELEMENT(InsCoAddr                     );
-    GET_ELEMENT(InsCoStreet                   );
-    GET_ELEMENT(InsCoPhone                    );
-    GET_ELEMENT(InsCoDomicile                 );
-    GET_ELEMENT(MainUnderwriter               );
-    GET_ELEMENT(MainUnderwriterAddress        );
-    GET_ELEMENT(CoUnderwriter                 );
-    GET_ELEMENT(CoUnderwriterAddress          );
-    GET_ELEMENT(AvName                        );
-    GET_ELEMENT(CsvName                       );
-    GET_ELEMENT(CsvHeaderName                 );
-    GET_ELEMENT(NoLapseProvisionName          );
-    GET_ELEMENT(InterestDisclaimer            );
-    GET_ELEMENT(GuarMortalityFootnote         );
-    GET_ELEMENT(AccountValueFootnote          );
-    GET_ELEMENT(AttainedAgeFootnote           );
-    GET_ELEMENT(CashSurrValueFootnote         );
-    GET_ELEMENT(DeathBenefitFootnote          );
-    GET_ELEMENT(InitialPremiumFootnote        );
-    GET_ELEMENT(NetPremiumFootnote            );
-    GET_ELEMENT(OutlayFootnote                );
-    GET_ELEMENT(PolicyYearFootnote            );
-    GET_ELEMENT(ADDFootnote                   );
-    GET_ELEMENT(ChildFootnote                 );
-    GET_ELEMENT(SpouseFootnote                );
-    GET_ELEMENT(TermFootnote                  );
-    GET_ELEMENT(WaiverFootnote                );
-    GET_ELEMENT(MinimumPremiumFootnote        );
-    GET_ELEMENT(PremAllocationFootnote        );
-    GET_ELEMENT(ProductDescription            );
-    GET_ELEMENT(StableValueFootnote           );
-    GET_ELEMENT(NoVanishPremiumFootnote       );
-    GET_ELEMENT(RejectPremiumFootnote         );
-    GET_ELEMENT(ExpRatingFootnote             );
-    GET_ELEMENT(MortalityBlendFootnote        );
-    GET_ELEMENT(HypotheticalRatesFootnote     );
-    GET_ELEMENT(SalesLoadRefundFootnote       );
-    GET_ELEMENT(NoLapseFootnote               );
-    GET_ELEMENT(MarketValueAdjFootnote        );
-    GET_ELEMENT(ExchangeChargeFootnote0       );
-    GET_ELEMENT(CurrentValuesFootnote         );
-    GET_ELEMENT(DBOption1Footnote             );
-    GET_ELEMENT(DBOption2Footnote             );
-    GET_ELEMENT(ExpRatRiskChargeFootnote      );
-    GET_ELEMENT(ExchangeChargeFootnote1       );
-    GET_ELEMENT(FlexiblePremiumFootnote       );
-    GET_ELEMENT(GuaranteedValuesFootnote      );
-    GET_ELEMENT(CreditingRateFootnote         );
-    GET_ELEMENT(MecFootnote                   );
-    GET_ELEMENT(MidpointValuesFootnote        );
-    GET_ELEMENT(SinglePremiumFootnote         );
-    GET_ELEMENT(MonthlyChargesFootnote        );
-    GET_ELEMENT(UltCreditingRateFootnote      );
-    GET_ELEMENT(MaxNaarFootnote               );
-    GET_ELEMENT(PremTaxSurrChgFootnote        );
-    GET_ELEMENT(PolicyFeeFootnote             );
-    GET_ELEMENT(AssetChargeFootnote           );
-    GET_ELEMENT(InvestmentIncomeFootnote      );
-    GET_ELEMENT(IrrDbFootnote                 );
-    GET_ELEMENT(IrrCsvFootnote                );
-    GET_ELEMENT(MortalityChargesFootnote      );
-    GET_ELEMENT(LoanAndWithdrawalFootnote     );
-    GET_ELEMENT(PresaleTrackingNumber         );
-    GET_ELEMENT(CompositeTrackingNumber       );
-    GET_ELEMENT(InforceTrackingNumber         );
-    GET_ELEMENT(InforceCompositeTrackingNumber);
-    GET_ELEMENT(InforceNonGuaranteedFootnote0 );
-    GET_ELEMENT(InforceNonGuaranteedFootnote1 );
-    GET_ELEMENT(InforceNonGuaranteedFootnote2 );
-    GET_ELEMENT(InforceNonGuaranteedFootnote3 );
-    GET_ELEMENT(NonGuaranteedFootnote         );
-    GET_ELEMENT(MonthlyChargesPaymentFootnote );
-
-#   undef GET_ELEMENT
-}
-
-//============================================================================
-void TProductData::Write(std::string const& a_Filename) const
-{
-    xml_lmi::xml_document document(xml_root_name());
-    xml::element& root = document.root_node();
-
-    xml_lmi::set_attr(root, "version", "0");
-
-#   define SET_ELEMENT(name) xml_serialize::set_element(root, #name, name)
-
-    SET_ELEMENT(DatabaseFilename              );
-    SET_ELEMENT(FundFilename                  );
-    SET_ELEMENT(CorridorFilename              );
-    SET_ELEMENT(CurrCOIFilename               );
-    SET_ELEMENT(GuarCOIFilename               );
-    SET_ELEMENT(WPFilename                    );
-    SET_ELEMENT(ADDFilename                   );
-    SET_ELEMENT(ChildRiderFilename            );
-    SET_ELEMENT(CurrSpouseRiderFilename       );
-    SET_ELEMENT(GuarSpouseRiderFilename       );
-    SET_ELEMENT(CurrTermFilename              );
-    SET_ELEMENT(GuarTermFilename              );
-    SET_ELEMENT(TableYFilename                );
-    SET_ELEMENT(PremTaxFilename               );
-    SET_ELEMENT(TAMRA7PayFilename             );
-    SET_ELEMENT(TgtPremFilename               );
-    SET_ELEMENT(IRC7702Filename               );
-    SET_ELEMENT(Gam83Filename                 );
-    SET_ELEMENT(SubstdTblMultFilename         );
-    SET_ELEMENT(CurrSpecAmtLoadFilename       );
-    SET_ELEMENT(GuarSpecAmtLoadFilename       );
-    SET_ELEMENT(RoundingFilename              );
-    SET_ELEMENT(TierFilename                  );
-    SET_ELEMENT(PolicyForm                    );
-    SET_ELEMENT(PolicyMktgName                );
-    SET_ELEMENT(PolicyLegalName               );
-    SET_ELEMENT(InsCoShortName                );
-    SET_ELEMENT(InsCoName                     );
-    SET_ELEMENT(InsCoAddr                     );
-    SET_ELEMENT(InsCoStreet                   );
-    SET_ELEMENT(InsCoPhone                    );
-    SET_ELEMENT(InsCoDomicile                 );
-    SET_ELEMENT(MainUnderwriter               );
-    SET_ELEMENT(MainUnderwriterAddress        );
-    SET_ELEMENT(CoUnderwriter                 );
-    SET_ELEMENT(CoUnderwriterAddress          );
-    SET_ELEMENT(AvName                        );
-    SET_ELEMENT(CsvName                       );
-    SET_ELEMENT(CsvHeaderName                 );
-    SET_ELEMENT(NoLapseProvisionName          );
-    SET_ELEMENT(InterestDisclaimer            );
-    SET_ELEMENT(GuarMortalityFootnote         );
-    SET_ELEMENT(AccountValueFootnote          );
-    SET_ELEMENT(AttainedAgeFootnote           );
-    SET_ELEMENT(CashSurrValueFootnote         );
-    SET_ELEMENT(DeathBenefitFootnote          );
-    SET_ELEMENT(InitialPremiumFootnote        );
-    SET_ELEMENT(NetPremiumFootnote            );
-    SET_ELEMENT(OutlayFootnote                );
-    SET_ELEMENT(PolicyYearFootnote            );
-    SET_ELEMENT(ADDFootnote                   );
-    SET_ELEMENT(ChildFootnote                 );
-    SET_ELEMENT(SpouseFootnote                );
-    SET_ELEMENT(TermFootnote                  );
-    SET_ELEMENT(WaiverFootnote                );
-    SET_ELEMENT(MinimumPremiumFootnote        );
-    SET_ELEMENT(PremAllocationFootnote        );
-    SET_ELEMENT(ProductDescription            );
-    SET_ELEMENT(StableValueFootnote           );
-    SET_ELEMENT(NoVanishPremiumFootnote       );
-    SET_ELEMENT(RejectPremiumFootnote         );
-    SET_ELEMENT(ExpRatingFootnote             );
-    SET_ELEMENT(MortalityBlendFootnote        );
-    SET_ELEMENT(HypotheticalRatesFootnote     );
-    SET_ELEMENT(SalesLoadRefundFootnote       );
-    SET_ELEMENT(NoLapseFootnote               );
-    SET_ELEMENT(MarketValueAdjFootnote        );
-    SET_ELEMENT(ExchangeChargeFootnote0       );
-    SET_ELEMENT(CurrentValuesFootnote         );
-    SET_ELEMENT(DBOption1Footnote             );
-    SET_ELEMENT(DBOption2Footnote             );
-    SET_ELEMENT(ExpRatRiskChargeFootnote      );
-    SET_ELEMENT(ExchangeChargeFootnote1       );
-    SET_ELEMENT(FlexiblePremiumFootnote       );
-    SET_ELEMENT(GuaranteedValuesFootnote      );
-    SET_ELEMENT(CreditingRateFootnote         );
-    SET_ELEMENT(MecFootnote                   );
-    SET_ELEMENT(MidpointValuesFootnote        );
-    SET_ELEMENT(SinglePremiumFootnote         );
-    SET_ELEMENT(MonthlyChargesFootnote        );
-    SET_ELEMENT(UltCreditingRateFootnote      );
-    SET_ELEMENT(MaxNaarFootnote               );
-    SET_ELEMENT(PremTaxSurrChgFootnote        );
-    SET_ELEMENT(PolicyFeeFootnote             );
-    SET_ELEMENT(AssetChargeFootnote           );
-    SET_ELEMENT(InvestmentIncomeFootnote      );
-    SET_ELEMENT(IrrDbFootnote                 );
-    SET_ELEMENT(IrrCsvFootnote                );
-    SET_ELEMENT(MortalityChargesFootnote      );
-    SET_ELEMENT(LoanAndWithdrawalFootnote     );
-    SET_ELEMENT(PresaleTrackingNumber         );
-    SET_ELEMENT(CompositeTrackingNumber       );
-    SET_ELEMENT(InforceTrackingNumber         );
-    SET_ELEMENT(InforceCompositeTrackingNumber);
-    SET_ELEMENT(InforceNonGuaranteedFootnote0 );
-    SET_ELEMENT(InforceNonGuaranteedFootnote1 );
-    SET_ELEMENT(InforceNonGuaranteedFootnote2 );
-    SET_ELEMENT(InforceNonGuaranteedFootnote3 );
-    SET_ELEMENT(NonGuaranteedFootnote         );
-    SET_ELEMENT(MonthlyChargesPaymentFootnote );
-
-#   undef SET_ELEMENT
-
-    // Instead of this:
-//    document.save(a_Filename);
-    // for the nonce, explicitly change the extension, in order to
-    // force external product-file code to use the new extension.
-    fs::path path(a_Filename, fs::native);
-    path = fs::change_extension(path, ".policy");
-    document.save(path.string());
-}
-
-//============================================================================
-void TProductData::WritePolFiles()
-{
-    TProductData foo;
-
-    foo.CorridorFilename               = "sample";
-    foo.CurrCOIFilename                = "qx_cso";
-    foo.GuarCOIFilename                = "qx_cso";
-    foo.WPFilename                     = "sample";
-    foo.ADDFilename                    = "qx_ins";
-    foo.ChildRiderFilename             = "qx_ins";
-    foo.CurrSpouseRiderFilename        = "qx_ins";
-    foo.GuarSpouseRiderFilename        = "qx_ins";
-    foo.CurrTermFilename               = "qx_cso";
-    foo.GuarTermFilename               = "qx_cso";
-    foo.TableYFilename                 = "qx_ins";
-    foo.PremTaxFilename                = "sample";
-    foo.TAMRA7PayFilename              = "sample";
-    foo.TgtPremFilename                = "sample";
-    foo.IRC7702Filename                = "qx_cso";
-    foo.Gam83Filename                  = "qx_ann";
-    foo.SubstdTblMultFilename          = "sample";
-    foo.CurrSpecAmtLoadFilename        = "sample";
-    foo.GuarSpecAmtLoadFilename        = "sample";
-    foo.PolicyForm                     = "UL32768-NY";
-    foo.PolicyMktgName                 = "UL Supreme";
-    foo.PolicyLegalName = "Flexible Premium Adjustable Life Insurance Policy";
-    foo.InsCoShortName                 = "Superior Life";
-    foo.InsCoName                      = "Superior Life Insurance Company";
-    foo.InsCoAddr                      = "Superior, WI 12345";
-    foo.InsCoStreet                    = "246 Main Street";
-    foo.InsCoPhone                     = "(800) 555-1212";
-    foo.InsCoDomicile                  = "WI";
-    foo.MainUnderwriter                = "Superior Securities";
-    foo.MainUnderwriterAddress         = "246-M Main Street, Superior, WI 
12345";
-    foo.CoUnderwriter                  = "Superior Investors";
-    foo.CoUnderwriterAddress           = "246-C Main Street, Superior, WI 
12345";
-    foo.AvName                         = "Account";
-    foo.CsvName                        = "Cash Surrender";
-    foo.CsvHeaderName                  = "Cash Surr";
-    foo.NoLapseProvisionName           = "No-lapse Provision";
-    foo.InterestDisclaimer             = "";
-    foo.GuarMortalityFootnote          = "";
-    foo.AccountValueFootnote           = "";
-    foo.AttainedAgeFootnote            = "";
-    foo.CashSurrValueFootnote          = "";
-    foo.DeathBenefitFootnote           = "";
-    foo.InitialPremiumFootnote         = "";
-    foo.NetPremiumFootnote             = "";
-    foo.OutlayFootnote                 = "";
-    foo.PolicyYearFootnote             = "";
-    foo.ADDFootnote                    = "";
-    foo.ChildFootnote                  = "";
-    foo.SpouseFootnote                 = "";
-    foo.TermFootnote                   = "";
-    foo.WaiverFootnote                 = "";
-    foo.MinimumPremiumFootnote         = "";
-    foo.PremAllocationFootnote         = "";
-    foo.ProductDescription             = "";
-    foo.StableValueFootnote            = "";
-    foo.NoVanishPremiumFootnote        = "";
-    foo.RejectPremiumFootnote          = "";
-    foo.ExpRatingFootnote              = "";
-    foo.MortalityBlendFootnote         = "";
-    foo.HypotheticalRatesFootnote      = "";
-    foo.SalesLoadRefundFootnote        = "";
-    foo.NoLapseFootnote                = "";
-    foo.MarketValueAdjFootnote         = "";
-    foo.ExchangeChargeFootnote0        = "";
-    foo.CurrentValuesFootnote          = "";
-    foo.DBOption1Footnote              = "";
-    foo.DBOption2Footnote              = "";
-    foo.ExpRatRiskChargeFootnote       = "";
-    foo.ExchangeChargeFootnote1        = "";
-    foo.FlexiblePremiumFootnote        = "";
-    foo.GuaranteedValuesFootnote       = "";
-    foo.CreditingRateFootnote          = "";
-    foo.MecFootnote                    = "";
-    foo.MidpointValuesFootnote         = "";
-    foo.SinglePremiumFootnote          = "";
-    foo.MonthlyChargesFootnote         = "";
-    foo.UltCreditingRateFootnote       = "";
-    foo.MaxNaarFootnote                = "";
-    foo.PremTaxSurrChgFootnote         = "";
-    foo.PolicyFeeFootnote              = "";
-    foo.AssetChargeFootnote            = "";
-    foo.InvestmentIncomeFootnote       = "";
-    foo.IrrDbFootnote                  = "";
-    foo.IrrCsvFootnote                 = "";
-    foo.MortalityChargesFootnote       = "";
-    foo.LoanAndWithdrawalFootnote      = "";
-    foo.PresaleTrackingNumber          = "";
-    foo.CompositeTrackingNumber        = "";
-    foo.InforceTrackingNumber          = "";
-    foo.InforceCompositeTrackingNumber = "";
-    foo.InforceNonGuaranteedFootnote0  = "";
-    foo.InforceNonGuaranteedFootnote1  = "";
-    foo.InforceNonGuaranteedFootnote2  = "";
-    foo.InforceNonGuaranteedFootnote3  = "";
-    foo.NonGuaranteedFootnote          = "";
-    foo.MonthlyChargesPaymentFootnote  = "";
-
-    foo.DatabaseFilename = "sample.db4";
-    foo.FundFilename     = "sample.fnd";
-    foo.RoundingFilename = "sample.rnd";
-    foo.TierFilename     = "sample.tir";
-
-    foo.Write(AddDataDir("sample.policy"));
-}
-

Deleted: lmi/trunk/ihs_proddata.hpp
===================================================================
--- lmi/trunk/ihs_proddata.hpp  2010-03-27 18:34:48 UTC (rev 4821)
+++ lmi/trunk/ihs_proddata.hpp  2010-04-01 01:10:20 UTC (rev 4822)
@@ -1,270 +0,0 @@
-// Product data.
-//
-// Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 
2010 Gregory W. Chicares.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License version 2 as
-// published by the Free Software Foundation.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
-//
-// http://savannah.nongnu.org/projects/lmi
-// email: <address@hidden>
-// snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
-
-// $Id$
-
-#ifndef ihs_proddata_hpp
-#define ihs_proddata_hpp
-
-#include "config.hpp"
-
-#include "so_attributes.hpp"
-
-#include <string>
-
-// Filenames and other free-form offline data that vary by product.
-
-class LMI_SO TProductData
-{
-    friend class PolicyDocument;
-    friend class PolicyView;
-
-  public:
-    explicit TProductData(std::string const& a_Filename);
-    ~TProductData();
-
-    static void WritePolFiles();
-    static void WriteProprietaryPolFiles();
-
-    std::string const& GetDatabaseFilename       () const {return 
DatabaseFilename;       }
-    std::string const& GetFundFilename           () const {return 
FundFilename;           }
-    std::string const& GetCorridorFilename       () const {return 
CorridorFilename;       }
-    std::string const& GetCurrCOIFilename        () const {return 
CurrCOIFilename;        }
-    std::string const& GetGuarCOIFilename        () const {return 
GuarCOIFilename;        }
-    std::string const& GetWPFilename             () const {return WPFilename;  
           }
-    std::string const& GetADDFilename            () const {return ADDFilename; 
           }
-    std::string const& GetChildRiderFilename     () const {return 
ChildRiderFilename;     }
-    std::string const& GetCurrSpouseRiderFilename() const {return 
CurrSpouseRiderFilename;}
-    std::string const& GetGuarSpouseRiderFilename() const {return 
GuarSpouseRiderFilename;}
-    std::string const& GetCurrTermFilename       () const {return 
CurrTermFilename;       }
-    std::string const& GetGuarTermFilename       () const {return 
GuarTermFilename;       }
-    std::string const& GetTableYFilename         () const {return 
TableYFilename;         }
-    std::string const& GetPremTaxFilename        () const {return 
PremTaxFilename;        }
-    std::string const& GetTAMRA7PayFilename      () const {return 
TAMRA7PayFilename;      }
-    std::string const& GetTgtPremFilename        () const {return 
TgtPremFilename;        }
-    std::string const& GetIRC7702Filename        () const {return 
IRC7702Filename;        }
-    std::string const& GetGam83Filename          () const {return 
Gam83Filename;          }
-    std::string const& GetSubstdTblMultFilename  () const {return 
SubstdTblMultFilename;  }
-    std::string const& GetCurrSpecAmtLoadFilename() const {return 
CurrSpecAmtLoadFilename;}
-    std::string const& GetGuarSpecAmtLoadFilename() const {return 
GuarSpecAmtLoadFilename;}
-    std::string const& GetRoundingFilename       () const {return 
RoundingFilename;       }
-    std::string const& GetTierFilename           () const {return 
TierFilename;           }
-
-    std::string const& GetPolicyForm                    () const {return 
PolicyForm;                    }
-    std::string const& GetPolicyMktgName                () const {return 
PolicyMktgName;                }
-    std::string const& GetPolicyLegalName               () const {return 
PolicyLegalName;               }
-    std::string const& GetInsCoShortName                () const {return 
InsCoShortName;                }
-    std::string const& GetInsCoName                     () const {return 
InsCoName;                     }
-    std::string const& GetInsCoAddr                     () const {return 
InsCoAddr;                     }
-    std::string const& GetInsCoStreet                   () const {return 
InsCoStreet;                   }
-    std::string const& GetInsCoPhone                    () const {return 
InsCoPhone;                    }
-    std::string const& GetInsCoDomicile                 () const {return 
InsCoDomicile;                 }
-    std::string const& GetMainUnderwriter               () const {return 
MainUnderwriter;               }
-    std::string const& GetMainUnderwriterAddress        () const {return 
MainUnderwriterAddress;        }
-    std::string const& GetCoUnderwriter                 () const {return 
CoUnderwriter;                 }
-    std::string const& GetCoUnderwriterAddress          () const {return 
CoUnderwriterAddress;          }
-    std::string const& GetAvName                        () const {return 
AvName;                        }
-    std::string const& GetCsvName                       () const {return 
CsvName;                       }
-    std::string const& GetCsvHeaderName                 () const {return 
CsvHeaderName;                 }
-    std::string const& GetNoLapseProvisionName          () const {return 
NoLapseProvisionName;          }
-    std::string const& GetInterestDisclaimer            () const {return 
InterestDisclaimer;            }
-    std::string const& GetGuarMortalityFootnote         () const {return 
GuarMortalityFootnote;         }
-    std::string const& GetAccountValueFootnote          () const {return 
AccountValueFootnote;          }
-    std::string const& GetAttainedAgeFootnote           () const {return 
AttainedAgeFootnote;           }
-    std::string const& GetCashSurrValueFootnote         () const {return 
CashSurrValueFootnote;         }
-    std::string const& GetDeathBenefitFootnote          () const {return 
DeathBenefitFootnote;          }
-    std::string const& GetInitialPremiumFootnote        () const {return 
InitialPremiumFootnote;        }
-    std::string const& GetNetPremiumFootnote            () const {return 
NetPremiumFootnote;            }
-    std::string const& GetOutlayFootnote                () const {return 
OutlayFootnote;                }
-    std::string const& GetPolicyYearFootnote            () const {return 
PolicyYearFootnote;            }
-    std::string const& GetADDFootnote                   () const {return 
ADDFootnote;                   }
-    std::string const& GetChildFootnote                 () const {return 
ChildFootnote;                 }
-    std::string const& GetSpouseFootnote                () const {return 
SpouseFootnote;                }
-    std::string const& GetTermFootnote                  () const {return 
TermFootnote;                  }
-    std::string const& GetWaiverFootnote                () const {return 
WaiverFootnote;                }
-    std::string const& GetMinimumPremiumFootnote        () const {return 
MinimumPremiumFootnote;        }
-    std::string const& GetPremAllocationFootnote        () const {return 
PremAllocationFootnote;        }
-    std::string const& GetProductDescription            () const {return 
ProductDescription;            }
-    std::string const& GetStableValueFootnote           () const {return 
StableValueFootnote;           }
-    std::string const& GetNoVanishPremiumFootnote       () const {return 
NoVanishPremiumFootnote;       }
-    std::string const& GetRejectPremiumFootnote         () const {return 
RejectPremiumFootnote;         }
-    std::string const& GetExpRatingFootnote             () const {return 
ExpRatingFootnote;             }
-    std::string const& GetMortalityBlendFootnote        () const {return 
MortalityBlendFootnote;        }
-    std::string const& GetHypotheticalRatesFootnote     () const {return 
HypotheticalRatesFootnote;     }
-    std::string const& GetSalesLoadRefundFootnote       () const {return 
SalesLoadRefundFootnote;       }
-    std::string const& GetNoLapseFootnote               () const {return 
NoLapseFootnote;               }
-    std::string const& GetMarketValueAdjFootnote        () const {return 
MarketValueAdjFootnote;        }
-    std::string const& GetExchangeChargeFootnote0       () const {return 
ExchangeChargeFootnote0;       }
-    std::string const& GetCurrentValuesFootnote         () const {return 
CurrentValuesFootnote;         }
-    std::string const& GetDBOption1Footnote             () const {return 
DBOption1Footnote;             }
-    std::string const& GetDBOption2Footnote             () const {return 
DBOption2Footnote;             }
-    std::string const& GetExpRatRiskChargeFootnote      () const {return 
ExpRatRiskChargeFootnote;      }
-    std::string const& GetExchangeChargeFootnote1       () const {return 
ExchangeChargeFootnote1;       }
-    std::string const& GetFlexiblePremiumFootnote       () const {return 
FlexiblePremiumFootnote;       }
-    std::string const& GetGuaranteedValuesFootnote      () const {return 
GuaranteedValuesFootnote;      }
-    std::string const& GetCreditingRateFootnote         () const {return 
CreditingRateFootnote;         }
-    std::string const& GetMecFootnote                   () const {return 
MecFootnote;                   }
-    std::string const& GetMidpointValuesFootnote        () const {return 
MidpointValuesFootnote;        }
-    std::string const& GetSinglePremiumFootnote         () const {return 
SinglePremiumFootnote;         }
-    std::string const& GetMonthlyChargesFootnote        () const {return 
MonthlyChargesFootnote;        }
-    std::string const& GetUltCreditingRateFootnote      () const {return 
UltCreditingRateFootnote;      }
-    std::string const& GetMaxNaarFootnote               () const {return 
MaxNaarFootnote;               }
-    std::string const& GetPremTaxSurrChgFootnote        () const {return 
PremTaxSurrChgFootnote;        }
-    std::string const& GetPolicyFeeFootnote             () const {return 
PolicyFeeFootnote;             }
-    std::string const& GetAssetChargeFootnote           () const {return 
AssetChargeFootnote;           }
-    std::string const& GetInvestmentIncomeFootnote      () const {return 
InvestmentIncomeFootnote;      }
-    std::string const& GetIrrDbFootnote                 () const {return 
IrrDbFootnote;                 }
-    std::string const& GetIrrCsvFootnote                () const {return 
IrrCsvFootnote;                }
-    std::string const& GetMortalityChargesFootnote      () const {return 
MortalityChargesFootnote;      }
-    std::string const& GetLoanAndWithdrawalFootnote     () const {return 
LoanAndWithdrawalFootnote;     }
-    std::string const& GetPresaleTrackingNumber         () const {return 
PresaleTrackingNumber;         }
-    std::string const& GetCompositeTrackingNumber       () const {return 
CompositeTrackingNumber;       }
-    std::string const& GetInforceTrackingNumber         () const {return 
InforceTrackingNumber;         }
-    std::string const& GetInforceCompositeTrackingNumber() const {return 
InforceCompositeTrackingNumber;}
-    std::string const& GetInforceNonGuaranteedFootnote0 () const {return 
InforceNonGuaranteedFootnote0 ;}
-    std::string const& GetInforceNonGuaranteedFootnote1 () const {return 
InforceNonGuaranteedFootnote1 ;}
-    std::string const& GetInforceNonGuaranteedFootnote2 () const {return 
InforceNonGuaranteedFootnote2 ;}
-    std::string const& GetInforceNonGuaranteedFootnote3 () const {return 
InforceNonGuaranteedFootnote3 ;}
-    std::string const& GetNonGuaranteedFootnote         () const {return 
NonGuaranteedFootnote         ;}
-    std::string const& GetMonthlyChargesPaymentFootnote () const {return 
MonthlyChargesPaymentFootnote ;}
-
-  private:
-    TProductData();
-
-    void Init(std::string const& a_Filename);
-    void Read(std::string const& a_Filename);
-    void Write(std::string const& a_Filename) const;
-
-    std::string DatabaseFilename;
-    std::string FundFilename;
-    std::string CorridorFilename;
-    std::string CurrCOIFilename;
-    std::string GuarCOIFilename;
-    std::string WPFilename;
-    std::string ADDFilename;
-    std::string ChildRiderFilename;
-    std::string CurrSpouseRiderFilename;
-    std::string GuarSpouseRiderFilename;
-    std::string CurrTermFilename;
-    std::string GuarTermFilename;
-    std::string TableYFilename;
-    std::string PremTaxFilename;
-    std::string TAMRA7PayFilename;
-    std::string TgtPremFilename;
-    std::string IRC7702Filename;
-    std::string Gam83Filename;
-    std::string SubstdTblMultFilename;
-    std::string CurrSpecAmtLoadFilename;
-    std::string GuarSpecAmtLoadFilename;
-    std::string RoundingFilename;
-    std::string TierFilename;
-
-    std::string PolicyForm;
-    std::string PolicyMktgName;
-    std::string PolicyLegalName;
-    std::string InsCoShortName;
-    std::string InsCoName;
-    std::string InsCoAddr;
-    std::string InsCoStreet;
-    std::string InsCoPhone;
-    std::string InsCoDomicile;
-    std::string MainUnderwriter;
-    std::string MainUnderwriterAddress;
-    std::string CoUnderwriter;
-    std::string CoUnderwriterAddress;
-
-    // Illustration reg requires column headers to use names in
-    // contract, e.g. for account and surrender values.
-    std::string AvName;
-    std::string CsvName;
-    std::string CsvHeaderName;
-    std::string NoLapseProvisionName;
-    std::string InterestDisclaimer;
-    std::string GuarMortalityFootnote;
-
-    // Ledger column definitions.
-    std::string AccountValueFootnote;
-    std::string AttainedAgeFootnote;
-    std::string CashSurrValueFootnote;
-    std::string DeathBenefitFootnote;
-    std::string InitialPremiumFootnote;
-    std::string NetPremiumFootnote;
-    std::string OutlayFootnote;
-    std::string PolicyYearFootnote;
-
-    // Rider footnotes.
-    std::string ADDFootnote;
-    std::string ChildFootnote;
-    std::string SpouseFootnote;
-    std::string TermFootnote;
-    std::string WaiverFootnote;
-
-    // Premium-specific footnotes.
-    std::string MinimumPremiumFootnote;
-    std::string PremAllocationFootnote;
-
-    std::string ProductDescription;
-    std::string StableValueFootnote;
-    std::string NoVanishPremiumFootnote;
-    std::string RejectPremiumFootnote;
-    std::string ExpRatingFootnote;
-    std::string MortalityBlendFootnote;
-    std::string HypotheticalRatesFootnote;
-    std::string SalesLoadRefundFootnote;
-    std::string NoLapseFootnote;
-    std::string MarketValueAdjFootnote;
-    std::string ExchangeChargeFootnote0;
-    std::string CurrentValuesFootnote;
-    std::string DBOption1Footnote;
-    std::string DBOption2Footnote;
-    std::string ExpRatRiskChargeFootnote;
-    std::string ExchangeChargeFootnote1;
-    std::string FlexiblePremiumFootnote;
-    std::string GuaranteedValuesFootnote;
-    std::string CreditingRateFootnote;
-    std::string MecFootnote;
-    std::string MidpointValuesFootnote;
-    std::string SinglePremiumFootnote;
-    std::string MonthlyChargesFootnote;
-    std::string UltCreditingRateFootnote;
-    std::string MaxNaarFootnote;
-    std::string PremTaxSurrChgFootnote;
-    std::string PolicyFeeFootnote;
-    std::string AssetChargeFootnote;
-    std::string InvestmentIncomeFootnote;
-    std::string IrrDbFootnote;
-    std::string IrrCsvFootnote;
-    std::string MortalityChargesFootnote;
-    std::string LoanAndWithdrawalFootnote;
-    std::string PresaleTrackingNumber;
-    std::string CompositeTrackingNumber;
-    std::string InforceTrackingNumber;
-    std::string InforceCompositeTrackingNumber;
-    std::string InforceNonGuaranteedFootnote0;
-    std::string InforceNonGuaranteedFootnote1;
-    std::string InforceNonGuaranteedFootnote2;
-    std::string InforceNonGuaranteedFootnote3;
-    std::string NonGuaranteedFootnote;
-    std::string MonthlyChargesPaymentFootnote;
-};
-
-#endif // ihs_proddata_hpp
-

Modified: lmi/trunk/input_realization.cpp
===================================================================
--- lmi/trunk/input_realization.cpp     2010-03-27 18:34:48 UTC (rev 4821)
+++ lmi/trunk/input_realization.cpp     2010-04-01 01:10:20 UTC (rev 4822)
@@ -989,8 +989,8 @@
 // This would be preferable:
 //
 // #include "data_directory.hpp" // AddDataDir(), needed to access product 
data.
-// #include "ihs_proddata.hpp"   // Product data, needed to access rounding 
rules.
 // #include "ihs_rnddata.hpp"    // Rounding.
+// #include "product_data.hpp"   // Product data, needed to access rounding 
rules.
 //
 //        term_spec_amt = StreamableRoundingRules
 //            (AddDataDir(TProductData(ProductName).GetRoundingFilename())

Modified: lmi/trunk/ledger_invariant.cpp
===================================================================
--- lmi/trunk/ledger_invariant.cpp      2010-03-27 18:34:48 UTC (rev 4821)
+++ lmi/trunk/ledger_invariant.cpp      2010-04-01 01:10:20 UTC (rev 4822)
@@ -37,7 +37,6 @@
 #include "death_benefits.hpp"
 #include "financial.hpp"  // TODO ?? For IRRs--prolly don't blong here.
 #include "ihs_funddata.hpp"
-#include "ihs_proddata.hpp"
 #include "input.hpp"
 #include "interest_rates.hpp"
 #include "ledger.hpp" // TODO ?? For IRRs--prolly don't blong here.
@@ -46,6 +45,7 @@
 #include "mc_enum_aux.hpp" // mc_e_vector_to_string_vector()
 #include "miscellany.hpp"
 #include "outlay.hpp"
+#include "product_data.hpp"
 #include "rounding_rules.hpp"
 
 #include <algorithm>

Modified: lmi/trunk/mec_server.cpp
===================================================================
--- lmi/trunk/mec_server.cpp    2010-03-27 18:34:48 UTC (rev 4821)
+++ lmi/trunk/mec_server.cpp    2010-04-01 01:10:20 UTC (rev 4822)
@@ -38,7 +38,6 @@
 #include "et_vector.hpp"
 #include "ihs_commfns.hpp"
 #include "ihs_irc7702a.hpp"
-#include "ihs_proddata.hpp"
 #include "materially_equal.hpp"
 #include "math_functors.hpp"
 #include "mec_input.hpp"
@@ -46,6 +45,7 @@
 #include "miscellany.hpp"            // ios_out_trunc_binary()
 #include "oecumenic_enumerations.hpp"
 #include "path_utility.hpp"          // fs::path inserter
+#include "product_data.hpp"
 #include "round_to.hpp"
 #include "stratified_algorithms.hpp" // TieredGrossToNet()
 #include "stratified_charges.hpp"

Modified: lmi/trunk/my_prod.cpp
===================================================================
--- lmi/trunk/my_prod.cpp       2010-03-27 18:34:48 UTC (rev 4821)
+++ lmi/trunk/my_prod.cpp       2010-04-01 01:10:20 UTC (rev 4822)
@@ -39,7 +39,7 @@
 #   pragma hdrstop
 #endif // __BORLANDC__
 
-#include "ihs_proddata.hpp"
+#include "product_data.hpp"
 
 #include "data_directory.hpp"
 

Modified: lmi/trunk/objects.make
===================================================================
--- lmi/trunk/objects.make      2010-03-27 18:34:48 UTC (rev 4821)
+++ lmi/trunk/objects.make      2010-04-01 01:10:20 UTC (rev 4822)
@@ -283,7 +283,6 @@
   ihs_irc7702a.o \
   ihs_mortal.o \
   ihs_pios.o \
-  ihs_proddata.o \
   ihs_rnddata.o \
   md5.o \
   mec_input.o \
@@ -292,6 +291,7 @@
   mec_xml_document.o \
   mortality_rates_fetch.o \
   preferences_model.o \
+  product_data.o \
   stratified_algorithms.o \
   stratified_charges.o \
 
@@ -394,7 +394,6 @@
   ihs_funddata.o \
   ihs_mortal.o \
   ihs_pios.o \
-  ihs_proddata.o \
   ihs_rnddata.o \
   input.o \
   input_harmonization.o \
@@ -413,6 +412,7 @@
   null_stream.o \
   outlay.o \
   path_utility.o \
+  product_data.o \
   product_names.o \
   rounding_rules.o \
   stratified_algorithms.o \
@@ -784,10 +784,10 @@
   ihs_fpios.o \
   ihs_funddata.o \
   ihs_pios.o \
-  ihs_proddata.o \
   ihs_rnddata.o \
   miscellany.o \
   path_utility.o \
+  product_data.o \
   product_file_test.o \
   rounding_rules.o \
   stratified_charges.o \

Modified: lmi/trunk/policy_document.hpp
===================================================================
--- lmi/trunk/policy_document.hpp       2010-03-27 18:34:48 UTC (rev 4821)
+++ lmi/trunk/policy_document.hpp       2010-04-01 01:10:20 UTC (rev 4822)
@@ -28,7 +28,7 @@
 
 #include "product_editor.hpp"
 
-#include "ihs_proddata.hpp"
+#include "product_data.hpp"
 
 #include <map>
 #include <string>

Added: lmi/trunk/product_data.cpp
===================================================================
--- lmi/trunk/product_data.cpp                          (rev 0)
+++ lmi/trunk/product_data.cpp  2010-04-01 01:10:20 UTC (rev 4822)
@@ -0,0 +1,438 @@
+// Product data.
+//
+// Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 
2010 Gregory W. Chicares.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software Foundation,
+// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+//
+// http://savannah.nongnu.org/projects/lmi
+// email: <address@hidden>
+// snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
+
+// $Id$
+
+// This class contains names of files containing a product's tables as well
+// as strings that are the same for all instances of that product.
+
+// The tables are in SOA table manager binary format.
+
+// The (SOA) table numbers are in the database. To avoid circularity, first
+// instantiate this class, then instantiate the database before reading any
+// tables with the default methods that look to the database for table numbers.
+// This is handled automatically in class BasicValues, where those methods are.
+
+#ifdef __BORLANDC__
+#   include "pchfile.hpp"
+#   pragma hdrstop
+#endif // __BORLANDC__
+
+#include "product_data.hpp"
+
+#include "alert.hpp"
+#include "assert_lmi.hpp"
+#include "data_directory.hpp"
+#include "platform_dependent.hpp" // access()
+#include "xml_serialize.hpp"
+
+#include <boost/filesystem/convenience.hpp>
+#include <boost/filesystem/path.hpp>
+
+#include <string>
+
+//============================================================================
+TProductData::TProductData()
+{
+}
+
+//============================================================================
+TProductData::~TProductData()
+{
+}
+
+//============================================================================
+TProductData::TProductData(std::string const& a_Filename)
+{
+    Init(a_Filename);
+}
+
+//============================================================================
+void TProductData::Init(std::string const& a_Filename)
+{
+    fs::path path(a_Filename);
+    LMI_ASSERT(a_Filename == path.leaf());
+    path = fs::change_extension(path, ".policy");
+    Read(AddDataDir(path.string()));
+}
+
+namespace
+{
+std::string xml_root_name()
+{
+    return "policy";
+}
+} // Unnamed namespace.
+
+//============================================================================
+void TProductData::Read(std::string const& a_Filename)
+{
+    if(access(a_Filename.c_str(), R_OK))
+        {
+        fatal_error()
+            << "File '"
+            << a_Filename
+            << "' is required but could not be found. Try reinstalling."
+            << LMI_FLUSH
+            ;
+        }
+
+    xml_lmi::dom_parser parser(a_Filename);
+    xml::element const& root = parser.root_node(xml_root_name());
+
+#   define GET_ELEMENT(name) xml_serialize::get_element(root, #name, name)
+
+    GET_ELEMENT(DatabaseFilename              );
+    GET_ELEMENT(FundFilename                  );
+    GET_ELEMENT(CorridorFilename              );
+    GET_ELEMENT(CurrCOIFilename               );
+    GET_ELEMENT(GuarCOIFilename               );
+    GET_ELEMENT(WPFilename                    );
+    GET_ELEMENT(ADDFilename                   );
+    GET_ELEMENT(ChildRiderFilename            );
+    GET_ELEMENT(CurrSpouseRiderFilename       );
+    GET_ELEMENT(GuarSpouseRiderFilename       );
+    GET_ELEMENT(CurrTermFilename              );
+    GET_ELEMENT(GuarTermFilename              );
+    GET_ELEMENT(TableYFilename                );
+    GET_ELEMENT(PremTaxFilename               );
+    GET_ELEMENT(TAMRA7PayFilename             );
+    GET_ELEMENT(TgtPremFilename               );
+    GET_ELEMENT(IRC7702Filename               );
+    GET_ELEMENT(Gam83Filename                 );
+    GET_ELEMENT(SubstdTblMultFilename         );
+    GET_ELEMENT(CurrSpecAmtLoadFilename       );
+    GET_ELEMENT(GuarSpecAmtLoadFilename       );
+    GET_ELEMENT(RoundingFilename              );
+    GET_ELEMENT(TierFilename                  );
+    GET_ELEMENT(PolicyForm                    );
+    GET_ELEMENT(PolicyMktgName                );
+    GET_ELEMENT(PolicyLegalName               );
+    GET_ELEMENT(InsCoShortName                );
+    GET_ELEMENT(InsCoName                     );
+    GET_ELEMENT(InsCoAddr                     );
+    GET_ELEMENT(InsCoStreet                   );
+    GET_ELEMENT(InsCoPhone                    );
+    GET_ELEMENT(InsCoDomicile                 );
+    GET_ELEMENT(MainUnderwriter               );
+    GET_ELEMENT(MainUnderwriterAddress        );
+    GET_ELEMENT(CoUnderwriter                 );
+    GET_ELEMENT(CoUnderwriterAddress          );
+    GET_ELEMENT(AvName                        );
+    GET_ELEMENT(CsvName                       );
+    GET_ELEMENT(CsvHeaderName                 );
+    GET_ELEMENT(NoLapseProvisionName          );
+    GET_ELEMENT(InterestDisclaimer            );
+    GET_ELEMENT(GuarMortalityFootnote         );
+    GET_ELEMENT(AccountValueFootnote          );
+    GET_ELEMENT(AttainedAgeFootnote           );
+    GET_ELEMENT(CashSurrValueFootnote         );
+    GET_ELEMENT(DeathBenefitFootnote          );
+    GET_ELEMENT(InitialPremiumFootnote        );
+    GET_ELEMENT(NetPremiumFootnote            );
+    GET_ELEMENT(OutlayFootnote                );
+    GET_ELEMENT(PolicyYearFootnote            );
+    GET_ELEMENT(ADDFootnote                   );
+    GET_ELEMENT(ChildFootnote                 );
+    GET_ELEMENT(SpouseFootnote                );
+    GET_ELEMENT(TermFootnote                  );
+    GET_ELEMENT(WaiverFootnote                );
+    GET_ELEMENT(MinimumPremiumFootnote        );
+    GET_ELEMENT(PremAllocationFootnote        );
+    GET_ELEMENT(ProductDescription            );
+    GET_ELEMENT(StableValueFootnote           );
+    GET_ELEMENT(NoVanishPremiumFootnote       );
+    GET_ELEMENT(RejectPremiumFootnote         );
+    GET_ELEMENT(ExpRatingFootnote             );
+    GET_ELEMENT(MortalityBlendFootnote        );
+    GET_ELEMENT(HypotheticalRatesFootnote     );
+    GET_ELEMENT(SalesLoadRefundFootnote       );
+    GET_ELEMENT(NoLapseFootnote               );
+    GET_ELEMENT(MarketValueAdjFootnote        );
+    GET_ELEMENT(ExchangeChargeFootnote0       );
+    GET_ELEMENT(CurrentValuesFootnote         );
+    GET_ELEMENT(DBOption1Footnote             );
+    GET_ELEMENT(DBOption2Footnote             );
+    GET_ELEMENT(ExpRatRiskChargeFootnote      );
+    GET_ELEMENT(ExchangeChargeFootnote1       );
+    GET_ELEMENT(FlexiblePremiumFootnote       );
+    GET_ELEMENT(GuaranteedValuesFootnote      );
+    GET_ELEMENT(CreditingRateFootnote         );
+    GET_ELEMENT(MecFootnote                   );
+    GET_ELEMENT(MidpointValuesFootnote        );
+    GET_ELEMENT(SinglePremiumFootnote         );
+    GET_ELEMENT(MonthlyChargesFootnote        );
+    GET_ELEMENT(UltCreditingRateFootnote      );
+    GET_ELEMENT(MaxNaarFootnote               );
+    GET_ELEMENT(PremTaxSurrChgFootnote        );
+    GET_ELEMENT(PolicyFeeFootnote             );
+    GET_ELEMENT(AssetChargeFootnote           );
+    GET_ELEMENT(InvestmentIncomeFootnote      );
+    GET_ELEMENT(IrrDbFootnote                 );
+    GET_ELEMENT(IrrCsvFootnote                );
+    GET_ELEMENT(MortalityChargesFootnote      );
+    GET_ELEMENT(LoanAndWithdrawalFootnote     );
+    GET_ELEMENT(PresaleTrackingNumber         );
+    GET_ELEMENT(CompositeTrackingNumber       );
+    GET_ELEMENT(InforceTrackingNumber         );
+    GET_ELEMENT(InforceCompositeTrackingNumber);
+    GET_ELEMENT(InforceNonGuaranteedFootnote0 );
+    GET_ELEMENT(InforceNonGuaranteedFootnote1 );
+    GET_ELEMENT(InforceNonGuaranteedFootnote2 );
+    GET_ELEMENT(InforceNonGuaranteedFootnote3 );
+    GET_ELEMENT(NonGuaranteedFootnote         );
+    GET_ELEMENT(MonthlyChargesPaymentFootnote );
+
+#   undef GET_ELEMENT
+}
+
+//============================================================================
+void TProductData::Write(std::string const& a_Filename) const
+{
+    xml_lmi::xml_document document(xml_root_name());
+    xml::element& root = document.root_node();
+
+    xml_lmi::set_attr(root, "version", "0");
+
+#   define SET_ELEMENT(name) xml_serialize::set_element(root, #name, name)
+
+    SET_ELEMENT(DatabaseFilename              );
+    SET_ELEMENT(FundFilename                  );
+    SET_ELEMENT(CorridorFilename              );
+    SET_ELEMENT(CurrCOIFilename               );
+    SET_ELEMENT(GuarCOIFilename               );
+    SET_ELEMENT(WPFilename                    );
+    SET_ELEMENT(ADDFilename                   );
+    SET_ELEMENT(ChildRiderFilename            );
+    SET_ELEMENT(CurrSpouseRiderFilename       );
+    SET_ELEMENT(GuarSpouseRiderFilename       );
+    SET_ELEMENT(CurrTermFilename              );
+    SET_ELEMENT(GuarTermFilename              );
+    SET_ELEMENT(TableYFilename                );
+    SET_ELEMENT(PremTaxFilename               );
+    SET_ELEMENT(TAMRA7PayFilename             );
+    SET_ELEMENT(TgtPremFilename               );
+    SET_ELEMENT(IRC7702Filename               );
+    SET_ELEMENT(Gam83Filename                 );
+    SET_ELEMENT(SubstdTblMultFilename         );
+    SET_ELEMENT(CurrSpecAmtLoadFilename       );
+    SET_ELEMENT(GuarSpecAmtLoadFilename       );
+    SET_ELEMENT(RoundingFilename              );
+    SET_ELEMENT(TierFilename                  );
+    SET_ELEMENT(PolicyForm                    );
+    SET_ELEMENT(PolicyMktgName                );
+    SET_ELEMENT(PolicyLegalName               );
+    SET_ELEMENT(InsCoShortName                );
+    SET_ELEMENT(InsCoName                     );
+    SET_ELEMENT(InsCoAddr                     );
+    SET_ELEMENT(InsCoStreet                   );
+    SET_ELEMENT(InsCoPhone                    );
+    SET_ELEMENT(InsCoDomicile                 );
+    SET_ELEMENT(MainUnderwriter               );
+    SET_ELEMENT(MainUnderwriterAddress        );
+    SET_ELEMENT(CoUnderwriter                 );
+    SET_ELEMENT(CoUnderwriterAddress          );
+    SET_ELEMENT(AvName                        );
+    SET_ELEMENT(CsvName                       );
+    SET_ELEMENT(CsvHeaderName                 );
+    SET_ELEMENT(NoLapseProvisionName          );
+    SET_ELEMENT(InterestDisclaimer            );
+    SET_ELEMENT(GuarMortalityFootnote         );
+    SET_ELEMENT(AccountValueFootnote          );
+    SET_ELEMENT(AttainedAgeFootnote           );
+    SET_ELEMENT(CashSurrValueFootnote         );
+    SET_ELEMENT(DeathBenefitFootnote          );
+    SET_ELEMENT(InitialPremiumFootnote        );
+    SET_ELEMENT(NetPremiumFootnote            );
+    SET_ELEMENT(OutlayFootnote                );
+    SET_ELEMENT(PolicyYearFootnote            );
+    SET_ELEMENT(ADDFootnote                   );
+    SET_ELEMENT(ChildFootnote                 );
+    SET_ELEMENT(SpouseFootnote                );
+    SET_ELEMENT(TermFootnote                  );
+    SET_ELEMENT(WaiverFootnote                );
+    SET_ELEMENT(MinimumPremiumFootnote        );
+    SET_ELEMENT(PremAllocationFootnote        );
+    SET_ELEMENT(ProductDescription            );
+    SET_ELEMENT(StableValueFootnote           );
+    SET_ELEMENT(NoVanishPremiumFootnote       );
+    SET_ELEMENT(RejectPremiumFootnote         );
+    SET_ELEMENT(ExpRatingFootnote             );
+    SET_ELEMENT(MortalityBlendFootnote        );
+    SET_ELEMENT(HypotheticalRatesFootnote     );
+    SET_ELEMENT(SalesLoadRefundFootnote       );
+    SET_ELEMENT(NoLapseFootnote               );
+    SET_ELEMENT(MarketValueAdjFootnote        );
+    SET_ELEMENT(ExchangeChargeFootnote0       );
+    SET_ELEMENT(CurrentValuesFootnote         );
+    SET_ELEMENT(DBOption1Footnote             );
+    SET_ELEMENT(DBOption2Footnote             );
+    SET_ELEMENT(ExpRatRiskChargeFootnote      );
+    SET_ELEMENT(ExchangeChargeFootnote1       );
+    SET_ELEMENT(FlexiblePremiumFootnote       );
+    SET_ELEMENT(GuaranteedValuesFootnote      );
+    SET_ELEMENT(CreditingRateFootnote         );
+    SET_ELEMENT(MecFootnote                   );
+    SET_ELEMENT(MidpointValuesFootnote        );
+    SET_ELEMENT(SinglePremiumFootnote         );
+    SET_ELEMENT(MonthlyChargesFootnote        );
+    SET_ELEMENT(UltCreditingRateFootnote      );
+    SET_ELEMENT(MaxNaarFootnote               );
+    SET_ELEMENT(PremTaxSurrChgFootnote        );
+    SET_ELEMENT(PolicyFeeFootnote             );
+    SET_ELEMENT(AssetChargeFootnote           );
+    SET_ELEMENT(InvestmentIncomeFootnote      );
+    SET_ELEMENT(IrrDbFootnote                 );
+    SET_ELEMENT(IrrCsvFootnote                );
+    SET_ELEMENT(MortalityChargesFootnote      );
+    SET_ELEMENT(LoanAndWithdrawalFootnote     );
+    SET_ELEMENT(PresaleTrackingNumber         );
+    SET_ELEMENT(CompositeTrackingNumber       );
+    SET_ELEMENT(InforceTrackingNumber         );
+    SET_ELEMENT(InforceCompositeTrackingNumber);
+    SET_ELEMENT(InforceNonGuaranteedFootnote0 );
+    SET_ELEMENT(InforceNonGuaranteedFootnote1 );
+    SET_ELEMENT(InforceNonGuaranteedFootnote2 );
+    SET_ELEMENT(InforceNonGuaranteedFootnote3 );
+    SET_ELEMENT(NonGuaranteedFootnote         );
+    SET_ELEMENT(MonthlyChargesPaymentFootnote );
+
+#   undef SET_ELEMENT
+
+    // Instead of this:
+//    document.save(a_Filename);
+    // for the nonce, explicitly change the extension, in order to
+    // force external product-file code to use the new extension.
+    fs::path path(a_Filename, fs::native);
+    path = fs::change_extension(path, ".policy");
+    document.save(path.string());
+}
+
+//============================================================================
+void TProductData::WritePolFiles()
+{
+    TProductData foo;
+
+    foo.CorridorFilename               = "sample";
+    foo.CurrCOIFilename                = "qx_cso";
+    foo.GuarCOIFilename                = "qx_cso";
+    foo.WPFilename                     = "sample";
+    foo.ADDFilename                    = "qx_ins";
+    foo.ChildRiderFilename             = "qx_ins";
+    foo.CurrSpouseRiderFilename        = "qx_ins";
+    foo.GuarSpouseRiderFilename        = "qx_ins";
+    foo.CurrTermFilename               = "qx_cso";
+    foo.GuarTermFilename               = "qx_cso";
+    foo.TableYFilename                 = "qx_ins";
+    foo.PremTaxFilename                = "sample";
+    foo.TAMRA7PayFilename              = "sample";
+    foo.TgtPremFilename                = "sample";
+    foo.IRC7702Filename                = "qx_cso";
+    foo.Gam83Filename                  = "qx_ann";
+    foo.SubstdTblMultFilename          = "sample";
+    foo.CurrSpecAmtLoadFilename        = "sample";
+    foo.GuarSpecAmtLoadFilename        = "sample";
+    foo.PolicyForm                     = "UL32768-NY";
+    foo.PolicyMktgName                 = "UL Supreme";
+    foo.PolicyLegalName = "Flexible Premium Adjustable Life Insurance Policy";
+    foo.InsCoShortName                 = "Superior Life";
+    foo.InsCoName                      = "Superior Life Insurance Company";
+    foo.InsCoAddr                      = "Superior, WI 12345";
+    foo.InsCoStreet                    = "246 Main Street";
+    foo.InsCoPhone                     = "(800) 555-1212";
+    foo.InsCoDomicile                  = "WI";
+    foo.MainUnderwriter                = "Superior Securities";
+    foo.MainUnderwriterAddress         = "246-M Main Street, Superior, WI 
12345";
+    foo.CoUnderwriter                  = "Superior Investors";
+    foo.CoUnderwriterAddress           = "246-C Main Street, Superior, WI 
12345";
+    foo.AvName                         = "Account";
+    foo.CsvName                        = "Cash Surrender";
+    foo.CsvHeaderName                  = "Cash Surr";
+    foo.NoLapseProvisionName           = "No-lapse Provision";
+    foo.InterestDisclaimer             = "";
+    foo.GuarMortalityFootnote          = "";
+    foo.AccountValueFootnote           = "";
+    foo.AttainedAgeFootnote            = "";
+    foo.CashSurrValueFootnote          = "";
+    foo.DeathBenefitFootnote           = "";
+    foo.InitialPremiumFootnote         = "";
+    foo.NetPremiumFootnote             = "";
+    foo.OutlayFootnote                 = "";
+    foo.PolicyYearFootnote             = "";
+    foo.ADDFootnote                    = "";
+    foo.ChildFootnote                  = "";
+    foo.SpouseFootnote                 = "";
+    foo.TermFootnote                   = "";
+    foo.WaiverFootnote                 = "";
+    foo.MinimumPremiumFootnote         = "";
+    foo.PremAllocationFootnote         = "";
+    foo.ProductDescription             = "";
+    foo.StableValueFootnote            = "";
+    foo.NoVanishPremiumFootnote        = "";
+    foo.RejectPremiumFootnote          = "";
+    foo.ExpRatingFootnote              = "";
+    foo.MortalityBlendFootnote         = "";
+    foo.HypotheticalRatesFootnote      = "";
+    foo.SalesLoadRefundFootnote        = "";
+    foo.NoLapseFootnote                = "";
+    foo.MarketValueAdjFootnote         = "";
+    foo.ExchangeChargeFootnote0        = "";
+    foo.CurrentValuesFootnote          = "";
+    foo.DBOption1Footnote              = "";
+    foo.DBOption2Footnote              = "";
+    foo.ExpRatRiskChargeFootnote       = "";
+    foo.ExchangeChargeFootnote1        = "";
+    foo.FlexiblePremiumFootnote        = "";
+    foo.GuaranteedValuesFootnote       = "";
+    foo.CreditingRateFootnote          = "";
+    foo.MecFootnote                    = "";
+    foo.MidpointValuesFootnote         = "";
+    foo.SinglePremiumFootnote          = "";
+    foo.MonthlyChargesFootnote         = "";
+    foo.UltCreditingRateFootnote       = "";
+    foo.MaxNaarFootnote                = "";
+    foo.PremTaxSurrChgFootnote         = "";
+    foo.PolicyFeeFootnote              = "";
+    foo.AssetChargeFootnote            = "";
+    foo.InvestmentIncomeFootnote       = "";
+    foo.IrrDbFootnote                  = "";
+    foo.IrrCsvFootnote                 = "";
+    foo.MortalityChargesFootnote       = "";
+    foo.LoanAndWithdrawalFootnote      = "";
+    foo.PresaleTrackingNumber          = "";
+    foo.CompositeTrackingNumber        = "";
+    foo.InforceTrackingNumber          = "";
+    foo.InforceCompositeTrackingNumber = "";
+    foo.InforceNonGuaranteedFootnote0  = "";
+    foo.InforceNonGuaranteedFootnote1  = "";
+    foo.InforceNonGuaranteedFootnote2  = "";
+    foo.InforceNonGuaranteedFootnote3  = "";
+    foo.NonGuaranteedFootnote          = "";
+    foo.MonthlyChargesPaymentFootnote  = "";
+
+    foo.DatabaseFilename = "sample.db4";
+    foo.FundFilename     = "sample.fnd";
+    foo.RoundingFilename = "sample.rnd";
+    foo.TierFilename     = "sample.tir";
+
+    foo.Write(AddDataDir("sample.policy"));
+}
+


Property changes on: lmi/trunk/product_data.cpp
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:keywords
   + Id

Added: lmi/trunk/product_data.hpp
===================================================================
--- lmi/trunk/product_data.hpp                          (rev 0)
+++ lmi/trunk/product_data.hpp  2010-04-01 01:10:20 UTC (rev 4822)
@@ -0,0 +1,270 @@
+// Product data.
+//
+// Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 
2010 Gregory W. Chicares.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software Foundation,
+// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+//
+// http://savannah.nongnu.org/projects/lmi
+// email: <address@hidden>
+// snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
+
+// $Id$
+
+#ifndef product_data_hpp
+#define product_data_hpp
+
+#include "config.hpp"
+
+#include "so_attributes.hpp"
+
+#include <string>
+
+// Filenames and other free-form offline data that vary by product.
+
+class LMI_SO TProductData
+{
+    friend class PolicyDocument;
+    friend class PolicyView;
+
+  public:
+    explicit TProductData(std::string const& a_Filename);
+    ~TProductData();
+
+    static void WritePolFiles();
+    static void WriteProprietaryPolFiles();
+
+    std::string const& GetDatabaseFilename       () const {return 
DatabaseFilename;       }
+    std::string const& GetFundFilename           () const {return 
FundFilename;           }
+    std::string const& GetCorridorFilename       () const {return 
CorridorFilename;       }
+    std::string const& GetCurrCOIFilename        () const {return 
CurrCOIFilename;        }
+    std::string const& GetGuarCOIFilename        () const {return 
GuarCOIFilename;        }
+    std::string const& GetWPFilename             () const {return WPFilename;  
           }
+    std::string const& GetADDFilename            () const {return ADDFilename; 
           }
+    std::string const& GetChildRiderFilename     () const {return 
ChildRiderFilename;     }
+    std::string const& GetCurrSpouseRiderFilename() const {return 
CurrSpouseRiderFilename;}
+    std::string const& GetGuarSpouseRiderFilename() const {return 
GuarSpouseRiderFilename;}
+    std::string const& GetCurrTermFilename       () const {return 
CurrTermFilename;       }
+    std::string const& GetGuarTermFilename       () const {return 
GuarTermFilename;       }
+    std::string const& GetTableYFilename         () const {return 
TableYFilename;         }
+    std::string const& GetPremTaxFilename        () const {return 
PremTaxFilename;        }
+    std::string const& GetTAMRA7PayFilename      () const {return 
TAMRA7PayFilename;      }
+    std::string const& GetTgtPremFilename        () const {return 
TgtPremFilename;        }
+    std::string const& GetIRC7702Filename        () const {return 
IRC7702Filename;        }
+    std::string const& GetGam83Filename          () const {return 
Gam83Filename;          }
+    std::string const& GetSubstdTblMultFilename  () const {return 
SubstdTblMultFilename;  }
+    std::string const& GetCurrSpecAmtLoadFilename() const {return 
CurrSpecAmtLoadFilename;}
+    std::string const& GetGuarSpecAmtLoadFilename() const {return 
GuarSpecAmtLoadFilename;}
+    std::string const& GetRoundingFilename       () const {return 
RoundingFilename;       }
+    std::string const& GetTierFilename           () const {return 
TierFilename;           }
+
+    std::string const& GetPolicyForm                    () const {return 
PolicyForm;                    }
+    std::string const& GetPolicyMktgName                () const {return 
PolicyMktgName;                }
+    std::string const& GetPolicyLegalName               () const {return 
PolicyLegalName;               }
+    std::string const& GetInsCoShortName                () const {return 
InsCoShortName;                }
+    std::string const& GetInsCoName                     () const {return 
InsCoName;                     }
+    std::string const& GetInsCoAddr                     () const {return 
InsCoAddr;                     }
+    std::string const& GetInsCoStreet                   () const {return 
InsCoStreet;                   }
+    std::string const& GetInsCoPhone                    () const {return 
InsCoPhone;                    }
+    std::string const& GetInsCoDomicile                 () const {return 
InsCoDomicile;                 }
+    std::string const& GetMainUnderwriter               () const {return 
MainUnderwriter;               }
+    std::string const& GetMainUnderwriterAddress        () const {return 
MainUnderwriterAddress;        }
+    std::string const& GetCoUnderwriter                 () const {return 
CoUnderwriter;                 }
+    std::string const& GetCoUnderwriterAddress          () const {return 
CoUnderwriterAddress;          }
+    std::string const& GetAvName                        () const {return 
AvName;                        }
+    std::string const& GetCsvName                       () const {return 
CsvName;                       }
+    std::string const& GetCsvHeaderName                 () const {return 
CsvHeaderName;                 }
+    std::string const& GetNoLapseProvisionName          () const {return 
NoLapseProvisionName;          }
+    std::string const& GetInterestDisclaimer            () const {return 
InterestDisclaimer;            }
+    std::string const& GetGuarMortalityFootnote         () const {return 
GuarMortalityFootnote;         }
+    std::string const& GetAccountValueFootnote          () const {return 
AccountValueFootnote;          }
+    std::string const& GetAttainedAgeFootnote           () const {return 
AttainedAgeFootnote;           }
+    std::string const& GetCashSurrValueFootnote         () const {return 
CashSurrValueFootnote;         }
+    std::string const& GetDeathBenefitFootnote          () const {return 
DeathBenefitFootnote;          }
+    std::string const& GetInitialPremiumFootnote        () const {return 
InitialPremiumFootnote;        }
+    std::string const& GetNetPremiumFootnote            () const {return 
NetPremiumFootnote;            }
+    std::string const& GetOutlayFootnote                () const {return 
OutlayFootnote;                }
+    std::string const& GetPolicyYearFootnote            () const {return 
PolicyYearFootnote;            }
+    std::string const& GetADDFootnote                   () const {return 
ADDFootnote;                   }
+    std::string const& GetChildFootnote                 () const {return 
ChildFootnote;                 }
+    std::string const& GetSpouseFootnote                () const {return 
SpouseFootnote;                }
+    std::string const& GetTermFootnote                  () const {return 
TermFootnote;                  }
+    std::string const& GetWaiverFootnote                () const {return 
WaiverFootnote;                }
+    std::string const& GetMinimumPremiumFootnote        () const {return 
MinimumPremiumFootnote;        }
+    std::string const& GetPremAllocationFootnote        () const {return 
PremAllocationFootnote;        }
+    std::string const& GetProductDescription            () const {return 
ProductDescription;            }
+    std::string const& GetStableValueFootnote           () const {return 
StableValueFootnote;           }
+    std::string const& GetNoVanishPremiumFootnote       () const {return 
NoVanishPremiumFootnote;       }
+    std::string const& GetRejectPremiumFootnote         () const {return 
RejectPremiumFootnote;         }
+    std::string const& GetExpRatingFootnote             () const {return 
ExpRatingFootnote;             }
+    std::string const& GetMortalityBlendFootnote        () const {return 
MortalityBlendFootnote;        }
+    std::string const& GetHypotheticalRatesFootnote     () const {return 
HypotheticalRatesFootnote;     }
+    std::string const& GetSalesLoadRefundFootnote       () const {return 
SalesLoadRefundFootnote;       }
+    std::string const& GetNoLapseFootnote               () const {return 
NoLapseFootnote;               }
+    std::string const& GetMarketValueAdjFootnote        () const {return 
MarketValueAdjFootnote;        }
+    std::string const& GetExchangeChargeFootnote0       () const {return 
ExchangeChargeFootnote0;       }
+    std::string const& GetCurrentValuesFootnote         () const {return 
CurrentValuesFootnote;         }
+    std::string const& GetDBOption1Footnote             () const {return 
DBOption1Footnote;             }
+    std::string const& GetDBOption2Footnote             () const {return 
DBOption2Footnote;             }
+    std::string const& GetExpRatRiskChargeFootnote      () const {return 
ExpRatRiskChargeFootnote;      }
+    std::string const& GetExchangeChargeFootnote1       () const {return 
ExchangeChargeFootnote1;       }
+    std::string const& GetFlexiblePremiumFootnote       () const {return 
FlexiblePremiumFootnote;       }
+    std::string const& GetGuaranteedValuesFootnote      () const {return 
GuaranteedValuesFootnote;      }
+    std::string const& GetCreditingRateFootnote         () const {return 
CreditingRateFootnote;         }
+    std::string const& GetMecFootnote                   () const {return 
MecFootnote;                   }
+    std::string const& GetMidpointValuesFootnote        () const {return 
MidpointValuesFootnote;        }
+    std::string const& GetSinglePremiumFootnote         () const {return 
SinglePremiumFootnote;         }
+    std::string const& GetMonthlyChargesFootnote        () const {return 
MonthlyChargesFootnote;        }
+    std::string const& GetUltCreditingRateFootnote      () const {return 
UltCreditingRateFootnote;      }
+    std::string const& GetMaxNaarFootnote               () const {return 
MaxNaarFootnote;               }
+    std::string const& GetPremTaxSurrChgFootnote        () const {return 
PremTaxSurrChgFootnote;        }
+    std::string const& GetPolicyFeeFootnote             () const {return 
PolicyFeeFootnote;             }
+    std::string const& GetAssetChargeFootnote           () const {return 
AssetChargeFootnote;           }
+    std::string const& GetInvestmentIncomeFootnote      () const {return 
InvestmentIncomeFootnote;      }
+    std::string const& GetIrrDbFootnote                 () const {return 
IrrDbFootnote;                 }
+    std::string const& GetIrrCsvFootnote                () const {return 
IrrCsvFootnote;                }
+    std::string const& GetMortalityChargesFootnote      () const {return 
MortalityChargesFootnote;      }
+    std::string const& GetLoanAndWithdrawalFootnote     () const {return 
LoanAndWithdrawalFootnote;     }
+    std::string const& GetPresaleTrackingNumber         () const {return 
PresaleTrackingNumber;         }
+    std::string const& GetCompositeTrackingNumber       () const {return 
CompositeTrackingNumber;       }
+    std::string const& GetInforceTrackingNumber         () const {return 
InforceTrackingNumber;         }
+    std::string const& GetInforceCompositeTrackingNumber() const {return 
InforceCompositeTrackingNumber;}
+    std::string const& GetInforceNonGuaranteedFootnote0 () const {return 
InforceNonGuaranteedFootnote0 ;}
+    std::string const& GetInforceNonGuaranteedFootnote1 () const {return 
InforceNonGuaranteedFootnote1 ;}
+    std::string const& GetInforceNonGuaranteedFootnote2 () const {return 
InforceNonGuaranteedFootnote2 ;}
+    std::string const& GetInforceNonGuaranteedFootnote3 () const {return 
InforceNonGuaranteedFootnote3 ;}
+    std::string const& GetNonGuaranteedFootnote         () const {return 
NonGuaranteedFootnote         ;}
+    std::string const& GetMonthlyChargesPaymentFootnote () const {return 
MonthlyChargesPaymentFootnote ;}
+
+  private:
+    TProductData();
+
+    void Init(std::string const& a_Filename);
+    void Read(std::string const& a_Filename);
+    void Write(std::string const& a_Filename) const;
+
+    std::string DatabaseFilename;
+    std::string FundFilename;
+    std::string CorridorFilename;
+    std::string CurrCOIFilename;
+    std::string GuarCOIFilename;
+    std::string WPFilename;
+    std::string ADDFilename;
+    std::string ChildRiderFilename;
+    std::string CurrSpouseRiderFilename;
+    std::string GuarSpouseRiderFilename;
+    std::string CurrTermFilename;
+    std::string GuarTermFilename;
+    std::string TableYFilename;
+    std::string PremTaxFilename;
+    std::string TAMRA7PayFilename;
+    std::string TgtPremFilename;
+    std::string IRC7702Filename;
+    std::string Gam83Filename;
+    std::string SubstdTblMultFilename;
+    std::string CurrSpecAmtLoadFilename;
+    std::string GuarSpecAmtLoadFilename;
+    std::string RoundingFilename;
+    std::string TierFilename;
+
+    std::string PolicyForm;
+    std::string PolicyMktgName;
+    std::string PolicyLegalName;
+    std::string InsCoShortName;
+    std::string InsCoName;
+    std::string InsCoAddr;
+    std::string InsCoStreet;
+    std::string InsCoPhone;
+    std::string InsCoDomicile;
+    std::string MainUnderwriter;
+    std::string MainUnderwriterAddress;
+    std::string CoUnderwriter;
+    std::string CoUnderwriterAddress;
+
+    // Illustration reg requires column headers to use names in
+    // contract, e.g. for account and surrender values.
+    std::string AvName;
+    std::string CsvName;
+    std::string CsvHeaderName;
+    std::string NoLapseProvisionName;
+    std::string InterestDisclaimer;
+    std::string GuarMortalityFootnote;
+
+    // Ledger column definitions.
+    std::string AccountValueFootnote;
+    std::string AttainedAgeFootnote;
+    std::string CashSurrValueFootnote;
+    std::string DeathBenefitFootnote;
+    std::string InitialPremiumFootnote;
+    std::string NetPremiumFootnote;
+    std::string OutlayFootnote;
+    std::string PolicyYearFootnote;
+
+    // Rider footnotes.
+    std::string ADDFootnote;
+    std::string ChildFootnote;
+    std::string SpouseFootnote;
+    std::string TermFootnote;
+    std::string WaiverFootnote;
+
+    // Premium-specific footnotes.
+    std::string MinimumPremiumFootnote;
+    std::string PremAllocationFootnote;
+
+    std::string ProductDescription;
+    std::string StableValueFootnote;
+    std::string NoVanishPremiumFootnote;
+    std::string RejectPremiumFootnote;
+    std::string ExpRatingFootnote;
+    std::string MortalityBlendFootnote;
+    std::string HypotheticalRatesFootnote;
+    std::string SalesLoadRefundFootnote;
+    std::string NoLapseFootnote;
+    std::string MarketValueAdjFootnote;
+    std::string ExchangeChargeFootnote0;
+    std::string CurrentValuesFootnote;
+    std::string DBOption1Footnote;
+    std::string DBOption2Footnote;
+    std::string ExpRatRiskChargeFootnote;
+    std::string ExchangeChargeFootnote1;
+    std::string FlexiblePremiumFootnote;
+    std::string GuaranteedValuesFootnote;
+    std::string CreditingRateFootnote;
+    std::string MecFootnote;
+    std::string MidpointValuesFootnote;
+    std::string SinglePremiumFootnote;
+    std::string MonthlyChargesFootnote;
+    std::string UltCreditingRateFootnote;
+    std::string MaxNaarFootnote;
+    std::string PremTaxSurrChgFootnote;
+    std::string PolicyFeeFootnote;
+    std::string AssetChargeFootnote;
+    std::string InvestmentIncomeFootnote;
+    std::string IrrDbFootnote;
+    std::string IrrCsvFootnote;
+    std::string MortalityChargesFootnote;
+    std::string LoanAndWithdrawalFootnote;
+    std::string PresaleTrackingNumber;
+    std::string CompositeTrackingNumber;
+    std::string InforceTrackingNumber;
+    std::string InforceCompositeTrackingNumber;
+    std::string InforceNonGuaranteedFootnote0;
+    std::string InforceNonGuaranteedFootnote1;
+    std::string InforceNonGuaranteedFootnote2;
+    std::string InforceNonGuaranteedFootnote3;
+    std::string NonGuaranteedFootnote;
+    std::string MonthlyChargesPaymentFootnote;
+};
+
+#endif // product_data_hpp
+


Property changes on: lmi/trunk/product_data.hpp
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:keywords
   + Id

Modified: lmi/trunk/product_file_test.cpp
===================================================================
--- lmi/trunk/product_file_test.cpp     2010-03-27 18:34:48 UTC (rev 4821)
+++ lmi/trunk/product_file_test.cpp     2010-04-01 01:10:20 UTC (rev 4822)
@@ -28,8 +28,8 @@
 
 #include "ihs_dbdict.hpp"
 #include "ihs_funddata.hpp"
-#include "ihs_proddata.hpp"
 #include "ihs_rnddata.hpp"
+#include "product_data.hpp"
 #include "stratified_charges.hpp"
 
 #include "test_tools.hpp"





reply via email to

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