EMA C++ Edition
OmmArray.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, 2024 LSEG. All rights reserved. --
6 *|-----------------------------------------------------------------------------
7 */
8
9#ifndef __refinitiv_ema_access_OmmArray_h
10#define __refinitiv_ema_access_OmmArray_h
11
70#include "Access/Include/Data.h"
75#include "DataDictionary.h"
76
77namespace refinitiv {
78
79namespace ema {
80
81namespace access {
82
83class OmmArrayDecoder;
84class OmmArrayEncoder;
85
87{
88public :
89
91
92
96
98
99
101 virtual ~OmmArray();
103
105
106
110
115
119 const EmaBuffer& getAsHex() const;
120
124 const EmaString& toString() const;
125
130 const EmaString& toString( const refinitiv::ema::rdm::DataDictionary& dictionary ) const;
131
135 bool hasFixedWidth() const;
136
141
146 bool forth() const;
147
152 const OmmArrayEntry& getEntry() const;
153
156 void reset() const;
158
160
161
166
204
211
218
225 OmmArray& addReal( Int64 mantissa, OmmReal::MagnitudeType magnitudeType );
226
234
240 OmmArray& addFloat( float value );
241
247 OmmArray& addDouble( double value );
248
257 OmmArray& addDate( UInt16 year, UInt8 month, UInt8 day );
258
270 OmmArray& addTime( UInt8 hour = 0, UInt8 minute = 0, UInt8 second = 0,
271 UInt16 millisecond = 0, UInt16 microsecond = 0, UInt16 nanosecond = 0 );
272
288 UInt8 hour = 0, UInt8 minute = 0, UInt8 second = 0,
289 UInt16 millisecond = 0, UInt16 microsecond = 0, UInt16 nanosecond = 0 );
290
298
309 UInt8 statusCode = OmmState::NoneEnum,
310 const EmaString& statusText = EmaString() );
311
318
324 OmmArray& addBuffer( const EmaBuffer& value );
325
331 OmmArray& addAscii( const EmaString& value );
332
338 OmmArray& addUtf8( const EmaBuffer& value );
339
345 OmmArray& addRmtes( const EmaBuffer& value );
346
352
358
364
370
376
382
388
394
400
406
412
418
424
430
436
442
443private :
444
445 Decoder& getDecoder();
446 bool hasDecoder() const;
447
448 const Encoder& getEncoder() const;
449 bool hasEncoder() const;
450
451 const EmaString& toString( UInt64 indent ) const;
452
453 mutable EmaString _toString;
454 OmmArrayEntry _entry;
455 mutable OmmArrayDecoder* _pDecoder;
456 mutable OmmArrayEncoder* _pEncoder;
457
458 OmmArray( const OmmArray& );
459 OmmArray& operator=( const OmmArray& );
460};
461
462}
463
464}
465
466}
467
468#endif // __refinitiv_ema_access_OmmArray_h
#define EMA_ACCESS_API
Definition: Common.h:95
*|--------------------------------------------------------------------------—
Definition: AckMsg.h:62
unsigned int UInt32
represents 32-bit unsigned integer
Definition: Common.h:56
long long Int64
represents 64-bit signed integer
Definition: Common.h:74
unsigned char UInt8
represents 8-bit unsigned integer
Definition: Common.h:32
unsigned short UInt16
represents 16-bit unsigned integer
Definition: Common.h:44
unsigned long long UInt64
represents 64-bit unsigned integer
Definition: Common.h:68
The access namespace contains all interfaces and definitions specified for use with the EMA Access pa...
The ema namespace contains all interfaces and definitions specified for use with EMA.
Data class is a parent abstract class defining common interfaces for all Data type classes.
Definition: Data.h:39
EmaBuffer represents a general use binary buffer.
Definition: EmaBuffer.h:33
EmaString class is a container of a null terminated Ascii character string.
Definition: EmaString.h:57
OmmArray is a homogeneous container of primitive data type entries.
Definition: OmmArray.h:87
DataType::DataTypeEnum getDataType() const
OmmArray & addReal(Int64 mantissa, OmmReal::MagnitudeType magnitudeType)
OmmArray & addTime(UInt8 hour=0, UInt8 minute=0, UInt8 second=0, UInt16 millisecond=0, UInt16 microsecond=0, UInt16 nanosecond=0)
OmmArray & addDate(UInt16 year, UInt8 month, UInt8 day)
OmmArray & addDateTime(UInt16 year, UInt8 month, UInt8 day, UInt8 hour=0, UInt8 minute=0, UInt8 second=0, UInt16 millisecond=0, UInt16 microsecond=0, UInt16 nanosecond=0)
OmmArray & addQos(UInt32 timeliness=OmmQos::RealTimeEnum, UInt32 rate=OmmQos::TickByTickEnum)
const EmaBuffer & getAsHex() const
Data::DataCode getCode() const
const EmaString & toString(const refinitiv::ema::rdm::DataDictionary &dictionary) const
OmmArray & addState(OmmState::StreamState streamState=OmmState::OpenEnum, OmmState::DataState dataState=OmmState::OkEnum, UInt8 statusCode=OmmState::NoneEnum, const EmaString &statusText=EmaString())
OmmArray & addBuffer(const EmaBuffer &value)
OmmArray & addFloat(float value)
const EmaString & toString() const
OmmArray & addUInt(UInt64 value)
OmmArray & addRealFromDouble(double value, OmmReal::MagnitudeType magnitudeType=OmmReal::Exponent0Enum)
OmmArray & addUtf8(const EmaBuffer &value)
OmmArray & addDouble(double value)
OmmArray & addInt(Int64 value)
const OmmArrayEntry & getEntry() const
OmmArray & fixedWidth(UInt16 width)
OmmArray & addRmtes(const EmaBuffer &value)
OmmArray & addEnum(UInt16 value)
OmmArray & addAscii(const EmaString &value)
OmmArrayEntry represents an entry of OmmArray.
Definition: OmmArrayEntry.h:78