OSB_LIB::Billcycle Class Reference

Inheritance diagram for OSB_LIB::Billcycle:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

Abstract base class for billcycles.

Contains functions to carry out billcycle operations.

Remarks:
Copy and assignment by compiler.

Definition at line 74 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<Billcycle> OSB_LIB::Billcycle::AutoPtr

Short-cut for an auto pointer.

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

Reimplemented in OSB_LIB::DateBillcycle, OSB_LIB::IntervalBillcycle, and OSB_LIB::MidMonthBillcycle.

Definition at line 90 of file billcycle.h.

typedef Id<Billcycle> OSB_LIB::Billcycle::Oid

Typesafe unique object identifier, database link.

Definition at line 82 of file billcycle.h.


Member Enumeration Documentation

enum OSB_LIB::Billcycle::Type

Supported types of billcycles.

The values must correspond with the table BILLCYCLE_TYPE.

In order for the billcycle factory to support creation of each concrete billcycle class, a prototype of it must be registered with the factory. For billcycles provided by the OSB library, this is done in the constructor of the billcycle factory.

Enumerator:
btUnknown 
btIntervalBillcycle 
btDateBillcycle 
btMidMonthBillcycle 

Definition at line 103 of file billcycle.h.


Constructor & Destructor Documentation

virtual OSB_LIB::Billcycle::~Billcycle (  )  [inline, virtual]

Virtual destructor.

Definition at line 130 of file billcycle.h.


Member Function Documentation

virtual Date OSB_LIB::Billcycle::addBillingPeriod ( const Date from  )  const [pure virtual]

Add a billing period to the given start date.

Each concrete billcycle implements the appropriate logic to compute the end date for a billing period starting on the given start date.

Parameters:
from Start date of the billing period.
Returns:
the end date of the billing period starting on the start date.

Implemented in OSB_LIB::DateBillcycle, OSB_LIB::IntervalBillcycle, and OSB_LIB::MidMonthBillcycle.

AutoPtr OSB_LIB::Billcycle::clone (  )  const

Virtual copy construction.

For details see quality manual, implementation patterns.

Reimplemented in OSB_LIB::DateBillcycle, OSB_LIB::IntervalBillcycle, and OSB_LIB::MidMonthBillcycle.

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

Internal virtual copy constructor.

For details see quality manual, implementation patterns.

Implemented in OSB_LIB::DateBillcycle, OSB_LIB::IntervalBillcycle, and OSB_LIB::MidMonthBillcycle.

const std::string& OSB_LIB::Billcycle::des (  )  const [inline]

Get the description.

Definition at line 146 of file billcycle.h.

References des_.

const std::string& OSB_LIB::Billcycle::name (  )  const [inline]

Get the name.

Definition at line 144 of file billcycle.h.

References name_.

const Oid& OSB_LIB::Billcycle::oid (  )  const [inline]

Get the object id.

Definition at line 142 of file billcycle.h.

References id_.

virtual int OSB_LIB::Billcycle::readSpecific ( const OSB_DB::Session session  )  [pure 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.

Implemented in OSB_LIB::DateBillcycle, OSB_LIB::IntervalBillcycle, and OSB_LIB::MidMonthBillcycle.

static long OSB_LIB::Billcycle::toLong ( Type  bt  )  [static]

Convert a billcycle type to long.

Parameters:
bt Value to convert.
Returns:
Type corresponding billcycle item type. Its value is btUnknown if `bt' is not supported.

static Type OSB_LIB::Billcycle::type ( long  bt  )  [static]

Convert a long to billcycle type.

Parameters:
bt Billcycle type to convert.
Returns:
The corresponsing long value. Its value is (long)btUnknown if `bt' is not supported.


Friends And Related Function Documentation

friend class OSB_DB::BillcycleGw [friend]

Reimplemented in OSB_LIB::IntervalBillcycle, and OSB_LIB::MidMonthBillcycle.

Definition at line 75 of file billcycle.h.

friend class TheBillcycleFactory [friend]

The billcycle factory must be able to set the object id.

Definition at line 79 of file billcycle.h.


Member Data Documentation

std::string OSB_LIB::Billcycle::des_ [private]

Description of billcycle.

Definition at line 187 of file billcycle.h.

Referenced by des().

Oid OSB_LIB::Billcycle::id_ [private]

Unique id, database link.

Definition at line 185 of file billcycle.h.

Referenced by oid().

std::string OSB_LIB::Billcycle::name_ [private]

Name of billcycle.

Definition at line 186 of file billcycle.h.

Referenced by name().


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