Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Scheduler Class Reference

Class for scheduling task. More...

#include <scheduler.hpp>

List of all members.

Public Member Functions

 Scheduler ()
 Constructor.
 ~Scheduler ()
 Destructor.
void schedule ()
 Method for scheduling tasks.
void quit ()
 Force scheduler to quit the test as soon as possible.

Protected Member Functions

void wait (timespec)
 Wait given amount of time.

Protected Attributes

bool quitFlag
 quit flag


Detailed Description

Class for scheduling task.

This class runs tasks in the right order, at the right time, measures execution times and saves this data for further processing. Usually framework users do not have to care about this class at all.

Definition at line 29 of file scheduler.hpp.


Constructor & Destructor Documentation

Scheduler::Scheduler  ) 
 

Constructor.

Definition at line 27 of file scheduler.cpp.

References quitFlag.

Scheduler::~Scheduler  ) 
 

Destructor.

Definition at line 34 of file scheduler.cpp.


Member Function Documentation

void Scheduler::quit  ) 
 

Force scheduler to quit the test as soon as possible.

Definition at line 122 of file scheduler.cpp.

References PtfCore::getMessageLog(), Singleton< PtfCore >::getSingleton(), MESSAGE, and quitFlag.

Referenced by MouseInputDevice::poll(), KeyboardInputDevice::poll(), and JoystickInputDevice::poll().

Here is the call graph for this function:

void Scheduler::schedule  ) 
 

Method for scheduling tasks.

Overwritten method inherited from class Thread of the CommonC++ library in order to realize scheduler as independent thread. Definition at line 43 of file scheduler.cpp.

References ERROR, TimeInterval::getDifference(), PtfCore::getMessageLog(), SequenceIterator::getNextTaskId(), PtfCore::getReactionHandler(), PtfCore::getSequenceIterator(), Singleton< PtfCore >::getSingleton(), PtfCore::getTaskLog(), PtfCore::getTaskRecords(), PtfCore::getTaskRecordsMutex(), PtfCore::getTasks(), ReactionHandler::handle(), SequenceIterator::hasNextTaskId(), TimeInterval::measureA(), TimeInterval::measureB(), MESSAGE, quitFlag, TimeInterval::toString(), and wait().

Referenced by PtfCore::run().

Here is the call graph for this function:

void Scheduler::wait timespec  time  )  [protected]
 

Wait given amount of time.

Parameters:
time amount of time to wait
Definition at line 109 of file scheduler.cpp.

References TimeInterval::compareDifference(), TimeInterval::measureA(), and TimeInterval::measureB().

Referenced by schedule().

Here is the call graph for this function:


Member Data Documentation

bool Scheduler::quitFlag [protected]
 

quit flag

Definition at line 31 of file scheduler.hpp.

Referenced by quit(), schedule(), and Scheduler().


The documentation for this class was generated from the following files:
Generated on Fri Dec 17 14:54:31 2004 for Psychological Test Framework by doxygen 1.3.8