Yet Another Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
entitymanager.h
Go to the documentation of this file.
1 
9 #ifndef YAGE_ENGINE_ENTITYMANAGER_H
10 #define YAGE_ENGINE_ENTITYMANAGER_H
11 
12 #include "entity.h"
13 
14 #include <vector>
15 
16 namespace yage
17 {
18 
19 class Space;
20 
25 {
26 public:
30  EntityManager() = default;
31 
38  EntityManager(Space *space);
39 
46  EntityManager(Space *space, std::size_t n);
47 
54  unsigned createEntity();
55 
63 
64 private:
68  unsigned next_handle_;
69 
73  Space *space_;
74 
78  std::vector<Entity> entities_;
79 };
80 
81 } // namespace yage
82 
83 #endif
unsigned createEntity()
Creates an Entity and returns the handle to the entity, which can then be used by the user to do oper...
Definition: entitymanager.cpp:22
Manages entities in a space.
Definition: entitymanager.h:24
Entity createEntityInstance()
Creates an Entity and returns it.
Definition: entitymanager.cpp:27
Entity convenience class.
Definition: entity.h:29
EntityManager()=default
Default instance of an EntityManager.
Space that keeps track of all the entities, componenets and runs the systems on the data to update th...
Definition: space.h:26