CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

csHashSet Class Reference

This class implements a basic set for objects. More...

#include <csutil/hashmap.h>

List of all members.

Public Member Functions

 csHashSet (unsigned int size=211)
 Construct a new empty set.
void Add (csHashObject object)
 Add an object to this set.
void AddNoTest (csHashObject object)
 Add an object to this set.
bool In (csHashObject object)
 Test if an object is in this set.
void DeleteAll ()
 Delete all elements in the set.
void Delete (csHashObject object)
 Delete an object from the set.
csHashMapGetHashMap ()
 Return the hash map for this hash set.


Detailed Description

This class implements a basic set for objects.

You can basically use this to test for the occurrence of some object quickly.

Definition at line 300 of file hashmap.h.


Constructor & Destructor Documentation

csHashSet::csHashSet unsigned int  size = 211  ) 
 

Construct a new empty set.

The given size will be given to the hasmap.


Member Function Documentation

void csHashSet::Add csHashObject  object  ) 
 

Add an object to this set.

This will do nothing is the object is already here.

void csHashSet::AddNoTest csHashObject  object  ) 
 

Add an object to this set.

This function does not test if the object is already there. This is used for efficiency reasons. But use with care!

void csHashSet::Delete csHashObject  object  ) 
 

Delete an object from the set.

This function does nothing if the object is not in the set.

void csHashSet::DeleteAll  ) 
 

Delete all elements in the set.

csHashMap* csHashSet::GetHashMap  )  [inline]
 

Return the hash map for this hash set.

Definition at line 343 of file hashmap.h.

bool csHashSet::In csHashObject  object  ) 
 

Test if an object is in this set.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.3.9.1