ADTF  3.18.3
stringmap.h
Go to the documentation of this file.
1 
7 #ifndef _STRINGMAP_CLASS_HEADER_
8 #define _STRINGMAP_CLASS_HEADER_
9 
10 
11 namespace A_UTILS_NS
12 {
13 
19 class DOEXPORT cStringMap
20 {
22 
23 
25 
26  protected:
28  tStringMap m_Map;
29 
30  public:
37 
45  cStringMap(const cStringMap& Map);
46 
52  virtual ~cStringMap();
53 
59  tVoid Clear();
60 
71  tBool Set(const cString& strKey, const cString& strString);
72 
83  tBool Delete(const cString& strKey);
84 
94  tBool Copy(const cStringMap& Map);
95 
104  tInt32 GetItemCount() const;
105 
118  cString Get(const cString& strKey, const cString& strDefault=cString()) const;
119 
131  tBool Get(tInt32 nIdx, cString& strKey, cString& strValue) const;
132 
146  cString Join(const cString& strSeparator,
147  const cString& strSeparator2 = cString(),
148  const cString& strQuoteChar = cString()) const;
149 
161  cString& operator[](const cString& strKey);
162 
173  cString& operator[](tInt32 nIdx);
174 
175 
184  tBool IsEmpty() const;
185 
195  cStringMap& operator=(const cStringMap& Map);
196 
197  protected:
198 
205  tVoid Initialize();
206 
217  cString& GetRef(const cString& strKey);
218 
229  cString& GetRef(tInt32 nIdx);
230 };
231 
232 } // namespace A_UTILS_NS
233 
234 #endif // _STRINGMAP_CLASS_HEADER_
int32_t tInt32
type definition for signed integer values (32bit) (platform and compiler independent type).
void tVoid
The tVoid is always the definition for the void (non-type).
bool tBool
The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).
String map class.
Definition: stringmap.h:20
std::map< cString, cString, cStringCompareFunc > tStringMap
definition of string maps containing cStrings for key and value
Definition: stringmap.h:24
#define A_UTILS_D(__pclassname_)
Helper macro for d-pattern definitions.
Definition: d_ptr.h:270
ADTF A_UTIL Namespace - Within adtf this is used as adtf::util or adtf_util.
Definition: d_ptr.h:11
Compare function for stl container e.g.
Definition: string.h:2469