- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# QMutableSetIterator< T > Class Template Reference

Search for all occurrences

## Detailed Description

### template<typename T>
class QMutableSetIterator< T >

Definition at line 328 of file qset.h.

`#include <qset.h>`

List of all members.

## Public Member Functions
| QMutableSetIterator (QSet< T > &container)
| ~QMutableSetIterator ()
QMutableSetIterator & | operator= (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 336 of file qset.h.

            : c(&container)
        { c->setSharable(false); i = c->begin(); n = c->end(); }

~QMutableSetIterator | ( |  | ) | `[inline]`

Definition at line 339 of file qset.h.

        { c->setSharable(true); }

## Member Function Documentation

QMutableSetIterator& operator= | ( | QSet< T > & | container | ) | `[inline]`

Definition at line 341 of file qset.h.

        { c->setSharable(true); c = &container; c->setSharable(false);
          i = c->begin(); n = c->end(); return *this; }

void toFront | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 344 of file qset.h.

    { i = c->begin(); n = c->end(); }

void toBack | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 345 of file qset.h.

    { i = c->end(); n = i; }

bool hasNext | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 346 of file qset.h.

    { return c->constEnd() != i; }

const T& next | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 347 of file qset.h.

    { n = i++; return *n; }

const T& peekNext | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 348 of file qset.h.

    { return *i; }

bool hasPrevious | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 349 of file qset.h.

    { return c->constBegin() != i; }

const T& previous | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 350 of file qset.h.

    { n = --i; return *n; }

const T& peekPrevious | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 351 of file qset.h.

    { iterator p = i; return *--p; }

void remove | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 352 of file qset.h.

        { if (c->constEnd() != n) { i = c->erase(n); n = c->end(); } }

const T& value | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 354 of file qset.h.

    { Q_ASSERT(item_exists()); return *n; }

bool findNext | ( | const T & | t | ) | `[inline]`

Search for all occurrences

Definition at line 355 of file qset.h.

        { while (c->constEnd() != (n = i)) if (*i++ == t) return true; return false; }

bool findPrevious | ( | const T & | t | ) | `[inline]`

Search for all occurrences

Definition at line 357 of file qset.h.

        { while (c->constBegin() != i) if (*(n = --i) == t) return true;
          n = c->end(); return false;  }

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

- QtCore/qset.h