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

- Class List
- Class Hierarchy
- Class Members

# cLinkedList::Iterator Class Reference

`#include <cllist.h>`

List of all members.

## Detailed Description

Walks along a cLinkedList object.

To examine each element in the list, the Iterator class can be used. Once an Iterator object is created for the list, the ++ and -- operators can be used to step from one element of the list to the next/previous one.

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

## Constructor & Destructor Documentation

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

| Constructor. Takes the cLinkedList object as argument. The current item will be the first (if athead==true, default) or the last (if athead==false) item in the list.

## Member Function Documentation

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

| Returns true if we have reached the end (with operator++) or the beginning (with operator--) of the list.

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

| Reinitializes the iterator object.

void* cLinkedList::Iterator::operator() | ( |  | ) | const`[inline]`

| Returns the current item.

void* cLinkedList::Iterator::operator++ | ( | int |  | ) | `[inline]`

| Returns the current item and steps to the next one.

void* cLinkedList::Iterator::operator-- | ( | int |  | ) | `[inline]`

| Returns the current item and steps to the previous one.

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

- cllist.h