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

Key conveys MapEntry key information. More...

Public Member Functions

Accessors
DataType::DataTypeEnum getDataType () const
  More...
 
const DatagetData () const
  More...
 
Int64 getInt () const
  More...
 
UInt64 getUInt () const
  More...
 
const OmmRealgetReal () const
  More...
 
float getFloat () const
  More...
 
double getDouble () const
  More...
 
const OmmDategetDate () const
  More...
 
const OmmTimegetTime () const
  More...
 
const OmmDateTimegetDateTime () const
  More...
 
const OmmQosgetQos () const
  More...
 
const OmmStategetState () const
  More...
 
UInt16 getEnum () const
  More...
 
const EmaBuffergetBuffer () const
  More...
 
const EmaStringgetAscii () const
  More...
 
const EmaBuffergetUtf8 () const
  More...
 
const RmtesBuffergetRmtes () const
  More...
 
const OmmErrorgetError () const
  More...
 

Destructor

class Map
 
class MapEntry
 
virtual ~Key ()
  More...
 

Detailed Description

Key contains objects of primitive type (e.g. they are not complex type)

The following code snippet shows extracting of Key and its content while processing MapEntry.

void decodeMap( const Map& map )
{
...
while ( map.forth() )
{
const MapEntry& mEntry = map.getEntry();
const Key& key = mEntry.getKey();
switch ( key.getDataType() )
{
case DataType::OmmBufferEnum :
const EmaBuffer& keyBuffer = key.getBuffer();
break;
case DataType::OmmAsciiEnum :
const EmaString& keyString = key.getAscii();
break;
}
}
...
}
friend class Map
Definition: Key.h:210
friend class MapEntry
Definition: Key.h:211
Remarks
Objects of this class are intended to be short lived or rather transitional.
This class is designed to efficiently perform extracting of Key and its content.
Objects of this class are not cache-able.
All methods in this class are Lock-free Method.
See also
Data OmmInt, OmmUInt, OmmAscii, OmmBuffer, OmmRmtes, OmmUtf8, OmmEnum, OmmReal, OmmDate, OmmTime, OmmDateTime, OmmQos, OmmState, OmmError

Definition at line 87 of file Key.h.

Constructor & Destructor Documentation

◆ ~Key()

virtual refinitiv::ema::access::Key::~Key ( )
virtual

Destructor.

Member Function Documentation

◆ getAscii()

const EmaString& refinitiv::ema::access::Key::getAscii ( ) const

Returns the current OMM data represented as a specific simple type.

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmAscii
Returns
EmaString class reference to the contained object

◆ getBuffer()

const EmaBuffer& refinitiv::ema::access::Key::getBuffer ( ) const

Returns the current OMM data represented as a specific simple type.

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmBuffer
Returns
EmaBuffer class reference to the contained object

◆ getData()

const Data& refinitiv::ema::access::Key::getData ( ) const

Returns the simple type based on the DataType.

Returns
Data class reference to the contained object

◆ getDataType()

DataType::DataTypeEnum refinitiv::ema::access::Key::getDataType ( ) const

Returns the DataType of the contained data.

Remarks
return of DataType::OmmErrorEnum signifies error while extracting content of Key
Returns
data type of the contained object

◆ getDate()

const OmmDate& refinitiv::ema::access::Key::getDate ( ) const

Returns the current OMM data represented as a specific simple type.

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmDate
Returns
OmmDate class reference to the contained object

◆ getDateTime()

const OmmDateTime& refinitiv::ema::access::Key::getDateTime ( ) const

Returns the current OMM data represented as a specific simple type.

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmDateTime
Returns
OmmDateTime class reference to the contained object

◆ getDouble()

double refinitiv::ema::access::Key::getDouble ( ) const

Returns the current OMM data represented as a specific simple type.

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmDouble
Returns
double

◆ getEnum()

UInt16 refinitiv::ema::access::Key::getEnum ( ) const

Returns the current OMM data represented as a specific simple type.

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmEnum
Returns
UInt16

◆ getError()

const OmmError& refinitiv::ema::access::Key::getError ( ) const

Returns Error.

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmError
Returns
OmmError class reference to contained object

◆ getFloat()

float refinitiv::ema::access::Key::getFloat ( ) const

Returns the current OMM data represented as a specific simple type.

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmFloat
Returns
float

◆ getInt()

Int64 refinitiv::ema::access::Key::getInt ( ) const

Returns the current OMM data represented as a specific simple type.

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmInt
Returns
Int64

◆ getQos()

const OmmQos& refinitiv::ema::access::Key::getQos ( ) const

Returns the current OMM data represented as a specific simple type.

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmQos
Returns
OmmQos class reference to the contained object

◆ getReal()

const OmmReal& refinitiv::ema::access::Key::getReal ( ) const

Returns the current OMM data represented as a specific simple type.

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmReal
Returns
OmmReal class reference to the contained object

◆ getRmtes()

const RmtesBuffer& refinitiv::ema::access::Key::getRmtes ( ) const

Returns the current OMM data represented as a specific simple type.

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmRmtes
Returns
RmtesBuffer class reference to the contained object

◆ getState()

const OmmState& refinitiv::ema::access::Key::getState ( ) const

Returns the current OMM data represented as a specific simple type.

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmState
Returns
OmmState class reference to the contained object

◆ getTime()

const OmmTime& refinitiv::ema::access::Key::getTime ( ) const

Returns the current OMM data represented as a specific simple type.

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmTime
Returns
OmmTime class reference to the contained object

◆ getUInt()

UInt64 refinitiv::ema::access::Key::getUInt ( ) const

Returns the current OMM data represented as a specific simple type.

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmUInt
Returns
UInt64

◆ getUtf8()

const EmaBuffer& refinitiv::ema::access::Key::getUtf8 ( ) const

Returns the current OMM data represented as a specific simple type.

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmUtf8
Returns
EmaBuffer class reference to the contained object