IT++ Logo
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
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

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)() More...
 
virtual ~Event ()
 Destructor. More...
 
virtual void exec (void)
 Execute (call) the assigned function. More...
 
void cancel ()
 Cancel an event. More...
 

Protected Attributes

Ttype delta_t
 ADD DOCUMENTATION HERE. More...
 
Ttype expire_t
 ADD DOCUMENTATION HERE. More...
 
bool active
 ADD DOCUMENTATION HERE. More...
 
unsigned long long int id
 ADD DOCUMENTATION HERE. More...
 

Static Protected Attributes

static unsigned long long int global_id = 0
 ADD DOCUMENTATION HERE. More...
 

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 164 of file events.h.

Constructor & Destructor Documentation

◆ Event()

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 168 of file events.h.

◆ ~Event()

template<class ObjectType >
virtual itpp::Event< ObjectType >::~Event ( )
inlinevirtual

Destructor.

Definition at line 174 of file events.h.

Member Function Documentation

◆ exec()

template<class ObjectType >
virtual void itpp::Event< ObjectType >::exec ( void  )
inlinevirtual

Execute (call) the assigned function.

Implements itpp::Base_Event.

Definition at line 177 of file events.h.

◆ cancel()

void itpp::Base_Event::cancel ( )
inlineinherited

Cancel an event.

Definition at line 90 of file events.h.

References itpp::Base_Event::active.

Member Data Documentation

◆ delta_t

Ttype itpp::Base_Event::delta_t
protectedinherited

ADD DOCUMENTATION HERE.

Definition at line 96 of file events.h.

Referenced by itpp::Event_Queue::add(), and itpp::Base_Event::Base_Event().

◆ expire_t

Ttype itpp::Base_Event::expire_t
protectedinherited

ADD DOCUMENTATION HERE.

Definition at line 98 of file events.h.

Referenced by itpp::Event_Queue::add(), itpp::Base_Event::Base_Event(), and itpp::Compare_Base_Event_Times::operator()().

◆ active

bool itpp::Base_Event::active
protectedinherited

ADD DOCUMENTATION HERE.

Definition at line 100 of file events.h.

Referenced by itpp::Base_Event::Base_Event(), and itpp::Base_Event::cancel().

◆ id

unsigned long long int itpp::Base_Event::id
protectedinherited

ADD DOCUMENTATION HERE.

Definition at line 102 of file events.h.

Referenced by itpp::Compare_Base_Event_Times::operator()().

◆ global_id

unsigned long long int itpp::Base_Event::global_id = 0
staticprotectedinherited

ADD DOCUMENTATION HERE.

Definition at line 104 of file events.h.

Referenced by itpp::Base_Event::Base_Event().


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

Generated on Tue Aug 17 2021 10:59:15 for IT++ by Doxygen 1.9.4