itpp::Data_Event< ObjectType, DataType > Class Template Reference

An Event class that executes a function with some data as input when the event expires. More...

`#include <itpp/protocol/events.h>`

Inheritance diagram for itpp::Data_Event< ObjectType, DataType >:

## Public Member Functions

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

## Protected Attributes

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

## Static Protected Attributes

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

## Detailed Description

template<class ObjectType, class DataType>
class itpp::Data_Event< ObjectType, DataType >

An Event class that executes a function with some data as input 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 189 of file events.h.

## Constructor & Destructor Documentation

## Data_Event()

template<class ObjectType , class DataType >

itpp::Data_Event< ObjectType, DataType >::Data_Event | ( | ObjectType * | object_pointer,
|  | void(ObjectType::*)(DataType data) | object_function_pointer,
|  | DataType | data,
|  | const Ttype | delta_time
| ) |  |

inline

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

Definition at line 193 of file events.h.

## ~Data_Event()

template<class ObjectType , class DataType >

virtual itpp::Data_Event< ObjectType, DataType >::~Data_Event | ( |  | ) |

inline virtual

Destructor.

Definition at line 202 of file events.h.

## Member Function Documentation

## exec()

template<class ObjectType , class DataType >

virtual void itpp::Data_Event< ObjectType, DataType >::exec | ( | void |  | ) |

inline virtual

Execute (call) the assigned function with user data.

Implements itpp::Base_Event.

Definition at line 205 of file events.h.

## cancel()

void itpp::Base_Event::cancel | ( |  | ) |

inline inherited

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

protected inherited

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

protected inherited

ADD DOCUMENTATION HERE.

Definition at line 98 of file events.h.

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

## active

bool itpp::Base_Event::active

protected inherited

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

protected inherited

ADD DOCUMENTATION HERE.

Definition at line 102 of file events.h.

## global_id

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

static protected inherited

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:

- itpp/protocol/events.h

Generated on Mon Apr 22 2024 09:45:27 for IT++ by Doxygen 1.9.8