Changeset 10535
- Timestamp:
- Jun 6, 2015, 11:52:25 PM (9 years ago)
- Location:
- code/branches/core7
- Files:
-
- 2 added
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/Core.cc
r10532 r10535 126 126 this->dynLibManager_ = new DynLibManager(); 127 127 128 // TODO: initialize StaticInitializationManager129 this->staticInitHandler_ = new CoreStaticInitializationHandler();130 StaticInitializationManager::getInstance().addHandler(this->staticInitHandler_);131 132 128 // TODO: initialize Root-Context 133 129 // TODO: initialize IdentifierManager here … … 136 132 // TODO: initialize ConsoleCommandManager here 137 133 // TODO: initialize NetworkFunctionManager here 134 // TODO: initialize StaticInitializationManager 135 this->staticInitHandler_ = new CoreStaticInitializationHandler(); 136 StaticInitializationManager::getInstance().addHandler(this->staticInitHandler_); 137 138 138 this->rootModule_ = ModuleInstance::getCurrentModuleInstance(); 139 this->rootModule_->loadAllStaticallyInitializedInstances(0);139 StaticInitializationManager::getInstance().loadModule(this->rootModule_); 140 140 141 141 // Parse command line arguments AFTER the modules have been loaded (static code!) … … 198 198 // creates the class hierarchy for all classes with factories 199 199 orxout(internal_info) << "creating class hierarchy" << endl; 200 IdentifierManager::getInstance().createClassHierarchy(); 200 this->staticInitHandler_->initInstances(this->rootModule_); 201 this->staticInitHandler_->setInitInstances(true); 201 202 202 203 // Loader … … 253 254 if (this->rootModule_) 254 255 { 255 this->rootModule_->unloadAllStaticallyInitializedInstances(0);256 StaticInitializationManager::getInstance().unloadModule(this->rootModule_); 256 257 this->rootModule_->deleteAllStaticallyInitializedInstances(); 257 258 } -
code/branches/core7/src/libraries/core/CoreIncludes.h
r10530 r10535 226 226 public: 227 227 StaticallyInitializedIdentifier(Identifier* identifier) 228 : StaticallyInitializedInstance( 0)228 : StaticallyInitializedInstance(StaticInitialization::IDENTIFIER) 229 229 , identifier_(identifier) 230 230 {} -
code/branches/core7/src/libraries/core/CorePrereqs.h
r10532 r10535 84 84 static const Value ROOT = 1; 85 85 static const Value GRAPHICS = 2; 86 } 87 88 namespace StaticInitialization 89 { 90 typedef int Type; 91 92 static const Type STATIC_INITIALIZATION_HANDLER = 1; 93 static const Type IDENTIFIER = 2; 94 static const Type SCOPED_SINGLETON_WRAPPER = 3; 95 static const Type COMMAND_LINE_ARGUMENT = 4; 96 static const Type CONSOLE_COMMAND = 5; 86 97 } 87 98 -
code/branches/core7/src/libraries/core/CoreStaticInitializationHandler.cc
r10532 r10535 47 47 void CoreStaticInitializationHandler::loadModule(ModuleInstance* module) 48 48 { 49 module->loadAllStaticallyInitializedInstances(0); 49 this->loadInstances(module); 50 if (this->bInitInstances_) 51 this->initInstances(module); 52 } 53 54 void CoreStaticInitializationHandler::loadInstances(ModuleInstance* module) 55 { 56 // the order of initialization is important 57 module->loadAllStaticallyInitializedInstances(StaticInitialization::STATIC_INITIALIZATION_HANDLER); 58 module->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 59 module->loadAllStaticallyInitializedInstances(StaticInitialization::SCOPED_SINGLETON_WRAPPER); 60 module->loadAllStaticallyInitializedInstances(StaticInitialization::COMMAND_LINE_ARGUMENT); 61 module->loadAllStaticallyInitializedInstances(StaticInitialization::CONSOLE_COMMAND); 62 } 63 64 void CoreStaticInitializationHandler::initInstances(ModuleInstance* module) 65 { 50 66 IdentifierManager::getInstance().createClassHierarchy(); 51 67 ScopeManager::getInstance().updateListeners(); … … 54 70 void CoreStaticInitializationHandler::unloadModule(ModuleInstance* module) 55 71 { 56 module->unloadAllStaticallyInitializedInstances(0); 72 // inverted order of initialization 73 module->unloadAllStaticallyInitializedInstances(StaticInitialization::CONSOLE_COMMAND); 74 module->unloadAllStaticallyInitializedInstances(StaticInitialization::COMMAND_LINE_ARGUMENT); 75 module->unloadAllStaticallyInitializedInstances(StaticInitialization::SCOPED_SINGLETON_WRAPPER); 76 module->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 77 module->unloadAllStaticallyInitializedInstances(StaticInitialization::STATIC_INITIALIZATION_HANDLER); 57 78 } 58 79 } -
code/branches/core7/src/libraries/core/CoreStaticInitializationHandler.h
r10532 r10535 38 38 class _CoreExport CoreStaticInitializationHandler : public StaticInitializationHandler 39 39 { 40 friend class Core; 41 40 42 public: 43 CoreStaticInitializationHandler() : bInitInstances_(false) {} 44 41 45 virtual void setupHandler(); 42 46 virtual void shutdownHandler(); … … 44 48 virtual void loadModule(ModuleInstance* module); 45 49 virtual void unloadModule(ModuleInstance* module); 50 51 inline void setInitInstances(bool bInitInstances) 52 { this->bInitInstances_ = bInitInstances; } 53 54 private: 55 void loadInstances(ModuleInstance* module); 56 void initInstances(ModuleInstance* module); 57 58 bool bInitInstances_; 46 59 }; 47 60 } -
code/branches/core7/src/libraries/core/command/ConsoleCommandIncludes.h
r10530 r10535 311 311 public: 312 312 StaticallyInitializedConsoleCommand(ConsoleCommand* command) 313 : StaticallyInitializedInstance( 0)313 : StaticallyInitializedInstance(StaticInitialization::CONSOLE_COMMAND) 314 314 , command_(command) 315 315 {} -
code/branches/core7/src/libraries/core/commandline/CommandLineIncludes.h
r10530 r10535 59 59 public: 60 60 StaticallyInitializedCommandLineArgument(CommandLineArgument* argument) 61 : StaticallyInitializedInstance( 0)61 : StaticallyInitializedInstance(StaticInitialization::COMMAND_LINE_ARGUMENT) 62 62 , argument_(argument) 63 63 {} -
code/branches/core7/src/libraries/core/module/ModuleInstance.cc
r10530 r10535 56 56 } 57 57 58 void ModuleInstance::loadAllStaticallyInitializedInstances(Static allyInitializedInstance::Type type)58 void ModuleInstance::loadAllStaticallyInitializedInstances(StaticInitialization::Type type) 59 59 { 60 60 const std::set<StaticallyInitializedInstance*>& instances = this->staticallyInitializedInstancesByType_[type]; … … 63 63 } 64 64 65 void ModuleInstance::unloadAllStaticallyInitializedInstances(Static allyInitializedInstance::Type type)65 void ModuleInstance::unloadAllStaticallyInitializedInstances(StaticInitialization::Type type) 66 66 { 67 67 const std::set<StaticallyInitializedInstance*>& instances = this->staticallyInitializedInstancesByType_[type]; … … 72 72 void ModuleInstance::deleteAllStaticallyInitializedInstances() 73 73 { 74 std::map<Static allyInitializedInstance::Type, std::set<StaticallyInitializedInstance*> > copy(this->staticallyInitializedInstancesByType_);74 std::map<StaticInitialization::Type, std::set<StaticallyInitializedInstance*> > copy(this->staticallyInitializedInstancesByType_); 75 75 this->staticallyInitializedInstancesByType_.clear(); 76 for (std::map<Static allyInitializedInstance::Type, std::set<StaticallyInitializedInstance*> >::iterator it1 = copy.begin(); it1 != copy.end(); ++it1)76 for (std::map<StaticInitialization::Type, std::set<StaticallyInitializedInstance*> >::iterator it1 = copy.begin(); it1 != copy.end(); ++it1) 77 77 for (std::set<StaticallyInitializedInstance*>::iterator it2 = it1->second.begin(); it2 != it1->second.end(); ++it2) 78 78 delete (*it2); -
code/branches/core7/src/libraries/core/module/ModuleInstance.h
r10530 r10535 49 49 void removeStaticallyInitializedInstance(StaticallyInitializedInstance* instance); 50 50 51 void loadAllStaticallyInitializedInstances(Static allyInitializedInstance::Type type);52 void unloadAllStaticallyInitializedInstances(Static allyInitializedInstance::Type type);51 void loadAllStaticallyInitializedInstances(StaticInitialization::Type type); 52 void unloadAllStaticallyInitializedInstances(StaticInitialization::Type type); 53 53 54 54 void deleteAllStaticallyInitializedInstances(); … … 66 66 67 67 private: 68 std::map<Static allyInitializedInstance::Type, std::set<StaticallyInitializedInstance*> > staticallyInitializedInstancesByType_;68 std::map<StaticInitialization::Type, std::set<StaticallyInitializedInstance*> > staticallyInitializedInstancesByType_; 69 69 std::string name_; 70 70 DynLib* dynLib_; -
code/branches/core7/src/libraries/core/module/StaticInitializationHandlerIncludes.h
r10531 r10535 48 48 public: 49 49 StaticallyInitializedStaticInitializationHandler(StaticInitializationHandler* handler) 50 : StaticallyInitializedInstance( 0)50 : StaticallyInitializedInstance(StaticInitialization::STATIC_INITIALIZATION_HANDLER) 51 51 , handler_(handler) 52 52 {} -
code/branches/core7/src/libraries/core/module/StaticInitializationManager.h
r10532 r10535 38 38 class _CoreExport StaticInitializationManager 39 39 { 40 friend class Core;41 42 40 public: 43 41 static StaticInitializationManager& getInstance(); -
code/branches/core7/src/libraries/core/module/StaticallyInitializedInstance.cc
r10530 r10535 33 33 namespace orxonox 34 34 { 35 StaticallyInitializedInstance::StaticallyInitializedInstance( Type type)35 StaticallyInitializedInstance::StaticallyInitializedInstance(StaticInitialization::Type type) 36 36 { 37 37 this->type_ = type; -
code/branches/core7/src/libraries/core/module/StaticallyInitializedInstance.h
r10530 r10535 37 37 { 38 38 public: 39 typedef int Type;40 39 41 StaticallyInitializedInstance( Type type);40 StaticallyInitializedInstance(StaticInitialization::Type type); 42 41 virtual ~StaticallyInitializedInstance(); 43 42 … … 45 44 virtual void unload() = 0; 46 45 47 inline Type getType() const46 inline StaticInitialization::Type getType() const 48 47 { return this->type_; } 49 48 50 49 private: 51 50 ModuleInstance* module_; 52 Type type_;51 StaticInitialization::Type type_; 53 52 }; 54 53 } -
code/branches/core7/src/libraries/core/singleton/ScopedSingletonIncludes.h
r10530 r10535 81 81 public: 82 82 StaticallyInitializedScopedSingletonWrapper(ScopedSingletonWrapper* wrapper, ScopeID::Value scope) 83 : StaticallyInitializedInstance( 0)83 : StaticallyInitializedInstance(StaticInitialization::SCOPED_SINGLETON_WRAPPER) 84 84 , wrapper_(wrapper) 85 85 , scope_(scope) -
code/branches/core7/src/libraries/network/CMakeLists.txt
r10478 r10535 36 36 NetworkFunctionIncludes.cc 37 37 NetworkFunctionManager.cc 38 NetworkStaticInitializationHandler.cc 38 39 Host.cc 39 40 Server.cc -
code/branches/core7/src/libraries/network/NetworkFunctionIncludes.cc
r10478 r10535 30 30 #include "NetworkFunctionManager.h" 31 31 32 #include "core/module/StaticInitializationHandlerIncludes.h" 33 #include "NetworkStaticInitializationHandler.h" 34 32 35 namespace orxonox 33 36 { 37 RegisterStaticInitializationHandler(NetworkStaticInitializationHandler); 38 34 39 void StaticallyInitializedNetworkFunction::load() 35 40 { -
code/branches/core7/src/libraries/network/NetworkFunctionIncludes.h
r10530 r10535 52 52 public: 53 53 StaticallyInitializedNetworkFunction(NetworkFunctionBase* function) 54 : StaticallyInitializedInstance( 0)54 : StaticallyInitializedInstance(StaticInitialization::NETWORK_FUNCTION) 55 55 , function_(function) 56 56 {} -
code/branches/core7/src/libraries/network/NetworkPrereqs.h
r8858 r10535 97 97 } 98 98 } 99 100 namespace StaticInitialization 101 { 102 typedef int Type; 103 static const Type NETWORK_FUNCTION = 6; 104 } 99 105 } 100 106 -
code/branches/core7/test/core/class/IdentifiableTest.cc
r10534 r10535 22 22 virtual void SetUp() 23 23 { 24 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances( 0);24 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 25 25 } 26 26 27 27 virtual void TearDown() 28 28 { 29 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances( 0);29 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 30 30 } 31 31 }; -
code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc
r10533 r10535 142 142 virtual void SetUp() 143 143 { 144 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances( 0);144 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 145 145 Identifier::initConfigValues_s = false; // TODO: hack! 146 146 IdentifierManager::getInstance().createClassHierarchy(); … … 150 150 { 151 151 IdentifierManager::getInstance().destroyClassHierarchy(); 152 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances( 0);152 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 153 153 } 154 154 }; -
code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc
r10533 r10535 49 49 virtual void SetUp() 50 50 { 51 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances( 0);51 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 52 52 Identifier::initConfigValues_s = false; // TODO: hack! 53 53 IdentifierManager::getInstance().createClassHierarchy(); … … 57 57 { 58 58 IdentifierManager::getInstance().destroyClassHierarchy(); 59 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances( 0);59 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 60 60 } 61 61 }; -
code/branches/core7/test/core/class/IdentifierNestedClassHierarchyTest.cc
r10530 r10535 109 109 virtual void SetUp() 110 110 { 111 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances( 0);111 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 112 112 Identifier::initConfigValues_s = false; // TODO: hack! 113 113 IdentifierManager::getInstance().createClassHierarchy(); … … 117 117 { 118 118 IdentifierManager::getInstance().destroyClassHierarchy(); 119 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances( 0);119 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 120 120 } 121 121 }; -
code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc
r10533 r10535 51 51 virtual void SetUp() 52 52 { 53 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances( 0);53 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 54 54 Identifier::initConfigValues_s = false; // TODO: hack! 55 55 IdentifierManager::getInstance().createClassHierarchy(); … … 59 59 { 60 60 IdentifierManager::getInstance().destroyClassHierarchy(); 61 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances( 0);61 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 62 62 } 63 63 }; -
code/branches/core7/test/core/class/IdentifierTest.cc
r10534 r10535 29 29 virtual void SetUp() 30 30 { 31 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances( 0);31 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 32 32 } 33 33 34 34 virtual void TearDown() 35 35 { 36 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances( 0);36 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 37 37 } 38 38 }; -
code/branches/core7/test/core/class/SubclassIdentifierTest.cc
r10530 r10535 31 31 virtual void SetUp() 32 32 { 33 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances( 0);33 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 34 34 Identifier::initConfigValues_s = false; // TODO: hack! 35 35 IdentifierManager::getInstance().createClassHierarchy(); … … 43 43 44 44 IdentifierManager::getInstance().destroyClassHierarchy(); 45 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances( 0);45 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 46 46 } 47 47 }; -
code/branches/core7/test/core/class/SuperTest.cc
r10530 r10535 72 72 virtual void SetUp() 73 73 { 74 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances( 0);74 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 75 75 Identifier::initConfigValues_s = false; // TODO: hack! 76 76 IdentifierManager::getInstance().createClassHierarchy(); … … 84 84 85 85 IdentifierManager::getInstance().destroyClassHierarchy(); 86 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances( 0);86 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 87 87 } 88 88 }; -
code/branches/core7/test/core/command/CommandTest.cc
r10530 r10535 140 140 virtual void SetUp() 141 141 { 142 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances( 0);142 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::CONSOLE_COMMAND); 143 143 Identifier::initConfigValues_s = false; // TODO: hack! 144 144 IdentifierManager::getInstance().createClassHierarchy(); … … 148 148 { 149 149 IdentifierManager::getInstance().destroyClassHierarchy(); 150 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances( 0);150 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::CONSOLE_COMMAND); 151 151 } 152 152 }; -
code/branches/core7/test/core/object/ClassFactoryTest.cc
r10530 r10535 4 4 #include "core/object/Context.h" 5 5 #include "core/module/ModuleInstance.h" 6 #include "core/CoreIncludes.h" 6 7 7 8 namespace orxonox … … 16 17 { 17 18 Context::setRootContext(new Context(NULL)); 18 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances( 0);19 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 19 20 } 20 21 21 22 virtual void TearDown() 22 23 { 23 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances( 0);24 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 24 25 Context::setRootContext(NULL); 25 26 } -
code/branches/core7/test/core/object/ContextTest.cc
r10530 r10535 24 24 { 25 25 Context::setRootContext(new Context(NULL)); 26 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances( 0);26 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 27 27 } 28 28 29 29 virtual void TearDown() 30 30 { 31 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances( 0);31 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 32 32 Context::setRootContext(NULL); 33 33 } -
code/branches/core7/test/core/object/IteratorTest.cc
r10530 r10535 35 35 { 36 36 Context::setRootContext(new Context(NULL)); 37 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances( 0);37 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 38 38 } 39 39 40 40 virtual void TearDown() 41 41 { 42 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances( 0);42 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 43 43 Context::setRootContext(NULL); 44 44 } -
code/branches/core7/test/core/object/ListableTest.cc
r10530 r10535 40 40 { 41 41 Context::setRootContext(new Context(NULL)); 42 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances( 0);42 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 43 43 } 44 44 45 45 virtual void TearDown() 46 46 { 47 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances( 0);47 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 48 48 Context::setRootContext(NULL); 49 49 } -
code/branches/core7/test/core/object/ObjectListIteratorTest.cc
r10530 r10535 27 27 { 28 28 Context::setRootContext(new Context(NULL)); 29 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances( 0);29 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 30 30 } 31 31 32 32 virtual void TearDown() 33 33 { 34 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances( 0);34 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 35 35 Context::setRootContext(NULL); 36 36 } -
code/branches/core7/test/core/singleton/ScopeTest.cc
r10530 r10535 2 2 #include "core/singleton/ScopedSingletonIncludes.h" 3 3 #include "core/module/ModuleInstance.h" 4 #include "core/CoreIncludes.h" 4 5 5 6 namespace orxonox … … 27 28 virtual void SetUp() 28 29 { 29 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(0); 30 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 31 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::SCOPED_SINGLETON_WRAPPER); 30 32 } 31 33 32 34 virtual void TearDown() 33 35 { 34 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(0); 36 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::SCOPED_SINGLETON_WRAPPER); 37 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 35 38 } 36 39 };
Note: See TracChangeset
for help on using the changeset viewer.