OMK::Scheduler Class Reference

Abstract class encapsulating all the scheduling functionnality. More...

#include <OMKScheduler.h>

Inheritance diagram for OMK::Scheduler:

Inheritance graph
[legend]
Collaboration diagram for OMK::Scheduler:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Scheduler (unsigned int numberOfSteps)
 constructor, specifying the numeber of different simulation stpes in a simualtion cycle
virtual ~Scheduler ()=0
 destructor
virtual void addToScheduable (ReferenceObjectHandle *ref, unsigned int when)=0
 add an object to the list of scheduable objects
virtual void removeFromScheduable (ReferenceObjectHandle *ref)=0
 remove an object from the list of scheduable objects
virtual void schedule (ReferenceObjectHandle *ref)=0
 mark an object as active
virtual void unschedule (ReferenceObjectHandle *ref)=0
 mark an object as inactive
virtual void runStep (unsigned int which)=0
 run the scheduler for a certain simulation step

Protected Member Functions

virtual void setComputingState (ReferenceObjectHandle *, ReferenceObjectHandle::SimulatedObjectComputingState) const
 change the computing state of a reference object handle

Protected Attributes

unsigned int _numberOfSteps
 remember the number of simulation steps in a simualtion cycle

Detailed Description

Abstract class encapsulating all the scheduling functionnality.

Definition at line 25 of file OMKScheduler.h.


Constructor & Destructor Documentation

Scheduler::Scheduler ( unsigned int  numberOfSteps  ) 

constructor, specifying the numeber of different simulation stpes in a simualtion cycle

Definition at line 33 of file OMKScheduler.cpp.

00033                                                :
00034    _numberOfSteps (numberOfSteps) {
00035 
00036 }

Scheduler::~Scheduler (  )  [pure virtual]

destructor

Definition at line 38 of file OMKScheduler.cpp.

00038                       {
00039 
00040 }


Member Function Documentation

virtual void OMK::Scheduler::addToScheduable ( ReferenceObjectHandle ref,
unsigned int  when 
) [pure virtual]

add an object to the list of scheduable objects

Parameters:
ref the reference handler of the added object
when the index in the cycle of the simulation step where the object should be added

Implemented in OMK::FrameScheduler.

virtual void OMK::Scheduler::removeFromScheduable ( ReferenceObjectHandle ref  )  [pure virtual]

remove an object from the list of scheduable objects

Implemented in OMK::FrameScheduler.

Referenced by OMK::DistributedController::processEvent(), and OMK::Controller::reactToControlledObjectsSystemEvents().

virtual void OMK::Scheduler::schedule ( ReferenceObjectHandle ref  )  [pure virtual]

mark an object as active

Implemented in OMK::FrameScheduler.

Referenced by OMK::Controller::processStartEventAfterMorphose(), OMK::Controller::processStartEventOf(), and OMK::Controller::reactToControlledObjectsSystemEvents().

virtual void OMK::Scheduler::unschedule ( ReferenceObjectHandle ref  )  [pure virtual]

mark an object as inactive

Implemented in OMK::FrameScheduler.

Referenced by OMK::DistributedController::processEvent(), and OMK::Controller::reactToControlledObjectsSystemEvents().

virtual void OMK::Scheduler::runStep ( unsigned int  which  )  [pure virtual]

run the scheduler for a certain simulation step

Parameters:
which the index in the cycle of the step to be run

Implemented in OMK::FrameScheduler.

Referenced by OMK::Controller::computeNextSimulationStep().

void Scheduler::setComputingState ( ReferenceObjectHandle ,
ReferenceObjectHandle::SimulatedObjectComputingState   
) const [protected, virtual]

change the computing state of a reference object handle

Definition at line 42 of file OMKScheduler.cpp.

References OMK::ReferenceObjectHandle::_computingState.

00044 {
00045    objectHandle->_computingState = state ;
00046 }


Member Data Documentation

unsigned int OMK::Scheduler::_numberOfSteps [protected]

remember the number of simulation steps in a simualtion cycle

Definition at line 61 of file OMKScheduler.h.

Referenced by OMK::FrameScheduler::FrameScheduler(), OMK::FrameScheduler::removeFromScheduable(), OMK::FrameScheduler::schedule(), OMK::FrameScheduler::unschedule(), and OMK::FrameScheduler::~FrameScheduler().


logo OpenMask

Documentation generated on Mon Jun 9 11:46:02 2008

Generated with doxygen by Dimitri van Heesch ,   1997-2007