EMA C++ Edition
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OmmReal.h
Go to the documentation of this file.
1 /*|-----------------------------------------------------------------------------
2  *| This source code is provided under the Apache 2.0 license --
3  *| and is provided AS IS with no warranty or guarantee of fit for purpose. --
4  *| See the project's LICENSE.md for details. --
5  *| Copyright (C) 2019 Refinitiv. All rights reserved. --
6  *|-----------------------------------------------------------------------------
7  */
8 
9 #ifndef __thomsonreuters_ema_access_OmmReal_h
10 #define __thomsonreuters_ema_access_OmmReal_h
11 
61 #include "Access/Include/Data.h"
62 
63 namespace thomsonreuters {
64 
65 namespace ema {
66 
67 namespace access {
68 
69 class OmmRealDecoder;
70 
71 class EMA_ACCESS_API OmmReal : public Data
72 {
73 public :
74 
79  {
80  ExponentNeg14Enum = 0,
82  ExponentNeg13Enum = 1,
84  ExponentNeg12Enum = 2,
86  ExponentNeg11Enum = 3,
88  ExponentNeg10Enum = 4,
90  ExponentNeg9Enum = 5,
92  ExponentNeg8Enum = 6,
94  ExponentNeg7Enum = 7,
96  ExponentNeg6Enum = 8,
98  ExponentNeg5Enum = 9,
100  ExponentNeg4Enum = 10,
102  ExponentNeg3Enum = 11,
104  ExponentNeg2Enum = 12,
106  ExponentNeg1Enum = 13,
108  Exponent0Enum = 14,
110  ExponentPos1Enum = 15,
112  ExponentPos2Enum = 16,
114  ExponentPos3Enum = 17,
116  ExponentPos4Enum = 18,
118  ExponentPos5Enum = 19,
120  ExponentPos6Enum = 20,
122  ExponentPos7Enum = 21,
124  Divisor1Enum = 22,
126  Divisor2Enum = 23,
128  Divisor4Enum = 24,
130  Divisor8Enum = 25,
132  Divisor16Enum = 26,
134  Divisor32Enum = 27,
136  Divisor64Enum = 28,
138  Divisor128Enum = 29,
140  Divisor256Enum = 30,
142  InfinityEnum = 33,
144  NegInfinityEnum = 34,
146  NotANumberEnum = 35
147  };
148 
150 
151 
154  const EmaString& getMagnitudeTypeAsString() const;
155 
159  DataType::DataTypeEnum getDataType() const;
160 
164  Data::DataCode getCode() const;
165 
169  const EmaBuffer& getAsHex() const;
170 
174  const EmaString& toString() const;
175 
179  Int64 getMantissa() const;
180 
184  MagnitudeType getMagnitudeType() const;
185 
189  double getAsDouble() const;
191 
192 private :
193 
194  friend class Decoder;
195  friend class StaticDecoder;
196 
197  Decoder& getDecoder();
198  bool hasDecoder() const;
199 
200  const EmaString& toString( UInt64 ) const;
201 
202  const Encoder& getEncoder() const;
203  bool hasEncoder() const;
204 
205  OmmReal();
206  virtual ~OmmReal();
207  OmmReal( const OmmReal& );
208  OmmReal& operator=( const OmmReal& );
209 
210  OmmRealDecoder* _pDecoder;
211  UInt64 _space[14];
212 };
213 
214 }
215 
216 }
217 
218 }
219 
220 #endif //__thomsonreuters_ema_access_OmmReal_h
long long Int64
represents 64-bit signed integer
Definition: Common.h:74
unsigned long long UInt64
represents 64-bit unsigned integer
Definition: Common.h:68
EmaString class is a container of a null terminated Ascii character string.
Definition: EmaString.h:56
EmaBuffer represents a general use binary buffer.
Definition: EmaBuffer.h:32
#define EMA_ACCESS_API
Definition: Common.h:95
OmmReal represents Real number in Omm.
Definition: OmmReal.h:71
Data class is a parent abstract class defining common interfaces for all Data type classes...
Definition: Data.h:38