IT++ Logo Newcom Logo

itpp::Event< ObjectType > Class Template Reference

An Event class that executes a function when the event expires. More...

#include <itpp/protocol/events.h>

Inheritance diagram for itpp::Event< ObjectType >:

itpp::Base_Event List of all members.

Public Member Functions

 Event (ObjectType *object_pointer, void(ObjectType::*object_function_pointer)(), const Ttype delta_time)
 Construct an Event to expire delta_time from now by calling the function (*object_pointer.*object_function_pointer)().
virtual ~Event ()
 Destructor.
virtual void exec (void)
 Execute (call) the assigned function.
void cancel ()
 Cancel an event.

Protected Attributes

Ttype delta_t
Ttype expire_t
bool active
unsigned long long int id

Static Protected Attributes

static unsigned long long int global_id = 0

Friends

class Base_Signal
class Event_Queue
struct Compare_Base_Event_Times

Detailed Description

template<class ObjectType>
class itpp::Event< ObjectType >

An Event class that executes a function when the event expires.

Since Events are objects you need supply both a pointer to the object and the function pointer to create the Event

Definition at line 145 of file events.h.


Constructor & Destructor Documentation

template<class ObjectType>
itpp::Event< ObjectType >::Event ( ObjectType *  object_pointer,
void(ObjectType::*)()  object_function_pointer,
const Ttype  delta_time 
) [inline]

Construct an Event to expire delta_time from now by calling the function (*object_pointer.*object_function_pointer)().

Definition at line 148 of file events.h.

template<class ObjectType>
virtual itpp::Event< ObjectType >::~Event (  )  [inline, virtual]

Destructor.

Definition at line 154 of file events.h.


Member Function Documentation

template<class ObjectType>
virtual void itpp::Event< ObjectType >::exec ( void   )  [inline, virtual]

Execute (call) the assigned function.

Implements itpp::Base_Event.

Definition at line 157 of file events.h.

void itpp::Base_Event::cancel (  )  [inline, inherited]

Cancel an event.

Definition at line 78 of file events.h.

References itpp::Base_Event::active.

Referenced by itpp::Signal< DataType >::cancel(), and itpp::Signal< DataType >::~Signal().


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

Generated on Wed Apr 18 11:23:43 2007 for IT++ by Doxygen 1.5.2