Fission FSN
Loading...
Searching...
No Matches
fsCEntityFactory.h
Go to the documentation of this file.
1/********************************************************************
2*
3* Created: 7/4/2014 14:10
4*
5* File: fsCEntityFactory.h
6*
7* Author: Mick Waites
8*
9* Purpose: Base entity/component creation functionality
10*
11*********************************************************************/
12
13#ifndef fsCEntityFactoryhdr
14#define fsCEntityFactoryhdr
15
16#include <map>
17#include <vector>
18
20
21class fsCEntity;
22
23
25{
26public:
27
28 fsCEntity* entityConstructWithComponent(const fsStr& pEntityName, fsCUniqueId pComponentId) const;
29
30 void merge(fsCEntityFactory* const pRHS);
31 fsCEntity* emptyEntityCreate(const fsStr& pEntityName) const;
32 virtual fsCEntity* entityConstruct(const fsStr& pEntityName) const;
33
34 virtual ~fsCEntityFactory();
35
36protected:
37
38 typedef std::vector<fsCUniqueId> tConstructionPlan;
39
40 fsStr entityPrefixGet(const fsStr& pEntityName) const;
41
43 virtual void constructionPlansRegisterDo();
44
46
47 std::map<fsStr, tConstructionPlan> mPlans;
48
49private:
50
51 fsBool mHierarchyCheck;
52};
53
54#endif
std::map< fsStr, tConstructionPlan > mPlans
Definition fsCEntityFactory.h:47
virtual fsCEntity * entityConstruct(const fsStr &pEntityName) const
Definition fsCEntityFactory.cpp:27
void constructionPlansRegister()
Definition fsCEntityFactory.cpp:56
void merge(fsCEntityFactory *const pRHS)
Definition fsCEntityFactory.cpp:8
virtual void constructionPlansRegisterDo()
Definition fsCEntityFactory.cpp:65
virtual ~fsCEntityFactory()
Definition fsCEntityFactory.cpp:75
fsCEntityFactory()
Definition fsCEntityFactory.cpp:70
std::vector< fsCUniqueId > tConstructionPlan
Definition fsCEntityFactory.h:38
fsCEntity * emptyEntityCreate(const fsStr &pEntityName) const
Definition fsCEntityFactory.cpp:13
fsStr entityPrefixGet(const fsStr &pEntityName) const
Definition fsCEntityFactory.cpp:47
fsCEntity * entityConstructWithComponent(const fsStr &pEntityName, fsCUniqueId pComponentId) const
Definition fsCEntityFactory.cpp:19
Definition fsCEntity.h:39
Definition fsCUniqueId.h:21
Definition fsStr.h:23
bool fsBool
Definition fsBaseTypes.h:26