B2BITS FIX Antenna HFT  1.0.13
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
Engine::MonthYear Class Reference

Encapsulates MonthYear FIX type. More...

#include <B2BITS_MonthYear.h>

Public Types

enum  Week {
  NA, w1, w2, w3,
  w4, w5
}
 

Public Member Functions

int day () const throw ()
 Returns day. More...
 
int month () const throw ()
 Returns month. More...
 
 MonthYear () throw ()
 Constructor. More...
 
 MonthYear (int year, int month) throw ()
 Creates object from year and month. More...
 
 MonthYear (int year, int month, int day) throw ()
 Creates object from year, month and day. More...
 
 MonthYear (int year, int month, Week week) throw ()
 Creates object from year, month and week. More...
 
bool operator!= (const MonthYear &v) const throw ()
 Compares two MonthYear. More...
 
bool operator== (const MonthYear &v) const throw ()
 Compares two MonthYear. More...
 
System::u32 toDecimal () const throw ()
 Returns value in decimal format (YYYYMMDDW) More...
 
std::string & toFixString (std::string *dest) const
 Converts value stored in object to FIX string. More...
 
char * toFixString (char *buf, char *end) const throw ()
 Converts value stored in object to FIX string. More...
 
System::u32 toYYYYMM () const throw ()
 Returns value in decimal format. More...
 
System::u32 toYYYYMMDD () const throw ()
 Returns value in decimal format. More...
 
Week week () const throw ()
 Returns week. More...
 
int year () const throw ()
 Returns year. More...
 

Static Public Member Functions

static MonthYear fromDecimal (System::u32 val) throw ()
 Constructs object from decimal date format (YYYYMMDDW). More...
 
static MonthYear fromDecimalString (AsciiString val) throw ()
 Constructs object from decimal date format (YYYYMMDDW). More...
 
static MonthYear fromFixString (AsciiString val) throw ()
 Constructs object from FIX string. More...
 
static MonthYear fromString (AsciiString val) throw ()
 Constructs object from string. More...
 
static MonthYear fromYYYYMM (System::u32 val) throw ()
 Constructs object from decimal date format (YYYYMM). More...
 
static MonthYear fromYYYYMMDD (System::u32 val) throw ()
 Constructs object from decimal date format (YYYYMMDD). More...
 

Static Public Attributes

static const unsigned int ValueSize = ValueSizeWithWeek
 Maximum buffer size required to store value. More...
 
static const unsigned int ValueSizeNoDay = sizeof( "YYYYMM" ) - 1
 Maximum buffer size required to store value. More...
 
static const unsigned int ValueSizeWithDay = sizeof( "YYYYMMDD" ) - 1
 Maximum buffer size required to store value. More...
 
static const unsigned int ValueSizeWithWeek = sizeof( "YYYYMMwD" ) - 1
 Maximum buffer size required to store value. More...
 

Detailed Description

Encapsulates MonthYear FIX type.

Member Enumeration Documentation

Enumerator
NA 
w1 
w2 
w3 
w4 
w5 

Constructor & Destructor Documentation

Engine::MonthYear::MonthYear ( )
throw (
)

Constructor.

Engine::MonthYear::MonthYear ( int  year,
int  month 
)
throw (
)

Creates object from year and month.

Engine::MonthYear::MonthYear ( int  year,
int  month,
int  day 
)
throw (
)

Creates object from year, month and day.

Engine::MonthYear::MonthYear ( int  year,
int  month,
Week  week 
)
throw (
)

Creates object from year, month and week.

Member Function Documentation

int Engine::MonthYear::day ( ) const
throw (
)

Returns day.

static MonthYear Engine::MonthYear::fromDecimal ( System::u32  val)
throw (
)
static

Constructs object from decimal date format (YYYYMMDDW).

static MonthYear Engine::MonthYear::fromDecimalString ( AsciiString  val)
throw (
)
static

Constructs object from decimal date format (YYYYMMDDW).

static MonthYear Engine::MonthYear::fromFixString ( AsciiString  val)
throw (
)
static

Constructs object from FIX string.

Referenced by Parser::LiteFixMessage::getAsMonthYear().

static MonthYear Engine::MonthYear::fromString ( AsciiString  val)
throw (
)
static

Constructs object from string.

static MonthYear Engine::MonthYear::fromYYYYMM ( System::u32  val)
throw (
)
static

Constructs object from decimal date format (YYYYMM).

static MonthYear Engine::MonthYear::fromYYYYMMDD ( System::u32  val)
throw (
)
static

Constructs object from decimal date format (YYYYMMDD).

int Engine::MonthYear::month ( ) const
throw (
)

Returns month.

bool Engine::MonthYear::operator!= ( const MonthYear v) const
throw (
)
inline

Compares two MonthYear.

bool Engine::MonthYear::operator== ( const MonthYear v) const
throw (
)
inline

Compares two MonthYear.

System::u32 Engine::MonthYear::toDecimal ( ) const
throw (
)

Returns value in decimal format (YYYYMMDDW)

std::string& Engine::MonthYear::toFixString ( std::string *  dest) const

Converts value stored in object to FIX string.

and stores value to dest

char* Engine::MonthYear::toFixString ( char *  buf,
char *  end 
) const
throw (
)

Converts value stored in object to FIX string.

and stores value to dest

System::u32 Engine::MonthYear::toYYYYMM ( ) const
throw (
)

Returns value in decimal format.

System::u32 Engine::MonthYear::toYYYYMMDD ( ) const
throw (
)

Returns value in decimal format.

Week Engine::MonthYear::week ( ) const
throw (
)

Returns week.

int Engine::MonthYear::year ( ) const
throw (
)

Returns year.

Member Data Documentation

const unsigned int Engine::MonthYear::ValueSize = ValueSizeWithWeek
static

Maximum buffer size required to store value.

Referenced by Parser::LiteFixMessage::set().

const unsigned int Engine::MonthYear::ValueSizeNoDay = sizeof( "YYYYMM" ) - 1
static

Maximum buffer size required to store value.

const unsigned int Engine::MonthYear::ValueSizeWithDay = sizeof( "YYYYMMDD" ) - 1
static

Maximum buffer size required to store value.

const unsigned int Engine::MonthYear::ValueSizeWithWeek = sizeof( "YYYYMMwD" ) - 1
static

Maximum buffer size required to store value.