#include <yateclass.h>
Inheritance diagram for HashList:
Public Member Functions | |
HashList (unsigned int size=17) | |
virtual | ~HashList () |
virtual void * | getObject (const String &name) const |
unsigned int | length () const |
unsigned int | count () const |
ObjList * | getList (unsigned int index) const |
ObjList * | getHashList (unsigned int hash) const |
ObjList * | getHashList (const String &str) const |
GenObject * | operator[] (const String &str) const |
ObjList * | find (const GenObject *obj) const |
ObjList * | find (const String &str) const |
ObjList * | append (const GenObject *obj) |
GenObject * | remove (GenObject *obj, bool delobj=true) |
void | clear () |
bool | resync (GenObject *obj) |
bool | resync () |
A hashed object list handling class. Objects placed in the list are distributed according to their String hash resulting in faster searches. On the other hand an object placed in a hashed list must never change its String value or it becomes unfindable.
|
Creates a new, empty list.
|
|
Destroys the list and everything in it. |
|
Appends an object to the hashed list
|
|
Clear the list and optionally delete all contained objects |
|
Get the number of non-null objects in the list
|
|
Get the item in the list that holds an object by String value
|
|
Get the item in the list that holds an object
|
|
Retrive one of the internal object lists knowing the String value.
|
|
Retrive one of the internal object lists knowing the hash value.
|
|
Retrive one of the internal object lists. This method should be used only to iterate all objects in the list.
|
|
Get a pointer to a derived class given that class name
Reimplemented from GenObject. |
|
Get the number of hash entries
|
|
Array-like indexing operator
|
|
Delete the list item that holds a given object
|
|
Resync the list by checking if all stored objects belong to the list according to their hash
|
|
Resync the list by checking if a stored object belongs to the list according to its hash
|