Encapsulates UTCTimeOnly FIX type.
More...
#include <b2bits/types/UTCTimeOnly.h>
|
| 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...
|
|
UTCTimeOnly & | operator-= (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...
|
|
Encapsulates UTCTimeOnly FIX type.
A type that represents internal representation of the date.
B2bits::UTCTimeOnly::UTCTimeOnly |
( |
| ) |
|
|
noexcept |
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.
Constructs object from decimal date format (HHMMSSzzz).
Constructs object from decimal date format (HHMMSSzzz).
Constructs object from FIX string (HH:MM:SS.zzz).
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.
Returns current system time in UTC.
bool B2bits::UTCTimeOnly::operator!= |
( |
const UTCTimeOnly & |
v | ) |
const |
|
inlinenoexcept |
Assignment with subtraction operator.
bool B2bits::UTCTimeOnly::operator< |
( |
const UTCTimeOnly & |
v | ) |
const |
|
inlinenoexcept |
bool B2bits::UTCTimeOnly::operator<= |
( |
const UTCTimeOnly & |
v | ) |
const |
|
inlinenoexcept |
bool B2bits::UTCTimeOnly::operator== |
( |
const UTCTimeOnly & |
v | ) |
const |
|
inlinenoexcept |
bool B2bits::UTCTimeOnly::operator> |
( |
const UTCTimeOnly & |
v | ) |
const |
|
inlinenoexcept |
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
-
buf | Memory buffer enough to store string like HH:MM:SS.zzz |
end | Pointer to past-the-end element of memory buffer |
keepmsec | Pass 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.
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.
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.