Robert Ellis / TaskManager
Embed: (wiki syntax)

« Back to documentation index

Task Class Reference

Override this class to create a Task that can be managed with the TaskManager. More...

#include <Task.h>

Public Member Functions

 Task ()
 Contructor.
 Task (int _interval)
 Constructor.
void start ()
 Starts the task.
virtual void tick ()=0
 Virtual method which gets called at the specified interval.
void stop ()
 Stops the task from running.
bool isRunning ()
 Returns true if the task is running.

Protected Member Functions

void setInterval (int _interval)
 Set the interval that the task tick method runs.

Detailed Description

Override this class to create a Task that can be managed with the TaskManager.

Definition at line 11 of file Task.h.


Constructor & Destructor Documentation

Task (  )

Contructor.

Sets interval to default of 1ms.

Definition at line 4 of file Task.cpp.

Task ( int  _interval )

Constructor.

Parameters:
_intervalThe running interval of the task in us.

Definition at line 9 of file Task.cpp.


Member Function Documentation

bool isRunning (  )

Returns true if the task is running.

Definition at line 45 of file Task.h.

void setInterval ( int  _interval ) [protected]

Set the interval that the task tick method runs.

Interval in us.

Definition at line 54 of file Task.h.

void start (  )

Starts the task.

Should be automatically called from the TaskManager when it is added.

Definition at line 14 of file Task.cpp.

void stop (  )

Stops the task from running.

Definition at line 26 of file Task.cpp.

virtual void tick (  ) [pure virtual]

Virtual method which gets called at the specified interval.