QLinkedList< T >::const_iterator Class Reference

QLinkedList< T >::const_iterator Class Reference

#include <qlinkedlist.h>

Class Description

template<class T>
class QLinkedList< T >::const_iterator

Definition at line 151 of file qlinkedlist.h.

Public Types

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

Public Member Functions

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

Public Attributes

Nodei
 

Member Typedef Documentation

typedef std::bidirectional_iterator_tag iterator_category

Definition at line 154 of file qlinkedlist.h.

typedef qptrdiff difference_type

Definition at line 155 of file qlinkedlist.h.

typedef T value_type

Definition at line 156 of file qlinkedlist.h.

typedef const T* pointer

Definition at line 157 of file qlinkedlist.h.

typedef const T& reference

Definition at line 158 of file qlinkedlist.h.

Constructor & Destructor Documentation

const_iterator ( )
inline

Definition at line 160 of file qlinkedlist.h.

160 : i(0) {}
const_iterator ( Node n)
inline

Definition at line 161 of file qlinkedlist.h.

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

Definition at line 162 of file qlinkedlist.h.

162 : i(o.i){}
const_iterator ( iterator  ci)
inline

Definition at line 163 of file qlinkedlist.h.

163 : i(ci.i){}

Member Function Documentation

const_iterator& operator= ( const const_iterator o)
inline

Definition at line 164 of file qlinkedlist.h.

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

Definition at line 165 of file qlinkedlist.h.

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

Definition at line 166 of file qlinkedlist.h.

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

Definition at line 167 of file qlinkedlist.h.

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

Definition at line 168 of file qlinkedlist.h.

168 { return i != o.i; }
const_iterator& operator++ ( )
inline

Definition at line 169 of file qlinkedlist.h.

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

Definition at line 170 of file qlinkedlist.h.

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

Definition at line 171 of file qlinkedlist.h.

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

Definition at line 172 of file qlinkedlist.h.

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

Definition at line 173 of file qlinkedlist.h.

174  { 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
const_iterator operator- ( int  j) const
inline

Definition at line 175 of file qlinkedlist.h.

175 { return operator+(-j); }
const_iterator operator+(int j) const
Definition: qlinkedlist.h:173
const_iterator& operator+= ( int  j)
inline

Definition at line 176 of file qlinkedlist.h.

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

Definition at line 177 of file qlinkedlist.h.

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

Member Data Documentation

Node* i

Definition at line 159 of file qlinkedlist.h.


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