42 #include "qcollection.h" 53 QCollection::Item getData() {
return data; }
54 QCollection::Item setData( QCollection::Item d ) {
return data = d; }
59 QCollection::Item data;
68 const QString &getKey()
const {
return key; }
78 const char *getKey()
const {
return key; }
88 intptr_t getKey()
const {
return key; }
98 void *getKey()
const {
return key; }
107 uint
count()
const {
return numItems; }
108 uint size()
const {
return vlen; }
109 QCollection::Item look_string(
const QString& key, QCollection::Item,
111 QCollection::Item look_ascii(
const char *key, QCollection::Item,
int );
112 QCollection::Item look_int(
long key, QCollection::Item,
int );
113 QCollection::Item look_ptr(
void *key, QCollection::Item,
int );
114 #ifndef QT_NO_DATASTREAM 119 enum KeyType { StringKey, AsciiKey, IntKey, PtrKey };
121 QGDict( uint len, KeyType kt,
bool cs,
bool ck );
127 bool remove_string(
const QString &key, QCollection::Item item=0 );
128 bool remove_ascii(
const char *key, QCollection::Item item=0 );
129 bool remove_int(
long key, QCollection::Item item=0 );
130 bool remove_ptr(
void *key, QCollection::Item item=0 );
131 QCollection::Item take_string(
const QString &key );
132 QCollection::Item take_ascii(
const char *key );
133 QCollection::Item take_int(
long key );
134 QCollection::Item take_ptr(
void *key );
139 int hashKeyString(
const QString & );
140 int hashKeyAscii(
const char * );
142 void statistics()
const;
144 #ifndef QT_NO_DATASTREAM 158 QCollection::Item item = 0 );
159 QAsciiBucket *unlink_ascii(
const char *, QCollection::Item item = 0 );
160 QIntBucket *unlink_int(
long, QCollection::Item item = 0 );
161 QPtrBucket *unlink_ptr(
void *, QCollection::Item item = 0 );
162 void init( uint, KeyType,
bool,
bool );
176 QCollection::Item toFirst();
178 QCollection::Item
get()
const;
180 const char *getKeyAscii()
const;
181 intptr_t getKeyInt()
const;
182 void *getKeyPtr()
const;
184 QCollection::Item operator()();
185 QCollection::Item operator++();
186 QCollection::Item operator+=(uint);
196 inline QCollection::Item QGDictIterator::get()
const 198 return curNode ? curNode->getData() : 0;
201 inline QString QGDictIterator::getKeyString()
const 203 return curNode ? ((
QStringBucket*)curNode)->getKey() : QString::null;
206 inline const char *QGDictIterator::getKeyAscii()
const 208 return curNode ? ((
QAsciiBucket*)curNode)->getKey() : 0;
211 inline intptr_t QGDictIterator::getKeyInt()
const 213 return curNode ? ((
QIntBucket*)curNode)->getKey() : 0;
216 inline void *QGDictIterator::getKeyPtr()
const 218 return curNode ? ((
QPtrBucket*)curNode)->getKey() : 0;
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
uint count() const
Definition: qgdict.h:107
Definition: qgdict.cpp:66
The QCollection class is the base class of all Qt collections.
Definition: qcollection.h:51
An internal class for implementing QDictIterator and QIntDictIterator.
Definition: qgdict.h:167
The QGDict class is an internal class for implementing QDict template classes.
Definition: qgdict.h:104
The QDataStream class provides serialization of binary data to a QIODevice.
Definition: qdatastream.h:47