QMutableSetIterator< T > Class Template Reference

QMutableSetIterator< T > Class Template Reference

#include <qset.h>

Class Description

template<typename T>
class QMutableSetIterator< T >

Definition at line 333 of file qset.h.

Public Member Functions

 QMutableSetIterator (QSet< T > &container)
 
 ~QMutableSetIterator ()
 
QMutableSetIteratoroperator= (QSet< T > &container)
 
void toFront ()
 
void toBack ()
 
bool hasNext () const
 
const T & next ()
 
const T & peekNext () const
 
bool hasPrevious () const
 
const T & previous ()
 
const T & peekPrevious () const
 
void remove ()
 
const T & value () const
 
bool findNext (const T &t)
 
bool findPrevious (const T &t)
 

Constructor & Destructor Documentation

QMutableSetIterator ( QSet< T > &  container)
inline

Definition at line 341 of file qset.h.

342  : c(&container)
343  { c->setSharable(false); i = c->begin(); n = c->end(); }
GLenum GLsizei n
Definition: GLee.h:3432
const GLubyte * c
Definition: GLee.h:5419
~QMutableSetIterator ( )
inline

Definition at line 344 of file qset.h.

345  { c->setSharable(true); }
const GLubyte * c
Definition: GLee.h:5419

Member Function Documentation

QMutableSetIterator& operator= ( QSet< T > &  container)
inline

Definition at line 346 of file qset.h.

347  { c->setSharable(true); c = &container; c->setSharable(false);
348  i = c->begin(); n = c->end(); return *this; }
void setSharable(bool sharable)
Definition: qset.h:85
GLenum GLsizei n
Definition: GLee.h:3432
const GLubyte * c
Definition: GLee.h:5419
void toFront ( )
inline

Definition at line 349 of file qset.h.

349 { i = c->begin(); n = c->end(); }
GLenum GLsizei n
Definition: GLee.h:3432
const GLubyte * c
Definition: GLee.h:5419
void toBack ( )
inline

Definition at line 350 of file qset.h.

350 { i = c->end(); n = i; }
GLenum GLsizei n
Definition: GLee.h:3432
const GLubyte * c
Definition: GLee.h:5419
bool hasNext ( ) const
inline

Definition at line 351 of file qset.h.

351 { return c->constEnd() != i; }
const GLubyte * c
Definition: GLee.h:5419
const T& next ( )
inline

Definition at line 352 of file qset.h.

352 { n = i++; return *n; }
GLenum GLsizei n
Definition: GLee.h:3432
const T& peekNext ( ) const
inline

Definition at line 353 of file qset.h.

353 { return *i; }
bool hasPrevious ( ) const
inline

Definition at line 354 of file qset.h.

354 { return c->constBegin() != i; }
const GLubyte * c
Definition: GLee.h:5419
const T& previous ( )
inline

Definition at line 355 of file qset.h.

355 { n = --i; return *n; }
GLenum GLsizei n
Definition: GLee.h:3432
const T& peekPrevious ( ) const
inline

Definition at line 356 of file qset.h.

356 { iterator p = i; return *--p; }
GLfloat GLfloat p
Definition: GLee.h:5416
void remove ( )
inline

Definition at line 357 of file qset.h.

358  { if (c->constEnd() != n) { i = c->erase(n); n = c->end(); } }
GLenum GLsizei n
Definition: GLee.h:3432
const GLubyte * c
Definition: GLee.h:5419
const T& value ( ) const
inline

Definition at line 359 of file qset.h.

359 { Q_ASSERT(item_exists()); return *n; }
GLenum GLsizei n
Definition: GLee.h:3432
bool findNext ( const T &  t)
inline

Definition at line 360 of file qset.h.

361  { while (c->constEnd() != (n = i)) if (*i++ == t) return true; return false; }
GLenum GLsizei n
Definition: GLee.h:3432
const GLubyte * c
Definition: GLee.h:5419
GLdouble GLdouble t
Definition: GLee.h:1181
bool findPrevious ( const T &  t)
inline

Definition at line 362 of file qset.h.

363  { while (c->constBegin() != i) if (*(n = --i) == t) return true;
364  n = c->end(); return false; }
GLenum GLsizei n
Definition: GLee.h:3432
const GLubyte * c
Definition: GLee.h:5419
GLdouble GLdouble t
Definition: GLee.h:1181

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