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

A hash set. More...

#include <container.hh>

Classes

class  HashSetIterator
 
struct  Node
 

Public Member Functions

 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
void intoStringBuffer (misc::StringBuffer *sb)
 Store a textual representation of the object in a misc::StringBuffer. More...
 
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

int calcHashValue (object::Object *object) const
 
virtual NodecreateNode ()
 
virtual void clearNode (Node *node)
 
NodefindNode (object::Object *object) const
 
NodeinsertNode (object::Object *object)
 
AbstractIteratorcreateIterator ()
 

Protected Attributes

Node ** table
 
int tableSize
 
int numElements
 
bool ownerOfObjects
 

Friends

class HashSetIterator
 

Detailed Description

A hash set.

Constructor & Destructor Documentation

lout::container::untyped::HashSet::HashSet ( bool  ownerOfObjects,
int  tableSize = 251 
)
lout::container::untyped::HashSet::~HashSet ( )

Member Function Documentation

int lout::container::untyped::HashSet::calcHashValue ( object::Object object) const
inlineprotected
void lout::container::untyped::HashSet::clearNode ( HashSet::Node node)
protectedvirtual
bool lout::container::untyped::HashSet::contains ( object::Object key) const
Collection0::AbstractIterator * lout::container::untyped::HashSet::createIterator ( )
protectedvirtual
HashSet::Node * lout::container::untyped::HashSet::createNode ( )
protectedvirtual
HashSet::Node * lout::container::untyped::HashSet::findNode ( object::Object object) const
protected
HashSet::Node * lout::container::untyped::HashSet::insertNode ( object::Object object)
protected
void lout::container::untyped::HashSet::put ( object::Object object)
bool lout::container::untyped::HashSet::remove ( object::Object key)
int lout::container::untyped::HashSet::size ( )
virtual

Friends And Related Function Documentation

friend class HashSetIterator
friend

Member Data Documentation

int lout::container::untyped::HashSet::numElements
protected
bool lout::container::untyped::HashSet::ownerOfObjects
protected
Node** lout::container::untyped::HashSet::table
protected
int lout::container::untyped::HashSet::tableSize
protected

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