Definition at line 690 of file ratingfn.h.
typedef std::auto_ptr<RfStairCase> OSB_LIB::RfStairCase::AutoPtr |
Short-cut for an auto pointer.
For details see quality manual, implementation patterns: Virtual copy construction.
Reimplemented from OSB_LIB::RatingFn.
Definition at line 700 of file ratingfn.h.
typedef std::list<Charge> OSB_LIB::RfStairCase::Charges |
OSB_LIB::RfStairCase::RfStairCase | ( | const RatingFn::Oid & | oid = Oid() |
) | [explicit] |
Constructor with optional object id.
This will construct an empty staircase rating function. The new object should call the read(...) function to populate its data members.
oid | Object id of the staircase rating function. |
const Charges& OSB_LIB::RfStairCase::charges | ( | ) | const |
Get the data member charges.
AutoPtr OSB_LIB::RfStairCase::clone | ( | ) | const |
Virtual copy construction.
For details see quality manual, implementation patterns.
Reimplemented from OSB_LIB::RatingFn.
virtual RatingFn* OSB_LIB::RfStairCase::clone_ | ( | ) | const [private, virtual] |
Virtual copy construction.
For details see quality manual, implementation patterns.
Implements OSB_LIB::RatingFn.
virtual bool OSB_LIB::RfStairCase::freezeSpecific | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | [private, virtual] |
Criteria checking before setting the status from editable to standby.
session | Database session used. | |
errors | Container for error messages if any. |
Implements OSB_LIB::RatingFn.
bool OSB_LIB::RfStairCase::insSpecific | ( | const OSB_DB::Session & | session | ) | [private, virtual] |
Insert RfStairCase specific data members into database.
session | Database session. |
OsbException | for database error. |
Implements OSB_LIB::RatingFn.
void OSB_LIB::RfStairCase::moneyToVolume | ( | Money & | money, | |
long & | seq, | |||
Decimal & | volume | |||
) | const [private] |
Specific rate function apply to stair case rating function.
This function is the one that actually perform the rating functionality.
money | Available money for a call. | |
seq | Which sequence of the charge configuration | |
volume | Length of time a service can be used. |
OsbException | for the following errors:
|
virtual const Decimal OSB_LIB::RfStairCase::rateMoneyToVolume | ( | const Money & | money | ) | const [virtual] |
Rate a used service based on the available money.
This function takes in an amount of money and calculate the total amount of time for a call.
money | Available money to be converted into call duration. |
Implements OSB_LIB::RatingFn.
virtual const Money OSB_LIB::RfStairCase::rateVolumeToMoney | ( | const TypeId< Unit > & | unitId, | |
const Decimal & | volume, | |||
Decimal & | roundedVolume | |||
) | const [virtual] |
Rate a used service for a specific time interval.
This function takes in the total volume or length of time a service is used. It will then calculate the cost for the volume of service used and round the volume as well.
unitId | Unit of the volume to be rated | |
volume | Length of time a service is used. | |
roundedVolume | Length of time after round. |
Implements OSB_LIB::RatingFn.
bool OSB_LIB::RfStairCase::readSpecific | ( | const OSB_DB::Session & | session | ) | [private, virtual] |
Read RfStairCase specific data members from database.
session | Database session. |
OsbException | for database error. |
Implements OSB_LIB::RatingFn.
virtual bool OSB_LIB::RfStairCase::releaseSpecific | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | [private, virtual] |
Criteria checking before setting the status from standby to release.
session | Database session used. | |
errors | Container for error messages if any. |
Implements OSB_LIB::RatingFn.
bool OSB_LIB::RfStairCase::removeSpecific | ( | const OSB_DB::Session & | session | ) | [private, virtual] |
Remove RfStairCase specific data members from database.
session | Database session. |
OsbException | for database error. |
Implements OSB_LIB::RatingFn.
virtual bool OSB_LIB::RfStairCase::revokeSpecific | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | [private, virtual] |
Criteria checking before setting the status from release to standby.
session | Database session used. | |
errors | Container for error messages if any. |
Implements OSB_LIB::RatingFn.
bool OSB_LIB::RfStairCase::setCharges | ( | const Charges & | charges | ) |
Modify the charge configuration of the stair case rating function.
charges | The new charges to be applied. |
OsbException | for the following errors:
|
Type OSB_LIB::RfStairCase::type | ( | ) | const [virtual] |
virtual bool OSB_LIB::RfStairCase::unfreezeSpecific | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | [private, virtual] |
Criteria checking before setting the status from standby to editable.
session | Database session used. | |
errors | Container for error messages if any. |
Implements OSB_LIB::RatingFn.
bool OSB_LIB::RfStairCase::updSpecific | ( | const OSB_DB::Session & | session | ) | [private, virtual] |
Update RfStairCase specific data members into database.
session | Database session. |
OsbException | for database error. |
Implements OSB_LIB::RatingFn.
void OSB_LIB::RfStairCase::volumeToMoney | ( | Decimal & | volume, | |
Decimal & | roundedVolume, | |||
long | seq, | |||
Decimal & | rate | |||
) | const [private] |
Specific rate function apply to stair case rating function.
This function is the one that actually perform the rating functionality.
volume | Usage volume to rate. | |
roundedVolume | Volume after round. | |
seq | Which sequence of the charge configuration to be used. | |
rate | Gets the rate. |
OsbException | for the following errors:
|
friend struct OSB_DB::RfStairCaseGw [friend] |
The database gateway needs to populate data members after construction.
Definition at line 696 of file ratingfn.h.
Charges OSB_LIB::RfStairCase::charges_ [private] |