![]() |
B2BITS FIX Antenna C++
2.31.0
|
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... | |
int | dayOfWeek () const throw () |
Returns day of the week. 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.
typedef System::u64 Engine::UTCTimestamp::value_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.
int Engine::UTCTimestamp::dayOfWeek | ( | ) | const | |
throw | ( | |||
) |
Returns day of the week.
0 means Sunday, 1 - Monday, 2 - Tuesday, ... 5 - Friday
|
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).
|
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)
|
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)
|
inline |
Erases milliseconds.
References UTCTimestamp().
int Engine::UTCTimestamp::hour | ( | ) | const | |
throw | ( | |||
) |
Returns day hour of value.
int Engine::UTCTimestamp::millisecond | ( | ) | const | |
throw | ( | |||
) |
Returns day millisecond of value.
int Engine::UTCTimestamp::minute | ( | ) | const | |
throw | ( | |||
) |
Returns day minute of value.
int Engine::UTCTimestamp::month | ( | ) | const | |
throw | ( | |||
) |
Returns month part of value.
|
static |
Returns UTCTimestamp with current time.
withMIlliseconds | Pass to to obtain time with milliseconds; false otherwise. |
|
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.
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'.
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.
|
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 Engine::PreparedMessage::set().
|
static |
Maximum buffer size required to store value.
Referenced by Engine::PreparedMessage::set().