arsa  2.7
Public Member Functions | Friends | List of all members
irr::core::list< T >::Iterator Class Reference

List iterator. More...

#include <irrList.h>

Public Member Functions

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

Friends

class list< T >
 
class ConstIterator
 

Detailed Description

template<class T>
class irr::core::list< T >::Iterator

List iterator.

Definition at line 38 of file irrList.h.

Constructor & Destructor Documentation

◆ Iterator()

template<class T>
irr::core::list< T >::Iterator::Iterator ( )
inline

Definition at line 41 of file irrList.h.

41 : Current(0) {}

Member Function Documentation

◆ operator !=() [1/2]

template<class T>
bool irr::core::list< T >::Iterator::operator != ( const Iterator other) const
inline

Definition at line 66 of file irrList.h.

66 { return Current != other.Current; }

◆ operator !=() [2/2]

template<class T>
bool irr::core::list< T >::Iterator::operator != ( const ConstIterator other) const
inline

Definition at line 68 of file irrList.h.

68 { return Current != other.Current; }

◆ operator *()

template<class T>
T& irr::core::list< T >::Iterator::operator * ( )
inline

Definition at line 70 of file irrList.h.

70 { return Current->Element; }

◆ operator -()

template<class T>
Iterator irr::core::list< T >::Iterator::operator - ( s32  num) const
inline

Definition at line 63 of file irrList.h.

63 { return (*this)+ (-num); }
GLuint num

◆ operator --() [1/2]

template<class T>
Iterator& irr::core::list< T >::Iterator::operator -- ( )
inline

Definition at line 44 of file irrList.h.

44 { Current = Current->Prev; return *this; }

◆ operator --() [2/2]

template<class T>
Iterator irr::core::list< T >::Iterator::operator -- ( s32  )
inline

Definition at line 46 of file irrList.h.

46 { Iterator tmp = *this; Current = Current->Prev; return tmp; }

◆ operator -=()

template<class T>
Iterator& irr::core::list< T >::Iterator::operator -= ( s32  num)
inline

Definition at line 62 of file irrList.h.

62 { return (*this)+=(-num); }
GLuint num

◆ operator ->()

template<class T>
T* irr::core::list< T >::Iterator::operator -> ( )
inline

Definition at line 71 of file irrList.h.

71 { return &Current->Element; }

◆ operator+()

template<class T>
Iterator irr::core::list< T >::Iterator::operator+ ( s32  num) const
inline

Definition at line 61 of file irrList.h.

61 { Iterator tmp = *this; return tmp += num; }
GLuint num

◆ operator++() [1/2]

template<class T>
Iterator& irr::core::list< T >::Iterator::operator++ ( )
inline

Definition at line 43 of file irrList.h.

43 { Current = Current->Next; return *this; }

◆ operator++() [2/2]

template<class T>
Iterator irr::core::list< T >::Iterator::operator++ ( s32  )
inline

Definition at line 45 of file irrList.h.

45 { Iterator tmp = *this; Current = Current->Next; return tmp; }

◆ operator+=()

template<class T>
Iterator& irr::core::list< T >::Iterator::operator+= ( s32  num)
inline

Definition at line 48 of file irrList.h.

49  {
50  if(num > 0)
51  {
52  while (num-- && this->Current != 0) ++(*this);
53  }
54  else
55  {
56  while(num++ && this->Current != 0) --(*this);
57  }
58  return *this;
59  }
GLuint num

◆ operator==() [1/2]

template<class T>
bool irr::core::list< T >::Iterator::operator== ( const Iterator other) const
inline

Definition at line 65 of file irrList.h.

65 { return Current == other.Current; }

◆ operator==() [2/2]

template<class T>
bool irr::core::list< T >::Iterator::operator== ( const ConstIterator other) const
inline

Definition at line 67 of file irrList.h.

67 { return Current == other.Current; }

Friends And Related Function Documentation

◆ ConstIterator

template<class T>
friend class ConstIterator
friend

Definition at line 79 of file irrList.h.

◆ list< T >

template<class T>
friend class list< T >
friend

Definition at line 78 of file irrList.h.


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