EMA C++ Edition
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ReqMsg.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_ReqMsg_h
10 #define __thomsonreuters_ema_access_ReqMsg_h
11 
50 #include "Access/Include/Msg.h"
51 
52 namespace thomsonreuters {
53 
54 namespace ema {
55 
56 namespace access {
57 
58 class EMA_ACCESS_API ReqMsg : public Msg
59 {
60 public :
61 
65  enum Rate
66  {
67  TickByTickEnum = 0,
70  JustInTimeConflatedEnum = 0xFFFFFF00,
73  BestConflatedRateEnum = 0xFFFFFFFF,
75  BestRateEnum = 0xFFFFFFFE
76  };
77 
82  {
83  RealTimeEnum = 0,
86  BestDelayedTimelinessEnum = 0xFFFFFFFF,
88  BestTimelinessEnum = 0xFFFFFFFE
89  };
90 
92 
93 
95  ReqMsg();
96 
101  ReqMsg( const ReqMsg& other );
103 
105 
106 
108  virtual ~ReqMsg();
110 
112 
113 
116  const EmaString& getRateAsString() const;
117 
121  const EmaString& getTimelinessAsString() const;
122 
126  DataType::DataTypeEnum getDataType() const;
127 
131  Data::DataCode getCode() const;
132 
136  const EmaBuffer& getAsHex() const;
137 
141  const EmaString& toString() const;
142 
147  bool hasPriority() const;
148 
153  bool hasQos() const;
154 
159  bool hasView() const;
160 
165  bool hasBatch() const;
166 
171  bool hasServiceName() const;
172 
177  UInt8 getPriorityClass() const;
178 
183  UInt16 getPriorityCount() const;
184 
189  UInt32 getQosTimeliness() const;
190 
195  UInt32 getQosRate() const;
196 
200  bool getInitialImage() const;
201 
205  bool getInterestAfterRefresh() const;
206 
210  bool getConflatedInUpdates() const;
211 
215  bool getPause() const;
216 
220  bool getPrivateStream() const;
221 
226  const EmaString& getServiceName() const;
228 
230 
231 
235  ReqMsg& clear();
236 
241  ReqMsg& streamId( Int32 streamId );
242 
248  ReqMsg& domainType( UInt16 domainType = rdm::MMT_MARKET_PRICE );
249 
254  ReqMsg& name( const EmaString& name );
255 
260  ReqMsg& nameType( UInt8 nameType = rdm::INSTRUMENT_NAME_RIC );
261 
268  ReqMsg& serviceName( const EmaString& serviceName );
269 
276  ReqMsg& serviceId( UInt32 serviceId );
277 
282  ReqMsg& id( Int32 id );
283 
288  ReqMsg& filter( UInt32 filter );
289 
295  ReqMsg& priority( UInt8 priorityClass = 1, UInt16 priorityCount = 1 );
296 
302  ReqMsg& qos( UInt32 timeliness = BestTimelinessEnum, UInt32 rate = BestRateEnum );
303 
308  ReqMsg& attrib( const ComplexType& data );
309 
314  ReqMsg& payload( const ComplexType& data );
315 
320  ReqMsg& extendedHeader( const EmaBuffer& Buffer );
321 
326  ReqMsg& initialImage( bool initialImage = true );
327 
332  ReqMsg& interestAfterRefresh( bool interestAfterRefresh = true );
333 
338  ReqMsg& pause( bool pause = false );
339 
344  ReqMsg& conflatedInUpdates( bool conflatedInUpdates = false );
345 
350  ReqMsg& privateStream( bool privateStream = false );
352 
353 private :
354 
355  friend class MarketItemHandler;
356  friend class DirectoryHandler;
357  friend class DictionaryHandler;
358 
359  const EmaString& toString( UInt64 ) const;
360 
361  Decoder& getDecoder();
362 
363  ReqMsg& operator=( const ReqMsg& );
364 
365  mutable EmaString _toString;
366 };
367 
368 }
369 
370 }
371 
372 }
373 
374 #endif // __thomsonreuters_ema_access_ReqMsg_h
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
Msg class is a parent class for all message representing classes.
Definition: Msg.h:45
unsigned int UInt32
represents 32-bit unsigned integer
Definition: Common.h:56
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
ComplexType class is a parent class from whom all complex data types inherit.
Definition: ComplexType.h:33
int Int32
represents 32-bit signed integer
Definition: Common.h:62
static const thomsonreuters::ema::access::UInt8 INSTRUMENT_NAME_RIC
Definition: EmaRdm.h:197
static const thomsonreuters::ema::access::UInt8 MMT_MARKET_PRICE
Definition: EmaRdm.h:50
unsigned char UInt8
represents 8-bit unsigned integer
Definition: Common.h:32