Dillo v3.1.1-111-gd4f56d0d
Loading...
Searching...
No Matches
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.
 
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.
 
virtual bool equals (Object *other)
 Returns, whether two objects are equal.
 
virtual int hashValue ()
 Return a hash value for the object.
 
virtual Objectclone ()
 Return an exact copy of the object.
 
const char * toString ()
 Use object::Object::intoStringBuffer to return a textual representation of the object.
 
virtual size_t sizeOf ()
 Return the number of bytes, this object totally uses.
 

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.

Definition at line 305 of file container.hh.

Constructor & Destructor Documentation

◆ HashTable()

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

Definition at line 637 of file container.cc.

References ownerOfValues.

◆ ~HashTable()

Member Function Documentation

◆ clearNode()

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

◆ createNode()

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

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

Definition at line 659 of file container.cc.

◆ get()

Object * lout::container::untyped::HashTable::get ( object::Object key) const

Definition at line 708 of file container.cc.

References lout::container::untyped::HashSet::findNode().

◆ intoStringBuffer()

void lout::container::untyped::HashTable::intoStringBuffer ( misc::StringBuffer sb)
virtual

◆ put()

void lout::container::untyped::HashTable::put ( object::Object key,
object::Object value 
)

Member Data Documentation

◆ ownerOfValues

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

Definition at line 308 of file container.hh.

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


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