#include <cmsgheap.h>
Inheritance diagram for cMessageHeap::
Public Methods | |
Constructors, destructor, assignment | |
cMessageHeap (const cMessageHeap &msgq) | |
cMessageHeap (const char *name=NULL, int size=128) | |
virtual | ~cMessageHeap () |
cMessageHeap& | operator= (const cMessageHeap &msgqueue) |
Redefined cObject member functions. | |
virtual cObject* | dup () const |
virtual void | info (char *buf) |
virtual void | forEach (ForeachFunc f) |
Container functions. | |
void | insert (cMessage *event) |
cMessage* | peekFirst () const |
cMessage* | getFirst () |
cMessage* | get (cMessage *event) |
void | sort () |
void | clear () |
int | length () const |
bool | empty () const |
|
Copy constructor. |
|
Constructor. |
|
Destructor. |
|
Deletes all messages in the heap. |
|
Creates and returns an exact copy of this object. See cObject for more details. Reimplemented from cObject. |
|
Returns true if the heap is empty. |
|
Call the passed function for each contained object. See cObject for more details. Reimplemented from cObject. |
|
Remove and return the given message in the heap. |
|
Remove and return the first message in the heap (the one with the smallest timestamp.) |
|
Produces a one-line description of object contents into the buffer passed as argument. See cObject for more details. Reimplemented from cObject. |
|
Insert a new message into the heap. |
|
Returns the number of messages in the heap. |
|
Assignment operator. The name member doesn't get copied; see cObject's operator=() for more details. |
|
Peek the first message in the heap (the one with the smallest timestamp.) |
|
Sort the contents of the heap. This is only necessary if one wants to iterate through in the FES in strict timestamp order. |