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

- Class List
- Class Hierarchy
- Class Members

# cQueue::Iterator Class Reference

`#include <cqueue.h>`

List of all members.

## Detailed Description

Walks along a cQueue.

## Public Member Functions
| Iterator (const cQueue &q, bool athead=true)
void | init (const cQueue &q, bool athead=true)
cObject & | operator[] (int)
cObject * | operator() ()
bool | end () const
cObject * | operator++ (int)
cObject * | operator-- (int)

## Constructor & Destructor Documentation

cQueue::Iterator::Iterator | ( | const cQueue & | q,
|  | bool | athead = `true`
| ) | `[inline]`

| Constructor. Iterator will walk on the queue passed as argument. The current object will be the first (if athead==true) or the last (athead==false) object in the queue.

## Member Function Documentation

bool cQueue::Iterator::end | ( |  | ) | const`[inline]`

| Returns true if the iterator has reached either end of the queue.

void cQueue::Iterator::init | ( | const cQueue & | q,
|  | bool | athead = `true`
| ) | `[inline]`

| Reinitializes the iterator object.

cObject* cQueue::Iterator::operator() | ( |  | ) | `[inline]`

| Returns the current object.

cObject* cQueue::Iterator::operator++ | ( | int |  | ) | `[inline]`

| Returns the current object, then moves the iterator to the next item. If the iterator has reached either end of the queue, nothing happens; you have to call init() again to restart iterating.

cObject* cQueue::Iterator::operator-- | ( | int |  | ) | `[inline]`

| Returns the current object, then moves the iterator to the previous item. If the iterator has reached either end of the queue, nothing happens; you have to call init() again to restart iterating.

cObject& cQueue::Iterator::operator[] | ( | int |  | ) | `[inline]`

| DEPRECATED. Use operator () instead.

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

- cqueue.h