EventCmp Struct Reference
[sim]

Functional struct for sorting Events. More...

#include <simlpy/Clock.h>

List of all members.

Public Member Functions

bool operator() (const Event *a, const Event *b) const
 Compare two Event pointers.


Detailed Description

Functional struct for sorting Events.

Since we want to queue Event pointers according to the times at which the Events should be processed, we need a way to sort the pointers that std::multiset can accept. This is modelled after STL's less<>.

Definition at line 53 of file Clock.h.


Member Function Documentation

bool EventCmp::operator() ( const Event a,
const Event b 
) const

Compare two Event pointers.

Parameters:
a pointer to an Event
b pointer to an Event
Returns:
whether a->time() is less than b->time()

Definition at line 42 of file Clock.cc.

References Event::time().


The documentation for this struct was generated from the following files:
Generated on Mon Mar 24 11:15:47 2008 for Pydtn Simulator by  doxygen 1.5.4