com::ftlabs::fisa::BusinessDateFactory Class Reference

This class provides methods for getting a business date, with implementations usually taking weekend days and holidays into consideration. More...

#include <BusinessDateFactory.h>

List of all members.

Public Member Functions

 BusinessDateFactory (void)
 Creates a BusinessDateFactory without a default HolidaySchedule.
 BusinessDateFactory (const HolidaySchedule *holidaySchedule)
 Creates a BusinessDateFactory that utilizes the provided HolidaySchedule to determine if a date is a holiday.
 BusinessDateFactory (const BusinessDateFactory &factory)
virtual ~BusinessDateFactory (void)
BusinessDateFactoryoperator= (const BusinessDateFactory &factory)
FISADate getBusinessDate (int offset) const
 Get a business date using today as the start date.
FISADate getBusinessDate (const FISADate &startDate, int offset) const
 Get a business date from the provided start date.
FISADate getBusinessDate (int offset, const HolidaySchedule &holidaySchedule) const
 Get a business date using today as the start date and the provided holiday schedule.
FISADate getBusinessDate (const FISADate &startDate, int offset, const HolidaySchedule &holidaySchedule) const
 Get a business date using the provided start date and the provided holiday schedule.

Private Member Functions

FISADate getBusinessDate (time_t startDate, int offset, const HolidaySchedule *holidaySchedule) const

Private Attributes

const HolidayScheduleholidaySchedule

Static Private Attributes

static const int LOOP_STOP
static const char * LOOP_STOP_ERRORMESSAGE


Detailed Description

This class provides methods for getting a business date, with implementations usually taking weekend days and holidays into consideration.


Constructor & Destructor Documentation

com::ftlabs::fisa::BusinessDateFactory::BusinessDateFactory ( void   ) 

Creates a BusinessDateFactory without a default HolidaySchedule.

com::ftlabs::fisa::BusinessDateFactory::BusinessDateFactory ( const HolidaySchedule holidaySchedule  ) 

Creates a BusinessDateFactory that utilizes the provided HolidaySchedule to determine if a date is a holiday.

Parameters:
holidaySchedule The default HolidaySchedule to use with this BusinessDateFactory.

com::ftlabs::fisa::BusinessDateFactory::BusinessDateFactory ( const BusinessDateFactory factory  ) 

virtual com::ftlabs::fisa::BusinessDateFactory::~BusinessDateFactory ( void   )  [virtual]


Member Function Documentation

BusinessDateFactory& com::ftlabs::fisa::BusinessDateFactory::operator= ( const BusinessDateFactory factory  ) 

FISADate com::ftlabs::fisa::BusinessDateFactory::getBusinessDate ( int  offset  )  const

Get a business date using today as the start date.

If a default HolidaySchedule has been set, then it will be used.

Parameters:
offset The number of business days from today. This can be a positive or negative number.
Returns:
A business date.

FISADate com::ftlabs::fisa::BusinessDateFactory::getBusinessDate ( const FISADate startDate,
int  offset 
) const

Get a business date from the provided start date.

If a default HolidaySchedule has been set, then it will be used.

Parameters:
startDate The start date.
offset The number of business days from startDate. This can be either a positive or negative number.
Returns:
A business date.

FISADate com::ftlabs::fisa::BusinessDateFactory::getBusinessDate ( int  offset,
const HolidaySchedule holidaySchedule 
) const

Get a business date using today as the start date and the provided holiday schedule.

If a default HolidaySchedule has been set, then both the default HolidaySchedule, and the HolidaySchedule provided to this method will be considered.

Parameters:
offset The number of business days from today.
Returns:
A business date.

FISADate com::ftlabs::fisa::BusinessDateFactory::getBusinessDate ( const FISADate startDate,
int  offset,
const HolidaySchedule holidaySchedule 
) const

Get a business date using the provided start date and the provided holiday schedule.

If a default HolidaySchedule has been set, then both the default HolidaySchedule, and the HolidaySchedule provided to this method will be considered.

Parameters:
startDate The start date.
offset The number of business days from today, can be positive or negative.
Returns:
A business date.

FISADate com::ftlabs::fisa::BusinessDateFactory::getBusinessDate ( time_t  startDate,
int  offset,
const HolidaySchedule holidaySchedule 
) const [private]


Member Data Documentation

const int com::ftlabs::fisa::BusinessDateFactory::LOOP_STOP [static, private]

const char* com::ftlabs::fisa::BusinessDateFactory::LOOP_STOP_ERRORMESSAGE [static, private]

const HolidaySchedule* com::ftlabs::fisa::BusinessDateFactory::holidaySchedule [private]


The documentation for this class was generated from the following file:
Generated on Tue Feb 5 03:50:22 2008 for FTLabs FISA (c++) by  doxygen 1.5.2