QHash< Key, T >::const_iterator Class Reference

QHash< Key, T >::const_iterator Class Reference

#include <qhash.h>

Class Description

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

Definition at line 395 of file qhash.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 Node * () const
 
 const_iterator ()
 
 const_iterator (void *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 401 of file qhash.h.

typedef qptrdiff difference_type

Definition at line 402 of file qhash.h.

typedef T value_type

Definition at line 403 of file qhash.h.

typedef const T* pointer

Definition at line 404 of file qhash.h.

typedef const T& reference

Definition at line 405 of file qhash.h.

Constructor & Destructor Documentation

const_iterator ( )
inline

Definition at line 409 of file qhash.h.

409 : i(0) { }
const_iterator ( void node)
inlineexplicit

Definition at line 410 of file qhash.h.

411  : i(reinterpret_cast<QHashData::Node *>(node)) { }
const_iterator ( const iterator o)
inline

Definition at line 415 of file qhash.h.

417  { i = o.i; }

Member Function Documentation

operator Node * ( ) const
inline

Definition at line 408 of file qhash.h.

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

Definition at line 419 of file qhash.h.

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

Definition at line 420 of file qhash.h.

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

Definition at line 421 of file qhash.h.

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

Definition at line 422 of file qhash.h.

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

Definition at line 423 of file qhash.h.

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

Definition at line 424 of file qhash.h.

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

Definition at line 426 of file qhash.h.

426  {
427  i = QHashData::nextNode(i);
428  return *this;
429  }
static Node * nextNode(Node *node)
const_iterator operator++ ( int  )
inline

Definition at line 430 of file qhash.h.

430  {
431  const_iterator r = *this;
432  i = QHashData::nextNode(i);
433  return r;
434  }
GLdouble GLdouble GLdouble r
Definition: GLee.h:1189
static Node * nextNode(Node *node)
const_iterator& operator-- ( )
inline

Definition at line 435 of file qhash.h.

435  {
437  return *this;
438  }
static Node * previousNode(Node *node)
const_iterator operator-- ( int  )
inline

Definition at line 439 of file qhash.h.

439  {
440  const_iterator r = *this;
442  return r;
443  }
GLdouble GLdouble GLdouble r
Definition: GLee.h:1189
static Node * previousNode(Node *node)
const_iterator operator+ ( int  j) const
inline

Definition at line 444 of file qhash.h.

445  { 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 446 of file qhash.h.

446 { return operator+(-j); }
const_iterator operator+(int j) const
Definition: qhash.h:444
const_iterator& operator+= ( int  j)
inline

Definition at line 447 of file qhash.h.

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

Definition at line 448 of file qhash.h.

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

Friends And Related Function Documentation

friend class iterator
friend

Definition at line 397 of file qhash.h.


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