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

Encapsulates UTCTimeOnly FIX type. More...

#include <B2BITS_UTCTimeOnly.h>

Public Types

typedef System::u32 value_type
 A type that represents internal representation of the date. More...
 

Public Member Functions

int hour () const throw ()
 Returns day hour of value. More...
 
int millisecond () const throw ()
 Returns day millisecond of value. More...
 
int minute () const throw ()
 Returns day minute of value. More...
 
bool operator!= (const UTCTimeOnly &v) const throw ()
 Not equal operator. More...
 
UTCTimeOnly operator- (const UTCTimeOnly &v) const throw ()
 Subtraction operator. More...
 
UTCTimeOnlyoperator-= (const UTCTimeOnly &v) throw ()
 Assignment with subtraction operator. More...
 
bool operator< (const UTCTimeOnly &v) const throw ()
 Less operator. More...
 
bool operator<= (const UTCTimeOnly &v) const throw ()
 Less or equal operator. More...
 
bool operator== (const UTCTimeOnly &v) const throw ()
 Equal operator. More...
 
bool operator> (const UTCTimeOnly &v) const throw ()
 Greater operator. More...
 
bool operator>= (const UTCTimeOnly &v) const throw ()
 Greater or equal operator. More...
 
int second () const throw ()
 Returns day second of value. More...
 
System::u32 toDecimal () const throw ()
 Returns value in decimal format (HHMMSSzzz) More...
 
std::string & toFixString (std::string *dest, bool keepmsec=false) const
 Converts value stored in object to FIX string 'HH:MM:SS.zzz'. More...
 
char * toFixString (char *buf, char *end, bool keepmsec=false) const throw ()
 Converts stored value to FIX string 'HH:MM:SS.zzz'. More...
 
 UTCTimeOnly () throw ()
 Default constructor. More...
 
 UTCTimeOnly (int hour, int minute, int second, int millisecond=0) throw ()
 Constructor. Constructs object from year, month, day, hour, minute, second and millisecond values. More...
 

Static Public Member Functions

static UTCTimeOnly fromDecimal (System::u32 val) throw ()
 Constructs object from decimal date format (HHMMSSzzz). More...
 
static UTCTimeOnly fromDecimalString (AsciiString val) throw ()
 Constructs object from decimal date format (HHMMSSzzz). More...
 
static UTCTimeOnly fromFixString (AsciiString val) throw ()
 Constructs object from FIX string (HH:MM:SS.zzz). More...
 
static UTCTimeOnly fromString (AsciiString val) throw ()
 Constructs object from decimal date format (HHMMSSzzz) or from FIX string (HH:MM:SS.zzz). More...
 
static UTCTimeOnly now () throw ()
 Returns current system time in UTC. More...
 

Static Public Attributes

static const unsigned int DecimalValueSizeNoMilliseconds = sizeof( "HHMMSS" ) - 1
 Maximum buffer size required to store value. More...
 
static const unsigned int DecimalValueSizeWithMilliseconds = sizeof( "HHMMSSsss" ) - 1
 Maximum buffer size required to store value. More...
 
static const unsigned int ValueSize = ValueSizeWithMilliseconds
 Maximum buffer size required to store value. More...
 
static const unsigned int ValueSizeNoMilliseconds = sizeof( "HH:MM:SS" ) - 1
 Maximum buffer size required to store value. More...
 
static const unsigned int ValueSizeWithMilliseconds = sizeof( "HH:MM:SS.sss" ) - 1
 Maximum buffer size required to store value. More...
 

Detailed Description

Encapsulates UTCTimeOnly FIX type.

Member Typedef Documentation

◆ value_type

typedef System::u32 Engine::UTCTimeOnly::value_type

A type that represents internal representation of the date.

Constructor & Destructor Documentation

◆ UTCTimeOnly() [1/2]

Engine::UTCTimeOnly::UTCTimeOnly ( )
throw (
)

Default constructor.

◆ UTCTimeOnly() [2/2]

Engine::UTCTimeOnly::UTCTimeOnly ( int  hour,
int  minute,
int  second,
int  millisecond = 0 
)
throw (
)

Constructor. Constructs object from year, month, day, hour, minute, second and millisecond values.

Member Function Documentation

◆ fromDecimal()

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

Constructs object from decimal date format (HHMMSSzzz).

◆ fromDecimalString()

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

Constructs object from decimal date format (HHMMSSzzz).

◆ fromFixString()

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

Constructs object from FIX string (HH:MM:SS.zzz).

◆ fromString()

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

Constructs object from decimal date format (HHMMSSzzz) or from FIX string (HH:MM:SS.zzz).

◆ hour()

int Engine::UTCTimeOnly::hour ( ) const
throw (
)

Returns day hour of value.

◆ millisecond()

int Engine::UTCTimeOnly::millisecond ( ) const
throw (
)

Returns day millisecond of value.

◆ minute()

int Engine::UTCTimeOnly::minute ( ) const
throw (
)

Returns day minute of value.

◆ now()

static UTCTimeOnly Engine::UTCTimeOnly::now ( )
throw (
)
static

Returns current system time in UTC.

◆ operator!=()

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

Not equal operator.

◆ operator-()

UTCTimeOnly Engine::UTCTimeOnly::operator- ( const UTCTimeOnly v) const
throw (
)

Subtraction operator.

◆ operator-=()

UTCTimeOnly& Engine::UTCTimeOnly::operator-= ( const UTCTimeOnly v)
throw (
)

Assignment with subtraction operator.

◆ operator<()

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

Less operator.

◆ operator<=()

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

Less or equal operator.

◆ operator==()

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

Equal operator.

◆ operator>()

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

Greater operator.

◆ operator>=()

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

Greater or equal operator.

◆ second()

int Engine::UTCTimeOnly::second ( ) const
throw (
)

Returns day second of value.

◆ toDecimal()

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

Returns value in decimal format (HHMMSSzzz)

◆ toFixString() [1/2]

std::string& Engine::UTCTimeOnly::toFixString ( std::string *  dest,
bool  keepmsec = false 
) const

Converts value stored in object to FIX string 'HH:MM:SS.zzz'.

◆ toFixString() [2/2]

char* Engine::UTCTimeOnly::toFixString ( char *  buf,
char *  end,
bool  keepmsec = false 
) const
throw (
)

Converts stored value to FIX string 'HH:MM:SS.zzz'.

Parameters
bufMemory buffer enough to store string like HH:MM:SS.zzz
Returns
pointer to the first character of the result. Last character of result is last character of the 'buf' parameter.

Member Data Documentation

◆ DecimalValueSizeNoMilliseconds

const unsigned int Engine::UTCTimeOnly::DecimalValueSizeNoMilliseconds = sizeof( "HHMMSS" ) - 1
static

Maximum buffer size required to store value.

◆ DecimalValueSizeWithMilliseconds

const unsigned int Engine::UTCTimeOnly::DecimalValueSizeWithMilliseconds = sizeof( "HHMMSSsss" ) - 1
static

Maximum buffer size required to store value.

◆ ValueSize

const unsigned int Engine::UTCTimeOnly::ValueSize = ValueSizeWithMilliseconds
static

Maximum buffer size required to store value.

◆ ValueSizeNoMilliseconds

const unsigned int Engine::UTCTimeOnly::ValueSizeNoMilliseconds = sizeof( "HH:MM:SS" ) - 1
static

Maximum buffer size required to store value.

◆ ValueSizeWithMilliseconds

const unsigned int Engine::UTCTimeOnly::ValueSizeWithMilliseconds = sizeof( "HH:MM:SS.sss" ) - 1
static

Maximum buffer size required to store value.