EMA C++ Edition
List of all members | Public Types
refinitiv::ema::access::OmmReal Class Reference

OmmReal represents Real number in Omm. More...

Inheritance diagram for refinitiv::ema::access::OmmReal:
refinitiv::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 refinitiv::ema::access::Data
enum  DataCode {
  NoCodeEnum = 0 ,
  BlankEnum = 1
}
 

Accessors

class Decoder
 
class StaticDecoder
 
const EmaStringgetMagnitudeTypeAsString () const
  More...
 
DataType::DataTypeEnum getDataType () const
  More...
 
Data::DataCode getCode () const
  More...
 
const EmaBuffergetAsHex () const
  More...
 
const EmaStringtoString () const
  More...
 
Int64 getMantissa () const
  More...
 
MagnitudeType getMagnitudeType () const
  More...
 
double getAsDouble () const
  More...
 

Additional Inherited Members

- Public Member Functions inherited from refinitiv::ema::access::Data
const EmaStringgetCodeAsString () const
  More...
 
 operator const char * () const
  More...
 
virtual ~Data ()
  More...
 
- Protected Member Functions inherited from refinitiv::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();
friend class FieldList
Definition: Data.h:133

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;
}
}
}
long long Int64
represents 64-bit signed integer
Definition: Common.h:74
friend class FieldEntry
Definition: Data.h:139
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

◆ MagnitudeType

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

◆ getAsDouble()

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

Returns AsDouble.

Returns
value of Real as double

◆ getAsHex()

const EmaBuffer& refinitiv::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 refinitiv::ema::access::Data.

◆ getCode()

Data::DataCode refinitiv::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 refinitiv::ema::access::Data.

◆ getDataType()

DataType::DataTypeEnum refinitiv::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 refinitiv::ema::access::Data.

◆ getMagnitudeType()

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

Returns MagnitudeType.

Returns
value of OmmReal::MagnitudeType

◆ getMagnitudeTypeAsString()

const EmaString& refinitiv::ema::access::OmmReal::getMagnitudeTypeAsString ( ) const

Returns the MagnitudeType value as a string format.

Returns
string representation of this object MagnitudeType

◆ getMantissa()

Int64 refinitiv::ema::access::OmmReal::getMantissa ( ) const

Returns Mantissa.

Returns
value of OmmReal::Mantissa

◆ toString()

const EmaString& refinitiv::ema::access::OmmReal::toString ( ) const
virtual

Returns a string representation of the class instance.

Returns
string representation of the class instance

Implements refinitiv::ema::access::Data.