[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] valyuta/004 c6f6f55 16/17: Expunge a duplicative mem
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] valyuta/004 c6f6f55 16/17: Expunge a duplicative member function [325] |
Date: |
Thu, 24 Dec 2020 10:23:54 -0500 (EST) |
branch: valyuta/004
commit c6f6f5555177aaf9344a3f297d29c80c026d6b30
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 8d16bb9..8159e3f 100644
--- a/basic_values.hpp
+++ b/basic_values.hpp
@@ -99,7 +99,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 972aedc..3f38178 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -168,7 +168,7 @@ BasicValues::BasicValues
yare_input_.CurrentCoiMultiplier .assign(db_len, 1.0);
yare_input_.FlatExtra .resize(db_len);
- GPTServerInit();
+ Init();
}
//============================================================================
@@ -270,105 +270,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] valyuta/004 eeacb20 07/17: Prepare to move a block of code, (continued)
- [lmi-commits] [lmi] valyuta/004 eeacb20 07/17: Prepare to move a block of code, Greg Chicares, 2020/12/24
- [lmi-commits] [lmi] valyuta/004 f16fd3a 02/17: Expunge an unwanted exception class, Greg Chicares, 2020/12/24
- [lmi-commits] [lmi] valyuta/004 5ceb54d 01/17: Move an enum, Greg Chicares, 2020/12/24
- [lmi-commits] [lmi] valyuta/004 5ac107f 09/17: Refactor, Greg Chicares, 2020/12/24
- [lmi-commits] [lmi] valyuta/004 c9b4787 13/17: Make two member functions almost identical, Greg Chicares, 2020/12/24
- [lmi-commits] [lmi] valyuta/004 cf62b44 17/17: Record timings, Greg Chicares, 2020/12/24
- [lmi-commits] [lmi] valyuta/004 9d9c2b7 06/17: Assert "length" is same in two classes, Greg Chicares, 2020/12/24
- [lmi-commits] [lmi] valyuta/004 67f1c54 08/17: Move a block of code as just announced, Greg Chicares, 2020/12/24
- [lmi-commits] [lmi] valyuta/004 80a18db 14/17: Make two member functions identical, Greg Chicares, 2020/12/24
- [lmi-commits] [lmi] valyuta/004 89ea7c8 15/17: Change a member's datatype, Greg Chicares, 2020/12/24
- [lmi-commits] [lmi] valyuta/004 c6f6f55 16/17: Expunge a duplicative member function [325],
Greg Chicares <=
- [lmi-commits] [lmi] valyuta/004 17275df 05/17: Resolve some more marked defects [326], Greg Chicares, 2020/12/24
- [lmi-commits] [lmi] valyuta/004 72dcc19 11/17: Note an apparent defect [327], Greg Chicares, 2020/12/24
- [lmi-commits] [lmi] valyuta/004 4a21c32 10/17: Move another block of code, Greg Chicares, 2020/12/24
- [lmi-commits] [lmi] valyuta/004 47b096d 12/17: Fix defect introduced 20100723T2339Z: wrong jurisdiction [326], Greg Chicares, 2020/12/24