B2BITS FIX Antenna C++ 2.32.0
Loading...
Searching...
No Matches
Classes | Enumerations | Functions | Variables
Engine::TZTimeHelper Namespace Reference

Classes

struct  TZTimeOnly
 Data about time with UTC offset. More...
 
struct  TZTimestamp
 Data about date and time with UTC offset. More...
 
struct  UTCDateOnly
 Data about date. More...
 
struct  UTCTimeOnly
 Time without UTC offset. More...
 
struct  UTCTimestamp
 Data about date and time without UTC offset. More...
 

Enumerations

enum  TimeFlags {
  Seconds = 0x01 , Milliseconds = 0x02 | Seconds , Microseconds = 0x04 | Milliseconds , Nanoseconds = 0x08 | Microseconds ,
  Picoseconds = 0x10 | Nanoseconds , TrimTrailingZeros = 0x80 , MillisecondsAndTrim = Milliseconds | TrimTrailingZeros , MicrosecondsAndTrim = Microseconds | TrimTrailingZeros ,
  NanosecondsAndTrim = Nanoseconds | TrimTrailingZeros , PicosecondsAndTrim = Picoseconds | TrimTrailingZeros
}
 Time flags for converts to string. More...
 

Functions

TZTimeOnly V12_API getAsTZTimeOnly (const FIXGroup *grp, int tag, int index)
 Returns field value as TZTimeOnly.
 
TZTimeOnly V12_API getAsTZTimeOnly (const FIXMessage *msg, int tag)
 Returns field value as TZTimeOnly.
 
TZTimestamp V12_API getAsTZTimestamp (const FIXGroup *grp, int tag, int index)
 Returns field value as TZTimestamp.
 
TZTimestamp V12_API getAsTZTimestamp (const FIXMessage *msg, int tag)
 Returns field value as TZTimestamp.
 
UTCDateOnly V12_API getAsUTCDateOnly (const FIXGroup *grp, int tag, int index)
 Returns field value as UTCDateOnly.
 
UTCDateOnly V12_API getAsUTCDateOnly (const FIXMessage *msg, int tag)
 Returns field value as UTCDateOnly.
 
UTCTimeOnly V12_API getAsUTCTimeOnly (const FIXGroup *grp, int tag, int index)
 Returns field value as UTCTimeOnly.
 
UTCTimeOnly V12_API getAsUTCTimeOnly (const FIXMessage *msg, int tag)
 Returns field value as UTCTimeOnly.
 
UTCTimestamp V12_API getAsUTCTimestamp (const FIXGroup *grp, int tag, int index)
 Returns field value as UTCTimestamp.
 
UTCTimestamp V12_API getAsUTCTimestamp (const FIXMessage *msg, int tag)
 Returns field value as UTCTimestamp.
 
UTCDateOnly V12_API nowTZDateOnly ()
 Get current date with local time zone.
 
void V12_API nowTZDateOnly (UTCDateOnly &date)
 Fills current date in UTCDateOnly in local time zone.
 
TZTimeOnly V12_API nowTZTimeOnly ()
 Get current time in local time zone.
 
void V12_API nowTZTimeOnly (TZTimeOnly &time)
 Fills current time in TZTimeOnly.
 
TZTimestamp V12_API nowTZTimestamp ()
 Get current time and date in local time zone.
 
void V12_API nowTZTimestamp (TZTimestamp &timestamp)
 Fills current date and time in TZTimestamp.
 
UTCDateOnly V12_API nowUTCDateOnly ()
 Get current date in UTC.
 
void V12_API nowUTCDateOnly (UTCDateOnly &date)
 Fills current date in UTCDateOnly in UTC.
 
UTCTimeOnly V12_API nowUTCTimeOnly ()
 Get current time in UTC.
 
void V12_API nowUTCTimeOnly (UTCTimeOnly &time)
 Fills current time in UTCTimeOnly.
 
UTCTimestamp V12_API nowUTCTimestamp ()
 Get current date and time in UTC.
 
void V12_API nowUTCTimestamp (UTCTimestamp &timestamp)
 Fills current date and time in TZTimestamp.
 
bool V12_API parseDateOnly (const char *data, size_t lenght, UTCDateOnly &date)
 Parses string UTCDateOnly - "YYYYMMDD" to UTCDateOnly structure.
 
bool V12_API parseTimeOnly (const char *data, size_t lenght, TZTimeOnly &time)
 Parses string UTCTimeOnly( "HH:MM:SS[.sss]" ) or TZTimeOnly( "HH:MM[:SS][.sss][Z | [ + | - hh[:mm]]]" ) to TZTimeOnly structure.
 
bool V12_API parseTimestamp (const char *data, size_t lenght, TZTimestamp &timestamp)
 Parses string UTCTimestamp( "YYYYMMDD-HH:MM:SS[.sss]" ) or TZTimestamp( "YYYYMMDD-HH:MM:SS[.sss][Z | [ + | - hh[:mm]]]" ) to TZTimestamp structure.
 
bool V12_API parseUTCTimeOnly (const char *data, size_t lenght, UTCTimeOnly &time)
 Parses string UTCTimeOnly - "HH:MM:SS[.sss]" to UTCTimeOnly structure.
 
bool V12_API parseUTCTimestamp (const char *data, size_t lenght, UTCTimestamp &timestamp)
 Parses string UTCTimestamp - "YYYYMMDD-HH:MM:SS[.sss]" to UTCTimestamp structure.
 
bool setTagDateOnly (FIXGroup *grp, int tag, int index, const UTCDateOnly &timestamp)
 Updates field value by tag number.
 
bool setTagDateOnly (FIXMessage *msg, int tag, const UTCDateOnly &timestamp)
 Updates field value by tag number.
 
bool setTagTZTimeOnly (FIXGroup *grp, int tag, int index, const TZTimeOnly &timestamp, TimeFlags flags=Milliseconds)
 Updates field value by tag number.
 
bool setTagTZTimeOnly (FIXMessage *msg, int tag, const TZTimeOnly &timestamp, TimeFlags flags=Milliseconds)
 Updates field value by tag number.
 
bool setTagTZTimestamp (FIXGroup *grp, int tag, int index, const TZTimestamp &timestamp, TimeFlags flags=Milliseconds)
 Updates field value by tag number.
 
bool setTagTZTimestamp (FIXMessage *msg, int tag, const TZTimestamp &timestamp, TimeFlags flags=Milliseconds)
 Updates field value by tag number.
 
bool setTagUTCTimeOnly (FIXGroup *grp, int tag, int index, const UTCTimeOnly &timestamp, TimeFlags flags=Milliseconds)
 Updates field value by tag number.
 
bool setTagUTCTimeOnly (FIXMessage *msg, int tag, const UTCTimeOnly &timestamp, TimeFlags flags=Milliseconds)
 Updates field value by tag number.
 
bool setTagUTCTimestamp (FIXGroup *msg, int tag, int index, const UTCTimestamp &timestamp, TimeFlags flags=Milliseconds)
 Updates field value by tag number.
 
bool setTagUTCTimestamp (FIXMessage *msg, int tag, const UTCTimestamp &timestamp, TimeFlags flags=Milliseconds)
 Updates field value by tag number.
 
void V12_API timeSpecFromTZTimestamp (struct timespec &ts, const TZTimestamp &timestamp, bool convertToUTC=true)
 Converts TZTimestamp to timespec.
 
void V12_API timeSpecTFromUTCTimestamp (struct timespec &ts, const UTCTimestamp &timestamp)
 Converts UTCTimestamp to timespec.
 
time_t V12_API timeTFromTZTimestamp (const TZTimestamp &timestamp, bool convertToUTC=true)
 Converts TZTimestamp to time_t.
 
time_t V12_API timeTFromUTCTimestamp (const UTCTimestamp &timestamp)
 Converts UTCTimestamp to time_t.
 
size_t V12_API tzTimeOnlyToString (char *data, size_t lenght, const TZTimeOnly &time, TimeFlags flags=Milliseconds)
 Converts to char buffer TZTimeOnly( "HH:MM[:SS][.sss][Z | [ + | - hh[:mm]]]" ) without terminating zero.
 
void V12_API tzTimestampFromTimeSpec (TZTimestamp &timestamp, const struct timespec &ts, System::i16 utcOffset=0)
 Converts timespec to TZTimestamp.
 
void V12_API tzTimestampFromTimeT (TZTimestamp &timestamp, time_t time_utc, System::i16 utcOffset=0)
 Converts time_t to UTCTimestamp.
 
size_t V12_API tzTimestampToString (char *data, size_t lenght, const TZTimestamp &timestamp, TimeFlags flags)
 Converts to char buffer TZTimestamp( "YYYYMMDD-HH:MM:SS[.sss][Z | [ + | - hh[:mm]]]" ) without terminating zero.
 
size_t V12_API utcDateOnlyToString (char *data, size_t lenght, const UTCDateOnly date)
 Converts to char buffer UTCDateOnly( "YYYYMMDD" ) without terminating zero.
 
size_t V12_API utcTimeOnlyToString (char *data, size_t lenght, const UTCTimeOnly &time, TimeFlags flags=Milliseconds)
 Converts to char buffer UTCTimeOnly( "HH:MM:SS[.sss]" ) without terminating zero.
 
void V12_API utcTimestampFromTimeSpec (UTCTimestamp &timestamp, const struct timespec &ts)
 Converts timespec to UTCTimestamp.
 
void V12_API utcTimestampFromTimeT (UTCTimestamp &timestamp, time_t time_utc)
 Converts time_t to UTCTimestamp.
 
void V12_API utcTimestampFromTZTimestamp (UTCTimestamp &utcTimestamp, const TZTimestamp &tzTimestamp)
 Converts TZTimestamp to UTCTimestamp.
 
size_t V12_API utcTimestampToString (char *data, size_t lenght, const UTCTimestamp &timestamp, TimeFlags flags=Milliseconds)
 Converts to string UTCTimestamp( "YYYYMMDD-HH:MM:SS[.sss]" ) without terminating zero.
 

Variables

static const unsigned int ValueSizeBufferTZTimeOnly = sizeof( "HH:MM:SS.ssssssssssss+OO:OO" )-1
 Minimum size buffer for convert to format TZTimeOnly.
 
static const unsigned int ValueSizeBufferTZTimestamp = sizeof( "YYYYMMDD-HH:MM:SS.ssssssssssss+OO:OO" )-1
 Minimum size buffer for convert to format TZTimestamp.
 
static const unsigned int ValueSizeBufferUTCDateOnly = sizeof( "YYYYMMDD" )-1
 Minimum size buffer for convert to format UTCDateOnly.
 
static const unsigned int ValueSizeBufferUTCTimeOnly = sizeof( "HH:MM:SS.ssssssssssss" )-1
 Minimum size buffer for convert to format UTCTimeOnly.
 
static const unsigned int ValueSizeBufferUTCTimestamp = sizeof( "YYYYMMDD-HH:MM:SS.ssssssssssss" )-1
 Minimum size buffer for convert to format UTCTimestamp.
 
static const unsigned int ValueSizeUTCTimeOnlyMicro = sizeof( "HH:MM:SS.ssssss" )-1
 Lenght of string format UTCTimeOnly with microsecond.
 
static const unsigned int ValueSizeUTCTimeOnlyMilli = sizeof( "HH:MM:SS.sss" )-1
 Lenght of string format UTCTimeOnly with millisecond.
 
static const unsigned int ValueSizeUTCTimeOnlyNano = sizeof( "HH:MM:SS.sssssssss" )-1
 Lenght of string format UTCTimeOnly with nanosecond.
 
static const unsigned int ValueSizeUTCTimeOnlyPico = sizeof( "HH:MM:SS.ssssssssssss" )-1
 Lenght of string format UTCTimeOnly with picosecond.
 
static const unsigned int ValueSizeUTCTimeOnlySec = sizeof( "HH:MM:SS" )-1
 Lenght of string format UTCTimeOnly with second.
 
static const unsigned int ValueSizeUTCTimestampMicro = sizeof( "YYYYMMDD-HH:MM:SS.ssssss" )-1
 Lenght of string format UTCTimestamp with microsecond.
 
static const unsigned int ValueSizeUTCTimestampMilli = sizeof( "YYYYMMDD-HH:MM:SS.sss" )-1
 Lenght of string format UTCTimestamp with millisecond.
 
static const unsigned int ValueSizeUTCTimestampNano = sizeof( "YYYYMMDD-HH:MM:SS.sssssssss" )-1
 Lenght of string format UTCTimestamp with nanosecond.
 
static const unsigned int ValueSizeUTCTimestampPico = sizeof( "YYYYMMDD-HH:MM:SS.ssssssssssss" )-1
 Lenght of string format UTCTimestamp with picosecond.
 
static const unsigned int ValueSizeUTCTimestampSec = sizeof( "YYYYMMDD-HH:MM:SS" )-1
 Lenght of string format UTCTimestamp with second.
 

Enumeration Type Documentation

◆ TimeFlags

Time flags for converts to string.

Enumerator
Seconds 

Converts to string with seconds.

Milliseconds 

Converts to string with milliseconds.

Microseconds 

Converts to string with microseconds.

Nanoseconds 

Converts to string with nanoseconds.

Picoseconds 

Converts to string with picoseconds.

TrimTrailingZeros 

Trim zeros

MillisecondsAndTrim 

Converts to string with milliseconds and trim zeros.

MicrosecondsAndTrim 

Converts to string with microseconds and trim zeros.

NanosecondsAndTrim 

Converts to string with nanoseconds and trim zeros.

PicosecondsAndTrim 

Converts to string with picoseconds and trim zeros.

Function Documentation

◆ getAsTZTimeOnly() [1/2]

TZTimeOnly V12_API Engine::TZTimeHelper::getAsTZTimeOnly ( const FIXGroup * grp,
int tag,
int index )

Returns field value as TZTimeOnly.

Parameters
grpFIXGroup.
[in]tagTag of the field.
indexgroup's entry index (starts at 0).

Referenced by getAsTZTimeOnly().

◆ getAsTZTimeOnly() [2/2]

TZTimeOnly V12_API Engine::TZTimeHelper::getAsTZTimeOnly ( const FIXMessage * msg,
int tag )

Returns field value as TZTimeOnly.

Parameters
[in]msgMessage.
[in]tagTag of the field.

References getAsTZTimeOnly().

◆ getAsTZTimestamp() [1/2]

TZTimestamp V12_API Engine::TZTimeHelper::getAsTZTimestamp ( const FIXGroup * grp,
int tag,
int index )

Returns field value as TZTimestamp.

Parameters
grpFIXGroup.
[in]tagTag of the field.
indexgroup's entry index (starts at 0).

Referenced by getAsTZTimestamp().

◆ getAsTZTimestamp() [2/2]

TZTimestamp V12_API Engine::TZTimeHelper::getAsTZTimestamp ( const FIXMessage * msg,
int tag )

Returns field value as TZTimestamp.

Parameters
[in]msgMessage.
[in]tagTag of the field.

References getAsTZTimestamp().

◆ getAsUTCDateOnly() [1/2]

UTCDateOnly V12_API Engine::TZTimeHelper::getAsUTCDateOnly ( const FIXGroup * grp,
int tag,
int index )

Returns field value as UTCDateOnly.

Parameters
grpFIXGroup.
[in]tagTag of the field.
indexgroup's entry index (starts at 0).

Referenced by getAsUTCDateOnly().

◆ getAsUTCDateOnly() [2/2]

UTCDateOnly V12_API Engine::TZTimeHelper::getAsUTCDateOnly ( const FIXMessage * msg,
int tag )

Returns field value as UTCDateOnly.

Parameters
[in]msgMessage.
[in]tagTag of the field.

References getAsUTCDateOnly().

◆ getAsUTCTimeOnly() [1/2]

UTCTimeOnly V12_API Engine::TZTimeHelper::getAsUTCTimeOnly ( const FIXGroup * grp,
int tag,
int index )

Returns field value as UTCTimeOnly.

Parameters
grpFIXGroup.
[in]tagTag of the field.
indexgroup's entry index (starts at 0).

Referenced by getAsUTCTimeOnly().

◆ getAsUTCTimeOnly() [2/2]

UTCTimeOnly V12_API Engine::TZTimeHelper::getAsUTCTimeOnly ( const FIXMessage * msg,
int tag )

Returns field value as UTCTimeOnly.

Parameters
[in]msgMessage.
[in]tagTag of the field.

References getAsUTCTimeOnly().

◆ getAsUTCTimestamp() [1/2]

UTCTimestamp V12_API Engine::TZTimeHelper::getAsUTCTimestamp ( const FIXGroup * grp,
int tag,
int index )

Returns field value as UTCTimestamp.

Parameters
grpFIXGroup.
[in]tagTag of the field.
indexgroup's entry index (starts at 0).

Referenced by getAsUTCTimestamp().

◆ getAsUTCTimestamp() [2/2]

UTCTimestamp V12_API Engine::TZTimeHelper::getAsUTCTimestamp ( const FIXMessage * msg,
int tag )

Returns field value as UTCTimestamp.

Parameters
[in]msgMessage.
[in]tagTag of the field.

References getAsUTCTimestamp().

◆ nowTZDateOnly() [1/2]

UTCDateOnly V12_API Engine::TZTimeHelper::nowTZDateOnly ( )

Get current date with local time zone.

◆ nowTZDateOnly() [2/2]

void V12_API Engine::TZTimeHelper::nowTZDateOnly ( UTCDateOnly & date)

Fills current date in UTCDateOnly in local time zone.

Parameters
datestructure UTCDateOnly with date data

◆ nowTZTimeOnly() [1/2]

TZTimeOnly V12_API Engine::TZTimeHelper::nowTZTimeOnly ( )

Get current time in local time zone.

◆ nowTZTimeOnly() [2/2]

void V12_API Engine::TZTimeHelper::nowTZTimeOnly ( TZTimeOnly & time)

Fills current time in TZTimeOnly.

Parameters
timestructure TZTimeOnly with time data

◆ nowTZTimestamp() [1/2]

TZTimestamp V12_API Engine::TZTimeHelper::nowTZTimestamp ( )

Get current time and date in local time zone.

◆ nowTZTimestamp() [2/2]

void V12_API Engine::TZTimeHelper::nowTZTimestamp ( TZTimestamp & timestamp)

Fills current date and time in TZTimestamp.

Parameters
timestampstructure TZTimeOnly with date and time in local time zone

◆ nowUTCDateOnly() [1/2]

UTCDateOnly V12_API Engine::TZTimeHelper::nowUTCDateOnly ( )

Get current date in UTC.

◆ nowUTCDateOnly() [2/2]

void V12_API Engine::TZTimeHelper::nowUTCDateOnly ( UTCDateOnly & date)

Fills current date in UTCDateOnly in UTC.

Parameters
datestructure UTCDateOnly with date data

◆ nowUTCTimeOnly() [1/2]

UTCTimeOnly V12_API Engine::TZTimeHelper::nowUTCTimeOnly ( )

Get current time in UTC.

◆ nowUTCTimeOnly() [2/2]

void V12_API Engine::TZTimeHelper::nowUTCTimeOnly ( UTCTimeOnly & time)

Fills current time in UTCTimeOnly.

Parameters
timestructure UTCTimeOnly with time data

◆ nowUTCTimestamp() [1/2]

UTCTimestamp V12_API Engine::TZTimeHelper::nowUTCTimestamp ( )

Get current date and time in UTC.

◆ nowUTCTimestamp() [2/2]

void V12_API Engine::TZTimeHelper::nowUTCTimestamp ( UTCTimestamp & timestamp)

Fills current date and time in TZTimestamp.

Parameters
timestampstructure TZTimeOnly with date and time in UTC

◆ parseDateOnly()

bool V12_API Engine::TZTimeHelper::parseDateOnly ( const char * data,
size_t lenght,
UTCDateOnly & date )

Parses string UTCDateOnly - "YYYYMMDD" to UTCDateOnly structure.

Parameters
dataMemory buffer with string
lenghtLenght of string in data
[out]datestructure UTCDateOnly with data parsing
Returns
success parsing

◆ parseTimeOnly()

bool V12_API Engine::TZTimeHelper::parseTimeOnly ( const char * data,
size_t lenght,
TZTimeOnly & time )

Parses string UTCTimeOnly( "HH:MM:SS[.sss]" ) or TZTimeOnly( "HH:MM[:SS][.sss][Z | [ + | - hh[:mm]]]" ) to TZTimeOnly structure.

Parameters
dataMemory buffer with string
lenghtLenght of string in data
[out]timestructure TZTimeOnly with data parsing
Returns
success parsing

◆ parseTimestamp()

bool V12_API Engine::TZTimeHelper::parseTimestamp ( const char * data,
size_t lenght,
TZTimestamp & timestamp )

Parses string UTCTimestamp( "YYYYMMDD-HH:MM:SS[.sss]" ) or TZTimestamp( "YYYYMMDD-HH:MM:SS[.sss][Z | [ + | - hh[:mm]]]" ) to TZTimestamp structure.

Parameters
dataMemory buffer with string
lenghtLenght of string in data
timestampstructure TZTimestamp with data parsing
Returns
success parsing

◆ parseUTCTimeOnly()

bool V12_API Engine::TZTimeHelper::parseUTCTimeOnly ( const char * data,
size_t lenght,
UTCTimeOnly & time )

Parses string UTCTimeOnly - "HH:MM:SS[.sss]" to UTCTimeOnly structure.

Parameters
dataMemory buffer with string
lenghtLenght of string in data
[out]timestructure UTCTimeOnly with data parsing
Returns
success parsing

◆ parseUTCTimestamp()

bool V12_API Engine::TZTimeHelper::parseUTCTimestamp ( const char * data,
size_t lenght,
UTCTimestamp & timestamp )

Parses string UTCTimestamp - "YYYYMMDD-HH:MM:SS[.sss]" to UTCTimestamp structure.

Parameters
dataMemory buffer with string
lenghtLenght of string in data
[out]timestampstructure UTCTimestamp with data parsing
Returns
success parsing

◆ setTagDateOnly() [1/2]

bool Engine::TZTimeHelper::setTagDateOnly ( FIXGroup * grp,
int tag,
int index,
const UTCDateOnly & timestamp )
inline

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters
grpFIXGroup.
tagFIX field tag to set data to.
indexgroup's entry index (starts at 0).
timestampNew date for field.
Returns
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions
Utils::Exceptionif requested field is not defined this message type.

References Engine::FIXGroup::set(), utcDateOnlyToString(), and ValueSizeBufferUTCDateOnly.

Referenced by setTagDateOnly().

◆ setTagDateOnly() [2/2]

bool Engine::TZTimeHelper::setTagDateOnly ( FIXMessage * msg,
int tag,
const UTCDateOnly & timestamp )
inline

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters
msgMessage
tagFIX field tag to set data to.
timestampNew date for field.
Returns
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions
Utils::Exceptionif requested field is not defined this message type.

References Engine::TagValue::set(), setTagDateOnly(), and utcDateOnlyToString().

◆ setTagTZTimeOnly() [1/2]

bool Engine::TZTimeHelper::setTagTZTimeOnly ( FIXGroup * grp,
int tag,
int index,
const TZTimeOnly & timestamp,
TimeFlags flags = Milliseconds )
inline

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters
grpFIXGroup
tagFIX field tag to set data to.
indexgroup's entry index (starts at 0).
timestampNew date and time for field.
flagsTime precision flags for conversion to string representation
Returns
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions
Utils::Exceptionif requested field is not defined this message type.

References Engine::FIXGroup::set(), tzTimeOnlyToString(), and ValueSizeBufferTZTimeOnly.

Referenced by setTagTZTimeOnly().

◆ setTagTZTimeOnly() [2/2]

bool Engine::TZTimeHelper::setTagTZTimeOnly ( FIXMessage * msg,
int tag,
const TZTimeOnly & timestamp,
TimeFlags flags = Milliseconds )
inline

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters
msgMessage
tagFIX field tag to set data to.
timestampNew date and time for field.
flagsTime precision flags for conversion to string representation
Returns
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions
Utils::Exceptionif requested field is not defined this message type.

References Engine::TagValue::set(), setTagTZTimeOnly(), and tzTimeOnlyToString().

◆ setTagTZTimestamp() [1/2]

bool Engine::TZTimeHelper::setTagTZTimestamp ( FIXGroup * grp,
int tag,
int index,
const TZTimestamp & timestamp,
TimeFlags flags = Milliseconds )
inline

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters
grpFIXGroup
tagFIX field tag to set data to.
indexgroup's entry index (starts at 0).
timestampNew time for field.
flagsTime precision flags for conversion to string representation
Returns
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions
Utils::Exceptionif requested field is not defined this message type.

References Engine::FIXGroup::set(), tzTimestampToString(), and ValueSizeBufferTZTimestamp.

Referenced by setTagTZTimestamp().

◆ setTagTZTimestamp() [2/2]

bool Engine::TZTimeHelper::setTagTZTimestamp ( FIXMessage * msg,
int tag,
const TZTimestamp & timestamp,
TimeFlags flags = Milliseconds )
inline

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters
msgMessage
tagFIX field tag to set data to.
timestampNew time for field.
flagsTime precision flags for conversion to string representation
Returns
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions
Utils::Exceptionif requested field is not defined this message type.

References Engine::TagValue::set(), setTagTZTimestamp(), and tzTimestampToString().

◆ setTagUTCTimeOnly() [1/2]

bool Engine::TZTimeHelper::setTagUTCTimeOnly ( FIXGroup * grp,
int tag,
int index,
const UTCTimeOnly & timestamp,
TimeFlags flags = Milliseconds )
inline

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters
grpFIXGroup
tagFIX field tag to set data to.
indexgroup's entry index (starts at 0).
timestampNew date and time UTC for field.
flagsTime precision flags for conversion to string representation
Returns
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions
Utils::Exceptionif requested field is not defined this message type.

References Engine::FIXGroup::set(), utcTimeOnlyToString(), and ValueSizeBufferUTCTimeOnly.

Referenced by setTagUTCTimeOnly().

◆ setTagUTCTimeOnly() [2/2]

bool Engine::TZTimeHelper::setTagUTCTimeOnly ( FIXMessage * msg,
int tag,
const UTCTimeOnly & timestamp,
TimeFlags flags = Milliseconds )
inline

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters
msgMessage
tagFIX field tag to set data to.
timestampNew date and time UTC for field.
flagsTime precision flags for conversion to string representation
Returns
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions
Utils::Exceptionif requested field is not defined this message type.

References Engine::TagValue::set(), setTagUTCTimeOnly(), and utcTimeOnlyToString().

◆ setTagUTCTimestamp() [1/2]

bool Engine::TZTimeHelper::setTagUTCTimestamp ( FIXGroup * msg,
int tag,
int index,
const UTCTimestamp & timestamp,
TimeFlags flags = Milliseconds )
inline

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters
msgMessage
tagFIX field tag to set data to.
indexgroup's entry index (starts at 0).
timestampNew time UTC for field.
flagsTime precision flags for conversion to string representation
Returns
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions
Utils::Exceptionif requested field is not defined this message type.

References Engine::FIXGroup::set(), utcTimestampToString(), and ValueSizeBufferUTCTimestamp.

Referenced by setTagUTCTimestamp().

◆ setTagUTCTimestamp() [2/2]

bool Engine::TZTimeHelper::setTagUTCTimestamp ( FIXMessage * msg,
int tag,
const UTCTimestamp & timestamp,
TimeFlags flags = Milliseconds )
inline

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters
msgMessage
tagFIX field tag to set data to.
timestampNew time UTC for field.
flagsTime precision flags for conversion to string representation
Returns
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions
Utils::Exceptionif requested field is not defined this message type.

References Engine::TagValue::set(), setTagUTCTimestamp(), and utcTimestampToString().

◆ timeSpecFromTZTimestamp()

void V12_API Engine::TZTimeHelper::timeSpecFromTZTimestamp ( struct timespec & ts,
const TZTimestamp & timestamp,
bool convertToUTC = true )

Converts TZTimestamp to timespec.

Parameters
[out]tsdestination timespec data
timestampsource TZTimestamp data
convertToUTCConvert or not in UTC

◆ timeSpecTFromUTCTimestamp()

void V12_API Engine::TZTimeHelper::timeSpecTFromUTCTimestamp ( struct timespec & ts,
const UTCTimestamp & timestamp )

Converts UTCTimestamp to timespec.

Parameters
[out]tsdestination timespec data
timestampsource UTCTimestamp data

◆ timeTFromTZTimestamp()

time_t V12_API Engine::TZTimeHelper::timeTFromTZTimestamp ( const TZTimestamp & timestamp,
bool convertToUTC = true )

Converts TZTimestamp to time_t.

Parameters
timestampsource TZTimestamp data
convertToUTCConvert or not in UTC
Returns
time_t data

◆ timeTFromUTCTimestamp()

time_t V12_API Engine::TZTimeHelper::timeTFromUTCTimestamp ( const UTCTimestamp & timestamp)

Converts UTCTimestamp to time_t.

Returns
time_t data

◆ tzTimeOnlyToString()

size_t V12_API Engine::TZTimeHelper::tzTimeOnlyToString ( char * data,
size_t lenght,
const TZTimeOnly & time,
TimeFlags flags = Milliseconds )

Converts to char buffer TZTimeOnly( "HH:MM[:SS][.sss][Z | [ + | - hh[:mm]]]" ) without terminating zero.

Parameters
[out]dataMemory buffer
lenghtSize memory buffer ( use ValueSizeBufferTZTimeOnly or more )
timestructure TZTimeOnly with time data
flagsTime precision flags for conversion to string representation
Returns
Lenght string

Referenced by setTagTZTimeOnly(), and setTagTZTimeOnly().

◆ tzTimestampFromTimeSpec()

void V12_API Engine::TZTimeHelper::tzTimestampFromTimeSpec ( TZTimestamp & timestamp,
const struct timespec & ts,
System::i16 utcOffset = 0 )

Converts timespec to TZTimestamp.

Parameters
[out]timestampdestination TZTimestamp data
tssource timespec data
utcOffsetUTC Offset for TZTimestamp

◆ tzTimestampFromTimeT()

void V12_API Engine::TZTimeHelper::tzTimestampFromTimeT ( TZTimestamp & timestamp,
time_t time_utc,
System::i16 utcOffset = 0 )

Converts time_t to UTCTimestamp.

Parameters
[out]timestampdestination TZTimestamp data
time_utcsource time_t data in utc
utcOffsetUTC Offset for TZTimestamp

◆ tzTimestampToString()

size_t V12_API Engine::TZTimeHelper::tzTimestampToString ( char * data,
size_t lenght,
const TZTimestamp & timestamp,
TimeFlags flags )

Converts to char buffer TZTimestamp( "YYYYMMDD-HH:MM:SS[.sss][Z | [ + | - hh[:mm]]]" ) without terminating zero.

Parameters
[out]dataMemory buffer
lenghtSize memory buffer ( use ValueSizeBufferTZTimestamp or more )
timestampstructure TZTimestamp with date and time
flagsTime precision flags for conversion to string representation
Returns
Lenght string

Referenced by setTagTZTimestamp(), and setTagTZTimestamp().

◆ utcDateOnlyToString()

size_t V12_API Engine::TZTimeHelper::utcDateOnlyToString ( char * data,
size_t lenght,
const UTCDateOnly date )

Converts to char buffer UTCDateOnly( "YYYYMMDD" ) without terminating zero.

Parameters
[out]dataMemory buffer
lenghtSize memory buffer ( use sizeBufferTZDateOnly or more )
datestructure UTCDateOnly with date data
Returns
Lenght string

Referenced by setTagDateOnly(), and setTagDateOnly().

◆ utcTimeOnlyToString()

size_t V12_API Engine::TZTimeHelper::utcTimeOnlyToString ( char * data,
size_t lenght,
const UTCTimeOnly & time,
TimeFlags flags = Milliseconds )

Converts to char buffer UTCTimeOnly( "HH:MM:SS[.sss]" ) without terminating zero.

Parameters
[out]dataMemory buffer
lenghtSize memory buffer ( use ValueSizeBufferUTCTimeOnly or more )
timestructure UTCTimeOnly with time data
flagsTime precision flags for conversion to string representation
Returns
Lenght string

Referenced by setTagUTCTimeOnly(), and setTagUTCTimeOnly().

◆ utcTimestampFromTimeSpec()

void V12_API Engine::TZTimeHelper::utcTimestampFromTimeSpec ( UTCTimestamp & timestamp,
const struct timespec & ts )

Converts timespec to UTCTimestamp.

Parameters
[out]timestampdestination UTCTimestamp data
tssource timespec data

◆ utcTimestampFromTimeT()

void V12_API Engine::TZTimeHelper::utcTimestampFromTimeT ( UTCTimestamp & timestamp,
time_t time_utc )

Converts time_t to UTCTimestamp.

Parameters
[out]timestampdestination UTCTimestamp data
time_utcsource time_t data in utc

◆ utcTimestampFromTZTimestamp()

void V12_API Engine::TZTimeHelper::utcTimestampFromTZTimestamp ( UTCTimestamp & utcTimestamp,
const TZTimestamp & tzTimestamp )

Converts TZTimestamp to UTCTimestamp.

Parameters
[out]utcTimestampdestination UTCTimestamp data
tzTimestampsource TZTimestamp data

◆ utcTimestampToString()

size_t V12_API Engine::TZTimeHelper::utcTimestampToString ( char * data,
size_t lenght,
const UTCTimestamp & timestamp,
TimeFlags flags = Milliseconds )

Converts to string UTCTimestamp( "YYYYMMDD-HH:MM:SS[.sss]" ) without terminating zero.

Parameters
[out]dataMemory buffer
lenghtSize memory buffer ( use ValueSizeBufferUTCTimestamp or more )
timestampstructure UTCTimestamp with date and time
flagsTime precision flags for conversion to string representation
Returns
Lenght string

Referenced by Engine::PreparedMessage::set(), setTagUTCTimestamp(), and setTagUTCTimestamp().

Variable Documentation

◆ ValueSizeBufferTZTimeOnly

const unsigned int Engine::TZTimeHelper::ValueSizeBufferTZTimeOnly = sizeof( "HH:MM:SS.ssssssssssss+OO:OO" )-1
static

Minimum size buffer for convert to format TZTimeOnly.

Referenced by setTagTZTimeOnly().

◆ ValueSizeBufferTZTimestamp

const unsigned int Engine::TZTimeHelper::ValueSizeBufferTZTimestamp = sizeof( "YYYYMMDD-HH:MM:SS.ssssssssssss+OO:OO" )-1
static

Minimum size buffer for convert to format TZTimestamp.

Referenced by Engine::PreparedMessage::set(), and setTagTZTimestamp().

◆ ValueSizeBufferUTCDateOnly

const unsigned int Engine::TZTimeHelper::ValueSizeBufferUTCDateOnly = sizeof( "YYYYMMDD" )-1
static

Minimum size buffer for convert to format UTCDateOnly.

Referenced by setTagDateOnly().

◆ ValueSizeBufferUTCTimeOnly

const unsigned int Engine::TZTimeHelper::ValueSizeBufferUTCTimeOnly = sizeof( "HH:MM:SS.ssssssssssss" )-1
static

Minimum size buffer for convert to format UTCTimeOnly.

Referenced by setTagUTCTimeOnly().

◆ ValueSizeBufferUTCTimestamp

const unsigned int Engine::TZTimeHelper::ValueSizeBufferUTCTimestamp = sizeof( "YYYYMMDD-HH:MM:SS.ssssssssssss" )-1
static

Minimum size buffer for convert to format UTCTimestamp.

Referenced by setTagUTCTimestamp().

◆ ValueSizeUTCTimeOnlyMicro

const unsigned int Engine::TZTimeHelper::ValueSizeUTCTimeOnlyMicro = sizeof( "HH:MM:SS.ssssss" )-1
static

Lenght of string format UTCTimeOnly with microsecond.

◆ ValueSizeUTCTimeOnlyMilli

const unsigned int Engine::TZTimeHelper::ValueSizeUTCTimeOnlyMilli = sizeof( "HH:MM:SS.sss" )-1
static

Lenght of string format UTCTimeOnly with millisecond.

◆ ValueSizeUTCTimeOnlyNano

const unsigned int Engine::TZTimeHelper::ValueSizeUTCTimeOnlyNano = sizeof( "HH:MM:SS.sssssssss" )-1
static

Lenght of string format UTCTimeOnly with nanosecond.

◆ ValueSizeUTCTimeOnlyPico

const unsigned int Engine::TZTimeHelper::ValueSizeUTCTimeOnlyPico = sizeof( "HH:MM:SS.ssssssssssss" )-1
static

Lenght of string format UTCTimeOnly with picosecond.

◆ ValueSizeUTCTimeOnlySec

const unsigned int Engine::TZTimeHelper::ValueSizeUTCTimeOnlySec = sizeof( "HH:MM:SS" )-1
static

Lenght of string format UTCTimeOnly with second.

◆ ValueSizeUTCTimestampMicro

const unsigned int Engine::TZTimeHelper::ValueSizeUTCTimestampMicro = sizeof( "YYYYMMDD-HH:MM:SS.ssssss" )-1
static

Lenght of string format UTCTimestamp with microsecond.

Referenced by Engine::PreparedMessage::set().

◆ ValueSizeUTCTimestampMilli

const unsigned int Engine::TZTimeHelper::ValueSizeUTCTimestampMilli = sizeof( "YYYYMMDD-HH:MM:SS.sss" )-1
static

Lenght of string format UTCTimestamp with millisecond.

Referenced by Engine::PreparedMessage::set().

◆ ValueSizeUTCTimestampNano

const unsigned int Engine::TZTimeHelper::ValueSizeUTCTimestampNano = sizeof( "YYYYMMDD-HH:MM:SS.sssssssss" )-1
static

Lenght of string format UTCTimestamp with nanosecond.

Referenced by Engine::PreparedMessage::set().

◆ ValueSizeUTCTimestampPico

const unsigned int Engine::TZTimeHelper::ValueSizeUTCTimestampPico = sizeof( "YYYYMMDD-HH:MM:SS.ssssssssssss" )-1
static

Lenght of string format UTCTimestamp with picosecond.

Referenced by Engine::PreparedMessage::set().

◆ ValueSizeUTCTimestampSec

const unsigned int Engine::TZTimeHelper::ValueSizeUTCTimestampSec = sizeof( "YYYYMMDD-HH:MM:SS" )-1
static

Lenght of string format UTCTimestamp with second.

Referenced by Engine::PreparedMessage::set().