B2BITS FIX Antenna HFT
1.0.16
|
Encapsulates UTCTimestamp FIX type. More...
#include <B2BITS_UTCTimestamp.h>
Public Types | |
typedef System::u64 | value_type |
A type that represents internal representation of the date. More... | |
Public Member Functions | |
int | day () const throw () |
Returns day part of value. More... | |
UTCTimestamp | getWithoutMilliseconds () const throw () |
Erases milliseconds. More... | |
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... | |
int | month () const throw () |
Returns month part of value. More... | |
bool | operator!= (const UTCTimestamp &v) const throw () |
Compare operators. More... | |
bool | operator< (const UTCTimestamp &v) const throw () |
Compare operators. More... | |
bool | operator<= (const UTCTimestamp &v) const throw () |
Compare operators. More... | |
bool | operator== (const UTCTimestamp &v) const throw () |
Compare operators. More... | |
bool | operator> (const UTCTimestamp &v) const throw () |
Compare operators. More... | |
bool | operator>= (const UTCTimestamp &v) const throw () |
Compare operators. More... | |
int | second () const throw () |
Returns day second of value. More... | |
System::u64 | toDecimal () const throw () |
Returns value in decimal format (YYYYMMDDHHMMSSzzz) More... | |
std::string & | toFixString (std::string *dest, bool keepmsec=false) const |
Converts value stored in object to FIX string 'YYYYMMDD-HH:MM:SS.zzz'. More... | |
char * | toFixString (char *buf, char *end, bool keepmsec=false) const throw () |
Converts stored value to FIX string 'YYYYMMDD-HH:MM:SS.zzz'. More... | |
UTCTimestamp () throw () | |
Default constructor. More... | |
UTCTimestamp (int year, int month, int day, int hour, int minute, int second, int millisecond=0) throw () | |
Constructor. Constructs object from year, month, day, hour, minute, second and millisecond values. More... | |
int | year () const throw () |
Returns year part of value. More... | |
Static Public Member Functions | |
static UTCTimestamp | fromDecimal (System::u64 val) throw () |
Constructs object from decimal date format (YYYYMMDDHHMMSSzzz). More... | |
static UTCTimestamp | fromDecimalString (AsciiString val) throw () |
Constructs object from decimal date format (YYYYMMDDHHMMSSzzz). More... | |
static UTCTimestamp | fromFixString (AsciiString val) throw () |
Constructs object from FIX string (YYYYMMDD-HH:MM:SS.zzz). More... | |
static UTCTimestamp | fromString (AsciiString val) throw () |
Constructs object from decimal date format (YYYYMMDDHHMMSSzzz) or FIX string (YYYYMMDD-HH:MM:SS.zzz). More... | |
static UTCTimestamp | fromTimeT (time_t t, int millis=0) throw () |
Constructs object using time_t value. More... | |
static UTCTimestamp | fromUnixTimeInMillis (System::u64 val) throw () |
Constructs object using the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. More... | |
static UTCTimestamp | now (bool withMilliseconds=false) throw () |
Returns UTCTimestamp with current time. More... | |
Static Public Attributes | |
static const unsigned int | DecimalValueSizeNoMilliseconds = sizeof( "YYYYMMDDHHMMSS" ) - 1 |
Maximum buffer size required to store value. More... | |
static const unsigned int | DecimalValueSizeWithMilliseconds = sizeof( "YYYYMMDDHHMMSSsss" ) - 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( "YYYYMMDD-HH:MM:SS" ) - 1 |
Maximum buffer size required to store value. More... | |
static const unsigned int | ValueSizeWithMilliseconds = sizeof( "YYYYMMDD-HH:MM:SS.sss" ) - 1 |
Maximum buffer size required to store value. More... | |
Encapsulates UTCTimestamp FIX type.
A type that represents internal representation of the date.
Engine::UTCTimestamp::UTCTimestamp | ( | ) | ||
throw | ( | |||
) |
Default constructor.
Referenced by getWithoutMilliseconds().
Engine::UTCTimestamp::UTCTimestamp | ( | int | year, |
int | month, | ||
int | day, | ||
int | hour, | ||
int | minute, | ||
int | second, | ||
int | millisecond = 0 |
||
) | |||
throw | ( | ||
) |
Constructor. Constructs object from year, month, day, hour, minute, second and millisecond values.
int Engine::UTCTimestamp::day | ( | ) | const | |
throw | ( | |||
) |
Returns day part of value.
Referenced by getTmUtc().
|
static |
Constructs object from decimal date format (YYYYMMDDHHMMSSzzz).
|
static |
Constructs object from decimal date format (YYYYMMDDHHMMSSzzz).
|
static |
Constructs object from FIX string (YYYYMMDD-HH:MM:SS.zzz).
Referenced by Parser::LiteFixMessage::getAsTimestamp(), Parser::LiteFixMessage::getAsTimestampi(), and CmiProductCatalog::loadFromFile().
|
static |
Constructs object from decimal date format (YYYYMMDDHHMMSSzzz) or FIX string (YYYYMMDD-HH:MM:SS.zzz).
|
static |
Constructs object using time_t value.
In case of error (if passed value is too large) function returns zero UTCTimestamp (00000000-00:00:00.000)
Referenced by CmiProductCatalog::saveToFile().
|
static |
Constructs object using the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.
In case of error (if passed value is too large) function returns zero UTCTimestamp (00000000-00:00:00.000)
Referenced by ILink3V5::binToFix(), ILink3V7::binToFix(), ILink3::binToFix(), and fix_algo::mapTransactTimeToFix().
|
inline |
Erases milliseconds.
References UTCTimestamp().
int Engine::UTCTimestamp::hour | ( | ) | const | |
throw | ( | |||
) |
Returns day hour of value.
Referenced by getTmUtc(), and toMillisSinceMidnight().
int Engine::UTCTimestamp::millisecond | ( | ) | const | |
throw | ( | |||
) |
Returns day millisecond of value.
Referenced by fix_algo::mapTransactTimeToCmi(), and toMillisSinceMidnight().
int Engine::UTCTimestamp::minute | ( | ) | const | |
throw | ( | |||
) |
Returns day minute of value.
Referenced by getTmUtc(), and toMillisSinceMidnight().
int Engine::UTCTimestamp::month | ( | ) | const | |
throw | ( | |||
) |
Returns month part of value.
Referenced by getTmUtc().
|
static |
Returns UTCTimestamp with current time.
withMIlliseconds | Pass to to obtain time with milliseconds; false otherwise. |
Referenced by fix_algo::fill_reject_8(), fix_algo::fill_reply_8_complex(), fix_algo::fill_reply_8_cross(), fix_algo::fill_reply_8_order_list(), and fix_algo::fill_ucxl_8().
|
inline |
Compare operators.
|
inline |
Compare operators.
|
inline |
Compare operators.
|
inline |
Compare operators.
|
inline |
Compare operators.
|
inline |
Compare operators.
int Engine::UTCTimestamp::second | ( | ) | const | |
throw | ( | |||
) |
Returns day second of value.
Referenced by getTmUtc(), and toMillisSinceMidnight().
System::u64 Engine::UTCTimestamp::toDecimal | ( | ) | const | |
throw | ( | |||
) |
Returns value in decimal format (YYYYMMDDHHMMSSzzz)
std::string& Engine::UTCTimestamp::toFixString | ( | std::string * | dest, |
bool | keepmsec = false |
||
) | const |
Converts value stored in object to FIX string 'YYYYMMDD-HH:MM:SS.zzz'.
Referenced by CmiProductCatalog::saveToFile().
char* Engine::UTCTimestamp::toFixString | ( | char * | buf, |
char * | end, | ||
bool | keepmsec = false |
||
) | const | ||
throw | ( | ||
) |
Converts stored value to FIX string 'YYYYMMDD-HH:MM:SS.zzz'.
buf | Memory buffer enough to store string like YYYYMMDD-HH:MM:SS.zzz |
int Engine::UTCTimestamp::year | ( | ) | const | |
throw | ( | |||
) |
Returns year part of value.
Referenced by getTmUtc().
|
static |
Maximum buffer size required to store value.
|
static |
Maximum buffer size required to store value.
|
static |
Maximum buffer size required to store value.
|
static |
Maximum buffer size required to store value.
|
static |
Maximum buffer size required to store value.
Referenced by Parser::LiteFixMessage::set(), and Parser::LiteFixMessage::seti().