EMA C++ Edition
ElementList.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_ElementList_h
10#define __refinitiv_ema_access_ElementList_h
11
147#include "DataDictionary.h"
148
149namespace refinitiv {
150
151namespace ema {
152
153namespace access {
154
155class EmaString;
156class EmaBuffer;
157class ReqMsg;
158class RefreshMsg;
159class StatusMsg;
160class UpdateMsg;
161class GenericMsg;
162class PostMsg;
163class AckMsg;
164class FieldList;
165class Map;
166class Vector;
167class Series;
168class FilterList;
169class OmmArray;
170class OmmOpaque;
171class OmmXml;
172class OmmAnsiPage;
173
174class ElementListDecoder;
175class ElementListEncoder;
176
178{
179public :
180
182
183
187
189
190
192 virtual ~ElementList();
194
196
197
201
206
210 const EmaBuffer& getAsHex() const;
211
215 const EmaString& toString() const;
216
221 const EmaString& toString( const refinitiv::ema::rdm::DataDictionary& dictionary ) const;
222
226 bool hasInfo() const;
227
233
238 bool forth() const;
239
245 bool forth( const EmaString& name ) const;
246
252 bool forth( const Data& data ) const;
253
258 const ElementEntry& getEntry() const;
259
262 void reset() const;
264
266
267
272
279 ElementList& info( Int16 elementListNum );
280
287 ElementList& addReqMsg( const EmaString& name, const ReqMsg& value );
288
295 ElementList& addRefreshMsg( const EmaString& name, const RefreshMsg& value );
296
303 ElementList& addStatusMsg( const EmaString& name, const StatusMsg& value );
304
311 ElementList& addUpdateMsg( const EmaString& name, const UpdateMsg& value );
312
319 ElementList& addPostMsg( const EmaString& name, const PostMsg& value );
320
327 ElementList& addAckMsg( const EmaString& name, const AckMsg& value );
328
335 ElementList& addGenericMsg( const EmaString& name, const GenericMsg& value );
336
343 ElementList& addFieldList( const EmaString& name, const FieldList& value );
344
351 ElementList& addElementList( const EmaString& name, const ElementList& value );
352
359 ElementList& addMap( const EmaString& name, const Map& value );
360
367 ElementList& addVector( const EmaString& name, const Vector& value );
368
375 ElementList& addSeries( const EmaString& name, const Series& value );
376
383 ElementList& addFilterList( const EmaString& name, const FilterList& value );
384
391 ElementList& addOpaque( const EmaString& name, const OmmOpaque& value );
392
399 ElementList& addXml( const EmaString& name, const OmmXml& value );
400
407 ElementList& addAnsiPage( const EmaString& name, const OmmAnsiPage& value );
408
415 ElementList& addInt( const EmaString& name, Int64 value );
416
423 ElementList& addUInt( const EmaString& name, UInt64 value );
424
432 ElementList& addReal( const EmaString& name, Int64 mantissa, OmmReal::MagnitudeType magnitudeType );
433
441 ElementList& addRealFromDouble( const EmaString& name, double value,
443
450 ElementList& addFloat( const EmaString& name, float value );
451
458 ElementList& addDouble( const EmaString& name, double value );
459
469 ElementList& addDate( const EmaString& name, UInt16 year, UInt8 month, UInt8 day );
470
483 ElementList& addTime( const EmaString& name, UInt8 hour = 0, UInt8 minute = 0, UInt8 second = 0,
484 UInt16 millisecond = 0, UInt16 microsecond = 0, UInt16 nanosecond = 0 );
485
502 UInt16 year, UInt8 month, UInt8 day,
503 UInt8 hour = 0, UInt8 minute = 0, UInt8 second = 0,
504 UInt16 millisecond = 0, UInt16 microsecond = 0, UInt16 nanosecond = 0 );
505
514 UInt32 timeliness = OmmQos::RealTimeEnum,
516
529 UInt8 statusCode = OmmState::NoneEnum,
530 const EmaString& statusText = EmaString() );
531
538 ElementList& addEnum( const EmaString& name, UInt16 value );
539
546 ElementList& addBuffer( const EmaString& name, const EmaBuffer& value );
547
554 ElementList& addAscii( const EmaString& name, const EmaString& value );
555
562 ElementList& addUtf8( const EmaString& name, const EmaBuffer& value );
563
570 ElementList& addRmtes( const EmaString& name, const EmaBuffer& value );
571
578 ElementList& addArray( const EmaString& name, const OmmArray& value );
579
585
591
597
603
609
615
621
627
633
639
645
651
657
663
669
674 ElementList& add( const EmaString& name );
675
682
683private :
684
685 void getInfoXmlStr( EmaString& ) const;
686
687 Decoder& getDecoder();
688 bool hasDecoder() const;
689
690 const Encoder& getEncoder() const;
691 bool hasEncoder() const;
692
693 const EmaString& toString( UInt64 indent ) const;
694
695 mutable EmaString _toString;
696 ElementEntry _entry;
697 mutable ElementListDecoder* _pDecoder;
698 mutable ElementListEncoder* _pEncoder;
699
700 ElementList( const ElementList& );
701 ElementList& operator=( const ElementList& );
702};
703
704}
705
706}
707
708}
709
710#endif // __refinitiv_ema_access_ElementList_h
#define EMA_ACCESS_API
Definition: Common.h:95
*|--------------------------------------------------------------------------—
Definition: AckMsg.h:62
short Int16
represents 16-bit signed integer
Definition: Common.h:50
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.
AckMsg indicates success or failure of PostMsg.
Definition: AckMsg.h:69
ComplexType class is a parent class from whom all complex data types inherit.
Definition: ComplexType.h:34
Data class is a parent abstract class defining common interfaces for all Data type classes.
Definition: Data.h:39
ElementEntry represents an entry of ElementList.
Definition: ElementEntry.h:97
ElementList is a heterogeneous container of complex and primitive data type entries.
Definition: ElementList.h:178
ElementList & addFloat(const EmaString &name, float value)
ElementList & addFilterList(const EmaString &name, const FilterList &value)
ElementList & addRealFromDouble(const EmaString &name, double value, OmmReal::MagnitudeType magnitudeType=OmmReal::Exponent0Enum)
ElementList & addUpdateMsg(const EmaString &name, const UpdateMsg &value)
DataType::DataTypeEnum getDataType() const
ElementList & addAnsiPage(const EmaString &name, const OmmAnsiPage &value)
ElementList & addCodeQos(const EmaString &name)
const ElementList & complete()
ElementList & addCodeDouble(const EmaString &name)
ElementList & addState(const EmaString &name, OmmState::StreamState streamState=OmmState::OpenEnum, OmmState::DataState dataState=OmmState::OkEnum, UInt8 statusCode=OmmState::NoneEnum, const EmaString &statusText=EmaString())
ElementList & addCodeEnum(const EmaString &name)
const ElementEntry & getEntry() const
ElementList & addSeries(const EmaString &name, const Series &value)
ElementList & addReqMsg(const EmaString &name, const ReqMsg &value)
ElementList & addAscii(const EmaString &name, const EmaString &value)
const EmaBuffer & getAsHex() const
ElementList & addStatusMsg(const EmaString &name, const StatusMsg &value)
ElementList & addCodeReal(const EmaString &name)
ElementList & addVector(const EmaString &name, const Vector &value)
ElementList & addUtf8(const EmaString &name, const EmaBuffer &value)
ElementList & addElementList(const EmaString &name, const ElementList &value)
ElementList & addPostMsg(const EmaString &name, const PostMsg &value)
ElementList & addAckMsg(const EmaString &name, const AckMsg &value)
ElementList & info(Int16 elementListNum)
ElementList & addFieldList(const EmaString &name, const FieldList &value)
ElementList & addOpaque(const EmaString &name, const OmmOpaque &value)
ElementList & addArray(const EmaString &name, const OmmArray &value)
const EmaString & toString() const
ElementList & addCodeState(const EmaString &name)
ElementList & addEnum(const EmaString &name, UInt16 value)
ElementList & addDate(const EmaString &name, UInt16 year, UInt8 month, UInt8 day)
ElementList & add(const EmaString &name)
ElementList & addDouble(const EmaString &name, double value)
ElementList & addDateTime(const EmaString &name, UInt16 year, UInt8 month, UInt8 day, UInt8 hour=0, UInt8 minute=0, UInt8 second=0, UInt16 millisecond=0, UInt16 microsecond=0, UInt16 nanosecond=0)
ElementList & addCodeFloat(const EmaString &name)
ElementList & addCodeUtf8(const EmaString &name)
ElementList & addCodeRmtes(const EmaString &name)
bool forth(const Data &data) const
ElementList & addUInt(const EmaString &name, UInt64 value)
ElementList & addCodeDateTime(const EmaString &name)
ElementList & addBuffer(const EmaString &name, const EmaBuffer &value)
bool forth(const EmaString &name) const
ElementList & addRefreshMsg(const EmaString &name, const RefreshMsg &value)
ElementList & addCodeBuffer(const EmaString &name)
ElementList & addRmtes(const EmaString &name, const EmaBuffer &value)
ElementList & addCodeTime(const EmaString &name)
ElementList & addCodeAscii(const EmaString &name)
ElementList & addCodeInt(const EmaString &name)
ElementList & addXml(const EmaString &name, const OmmXml &value)
ElementList & addCodeUInt(const EmaString &name)
ElementList & addCodeDate(const EmaString &name)
Data::DataCode getCode() const
ElementList & addTime(const EmaString &name, UInt8 hour=0, UInt8 minute=0, UInt8 second=0, UInt16 millisecond=0, UInt16 microsecond=0, UInt16 nanosecond=0)
ElementList & addInt(const EmaString &name, Int64 value)
ElementList & addMap(const EmaString &name, const Map &value)
ElementList & addGenericMsg(const EmaString &name, const GenericMsg &value)
ElementList & addQos(const EmaString &name, UInt32 timeliness=OmmQos::RealTimeEnum, UInt32 rate=OmmQos::TickByTickEnum)
ElementList & addReal(const EmaString &name, Int64 mantissa, OmmReal::MagnitudeType magnitudeType)
const EmaString & toString(const refinitiv::ema::rdm::DataDictionary &dictionary) const
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
FieldList is a heterogeneous container of complex and primitive data type entries.
Definition: FieldList.h:180
FilterList is a heterogeneous container of complex data type entries.
Definition: FilterList.h:134
GenericMsg allows applications to bidirectionally send messages without any implied message semantics...
Definition: GenericMsg.h:88
Map is a homogeneous container of complex data type entries.
Definition: Map.h:126
OmmAnsiPage represents AnsiPage data format in Omm.
Definition: OmmAnsiPage.h:73
OmmArray is a homogeneous container of primitive data type entries.
Definition: OmmArray.h:87
OmmOpaque represents Opaque data format in Omm.
Definition: OmmOpaque.h:73
OmmXml represents XML data format in Omm.
Definition: OmmXml.h:73
PostMsg allows consumer applications to contribute content.
Definition: PostMsg.h:63
RefreshMsg conveys item image, state, permission and group information.
Definition: RefreshMsg.h:80
ReqMsg allows consumer application to express its interest in an item.
Definition: ReqMsg.h:60
Series is a homogeneous container of complex data type entries.
Definition: Series.h:130
StatusMsg conveys item state information.
Definition: StatusMsg.h:81
UpdateMsg conveys changes to item data.
Definition: UpdateMsg.h:73
Vector is a homogeneous container of complex data type entries.
Definition: Vector.h:123