OSB_LIB::RfStairCase Class Reference

Inheritance diagram for OSB_LIB::RfStairCase:

Inheritance graph
[legend]
Collaboration diagram for OSB_LIB::RfStairCase:

Collaboration graph
[legend]
List of all members.

Detailed Description

RfStairCase.

Definition at line 690 of file ratingfn.h.

Public Types

Public Member Functions

Retrieve data members.
Modify data members

Private Member Functions

Specific criteria checking before status changes:
Specific database operations for derived classes.

Private Attributes

Friends

Classes


Member Typedef Documentation

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

Define a list of charge as Charges.

Definition at line 733 of file ratingfn.h.


Constructor & Destructor Documentation

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.

Parameters:
oid Object id of the staircase rating function.


Member Function Documentation

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.

Parameters:
session Database session used.
errors Container for error messages if any.
Returns:
true if success else false.

Implements OSB_LIB::RatingFn.

bool OSB_LIB::RfStairCase::insSpecific ( const OSB_DB::Session session  )  [private, virtual]

Insert RfStairCase specific data members into database.

Parameters:
session Database session.
Returns:
true if success else false.
Exceptions:
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.

Parameters:
money Available money for a call.
seq Which sequence of the charge configuration
volume Length of time a service can be used.
Exceptions:
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.

Parameters:
money Available money to be converted into call duration.
Returns:
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.

Parameters:
unitId Unit of the volume to be rated
volume Length of time a service is used.
roundedVolume Length of time after round.
Returns:
The cost of the service used for the inputed interval.

Implements OSB_LIB::RatingFn.

bool OSB_LIB::RfStairCase::readSpecific ( const OSB_DB::Session session  )  [private, virtual]

Read RfStairCase specific data members from database.

Parameters:
session Database session.
Returns:
true if success else false.
Exceptions:
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.

Parameters:
session Database session used.
errors Container for error messages if any.
Returns:
true if success else false.

Implements OSB_LIB::RatingFn.

bool OSB_LIB::RfStairCase::removeSpecific ( const OSB_DB::Session session  )  [private, virtual]

Remove RfStairCase specific data members from database.

Parameters:
session Database session.
Returns:
true if success else false.
Exceptions:
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.

Parameters:
session Database session used.
errors Container for error messages if any.
Returns:
true if success else false.

Implements OSB_LIB::RatingFn.

bool OSB_LIB::RfStairCase::setCharges ( const Charges charges  ) 

Modify the charge configuration of the stair case rating function.

Parameters:
charges The new charges to be applied.
Returns:
true if successful else false.
Exceptions:
OsbException for the following errors:
  • Object is not editable

Type OSB_LIB::RfStairCase::type (  )  const [virtual]

Get the type of rating function.

Implements OSB_LIB::RatingFn.

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.

Parameters:
session Database session used.
errors Container for error messages if any.
Returns:
true if success else false.

Implements OSB_LIB::RatingFn.

bool OSB_LIB::RfStairCase::updSpecific ( const OSB_DB::Session session  )  [private, virtual]

Update RfStairCase specific data members into database.

Parameters:
session Database session.
Returns:
true if success else false.
Exceptions:
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.

Parameters:
volume Usage volume to rate.
roundedVolume Volume after round.
seq Which sequence of the charge configuration to be used.
rate Gets the rate.
Exceptions:
OsbException for the following errors:


Friends And Related Function Documentation

friend struct OSB_DB::RfStairCaseGw [friend]

The database gateway needs to populate data members after construction.

Definition at line 696 of file ratingfn.h.


Member Data Documentation

Charges OSB_LIB::RfStairCase::charges_ [private]

Configuration of stair case specific rating charges.

Definition at line 944 of file ratingfn.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:15:59 2006 for OSB Library by  doxygen 1.4.7