EMA C++ Edition
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FieldList.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_FieldList_h
10 #define __thomsonreuters_ema_access_FieldList_h
11 
141 #include "Access/Include/OmmReal.h"
142 #include "Access/Include/OmmState.h"
143 #include "Access/Include/OmmQos.h"
145 
146 namespace thomsonreuters {
147 
148 namespace ema {
149 
150 namespace rdm {
151 
152 class DictionaryUtility;
153 
154 }
155 
156 namespace access {
157 
158 class ReqMsg;
159 class RefreshMsg;
160 class StatusMsg;
161 class UpdateMsg;
162 class GenericMsg;
163 class PostMsg;
164 class AckMsg;
165 class ElementList;
166 class Map;
167 class Vector;
168 class Series;
169 class FilterList;
170 class OmmArray;
171 class OmmOpaque;
172 class OmmXml;
173 class OmmAnsiPage;
174 
175 class FieldListDecoder;
176 class FieldListEncoder;
177 
179 {
180 public :
181 
183 
184 
186  FieldList();
188 
190 
191 
193  virtual ~FieldList();
195 
197 
198 
201  DataType::DataTypeEnum getDataType() const;
202 
206  Data::DataCode getCode() const;
207 
211  const EmaBuffer& getAsHex() const;
212 
216  const EmaString& toString() const;
217 
221  bool hasInfo() const;
222 
227  Int16 getInfoFieldListNum() const;
228 
233  Int16 getInfoDictionaryId() const;
234 
239  bool forth() const;
240 
246  bool forth( Int16 fieldId ) const;
247 
253  bool forth( const EmaString& name ) const;
254 
260  bool forth( const Data& data ) const;
261 
266  const FieldEntry& getEntry() const;
267 
270  void reset() const;
272 
274 
275 
279  FieldList& clear();
280 
288  FieldList& info( Int16 dictionaryId, Int16 fieldListNum );
289 
296  FieldList& addReqMsg( Int16 fieldId, const ReqMsg& value );
297 
304  FieldList& addRefreshMsg( Int16 fieldId, const RefreshMsg& value );
305 
312  FieldList& addStatusMsg( Int16 fieldId, const StatusMsg& value );
313 
320  FieldList& addUpdateMsg( Int16 fieldId, const UpdateMsg& value );
321 
328  FieldList& addPostMsg( Int16 fieldId, const PostMsg& value );
329 
336  FieldList& addAckMsg( Int16 fieldId, const AckMsg& value );
337 
344  FieldList& addGenericMsg( Int16 fieldId, const GenericMsg& value );
345 
352  FieldList& addFieldList( Int16 fieldId, const FieldList& value );
353 
360  FieldList& addElementList( Int16 fieldId, const ElementList& value );
361 
368  FieldList& addMap( Int16 fieldId, const Map& value );
369 
376  FieldList& addVector( Int16 fieldId, const Vector& value );
377 
384  FieldList& addSeries( Int16 fieldId, const Series& value );
385 
392  FieldList& addFilterList( Int16 fieldId, const FilterList& value );
393 
400  FieldList& addOpaque( Int16 fieldId, const OmmOpaque& value );
401 
408  FieldList& addXml( Int16 fieldId, const OmmXml& value );
409 
416  FieldList& addAnsiPage( Int16 fieldId, const OmmAnsiPage& value );
417 
424  FieldList& addInt( Int16 fieldId, Int64 value );
425 
432  FieldList& addUInt( Int16 fieldId, UInt64 value );
433 
441  FieldList& addReal( Int16 fieldId, Int64 mantissa, OmmReal::MagnitudeType magnitudeType );
442 
450  FieldList& addRealFromDouble( Int16 fieldId, double value,
452 
459  FieldList& addFloat( Int16 fieldId, float value );
460 
467  FieldList& addDouble( Int16 fieldId, double value );
468 
478  FieldList& addDate( Int16 fieldId, UInt16 year, UInt8 month, UInt8 day );
479 
492  FieldList& addTime( Int16 fieldId, UInt8 hour = 0, UInt8 minute = 0, UInt8 second = 0,
493  UInt16 millisecond = 0, UInt16 microsecond = 0, UInt16 nanosecond = 0 );
494 
510  FieldList& addDateTime( Int16 fieldId, UInt16 year, UInt8 month, UInt8 day,
511  UInt8 hour = 0, UInt8 minute = 0, UInt8 second = 0,
512  UInt16 millisecond = 0, UInt16 microsecond = 0, UInt16 nanosecond = 0 );
513 
521  FieldList& addQos( Int16 fieldId, UInt32 timeliness = OmmQos::RealTimeEnum, UInt32 rate = OmmQos::TickByTickEnum );
522 
532  FieldList& addState( Int16 fieldId, OmmState::StreamState streamState = OmmState::OpenEnum,
534  UInt8 statusCode = OmmState::NoneEnum,
535  const EmaString& statusText = EmaString() );
536 
543  FieldList& addEnum( Int16 fieldId, UInt16 value );
544 
551  FieldList& addBuffer( Int16 fieldId, const EmaBuffer& value );
552 
559  FieldList& addAscii( Int16 fieldId, const EmaString& value );
560 
567  FieldList& addUtf8( Int16 fieldId, const EmaBuffer& value );
568 
575  FieldList& addRmtes( Int16 fieldId, const EmaBuffer& value );
576 
583  FieldList& addArray( Int16 fieldId, const OmmArray& value );
584 
589  FieldList& addCodeInt( Int16 fieldId );
590 
595  FieldList& addCodeUInt( Int16 fieldId );
596 
601  FieldList& addCodeReal( Int16 fieldId );
602 
607  FieldList& addCodeFloat( Int16 fieldId );
608 
613  FieldList& addCodeDouble( Int16 fieldId );
614 
619  FieldList& addCodeDate( Int16 fieldId );
620 
625  FieldList& addCodeTime( Int16 fieldId );
626 
631  FieldList& addCodeDateTime( Int16 fieldId );
632 
637  FieldList& addCodeQos( Int16 fieldId );
638 
643  FieldList& addCodeState( Int16 fieldId );
644 
649  FieldList& addCodeEnum( Int16 fieldId );
650 
654  FieldList& addCodeBuffer( Int16 fieldId );
655 
660  FieldList& addCodeAscii( Int16 fieldId );
661 
666  FieldList& addCodeUtf8( Int16 fieldId );
667 
671  FieldList& addCodeRmtes( Int16 fieldId );
672 
677  const FieldList& complete();
679 
680 private :
681 
683 
684  void getInfoXmlStr( EmaString& ) const;
685 
686  Decoder& getDecoder();
687  bool hasDecoder() const;
688 
689  const Encoder& getEncoder() const;
690  bool hasEncoder() const;
691 
692  const EmaString& toString( UInt64 indent ) const;
693 
694  mutable EmaString _toString;
695  FieldEntry _entry;
696  FieldListDecoder* _pDecoder;
697  mutable FieldListEncoder* _pEncoder;
698 
699  FieldList( const FieldList& );
700  FieldList& operator=( const FieldList&);
701 };
702 
703 }
704 
705 }
706 
707 }
708 
709 #endif // __thomsonreuters_ema_access_FieldList_h
FieldEntry represents an entry of FieldList.
Definition: FieldEntry.h:98
long long Int64
represents 64-bit signed integer
Definition: Common.h:74
unsigned short UInt16
represents 16-bit unsigned integer
Definition: Common.h:44
FilterList is a heterogeneous container of complex data type entries.
Definition: FilterList.h:132
unsigned long long UInt64
represents 64-bit unsigned integer
Definition: Common.h:68
unsigned int UInt32
represents 32-bit unsigned integer
Definition: Common.h:56
OmmOpaque represents Opaque data format in Omm.
Definition: OmmOpaque.h:72
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
ReqMsg allows consumer application to express its interest in an item.
Definition: ReqMsg.h:58
#define EMA_ACCESS_API
Definition: Common.h:95
Vector is a homogeneous container of complex data type entries.
Definition: Vector.h:121
ComplexType class is a parent class from whom all complex data types inherit.
Definition: ComplexType.h:33
StatusMsg conveys item state information.
Definition: StatusMsg.h:79
RefreshMsg conveys item image, state, permission and group information.
Definition: RefreshMsg.h:78
GenericMsg allows applications to bidirectionally send messages without any implied message semantics...
Definition: GenericMsg.h:86
ElementList is a heterogeneous container of complex and primitive data type entries.
Definition: ElementList.h:176
OmmXml represents XML data format in Omm.
Definition: OmmXml.h:72
OmmArray is a homogeneous container of primitive data type entries.
Definition: OmmArray.h:85
FieldList is a heterogeneous container of complex and primitive data type entries.
Definition: FieldList.h:178
UpdateMsg conveys changes to item data.
Definition: UpdateMsg.h:71
Series is a homogeneous container of complex data type entries.
Definition: Series.h:128
Map is a homogeneous container of complex data type entries.
Definition: Map.h:124
PostMsg allows consumer applications to contribute content.
Definition: PostMsg.h:61
Data class is a parent abstract class defining common interfaces for all Data type classes...
Definition: Data.h:38
AckMsg indicates success or failure of PostMsg.
Definition: AckMsg.h:67
unsigned char UInt8
represents 8-bit unsigned integer
Definition: Common.h:32
OmmAnsiPage represents AnsiPage data format in Omm.
Definition: OmmAnsiPage.h:72
short Int16
represents 16-bit signed integer
Definition: Common.h:50