itpp::TTimer< THandler > Class Template Reference

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

## Public Member Functions

| TTimer (THandler &handler, void(THandler::*handlerFunction)(Ttype time))
| Default constructor.
virtual | ~TTimer ()
| Destructor.
void | Set (Ttype time, bool relative=true)
| ADD DOCUMENTATION HERE.
void | Reset ()
| ADD DOCUMENTATION HERE.
Ttype | ExpirationTime () const
| ADD DOCUMENTATION HERE.
bool | IsPending () const
| ADD DOCUMENTATION HERE.

## Protected Member Functions

virtual void | HandleProcessEvent (Ttype currentTime)
| ADD DOCUMENTATION HERE.
virtual void | HandleCancelEvent (Ttype)
| ADD DOCUMENTATION HERE.

## Protected Attributes

bool | fPending
| Flag denoting if timer is set.
Ttype | fExpirationTime
| ADD DOCUMENTATION HERE.

## Detailed Description

template<class THandler>
class itpp::TTimer< THandler >

TTimer is a class that can be set in order to be remembered at a future instance of time. The difference to "generic event" is the easy usage that already take care about posting and canceling events

Definition at line 296 of file signals_slots.h.

## Constructor & Destructor Documentation

## TTimer()

template<class THandler >

itpp::TTimer< THandler >::TTimer | ( | THandler & | handler,
|  | void(THandler::*)(Ttype time) | handlerFunction
| ) |  |

inline

Default constructor.

Definition at line 300 of file signals_slots.h.

References itpp::Signal< DataType >::connect(), itpp::TTimer< THandler >::fExpirationTime, itpp::TTimer< THandler >::fPending, and itpp::Signal< DataType >::set_debug().

## ~TTimer()

template<class THandler >

virtual itpp::TTimer< THandler >::~TTimer | ( |  | ) |

inline virtual

Destructor.

Definition at line 315 of file signals_slots.h.

References itpp::Signal< DataType >::cancel(), and itpp::TTimer< THandler >::fPending.

## Member Function Documentation

## Set()

template<class THandler >

void itpp::TTimer< THandler >::Set | ( | Ttype | time,
|  | bool | relative = `true`
| ) |  |

inline

ADD DOCUMENTATION HERE.

Definition at line 321 of file signals_slots.h.

References itpp::Signal< DataType >::cancel(), itpp::TTimer< THandler >::fExpirationTime, itpp::TTimer< THandler >::fPending, and itpp::Event_Queue::now().

## Reset()

template<class THandler >

void itpp::TTimer< THandler >::Reset | ( |  | ) |

inline

ADD DOCUMENTATION HERE.

Definition at line 340 of file signals_slots.h.

References itpp::Signal< DataType >::cancel(), and itpp::TTimer< THandler >::fPending.

## ExpirationTime()

template<class THandler >

Ttype itpp::TTimer< THandler >::ExpirationTime | ( |  | ) | const

inline

ADD DOCUMENTATION HERE.

Definition at line 348 of file signals_slots.h.

References itpp::TTimer< THandler >::fExpirationTime, itpp::TTimer< THandler >::fPending, and it_assert.

## IsPending()

template<class THandler >

bool itpp::TTimer< THandler >::IsPending | ( |  | ) | const

inline

ADD DOCUMENTATION HERE.

Definition at line 354 of file signals_slots.h.

References itpp::TTimer< THandler >::fPending.

## HandleProcessEvent()

template<class THandler >

virtual void itpp::TTimer< THandler >::HandleProcessEvent | ( | Ttype | currentTime | ) |

inline protected virtual

ADD DOCUMENTATION HERE.

Definition at line 358 of file signals_slots.h.

References itpp::TTimer< THandler >::fPending.

## HandleCancelEvent()

template<class THandler >

virtual void itpp::TTimer< THandler >::HandleCancelEvent | ( | Ttype |  | ) |

inline protected virtual

ADD DOCUMENTATION HERE.

Definition at line 364 of file signals_slots.h.

References itpp::Signal< DataType >::cancel(), and itpp::TTimer< THandler >::fPending.

## Member Data Documentation

## fPending

template<class THandler >

bool itpp::TTimer< THandler >::fPending

protected

Flag denoting if timer is set.

Definition at line 372 of file signals_slots.h.

Referenced by itpp::TTimer< THandler >::ExpirationTime(), itpp::TTimer< THandler >::HandleCancelEvent(), itpp::TTimer< THandler >::HandleProcessEvent(), itpp::TTimer< THandler >::IsPending(), itpp::TTimer< THandler >::Reset(), itpp::TTimer< THandler >::Set(), itpp::TTimer< THandler >::TTimer(), and itpp::TTimer< THandler >::~TTimer().

## fExpirationTime

template<class THandler >

Ttype itpp::TTimer< THandler >::fExpirationTime

protected

ADD DOCUMENTATION HERE.

Definition at line 374 of file signals_slots.h.

Referenced by itpp::TTimer< THandler >::ExpirationTime(), itpp::TTimer< THandler >::Set(), and itpp::TTimer< THandler >::TTimer().

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

- itpp/protocol/signals_slots.h

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