#include <container.hh>
Classes | |
| class | HashTableIterator |
| struct | Node |
Public Member Functions | |
| HashTable (bool ownerOfKeys, bool ownerOfValues, int tableSize=251) | |
| ~HashTable () | |
| void | intoStringBuffer (misc::StringBuffer *sb) |
| Store a textual representation of the object in a misc::StringBuffer. | |
| void | put (object::Object *key, object::Object *value) |
| bool | contains (object::Object *key) |
| Object * | get (object::Object *key) |
| bool | remove (object::Object *key) |
| Object * | getKey (Object *key) |
Protected Member Functions | |
| AbstractIterator * | createIterator () |
Private Member Functions | |
| int | calcHashValue (object::Object *key) |
Private Attributes | |
| Node ** | table |
| int | tableSize |
| bool | ownerOfKeys |
| bool | ownerOfValues |
Friends | |
| class | HashTableIterator |
| lout::container::untyped::HashTable::HashTable | ( | bool | ownerOfKeys, | |
| bool | ownerOfValues, | |||
| int | tableSize = 251 | |||
| ) |
References table.
| lout::container::untyped::HashTable::~HashTable | ( | ) |
| int lout::container::untyped::HashTable::calcHashValue | ( | object::Object * | key | ) | [inline, private] |
References lout::object::Object::hashValue(), and tableSize.
Referenced by contains(), get(), getKey(), put(), and remove().
| bool lout::container::untyped::HashTable::contains | ( | object::Object * | key | ) |
| Collection0::AbstractIterator * lout::container::untyped::HashTable::createIterator | ( | ) | [protected, virtual] |
| Object * lout::container::untyped::HashTable::get | ( | object::Object * | key | ) |
| void lout::container::untyped::HashTable::intoStringBuffer | ( | misc::StringBuffer * | sb | ) | [virtual] |
Store a textual representation of the object in a misc::StringBuffer.
This is used by object::Object::toString.
Reimplemented from lout::container::untyped::Collection.
References lout::misc::StringBuffer::append(), lout::container::untyped::HashTable::Node::next, table, and tableSize.
| void lout::container::untyped::HashTable::put | ( | object::Object * | key, | |
| object::Object * | value | |||
| ) |
| bool lout::container::untyped::HashTable::remove | ( | object::Object * | key | ) |
friend class HashTableIterator [friend] |
Referenced by createIterator().
bool lout::container::untyped::HashTable::ownerOfKeys [private] |
Referenced by remove(), and ~HashTable().
bool lout::container::untyped::HashTable::ownerOfValues [private] |
Referenced by remove(), and ~HashTable().
Node** lout::container::untyped::HashTable::table [private] |
int lout::container::untyped::HashTable::tableSize [private] |
1.5.9