OnixS Thomson Reuters Matching API (MAPI) Market Data Handler for C++  1.6.0.0
Public Member Functions | Static Public Member Functions | List of all members
Date Class Reference

Represents date without time component. More...

Public Member Functions

 Date ()
 Initializes as Jan 1, 0001.
 
 Date (unsigned int year, Month month, unsigned int day)
 Explicit initialization. More...
 
 Date (const Date &other)
 Initializes as copy of other date.
 
unsigned int day () const
 Day component of date. More...
 
bool operator== (const Date &other) const
 Compares with other for equality.
 
bool operator!= (const Date &other) const
 Compares with other for inequality.
 
bool operator< (const Date &other) const
 Checks whether given date is less than other one.
 
bool operator> (const Date &other) const
 Checks whether given date is greater than other one.
 
Dateoperator+= (TimeSpan &span)
 Adds time interval to the date.
 
Dateoperator-= (TimeSpan &span)
 Subtracts time interval from the date.
 
Dateoperator= (const Date &other)
 Re-initializes instance as copy of other one.
 
std::string toString () const
 Serializes date into YYYYMMDD presentation.
 
void toString (std::string &) const
 Serializes date into YYYYMMDD presentation.
 
- Public Member Functions inherited from YearMonth
 YearMonth ()
 Initializes instance as Jan, 0001.
 
 YearMonth (unsigned int year, Month month)
 Initializes instance with given values. More...
 
 YearMonth (const YearMonth &other)
 Initializes as copy of other instance.
 
unsigned int year () const
 Year component. More...
 
Month month () const
 Month component. More...
 
bool operator== (const YearMonth &) const
 Compares with other instance for equality.
 
bool operator!= (const YearMonth &) const
 Compares with other instance for inequality.
 
YearMonthoperator= (const YearMonth &other)
 
std::string toString () const
 Serializes into text (YYYYMM) presentation.
 
void toString (std::string &) const
 Serializes into text (YYYYMM) presentation.
 

Static Public Member Functions

static Date deserialize (unsigned long long)
 De-serializes date from its numeric presentation as it's used by CME Globex. More...
 
- Static Public Member Functions inherited from YearMonth
static YearMonth deserialize (unsigned long long)
 De-serializes instance from its numeric presentation as it's used by CME Globex. More...
 

Additional Inherited Members

- Protected Member Functions inherited from YearMonth
 YearMonth (unsigned int, Month, const NoVerify &)
 Initializes instance without verifying input. More...
 

Detailed Description

Represents date without time component.

Constructor & Destructor Documentation

Date ( unsigned int  year,
Month  month,
unsigned int  day 
)

Explicit initialization.

Exceptions
exceptionif input parameters do not form valid date.

Member Function Documentation

unsigned int day ( ) const
inline

Day component of date.

Valid range of values is [01, 31].

static Date deserialize ( unsigned long  long)
static

De-serializes date from its numeric presentation as it's used by CME Globex.