Sirikata
|
#include <TimeSteppedSimulation.hpp>
Public Member Functions | |
TimeSteppedSimulation (Context *ctx, const Duration &rate, const String &name, Network::IOStrand *strand, const char *cb_tag, bool accurate=false) | |
~TimeSteppedSimulation () | |
virtual void | start () |
Start polling this service on this strand at the given maximum rate. | |
virtual void | stop () |
Stop scheduling this service. | |
Protected Member Functions | |
virtual void | poll ()=0 |
Override this method to specify the work to be done when polling. | |
virtual void | shutdown () |
Override this method to clean up when a shutdown is requested. | |
Private Member Functions | |
void | indirectPoll () |
Private Attributes | |
TimeProfiler::Stage * | mProfiler |
Sirikata::TimeSteppedSimulation::TimeSteppedSimulation | ( | Context * | ctx, |
const Duration & | rate, | ||
const String & | name, | ||
Network::IOStrand * | strand, | ||
const char * | cb_tag, | ||
bool | accurate = false |
||
) | [inline] |
References Sirikata::TimeProfiler::addStage(), mProfiler, and Sirikata::Context::profiler.
Sirikata::TimeSteppedSimulation::~TimeSteppedSimulation | ( | ) | [inline] |
References mProfiler.
void Sirikata::TimeSteppedSimulation::indirectPoll | ( | ) | [inline, private] |
virtual void Sirikata::TimeSteppedSimulation::poll | ( | ) | [protected, pure virtual] |
Override this method to specify the work to be done when polling.
Implemented in Sirikata::Graphics::OgreRenderer, and Sirikata::Graphics::OgreSystem.
Referenced by indirectPoll().
virtual void Sirikata::TimeSteppedSimulation::shutdown | ( | ) | [inline, protected, virtual] |
Override this method to clean up when a shutdown is requested.
Referenced by stop().
virtual void Sirikata::TimeSteppedSimulation::start | ( | ) | [inline, virtual] |
Start polling this service on this strand at the given maximum rate.
Reimplemented from Sirikata::Poller.
virtual void Sirikata::TimeSteppedSimulation::stop | ( | ) | [inline, virtual] |
Stop scheduling this service.
Note that this does not immediately stop the service, it simply guarantees the service will not be scheduled again. This allows outstanding events to be handled properly.
Reimplemented from Sirikata::Poller.
Reimplemented in Sirikata::Graphics::OgreRenderer, and Sirikata::Graphics::OgreSystem.
References shutdown().
Referenced by indirectPoll(), TimeSteppedSimulation(), and ~TimeSteppedSimulation().