25 #ifndef __I6ENGINE_CORE_ENGINECORECONTROLLER_H__ 
   26 #define __I6ENGINE_CORE_ENGINECORECONTROLLER_H__ 
   28 #include <condition_variable> 
   36 #include "boost/function.hpp" 
   52         class SubSystemController;
 
   74                         _vptrOnAfterInitialize.push_back(ptrOnAfterInitialize);
 
   87                         std::unique_lock<std::mutex> ul(_lock);
 
   88                         _condVar.notify_all();
 
   95                         _bolIsInitialized = 
true;
 
  101                 void WaitForShutDown() 
const;
 
  107                         _bolShutdownComplete = 
true;
 
  116                 uint64_t registerTimer(uint64_t time, 
const boost::function<
bool(
void)> & func, 
bool looping, 
JobPriorities priority);
 
  126                 bool removeTimerID(uint64_t 
id);
 
  131                 uint64_t getTimeLeft(uint64_t 
id) 
const;
 
  137                         return _rClock.getCurrentTime(0);
 
  144                         _rClock.setCurrentTime(time);
 
  149                 bool _bolIsInitialized;
 
  151                 bool _bolShutdownComplete;
 
  152                 std::vector<boost::function<void(void)>> _vptrOnAfterInitialize;
 
  153                 mutable std::mutex _lock;
 
  154                 mutable std::condition_variable _condVar;
 
  155                 std::mutex _runningLock;
 
  156                 std::condition_variable _runningConditionVariable;
 
  174                 void Initialize() 
const;
 
void SetInitialized()
This method will tell the EngineController that the subsystems have been initialized. 
void setCurrentTime(uint64_t time)
sets the current time (only at clients, time will be synchronized by server) 
void SetShutdownComplete()
This method initializes the final shutdown of the main loop. 
this class is used as an abstraction layer 
void SetOnAfterInitializedCallback(const boost::function< void(void)> &ptrOnAfterInitialize)
This method will set the callback which will be called after initialization. 
void ShutDown()
This method will stop the main loop and will start the shut down sequence. 
uint64_t getCurrentTime() const 
returns current application time in microseconds 
This class is used as an abstraction layer.