i6engine  1.0
i6e::core::EngineCoreController Class Reference

this class is used as an abstraction layer More...

#include <D:/Projekte/i6engine/libs/i6engine-core/include/i6engine/core/EngineCoreController.h>

Public Member Functions

 EngineCoreController (SubSystemController *ssc)
 creates new EngineCoreController with given SubSystemController More...
 
 ~EngineCoreController ()
 
void SetOnAfterInitializedCallback (const boost::function< void(void)> &ptrOnAfterInitialize)
 This method will set the callback which will be called after initialization. More...
 
void RunEngine ()
 This method will initialize and start the game engine. More...
 
void ShutDown ()
 This method will stop the main loop and will start the shut down sequence. More...
 
void SetInitialized ()
 This method will tell the EngineController that the subsystems have been initialized. More...
 
void WaitForShutDown () const
 This method will wait until all subsystems have been shut down. More...
 
void SetShutdownComplete ()
 This method initializes the final shutdown of the main loop. More...
 
uint64_t registerTimer (uint64_t time, const boost::function< bool(void)> &func, bool looping, JobPriorities priority)
 registers a timer More...
 
void removeTimer (JobPriorities priority)
 deletes all timer with given priority More...
 
bool removeTimerID (uint64_t id)
 deletes all timer with given name More...
 
uint64_t getTimeLeft (uint64_t id) const
 returns remaining time More...
 
uint64_t getCurrentTime () const
 returns current application time in microseconds More...
 
void setCurrentTime (uint64_t time)
 sets the current time (only at clients, time will be synchronized by server) More...
 

Detailed Description

this class is used as an abstraction layer

The EngineCoreController initializes all registered subsystems and starts the main loop. The main loop gets the clock update and notifies the SubSystemController.

Definition at line 61 of file EngineCoreController.h.

Constructor & Destructor Documentation

i6e::core::EngineCoreController::EngineCoreController ( SubSystemController ssc)
explicit

creates new EngineCoreController with given SubSystemController

i6e::core::EngineCoreController::~EngineCoreController ( )

Member Function Documentation

uint64_t i6e::core::EngineCoreController::getCurrentTime ( ) const
inline

returns current application time in microseconds

Definition at line 136 of file EngineCoreController.h.

uint64_t i6e::core::EngineCoreController::getTimeLeft ( uint64_t  id) const

returns remaining time

uint64_t i6e::core::EngineCoreController::registerTimer ( uint64_t  time,
const boost::function< bool(void)> &  func,
bool  looping,
JobPriorities  priority 
)

registers a timer

Parameters
[in]namename of the timer to identify
[in]timetime in microseconds until func is called
[in]funcfunction to be called after given time
void i6e::core::EngineCoreController::removeTimer ( JobPriorities  priority)

deletes all timer with given priority

bool i6e::core::EngineCoreController::removeTimerID ( uint64_t  id)

deletes all timer with given name

void i6e::core::EngineCoreController::RunEngine ( )

This method will initialize and start the game engine.

void i6e::core::EngineCoreController::setCurrentTime ( uint64_t  time)
inline

sets the current time (only at clients, time will be synchronized by server)

Definition at line 143 of file EngineCoreController.h.

void i6e::core::EngineCoreController::SetInitialized ( )
inline

This method will tell the EngineController that the subsystems have been initialized.

Definition at line 94 of file EngineCoreController.h.

void i6e::core::EngineCoreController::SetOnAfterInitializedCallback ( const boost::function< void(void)> &  ptrOnAfterInitialize)
inline

This method will set the callback which will be called after initialization.

Definition at line 73 of file EngineCoreController.h.

void i6e::core::EngineCoreController::SetShutdownComplete ( )
inline

This method initializes the final shutdown of the main loop.

Definition at line 106 of file EngineCoreController.h.

void i6e::core::EngineCoreController::ShutDown ( )
inline

This method will stop the main loop and will start the shut down sequence.

Definition at line 85 of file EngineCoreController.h.

void i6e::core::EngineCoreController::WaitForShutDown ( ) const

This method will wait until all subsystems have been shut down.


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