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.
◆ value_type
A type that represents internal representation of the date.
◆ UTCTimeOnly() [1/2]
| B2bits::UTCTimeOnly::UTCTimeOnly |
( |
| ) |
|
|
noexcept |
◆ UTCTimeOnly() [2/2]
| 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.
◆ fromDecimal()
Constructs object from decimal date format (HHMMSSzzz).
◆ fromDecimalString()
Constructs object from decimal date format (HHMMSSzzz).
◆ fromFixString()
Constructs object from FIX string (HH:MM:SS.zzz).
◆ fromString()
Constructs object from decimal date format (HHMMSSzzz) or from FIX string (HH:MM:SS.zzz).
◆ hour()
| int B2bits::UTCTimeOnly::hour |
( |
| ) |
const |
|
noexcept |
Returns day hour of value.
◆ millisecond()
| int B2bits::UTCTimeOnly::millisecond |
( |
| ) |
const |
|
noexcept |
Returns day millisecond of value.
◆ minute()
| int B2bits::UTCTimeOnly::minute |
( |
| ) |
const |
|
noexcept |
Returns day minute of value.
◆ now()
Returns current system time in UTC.
◆ operator!=()
| bool B2bits::UTCTimeOnly::operator!= |
( |
const UTCTimeOnly & |
v | ) |
const |
|
inlinenoexcept |
◆ operator-()
◆ operator-=()
Assignment with subtraction operator.
◆ operator<()
| bool B2bits::UTCTimeOnly::operator< |
( |
const UTCTimeOnly & |
v | ) |
const |
|
inlinenoexcept |
◆ operator<=()
| bool B2bits::UTCTimeOnly::operator<= |
( |
const UTCTimeOnly & |
v | ) |
const |
|
inlinenoexcept |
◆ operator==()
| bool B2bits::UTCTimeOnly::operator== |
( |
const UTCTimeOnly & |
v | ) |
const |
|
inlinenoexcept |
◆ operator>()
| bool B2bits::UTCTimeOnly::operator> |
( |
const UTCTimeOnly & |
v | ) |
const |
|
inlinenoexcept |
◆ operator>=()
| bool B2bits::UTCTimeOnly::operator>= |
( |
const UTCTimeOnly & |
v | ) |
const |
|
inlinenoexcept |
Greater or equal operator.
◆ second()
| int B2bits::UTCTimeOnly::second |
( |
| ) |
const |
|
noexcept |
Returns day second of value.
◆ toDecimal()
| u32 B2bits::UTCTimeOnly::toDecimal |
( |
| ) |
const |
|
noexcept |
Returns value in decimal format (HHMMSSzzz)
◆ toFixString() [1/2]
| 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.
◆ toFixString() [2/2]
| std::string& B2bits::UTCTimeOnly::toFixString |
( |
std::string * |
dest, |
|
|
bool |
keepmsec = false |
|
) |
| const |
Converts value stored in object to FIX string 'HH:MM:SS.zzz'.
◆ DecimalValueSizeNoMilliseconds
| const unsigned int B2bits::UTCTimeOnly::DecimalValueSizeNoMilliseconds = sizeof( "HHMMSS" ) - 1 |
|
static |
Maximum buffer size required to store value.
◆ DecimalValueSizeWithMilliseconds
| const unsigned int B2bits::UTCTimeOnly::DecimalValueSizeWithMilliseconds = sizeof( "HHMMSSsss" ) - 1 |
|
static |
Maximum buffer size required to store value.
◆ ValueSize
Maximum buffer size required to store value.
◆ ValueSizeNoMilliseconds
| const unsigned int B2bits::UTCTimeOnly::ValueSizeNoMilliseconds = sizeof( "HH:MM:SS" ) - 1 |
|
static |
Maximum buffer size required to store value.
◆ ValueSizeWithMilliseconds
| const unsigned int B2bits::UTCTimeOnly::ValueSizeWithMilliseconds = sizeof( "HH:MM:SS.sss" ) - 1 |
|
static |
Maximum buffer size required to store value.