Changeset 5637 for code/branches/libraries/src
- Timestamp:
- Aug 12, 2009, 5:06:34 PM (15 years ago)
- Location:
- code/branches/libraries/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/libraries/src/core/Core.cc
r5628 r5637 299 299 boost::filesystem::path librarypath = searchpath / library; 300 300 301 this->dynLibManager_->load(librarypath.string());301 DynLibManager::getInstance().load(librarypath.string()); 302 302 } 303 303 } -
code/branches/libraries/src/core/Game.cc
r3370 r5637 113 113 */ 114 114 Game::Game(const std::string& cmdLine) 115 // Destroy factories before the Core! 116 : gsFactoryDestroyer_(Game::GameStateFactory::factories_s, &std::map<std::string, shared_ptr<GameStateFactory> >::clear) 115 117 { 116 118 this->bAbort_ = false; -
code/branches/libraries/src/core/Game.h
r3370 r5637 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 -
code/branches/libraries/src/orxonox/gamestates/GSClient.cc
r3370 r5637 40 40 DeclareGameState(GSClient, "client", false, true); 41 41 42 SetCommandLineArgument(ip, "127.0.0.1").information("Sever IP as strin in the form #.#.#.#");42 SetCommandLineArgument(ip, "127.0.0.1").information("Sever IP as string in the form #.#.#.#"); 43 43 44 44 GSClient::GSClient(const GameStateInfo& info)
Note: See TracChangeset
for help on using the changeset viewer.