25 #ifndef __I6ENGINE_MODULES_OBJECTMANAGER_H__
26 #define __I6ENGINE_MODULES_OBJECTMANAGER_H__
42 typedef utils::sharedPtr<api::GameObject, api::GameObject>
GOPtr;
86 void loadLevel(
const std::string & file,
const std::string & flags,
const std::function<
void(uint16_t)> & callback);
92 std::unordered_map<int64_t, GOPtr> _GOMap;
112 void registerGOTemplate(
const std::string & file);
133 void tickComponents();
143 void removeTicker(int64_t c);
149 void sendObjectMessages(
const core::IPKey & receiver)
const;
154 void deleteObject(int64_t
id);
159 void insertObject(
const GOPtr & go);
164 void deleteAllObjectsOfType(
const std::string & type);
171 GOPtr getObject(
const int64_t guid)
const;
api::ComPtr createGOC(const int64_t id, const std::string &GOCType, const api::attributeMap ¶ms, const GOPtr &owner) const
Creates a new Component.
struct for sending messages to special GameObjects fullfilling the given method never send through ne...
Factory in order to create Component.
boost::shared_ptr< Message > Ptr
std::map< std::string, std::string > attributeMap
void loadLevel(const std::string &file, const std::string &flags, const std::function< void(uint16_t)> &callback)
loads a level out of the given file with the given flags
#define ASSERT_THREAD_SAFETY_HEADER
A shared pointer counting references and adds objects being not referenced any more to an internal li...
utils::weakPtr< Component > WeakComPtr
boost::function< ComPtr(const int64_t, const attributeMap &)> createGOCCallback
void Tick()
tick of the ObjectManager, called by ObjectController to inform ObjectManager there is the next frame...
utils::sharedPtr< api::GameObject, api::GameObject > GOPtr
~ObjectManager()
destructor
void registerCTemplate(const std::string &GOCType, const api::createGOCCallback &fn)
registers a template with callback for creating a Component
Factory in order to create GameObjects.
ObjectManager()
constructor, initializes Object stuff
Extracts the contents of incoming messages on the "Object" channel and calls the corresponding method...