EMA C++ Edition
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Vector.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_vector_h
10 #define __thomsonreuters_ema_access_vector_h
11 
111 
112 namespace thomsonreuters {
113 
114 namespace ema {
115 
116 namespace access {
117 
118 class VectorDecoder;
119 class VectorEncoder;
120 
122 {
123 public :
124 
126 
127 
129  Vector();
131 
133 
134 
136  virtual ~Vector();
138 
140 
141 
144  DataType::DataTypeEnum getDataType() const;
145 
149  Data::DataCode getCode() const;
150 
154  const EmaBuffer& getAsHex() const;
155 
159  const EmaString& toString() const;
160 
164  bool forth() const;
165 
168  void reset() const;
169 
173  bool hasTotalCountHint() const;
174 
178  bool getSortable() const;
179 
184  UInt32 getTotalCountHint() const;
185 
190  const SummaryData& getSummaryData() const;
191 
196  const VectorEntry& getEntry() const;
198 
200 
201 
205  Vector& clear();
206 
216  Vector& add( UInt32 position, VectorEntry::VectorAction action,
217  const ComplexType& value, const EmaBuffer& permissionData = EmaBuffer() );
218 
226  Vector& add( UInt32 position, VectorEntry::VectorAction action, const EmaBuffer& permissionData = EmaBuffer() );
227 
232  const Vector& complete();
233 
238  Vector& sortable( bool sortable = false );
239 
244  Vector& totalCountHint( UInt32 totalCountHint );
245 
252  Vector& summaryData( const ComplexType& data );
254 
255 private :
256 
257  Decoder& getDecoder();
258  bool hasDecoder() const;
259 
260  const Encoder& getEncoder() const;
261  bool hasEncoder() const;
262 
263  const EmaString& toString( UInt64 ) const;
264 
265  mutable EmaString _toString;
266  VectorEntry _entry;
267  SummaryData _summary;
268  VectorDecoder* _pDecoder;
269  mutable VectorEncoder* _pEncoder;
270 
271  Vector( const Vector& );
272  Vector& operator=( const Vector& );
273 };
274 
275 }
276 
277 }
278 
279 }
280 
281 #endif // __thomsonreuters_ema_access_vector_h
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
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
SummaryData is used to convey Omm SummaryData information optionally present on Map, Series and Vector.
Definition: SummaryData.h:98
#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
VectorEntry represents an entry of Vector.
Definition: VectorEntry.h:86