[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master cbc0ec5 03/16: Sort string members together i
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master cbc0ec5 03/16: Sort string members together in declaration order |
Date: |
Sat, 11 Apr 2020 20:36:02 -0400 (EDT) |
branch: master
commit cbc0ec51c318d3243812c7c75bf08825e25ad392
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Sort string members together in declaration order
Made LedgerInvariant::PlusEq() assign string members in declaration
order, by rearranging statements and inserting a few missing assignments
(which assign empty values in order to prevent this commit from causing
any regression, not because empty strings are necessarily wanted).
---
ledger_invariant.cpp | 88 ++++++++++++++++++++++++++++------------------------
1 file changed, 48 insertions(+), 40 deletions(-)
diff --git a/ledger_invariant.cpp b/ledger_invariant.cpp
index 8ce60f8..a32ec8b 100644
--- a/ledger_invariant.cpp
+++ b/ledger_invariant.cpp
@@ -546,9 +546,6 @@ LedgerInvariant& LedgerInvariant::PlusEq(LedgerInvariant
const& a_Addend)
// InforceLives is one longer than the other vectors.
InforceLives [Max] += a_Addend.InforceLives [Max];
-// UWClass = a_Addend.Class;
-// SubstandardTable
-
EffDate = a_Addend.EffDate;
EffDateJdn = a_Addend.EffDateJdn;
DateOfBirth = a_Addend.DateOfBirth;
@@ -565,22 +562,7 @@ LedgerInvariant& LedgerInvariant::PlusEq(LedgerInvariant
const& a_Addend)
RetAge = std::min(RetAge, a_Addend.RetAge); // TODO
?? Does this make sense?
EndtAge = std::max(EndtAge, a_Addend.EndtAge);
- DefnLifeIns = a_Addend.DefnLifeIns;
- DefnMaterialChange = a_Addend.DefnMaterialChange;
- AvoidMec = a_Addend.AvoidMec;
-
- // TODO ?? Probably we should assert that these don't vary by life.
- CorpName = a_Addend.CorpName;
- MasterContractNumber = a_Addend.MasterContractNumber;
- ProductName = a_Addend.ProductName;
- ProducerName = a_Addend.ProducerName;
- ProducerStreet = a_Addend.ProducerStreet;
- ProducerCityEtc = a_Addend.ProducerCityEtc;
- ProducerPhone = a_Addend.ProducerPhone;
- ProducerId = a_Addend.ProducerId;
- // This would necessarily vary by life:
-// ContractNumber = "";
-
+// STRINGS BEGIN
PolicyForm = a_Addend.PolicyForm;
PolicyMktgName = a_Addend.PolicyMktgName;
PolicyLegalName = a_Addend.PolicyLegalName;
@@ -741,11 +723,55 @@ LedgerInvariant& LedgerInvariant::PlusEq(LedgerInvariant
const& a_Addend)
IllRegCertClient = a_Addend.IllRegCertClient;
IllRegCertClientIl = a_Addend.IllRegCertClientIl;
IllRegCertClientTx = a_Addend.IllRegCertClientTx;
+ // TODO ?? Probably we should assert that these don't vary by life.
+ ProductName = a_Addend.ProductName;
+ ProducerName = a_Addend.ProducerName;
+ ProducerStreet = a_Addend.ProducerStreet;
+ ProducerCityEtc = a_Addend.ProducerCityEtc;
+ ProducerPhone = a_Addend.ProducerPhone;
+ ProducerId = a_Addend.ProducerId;
+ CorpName = a_Addend.CorpName;
+ MasterContractNumber = a_Addend.MasterContractNumber;
+ // This would necessarily vary by life:
+// ContractNumber = "";
- Comments = a_Addend.Comments;
+ Insured1 = ""; // a_Addend.Insured1;
+ Gender = ""; // a_Addend.Gender;
+ UWType = ""; // a_Addend.UWType;
+
+ Smoker = a_Addend.Smoker;
+ UWClass = ""; // a_Addend.UWClass;
+ SubstandardTable = ""; // a_Addend.SubstandardTable;
+ DefnLifeIns = a_Addend.DefnLifeIns;
+ DefnMaterialChange = a_Addend.DefnMaterialChange;
+ AvoidMec = a_Addend.AvoidMec;
+
+ PartMortTableName = a_Addend.PartMortTableName;
StateOfJurisdiction = a_Addend.StateOfJurisdiction;
PremiumTaxState = a_Addend.PremiumTaxState;
+ CountryIso3166Abbrev = ""; // a_Addend.CountryIso3166Abbrev;
+ Comments = a_Addend.Comments;
+
+ // The composite has a supplemental report iff every cell has one,
+ // in which case it uses the same columns as the last cell. There
+ // is no better general way to decide which columns to use. (The
+ // union of all columns selected for any life becomes infeasible
+ // when its cardinality exceeds the maximum.)
+ //
+ SupplementalReportColumn00 = a_Addend.SupplementalReportColumn00;
+ SupplementalReportColumn01 = a_Addend.SupplementalReportColumn01;
+ SupplementalReportColumn02 = a_Addend.SupplementalReportColumn02;
+ SupplementalReportColumn03 = a_Addend.SupplementalReportColumn03;
+ SupplementalReportColumn04 = a_Addend.SupplementalReportColumn04;
+ SupplementalReportColumn05 = a_Addend.SupplementalReportColumn05;
+ SupplementalReportColumn06 = a_Addend.SupplementalReportColumn06;
+ SupplementalReportColumn07 = a_Addend.SupplementalReportColumn07;
+ SupplementalReportColumn08 = a_Addend.SupplementalReportColumn08;
+ SupplementalReportColumn09 = a_Addend.SupplementalReportColumn09;
+ SupplementalReportColumn10 = a_Addend.SupplementalReportColumn10;
+ SupplementalReportColumn11 = a_Addend.SupplementalReportColumn11;
+// STRINGS END
GroupIndivSelection = GroupIndivSelection ||
a_Addend.GroupIndivSelection;
NoLongerIssued = NoLongerIssued ||
a_Addend.NoLongerIssued;
AllowGroupQuote = AllowGroupQuote &&
a_Addend.AllowGroupQuote;
@@ -753,7 +779,7 @@ LedgerInvariant& LedgerInvariant::PlusEq(LedgerInvariant
const& a_Addend)
AllowExperienceRating = AllowExperienceRating ||
a_Addend.AllowExperienceRating;
UseExperienceRating = UseExperienceRating ||
a_Addend.UseExperienceRating;
UsePartialMort = a_Addend.UsePartialMort;
- PartMortTableName = a_Addend.PartMortTableName;
+
GuarMaxMandE = std::max(GuarMaxMandE ,
a_Addend.GuarMaxMandE );
InitDacTaxRate = std::max(InitDacTaxRate ,
a_Addend.InitDacTaxRate );
InitPremTaxRate = std::max(InitPremTaxRate,
a_Addend.InitPremTaxRate);
@@ -767,7 +793,6 @@ LedgerInvariant& LedgerInvariant::PlusEq(LedgerInvariant
const& a_Addend)
GenAcctAllocation = a_Addend.GenAcctAllocation;
GenderDistinct = a_Addend.GenderDistinct;
GenderBlended = a_Addend.GenderBlended;
- Smoker = a_Addend.Smoker;
SmokerDistinct = a_Addend.SmokerDistinct;
SmokerBlended = a_Addend.SmokerBlended;
@@ -827,25 +852,8 @@ LedgerInvariant& LedgerInvariant::PlusEq(LedgerInvariant
const& a_Addend)
WriteTsvFile = WriteTsvFile || a_Addend.WriteTsvFile ;
- // The composite has a supplemental report iff every cell has one,
- // in which case it uses the same columns as the last cell. There
- // is no better general way to decide which columns to use. (The
- // union of all columns selected for any life becomes infeasible
- // when its cardinality exceeds the maximum.)
- //
+ // The composite has a supplemental report iff every cell has one.
SupplementalReport = SupplementalReport && a_Addend.SupplementalReport;
- SupplementalReportColumn00 = a_Addend.SupplementalReportColumn00;
- SupplementalReportColumn01 = a_Addend.SupplementalReportColumn01;
- SupplementalReportColumn02 = a_Addend.SupplementalReportColumn02;
- SupplementalReportColumn03 = a_Addend.SupplementalReportColumn03;
- SupplementalReportColumn04 = a_Addend.SupplementalReportColumn04;
- SupplementalReportColumn05 = a_Addend.SupplementalReportColumn05;
- SupplementalReportColumn06 = a_Addend.SupplementalReportColumn06;
- SupplementalReportColumn07 = a_Addend.SupplementalReportColumn07;
- SupplementalReportColumn08 = a_Addend.SupplementalReportColumn08;
- SupplementalReportColumn09 = a_Addend.SupplementalReportColumn09;
- SupplementalReportColumn10 = a_Addend.SupplementalReportColumn10;
- SupplementalReportColumn11 = a_Addend.SupplementalReportColumn11;
return *this;
}
- [lmi-commits] [lmi] master updated (dfb045a -> ed9a11d), Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master 5f5f3b5 01/16: Move a large comment block outside a function definition, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master d888936 06/16: Move a comment to a more appropriate place, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master cbc0ec5 03/16: Sort string members together in declaration order,
Greg Chicares <=
- [lmi-commits] [lmi] master f7689a2 08/16: Regularize whitespace, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master 95c2f88 02/16: Declutter, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master ce9d6b8 04/16: Change compositing for some string members, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master df9c566 07/16: Sort nonscalable scalar members together in declaration order, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master a7a9404 05/16: Simplify [348], Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master 359c74c 09/16: Treat 'InitErMode' the same as any other ledger string, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master 255b816 15/16: Mark ledger members dubiously ignored in compositing, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master ed9a11d 16/16: Address ledger members formerly ignored in compositing, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master 2e134db 11/16: Add 'InitEeMode' to ledger, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master bb389e4 10/16: Alphabetize members of enumerative type, Greg Chicares, 2020/04/11