[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] [lmi-commits] master 2acf385 4/4: Let "PolicyForm" vary by sta
From: |
Vadim Zeitlin |
Subject: |
Re: [lmi] [lmi-commits] master 2acf385 4/4: Let "PolicyForm" vary by state for product 'sample' |
Date: |
Sat, 14 Nov 2020 17:00:30 +0100 |
On Sat, 14 Nov 2020 10:24:45 -0500 (EST) Greg Chicares
<gchicares@sbcglobal.net> wrote:
GC> branch: master
GC> commit 2acf38516935f940b146176d767fe3d521c0a400
GC> Author: Gregory W. Chicares <gchicares@sbcglobal.net>
GC> Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
GC>
GC> Let "PolicyForm" vary by state for product 'sample'
GC>
GC> This is just a demonstration of the new "lingo" paradigm. Soon the
GC> old code that accomplishes the same thing in a different way will be
GC> eradicated.
GC> ---
GC> dbdict.cpp | 8 ++++++++
GC> ledger_invariant_init.cpp | 9 +++++++++
GC> 2 files changed, 17 insertions(+)
[...]
GC> diff --git a/ledger_invariant_init.cpp b/ledger_invariant_init.cpp
GC> index 7639d82..a053241 100644
GC> --- a/ledger_invariant_init.cpp
GC> +++ b/ledger_invariant_init.cpp
GC> @@ -32,6 +32,7 @@
GC> #include "death_benefits.hpp"
GC> #include "fund_data.hpp"
GC> #include "interest_rates.hpp"
GC> +#include "lingo.hpp"
GC> #include "lmi.hpp" // is_antediluvian_fork()
GC> #include "loads.hpp"
GC> #include "mc_enum_types_aux.hpp" // mc_str()
GC> @@ -325,6 +326,14 @@ void LedgerInvariant::Init(BasicValues const* b)
GC> // Strings.
GC>
GC> PolicyForm = p.datum(alt_form ? "PolicyFormAlternative" :
"PolicyForm");
GC> +
GC> + if("sample" == b->yare_input_.ProductName)
GC> + {
GC> + auto policy_form = b->database().query<int>(DB_PolicyForm);
GC> + LMI_ASSERT(b->lingo_->lookup(policy_form) == PolicyForm);
GC> + PolicyForm = b->lingo_->lookup(policy_form);
GC> + }
GC> +
Sorry, but after looking it for quite some time, I still can't understand
the purpose of this code, so I'd like to ask: is it just a temporary
debugging check or is there something I'm missing here?
Thanks,
VZ
pgpV8WwBDUIvd.pgp
Description: PGP signature
- Re: [lmi] [lmi-commits] master 2acf385 4/4: Let "PolicyForm" vary by state for product 'sample',
Vadim Zeitlin <=