![]() |
TrinityCore
|
#include <Set.h>
Classes | |
class | Iterator |
Public Member Functions | |
void | clearAndSetMemoryManager (const MemoryManager::Ref &m) |
virtual | ~Set () |
int | size () const |
bool | contains (const T &member) const |
bool | insert (const T &member) |
bool | remove (const T &member) |
bool | getRemove (const T &member, T &removed) |
const T * | getPointer (const T &member) const |
Array< T > | getMembers () const |
void | getMembers (Array< T > &keyArray) const |
void | clear () |
void | deleteAll () |
Iterator | begin () const |
const Iterator | end () const |
Private Attributes | |
Table< T, bool, HashFunc, EqualsFunc > | memberTable |
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.
|
inline |
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.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
C++ STL style iterator method. Returns one after the last iterator element.
|
inline |
|
inline |
|
inline |
If a value that is EqualsFunc to member is present, returns a pointer to the version stored in the data structure, otherwise returns NULL.
|
inline |
If member is present, sets removed to the element being removed and returns true. Otherwise returns false and does not write to removed. This is useful when building efficient hashed data structures that wrap Set.
|
inline |
Inserts into the table if not already present. Returns true if this is the first time the element was added.
|
inline |
Returns true if the element was present and removed. Returns false if the element was not present.
|
inline |
|
private |
If an object is a member, it is contained in this table.