lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 1ed7716 3/4: Add a scalar to control writing


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 1ed7716 3/4: Add a scalar to control writing a '.values.tsv' file
Date: Fri, 5 Oct 2018 08:58:04 -0400 (EDT)

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

    Add a scalar to control writing a '.values.tsv' file
---
 ledger_evaluator.cpp | 1 +
 ledger_invariant.cpp | 8 +++++++-
 ledger_invariant.hpp | 1 +
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/ledger_evaluator.cpp b/ledger_evaluator.cpp
index f2598d0..4c3e6ba 100644
--- a/ledger_evaluator.cpp
+++ b/ledger_evaluator.cpp
@@ -544,6 +544,7 @@ ledger_evaluator Ledger::make_evaluator() const
     format_map["UseExperienceRating"               ] = f1;
     format_map["GroupIndivSelection"               ] = f1;
     format_map["UsePartialMort"                    ] = f1;
+    format_map["WriteTsvFile"                      ] = f1;
 
 // > Vector Formatting
 // >
diff --git a/ledger_invariant.cpp b/ledger_invariant.cpp
index 7afec4b..4de177a 100644
--- a/ledger_invariant.cpp
+++ b/ledger_invariant.cpp
@@ -27,7 +27,7 @@
 #include "assert_lmi.hpp"
 #include "basic_values.hpp"
 #include "bourn_cast.hpp"
-#include "contains.hpp"                 // for CalculateIrrs()
+#include "contains.hpp"
 #include "crc32.hpp"
 #include "database.hpp"
 #include "dbnames.hpp"
@@ -197,6 +197,7 @@ void LedgerInvariant::Alloc(int len)
     OtherScalars    ["InforceAsOfDateJdn"    ] = &InforceAsOfDateJdn     ;
     OtherScalars    ["SplitFundAllocation"   ] = &SplitFundAllocation    ;
     OtherScalars    ["GenAcctAllocation"     ] = &GenAcctAllocation      ;
+    OtherScalars    ["WriteTsvFile"          ] = &WriteTsvFile           ;
     OtherScalars    ["SupplementalReport"    ] = &SupplementalReport     ;
 
     Strings["PolicyMktgName"                ] = &PolicyMktgName                
;
@@ -451,6 +452,7 @@ void LedgerInvariant::Init()
     NoLapseAlwaysActive = false;
     Has1035ExchCharge   = false;
 
+    WriteTsvFile        = false;
     SupplementalReport  = false;
 
     irr_precision_      = 0;
@@ -924,6 +926,8 @@ void LedgerInvariant::Init(BasicValues const* b)
             ;
         }
 
+    WriteTsvFile = contains(b->yare_input_.Comments, "idiosyncrasyY");
+
     SupplementalReport         = b->yare_input_.CreateSupplementalReport;
     SupplementalReportColumn00 = 
mc_str(b->yare_input_.SupplementalReportColumn00);
     SupplementalReportColumn01 = 
mc_str(b->yare_input_.SupplementalReportColumn01);
@@ -1241,6 +1245,8 @@ LedgerInvariant& LedgerInvariant::PlusEq(LedgerInvariant 
const& a_Addend)
     // routine.
     IsInforce     = IsInforce     || a_Addend.IsInforce    ;
 
+    WriteTsvFile  = WriteTsvFile  || a_Addend.WriteTsvFile ;
+
     // TODO ?? This doesn't seem quite right, but what would be better?
     // We can't take the union of all columns selected for any life,
     // because its cardinality might exceed the maximum.
diff --git a/ledger_invariant.hpp b/ledger_invariant.hpp
index a18737e..0e1ab11 100644
--- a/ledger_invariant.hpp
+++ b/ledger_invariant.hpp
@@ -206,6 +206,7 @@ class LMI_SO LedgerInvariant
     double          InforceAsOfDateJdn;
     double          SplitFundAllocation;
     double          GenAcctAllocation;
+    double          WriteTsvFile;
     double          SupplementalReport;
 
     // Essential strings describing the policy and company.



reply via email to

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