EMA C++ Edition
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Friends
thomsonreuters::ema::access::OmmDateTime Class Reference

OmmDateTime represents DateTime info in Omm. More...

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

Public Member Functions

Accessors
DataType::DataTypeEnum getDataType () const
 
Data::DataCode getCode () const
 
const EmaBuffergetAsHex () const
 
const EmaStringtoString () const
 
UInt16 getYear () const
 
UInt8 getMonth () const
 
UInt8 getDay () const
 
UInt8 getHour () const
 
UInt8 getMinute () const
 
UInt8 getSecond () const
 
UInt16 getMillisecond () const
 
UInt16 getMicrosecond () const
 
UInt16 getNanosecond () const
 
- Public Member Functions inherited from thomsonreuters::ema::access::Data
const EmaStringgetCodeAsString () const
 
 operator const char * () const
 
virtual ~Data ()
 

Friends

class DateTimeStringFormat
 
class Decoder
 
class StaticDecoder
 

Additional Inherited Members

- Public Types inherited from thomsonreuters::ema::access::Data
enum  DataCode {
  NoCodeEnum = 0,
  BlankEnum = 1
}
 
- Protected Member Functions inherited from thomsonreuters::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;
}
}
}
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

const EmaBuffer& thomsonreuters::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 thomsonreuters::ema::access::Data.

Data::DataCode thomsonreuters::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 thomsonreuters::ema::access::Data.

DataType::DataTypeEnum thomsonreuters::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 thomsonreuters::ema::access::Data.

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

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

Returns
value of day
UInt8 thomsonreuters::ema::access::OmmDateTime::getHour ( ) const

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

Returns
value of hour
UInt16 thomsonreuters::ema::access::OmmDateTime::getMicrosecond ( ) const

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

Returns
value of microsecond
UInt16 thomsonreuters::ema::access::OmmDateTime::getMillisecond ( ) const

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

Returns
value of millisecond
UInt8 thomsonreuters::ema::access::OmmDateTime::getMinute ( ) const

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

Returns
value of minute
UInt8 thomsonreuters::ema::access::OmmDateTime::getMonth ( ) const

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

Returns
value of month
UInt16 thomsonreuters::ema::access::OmmDateTime::getNanosecond ( ) const

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

Returns
value of nanosecond
UInt8 thomsonreuters::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
UInt16 thomsonreuters::ema::access::OmmDateTime::getYear ( ) const

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

Returns
value of year
const EmaString& thomsonreuters::ema::access::OmmDateTime::toString ( ) const
virtual

Returns a string representation of the class instance.

Returns
string representation of the class instance

Implements thomsonreuters::ema::access::Data.

Friends And Related Function Documentation

friend class DateTimeStringFormat
friend

Definition at line 139 of file OmmDateTime.h.

friend class Decoder
friend

Definition at line 137 of file OmmDateTime.h.

friend class StaticDecoder
friend

Definition at line 138 of file OmmDateTime.h.