AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
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= (Iterator const &_Right)
 
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
 

Detailed Description

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

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
150 : _Ptr(0)
151 {
152 // construct with null node pointer
153 }
pointer _Ptr
Definition: LinkedList.h:257

◆ Iterator() [2/2]

template<class _Ty >
LinkedListHead::Iterator< _Ty >::Iterator ( pointer  _Pnode)
inline
155 : _Ptr(_Pnode)
156 {
157 // construct with node pointer _Pnode
158 }

Member Function Documentation

◆ _Mynode()

template<class _Ty >
pointer LinkedListHead::Iterator< _Ty >::_Mynode ( )
inline
251 {
252 // return node pointer
253 return (_Ptr);
254 }

References LinkedListHead::Iterator< _Ty >::_Ptr.

◆ operator!=() [1/3]

template<class _Ty >
bool LinkedListHead::Iterator< _Ty >::operator!= ( const_reference  _Right) const
inline
245 {
246 // test for reference equality
247 return (_Ptr != &_Right);
248 }

References LinkedListHead::Iterator< _Ty >::_Ptr.

◆ operator!=() [2/3]

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

◆ operator!=() [3/3]

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

◆ operator*()

template<class _Ty >
reference LinkedListHead::Iterator< _Ty >::operator* ( )
inline
173 {
174 // return designated value
175 return *_Ptr;
176 }

References LinkedListHead::Iterator< _Ty >::_Ptr.

◆ operator++() [1/2]

template<class _Ty >
Iterator & LinkedListHead::Iterator< _Ty >::operator++ ( )
inline
185 {
186 // preincrement
187 _Ptr = _Ptr->next();
188 return (*this);
189 }

References LinkedListHead::Iterator< _Ty >::_Ptr.

◆ operator++() [2/2]

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

◆ operator--() [1/2]

template<class _Ty >
Iterator & LinkedListHead::Iterator< _Ty >::operator-- ( )
inline
200 {
201 // predecrement
202 _Ptr = _Ptr->prev();
203 return (*this);
204 }

References LinkedListHead::Iterator< _Ty >::_Ptr.

◆ operator--() [2/2]

template<class _Ty >
Iterator LinkedListHead::Iterator< _Ty >::operator-- ( int  )
inline
207 {
208 // postdecrement
209 iterator _Tmp = *this;
210 --*this;
211 return (_Tmp);
212 }

◆ operator->()

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

References LinkedListHead::Iterator< _Ty >::_Ptr.

◆ operator=() [1/2]

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

References LinkedListHead::Iterator< _Ty >::_Ptr.

◆ operator=() [2/2]

template<class _Ty >
Iterator & LinkedListHead::Iterator< _Ty >::operator= ( Iterator< _Ty > const &  _Right)
inline
161 {
162 _Ptr = _Right._Ptr;
163 return *this;
164 }

References LinkedListHead::Iterator< _Ty >::_Ptr.

◆ operator==() [1/3]

template<class _Ty >
bool LinkedListHead::Iterator< _Ty >::operator== ( const_reference  _Right) const
inline
239 {
240 // test for reference equality
241 return (_Ptr == &_Right);
242 }

References LinkedListHead::Iterator< _Ty >::_Ptr.

◆ operator==() [2/3]

template<class _Ty >
bool LinkedListHead::Iterator< _Ty >::operator== ( Iterator< _Ty > const &  _Right) const
inline
215 {
216 // test for iterator equality
217 return (_Ptr == _Right._Ptr);
218 }

References LinkedListHead::Iterator< _Ty >::_Ptr.

◆ operator==() [3/3]

template<class _Ty >
bool LinkedListHead::Iterator< _Ty >::operator== ( pointer const &  _Right) const
inline
227 {
228 // test for pointer equality
229 return (_Ptr != _Right);
230 }

References LinkedListHead::Iterator< _Ty >::_Ptr.

Member Data Documentation

◆ _Ptr