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

Key conveys MapEntry key information. More...

Public Member Functions

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

Friends

class Map
 
class MapEntry
 

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;
}
}
...
}
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

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

Destructor.

Member Function Documentation

const EmaString& thomsonreuters::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
const EmaBuffer& thomsonreuters::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
const Data& thomsonreuters::ema::access::Key::getData ( ) const

Returns the simple type based on the DataType.

Returns
Data class reference to the contained object
DataType::DataTypeEnum thomsonreuters::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
const OmmDate& thomsonreuters::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
const OmmDateTime& thomsonreuters::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
double thomsonreuters::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
UInt16 thomsonreuters::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
const OmmError& thomsonreuters::ema::access::Key::getError ( ) const

Returns Error.

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmError
Returns
OmmError class reference to contained object
float thomsonreuters::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
Int64 thomsonreuters::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
const OmmQos& thomsonreuters::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
const OmmReal& thomsonreuters::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
const RmtesBuffer& thomsonreuters::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
const OmmState& thomsonreuters::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
const OmmTime& thomsonreuters::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
UInt64 thomsonreuters::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
const EmaBuffer& thomsonreuters::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

Friends And Related Function Documentation

friend class Map
friend

Definition at line 210 of file Key.h.

friend class MapEntry
friend

Definition at line 211 of file Key.h.