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

OmmDate represents Date info in Omm. More...

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

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

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();
friend class ElementList
Definition: Data.h:132

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;
}
}
}
unsigned short UInt16
represents 16-bit unsigned integer
Definition: Common.h:44
friend class ElementEntry
Definition: Data.h:140
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

◆ getAsHex()

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

◆ getCode()

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

◆ getDataType()

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

◆ getDay()

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

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

Returns
value of day

◆ getMonth()

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

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

Returns
value of month

◆ getYear()

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

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

Returns
value of year

◆ toString()

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

Returns a string representation of the class instance.

Returns
string representation of the class instance

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