B2BITS FIX Antenna HFT  1.0.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 ()
 Compare operators. More...
 
UTCTimeOnly operator- (const UTCTimeOnly &v) const throw ()
 
UTCTimeOnlyoperator-= (const UTCTimeOnly &v) throw ()
 
bool operator< (const UTCTimeOnly &v) const throw ()
 
bool operator<= (const UTCTimeOnly &v) const throw ()
 
bool operator== (const UTCTimeOnly &v) const throw ()
 Compare operators. More...
 
bool operator> (const UTCTimeOnly &v) const throw ()
 
bool operator>= (const UTCTimeOnly &v) const throw ()
 
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

A type that represents internal representation of the date.

Constructor & Destructor Documentation

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

Default constructor.

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

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

Constructs object from decimal date format (HHMMSSzzz).

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

Constructs object from decimal date format (HHMMSSzzz).

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

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

Referenced by Parser::LiteFixMessage::getAsTimeOnly().

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

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

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

Returns day hour of value.

Referenced by localToUTC(), shiftTimeBack(), and shiftTimeFwd().

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

Returns day millisecond of value.

Referenced by localToUTC(), shiftTimeBack(), and shiftTimeFwd().

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

Returns day minute of value.

Referenced by localToUTC(), shiftTimeBack(), and shiftTimeFwd().

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

Returns current system time in UTC.

Referenced by PeriodTimer::init(), PeriodTimer::isNowWithinPeriod(), and isNowWithinTimePeriod().

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

Compare operators.

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

Compare operators.

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

Returns day second of value.

Referenced by localToUTC(), shiftTimeBack(), and shiftTimeFwd().

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

Returns value in decimal format (HHMMSSzzz)

Referenced by isWithinTimePeriod().

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

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

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

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

Maximum buffer size required to store value.

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

Maximum buffer size required to store value.

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

Maximum buffer size required to store value.

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

Maximum buffer size required to store value.

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

Maximum buffer size required to store value.