QMap< Key, T >::iterator Class Reference

QMap< Key, T >::iterator Class Reference

#include <qmap.h>

Class Description

template<class Key, class T>
class QMap< Key, T >::iterator

Definition at line 233 of file qmap.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

 operator QMapData::Node * () const
 
 iterator ()
 
 iterator (QMapData::Node *node)
 
const Key & key () const
 
T & value () const
 
T & operator* () const
 
T * operator-> () const
 
bool operator== (const iterator &o) const
 
bool operator!= (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)
 
bool operator== (const const_iterator &o) const
 
bool operator!= (const const_iterator &o) const
 

Friends

class const_iterator
 

Member Typedef Documentation

typedef std::bidirectional_iterator_tag iterator_category

Definition at line 239 of file qmap.h.

typedef qptrdiff difference_type

Definition at line 240 of file qmap.h.

typedef T value_type

Definition at line 241 of file qmap.h.

typedef T* pointer

Definition at line 242 of file qmap.h.

typedef T& reference

Definition at line 243 of file qmap.h.

Constructor & Destructor Documentation

iterator ( )
inline

Definition at line 247 of file qmap.h.

247 : i(0) { }
iterator ( QMapData::Node node)
inline

Definition at line 248 of file qmap.h.

248 : i(node) { }

Member Function Documentation

operator QMapData::Node * ( ) const
inline

Definition at line 246 of file qmap.h.

246 { return i; }
const Key& key ( ) const
inline

Definition at line 250 of file qmap.h.

250 { return concrete(i)->key; }
T& value ( ) const
inline

Definition at line 251 of file qmap.h.

251 { return concrete(i)->value; }
T& operator* ( ) const
inline

Definition at line 255 of file qmap.h.

255 { return concrete(i)->value; }
T* operator-> ( void  ) const
inline

Definition at line 256 of file qmap.h.

256 { return &concrete(i)->value; }
bool operator== ( const iterator o) const
inline

Definition at line 257 of file qmap.h.

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

Definition at line 258 of file qmap.h.

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

Definition at line 260 of file qmap.h.

260  {
261  i = i->forward[0];
262  return *this;
263  }
Node * forward[1]
Definition: qmap.h:65
iterator operator++ ( int  )
inline

Definition at line 264 of file qmap.h.

264  {
265  iterator r = *this;
266  i = i->forward[0];
267  return r;
268  }
GLdouble GLdouble GLdouble r
Definition: GLee.h:1189
Node * forward[1]
Definition: qmap.h:65
iterator& operator-- ( )
inline

Definition at line 269 of file qmap.h.

269  {
270  i = i->backward;
271  return *this;
272  }
Node * backward
Definition: qmap.h:64
iterator operator-- ( int  )
inline

Definition at line 273 of file qmap.h.

273  {
274  iterator r = *this;
275  i = i->backward;
276  return r;
277  }
GLdouble GLdouble GLdouble r
Definition: GLee.h:1189
Node * backward
Definition: qmap.h:64
iterator operator+ ( int  j) const
inline

Definition at line 278 of file qmap.h.

279  { iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; }
GLdouble GLdouble GLdouble r
Definition: GLee.h:1189
iterator operator- ( int  j) const
inline

Definition at line 280 of file qmap.h.

280 { return operator+(-j); }
iterator operator+(int j) const
Definition: qmap.h:278
iterator& operator+= ( int  j)
inline

Definition at line 281 of file qmap.h.

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

Definition at line 282 of file qmap.h.

282 { return *this = *this - j; }
bool operator== ( const const_iterator o) const
inline

Definition at line 290 of file qmap.h.

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

Definition at line 292 of file qmap.h.

293  { return i != o.i; }

Friends And Related Function Documentation

friend class const_iterator
friend

Definition at line 235 of file qmap.h.


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