lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master b3acc4a 6/6: Rename the last (capital 'Q') Qu


From: Greg Chicares
Subject: [lmi-commits] [lmi] master b3acc4a 6/6: Rename the last (capital 'Q') Query() function
Date: Fri, 9 Nov 2018 20:48:00 -0500 (EST)

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

    Rename the last (capital 'Q') Query() function
---
 database.cpp     |  2 +-
 database.hpp     |  4 ++--
 dbvalue.cpp      |  4 ++--
 dbvalue.hpp      |  2 +-
 ihs_basicval.cpp |  2 +-
 input_test.cpp   |  2 +-
 loads_test.cpp   |  3 +--
 premium_tax.cpp  | 10 +++++-----
 8 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/database.cpp b/database.cpp
index d948868..c546aa0 100644
--- a/database.cpp
+++ b/database.cpp
@@ -129,7 +129,7 @@ void product_database::query_into(e_database_key k, 
std::vector<double>& dst) co
 /// Return a double because it is convertible to the most common
 /// arithmetic types.
 
-double product_database::Query(e_database_key k, database_index const& i) const
+double product_database::query(e_database_key k, database_index const& i) const
 {
     database_entity const& v = entity_from_key(k);
     LMI_ASSERT(1 == v.extent());
diff --git a/database.hpp b/database.hpp
index 755841c..cc5a30c 100644
--- a/database.hpp
+++ b/database.hpp
@@ -73,7 +73,7 @@ class LMI_SO product_database final
         ) const;
     void query_into(e_database_key, std::vector<double>&) const;
 
-    double Query(e_database_key, database_index const&) const;
+    double query(e_database_key, database_index const&) const;
 
     template<typename T>
     T query(e_database_key) const;
@@ -110,7 +110,7 @@ class LMI_SO product_database final
 template<typename T>
 T product_database::query(e_database_key k) const
 {
-    double d = Query(k, index_);
+    double d = query(k, index_);
     if constexpr(std::is_enum_v<T>)
         {
         return static_cast<T>(bourn_cast<std::underlying_type_t<T>>(d));
diff --git a/dbvalue.cpp b/dbvalue.cpp
index c1b90ee..4554a3e 100644
--- a/dbvalue.cpp
+++ b/dbvalue.cpp
@@ -117,7 +117,7 @@ database_entity::database_entity
 ///       ,stat
 ///       );
 ///   BOOST_TEST_THROW
-///       (db.Query(DB_MaturityAge)
+///       (db.query(DB_MaturityAge)
 ///       ,std::runtime_error
 ///       ,"Assertion '1 == v.extent()' failed."
 ///       );
@@ -243,7 +243,7 @@ void database_entity::reshape(std::vector<int> const& 
new_dims)
 /// Two indexing operators are provided. This one's argument includes
 /// the number of durations--which, as far as the product editor is
 /// concerned, is much like the other axes. However, for illustration
-/// production, product_database::Query() handles the last (duration)
+/// production, product_database::query() handles the last (duration)
 /// axis, replicating the last value as needed to extend to maturity.
 
 double& database_entity::operator[](std::vector<int> const& index)
diff --git a/dbvalue.hpp b/dbvalue.hpp
index 2dff6cb..e44b97e 100644
--- a/dbvalue.hpp
+++ b/dbvalue.hpp
@@ -112,7 +112,7 @@ std::vector<int> const& LMI_SO 
maximum_database_dimensions();
 /*
 Some data are scalar by nature--for example, DB_MaturityAge.
 Someday we might add a flag here to express that constraint; until then,
-it's enforced passim by using a scalar-only Query() function.
+it's enforced passim by using a scalar-only query() function.
 
 Database items might include:
     attained age as an optional alternative to issue age
diff --git a/ihs_basicval.cpp b/ihs_basicval.cpp
index bf0367d..385695b 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -1579,7 +1579,7 @@ std::vector<double> BasicValues::GetUnblendedTable
     return GetActuarialTable
         (TableFile
         ,TableID
-        ,bourn_cast<int>(database().Query(TableID, index))
+        ,bourn_cast<int>(database().query(TableID, index))
         );
 }
 
diff --git a/input_test.cpp b/input_test.cpp
index 15337d6..e9a8cef 100644
--- a/input_test.cpp
+++ b/input_test.cpp
@@ -243,7 +243,7 @@ void input_test::test_product_database()
     // Force the product to mature at 98.
     db.maturity_age_ = 98;
     index.issue_age(98);
-    db.Query(DB_MaturityAge, index); // Accepted because maturity age is 
scalar.
+    db.query(DB_MaturityAge, index); // Accepted because maturity age is 
scalar.
     BOOST_TEST_THROW
         (db.query_into(DB_SnflQ, v, index)
         ,std::runtime_error
diff --git a/loads_test.cpp b/loads_test.cpp
index 71887ed..a7fcd93 100644
--- a/loads_test.cpp
+++ b/loads_test.cpp
@@ -51,8 +51,7 @@ std::vector<double> BasicValues::GetGuarSpecAmtLoadTable() 
const {return dummy_v
 product_database::product_database(int length) :length_(length) {}
 int product_database::length() const {return length_;}
 void product_database::query_into(e_database_key, std::vector<double>& v) 
const {v.resize(length_);}
-double product_database::Query(e_database_key) const {return 0.0;}
-double product_database::Query(e_database_key, database_index const&) const 
{return 0.0;}
+double product_database::query(e_database_key, database_index const&) const 
{return 0.0;}
 
 #include "premium_tax.hpp"
 double premium_tax::levy_rate        () const {return 0.0;}
diff --git a/premium_tax.cpp b/premium_tax.cpp
index 1129bbe..3a1a5c1 100644
--- a/premium_tax.cpp
+++ b/premium_tax.cpp
@@ -125,11 +125,11 @@ premium_tax::premium_tax
     if(!amortize_premium_load_)
         {
         database_index index0 = db.index().state(tax_state_);
-        tax_state_levy_rate    = db.Query(DB_PremTaxRate, index0);
-        tax_state_load_rate_   = db.Query(DB_PremTaxLoad, index0);
+        tax_state_levy_rate    = db.query(DB_PremTaxRate, index0);
+        tax_state_load_rate_   = db.query(DB_PremTaxLoad, index0);
         database_index index1 = db.index().state(domicile_);
-        domiciliary_levy_rate  = db.Query(DB_PremTaxRate, index1);
-        domiciliary_load_rate_ = db.Query(DB_PremTaxLoad, index1);
+        domiciliary_levy_rate  = db.query(DB_PremTaxRate, index1);
+        domiciliary_load_rate_ = db.query(DB_PremTaxLoad, index1);
         }
 
     if(is_retaliatory_)
@@ -175,7 +175,7 @@ premium_tax::premium_tax
     ,ytd_load_in_domicile_   {0.0}
 {
     database_index index = db.index().state(tax_state_);
-    levy_rate_ = db.Query(DB_PremTaxRate, index);
+    levy_rate_ = db.query(DB_PremTaxRate, index);
 }
 
 /// Test consistency of premium-tax loads.



reply via email to

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