# cMessageHeap::Iterator Class Reference

`#include <cmsgheap.h>`

List of all members.

## Detailed Description

Walks along a cMessageHeap.

Note that objects in cMessageHeap are not necessarily iterated ordered by arrival time. Use msgheap->sort() if necessary before using the iterator.

## Public Member Functions

| Iterator (const cMessageHeap &mh)
void | init (const cMessageHeap &mh)
cMessage * | operator() ()
cMessage * | operator++ (int)
bool | end () const

## Constructor & Destructor Documentation

cMessageHeap::Iterator::Iterator | ( | const cMessageHeap & | mh | ) | `[inline]`

| Constructor.

## Member Function Documentation

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

| Returns true if the iterator has reached the end of the list.

void cMessageHeap::Iterator::init | ( | const cMessageHeap & | mh | ) | `[inline]`

| Reinitializes the iterator object.

cMessage* cMessageHeap::Iterator::operator() | ( |  | ) | `[inline]`

| Returns the current object.

cMessage* cMessageHeap::Iterator::operator++ | ( | int |  | ) | `[inline]`

| Returns the current object, then moves the iterator to the next item. If the iterator has reached the end of the list, NULL is returned.

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

- cmsgheap.h