i6engine  1.0
i6e::api::EngineController Class Reference

This class is used as the Controller for the whole engine Create an instance of this class and use the functions to start / stop / ... the Engine. More...

#include <D:/Projekte/i6engine/libs/i6engine-modules/include/i6engine/api/EngineController.h>

Public Member Functions

 ~EngineController ()
 Destructor. More...
 
void registerSubSystem (const std::string &name, core::ModuleController *module, uint32_t frameTime)
 This method registeres a modul. More...
 
void registerSubSystem (const std::string &name, core::ModuleController *module, const std::set< core::Subsystem > &waitingFor)
 
AudioFacadegetAudioFacade () const
 
GraphicsFacadegetGraphicsFacade () const
 
GUIFacadegetGUIFacade () const
 
InputFacadegetInputFacade () const
 
MessagingFacadegetMessagingFacade () const
 
NetworkFacadegetNetworkFacade () const
 
ObjectFacadegetObjectFacade () const
 
PhysicsFacadegetPhysicsFacade () const
 
ScriptingFacadegetScriptingFacade () const
 
IDManagergetIDManager () const
 
LanguageManagergetLanguageManager () const
 
TextManagergetTextManager () const
 
WaynetManagergetWaynetManager () const
 
void registerApplication (Application &app)
 register an Application to the Engine More...
 
void start ()
 A start method to Initialize and run the engine. More...
 
void setType (GameType type)
 
void setDebugdrawer (const uint8_t dd)
 sets level of the debug drawer More...
 
uint8_t getDebugdrawer () const
 gets level of the debug drawer More...
 
ApplicationgetAppl () const
 returns the registered Application More...
 
void registerDefault (const bool ds)
 registers a basic default configuration More...
 
void registerDefault (const bool ds, HWND hWnd)
 registers a basic default configuration with a window handle More...
 
void stop ()
 call this method to shutdown everything More...
 
void reset ()
 removes all subsystems and application More...
 
core::EngineCoreControllergetController () const
 
uint64_t registerTimer (uint64_t time, const boost::function< bool(void)> &func, bool looping, core::JobPriorities priority)
 registers a timer More...
 
void removeTimer (core::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 the left time for the given timer ID in microseconds 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...
 
uint64_t getUUID () const
 returns the uuid of this node More...
 
uint64_t getNewUUID () const
 returns a new uuid More...
 
clockUtils::iniParser::IniParser & getIniParser ()
 returns the iniParser that parsed the i6engine config file More...
 
GameType getType () const
 returns the type of this node More...
 
HWND createWindow (HINSTANCE hInstance)
 creates a new Window More...
 
void enableCommandLineReader ()
 starts a thread reading console input and sending lines as input message More...
 

Friends

class utils::Singleton< EngineController, utils::exceptions::ExceptionQueue >
 

Additional Inherited Members

- Static Public Member Functions inherited from i6e::utils::Singleton< T, Dependencies >
static T * GetSingletonPtr ()
 Returns a pointer to the Singleton class. More...
 
static T & GetSingleton ()
 Returns a reference to the Singleton class. More...
 
- Protected Member Functions inherited from i6e::utils::Singleton< T, Dependencies >
 Singleton ()
 
virtual ~Singleton ()
 

Detailed Description

This class is used as the Controller for the whole engine Create an instance of this class and use the functions to start / stop / ... the Engine.

Definition at line 88 of file EngineController.h.

Constructor & Destructor Documentation

i6e::api::EngineController::~EngineController ( )

Destructor.

Member Function Documentation

HWND i6e::api::EngineController::createWindow ( HINSTANCE  hInstance)

creates a new Window

void i6e::api::EngineController::enableCommandLineReader ( )

starts a thread reading console input and sending lines as input message

Application* i6e::api::EngineController::getAppl ( ) const
inline

returns the registered Application

Definition at line 196 of file EngineController.h.

AudioFacade* i6e::api::EngineController::getAudioFacade ( ) const
inline

Definition at line 112 of file EngineController.h.

core::EngineCoreController* i6e::api::EngineController::getController ( ) const
inline

Definition at line 220 of file EngineController.h.

uint64_t i6e::api::EngineController::getCurrentTime ( ) const

returns current application time in microseconds

uint8_t i6e::api::EngineController::getDebugdrawer ( ) const
inline

gets level of the debug drawer

Definition at line 189 of file EngineController.h.

GraphicsFacade* i6e::api::EngineController::getGraphicsFacade ( ) const
inline

Definition at line 116 of file EngineController.h.

GUIFacade* i6e::api::EngineController::getGUIFacade ( ) const
inline

Definition at line 120 of file EngineController.h.

IDManager* i6e::api::EngineController::getIDManager ( ) const
inline

Definition at line 148 of file EngineController.h.

clockUtils::iniParser::IniParser& i6e::api::EngineController::getIniParser ( )
inline

returns the iniParser that parsed the i6engine config file

Definition at line 273 of file EngineController.h.

InputFacade* i6e::api::EngineController::getInputFacade ( ) const
inline

Definition at line 124 of file EngineController.h.

LanguageManager* i6e::api::EngineController::getLanguageManager ( ) const
inline

Definition at line 152 of file EngineController.h.

MessagingFacade* i6e::api::EngineController::getMessagingFacade ( ) const
inline

Definition at line 128 of file EngineController.h.

NetworkFacade* i6e::api::EngineController::getNetworkFacade ( ) const
inline

Definition at line 132 of file EngineController.h.

uint64_t i6e::api::EngineController::getNewUUID ( ) const

returns a new uuid

ObjectFacade* i6e::api::EngineController::getObjectFacade ( ) const
inline

Definition at line 136 of file EngineController.h.

PhysicsFacade* i6e::api::EngineController::getPhysicsFacade ( ) const
inline

Definition at line 140 of file EngineController.h.

ScriptingFacade* i6e::api::EngineController::getScriptingFacade ( ) const
inline

Definition at line 144 of file EngineController.h.

TextManager* i6e::api::EngineController::getTextManager ( ) const
inline

Definition at line 156 of file EngineController.h.

uint64_t i6e::api::EngineController::getTimeLeft ( uint64_t  id) const

returns the left time for the given timer ID in microseconds

GameType i6e::api::EngineController::getType ( ) const
inline

returns the type of this node

Definition at line 280 of file EngineController.h.

uint64_t i6e::api::EngineController::getUUID ( ) const
inline

returns the uuid of this node

Definition at line 261 of file EngineController.h.

WaynetManager* i6e::api::EngineController::getWaynetManager ( ) const
inline

Definition at line 160 of file EngineController.h.

void i6e::api::EngineController::registerApplication ( Application app)

register an Application to the Engine

Parameters
[in]appreference to the application
void i6e::api::EngineController::registerDefault ( const bool  ds)
inline

registers a basic default configuration

Definition at line 201 of file EngineController.h.

void i6e::api::EngineController::registerDefault ( const bool  ds,
HWND  hWnd 
)

registers a basic default configuration with a window handle

void i6e::api::EngineController::registerSubSystem ( const std::string &  name,
core::ModuleController module,
uint32_t  frameTime 
)

This method registeres a modul.

Parameters
[in]namename of the module
[in]modulethe module to be registered
[in]frameTimetime between two ticks of this subsystem This function can be used to create a non default subsystem configurator or you can even register your own subsystems. But if you do this, make sure, they match the required behaviour. For most purposes, the default configuration is sufficiant and can be registered with registerDefault()
void i6e::api::EngineController::registerSubSystem ( const std::string &  name,
core::ModuleController module,
const std::set< core::Subsystem > &  waitingFor 
)
uint64_t i6e::api::EngineController::registerTimer ( uint64_t  time,
const boost::function< bool(void)> &  func,
bool  looping,
core::JobPriorities  priority 
)

registers a timer

Parameters
[in]timetime in microseconds until func is called
[in]funcfunction to be called after given time
[in]loopingdefines whether method is looping or just running once
[in]prioritypriority of this task, defining which Job will be handles preferred
void i6e::api::EngineController::removeTimer ( core::JobPriorities  priority)

deletes all timer with given priority

bool i6e::api::EngineController::removeTimerID ( uint64_t  id)

deletes all timer with given name

void i6e::api::EngineController::reset ( )

removes all subsystems and application

void i6e::api::EngineController::setCurrentTime ( uint64_t  time)

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

void i6e::api::EngineController::setDebugdrawer ( const uint8_t  dd)
inline

sets level of the debug drawer

Definition at line 182 of file EngineController.h.

void i6e::api::EngineController::setType ( GameType  type)
inline

Definition at line 175 of file EngineController.h.

void i6e::api::EngineController::start ( )

A start method to Initialize and run the engine.

void i6e::api::EngineController::stop ( )

call this method to shutdown everything

Friends And Related Function Documentation

Definition at line 89 of file EngineController.h.


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