EMA C++ Edition
EmaBuffer.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 LSEG. All rights reserved. --
6 *|-----------------------------------------------------------------------------
7 */
8
9#ifndef __refinitiv_ema_access_EmaBuffer_h
10#define __refinitiv_ema_access_EmaBuffer_h
11
23
24namespace refinitiv {
25
26namespace ema {
27
28namespace access {
29
30class CastingOperatorContext;
31
33{
34public :
35
37
38
41
47 EmaBuffer( const char* buf, UInt32 length );
48
53 EmaBuffer( const EmaBuffer& buf );
55
57
58
60 virtual ~EmaBuffer();
62
64
65
69
76
83 EmaBuffer& setFrom( const char* buf, UInt32 length );
84
90 EmaBuffer& append( const EmaBuffer& buf );
91
97 EmaBuffer& append( char c );
98
105 EmaBuffer& append( const char* buf, UInt32 length );
106
113
120
126 char& operator[]( UInt32 index );
128
130
131
134 const char* c_buf() const;
135
139 UInt32 length() const;
140
144 const char* asRawHexString() const;
145
149 operator const char* () const;
150
155 bool operator==( const EmaBuffer& buf ) const;
156
162 char operator[]( UInt32 index ) const;
164
165protected:
166
167 void markDirty() const;
168
169 char* _pBuffer;
172 mutable CastingOperatorContext* _pCastingOperatorContext;
173};
174
180EmaBuffer operator+( EmaBuffer buff_1, const EmaBuffer& buff_2 );
181
182}
183
184}
185
186}
187
188#endif // __refinitiv_ema_access_EmaBuffer_h
Common.h file provides definitions of common variable types used in EMA.
#define EMA_ACCESS_API
Definition: Common.h:95
*|--------------------------------------------------------------------------—
Definition: AckMsg.h:62
EmaBuffer operator+(EmaBuffer buff_1, const EmaBuffer &buff_2)
unsigned int UInt32
represents 32-bit unsigned integer
Definition: Common.h:56
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.
EmaBuffer represents a general use binary buffer.
Definition: EmaBuffer.h:33
char & operator[](UInt32 index)
CastingOperatorContext * _pCastingOperatorContext
Definition: EmaBuffer.h:172
EmaBuffer & operator+=(const EmaBuffer &buf)
EmaBuffer & append(const char *buf, UInt32 length)
const char * asRawHexString() const
bool operator==(const EmaBuffer &buf) const
EmaBuffer & operator=(const EmaBuffer &buf)
EmaBuffer & append(const EmaBuffer &buf)
EmaBuffer(const char *buf, UInt32 length)
char operator[](UInt32 index) const
EmaBuffer & setFrom(const char *buf, UInt32 length)
EmaBuffer(const EmaBuffer &buf)