[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master b208012 5/5: Regularize names of static funct
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master b208012 5/5: Regularize names of static functions that write product files |
Date: |
Thu, 4 Aug 2016 13:10:38 +0000 (UTC) |
branch: master
commit b20801285b8b0808e7f645c923bc79da5ac3a23f
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Regularize names of static functions that write product files
Now the names correspond to the file extensions:
for z in database funds policy rounding strata; do
grep "static.*write_${z}_files" *.?pp;
grep "static.*write_proprietary_${z}_files" *.?pp;
done
---
dbdict.cpp | 2 +-
dbdict.hpp | 4 ++--
fund_data.cpp | 2 +-
fund_data.hpp | 4 ++--
generate_product_files.cpp | 22 +++++++++++-----------
my_db.cpp | 2 +-
my_fund.cpp | 2 +-
my_prod.cpp | 6 +++---
my_tier.cpp | 2 +-
premium_tax_test.cpp | 6 +++---
product_data.cpp | 2 +-
product_data.hpp | 4 ++--
product_file_test.cpp | 10 +++++-----
stratified_charges.cpp | 2 +-
stratified_charges.hpp | 4 ++--
15 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/dbdict.cpp b/dbdict.cpp
index 95b97d5..3075fa0 100644
--- a/dbdict.cpp
+++ b/dbdict.cpp
@@ -574,7 +574,7 @@ void DBDictionary::InitDB()
Add(database_entity(DB_ChildRiderMaxAmt , bignum));
}
-void DBDictionary::WriteSampleDBFile()
+void DBDictionary::write_database_files()
{
DBDictionary z;
diff --git a/dbdict.hpp b/dbdict.hpp
index 70a283f..1cae709 100644
--- a/dbdict.hpp
+++ b/dbdict.hpp
@@ -56,8 +56,8 @@ class LMI_SO DBDictionary
database_entity const& datum(std::string const&) const;
- static void WriteSampleDBFile();
- static void WriteProprietaryDBFiles();
+ static void write_database_files();
+ static void write_proprietary_database_files();
void InitAntediluvian();
diff --git a/fund_data.cpp b/fund_data.cpp
index 244ed4d..900ce3f 100644
--- a/fund_data.cpp
+++ b/fund_data.cpp
@@ -148,7 +148,7 @@ void FundData::Write(std::string const& a_Filename) const
}
//============================================================================
-void FundData::WriteFundFiles()
+void FundData::write_funds_files()
{
FundData foo;
foo.FundInfo_.push_back
diff --git a/fund_data.hpp b/fund_data.hpp
index b91942c..bf4f5dc 100644
--- a/fund_data.hpp
+++ b/fund_data.hpp
@@ -70,8 +70,8 @@ class LMI_SO FundData
FundData(std::string const& a_Filename);
~FundData();
- static void WriteFundFiles();
- static void WriteProprietaryFundFiles();
+ static void write_funds_files();
+ static void write_proprietary_funds_files();
FundInfo const& GetFundInfo(int j) const;
int GetNumberOfFunds() const;
diff --git a/generate_product_files.cpp b/generate_product_files.cpp
index dfddc6c..87c96d5 100644
--- a/generate_product_files.cpp
+++ b/generate_product_files.cpp
@@ -38,17 +38,17 @@ int try_main(int, char*[])
std::cout << "Generating product files." << std::endl;
- DBDictionary ::WriteSampleDBFile ();
- product_data ::WritePolFiles ();
- FundData ::WriteFundFiles ();
- rounding_rules ::write_rounding_files ();
- stratified_charges ::write_stratified_files ();
-
- DBDictionary ::WriteProprietaryDBFiles ();
- FundData ::WriteProprietaryFundFiles ();
- product_data ::WriteProprietaryPolFiles ();
- rounding_rules ::write_proprietary_rounding_files ();
- stratified_charges ::write_proprietary_stratified_files ();
+ DBDictionary ::write_database_files ();
+ FundData ::write_funds_files ();
+ product_data ::write_policy_files ();
+ rounding_rules ::write_rounding_files ();
+ stratified_charges ::write_strata_files ();
+
+ DBDictionary ::write_proprietary_database_files ();
+ FundData ::write_proprietary_funds_files ();
+ product_data ::write_proprietary_policy_files ();
+ rounding_rules ::write_proprietary_rounding_files ();
+ stratified_charges ::write_proprietary_strata_files ();
std::cout << "\nAll product files written.\n" << std::endl;
diff --git a/my_db.cpp b/my_db.cpp
index 303afff..2d6ab30 100644
--- a/my_db.cpp
+++ b/my_db.cpp
@@ -40,7 +40,7 @@
#include "dbnames.hpp"
//============================================================================
-void DBDictionary::WriteProprietaryDBFiles()
+void DBDictionary::write_proprietary_database_files()
{
// Sample policy form.
{
diff --git a/my_fund.cpp b/my_fund.cpp
index dd674fa..26d0f2e 100644
--- a/my_fund.cpp
+++ b/my_fund.cpp
@@ -39,7 +39,7 @@
#include "data_directory.hpp" // AddDataDir()
//============================================================================
-void FundData::WriteProprietaryFundFiles()
+void FundData::write_proprietary_funds_files()
{
{
// Sample product.
diff --git a/my_prod.cpp b/my_prod.cpp
index 0be018d..acc0d58 100644
--- a/my_prod.cpp
+++ b/my_prod.cpp
@@ -46,11 +46,11 @@
/// that program itself. Those files are all you need: distributing
/// the program itself isn't necessary anyway.
///
-/// This function is intentionally a minimal clone of WritePolFiles(),
-/// and is intended only as an examplar for customization to implement
+/// This is intentionally a minimal clone of write_policy_files(), and
+/// is intended only as an examplar for customization to implement
/// proprietary real-world products.
-void product_data::WriteProprietaryPolFiles()
+void product_data::write_proprietary_policy_files()
{
product_data z;
diff --git a/my_tier.cpp b/my_tier.cpp
index 860eb25..188d10f 100644
--- a/my_tier.cpp
+++ b/my_tier.cpp
@@ -40,7 +40,7 @@
#include "ieee754.hpp" // infinity<>()
//============================================================================
-void stratified_charges::write_proprietary_stratified_files()
+void stratified_charges::write_proprietary_strata_files()
{
// Sample policy form.
stratified_charges foo;
diff --git a/premium_tax_test.cpp b/premium_tax_test.cpp
index ffdd138..edd251d 100644
--- a/premium_tax_test.cpp
+++ b/premium_tax_test.cpp
@@ -46,11 +46,11 @@ class premium_tax_test
void premium_tax_test::write_prerequisite_files()
{
- DBDictionary ::WriteSampleDBFile ();
+ DBDictionary ::write_database_files ();
// product_database::initialize() requires a real '.product' file,
// even though it's not otherwise used in this TU.
- product_data ::WritePolFiles ();
- stratified_charges ::write_stratified_files ();
+ product_data ::write_policy_files ();
+ stratified_charges ::write_strata_files ();
}
/// Test premium-tax rates.
diff --git a/product_data.cpp b/product_data.cpp
index 6961988..12e03df 100644
--- a/product_data.cpp
+++ b/product_data.cpp
@@ -447,7 +447,7 @@ void product_data::redintegrate_ex_post
/// necessarily represents a substitutable value, while everything
/// else in a report is just literal text.
-void product_data::WritePolFiles()
+void product_data::write_policy_files()
{
product_data z;
diff --git a/product_data.hpp b/product_data.hpp
index 32cd829..a2f3e7c 100644
--- a/product_data.hpp
+++ b/product_data.hpp
@@ -96,8 +96,8 @@ class LMI_SO product_data
std::string const& datum(std::string const& name) const;
// Legacy functions to support creating product files programmatically.
- static void WritePolFiles();
- static void WriteProprietaryPolFiles();
+ static void write_policy_files();
+ static void write_proprietary_policy_files();
private:
product_data();
diff --git a/product_file_test.cpp b/product_file_test.cpp
index a62a766..ff9f4c5 100644
--- a/product_file_test.cpp
+++ b/product_file_test.cpp
@@ -67,11 +67,11 @@ std::string product_file_test::stratified_filename_ ;
void product_file_test::write_all_files()
{
- DBDictionary ::WriteSampleDBFile ();
- product_data ::WritePolFiles ();
- FundData ::WriteFundFiles ();
- rounding_rules ::write_rounding_files ();
- stratified_charges ::write_stratified_files ();
+ DBDictionary ::write_database_files ();
+ FundData ::write_funds_files ();
+ product_data ::write_policy_files ();
+ rounding_rules ::write_rounding_files ();
+ stratified_charges ::write_strata_files ();
policy_filename_ = "sample";
product_data p(policy_filename_);
diff --git a/stratified_charges.cpp b/stratified_charges.cpp
index 96fee85..0c7162b 100644
--- a/stratified_charges.cpp
+++ b/stratified_charges.cpp
@@ -590,7 +590,7 @@ void stratified_charges::write_proem
::write_proem(document, file_leaf_name);
}
-void stratified_charges::write_stratified_files()
+void stratified_charges::write_strata_files()
{
// Guard against recurrence of the problem described here:
// http://lists.nongnu.org/archive/html/lmi/2008-02/msg00024.html
diff --git a/stratified_charges.hpp b/stratified_charges.hpp
index 591c56c..03a6e59 100644
--- a/stratified_charges.hpp
+++ b/stratified_charges.hpp
@@ -146,8 +146,8 @@ class LMI_SO stratified_charges
double maximum_tiered_premium_tax_rate(mcenum_state) const;
double minimum_tiered_premium_tax_rate(mcenum_state) const;
- static void write_stratified_files();
- static void write_proprietary_stratified_files();
+ static void write_strata_files();
+ static void write_proprietary_strata_files();
private:
stratified_charges(); // Private, but implemented for friends' use.