lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master e52df17 1/6: Establish a data member to contr


From: Greg Chicares
Subject: [lmi-commits] [lmi] master e52df17 1/6: Establish a data member to control i7702 trace
Date: Tue, 16 Mar 2021 20:20:10 -0400 (EDT)

branch: master
commit e52df1717a98b1cb68423ee63b93a16768eac8ca
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Establish a data member to control i7702 trace
    
    Soon a unit test will be added for i7702. It should be as simple as
    possible, embodying only the algorithm, and not the means by which
    parameters are retrieved. The optional console trace is integrated
    with the algorithm, but the machinery for enabling it is a separable
    concern.
---
 i7702.cpp | 4 +++-
 i7702.hpp | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/i7702.cpp b/i7702.cpp
index ce856a3..7d660fe 100644
--- a/i7702.cpp
+++ b/i7702.cpp
@@ -199,6 +199,7 @@ i7702::i7702
     ,std::vector<double> const& use_vlr
     )
     :length_   {length }
+    ,trace_    {false  }
     ,A0_       {A0     }
     ,A1_       {A1     }
     ,Bgen_     {Bgen   }
@@ -251,6 +252,7 @@ i7702::i7702
     ,stratified_charges const& stratified
     )
     :length_   {database.length()}
+    ,trace_    {contains(global_settings::instance().pyx(), "show_7702i")}
     ,A0_       {}
     ,A1_       {}
     ,Bgen_     (length_)
@@ -396,7 +398,7 @@ void i7702::initialize()
         );
 
     // 7702 !! temporary--for acceptance testing
-    if(contains(global_settings::instance().pyx(), "show_7702i"))
+    if(trace_)
         {
         std::cout
             << "statutory rates {GLP,GSP}\n"
diff --git a/i7702.hpp b/i7702.hpp
index 156878f..9e05c57 100644
--- a/i7702.hpp
+++ b/i7702.hpp
@@ -79,7 +79,8 @@ class LMI_SO i7702 final
 
     void initialize();
 
-    int const length_;
+    int  const length_;
+    bool const trace_;
 
     // Rates from product database--member names are capitalized to
     // match formulas in documentation, but suffixed to mark them as



reply via email to

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