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

OmmDate represents Date info in Omm. More...

Inheritance diagram for thomsonreuters::ema::access::OmmDate:
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
 
- 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

OmmDate encapsulates year, month and day information.

The following code snippet shows setting of date in ElementList;

eList.addDate( "my date", 1999, 12, 31 ).complete();

The following code snippet shows extraction of date from ElementList.

void decodeElementList( const ElementList& eList )
{
while ( eList.forth() )
{
const ElementEntry& eEntry = eList.getEntry();
if ( eEntry.getCode() != Data::BlankEnum )
switch ( eEntry.getDataType() )
{
const OmmDate& ommDate = eEntry.getDate();
UInt16 year = ommDate.getYear();
break;
}
}
}
Remarks
OmmDate is a read only class.
This class is used for extraction of Date info only.
All methods in this class are Lock-free Method.
See Also
Data, EmaString, EmaBuffer

Definition at line 69 of file OmmDate.h.

Member Function Documentation

const EmaBuffer& thomsonreuters::ema::access::OmmDate::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::OmmDate::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::OmmDate::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::OmmDate::getDay ( ) const

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

Returns
value of day
UInt8 thomsonreuters::ema::access::OmmDate::getMonth ( ) const

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

Returns
value of month
UInt16 thomsonreuters::ema::access::OmmDate::getYear ( ) const

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

Returns
value of year
const EmaString& thomsonreuters::ema::access::OmmDate::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 115 of file OmmDate.h.

friend class Decoder
friend

Definition at line 113 of file OmmDate.h.

friend class StaticDecoder
friend

Definition at line 114 of file OmmDate.h.