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

OmmDouble represents double in Omm. More...

Inheritance diagram for thomsonreuters::ema::access::OmmDouble:
thomsonreuters::ema::access::Data

Public Member Functions

Accessors
DataType::DataTypeEnum getDataType () const
 
Data::DataCode getCode () const
 
const EmaBuffergetAsHex () const
 
const EmaStringtoString () const
 
double getDouble () const
 
- Public Member Functions inherited from thomsonreuters::ema::access::Data
const EmaStringgetCodeAsString () const
 
 operator const char * () const
 
virtual ~Data ()
 

Friends

class Decoder
 
class StaticDecoder
 

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::Data
 Data ()
 

Detailed Description

void decodeData( const Data& rcvdData )
{
if ( rcvdData.getCode() != Data::BlankEnum )
switch ( rcvdData.getDataType() )
{
double value = static_cast< const OmmDouble& >( rcvdData ).getDouble();
break;
}
}
Remarks
OmmDouble is a read only class.
The usage of this class is limited to downcast operation only.
All methods in this class are Lock-free Method.
See Also
Data, EmaString, EmaBuffer

Definition at line 50 of file OmmDouble.h.

Member Function Documentation

const EmaBuffer& thomsonreuters::ema::access::OmmDouble::getAsHex ( ) const
virtual

Returns a buffer that in turn provides an alphanumeric null-terminated hexadecimal string representation.

Returns
EmaBuffer with the message hex information

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

Data::DataCode thomsonreuters::ema::access::OmmDouble::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::OmmDouble::getDataType ( ) const
virtual

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

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

double thomsonreuters::ema::access::OmmDouble::getDouble ( ) const

Returns Double.

Returns
value of double
const EmaString& thomsonreuters::ema::access::OmmDouble::toString ( ) const
virtual

Returns a string representation of the class instance.

Returns
string representation of the class instance (e.g., "-1234.9876" )

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

Friends And Related Function Documentation

friend class Decoder
friend

Definition at line 84 of file OmmDouble.h.

friend class StaticDecoder
friend

Definition at line 85 of file OmmDouble.h.