QLinkedList< T >::iterator Class Reference

QLinkedList< T >::iterator Class Reference

#include <qlinkedlist.h>

Class Description

template<class T>
class QLinkedList< T >::iterator

Definition at line 118 of file qlinkedlist.h.

Public Types

typedef std::bidirectional_iterator_tag iterator_category
 
typedef qptrdiff difference_type
 
typedef T value_type
 
typedef T * pointer
 
typedef T & reference
 

Public Member Functions

 iterator ()
 
 iterator (Node *n)
 
 iterator (const iterator &o)
 
iteratoroperator= (const iterator &o)
 
T & operator* () const
 
T * operator-> () const
 
bool operator== (const iterator &o) const
 
bool operator!= (const iterator &o) const
 
bool operator== (const const_iterator &o) const
 
bool operator!= (const const_iterator &o) const
 
iteratoroperator++ ()
 
iterator operator++ (int)
 
iteratoroperator-- ()
 
iterator operator-- (int)
 
iterator operator+ (int j) const
 
iterator operator- (int j) const
 
iteratoroperator+= (int j)
 
iteratoroperator-= (int j)
 

Public Attributes

Nodei
 

Member Typedef Documentation

typedef std::bidirectional_iterator_tag iterator_category

Definition at line 121 of file qlinkedlist.h.

typedef qptrdiff difference_type

Definition at line 122 of file qlinkedlist.h.

typedef T value_type

Definition at line 123 of file qlinkedlist.h.

typedef T* pointer

Definition at line 124 of file qlinkedlist.h.

typedef T& reference

Definition at line 125 of file qlinkedlist.h.

Constructor & Destructor Documentation

iterator ( )
inline

Definition at line 127 of file qlinkedlist.h.

127 : i(0) {}
iterator ( Node n)
inline

Definition at line 128 of file qlinkedlist.h.

128 : i(n) {}
GLenum GLsizei n
Definition: GLee.h:3432
iterator ( const iterator o)
inline

Definition at line 129 of file qlinkedlist.h.

129 : i(o.i) {}

Member Function Documentation

iterator& operator= ( const iterator o)
inline

Definition at line 130 of file qlinkedlist.h.

130 { i = o.i; return *this; }
T& operator* ( ) const
inline

Definition at line 131 of file qlinkedlist.h.

131 { return i->t; }
T* operator-> ( void  ) const
inline

Definition at line 132 of file qlinkedlist.h.

132 { return &i->t; }
bool operator== ( const iterator o) const
inline

Definition at line 133 of file qlinkedlist.h.

133 { return i == o.i; }
bool operator!= ( const iterator o) const
inline

Definition at line 134 of file qlinkedlist.h.

134 { return i != o.i; }
bool operator== ( const const_iterator o) const
inline

Definition at line 135 of file qlinkedlist.h.

136  { return i == o.i; }
bool operator!= ( const const_iterator o) const
inline

Definition at line 137 of file qlinkedlist.h.

138  { return i != o.i; }
iterator& operator++ ( )
inline

Definition at line 139 of file qlinkedlist.h.

139 { i = i->n; return *this; }
QLinkedListNode * n
Definition: qlinkedlist.h:73
iterator operator++ ( int  )
inline

Definition at line 140 of file qlinkedlist.h.

140 { Node *n = i; i = i->n; return n; }
QLinkedListNode * n
Definition: qlinkedlist.h:73
GLenum GLsizei n
Definition: GLee.h:3432
iterator& operator-- ( )
inline

Definition at line 141 of file qlinkedlist.h.

141 { i = i->p; return *this; }
QLinkedListNode * p
Definition: qlinkedlist.h:73
iterator operator-- ( int  )
inline

Definition at line 142 of file qlinkedlist.h.

142 { Node *n = i; i = i->p; return n; }
GLenum GLsizei n
Definition: GLee.h:3432
QLinkedListNode * p
Definition: qlinkedlist.h:73
iterator operator+ ( int  j) const
inline

Definition at line 143 of file qlinkedlist.h.

144  { Node *n = i; if (j > 0) while (j--) n = n->n; else while (j++) n = n->p; return n; }
QLinkedListNode * n
Definition: qlinkedlist.h:73
GLenum GLsizei n
Definition: GLee.h:3432
QLinkedListNode * p
Definition: qlinkedlist.h:73
iterator operator- ( int  j) const
inline

Definition at line 145 of file qlinkedlist.h.

145 { return operator+(-j); }
iterator operator+(int j) const
Definition: qlinkedlist.h:143
iterator& operator+= ( int  j)
inline

Definition at line 146 of file qlinkedlist.h.

146 { return *this = *this + j; }
iterator& operator-= ( int  j)
inline

Definition at line 147 of file qlinkedlist.h.

147 { return *this = *this - j; }

Member Data Documentation

Node* i

Definition at line 126 of file qlinkedlist.h.


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