Fission FSN
Loading...
Searching...
No Matches
gfCHogEntityFactory.h
Go to the documentation of this file.
1/********************************************************************
2*
3* File: fsCHogEntityFactory.h
4*
5* Purpose: HOG entity factory
6*
7*********************************************************************/
8
9#ifndef gfCHogEntityFactoryhdr
10#define gfCHogEntityFactoryhdr
11
12#include <typeinfo>
13#include <memory>
14#include <set>
15
17
19
20
22{
23public:
24
35
36 const std::type_info* entityIdentifierIdGet(const fsStr& pPrefix) const;
37 fsBool entityTagIdentifierGet(const fsStr& pPrefix) const;
38
39 fsCEntity* entityConstruct(const fsStr& pEntityName) const override;
40
41 static std::shared_ptr<fsCEntityFactory> create();
42
43 virtual ~gfCHogEntityFactory();
44
45protected:
46
47 void constructionPlansRegisterDo() override;
48
50
51private:
52
53 void registerPlanAndEntityTag(tConstructionPlan const& pPlan, fsStr const& pTag);
54
55 template<typename TComponent>
56 void registerPlanAndEntityType(tConstructionPlan const& pPlan);
57
58 template<typename TComponent>
59 void registerPlan(tConstructionPlan const& pPlan);
60
61 void subScenePrefixHandle(fsStr& pPrefixName) const;
62 fsBool entityKeyExtractFromName(fsStr& pPrefix) const;
63
64 void actorPlanRegister();
65 void wordSearchImagePlanRegister();
66 void wordSearchWordPlanRegister();
67#if defined fs3d
68 void threeDPlanRegister();
69#endif
70
71 void slidasquareCutterPlanRegister();
72 void flipsawCutterPlanRegister();
73 void rotateCutterPlanRegister();
74 void jigsawCutterPlanRegister();
75 void parallaxPlanRegister();
76 void inventoryPlanRegister();
77 void inventoryToolPlanRegister();
78
79 void tutorialPlanRegister();
80 void subSceneMarkerPlanRegister();
81 void generatedSubSceneMarkerPlanRegister();
82 void navPlanRegister();
83 void maskPlanRegister();
84 void sceneTextPlanRegister();
85 void randomPickablePlanRegister();
86 void randomPickableHomophonePlanRegister();
87 void hiddenPickablePlanRegister();
88 void requiredPickablePlanRegister();
89 void incidentalAnimationPlanRegister();
90 void incidentalParticlePlanRegister();
91 void photographableParticlePlanRegister();
92 void incidentalCloudParticlePlanRegister();
93 void hotCollectablePlanRegister();
94 void trapNonCollectablePlanRegister();
95 void subSceneNavPlanRegister();
96 void draggableKeyPlanRegister();
97 void lockPlanRegister();
98 void taskPlanRegister();
99 void bonusPlanRegister();
100 void bonusSilhouettePlanRegister();
101 void bonusPhotoPlanRegister();
102 void bonusBonusPlanRegister();
103 void groupPickablePlanRegister();
104 void bonusStaffPlanRegister();
105
106 void jigsawPlanRegister();
107 void rotatePlanRegister();
108 void flipsawPlanRegister();
109 void pairsPlanRegister();
110 void jtdPlanRegister();
111 void stdPlanRegister();
112 void slidasquarePlanRegister();
113 void wordTilesPlanRegister();
114 void anagramPlanRegister();
115 void wordSearchMinigameLogicPlanRegister();
116
117 void jigsawMinigameLogicPlanRegister();
118 void flipsawMinigameLogicPlanRegister();
119
120 std::map<fsStr, const std::type_info*> mIdentifiers;
121 std::set<fsStr> mTagIdentifiers;
122};
123
124
125template<typename TComponent>
126void gfCHogEntityFactory::registerPlanAndEntityType(tConstructionPlan const& pPlan)
127{
128 mPlans.emplace(TComponent::mEntityPrefix, pPlan);
129 mIdentifiers.emplace(TComponent::mEntityPrefix, &typeid(TComponent));
130}
131
132template<typename TComponent>
133void gfCHogEntityFactory::registerPlan(tConstructionPlan const& pPlan)
134{
135 mPlans.emplace(TComponent::mEntityPrefix, pPlan);
136}
137
138#endif
std::map< fsStr, tConstructionPlan > mPlans
Definition fsCEntityFactory.h:47
fsCEntityFactory()
Definition fsCEntityFactory.cpp:70
std::vector< fsCUniqueId > tConstructionPlan
Definition fsCEntityFactory.h:38
Definition fsCEntity.h:39
Definition fsStr.h:23
static const fsStr hiddenPickablePrefix
Definition gfCHogEntityFactory.h:28
static const fsStr bonusBonusPickablePrefix
Definition gfCHogEntityFactory.h:32
gfCHogEntityFactory()
Definition gfCHogEntityFactory.cpp:654
fsBool entityTagIdentifierGet(const fsStr &pPrefix) const
Definition gfCHogEntityFactory.cpp:84
static const fsStr requiredPickablePrefix
Definition gfCHogEntityFactory.h:27
static const fsStr groupPickablePrefix
Definition gfCHogEntityFactory.h:34
virtual ~gfCHogEntityFactory()
Definition gfCHogEntityFactory.cpp:658
static const fsStr bonusSilhouettePickablePrefix
Definition gfCHogEntityFactory.h:30
static const fsStr randomPickablePrefix
Definition gfCHogEntityFactory.h:25
fsCEntity * entityConstruct(const fsStr &pEntityName) const override
Definition gfCHogEntityFactory.cpp:613
static std::shared_ptr< fsCEntityFactory > create()
Definition gfCHogEntityFactory.cpp:647
const std::type_info * entityIdentifierIdGet(const fsStr &pPrefix) const
Definition gfCHogEntityFactory.cpp:89
static const fsStr bonusPickablePrefix
Definition gfCHogEntityFactory.h:29
void constructionPlansRegisterDo() override
Definition gfCHogEntityFactory.cpp:97
static const fsStr bonusPhotoPickablePrefix
Definition gfCHogEntityFactory.h:31
static const fsStr bonusStaffPickablePrefix
Definition gfCHogEntityFactory.h:33
static const fsStr randomPickableHomophonePrefix
Definition gfCHogEntityFactory.h:26
bool fsBool
Definition fsBaseTypes.h:26