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

OmmArrayEntry represents an entry of OmmArray. More...

Public Member Functions

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

Friends

class OmmArray
 

Detailed Description

OmmArrayEntry associates entry's data and its data type.

decodeArray( const OmmArray& array )
{
while ( array.forth() )
{
const ArrayEntry& aEntry = array.getEntry();
if ( aEntry.getCode() != Data::BlankEnum )
switch ( aEntry.getLoadType() )
{
aEntry.getInt();
break;
}
}
}
Remarks
Objects of this class are intended to be short lived or rather transitional. This class is designed to efficiently perform extracting of data from entry. Objects of this class are not cache-able.
All methods in this class are Lock-free Method.
See Also
Data, OmmArray, EmaString, EmaBuffer, OmmReal, OmmDate, OmmTime, OmmDateTime, OmmQos, OmmState, OmmError

Definition at line 77 of file OmmArrayEntry.h.

Member Function Documentation

const EmaString& thomsonreuters::ema::access::OmmArrayEntry::getAscii ( ) const

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

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmAscii
OmmInvalidUsageExceptionif getCode() returns Data::BlankEnum
Returns
EmaString
const EmaBuffer& thomsonreuters::ema::access::OmmArrayEntry::getBuffer ( ) const

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

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmBuffer
OmmInvalidUsageExceptionif getCode() returns Data::BlankEnum
Returns
EmaBuffer
Data::DataCode thomsonreuters::ema::access::OmmArrayEntry::getCode ( ) const

Returns the Code of the entry's load. The code indicates a special state of a Data.

Remarks
Attempts to extract data will cause OmmInvalidUsageException if Data::BlankEnum is returned.
Returns
data code of the contained object
const OmmDate& thomsonreuters::ema::access::OmmArrayEntry::getDate ( ) const

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

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmData
OmmInvalidUsageExceptionif getCode() returns Data::BlankEnum
Returns
OmmDate class reference to contained object
const OmmDateTime& thomsonreuters::ema::access::OmmArrayEntry::getDateTime ( ) const

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

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmDateTime
OmmInvalidUsageExceptionif getCode() returns Data::BlankEnum
Returns
OmmDateTime class reference to contained object
double thomsonreuters::ema::access::OmmArrayEntry::getDouble ( ) const

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

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmDouble
OmmInvalidUsageExceptionif getCode() returns Data::BlankEnum
Returns
double
UInt16 thomsonreuters::ema::access::OmmArrayEntry::getEnum ( ) const

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

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmEnum
OmmInvalidUsageExceptionif getCode() returns Data::BlankEnum
Returns
UInt16
const OmmError& thomsonreuters::ema::access::OmmArrayEntry::getError ( ) const

Returns Error.

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmError
Returns
OmmError class reference to contained object
float thomsonreuters::ema::access::OmmArrayEntry::getFloat ( ) const

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

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmFloat
OmmInvalidUsageExceptionif getCode() returns Data::BlankEnum
Returns
float
Int64 thomsonreuters::ema::access::OmmArrayEntry::getInt ( ) const

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

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmInt
OmmInvalidUsageExceptionif getCode() returns Data::BlankEnum
Returns
Int64
const Data& thomsonreuters::ema::access::OmmArrayEntry::getLoad ( ) const

Returns the contained Data based on the DataType.

Returns
Data class reference to contained object
DataType::DataTypeEnum thomsonreuters::ema::access::OmmArrayEntry::getLoadType ( ) const

Returns the DataType of the entry's load.

Remarks
return of DataType::OmmErrorEnum signifies error while extracting content of load
Returns
data type of the contained object
const OmmQos& thomsonreuters::ema::access::OmmArrayEntry::getQos ( ) const

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

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmQos
OmmInvalidUsageExceptionif getCode() returns Data::BlankEnum
Returns
OmmQos class reference to contained object
const OmmReal& thomsonreuters::ema::access::OmmArrayEntry::getReal ( ) const

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

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmReal
OmmInvalidUsageExceptionif getCode() returns Data::BlankEnum
Returns
OmmReal class reference to contained object
const RmtesBuffer& thomsonreuters::ema::access::OmmArrayEntry::getRmtes ( ) const

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

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmRmtes
OmmInvalidUsageExceptionif getCode() returns Data::BlankEnum
Returns
RmtesBuffer
const OmmState& thomsonreuters::ema::access::OmmArrayEntry::getState ( ) const

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

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmState
OmmInvalidUsageExceptionif getCode() returns Data::BlankEnum
Returns
OmmState class reference to contained object
const OmmTime& thomsonreuters::ema::access::OmmArrayEntry::getTime ( ) const

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

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmTime
OmmInvalidUsageExceptionif getCode() returns Data::BlankEnum
Returns
ommTime class reference to contained object
UInt64 thomsonreuters::ema::access::OmmArrayEntry::getUInt ( ) const

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

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmUInt
OmmInvalidUsageExceptionif getCode() returns Data::BlankEnum
Returns
UInt64
const EmaBuffer& thomsonreuters::ema::access::OmmArrayEntry::getUtf8 ( ) const

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

Exceptions
OmmInvalidUsageExceptionif contained object is not OmmUtf8
OmmInvalidUsageExceptionif getCode() returns Data::BlankEnum
Returns
EmaBuffer
const EmaString& thomsonreuters::ema::access::OmmArrayEntry::toString ( ) const

Returns a string representation of the class instance.

Returns
string representation of the class instance

Friends And Related Function Documentation

friend class OmmArray
friend

Definition at line 219 of file OmmArrayEntry.h.