Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members

Event Class Reference

#include <ev.h>

Inheritance diagram for Event:

Timer List of all members.

Public Member Functions

 Event (timeunits t, unsigned long id=0)
 Event (timeunits t, char *name, unsigned long id=0)
virtual ~Event (void)
virtual void Handle (void)=0
timeunits Time (void) const
void SetTime (timeunits t)
char * GetName (void)
unsigned int GetId (void) const

Detailed Description

Generic event


Constructor & Destructor Documentation

Event::Event timeunits  t,
unsigned long  id = 0
[inline]
 

Simple constructor. Creates an anonymous but potentially identifiable event, to be fired at time t.

Parameters:
t time to fire the event
id event identifier

Event::Event timeunits  t,
char *  name,
unsigned long  id = 0
[inline]
 

Complete constructor. Creates an event.

Parameters:
t time to fire the event
name name to identify the event
id event numeric identifier

virtual Event::~Event void   )  [inline, virtual]
 

Destructor. MUST BE virtual, to free the name string.


Member Function Documentation

unsigned int Event::GetId void   )  const [inline]
 

Returns:
event's numerical identifier

char* Event::GetName void   )  [inline]
 

Returns:
event's name

virtual void Event::Handle void   )  [pure virtual]
 

Event-handler function, to be called at activation time Being event-type dependent, it must be defined in derived classes

void Event::SetTime timeunits  t  )  [inline]
 

Modifies activation time No check is made to avoid setting past times.

Parameters:
t time to fire the event

timeunits Event::Time void   )  const [inline]
 

Returns:
activation time


The documentation for this class was generated from the following file:
Generated on Fri Jan 19 15:35:17 2007 by  doxygen 1.4.2