Event Class Reference
[sim]

Basic event type. More...

#include <simlpy/Event.h>

Inheritance diagram for Event:

Inheritance graph
[legend]
Collaboration diagram for Event:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Event (Entity *source, const Time &t)
 Constructor.
virtual ~Event ()
 Virtual destructor.
virtual bool handle ()=0
 This virtual method allows a derived class to call the handler for its appropriate Entity, thereby enabling the Entity to distinguish the event by overloading on type.
Entitysource ()
 The Entity that created this event.
const Timetime () const
 
Returns:
the scheduled time at which this Event should be processed

bool operator< (const Event &other) const
 Compare two Events by schedule times.

Protected Attributes

Entitym_source
 The Entity that emitted this Event.
Time m_time
 The time at which this Event should be processed.


Detailed Description

Basic event type.

All events inherit this base class, which allows them to be treated uniformly for queueing and dispatching.

Definition at line 48 of file Event.h.


Constructor & Destructor Documentation

Event::Event ( Entity source,
const Time t 
)

Constructor.

Parameters:
source The Entity generating this event, to which an acknowledgement should be sent.
t The time at which this Event should be processed.

Definition at line 34 of file Event.cc.


Member Function Documentation

bool Event::operator< ( const Event other  )  const [inline]

Compare two Events by schedule times.

Parameters:
other Another Event
Returns:
whether this Event is scheduled earlier than other

Definition at line 81 of file Event.h.

References m_time.


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