EPAM B2BITS C++ Bovespa MarketData handler  1.28.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
B2bits::UTCTimeOnly Class Reference

Encapsulates UTCTimeOnly FIX type. More...

#include <b2bits/types/UTCTimeOnly.h>

Public Types

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

Public Member Functions

 UTCTimeOnly () noexcept
 Default constructor. More...
 
 UTCTimeOnly (int hour, int minute, int second, int millisecond=0) noexcept
 Constructor. Constructs object from year, month, day, hour, minute, second and millisecond values. More...
 
bool operator== (const UTCTimeOnly &v) const noexcept
 Equal operator. More...
 
bool operator!= (const UTCTimeOnly &v) const noexcept
 Not equal operator. More...
 
bool operator> (const UTCTimeOnly &v) const noexcept
 Greater operator. More...
 
bool operator>= (const UTCTimeOnly &v) const noexcept
 Greater or equal operator. More...
 
bool operator< (const UTCTimeOnly &v) const noexcept
 Less operator. More...
 
bool operator<= (const UTCTimeOnly &v) const noexcept
 Less or equal operator. More...
 
UTCTimeOnlyoperator-= (const UTCTimeOnly &v) noexcept
 Assignment with subtraction operator. More...
 
UTCTimeOnly operator- (const UTCTimeOnly &v) const noexcept
 Subtraction operator. More...
 
int hour () const noexcept
 Returns day hour of value. More...
 
int minute () const noexcept
 Returns day minute of value. More...
 
int second () const noexcept
 Returns day second of value. More...
 
int millisecond () const noexcept
 Returns day millisecond of value. 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 noexcept
 
u32 toDecimal () const noexcept
 Returns value in decimal format (HHMMSSzzz) More...
 

Static Public Member Functions

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

Static Public Attributes

static const unsigned int ValueSizeWithMilliseconds = sizeof( "HH:MM:SS.sss" ) - 1
 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 DecimalValueSizeWithMilliseconds = sizeof( "HHMMSSsss" ) - 1
 Maximum buffer size required to store value. More...
 
static const unsigned int DecimalValueSizeNoMilliseconds = sizeof( "HHMMSS" ) - 1
 Maximum buffer size required to store value. More...
 
static const unsigned int ValueSize = ValueSizeWithMilliseconds
 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

B2bits::UTCTimeOnly::UTCTimeOnly ( )
noexcept

Default constructor.

B2bits::UTCTimeOnly::UTCTimeOnly ( int  hour,
int  minute,
int  second,
int  millisecond = 0 
)
noexcept

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

Member Function Documentation

static UTCTimeOnly B2bits::UTCTimeOnly::fromDecimal ( u32  val)
staticnoexcept

Constructs object from decimal date format (HHMMSSzzz).

static UTCTimeOnly B2bits::UTCTimeOnly::fromDecimalString ( AsciiString  val)
staticnoexcept

Constructs object from decimal date format (HHMMSSzzz).

static UTCTimeOnly B2bits::UTCTimeOnly::fromFixString ( AsciiString  val)
staticnoexcept

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

static UTCTimeOnly B2bits::UTCTimeOnly::fromString ( AsciiString  val)
staticnoexcept

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

int B2bits::UTCTimeOnly::hour ( ) const
noexcept

Returns day hour of value.

int B2bits::UTCTimeOnly::millisecond ( ) const
noexcept

Returns day millisecond of value.

int B2bits::UTCTimeOnly::minute ( ) const
noexcept

Returns day minute of value.

static UTCTimeOnly B2bits::UTCTimeOnly::now ( )
staticnoexcept

Returns current system time in UTC.

bool B2bits::UTCTimeOnly::operator!= ( const UTCTimeOnly v) const
inlinenoexcept

Not equal operator.

UTCTimeOnly B2bits::UTCTimeOnly::operator- ( const UTCTimeOnly v) const
noexcept

Subtraction operator.

UTCTimeOnly& B2bits::UTCTimeOnly::operator-= ( const UTCTimeOnly v)
noexcept

Assignment with subtraction operator.

bool B2bits::UTCTimeOnly::operator< ( const UTCTimeOnly v) const
inlinenoexcept

Less operator.

bool B2bits::UTCTimeOnly::operator<= ( const UTCTimeOnly v) const
inlinenoexcept

Less or equal operator.

bool B2bits::UTCTimeOnly::operator== ( const UTCTimeOnly v) const
inlinenoexcept

Equal operator.

bool B2bits::UTCTimeOnly::operator> ( const UTCTimeOnly v) const
inlinenoexcept

Greater operator.

bool B2bits::UTCTimeOnly::operator>= ( const UTCTimeOnly v) const
inlinenoexcept

Greater or equal operator.

int B2bits::UTCTimeOnly::second ( ) const
noexcept

Returns day second of value.

u32 B2bits::UTCTimeOnly::toDecimal ( ) const
noexcept

Returns value in decimal format (HHMMSSzzz)

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

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

char* B2bits::UTCTimeOnly::toFixString ( char *  buf,
char *  end,
bool  keepmsec = false 
) const
noexcept

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

Parameters
bufMemory buffer enough to store string like HH:MM:SS.zzz
endPointer to past-the-end element of memory buffer
keepmsecPass true to convert time with milliseconds
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 B2bits::UTCTimeOnly::DecimalValueSizeNoMilliseconds = sizeof( "HHMMSS" ) - 1
static

Maximum buffer size required to store value.

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

Maximum buffer size required to store value.

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

Maximum buffer size required to store value.

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

Maximum buffer size required to store value.

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

Maximum buffer size required to store value.