Changeset 5693 for code/trunk/src/core/Game.h
- Timestamp:
- Aug 29, 2009, 10:19:38 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/libraries (added) merged: 5612-5613,5615-5619,5621-5623,5625-5640,5642-5643,5647-5649,5665-5666,5685-5687,5692
- Property svn:mergeinfo changed
-
code/trunk/src/core/Game.h
r3370 r5693 48 48 49 49 #include "util/Debug.h" 50 #include "util/ScopeGuard.h" 50 51 #include "util/Singleton.h" 51 52 … … 85 86 typedef std::map<std::string, shared_ptr<GameState> > GameStateMap; 86 87 typedef boost::shared_ptr<GameStateTreeNode> GameStateTreeNodePtr; 88 87 89 public: 88 90 Game(const std::string& cmdLine); … … 118 120 static void createFactory(const std::string& className) 119 121 { factories_s[className].reset(new TemplateGameStateFactory<T>()); } 120 private: 122 121 123 virtual shared_ptr<GameState> fabricateInternal(const GameStateInfo& info) = 0; 122 124 static std::map<std::string, shared_ptr<GameStateFactory> > factories_s; … … 129 131 { return shared_ptr<GameState>(new T(info)); } 130 132 }; 133 // For the factory destruction 134 typedef Loki::ObjScopeGuardImpl0<std::map<std::string, shared_ptr<GameStateFactory> >, void (std::map<std::string, shared_ptr<GameStateFactory> >::*)()> ObjScopeGuard; 131 135 132 136 struct StatisticsTickInfo … … 156 160 scoped_ptr<Clock> gameClock_; 157 161 scoped_ptr<Core> core_; 162 ObjScopeGuard gsFactoryDestroyer_; 158 163 scoped_ptr<GameConfiguration> configuration_; 159 164
Note: See TracChangeset
for help on using the changeset viewer.