Contains functions to carry out billcycle operations.
Definition at line 74 of file billcycle.h.
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 |
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.
Definition at line 103 of file billcycle.h.
virtual OSB_LIB::Billcycle::~Billcycle | ( | ) | [inline, 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.
from | Start date of the billing period. |
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] |
const std::string& OSB_LIB::Billcycle::name | ( | ) | const [inline] |
const Oid& OSB_LIB::Billcycle::oid | ( | ) | const [inline] |
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.
session | Database session to use. |
Implemented in OSB_LIB::DateBillcycle, OSB_LIB::IntervalBillcycle, and OSB_LIB::MidMonthBillcycle.
Convert a billcycle type to long.
bt | Value to convert. |
Convert a long to billcycle type.
bt | Billcycle type to convert. |
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] |
std::string OSB_LIB::Billcycle::des_ [private] |
Oid OSB_LIB::Billcycle::id_ [private] |
std::string OSB_LIB::Billcycle::name_ [private] |