EMA C++ Edition
EmaString.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_EmaString_h
10#define __refinitiv_ema_access_EmaString_h
11
49
50namespace refinitiv {
51
52namespace ema {
53
54namespace access {
55
57{
58public :
59
64 static const UInt32 npos = -1;
65
67
68
71
81 EmaString( const char* str, UInt32 length = EmaString::npos );
82
86 EmaString( const EmaString& other );
88
90
91
93 virtual ~EmaString();
94 //}@
95
97
98
102
107
116 EmaString& set( const char* str, UInt32 length = EmaString::npos );
117
123 EmaString& operator=( const EmaString& other );
124
131 EmaString& operator=( const char* other );
132
139
146
153
160
166 EmaString& append( float value );
167
173 EmaString& append( double value );
174
180 EmaString& append( const char* value );
181
187 EmaString& append( const EmaString& value );
188
195
202
209
216
222 EmaString& operator+=( float value );
223
229 EmaString& operator+=( double value );
230
236 EmaString& operator+=( const char* value );
237
244
250 EmaString operator+( const EmaString& str ) const;
251
257 EmaString operator+( const char* str ) const;
258
264 char& operator[]( UInt32 index );
265
271
273
274
277 bool empty() const;
278
282 virtual const char* c_str() const;
283
287 UInt32 length() const;
288
294 char operator[]( UInt32 index ) const;
295
302 EmaString substr( UInt32 index, UInt32 length ) const;
303
308 operator const char* () const;
309
316 Int32 find( const EmaString& str, Int32 index = 0 ) const;
317
324 Int32 find( const char* str, Int32 index = 0 ) const;
325
331 Int32 findLast( const EmaString& str ) const;
332
338 Int32 findLast( const char* ) const;
339
345 bool operator==( const EmaString& str ) const;
346
352 bool operator!=( const EmaString& str ) const;
353
359 bool operator>( const EmaString& str ) const;
360
366 bool operator<( const EmaString& str ) const;
367
373 bool operator>=( const EmaString& str ) const;
374
380 bool operator<=( const EmaString& str ) const;
381
387 bool operator==( const char* str ) const;
388
394 bool operator!=( const char* str ) const;
395
401 bool operator>( const char* str ) const;
402
408 bool operator<( const char* str ) const;
409
415 bool operator>=( const char* str ) const;
416
422 bool operator<=( const char* str ) const;
423
428 bool caseInsensitiveCompare( const EmaString& str ) const;
429
434 bool caseInsensitiveCompare( const char * str ) const;
436
437protected:
438
439 mutable char* _pString;
442
443private:
444
445 UInt32 _resizeCounter;
446 int compare( const char * rhs ) const;
447};
448
449}
450
451}
452
453}
454
455#endif //__refinitiv_ema_access_EmaString_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
int Int32
represents 32-bit signed integer
Definition: Common.h:62
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 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.
EmaString class is a container of a null terminated Ascii character string.
Definition: EmaString.h:57
EmaString & set(const char *str, UInt32 length=EmaString::npos)
EmaString & operator+=(UInt32 value)
EmaString & append(UInt64 value)
bool operator<=(const EmaString &str) const
EmaString(const char *str, UInt32 length=EmaString::npos)
EmaString & operator=(const char *other)
virtual const char * c_str() const
bool operator>=(const char *str) const
bool operator==(const EmaString &str) const
char operator[](UInt32 index) const
char & operator[](UInt32 index)
bool operator!=(const EmaString &str) const
EmaString & operator+=(double value)
EmaString substr(UInt32 index, UInt32 length) const
EmaString & append(Int32 value)
bool operator!=(const char *str) const
Int32 findLast(const EmaString &str) const
Int32 find(const EmaString &str, Int32 index=0) const
EmaString & operator+=(Int64 value)
EmaString & append(float value)
bool caseInsensitiveCompare(const char *str) const
bool operator<(const EmaString &str) const
EmaString & operator+=(float value)
EmaString & operator+=(UInt64 value)
EmaString & operator=(const EmaString &other)
EmaString & operator+=(const EmaString &value)
EmaString & append(UInt32 value)
Int32 findLast(const char *) const
EmaString & append(const char *value)
EmaString operator+(const EmaString &str) const
bool operator>(const EmaString &str) const
bool operator>=(const EmaString &str) const
bool operator<(const char *str) const
EmaString & append(const EmaString &value)
EmaString & append(double value)
EmaString & operator+=(Int32 value)
Int32 find(const char *str, Int32 index=0) const
EmaString & operator+=(const char *value)
EmaString & append(Int64 value)
bool operator==(const char *str) const
static const UInt32 npos
Definition: EmaString.h:64
EmaString operator+(const char *str) const
bool operator<=(const char *str) const
bool operator>(const char *str) const
EmaString(const EmaString &other)
bool caseInsensitiveCompare(const EmaString &str) const