OSB_LIB::MidMonthBillcycle Class Reference

Inheritance diagram for OSB_LIB::MidMonthBillcycle:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

This billcycle implementation splits each month into two intervals.

This billcycle is specialized to allow `half-monthly billing'. It generates two billing periods per month. One from the end date of the last billing period (normally this means from the first day of the month) up to but excluding the day configured as `mid-month' (1-31). The second billing period is from `mid-month' up to and including the last day of the month.

Definition at line 330 of file billcycle.h.

Public Types

Public Member Functions

Read access to data members

Private Member Functions

Private Attributes

Friends


Member Typedef Documentation

typedef std::auto_ptr<MidMonthBillcycle> OSB_LIB::MidMonthBillcycle::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 334 of file billcycle.h.


Constructor & Destructor Documentation

OSB_LIB::MidMonthBillcycle::MidMonthBillcycle (  )  [inline]

Default constructor.

Definition at line 337 of file billcycle.h.


Member Function Documentation

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

Add a billing period to the given start date.

The billing periods of mid-month billcycle are from the 1st of a month to the day of the month (exclusive) configured in the mid-month parameter and from this day to the last day of the month.

Parameters:
from Start date of the billing period.
Returns:
The nearest 1st of month, mid-month or end of month greater than start date.

Implements OSB_LIB::Billcycle.

AutoPtr OSB_LIB::MidMonthBillcycle::clone (  )  const

Virtual copy construction.

For details see quality manual, implementation patterns.

Reimplemented from OSB_LIB::Billcycle.

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

Internal virtual copy constructor.

For details see quality manual, implementation patterns.

Implements OSB_LIB::Billcycle.

int OSB_LIB::MidMonthBillcycle::midMonth (  )  const [inline]

Definition at line 342 of file billcycle.h.

References midMonth_.

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

Definition at line 343 of file billcycle.h.

References minPeriod_.

int OSB_LIB::MidMonthBillcycle::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.


Friends And Related Function Documentation

friend class OSB_DB::BillcycleGw [friend]

Reimplemented from OSB_LIB::Billcycle.

Definition at line 331 of file billcycle.h.


Member Data Documentation

int OSB_LIB::MidMonthBillcycle::midMonth_ [private]

Day of month used to split it.

Definition at line 368 of file billcycle.h.

Referenced by midMonth().

int OSB_LIB::MidMonthBillcycle::minPeriod_ [private]

Minimum length of a billing period.

Definition at line 370 of file billcycle.h.

Referenced by minPeriod().


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