TurtleBrains  0.3.5
High quality, portable, C++ framework for rapid 2D game development.
tb_entity_factory_interface.hpp
1 
9 #ifndef TurtleBrains_EntityFactoryInterface_hpp
10 #define TurtleBrains_EntityFactoryInterface_hpp
11 
12 #include <turtle_brains/core/tb_noncopyable.hpp>
13 #include <turtle_brains/core/tb_dynamic_structure.hpp>
14 
15 #include <map>
16 #include <set>
17 #include <list>
18 
19 namespace TurtleBrains
20 {
21  namespace Game
22  {
23 
24  class Entity;
25  class EntityManager;
26 
27  namespace Unstable
28  {
29 
35  {
36  public:
40  explicit EntityFactoryInterface(EntityManager& entityManager);
41 
45  virtual ~EntityFactoryInterface(void);
46 
47  Entity* AddEntity(const tbCore::tbString& entityTypeName, const tbCore::DynamicStructure& entityProperties);
48 
49  protected:
57  virtual Entity* CreateEntityByType(const tbCore::tbString& entityTypeName, const tbCore::DynamicStructure& entityProperties) = 0;
58 
62  virtual bool DestroyEntity(Entity* entityToDestroy) = 0;
63 
64  private:
65  EntityManager& mEntityManager;
66  };
67 
68  }; /* namespace Unstable */
69  }; /* namespace Game */
70 }; /* namespace TurtleBrains */
71 
72 namespace tbGame = TurtleBrains::Game;
73 
74 #endif /* TurtleBrains_EntityFactoryInterface_hpp */
Definition: tb_entity.hpp:46
Definition: tb_entity_factory_interface.hpp:34
Definition: tb_noncopyable.hpp:22
virtual bool DestroyEntity(Entity *entityToDestroy)=0
Here is some information about the primary namespace.
Definition: tb_application_dialog.hpp:21
EntityFactoryInterface(EntityManager &entityManager)
Definition: tb_entity_manager.hpp:32
virtual Entity * CreateEntityByType(const tbCore::tbString &entityTypeName, const tbCore::DynamicStructure &entityProperties)=0
Definition: tb_dynamic_structure.hpp:37
std::string tbString
Definition: tb_string.hpp:335
This is the heart of TurtleBrains for game developers to create GameScenes and Entities to interact w...