lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [6567] Refactor


From: gchicares
Subject: [lmi-commits] [6567] Refactor
Date: Sun, 8 May 2016 22:07:35 +0000 (UTC)

Revision: 6567
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6567
Author:   chicares
Date:     2016-05-08 22:07:35 +0000 (Sun, 08 May 2016)
Log Message:
-----------
Refactor

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/group_quote_pdf_gen_wx.cpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2016-05-08 21:39:14 UTC (rev 6566)
+++ lmi/trunk/ChangeLog 2016-05-08 22:07:35 UTC (rev 6567)
@@ -39014,3 +39014,13 @@
   group_quote_pdf_gen_wx.cpp
 Refactor for efficiency (VZ).
 
+20160508T2139Z <address@hidden> [451]
+
+  group_quote_pdf_gen_wx.cpp
+Refactor for concision.
+
+20160508T2207Z <address@hidden> [451]
+
+  group_quote_pdf_gen_wx.cpp
+Refactor.
+

Modified: lmi/trunk/group_quote_pdf_gen_wx.cpp
===================================================================
--- lmi/trunk/group_quote_pdf_gen_wx.cpp        2016-05-08 21:39:14 UTC (rev 
6566)
+++ lmi/trunk/group_quote_pdf_gen_wx.cpp        2016-05-08 22:07:35 UTC (rev 
6567)
@@ -537,10 +537,11 @@
         ,enum_output_mode output_mode = e_output_normal
         );
 
+    class totals_data; // Fwd decl for fill_global_report_data() argument.
     struct global_report_data
         {
         // Extract header and footer fields from a ledger.
-        void fill_global_report_data(Ledger const& ledger);
+        void fill_global_report_data(Ledger const& ledger, totals_data const& 
totals);
 
         // Fixed fields that are always defined.
         std::string company_;
@@ -638,10 +639,23 @@
 
 void group_quote_pdf_generator_wx::global_report_data::fill_global_report_data
     (Ledger const& ledger
+    ,totals_data const& totals
     )
 {
     LedgerInvariant const& invar = ledger.GetLedgerInvariant();
 
+    bool has_suppl_specamt_ = 0.0 != 
totals.total(e_col_supplemental_face_amount);
+    plan_type_ =
+        (invar.GroupIndivSelection ? invar.GroupQuoteRubricVoluntary
+        :has_suppl_specamt_        ? invar.GroupQuoteRubricFusion
+        :                            invar.GroupQuoteRubricMandatory
+        );
+    plan_type_footnote_ =
+        (invar.GroupIndivSelection ? invar.GroupQuoteFooterVoluntary
+        :has_suppl_specamt_        ? invar.GroupQuoteFooterFusion
+        :                            invar.GroupQuoteFooterMandatory
+        );
+
     company_          = invar.CorpName;
     prepared_by_      = invar.ProducerName;
     product_          = invar.PolicyMktgName;
@@ -819,18 +833,7 @@
     // total columns) be suppressed.
     if(is_composite)
         {
-        bool has_suppl_specamt_ = 0.0 != 
totals_.total(e_col_supplemental_face_amount);
-        report_data_.plan_type_ =
-            (invar.GroupIndivSelection ? invar.GroupQuoteRubricVoluntary
-            :has_suppl_specamt_        ? invar.GroupQuoteRubricFusion
-            :                            invar.GroupQuoteRubricMandatory
-            );
-        report_data_.plan_type_footnote_ =
-            (invar.GroupIndivSelection ? invar.GroupQuoteFooterVoluntary
-            :has_suppl_specamt_        ? invar.GroupQuoteFooterFusion
-            :                            invar.GroupQuoteFooterMandatory
-            );
-        report_data_.fill_global_report_data(ledger);
+        report_data_.fill_global_report_data(ledger, totals_);
         }
     else
         {




reply via email to

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