QMap< Key, T >::const_iterator Class Reference

QMap< Key, T >::const_iterator Class Reference

#include <qmap.h>

Class Description

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

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

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

Friends

class iterator
 

Member Typedef Documentation

typedef std::bidirectional_iterator_tag iterator_category

Definition at line 307 of file qmap.h.

typedef qptrdiff difference_type

Definition at line 308 of file qmap.h.

typedef T value_type

Definition at line 309 of file qmap.h.

typedef const T* pointer

Definition at line 310 of file qmap.h.

typedef const T& reference

Definition at line 311 of file qmap.h.

Constructor & Destructor Documentation

const_iterator ( )
inline

Definition at line 315 of file qmap.h.

315 : i(0) { }
const_iterator ( QMapData::Node node)
inline

Definition at line 316 of file qmap.h.

316 : i(node) { }
const_iterator ( const iterator o)
inline

Definition at line 320 of file qmap.h.

322  { i = o.i; }

Member Function Documentation

operator QMapData::Node * ( ) const
inline

Definition at line 314 of file qmap.h.

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

Definition at line 324 of file qmap.h.

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

Definition at line 325 of file qmap.h.

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

Definition at line 329 of file qmap.h.

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

Definition at line 330 of file qmap.h.

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

Definition at line 331 of file qmap.h.

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

Definition at line 332 of file qmap.h.

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

Definition at line 334 of file qmap.h.

334  {
335  i = i->forward[0];
336  return *this;
337  }
Node * forward[1]
Definition: qmap.h:65
const_iterator operator++ ( int  )
inline

Definition at line 338 of file qmap.h.

338  {
339  const_iterator r = *this;
340  i = i->forward[0];
341  return r;
342  }
GLdouble GLdouble GLdouble r
Definition: GLee.h:1189
Node * forward[1]
Definition: qmap.h:65
const_iterator& operator-- ( )
inline

Definition at line 343 of file qmap.h.

343  {
344  i = i->backward;
345  return *this;
346  }
Node * backward
Definition: qmap.h:64
const_iterator operator-- ( int  )
inline

Definition at line 347 of file qmap.h.

347  {
348  const_iterator r = *this;
349  i = i->backward;
350  return r;
351  }
GLdouble GLdouble GLdouble r
Definition: GLee.h:1189
Node * backward
Definition: qmap.h:64
const_iterator operator+ ( int  j) const
inline

Definition at line 352 of file qmap.h.

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

Definition at line 354 of file qmap.h.

354 { return operator+(-j); }
const_iterator operator+(int j) const
Definition: qmap.h:352
const_iterator& operator+= ( int  j)
inline

Definition at line 355 of file qmap.h.

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

Definition at line 356 of file qmap.h.

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

Friends And Related Function Documentation

friend class iterator
friend

Definition at line 303 of file qmap.h.


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