TrinityCore
LinkedListHead::Iterator< _Ty > Class Template Reference

#include <LinkedList.h>

Public Types

typedef std::bidirectional_iterator_tag iterator_category
 
typedef _Ty value_type
 
typedef ptrdiff_t difference_type
 
typedef ptrdiff_t distance_type
 
typedef _Ty * pointer
 
typedef _Ty const * const_pointer
 
typedef _Ty & reference
 
typedef _Ty const & const_reference
 

Public Member Functions

 Iterator ()
 
 Iterator (pointer _Pnode)
 
Iteratoroperator= (const_pointer const &_Right)
 
reference operator* ()
 
pointer operator-> ()
 
Iteratoroperator++ ()
 
Iterator operator++ (int)
 
Iteratoroperator-- ()
 
Iterator operator-- (int)
 
bool operator== (Iterator const &_Right) const
 
bool operator!= (Iterator const &_Right) const
 
bool operator== (pointer const &_Right) const
 
bool operator!= (pointer const &_Right) const
 
bool operator== (const_reference _Right) const
 
bool operator!= (const_reference _Right) const
 
pointer _Mynode ()
 

Protected Attributes

pointer _Ptr
 

Member Typedef Documentation

◆ const_pointer

template<class _Ty>
typedef _Ty const* LinkedListHead::Iterator< _Ty >::const_pointer

◆ const_reference

template<class _Ty>
typedef _Ty const& LinkedListHead::Iterator< _Ty >::const_reference

◆ difference_type

template<class _Ty>
typedef ptrdiff_t LinkedListHead::Iterator< _Ty >::difference_type

◆ distance_type

template<class _Ty>
typedef ptrdiff_t LinkedListHead::Iterator< _Ty >::distance_type

◆ iterator_category

template<class _Ty>
typedef std::bidirectional_iterator_tag LinkedListHead::Iterator< _Ty >::iterator_category

◆ pointer

template<class _Ty>
typedef _Ty* LinkedListHead::Iterator< _Ty >::pointer

◆ reference

template<class _Ty>
typedef _Ty& LinkedListHead::Iterator< _Ty >::reference

◆ value_type

template<class _Ty>
typedef _Ty LinkedListHead::Iterator< _Ty >::value_type

Constructor & Destructor Documentation

◆ Iterator() [1/2]

template<class _Ty>
LinkedListHead::Iterator< _Ty >::Iterator ( )
inline
159  : _Ptr(nullptr)
160  { // construct with null node pointer
161  }
pointer _Ptr
Definition: LinkedList.h:245

◆ Iterator() [2/2]

template<class _Ty>
LinkedListHead::Iterator< _Ty >::Iterator ( pointer  _Pnode)
inline
163  : _Ptr(_Pnode)
164  { // construct with node pointer _Pnode
165  }
pointer _Ptr
Definition: LinkedList.h:245

Member Function Documentation

◆ _Mynode()

template<class _Ty>
pointer LinkedListHead::Iterator< _Ty >::_Mynode ( )
inline
240  { // return node pointer
241  return (_Ptr);
242  }
pointer _Ptr
Definition: LinkedList.h:245

◆ operator!=() [1/3]

template<class _Ty>
bool LinkedListHead::Iterator< _Ty >::operator!= ( Iterator< _Ty > const &  _Right) const
inline
215  { // test for iterator inequality
216  return (!(*this == _Right));
217  }

◆ operator!=() [2/3]

template<class _Ty>
bool LinkedListHead::Iterator< _Ty >::operator!= ( pointer const &  _Right) const
inline
225  { // test for pointer equality
226  return (!(*this == _Right));
227  }

◆ operator!=() [3/3]

template<class _Ty>
bool LinkedListHead::Iterator< _Ty >::operator!= ( const_reference  _Right) const
inline
235  { // test for reference equality
236  return (_Ptr != &_Right);
237  }
pointer _Ptr
Definition: LinkedList.h:245

◆ operator*()

template<class _Ty>
reference LinkedListHead::Iterator< _Ty >::operator* ( )
inline
174  { // return designated value
175  return *_Ptr;
176  }
pointer _Ptr
Definition: LinkedList.h:245

◆ operator++() [1/2]

template<class _Ty>
Iterator& LinkedListHead::Iterator< _Ty >::operator++ ( )
inline
184  { // preincrement
185  _Ptr = _Ptr->next();
186  return (*this);
187  }
pointer _Ptr
Definition: LinkedList.h:245

◆ operator++() [2/2]

template<class _Ty>
Iterator LinkedListHead::Iterator< _Ty >::operator++ ( int  )
inline
190  { // postincrement
191  iterator _Tmp = *this;
192  ++*this;
193  return (_Tmp);
194  }
Iterator< LinkedListElement > iterator
Definition: LinkedList.h:248

◆ operator--() [1/2]

template<class _Ty>
Iterator& LinkedListHead::Iterator< _Ty >::operator-- ( )
inline
197  { // predecrement
198  _Ptr = _Ptr->prev();
199  return (*this);
200  }
pointer _Ptr
Definition: LinkedList.h:245

◆ operator--() [2/2]

template<class _Ty>
Iterator LinkedListHead::Iterator< _Ty >::operator-- ( int  )
inline
203  { // postdecrement
204  iterator _Tmp = *this;
205  --*this;
206  return (_Tmp);
207  }
Iterator< LinkedListElement > iterator
Definition: LinkedList.h:248

◆ operator->()

template<class _Ty>
pointer LinkedListHead::Iterator< _Ty >::operator-> ( )
inline
179  { // return pointer to class object
180  return _Ptr;
181  }
pointer _Ptr
Definition: LinkedList.h:245

◆ operator=()

template<class _Ty>
Iterator& LinkedListHead::Iterator< _Ty >::operator= ( const_pointer const &  _Right)
inline
168  {
169  _Ptr = pointer(_Right);
170  return *this;
171  }
pointer _Ptr
Definition: LinkedList.h:245
_Ty * pointer
Definition: LinkedList.h:154

◆ operator==() [1/3]

template<class _Ty>
bool LinkedListHead::Iterator< _Ty >::operator== ( Iterator< _Ty > const &  _Right) const
inline
210  { // test for iterator equality
211  return (_Ptr == _Right._Ptr);
212  }
pointer _Ptr
Definition: LinkedList.h:245

◆ operator==() [2/3]

template<class _Ty>
bool LinkedListHead::Iterator< _Ty >::operator== ( pointer const &  _Right) const
inline
220  { // test for pointer equality
221  return (_Ptr != _Right);
222  }
pointer _Ptr
Definition: LinkedList.h:245

◆ operator==() [3/3]

template<class _Ty>
bool LinkedListHead::Iterator< _Ty >::operator== ( const_reference  _Right) const
inline
230  { // test for reference equality
231  return (_Ptr == &_Right);
232  }
pointer _Ptr
Definition: LinkedList.h:245

Member Data Documentation

◆ _Ptr

template<class _Ty>
pointer LinkedListHead::Iterator< _Ty >::_Ptr
protected

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