[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [5583] Refactor
From: |
Greg Chicares |
Subject: |
[lmi-commits] [5583] Refactor |
Date: |
Thu, 25 Oct 2012 09:30:12 +0000 |
Revision: 5583
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5583
Author: chicares
Date: 2012-10-25 09:30:12 +0000 (Thu, 25 Oct 2012)
Log Message:
-----------
Refactor
Modified Paths:
--------------
lmi/trunk/input.hpp
lmi/trunk/input_harmonization.cpp
Modified: lmi/trunk/input.hpp
===================================================================
--- lmi/trunk/input.hpp 2012-10-24 22:05:27 UTC (rev 5582)
+++ lmi/trunk/input.hpp 2012-10-25 09:30:12 UTC (rev 5583)
@@ -184,7 +184,8 @@
virtual void DoHarmonize();
virtual void DoTransmogrify();
- void SetSolveDurations();
+ void set_solve_durations();
+ void set_inforce_durations_from_dates();
std::map<std::string,std::string> const
permissible_specified_amount_strategy_keywords(); // Obsolete.
Modified: lmi/trunk/input_harmonization.cpp
===================================================================
--- lmi/trunk/input_harmonization.cpp 2012-10-24 22:05:27 UTC (rev 5582)
+++ lmi/trunk/input_harmonization.cpp 2012-10-25 09:30:12 UTC (rev 5583)
@@ -1014,20 +1014,8 @@
return;
}
- std::pair<int,int> ym0 = years_and_months_since
- (EffectiveDate .value()
- ,InforceAsOfDate.value()
- );
- InforceYear = ym0.first;
- InforceMonth = ym0.second;
+ set_inforce_durations_from_dates();
- std::pair<int,int> ym1 = years_and_months_since
- (LastMaterialChangeDate.value()
- ,InforceAsOfDate .value()
- );
- InforceContractYear = ym1.first;
- InforceContractMonth = ym1.second;
-
// USER !! This is the credited rate as of the database date,
// regardless of the date of illustration, because the database
// does not yet store historical rates.
@@ -1077,10 +1065,10 @@
;
} // end if(!egregious_kludge)
- SetSolveDurations();
+ set_solve_durations();
}
-void Input::SetSolveDurations()
+void Input::set_solve_durations()
{
switch(SolveTgtAtWhich.value())
{
@@ -1192,3 +1180,20 @@
SolveEndTime = issue_age() + SolveEndYear .value();
}
+void Input::set_inforce_durations_from_dates()
+{
+ std::pair<int,int> ym0 = years_and_months_since
+ (EffectiveDate .value()
+ ,InforceAsOfDate.value()
+ );
+ InforceYear = ym0.first;
+ InforceMonth = ym0.second;
+
+ std::pair<int,int> ym1 = years_and_months_since
+ (LastMaterialChangeDate.value()
+ ,InforceAsOfDate .value()
+ );
+ InforceContractYear = ym1.first;
+ InforceContractMonth = ym1.second;
+}
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [5583] Refactor,
Greg Chicares <=