TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
G3D::Set< T, HashFunc, EqualsFunc >::Iterator Class Reference

#include <Set.h>

Public Member Functions

bool operator!= (const Iterator &other) const
 
bool isValid () const
 
bool hasMore () const
 
bool operator== (const Iterator &other) const
 
Iteratoroperator++ ()
 
Iterator operator++ (int)
 
const T & operator* () const
 
T * operator-> () const
 
 operator T * () const
 

Private Member Functions

 Iterator (const typename Table< T, bool >::Iterator &it)
 

Private Attributes

Table< T, bool >::Iterator it
 

Friends

class Set< T >
 

Detailed Description

template<class T, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
class G3D::Set< T, HashFunc, EqualsFunc >::Iterator

C++ STL style iterator variable. See begin().

Constructor & Destructor Documentation

template<class T, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
G3D::Set< T, HashFunc, EqualsFunc >::Iterator::Iterator ( const typename Table< T, bool >::Iterator it)
inlineprivate
121 : it(it) {}
Table< T, bool >::Iterator it
Definition: Set.h:119

Member Function Documentation

template<class T, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
bool G3D::Set< T, HashFunc, EqualsFunc >::Iterator::hasMore ( ) const
inline
Deprecated:
Use isValid
133  {
134  return it.isValid();
135  }
Table< T, bool >::Iterator it
Definition: Set.h:119
template<class T, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
bool G3D::Set< T, HashFunc, EqualsFunc >::Iterator::isValid ( ) const
inline
128  {
129  return it.isValid();
130  }
Table< T, bool >::Iterator it
Definition: Set.h:119
template<class T, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
G3D::Set< T, HashFunc, EqualsFunc >::Iterator::operator T * ( ) const
inline
166  {
167  return &(it->key);
168  }
Table< T, bool >::Iterator it
Definition: Set.h:119
template<class T, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
bool G3D::Set< T, HashFunc, EqualsFunc >::Iterator::operator!= ( const Iterator other) const
inline
124  {
125  return !(*this == other);
126  }
template<class T, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
const T& G3D::Set< T, HashFunc, EqualsFunc >::Iterator::operator* ( ) const
inline
158  {
159  return it->key;
160  }
Table< T, bool >::Iterator it
Definition: Set.h:119
template<class T, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
Iterator& G3D::Set< T, HashFunc, EqualsFunc >::Iterator::operator++ ( )
inline

Pre increment.

144  {
145  ++it;
146  return *this;
147  }
Table< T, bool >::Iterator it
Definition: Set.h:119
template<class T, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
Iterator G3D::Set< T, HashFunc, EqualsFunc >::Iterator::operator++ ( int  )
inline

Post increment (slower than preincrement).

152  {
153  Iterator old = *this;
154  ++(*this);
155  return old;
156  }
Iterator(const typename Table< T, bool >::Iterator &it)
Definition: Set.h:121
template<class T, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
T* G3D::Set< T, HashFunc, EqualsFunc >::Iterator::operator-> ( ) const
inline
162  {
163  return &(it->key);
164  }
Table< T, bool >::Iterator it
Definition: Set.h:119
template<class T, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
bool G3D::Set< T, HashFunc, EqualsFunc >::Iterator::operator== ( const Iterator other) const
inline
137  {
138  return it == other.it;
139  }
Table< T, bool >::Iterator it
Definition: Set.h:119

Friends And Related Function Documentation

template<class T, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
friend class Set< T >
friend

Member Data Documentation

template<class T, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
Table<T, bool>::Iterator G3D::Set< T, HashFunc, EqualsFunc >::Iterator::it
private

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