G3D::Set< T > Class Template ReferenceAn unordered data structure that has at most one of each element.
More...
#include <Set.h>
List of all members.
Detailed Description
template<class T>
class G3D::Set< T >
An unordered data structure that has at most one of each element.
Provides O(1) time insert, remove, and member test (contains).
Set uses G3D::Table internally, which means that the template type T must define a hashCode and operator== function. See G3D::Table for a discussion of these functions.
Constructor & Destructor Documentation
Member Function Documentation
C++ STL style iterator method.
Returns the first member. Use preincrement (++entry) to get to the next element. Do not modify the set while iterating.
template<class T>
| bool G3D::Set< T >::contains |
( |
const T & |
member |
) |
const [inline] |
template<class T>
| void G3D::Set< T >::deleteAll |
( |
|
) |
[inline] |
C++ STL style iterator method.
Returns one after the last iterator element.
template<class T>
| void G3D::Set< T >::getMembers |
( |
Array< T > & |
keyArray |
) |
const [inline] |
template<class T>
| void G3D::Set< T >::insert |
( |
const T & |
member |
) |
[inline] |
Inserts into the table if not already present.
template<class T>
| void G3D::Set< T >::remove |
( |
const T & |
member |
) |
[inline] |
It is an error to remove members that are not already present.
template<class T>
| int G3D::Set< T >::size |
( |
|
) |
const [inline] |
The documentation for this class was generated from the following file:
Generated on Thu Aug 2 11:40:47 2007 for G3D by
1.5.2
Hosted by
|