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

OmmTime represents Time info in Omm. More...

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

Public Member Functions

Accessors
DataType::DataTypeEnum getDataType () const
 
Data::DataCode getCode () const
 
const EmaBuffergetAsHex () const
 
const EmaStringtoString () 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

OmmTime encapsulates hour, minute, second, millisecond, microsecond and nanosecond information.

The following code snippet shows setting of time in ElementList.

eList.addTime( "my time", 23, 59, 59, 999, 999, 999 ).complete();

The following code snippet sows extraction of time from ElementList.

void decodeElementList( const ElementList& eList )
{
while ( eList.forth() )
{
const ElementEntry& eEntry = eList.getEntry();
if ( eEntry.getCode() != Data::BlankEnum )
switch ( eEntry.getDataType() )
{
const OmmTime& ommTime = eEntry.getTime();
UInt8 hour = ommTime.getHour();
break;
}
}
}
Remarks
OmmTime is a read only class.
This class is used for extraction of Time info only.
All methods in this class are Lock-free Method.
See Also
Data, EmaString, EmaBuffer

Definition at line 69 of file OmmTime.h.

Member Function Documentation

const EmaBuffer& thomsonreuters::ema::access::OmmTime::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::OmmTime::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::OmmTime::getDataType ( ) const
virtual

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

Returns
DataType::TimeEnum

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

UInt8 thomsonreuters::ema::access::OmmTime::getHour ( ) const

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

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

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

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

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

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

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

Returns
value of minute
UInt16 thomsonreuters::ema::access::OmmTime::getNanosecond ( ) const

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

Returns
value of nanosecond
UInt8 thomsonreuters::ema::access::OmmTime::getSecond ( ) const

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

Returns
value of second
const EmaString& thomsonreuters::ema::access::OmmTime::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 130 of file OmmTime.h.

friend class Decoder
friend

Definition at line 128 of file OmmTime.h.

friend class StaticDecoder
friend

Definition at line 129 of file OmmTime.h.