Dillo
Classes | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
lout::container::untyped::HashTable Class Reference

A hash table. More...

#include <container.hh>

Classes

struct  KeyValuePair
 

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. More...
 
void put (object::Object *key, object::Object *value)
 
object::Objectget (object::Object *key) const
 
- Public Member Functions inherited from lout::container::untyped::HashSet
 HashSet (bool ownerOfObjects, int tableSize=251)
 
 ~HashSet ()
 
int size ()
 
void put (object::Object *object)
 
bool contains (object::Object *key) const
 
bool remove (object::Object *key)
 
- Public Member Functions inherited from lout::container::untyped::Collection
Iterator iterator ()
 
- Public Member Functions inherited from lout::object::Object
virtual ~Object ()
 The destructor is defined as virtual (but not abstract), so that destruction of Object's works properly. More...
 
virtual bool equals (Object *other)
 Returns, whether two objects are equal. More...
 
virtual int hashValue ()
 Return a hash value for the object. More...
 
virtual Objectclone ()
 Return an exact copy of the object. More...
 
const char * toString ()
 Use object::Object::intoStringBuffer to return a textual representation of the object. More...
 
virtual size_t sizeOf ()
 Return the number of bytes, this object totally uses. More...
 

Protected Member Functions

NodecreateNode ()
 
void clearNode (Node *node)
 
- Protected Member Functions inherited from lout::container::untyped::HashSet
int calcHashValue (object::Object *object) const
 
NodefindNode (object::Object *object) const
 
NodeinsertNode (object::Object *object)
 
AbstractIteratorcreateIterator ()
 

Private Attributes

bool ownerOfValues
 

Additional Inherited Members

- Protected Attributes inherited from lout::container::untyped::HashSet
Node ** table
 
int tableSize
 
int numElements
 
bool ownerOfObjects
 

Detailed Description

A hash table.

Constructor & Destructor Documentation

lout::container::untyped::HashTable::HashTable ( bool  ownerOfKeys,
bool  ownerOfValues,
int  tableSize = 251 
)

References ownerOfValues.

lout::container::untyped::HashTable::~HashTable ( )

Member Function Documentation

void lout::container::untyped::HashTable::clearNode ( HashSet::Node node)
protectedvirtual
HashSet::Node * lout::container::untyped::HashTable::createNode ( )
protectedvirtual

Reimplemented from lout::container::untyped::HashSet.

Object * lout::container::untyped::HashTable::get ( object::Object key) const
void lout::container::untyped::HashTable::intoStringBuffer ( misc::StringBuffer sb)
virtual
void lout::container::untyped::HashTable::put ( object::Object key,
object::Object value 
)

Member Data Documentation

bool lout::container::untyped::HashTable::ownerOfValues
private

Referenced by clearNode(), HashTable(), and ~HashTable().


The documentation for this class was generated from the following files: