Keyed collection of objects. More...
#include <dictionary.h>

Public Member Functions | |
| void | clear (void) |
| kind & | operator[] (const statstring &st) |
| kind & | operator[] (const string &st) |
| kind & | operator[] (const char *st) |
| kind & | operator[] (int index) |
| kind * | visitchild (int index) |
| void | set (const statstring &id, kind *to) |
| void | set (const statstring &id, kind &to) |
| bool | exists (const statstring &s) |
| int | count (void) |
Protected Member Functions | |
| dictionaryEntry * | newentry (const statstring &id, bool alloc=true) |
| dictionaryEntry * | demand (const statstring &s, bool alloc=true) |
| void | remove (const statstring &s) |
| dictionaryEntry * | demand (unsigned int key, bool alloc=true) |
Protected Attributes | |
| class dictionaryEntry ** | _array |
| int | _arraysz |
| int | _count |
Keyed collection of objects.
Keeps an indexed collection of objects, using string keys.
| int dictionary< kind >::count | ( | void | ) | [inline] |
Get item count.
Referenced by dbfile::commit(), stringdict::count(), and dbrecord::operator[]().
| dictionaryEntry* dictionary< kind >::demand | ( | unsigned int | key, | |
| bool | alloc = true | |||
| ) | [inline, protected] |
Look up an entry in the dictionary by its numeric key.
| key | The object's numeric key. | |
| alloc | If false, no new objects will be allocated. |
| dictionaryEntry* dictionary< kind >::demand | ( | const statstring & | s, | |
| bool | alloc = true | |||
| ) | [inline, protected] |
Look up an entry in the dictionary.
| s | The object's key. | |
| alloc | If false, no new objects will be allocated. |
Referenced by dictionary< dbrecord >::operator[](), and dictionary< dbrecord >::set().
| bool dictionary< kind >::exists | ( | const statstring & | s | ) | [inline] |
Check the dictionary for a key.
| s | The key. |
Referenced by stringdict::get(), dbrecord::operator[](), httpdfileshare::run(), and httpdscriptparser::run().
| dictionaryEntry* dictionary< kind >::newentry | ( | const statstring & | id, | |
| bool | alloc = true | |||
| ) | [inline, protected] |
Adds a new entry to the array (without linking it into the tree).
| id | The object's key. | |
| alloc | If false, no new objects will be allocated - OBSOLETE. |
Referenced by dictionary< dbrecord >::demand().
| kind& dictionary< kind >::operator[] | ( | int | index | ) | [inline] |
Array access.
Looks up an entry by array index.
| idnex | The entry's index.). |
| kind& dictionary< kind >::operator[] | ( | const char * | st | ) | [inline] |
Array access.
Looks up an entry by key.
| st | The entry's key. |
| kind& dictionary< kind >::operator[] | ( | const string & | st | ) | [inline] |
Array access.
Looks up an entry by key.
| st | The entry's key. |
| kind& dictionary< kind >::operator[] | ( | const statstring & | st | ) | [inline] |
Array access.
Looks up an entry by key.
| st | The entry's key. |
| void dictionary< kind >::set | ( | const statstring & | id, | |
| kind * | to | |||
| ) | [inline] |
Associate an object with a key.
| id | The key for the object. | |
| to | Pointer to the object. |
Referenced by dbrecord::operator[]().
1.6.1