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

Engine::UTCDateOnly Class Reference

Incapsulates UTCDateOnly FIX type. More...

#include <B2BITS_UTCDateOnly.h>

List of all members.

Public Types

typedef System::u32 value_type
 Represents storage type for date-time value.

Public Member Functions

int day () const
 Returns day part of value.
int month () const
 Returns month part of value.
bool operator!= (const UTCDateOnly &v) const
 Compare operators.
bool operator== (const UTCDateOnly &v) const
 Compare operators.
System::u32 toDecimal () const
 Returns value in decimal format (YYYYMMDD)
std::string & toFixString (std::string *dest) const
 Converts value stored in object to FIX string 'YYYYMMDD'.
char * toFixString (char *buf, char *end) const
 Converts stored value to FIX string 'YYYYMMDD'.
 UTCDateOnly ()
 Creates zero object.
 UTCDateOnly (int year, int month, int day)
 Constructor.
int year () const
 Returns year part of value.

Static Public Member Functions

static UTCDateOnly fromDecimal (System::u32 val)
 Constructs object from decimal date format (YYYYMMDD).
static UTCDateOnly fromFixString (AsciiString val)
 Constructs object from FIX string.
static UTCDateOnly now ()
 Returns UTCTimestamp with current date.

Static Public Attributes

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

Detailed Description

Incapsulates UTCDateOnly FIX type.

Definition at line 61 of file B2BITS_UTCDateOnly.h.


Member Typedef Documentation

typedef System::u32 Engine::UTCDateOnly::value_type

Represents storage type for date-time value.

Definition at line 65 of file B2BITS_UTCDateOnly.h.


Constructor & Destructor Documentation

Engine::UTCDateOnly::UTCDateOnly (  )

Creates zero object.

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

Constructor.

Constructs object from year, month and day values.

Parameters:
yearYear
monthMonth in range [1, 12]
dayDay in range [1, 31]

Member Function Documentation

int Engine::UTCDateOnly::day (  ) const

Returns day part of value.

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

Constructs object from decimal date format (YYYYMMDD).

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

Constructs object from FIX string.

int Engine::UTCDateOnly::month (  ) const

Returns month part of value.

static UTCDateOnly Engine::UTCDateOnly::now (  ) [static]

Returns UTCTimestamp with current date.

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

Compare operators.

Definition at line 127 of file B2BITS_UTCDateOnly.h.

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

Compare operators.

Definition at line 123 of file B2BITS_UTCDateOnly.h.

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

Returns value in decimal format (YYYYMMDD)

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

Converts value stored in object to FIX string 'YYYYMMDD'.

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

Converts stored value to FIX string 'YYYYMMDD'.

Parameters:
bufMemory buffer enough to store string like YYYYMMDD
Returns:
pointer to the first character of the result. Last character of result is last character of the 'buf' parameter.
int Engine::UTCDateOnly::year (  ) const

Returns year part of value.


Member Data Documentation

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

Maximum buffer size required to store value.

Definition at line 68 of file B2BITS_UTCDateOnly.h.