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

OmmOpaque represents Opaque data format in Omm. More...

Inheritance diagram for thomsonreuters::ema::access::OmmOpaque:
thomsonreuters::ema::access::ComplexType thomsonreuters::ema::access::Data

Public Member Functions

Constructor
 OmmOpaque ()
 
Destructor
virtual ~OmmOpaque ()
 
Accessors
DataType::DataTypeEnum getDataType () const
 
Data::DataCode getCode () const
 
const EmaBuffergetAsHex () const
 
const EmaStringtoString () const
 
const EmaStringgetString () const
 
const EmaBuffergetBuffer () const
 
Operations
OmmOpaqueclear ()
 
OmmOpaqueset (const EmaBuffer &value)
 
OmmOpaqueset (const EmaString &value)
 
- Public Member Functions inherited from thomsonreuters::ema::access::ComplexType
virtual ~ComplexType ()
 
- Public Member Functions inherited from thomsonreuters::ema::access::Data
const EmaStringgetCodeAsString () const
 
 operator const char * () const
 
virtual ~Data ()
 

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::ComplexType
 ComplexType ()
 
- Protected Member Functions inherited from thomsonreuters::ema::access::Data
 Data ()
 

Detailed Description

The following code snippet shows setting of Opaque data into FieldList;

OmmOpaque opaque;
opaque.set( ... );
FieldList fList;
fList.addOpaque( 369, opaque ).complete();

The following code snippet shows extraction of Opaque data from FieldList;

void decodeFieldList( const FieldList& fList )
{
while ( fList.forth() )
{
const FieldEntry& fEntry = fList.getEntry();
if ( fEntry.getCode() != Data::BlankEnum )
switch ( fEntry.getLoadType() )
{
const OmmOpaque& ommOpaque = fEntry.getOpaque();
const EmaBuffer& opaqueValue = ommOpaque.getBuffer();
break;
}
}
}
Remarks
Objects of this class are intended to be short lived or rather transitional.
This class is designed to efficiently perform setting and extracting of Opaque and its content.
Objects of this class are not cache-able.
All methods in this class are Lock-free Method.
See Also
Data, EmaString, EmaBuffer

Definition at line 72 of file OmmOpaque.h.

Constructor & Destructor Documentation

thomsonreuters::ema::access::OmmOpaque::OmmOpaque ( )

Constructs OmmOpaque

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

Destructor.

Member Function Documentation

OmmOpaque& thomsonreuters::ema::access::OmmOpaque::clear ( )

Clears the OmmOpaque.

Remarks
Invoking clear() method clears all the values and resets all the defaults
Returns
reference to this object
const EmaBuffer& thomsonreuters::ema::access::OmmOpaque::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.

const EmaBuffer& thomsonreuters::ema::access::OmmOpaque::getBuffer ( ) const

Returns Opaque buffer.

Returns
EmaBuffer containing the Opaque data
Data::DataCode thomsonreuters::ema::access::OmmOpaque::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::OmmOpaque::getDataType ( ) const
virtual

Returns the DataType, which is the type of Omm data. Results in this class type.

Returns
DataType::OpaqueEnum

Implements thomsonreuters::ema::access::Data.

const EmaString& thomsonreuters::ema::access::OmmOpaque::getString ( ) const

Returns Opaque string.

Returns
EmaString containing the Opaque data
OmmOpaque& thomsonreuters::ema::access::OmmOpaque::set ( const EmaBuffer value)

Specifies Set.

Parameters
[in]valuespecifies Opaque data using EmaString
Returns
reference to this object
OmmOpaque& thomsonreuters::ema::access::OmmOpaque::set ( const EmaString value)

Specifies Set.

Parameters
[in]valuespecifies Opaque data using EmaBuffer
Returns
reference to this object
const EmaString& thomsonreuters::ema::access::OmmOpaque::toString ( ) const
virtual

Returns a string representation of the class instance.

Returns
string representation of the class instance

Implements thomsonreuters::ema::access::Data.