B2BITS FIX Antenna C++ 2.33.0
Loading...
Searching...
No Matches
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.
 
int month () const throw ()
 Returns month.
 
 MonthYear () throw ()
 Constructor.
 
 MonthYear (int year, int month) throw ()
 Creates object from year and month.
 
 MonthYear (int year, int month, int day) throw ()
 Creates object from year, month and day.
 
 MonthYear (int year, int month, Week week) throw ()
 Creates object from year, month and week.
 
bool operator!= (const MonthYear &v) const throw ()
 Compares two MonthYear.
 
bool operator== (const MonthYear &v) const throw ()
 Compares two MonthYear.
 
System::u32 toDecimal () const throw ()
 Returns value in decimal format (YYYYMMDDW)
 
char * toFixString (char *buf, char *end) const throw ()
 Converts value stored in object to FIX string.
 
std::string & toFixString (std::string *dest) const
 Converts value stored in object to FIX string.
 
System::u32 toYYYYMM () const throw ()
 Returns value in decimal format.
 
System::u32 toYYYYMMDD () const throw ()
 Returns value in decimal format.
 
Week week () const throw ()
 Returns week.
 
int year () const throw ()
 Returns year.
 

Static Public Member Functions

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

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

Encapsulates MonthYear FIX type.

Member Enumeration Documentation

◆ Week

Enumerator
NA 
w1 
w2 
w3 
w4 
w5 

Constructor & Destructor Documentation

◆ MonthYear() [1/4]

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

Constructor.

◆ MonthYear() [2/4]

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

Creates object from year and month.

◆ MonthYear() [3/4]

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

Creates object from year, month and day.

◆ MonthYear() [4/4]

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

Creates object from year, month and week.

Member Function Documentation

◆ day()

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

Returns day.

◆ fromDecimal()

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

Constructs object from decimal date format (YYYYMMDDW).

◆ fromDecimalString()

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

Constructs object from decimal date format (YYYYMMDDW).

◆ fromFixString()

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

Constructs object from FIX string.

◆ fromString()

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

Constructs object from string.

◆ fromYYYYMM()

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

Constructs object from decimal date format (YYYYMM).

◆ fromYYYYMMDD()

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

Constructs object from decimal date format (YYYYMMDD).

◆ month()

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

Returns month.

◆ operator!=()

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

Compares two MonthYear.

◆ operator==()

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

Compares two MonthYear.

◆ toDecimal()

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

Returns value in decimal format (YYYYMMDDW)

◆ toFixString() [1/2]

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

Converts value stored in object to FIX string.

and stores value to dest

◆ toFixString() [2/2]

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

Converts value stored in object to FIX string.

and stores value to dest

◆ toYYYYMM()

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

Returns value in decimal format.

◆ toYYYYMMDD()

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

Returns value in decimal format.

◆ week()

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

Returns week.

◆ year()

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

Returns year.

Member Data Documentation

◆ ValueSize

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

Maximum buffer size required to store value.

◆ ValueSizeNoDay

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

Maximum buffer size required to store value.

◆ ValueSizeWithDay

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

Maximum buffer size required to store value.

◆ ValueSizeWithWeek

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

Maximum buffer size required to store value.