Cheetah Software  1.0
PeriodicMemberFunction< T > Class Template Reference

#include <PeriodicTask.h>

+ Inheritance diagram for PeriodicMemberFunction< T >:
+ Collaboration diagram for PeriodicMemberFunction< T >:

Public Member Functions

 PeriodicMemberFunction (PeriodicTaskManager *taskManager, float period, std::string name, void(T::*function)(), T *obj)
 
void cleanup ()
 
void init ()
 
void run ()
 
- Public Member Functions inherited from PeriodicTask
 PeriodicTask (PeriodicTaskManager *taskManager, float period, std::string name)
 
void start ()
 
void stop ()
 
void printStatus ()
 
void clearMax ()
 
bool isSlow ()
 
virtual ~PeriodicTask ()
 
float getPeriod ()
 
float getRuntime ()
 
float getMaxPeriod ()
 
float getMaxRuntime ()
 

Private Attributes

void(T::* _function )()
 
T * _obj
 

Detailed Description

template<typename T>
class PeriodicMemberFunction< T >

A periodic task for calling a member function

Definition at line 109 of file PeriodicTask.h.

Constructor & Destructor Documentation

template<typename T>
PeriodicMemberFunction< T >::PeriodicMemberFunction ( PeriodicTaskManager taskManager,
float  period,
std::string  name,
void(T::*)()  function,
T *  obj 
)
inline

Definition at line 111 of file PeriodicTask.h.

113  : PeriodicTask(taskManager, period, name),
114  _function(function),
115  _obj(obj) {}
PeriodicTask(PeriodicTaskManager *taskManager, float period, std::string name)
void(T::* _function)()
Definition: PeriodicTask.h:122

Member Function Documentation

template<typename T>
void PeriodicMemberFunction< T >::cleanup ( )
inlinevirtual

Implements PeriodicTask.

Definition at line 117 of file PeriodicTask.h.

117 {}
template<typename T>
void PeriodicMemberFunction< T >::init ( )
inlinevirtual

Implements PeriodicTask.

Definition at line 118 of file PeriodicTask.h.

118 {}
template<typename T>
void PeriodicMemberFunction< T >::run ( )
inlinevirtual

Implements PeriodicTask.

Definition at line 119 of file PeriodicTask.h.

119 { (_obj->*_function)(); }
void(T::* _function)()
Definition: PeriodicTask.h:122

Member Data Documentation

template<typename T>
void(T::* PeriodicMemberFunction< T >::_function) ()
private

Definition at line 122 of file PeriodicTask.h.

template<typename T>
T* PeriodicMemberFunction< T >::_obj
private

Definition at line 123 of file PeriodicTask.h.


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