OSB_LIB::IntervalBillcycle Class Reference

Inheritance diagram for OSB_LIB::IntervalBillcycle:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

A billcycle implementation that works with billing intervals.

IntervalBillcycle defines a billing period as a time period of a certain duration, starting from the end date of the last billing period. The duration can be specified as a number of days or a number of months. In case of months, it is possible to specify the preferred start day of the billing period. If this option is used, then the billing interval will be shortened if necessary to adjust the billing period to the preferred day. The next billing period will then start on the correct day.

Definition at line 243 of file billcycle.h.

Public Types

Public Member Functions

Read access to data members

Static Public Member Functions

Private Member Functions

Private Attributes

Friends


Member Typedef Documentation

typedef std::auto_ptr<IntervalBillcycle> OSB_LIB::IntervalBillcycle::AutoPtr

Short-cut for an auto pointer.

For details see quality manual, implementation patterns: Virtual copy construction.

Reimplemented from OSB_LIB::Billcycle.

Definition at line 247 of file billcycle.h.


Member Enumeration Documentation

enum OSB_LIB::IntervalBillcycle::Unit

Supported units for the billing period interval. The values must correspond with the table BILLCYCLE_TYPE.

Enumerator:
utUnknown 
utDays 
utMonths 

Definition at line 253 of file billcycle.h.


Constructor & Destructor Documentation

OSB_LIB::IntervalBillcycle::IntervalBillcycle (  )  [inline]

Default constructor.

Definition at line 278 of file billcycle.h.


Member Function Documentation

Date OSB_LIB::IntervalBillcycle::addBillingPeriod ( const Date from  )  const [virtual]

Add a billing period to the given start date.

Add one interval to the given start date.

Parameters:
from Start date of the billing period.
Returns:
start date plus one billing interval.

Implements OSB_LIB::Billcycle.

AutoPtr OSB_LIB::IntervalBillcycle::clone (  )  const

Virtual copy construction.

For details see quality manual, implementation patterns.

Reimplemented from OSB_LIB::Billcycle.

virtual Billcycle* OSB_LIB::IntervalBillcycle::clone_ (  )  const [private, virtual]

Internal virtual copy constructor.

For details see quality manual, implementation patterns.

Implements OSB_LIB::Billcycle.

int OSB_LIB::IntervalBillcycle::interval (  )  const [inline]

Definition at line 285 of file billcycle.h.

References interval_.

int OSB_LIB::IntervalBillcycle::minPeriod (  )  const [inline]

Definition at line 287 of file billcycle.h.

References minPeriod_.

int OSB_LIB::IntervalBillcycle::readSpecific ( const OSB_DB::Session session  )  [virtual]

Read billcycle specific parameters from the database.

Reads the billcycle specific parameters for a concrete billcycle, if any.

Parameters:
session Database session to use.
Returns:
0 in case of success, 1 if specific data not found, >1 for class specific errors.

Implements OSB_LIB::Billcycle.

int OSB_LIB::IntervalBillcycle::startDay (  )  const [inline]

Definition at line 286 of file billcycle.h.

References startDay_.

static char OSB_LIB::IntervalBillcycle::toChar ( Unit  ut  )  [static]

Convert a Unit to a char.

Parameters:
ut Unit enumeration value to convert.
Returns:
The corresponding character value. It is (char)utUnknown if `ut' is not supported.

Unit OSB_LIB::IntervalBillcycle::unit (  )  const [inline]

Definition at line 284 of file billcycle.h.

References unit_.

static Unit OSB_LIB::IntervalBillcycle::unit ( char  ut  )  [static]

Convert a char to a Unit.

Parameters:
ut Char value to convert.
Returns:
The corresponding Unit enumeration value. It is utUnknown if `ut' is not supported.


Friends And Related Function Documentation

friend class OSB_DB::BillcycleGw [friend]

Reimplemented from OSB_LIB::Billcycle.

Definition at line 244 of file billcycle.h.


Member Data Documentation

int OSB_LIB::IntervalBillcycle::interval_ [private]

Billing period length in units.

Definition at line 310 of file billcycle.h.

Referenced by interval().

int OSB_LIB::IntervalBillcycle::minPeriod_ [private]

Minimum billing period to use in connection with a start day.

Definition at line 314 of file billcycle.h.

Referenced by minPeriod().

int OSB_LIB::IntervalBillcycle::startDay_ [private]

Preferred start day for monthly billcycles.

Definition at line 312 of file billcycle.h.

Referenced by startDay().

Unit OSB_LIB::IntervalBillcycle::unit_ [private]

Unit of measurement: m(months) or d(days).

Definition at line 308 of file billcycle.h.

Referenced by unit().


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