lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [6306] Pass regulatory prohibitions to class Ledger


From: Greg Chicares
Subject: [lmi-commits] [6306] Pass regulatory prohibitions to class Ledger
Date: Sat, 26 Sep 2015 11:18:24 +0000

Revision: 6306
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6306
Author:   chicares
Date:     2015-09-26 11:18:23 +0000 (Sat, 26 Sep 2015)
Log Message:
-----------
Pass regulatory prohibitions to class Ledger

Modified Paths:
--------------
    lmi/trunk/accountvalue.cpp
    lmi/trunk/group_values.cpp
    lmi/trunk/ihs_acctval.cpp
    lmi/trunk/ledger.cpp
    lmi/trunk/ledger.hpp

Modified: lmi/trunk/accountvalue.cpp
===================================================================
--- lmi/trunk/accountvalue.cpp  2015-09-26 01:46:18 UTC (rev 6305)
+++ lmi/trunk/accountvalue.cpp  2015-09-26 11:18:23 UTC (rev 6306)
@@ -118,7 +118,7 @@
 AccountValue::AccountValue(Input const& input)
     :BasicValues       (Input::magically_rectify(input))
     ,DebugFilename     ("anonymous.monthly_trace")
-    ,ledger_(new Ledger(BasicValues::GetLength(), BasicValues::ledger_type(), 
false))
+    ,ledger_(new Ledger(BasicValues::GetLength(), BasicValues::ledger_type(), 
BasicValues::nonillustrated(), BasicValues::no_can_issue(), false))
     ,ledger_invariant_ (new LedgerInvariant(BasicValues::GetLength()))
     ,ledger_variant_   (new LedgerVariant  (BasicValues::GetLength()))
     ,RunBasis_         (mce_run_gen_curr_sep_full)

Modified: lmi/trunk/group_values.cpp
===================================================================
--- lmi/trunk/group_values.cpp  2015-09-26 01:46:18 UTC (rev 6305)
+++ lmi/trunk/group_values.cpp  2015-09-26 11:18:23 UTC (rev 6306)
@@ -703,6 +703,8 @@
         (new Ledger
             (100
             ,cells[0].ledger_type()
+            ,false
+            ,false
             ,true
             )
         );

Modified: lmi/trunk/ihs_acctval.cpp
===================================================================
--- lmi/trunk/ihs_acctval.cpp   2015-09-26 01:46:18 UTC (rev 6305)
+++ lmi/trunk/ihs_acctval.cpp   2015-09-26 11:18:23 UTC (rev 6306)
@@ -98,7 +98,7 @@
     ,Solving               (mce_solve_none != 
BasicValues::yare_input_.SolveType)
     ,SolvingForGuarPremium (false)
     ,ItLapsed              (false)
-    ,ledger_(new Ledger(BasicValues::GetLength(), BasicValues::ledger_type(), 
false))
+    ,ledger_(new Ledger(BasicValues::GetLength(), BasicValues::ledger_type(), 
BasicValues::nonillustrated(), BasicValues::no_can_issue(), false))
     ,ledger_invariant_     (new LedgerInvariant(BasicValues::GetLength()))
     ,ledger_variant_       (new LedgerVariant  (BasicValues::GetLength()))
     ,SolveGenBasis_        (mce_gen_curr)

Modified: lmi/trunk/ledger.cpp
===================================================================
--- lmi/trunk/ledger.cpp        2015-09-26 01:46:18 UTC (rev 6305)
+++ lmi/trunk/ledger.cpp        2015-09-26 11:18:23 UTC (rev 6306)
@@ -68,9 +68,13 @@
 Ledger::Ledger
     (int                length
     ,mcenum_ledger_type ledger_type
+    ,bool               nonillustrated
+    ,bool               no_can_issue
     ,bool               is_composite
     )
     :ledger_type_          (ledger_type)
+    ,nonillustrated_       (nonillustrated)
+    ,no_can_issue_         (no_can_issue)
     ,is_composite_         (is_composite)
     ,composite_lapse_year_ (0.0)
     ,ledger_map_           (new ledger_map_holder)
@@ -224,6 +228,12 @@
             ;
         }
 
+    nonillustrated_ = nonillustrated_ || a_Addend.nonillustrated();
+    no_can_issue_   = no_can_issue_   || a_Addend.no_can_issue  ();
+
+    LMI_ASSERT(is_composite());
+    LMI_ASSERT(!a_Addend.is_composite());
+
     ledger_map_t& l_map_rep = ledger_map_->held_;
     ledger_map_t::iterator this_i = l_map_rep.begin();
 
@@ -232,9 +242,6 @@
 
     ledger_invariant_->PlusEq(*a_Addend.ledger_invariant_);
 
-    LMI_ASSERT(is_composite());
-    LMI_ASSERT(!a_Addend.is_composite());
-
     while(this_i != l_map_rep.end() || addend_i != lm_addend.end())
         {
         LMI_ASSERT((*this_i).first == (*addend_i).first);
@@ -398,6 +405,18 @@
 }
 
 //============================================================================
+bool Ledger::nonillustrated() const
+{
+    return nonillustrated_;
+}
+
+//============================================================================
+bool Ledger::no_can_issue() const
+{
+    return no_can_issue_;
+}
+
+//============================================================================
 bool Ledger::is_composite() const
 {
     return is_composite_;

Modified: lmi/trunk/ledger.hpp
===================================================================
--- lmi/trunk/ledger.hpp        2015-09-26 01:46:18 UTC (rev 6305)
+++ lmi/trunk/ledger.hpp        2015-09-26 11:18:23 UTC (rev 6306)
@@ -68,6 +68,8 @@
     explicit Ledger
         (int                length
         ,mcenum_ledger_type ledger_type
+        ,bool               nonillustrated
+        ,bool               no_can_issue
         ,bool               is_composite
         );
     virtual ~Ledger();
@@ -96,6 +98,8 @@
     std::vector<mcenum_run_basis> const& GetRunBases        () const;
 
     mcenum_ledger_type                   ledger_type        () const;
+    bool                                 nonillustrated     () const;
+    bool                                 no_can_issue       () const;
     bool                                 is_composite       () const;
 
     unsigned int CalculateCRC() const;
@@ -113,8 +117,10 @@
     LedgerVariant const& GetOneVariantLedger(mcenum_run_basis) const;
     void SetRunBases(int length);
 
-    mcenum_ledger_type ledger_type_;
-    bool is_composite_;
+    mcenum_ledger_type ledger_type_   ;
+    bool               nonillustrated_;
+    bool               no_can_issue_  ;
+    bool               is_composite_  ;
 
     // TODO ?? This is either badly named or badly implemented. Every
     // instance of this class, even an instance for a single cell, has




reply via email to

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