B2BITS FIX Antenna C++  2.27.0
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
Engine::UTCDateOnly Class Reference

Encapsulates UTCDateOnly FIX type. More...

#include <B2BITS_UTCDateOnly.h>

Public Types

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

Public Member Functions

int day () const throw ()
 Returns day part of value. More...
 
int month () const throw ()
 Returns month part of value. More...
 
bool operator!= (const UTCDateOnly &v) const throw ()
 Not equal operator. More...
 
bool operator< (const UTCDateOnly &v) const throw ()
 Less operator. More...
 
bool operator<= (const UTCDateOnly &v) const throw ()
 Less or equal operator. More...
 
bool operator== (const UTCDateOnly &v) const throw ()
 Equal operator. More...
 
bool operator> (const UTCDateOnly &v) const throw ()
 Greater operator. More...
 
bool operator>= (const UTCDateOnly &v) const throw ()
 Greater or equal operator. More...
 
System::u32 toDecimal () const throw ()
 Returns value in decimal format (YYYYMMDD) More...
 
std::string & toFixString (std::string *dest) const
 Converts value stored in object to FIX string 'YYYYMMDD'. More...
 
char * toFixString (char *buf, char *end) const throw ()
 Converts stored value to FIX string 'YYYYMMDD'. More...
 
 UTCDateOnly () throw ()
 Creates zero object. More...
 
 UTCDateOnly (int year, int month, int day) throw ()
 Constructor. More...
 
int year () const throw ()
 Returns year part of value. More...
 

Static Public Member Functions

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

Static Public Attributes

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

Detailed Description

Encapsulates UTCDateOnly FIX type.

Member Typedef Documentation

◆ value_type

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

Represents storage type for date-time value.

Constructor & Destructor Documentation

◆ UTCDateOnly() [1/2]

Engine::UTCDateOnly::UTCDateOnly ( )
throw (
)

Creates zero object.

◆ UTCDateOnly() [2/2]

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

Constructor.

Constructs object from year, month and day values.

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

Member Function Documentation

◆ day()

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

Returns day part of value.

◆ fromDecimal()

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

Constructs object from decimal date format (YYYYMMDD).

◆ fromDecimalString()

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

Constructs object from decimal date format (YYYYMMDD).

◆ fromFixString()

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

Constructs object from FIX string.

◆ fromString()

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

Constructs object from decimal date format (YYYYMMDD).

◆ month()

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

Returns month part of value.

◆ now()

static UTCDateOnly Engine::UTCDateOnly::now ( )
throw (
)
static

Returns UTCTimestamp with current date.

◆ operator!=()

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

Not equal operator.

◆ operator<()

bool Engine::UTCDateOnly::operator< ( const UTCDateOnly v) const
throw (
)
inline

Less operator.

◆ operator<=()

bool Engine::UTCDateOnly::operator<= ( const UTCDateOnly v) const
throw (
)
inline

Less or equal operator.

◆ operator==()

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

Equal operator.

◆ operator>()

bool Engine::UTCDateOnly::operator> ( const UTCDateOnly v) const
throw (
)
inline

Greater operator.

◆ operator>=()

bool Engine::UTCDateOnly::operator>= ( const UTCDateOnly v) const
throw (
)
inline

Greater or equal operator.

◆ toDecimal()

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

Returns value in decimal format (YYYYMMDD)

◆ toFixString() [1/2]

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

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

◆ toFixString() [2/2]

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

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.

◆ year()

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

Returns year part of value.

Member Data Documentation

◆ ValueSize

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

Maximum buffer size required to store value.