EMA C++ Edition
List of all members
refinitiv::ema::access::OmmDateTime Class Reference

OmmDateTime represents DateTime info in Omm. More...

Inheritance diagram for refinitiv::ema::access::OmmDateTime:
refinitiv::ema::access::Data

Accessors

class Decoder
 
class StaticDecoder
 
class DateTimeStringFormat
 
DataType::DataTypeEnum getDataType () const
  More...
 
Data::DataCode getCode () const
  More...
 
const EmaBuffergetAsHex () const
  More...
 
const EmaStringtoString () const
  More...
 
UInt16 getYear () const
  More...
 
UInt8 getMonth () const
  More...
 
UInt8 getDay () const
  More...
 
UInt8 getHour () const
  More...
 
UInt8 getMinute () const
  More...
 
UInt8 getSecond () const
  More...
 
UInt16 getMillisecond () const
  More...
 
UInt16 getMicrosecond () const
  More...
 
UInt16 getNanosecond () const
  More...
 

Additional Inherited Members

- Public Types inherited from refinitiv::ema::access::Data
enum  DataCode {
  NoCodeEnum = 0 ,
  BlankEnum = 1
}
 
- Public Member Functions inherited from refinitiv::ema::access::Data
const EmaStringgetCodeAsString () const
  More...
 
 operator const char * () const
  More...
 
virtual ~Data ()
  More...
 
- Protected Member Functions inherited from refinitiv::ema::access::Data
 Data ()
 

Detailed Description

OmmDateTime encapsulates year, month, day, hour, minute, second, millisecond, microsecond and nanosecond information.

The following code snippet shows extraction of DateTime from ElementList.

void decodeElementList( const ElementList& eList )
{
while ( eList.forth() )
{
const ElementEntry& eEntry = eList.getEntry();
if ( eEntry.getCode() != Data::BlankEnum )
switch ( eEntry.getDataType() )
{
const OmmDateTime& ommDateTime = eEntry.getDateTime();
UInt16 year = ommDateTime.getYear();
...
UInt8 hour = ommDateTime.getHour();
break;
}
}
}
unsigned char UInt8
represents 8-bit unsigned integer
Definition: Common.h:32
unsigned short UInt16
represents 16-bit unsigned integer
Definition: Common.h:44
friend class ElementList
Definition: Data.h:132
friend class ElementEntry
Definition: Data.h:140
Remarks
OmmDateTime is a read only class.
This class is used for extraction of DateTime info only.
All methods in this class are Lock-free Method.
See also
Data, EmaString, EmaBuffer

Definition at line 63 of file OmmDateTime.h.

Member Function Documentation

◆ getAsHex()

const EmaBuffer& refinitiv::ema::access::OmmDateTime::getAsHex ( ) const
virtual

Returns a buffer that in turn provides an alphanumeric null-terminated hexadecimal string representation.

Returns
EmaBuffer with the object hex information

Implements refinitiv::ema::access::Data.

◆ getCode()

Data::DataCode refinitiv::ema::access::OmmDateTime::getCode ( ) const
virtual

Returns the Code, which indicates a special state of a DataType.

Returns
Data::BlankEnum if received data is blank; Data::NoCodeEnum otherwise

Implements refinitiv::ema::access::Data.

◆ getDataType()

DataType::DataTypeEnum refinitiv::ema::access::OmmDateTime::getDataType ( ) const
virtual

Returns the DataType, which is the type of Omm data. Results in this class type.

Returns
DataType::DateTimeEnum

Implements refinitiv::ema::access::Data.

◆ getDay()

UInt8 refinitiv::ema::access::OmmDateTime::getDay ( ) const

Returns Day. Range is 0 - 31 where 0 indicates blank.

Returns
value of day

◆ getHour()

UInt8 refinitiv::ema::access::OmmDateTime::getHour ( ) const

Returns Hour. Range is 0 - 23 where 255 indicates blank.

Returns
value of hour

◆ getMicrosecond()

UInt16 refinitiv::ema::access::OmmDateTime::getMicrosecond ( ) const

Returns Microsecond. Range is 0 - 999 where 2047 indicates blank.

Returns
value of microsecond

◆ getMillisecond()

UInt16 refinitiv::ema::access::OmmDateTime::getMillisecond ( ) const

Returns Millisecond. Range is 0 - 999 where 65535 indicates blank.

Returns
value of millisecond

◆ getMinute()

UInt8 refinitiv::ema::access::OmmDateTime::getMinute ( ) const

Returns Minute. Range is 0 - 59 where 255 indicates blank.

Returns
value of minute

◆ getMonth()

UInt8 refinitiv::ema::access::OmmDateTime::getMonth ( ) const

Returns Month. Range is 0 - 12 where 0 indicates blank.

Returns
value of month

◆ getNanosecond()

UInt16 refinitiv::ema::access::OmmDateTime::getNanosecond ( ) const

Returns Nanosecond. Range is 0 - 999 where 2047 indicates blank.

Returns
value of nanosecond

◆ getSecond()

UInt8 refinitiv::ema::access::OmmDateTime::getSecond ( ) const

Returns Second. Range is 0 - 60 where 255 indicates blank and 60 is to account for leap second.

Returns
value of second

◆ getYear()

UInt16 refinitiv::ema::access::OmmDateTime::getYear ( ) const

Returns Year. Range is 0 - 4095 where 0 indicates blank.

Returns
value of year

◆ toString()

const EmaString& refinitiv::ema::access::OmmDateTime::toString ( ) const
virtual

Returns a string representation of the class instance.

Returns
string representation of the class instance

Implements refinitiv::ema::access::Data.