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::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.
 

Public Member Functions

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

Static Public Member Functions

static UTCDateOnly fromDecimal (System::u32 val) throw ()
 Constructs object from decimal date format (YYYYMMDD).
 
static UTCDateOnly fromDecimalString (AsciiString val) throw ()
 Constructs object from decimal date format (YYYYMMDD).
 
static UTCDateOnly fromFixString (AsciiString val) throw ()
 Constructs object from FIX string.
 
static UTCDateOnly fromString (AsciiString val) throw ()
 Constructs object from decimal date format (YYYYMMDD).
 
static UTCDateOnly now () throw ()
 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

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]

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.

◆ toFixString() [2/2]

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

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

◆ 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.