Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes

Engine::MonthYear Class Reference

Incapsulates MonthYear FIX type. More...

#include <B2BITS_MonthYear.h>

List of all members.

Public Types

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

Public Member Functions

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

Static Public Member Functions

static MonthYear fromDecimal (System::u32 val)
 Constructs object from decimal date format (YYYYMMDDW).
static MonthYear fromFixString (AsciiString val)
 Constructs object from FIX string.

Static Public Attributes

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

Detailed Description

Incapsulates MonthYear FIX type.

Definition at line 61 of file B2BITS_MonthYear.h.


Member Enumeration Documentation

Enumerator:
NA 
w1 
w2 
w3 
w4 
w5 

Definition at line 75 of file B2BITS_MonthYear.h.


Constructor & Destructor Documentation

Engine::MonthYear::MonthYear (  )

Constructor.

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

Creates object from year and month.

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

Creates object from year, month and day.

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

Creates object from year, month and week.


Member Function Documentation

int Engine::MonthYear::day (  ) const

Returns day.

static MonthYear Engine::MonthYear::fromDecimal ( System::u32  val ) [static]

Constructs object from decimal date format (YYYYMMDDW).

static MonthYear Engine::MonthYear::fromFixString ( AsciiString  val ) [static]

Constructs object from FIX string.

int Engine::MonthYear::month (  ) const

Returns month.

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

Compares two MonthYear.

Definition at line 139 of file B2BITS_MonthYear.h.

bool Engine::MonthYear::operator== ( const MonthYear v ) const [inline]

Compares two MonthYear.

Definition at line 135 of file B2BITS_MonthYear.h.

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

Returns value in decimal format (YYYYMMDDW)

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

Converts value stored in object to FIX string.

and stores value to dest

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

Converts value stored in object to FIX string.

and stores value to dest

Week Engine::MonthYear::week (  ) const

Returns week.

int Engine::MonthYear::year (  ) const

Returns year.


Member Data Documentation

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

Maximum buffer size required to store value.

Definition at line 73 of file B2BITS_MonthYear.h.

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

Maximum buffer size required to store value.

Definition at line 70 of file B2BITS_MonthYear.h.

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

Maximum buffer size required to store value.

Definition at line 67 of file B2BITS_MonthYear.h.

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

Maximum buffer size required to store value.

Definition at line 64 of file B2BITS_MonthYear.h.