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

#include <KDTree.h>

Public Member Functions

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

Private Member Functions

 Iterator (const typename Table< Member, Node * >::Iterator &it)
 
Iterator operator++ (int)
 

Private Attributes

Table< Member, Node * >::Iterator it
 

Friends

class TreeType
 

Detailed Description

template<class T, class BoundsFunc = BoundsTrait<T>, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
class G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Iterator

C++ STL style iterator variable. See begin(). Overloads the -> (dereference) operator, so this acts like a pointer to the current member.

Constructor & Destructor Documentation

template<class T , class BoundsFunc = BoundsTrait<T>, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Iterator::Iterator ( const typename Table< Member, Node * >::Iterator it)
inlineprivate
1599 : it(it) {}
Table< Member, Node * >::Iterator it
Definition: KDTree.h:1597

Member Function Documentation

template<class T , class BoundsFunc = BoundsTrait<T>, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Iterator::operator T * ( ) const
inline
1638  {
1639  return &(it->key.handle->value);
1640  }
Table< Member, Node * >::Iterator it
Definition: KDTree.h:1597
template<class T , class BoundsFunc = BoundsTrait<T>, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
bool G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Iterator::operator!= ( const Iterator other) const
inline
1603  {
1604  return !(*this == other);
1605  }
template<class T , class BoundsFunc = BoundsTrait<T>, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
const T& G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Iterator::operator* ( ) const
inline
1630  {
1631  return it->key.handle->value;
1632  }
Table< Member, Node * >::Iterator it
Definition: KDTree.h:1597
template<class T , class BoundsFunc = BoundsTrait<T>, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
Iterator& G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Iterator::operator++ ( )
inline

Pre increment.

1614  {
1615  ++it;
1616  return *this;
1617  }
Table< Member, Node * >::Iterator it
Definition: KDTree.h:1597
template<class T , class BoundsFunc = BoundsTrait<T>, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
Iterator G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Iterator::operator++ ( int  )
private

Post increment (slower than preincrement). Intentionally unimplemented to prevent slow code.

template<class T , class BoundsFunc = BoundsTrait<T>, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
T* G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Iterator::operator-> ( ) const
inline
1634  {
1635  return &(it->key.handle->value);
1636  }
Table< Member, Node * >::Iterator it
Definition: KDTree.h:1597
template<class T , class BoundsFunc = BoundsTrait<T>, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
bool G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Iterator::operator== ( const Iterator other) const
inline
1607  {
1608  return it == other.it;
1609  }
Table< Member, Node * >::Iterator it
Definition: KDTree.h:1597

Friends And Related Function Documentation

template<class T , class BoundsFunc = BoundsTrait<T>, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
friend class TreeType
friend

Member Data Documentation

template<class T , class BoundsFunc = BoundsTrait<T>, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
Table<Member, Node*>::Iterator G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Iterator::it
private

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