TurtleBrains  0.3.1
High quality, portable, C++ framework for rapid 2D game development.
tb_entity_factory_interface.h
1 
9 #ifndef _TurtleBrains_EntityFactoryInterface_h_
10 #define _TurtleBrains_EntityFactoryInterface_h_
11 
12 #include "../core/tb_noncopyable.h"
13 #include "../core/tb_dynamic_structure.h"
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_h_ */
Definition: tb_entity.h:46
Definition: tb_entity_factory_interface.h:34
Definition: tb_noncopyable.h:22
virtual bool DestroyEntity(Entity *entityToDestroy)=0
Here is some information about the primary namespace.
Definition: tb_application_dialog.h:21
EntityFactoryInterface(EntityManager &entityManager)
Definition: tb_entity_manager.h:32
virtual Entity * CreateEntityByType(const tbCore::tbString &entityTypeName, const tbCore::DynamicStructure &entityProperties)=0
Definition: tb_dynamic_structure.h:57
std::string tbString
Definition: tb_string.h:335
This is the heart of TurtleBrains for game developers to create GameScenes and Entities to interact w...