KVIrc  4.9.2
DeveloperAPIs
KviKvsHash.h
Go to the documentation of this file.
1 #ifndef _KVI_KVS_HASH_H_
2 #define _KVI_KVS_HASH_H_
3 //=============================================================================
4 //
5 // File : KviKvsHash.h
6 // Creation date : Tue 07 Oct 2003 01:22:37 by Szymon Stefanek
7 //
8 // This file is part of the KVIrc IRC client distribution
9 // Copyright (C) 2003-2010 Szymon Stefanek <pragma at kvirc dot net>
10 //
11 // This program is FREE software. You can redistribute it and/or
12 // modify it under the terms of the GNU General Public License
13 // as published by the Free Software Foundation; either version 2
14 // of the License, or (at your option) any later version.
15 //
16 // This program is distributed in the HOPE that it will be USEFUL,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 // See the GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, write to the Free Software Foundation,
23 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 //
25 //=============================================================================
26 
33 #include "kvi_settings.h"
34 #include "KviPointerHashTable.h"
35 #include "KviQString.h"
36 #include "KviKvsVariant.h"
37 #include "KviHeapObject.h"
38 
40 
48 {
49 public:
54  KviKvsHash();
55 
63  KviKvsHash(const KviKvsHash & hash);
64 
68  ~KviKvsHash();
69 
70 public:
76  void unset(const QString & szKey);
77 
84  void set(const QString & szKey, KviKvsVariant * pVal);
85 
91  KviKvsVariant * find(const QString & szKey) const;
92 
101  KviKvsVariant * get(const QString & szKey);
102 
107  bool isEmpty() const;
108 
112  void clear();
113 
118  kvs_uint_t size() const;
119 
125  void appendAsString(QString & szBuffer) const;
126 
132 
138  void serialize(QString & szResult);
139 
140 private:
142 };
143 
144 #endif // _KVI_KVS_HASH_H_
Definition: KviHeapObject.h:124
This class defines a new data type which contains variant data.
Definition: KviKvsVariant.h:351
KviPointerHashTable< QString, KviKvsVariant > * m_pDict
Definition: KviKvsHash.h:141
#define KVIRC_API
Definition: kvi_settings.h:128
A fast pointer hash table iterator implementation.
Definition: KviPointerHashTable.h:393
This class defines a new data type which contains hash data.
Definition: KviKvsHash.h:47
btnDict clear()
Pointer Hash Table.
KVIRC_API_TYPEDEF KviPointerHashTableIterator< QString, KviKvsVariant > KviKvsHashIterator
Definition: KviKvsHash.h:39
kvi_u64_t kvs_uint_t
Definition: KviKvsTypes.h:34
Heap Object.
void set(void *dst_ptr, char c, int len)
Initializes len bytes of memory starting from dst_ptr to c.
Definition: KviMemory.h:152
Handling of variant data type in KVS.
char szBuffer[4096]
Definition: winamp.cpp:77
#define KVIRC_API_TYPEDEF
Definition: kvi_settings.h:129
This file contains compile time settings.
Helper functions for the QString class.