[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master a473a82 17/24: Expunge a duplicative member f
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master a473a82 17/24: Expunge a duplicative member function [325] |
Date: |
Wed, 30 Dec 2020 18:47:00 -0500 (EST) |
branch: master
commit a473a82eb1914aa7b95b52f59e91beb198b7cc48
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Expunge a duplicative member function [325]
---
basic_values.hpp | 1 -
ihs_basicval.cpp | 101 +------------------------------------------------------
2 files changed, 1 insertion(+), 101 deletions(-)
diff --git a/basic_values.hpp b/basic_values.hpp
index 6e61a50..387a086 100644
--- a/basic_values.hpp
+++ b/basic_values.hpp
@@ -98,7 +98,6 @@ class LMI_SO BasicValues
virtual ~BasicValues() = default;
void Init();
- void GPTServerInit();
int GetLength() const;
int GetIssueAge() const;
diff --git a/ihs_basicval.cpp b/ihs_basicval.cpp
index 1ec3048..33a994e 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -158,7 +158,7 @@ BasicValues::BasicValues
yare_input_.CurrentCoiMultiplier .assign(db_len, 1.0);
yare_input_.FlatExtra .resize(db_len);
- GPTServerInit();
+ Init();
}
//============================================================================
@@ -260,105 +260,6 @@ void BasicValues::Init()
}
//============================================================================
-// TODO ?? Not for general use--use for GPT server only, for now. TAXATION !!
refactor later
-void BasicValues::GPTServerInit()
-{
- SetPermanentInvariants();
-
- StateOfDomicile_ = mc_state_from_string(product().datum("InsCoDomicile"));
- StateOfJurisdiction_ = yare_input_.StateOfJurisdiction;
- PremiumTaxState_ = yare_input_.PremiumTaxState ;
-
- if
- ( !database().query<bool>(DB_StateApproved)
- && !global_settings::instance().ash_nazg()
- && !global_settings::instance().regression_testing()
- )
- {
- alarum()
- << "Product "
- << yare_input_.ProductName
- << " not approved in state "
- << mc_str(GetStateOfJurisdiction())
- << "."
- << LMI_FLUSH
- ;
- }
-
- IssueAge = yare_input_.IssueAge;
- RetAge = yare_input_.RetirementAge;
- LMI_ASSERT(IssueAge < 100);
- LMI_ASSERT(RetAge <= 100);
- LMI_ASSERT(yare_input_.RetireesCanEnroll || IssueAge <= RetAge);
-
- database().query_into(DB_MaturityAge , EndtAge);
- Length = EndtAge - IssueAge;
- LMI_ASSERT(database().length() == Length);
-
- database().query_into(DB_LedgerType , ledger_type_);
- database().query_into(DB_Nonillustrated, nonillustrated_);
- bool no_longer_issued = database().query<bool>(DB_NoLongerIssued);
- bool is_new_business = yare_input_.EffectiveDate ==
yare_input_.InforceAsOfDate;
- no_can_issue_ = no_longer_issued && is_new_business;
- IsSubjectToIllustrationReg_ = is_subject_to_ill_reg(ledger_type());
-
- if(IssueAge < database().query<int>(DB_MinIssAge))
- {
- alarum()
- << "Issue age "
- << IssueAge
- << " less than minimum "
- << database().query<int>(DB_MinIssAge)
- << '.'
- << LMI_FLUSH
- ;
- }
- if(database().query<int>(DB_MaxIssAge) < IssueAge)
- {
- alarum()
- << "Issue age "
- << IssueAge
- << " greater than maximum "
- << database().query<int>(DB_MaxIssAge)
- << '.'
- << LMI_FLUSH
- ;
- }
- lingo_ =
lingo::read_via_cache(AddDataDir(product().datum("LingoFilename")));
- FundData_.reset(new FundData(AddDataDir(product().datum("FundFilename"))));
- RoundingRules_.reset
- (new rounding_rules(AddDataDir(product().datum("RoundingFilename")))
- );
- SetRoundingFunctors();
- StratifiedCharges_.reset
- (new stratified_charges(AddDataDir(product().datum("TierFilename")))
- );
- SpreadFor7702_.assign
- (Length
- ,StratifiedCharges_->minimum_tiered_spread_for_7702()
- );
-
- // Multilife contracts will need a vector of mortality-rate objects.
-
- // Mortality and interest rates require database and rounding.
- // Interest rates require tiered data and 7702 spread.
- MortalityRates_.reset(new MortalityRates (*this));
- InterestRates_ .reset(new InterestRates (*this));
- DeathBfts_ .reset(new death_benefits (GetLength(), yare_input_,
round_specamt_));
- // Outlay requires only input and rounding; it might someday use
- // interest rates.
- Outlay_ .reset(new modal_outlay (yare_input_,
round_gross_premium_, round_withdrawal_, round_loan_));
- PremiumTax_ .reset(new premium_tax (PremiumTaxState_,
StateOfDomicile_, yare_input_.AmortizePremiumLoad, database(),
*StratifiedCharges_));
- Loads_ .reset(new Loads (*this));
-
- SetMaxSurvivalDur();
- set_partial_mortality();
-
- Init7702();
- Init7702A();
-}
-
-//============================================================================
// TODO ?? Does this belong in the funds class? Consider merging it
// with code in AccountValue::SetInitialValues().
double BasicValues::InvestmentManagementFee() const
- [lmi-commits] [lmi] master e7c9da0 08/24: Prepare to move a block of code, (continued)
- [lmi-commits] [lmi] master e7c9da0 08/24: Prepare to move a block of code, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 55a3eb0 12/24: Note an apparent defect [327], Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 53e98ab 13/24: Fix defect introduced 20100723T2339Z: wrong jurisdiction [326], Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master e4c790a 18/24: Expunge a defect marker [324], Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master d89a676 22/24: Refactor to avoid a header-only implementation, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 3121c90 23/24: Conditionally use H.R. 6800's 7702 transitional rates, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 3ee0c70 15/24: Make two member functions identical, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master d7f3337 09/24: Move a block of code as just announced, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master d4e0291 10/24: Refactor, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 71d750e 14/24: Make two member functions almost identical, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master a473a82 17/24: Expunge a duplicative member function [325],
Greg Chicares <=
- [lmi-commits] [lmi] master 2bc3d08 02/24: Move an enum, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master b3cbe37 11/24: Move another block of code, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 9180696 16/24: Change a member's type-specifier, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 3ee62a7 19/24: Read product data files earlier, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 7930f69 20/24: Set 7702 and 7702A interest rates OAOO, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master d6701e8 21/24: Split a unit-test TU in twain, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master e1047b3 24/24: Record speed measurements, Greg Chicares, 2020/12/30