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

OmmReal represents Real number in Omm. More...

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

Public Types

enum  MagnitudeType {
  ExponentNeg14Enum = 0,
  ExponentNeg13Enum = 1,
  ExponentNeg12Enum = 2,
  ExponentNeg11Enum = 3,
  ExponentNeg10Enum = 4,
  ExponentNeg9Enum = 5,
  ExponentNeg8Enum = 6,
  ExponentNeg7Enum = 7,
  ExponentNeg6Enum = 8,
  ExponentNeg5Enum = 9,
  ExponentNeg4Enum = 10,
  ExponentNeg3Enum = 11,
  ExponentNeg2Enum = 12,
  ExponentNeg1Enum = 13,
  Exponent0Enum = 14,
  ExponentPos1Enum = 15,
  ExponentPos2Enum = 16,
  ExponentPos3Enum = 17,
  ExponentPos4Enum = 18,
  ExponentPos5Enum = 19,
  ExponentPos6Enum = 20,
  ExponentPos7Enum = 21,
  Divisor1Enum = 22,
  Divisor2Enum = 23,
  Divisor4Enum = 24,
  Divisor8Enum = 25,
  Divisor16Enum = 26,
  Divisor32Enum = 27,
  Divisor64Enum = 28,
  Divisor128Enum = 29,
  Divisor256Enum = 30,
  InfinityEnum = 33,
  NegInfinityEnum = 34,
  NotANumberEnum = 35
}
 
- Public Types inherited from thomsonreuters::ema::access::Data
enum  DataCode {
  NoCodeEnum = 0,
  BlankEnum = 1
}
 

Public Member Functions

Accessors
const EmaStringgetMagnitudeTypeAsString () const
 
DataType::DataTypeEnum getDataType () const
 
Data::DataCode getCode () const
 
const EmaBuffergetAsHex () const
 
const EmaStringtoString () const
 
Int64 getMantissa () const
 
MagnitudeType getMagnitudeType () const
 
double getAsDouble () 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

- Protected Member Functions inherited from thomsonreuters::ema::access::Data
 Data ()
 

Detailed Description

OmmReal encapsulates magnitude type and mantissa information.

The following code snippet shows setting of Real in FieldList;

FieldList fList;
flist.addReal( 321, 245, OmmReal::ExponentNeg8Enum ).
addRealFromDouble( 345, 245.234, OmmReal::ExponentNeg3Enum ).
complete();

The following code snippet shows extraction of OmmReal from FieldList.

void decodeFieldList( const FieldList& fList )
{
while ( fList.forth() )
{
const FieldEntry& fEntry = fList.getEntry();
if ( fEntry.getCode() != Data::BlankEnum )
switch ( fEntry.getLoadType() )
{
case DataType::OmmReal :
const OmmReal& ommReal = fEntry.getReal();
Int64 mantissa = ommReal.getMantissa();
break;
}
}
}
Remarks
OmmReal is a read only class.
This class is used for extraction of Real info only.
All methods in this class are Lock-free Method.
See Also
Data, EmaString, EmaBuffer

Definition at line 71 of file OmmReal.h.

Member Enumeration Documentation

An enumeration representing item stream data state.

Enumerator
ExponentNeg14Enum 

Power of -14.

ExponentNeg13Enum 

Power of -13.

ExponentNeg12Enum 

Power of -12.

ExponentNeg11Enum 

Power of -11.

ExponentNeg10Enum 

Power of -10.

ExponentNeg9Enum 

Power of -9.

ExponentNeg8Enum 

Power of -8.

ExponentNeg7Enum 

Power of -7.

ExponentNeg6Enum 

Power of -6.

ExponentNeg5Enum 

Power of -5.

ExponentNeg4Enum 

Power of -4.

ExponentNeg3Enum 

Power of -3.

ExponentNeg2Enum 

Power of -2.

ExponentNeg1Enum 

Power of -1.

Exponent0Enum 

Power of 0.

ExponentPos1Enum 

Power of 1.

ExponentPos2Enum 

Power of 2.

ExponentPos3Enum 

Power of 3.

ExponentPos4Enum 

Power of 4.

ExponentPos5Enum 

Power of 5.

ExponentPos6Enum 

Power of 6.

ExponentPos7Enum 

Power of 7.

Divisor1Enum 

Divisor of 1.

Divisor2Enum 

Divisor of 2

Divisor4Enum 

Divisor of 4.

Divisor8Enum 

Divisor of 8.

Divisor16Enum 

Divisor of 16.

Divisor32Enum 

Divisor of 32.

Divisor64Enum 

Divisor of 64.

Divisor128Enum 

Divisor of 128.

Divisor256Enum 

Divisor of 256.

InfinityEnum 

Represents infinity.

NegInfinityEnum 

Represents negative infinity.

NotANumberEnum 

Represents not a number (NaN).

Definition at line 78 of file OmmReal.h.

Member Function Documentation

double thomsonreuters::ema::access::OmmReal::getAsDouble ( ) const

Returns AsDouble.

Returns
value of Real as double
const EmaBuffer& thomsonreuters::ema::access::OmmReal::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.

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

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

Returns
DataType::RealEnum

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

MagnitudeType thomsonreuters::ema::access::OmmReal::getMagnitudeType ( ) const

Returns MagnitudeType.

Returns
value of OmmReal::MagnitudeType
const EmaString& thomsonreuters::ema::access::OmmReal::getMagnitudeTypeAsString ( ) const

Returns the MagnitudeType value as a string format.

Returns
string representation of this object MagnitudeType
Int64 thomsonreuters::ema::access::OmmReal::getMantissa ( ) const

Returns Mantissa.

Returns
value of OmmReal::Mantissa
const EmaString& thomsonreuters::ema::access::OmmReal::toString ( ) const
virtual

Returns a string representation of the class instance.

Returns
string representation of the class instance

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

Friends And Related Function Documentation

friend class Decoder
friend

Definition at line 194 of file OmmReal.h.

friend class StaticDecoder
friend

Definition at line 195 of file OmmReal.h.