#include <HashList.h>
Inheritance diagram for CNHashList::

Public Methods | |
| CNHashList (unsigned long cap=DEFAULT_HASH_TABLE_CAPACITY) | |
| Initializes CNHashList. More... | |
| CNHashList (CNParam *) | |
| Initializes CNHashList with CNParam. | |
| ~CNHashList (void) | |
| Default Destructor. Frees all internally allocated resources. | |
| virtual void | store_key (CNKey *k) |
| Stores a key into the homogenous hash table. More... | |
| virtual void | store_key (CNKey &k) |
| Stores a key into the homogenous hash table. More... | |
| virtual CNKey * | get_key (const CNKey *k) const |
| Returns the key which matches the supplied key. More... | |
| virtual CNKey * | get_key (const CNKey &k) const |
| Returns the key which matches the supplied key. More... | |
| virtual CNObject * | get_object (const CNKey *k) const |
| Returns the object of the key which matches the supplied key. More... | |
| virtual CNObject * | get_object (const CNKey &k) const |
| Returns the object of the key which matches the supplied key. More... | |
| virtual bool | reset () |
| FIXME: Undocumented. | |
| virtual bool | reset_absolutely () |
| Deletes all entries of the actual hash table and resets it to its initial state. More... | |
| virtual bool | reset_absolutely_w_obj () |
| Deletes all entries of the actual hash table and resets it to its initial state. More... | |
| virtual bool | delete_key (const CNKey *k) |
| Deletes the key from the actual hash table which matches the given key. More... | |
| virtual bool | delete_key (const CNKey &k) |
| Deletes the key from the actual hash table which matches the given key. More... | |
| virtual bool | delete_key_absolutely (const CNKey *k) |
| The same as above. More... | |
| virtual bool | delete_key_absolutely (const CNKey &k) |
| The same as above. More... | |
| virtual bool | delete_key_absolutely_w_obj (const CNKey *k) |
| Deletes the key k from the actual hash table. More... | |
| virtual bool | delete_key_absolutely_w_obj (const CNKey &k) |
| Deletes the key k from the actual hash table. More... | |
| virtual bool | is_full () const |
If the actual table's capacityis exhausted, TRUE s returned, otherwise FALSE. | |
| virtual bool | is_empty () const |
If the actual table is empty, TRUE is returned, otherwise FALSE. | |
| virtual unsigned long | get_capacity () const |
| Returns the capacity of the current table. | |
| virtual unsigned long | get_num_entries () const |
| Returns the number of entries of the actual table. | |
| virtual CNClassDesc | class_desc () const |
| Returns the class description (pointer to instance of CNClass) for runtime type information. | |
| virtual bool | is_a (CNClassDesc desc) const |
| Checks Type. | |
| virtual void | print (ostream &strm=cout) const |
| Print output. | |
| virtual void | dump (ostream &strm=cout) const |
| Degug output. | |
Static Public Methods | |
| CNHashList * | cast_from_object (CNObject *obj) |
| Safes type Cast. | |
| CNObject * | new_object (CNParam *param=NIL) |
| Creates new Object. | |
Protected Methods | |
| HashEntry * | HashTable () const |
| FIXME: Undocumented. | |
Friends | |
| class | CNHashIterator |
| class | CNHashListIterator |
| friend iterator class. | |
Contrary to CNHashStatic the keys occuring more than once are stored in lists, i.e. the capacity of the hash table does not restrict the number of keys, that may be stored. Nontheless the capacity should be large enough for the number of keys to be stored in.
|
|
Initializes CNHashList. The hash table's capacity is set to the value passed to CNHashList. The capacity is static. Nontheless, you can store more keys since they are stored in lists. |
|
|
Deletes the key from the actual hash table which matches the given key.
After having deleted a key from the hash table, it is not necessary to rehash the table. This method does not free the memory allocated for the keys stored in the hash table. If the supplied key does not match any in the table, Reimplemented from CNHashTable. |
|
|
Deletes the key from the actual hash table which matches the given key.
After having deleted a key from the hash table, it is not necessary to rehash the table. This method does not free the memory allocated for the keys stored in the hash table. If the supplied key does not match any in the table, Reimplemented from CNHashTable. |
|
|
The same as above.
This method does free the memory allocated for the keys stored in the hash table. If the supplied key does not match any in the table, Reimplemented from CNHashTable. |
|
|
The same as above.
This method does free the memory allocated for the keys stored in the hash table. If the supplied key does not match any in the table, Reimplemented from CNHashTable. |
|
|
Deletes the key k from the actual hash table.
This method frees the memory allocated for the key stored in the hash table and frees the memory allocated for the object stored in the key. If the supplied key does not match any in the table, Reimplemented from CNHashTable. |
|
|
Deletes the key k from the actual hash table.
This method frees the memory allocated for the key stored in the hash table and frees the memory allocated for the object stored in the key. If the supplied key does not match any in the table, Reimplemented from CNHashTable. |
|
|
Returns the key which matches the supplied key.
If no matching key was found, Reimplemented from CNHashTable. |
|
|
Returns the key which matches the supplied key.
If no matching key was found, Reimplemented from CNHashTable. |
|
|
Returns the object of the key which matches the supplied key.
If no matching key was found or if no object has been stored in the key, Reimplemented from CNHashTable. |
|
|
Returns the object of the key which matches the supplied key.
If no matching key was found or if no object has been stored in the key, Reimplemented from CNHashTable. |
|
|
Deletes all entries of the actual hash table and resets it to its initial state.
This method does not free the memory allocated for the keys stored in the hash table or the objects stored in the keys. If the hash table is already empty, Reimplemented from CNHashTable. |
|
|
Deletes all entries of the actual hash table and resets it to its initial state.
This method frees the memory allocated for the keys stored in the hash table or the objects stored in the keys. If the hash table is already empty, Reimplemented from CNHashTable. |
|
|
Stores a key into the homogenous hash table. Only keys of the same type may be stored into the same table. The methods get_key() and get_object() should detect it. If a hashvalue occures the second time it will be stored in a list. Therefore the hash table will never be full unless the memory is exhausted. Reimplemented from CNHashTable. |
|
|
Stores a key into the homogenous hash table. Only keys of the same type may be stored into the same table. The methods get_key() and get_object() should detect it. If a hashvalue occures the second time it will be stored in a list. Therefore the hash table will never be full unless the memory is exhausted. Reimplemented from CNHashTable. |
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001