[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [5610] Refactor, renaming certain arguments for concinnity
From: |
Greg Chicares |
Subject: |
[lmi-commits] [5610] Refactor, renaming certain arguments for concinnity |
Date: |
Tue, 04 Dec 2012 10:55:17 +0000 |
Revision: 5610
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5610
Author: chicares
Date: 2012-12-04 10:55:17 +0000 (Tue, 04 Dec 2012)
Log Message:
-----------
Refactor, renaming certain arguments for concinnity
Modified Paths:
--------------
lmi/trunk/calendar_date.cpp
lmi/trunk/calendar_date.hpp
lmi/trunk/calendar_date_test.cpp
lmi/trunk/input_harmonization.cpp
lmi/trunk/mec_input.cpp
Modified: lmi/trunk/calendar_date.cpp
===================================================================
--- lmi/trunk/calendar_date.cpp 2012-12-01 10:46:23 UTC (rev 5609)
+++ lmi/trunk/calendar_date.cpp 2012-12-04 10:55:17 UTC (rev 5610)
@@ -453,7 +453,7 @@
int notional_age
(calendar_date const& birthdate
,calendar_date const& as_of_date
- ,bool use_age_nearest_birthday
+ ,bool alb_anb
)
{
typedef std::pair<calendar_date,calendar_date> date_pair;
@@ -476,7 +476,7 @@
int age_last_birthday = last_birthday.year() - birthdate.year();
- if(!use_age_nearest_birthday)
+ if(!alb_anb)
{
return age_last_birthday;
}
@@ -499,7 +499,7 @@
int attained_age
(calendar_date const& birthdate
,calendar_date const& as_of_date
- ,bool use_age_nearest_birthday
+ ,bool alb_anb
)
{
if(as_of_date < birthdate)
@@ -514,7 +514,7 @@
;
}
- return notional_age(birthdate, as_of_date, use_age_nearest_birthday);
+ return notional_age(birthdate, as_of_date, alb_anb);
}
/// Full curtate years and months by which 'other_date' follows 'base_date'.
@@ -677,12 +677,12 @@
birthdate_limit
(calendar_date as_of_date
,int limit_age
- ,bool use_anb
+ ,bool alb_anb
,root_bias bias
)
:as_of_date_ (as_of_date)
,limit_age_ (limit_age)
- ,use_anb_ (use_anb)
+ ,alb_anb_ (alb_anb)
,bias_ (bias)
,a_priori_minimum_ (calendar_date::gregorian_epoch_jdn)
,a_priori_maximum_ (calendar_date::last_yyyy_date_jdn)
@@ -705,7 +705,7 @@
{
// Double parentheses circumvent the most vexing parse.
calendar_date z((jdn_t(numeric_value_cast<int>(candidate))));
- return offset_ + notional_age(z, as_of_date_, use_anb_) - limit_age_;
+ return offset_ + notional_age(z, as_of_date_, alb_anb_) - limit_age_;
}
calendar_date operator()()
@@ -728,7 +728,7 @@
private:
calendar_date as_of_date_;
int limit_age_;
- bool use_anb_;
+ bool alb_anb_;
root_bias bias_;
int a_priori_minimum_;
int a_priori_maximum_;
@@ -741,10 +741,10 @@
calendar_date minimum_birthdate
(int minimum_age
,calendar_date const& as_of_date
- ,bool anb
+ ,bool alb_anb
)
{
- return birthdate_limit(as_of_date, minimum_age, anb, bias_lower)();
+ return birthdate_limit(as_of_date, minimum_age, alb_anb, bias_lower)();
}
/// Latest birthdate consonant with a given age and as-of date.
@@ -752,10 +752,10 @@
calendar_date maximum_birthdate
(int maximum_age
,calendar_date const& as_of_date
- ,bool anb
+ ,bool alb_anb
)
{
- return birthdate_limit(as_of_date, maximum_age, anb, bias_higher)();
+ return birthdate_limit(as_of_date, maximum_age, alb_anb, bias_higher)();
}
std::string month_name(int month)
Modified: lmi/trunk/calendar_date.hpp
===================================================================
--- lmi/trunk/calendar_date.hpp 2012-12-01 10:46:23 UTC (rev 5609)
+++ lmi/trunk/calendar_date.hpp 2012-12-04 10:55:17 UTC (rev 5610)
@@ -203,7 +203,7 @@
int attained_age
(calendar_date const& birthdate
,calendar_date const& as_of_date
- ,bool use_age_nearest_birthday
+ ,bool alb_anb
);
std::pair<int,int> years_and_months_since
@@ -229,13 +229,13 @@
calendar_date minimum_birthdate
(int age
,calendar_date const& as_of_date
- ,bool use_age_nearest_birthday
+ ,bool alb_anb
);
calendar_date maximum_birthdate
(int age
,calendar_date const& as_of_date
- ,bool use_age_nearest_birthday
+ ,bool alb_anb
);
std::string month_name(int);
Modified: lmi/trunk/calendar_date_test.cpp
===================================================================
--- lmi/trunk/calendar_date_test.cpp 2012-12-01 10:46:23 UTC (rev 5609)
+++ lmi/trunk/calendar_date_test.cpp 2012-12-04 10:55:17 UTC (rev 5610)
@@ -70,7 +70,7 @@
static void TestIntegralDuration();
static void TestYearAndMonthDifferenceExhaustively();
static void TestBirthdateLimits();
- static void TestBirthdateLimitsExhaustively(bool anb);
+ static void TestBirthdateLimitsExhaustively(bool alb_anb);
static void TestIo();
static void TestSpeed();
};
@@ -801,7 +801,7 @@
);
}
-void CalendarDateTest::TestBirthdateLimitsExhaustively(bool anb)
+void CalendarDateTest::TestBirthdateLimitsExhaustively(bool alb_anb)
{
for
(calendar_date d (ymd_t(19991231))
@@ -811,14 +811,14 @@
{
for(int y = 0; y < 5; ++y)
{
- calendar_date b0 = minimum_birthdate(y, d, anb);
- BOOST_TEST_EQUAL(y, attained_age(b0, d, anb));
+ calendar_date b0 = minimum_birthdate(y, d, alb_anb);
+ BOOST_TEST_EQUAL(y, attained_age(b0, d, alb_anb));
--b0;
- BOOST_TEST_UNEQUAL(y, attained_age(b0, d, anb));
+ BOOST_TEST_UNEQUAL(y, attained_age(b0, d, alb_anb));
- calendar_date b1 = maximum_birthdate(y, d, anb);
- BOOST_TEST_EQUAL(y, attained_age(b1, d, anb));
+ calendar_date b1 = maximum_birthdate(y, d, alb_anb);
+ BOOST_TEST_EQUAL(y, attained_age(b1, d, alb_anb));
++b1;
if(0 == y) // Age would be negative.
@@ -830,7 +830,7 @@
}
else
{
- BOOST_TEST_UNEQUAL(y, attained_age(b1, d, anb));
+ BOOST_TEST_UNEQUAL(y, attained_age(b1, d, alb_anb));
}
}
}
Modified: lmi/trunk/input_harmonization.cpp
===================================================================
--- lmi/trunk/input_harmonization.cpp 2012-12-01 10:46:23 UTC (rev 5609)
+++ lmi/trunk/input_harmonization.cpp 2012-12-04 10:55:17 UTC (rev 5610)
@@ -302,10 +302,10 @@
)
);
- bool const use_anb = database_->Query(DB_AgeLastOrNearest);
+ bool const alb_anb = database_->Query(DB_AgeLastOrNearest);
DateOfBirth.minimum_and_maximum
- (minimum_birthdate(IssueAge.maximum(), EffectiveDate.value(), use_anb)
- ,maximum_birthdate(IssueAge.minimum(), EffectiveDate.value(), use_anb)
+ (minimum_birthdate(IssueAge.maximum(), EffectiveDate.value(), alb_anb)
+ ,maximum_birthdate(IssueAge.minimum(), EffectiveDate.value(), alb_anb)
);
int max_age = static_cast<int>(database_->Query(DB_MaturityAge));
@@ -906,12 +906,12 @@
GeneralAccountRate = current_credited_rate(*database_);
}
- bool const use_anb = database_->Query(DB_AgeLastOrNearest);
+ bool const alb_anb = database_->Query(DB_AgeLastOrNearest);
int apparent_age = attained_age
(DateOfBirth.value()
,EffectiveDate.value()
- ,use_anb
+ ,alb_anb
);
if(mce_no == UseDOB)
{
Modified: lmi/trunk/mec_input.cpp
===================================================================
--- lmi/trunk/mec_input.cpp 2012-12-01 10:46:23 UTC (rev 5609)
+++ lmi/trunk/mec_input.cpp 2012-12-04 10:55:17 UTC (rev 5610)
@@ -364,10 +364,10 @@
)
);
- bool const use_anb = database_->Query(DB_AgeLastOrNearest);
+ bool const alb_anb = database_->Query(DB_AgeLastOrNearest);
DateOfBirth.minimum_and_maximum
- (minimum_birthdate(IssueAge.maximum(), EffectiveDate.value(), use_anb)
- ,maximum_birthdate(IssueAge.minimum(), EffectiveDate.value(), use_anb)
+ (minimum_birthdate(IssueAge.maximum(), EffectiveDate.value(), alb_anb)
+ ,maximum_birthdate(IssueAge.minimum(), EffectiveDate.value(), alb_anb)
);
int max_age = static_cast<int>(database_->Query(DB_MaturityAge));
@@ -483,12 +483,12 @@
InforceContractYear = ym1.first;
InforceContractMonth = ym1.second;
- bool const use_anb = database_->Query(DB_AgeLastOrNearest);
+ bool const alb_anb = database_->Query(DB_AgeLastOrNearest);
int apparent_age = attained_age
(DateOfBirth.value()
,EffectiveDate.value()
- ,use_anb
+ ,alb_anb
);
if(mce_no == UseDOB)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [5610] Refactor, renaming certain arguments for concinnity,
Greg Chicares <=