Changeset 5929 for code/trunk/src/libraries/core/Game.h
- Timestamp:
- Oct 12, 2009, 8:20:07 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core5 (added) merged: 5768-5769,5772,5775-5780,5783-5785,5791-5792,5795-5807,5809-5814,5816-5832,5836-5839,5842-5853,5855-5899,5904-5922,5924-5928
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/Game.h
r5747 r5929 117 117 template <class T> 118 118 static void createFactory(const std::string& className) 119 { factories_s[className].reset(new TemplateGameStateFactory<T>()); }119 { getFactories()[className].reset(new TemplateGameStateFactory<T>()); } 120 120 121 121 virtual shared_ptr<GameState> fabricateInternal(const GameStateInfo& info) = 0; 122 static std::map<std::string, shared_ptr<GameStateFactory> > factories_s;122 static std::map<std::string, shared_ptr<GameStateFactory> >& getFactories(); 123 123 }; 124 124 template <class T> … … 143 143 void unloadGraphics(); 144 144 145 void parseStates(std::vector<std::pair<std::string, int> >::const_iterator& it, shared_ptr<GameStateTreeNode> currentNode); 145 146 bool checkState(const std::string& name) const; 146 147 void loadState(const std::string& name);
Note: See TracChangeset
for help on using the changeset viewer.