Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10535


Ignore:
Timestamp:
Jun 6, 2015, 11:52:25 PM (9 years ago)
Author:
landauf
Message:

statically initialized instances are now registered with a type. CoreStaticInitializationHandler initializes all instances in core, NetworkStaticInitializationHandler initializes all instances in network.

Location:
code/branches/core7
Files:
2 added
33 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/core/Core.cc

    r10532 r10535  
    126126        this->dynLibManager_ = new DynLibManager();
    127127
    128         // TODO: initialize StaticInitializationManager
    129         this->staticInitHandler_ = new CoreStaticInitializationHandler();
    130         StaticInitializationManager::getInstance().addHandler(this->staticInitHandler_);
    131 
    132128        // TODO: initialize Root-Context
    133129        // TODO: initialize IdentifierManager here
     
    136132        // TODO: initialize ConsoleCommandManager here
    137133        // TODO: initialize NetworkFunctionManager here
     134        // TODO: initialize StaticInitializationManager
     135        this->staticInitHandler_ = new CoreStaticInitializationHandler();
     136        StaticInitializationManager::getInstance().addHandler(this->staticInitHandler_);
     137
    138138        this->rootModule_ = ModuleInstance::getCurrentModuleInstance();
    139         this->rootModule_->loadAllStaticallyInitializedInstances(0);
     139        StaticInitializationManager::getInstance().loadModule(this->rootModule_);
    140140
    141141        // Parse command line arguments AFTER the modules have been loaded (static code!)
     
    198198        // creates the class hierarchy for all classes with factories
    199199        orxout(internal_info) << "creating class hierarchy" << endl;
    200         IdentifierManager::getInstance().createClassHierarchy();
     200        this->staticInitHandler_->initInstances(this->rootModule_);
     201        this->staticInitHandler_->setInitInstances(true);
    201202
    202203        // Loader
     
    253254        if (this->rootModule_)
    254255        {
    255             this->rootModule_->unloadAllStaticallyInitializedInstances(0);
     256            StaticInitializationManager::getInstance().unloadModule(this->rootModule_);
    256257            this->rootModule_->deleteAllStaticallyInitializedInstances();
    257258        }
  • code/branches/core7/src/libraries/core/CoreIncludes.h

    r10530 r10535  
    226226        public:
    227227            StaticallyInitializedIdentifier(Identifier* identifier)
    228                 : StaticallyInitializedInstance(0)
     228                : StaticallyInitializedInstance(StaticInitialization::IDENTIFIER)
    229229                , identifier_(identifier)
    230230            {}
  • code/branches/core7/src/libraries/core/CorePrereqs.h

    r10532 r10535  
    8484        static const Value ROOT = 1;
    8585        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;
    8697    }
    8798
  • code/branches/core7/src/libraries/core/CoreStaticInitializationHandler.cc

    r10532 r10535  
    4747    void CoreStaticInitializationHandler::loadModule(ModuleInstance* module)
    4848    {
    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    {
    5066        IdentifierManager::getInstance().createClassHierarchy();
    5167        ScopeManager::getInstance().updateListeners();
     
    5470    void CoreStaticInitializationHandler::unloadModule(ModuleInstance* module)
    5571    {
    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);
    5778    }
    5879}
  • code/branches/core7/src/libraries/core/CoreStaticInitializationHandler.h

    r10532 r10535  
    3838    class _CoreExport CoreStaticInitializationHandler : public StaticInitializationHandler
    3939    {
     40        friend class Core;
     41
    4042        public:
     43            CoreStaticInitializationHandler() : bInitInstances_(false) {}
     44
    4145            virtual void setupHandler();
    4246            virtual void shutdownHandler();
     
    4448            virtual void loadModule(ModuleInstance* module);
    4549            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_;
    4659    };
    4760}
  • code/branches/core7/src/libraries/core/command/ConsoleCommandIncludes.h

    r10530 r10535  
    311311        public:
    312312            StaticallyInitializedConsoleCommand(ConsoleCommand* command)
    313                 : StaticallyInitializedInstance(0)
     313                : StaticallyInitializedInstance(StaticInitialization::CONSOLE_COMMAND)
    314314                , command_(command)
    315315            {}
  • code/branches/core7/src/libraries/core/commandline/CommandLineIncludes.h

    r10530 r10535  
    5959        public:
    6060            StaticallyInitializedCommandLineArgument(CommandLineArgument* argument)
    61                 : StaticallyInitializedInstance(0)
     61                : StaticallyInitializedInstance(StaticInitialization::COMMAND_LINE_ARGUMENT)
    6262                , argument_(argument)
    6363            {}
  • code/branches/core7/src/libraries/core/module/ModuleInstance.cc

    r10530 r10535  
    5656    }
    5757
    58     void ModuleInstance::loadAllStaticallyInitializedInstances(StaticallyInitializedInstance::Type type)
     58    void ModuleInstance::loadAllStaticallyInitializedInstances(StaticInitialization::Type type)
    5959    {
    6060        const std::set<StaticallyInitializedInstance*>& instances = this->staticallyInitializedInstancesByType_[type];
     
    6363    }
    6464
    65     void ModuleInstance::unloadAllStaticallyInitializedInstances(StaticallyInitializedInstance::Type type)
     65    void ModuleInstance::unloadAllStaticallyInitializedInstances(StaticInitialization::Type type)
    6666    {
    6767        const std::set<StaticallyInitializedInstance*>& instances = this->staticallyInitializedInstancesByType_[type];
     
    7272    void ModuleInstance::deleteAllStaticallyInitializedInstances()
    7373    {
    74         std::map<StaticallyInitializedInstance::Type, std::set<StaticallyInitializedInstance*> > copy(this->staticallyInitializedInstancesByType_);
     74        std::map<StaticInitialization::Type, std::set<StaticallyInitializedInstance*> > copy(this->staticallyInitializedInstancesByType_);
    7575        this->staticallyInitializedInstancesByType_.clear();
    76         for (std::map<StaticallyInitializedInstance::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)
    7777            for (std::set<StaticallyInitializedInstance*>::iterator it2 = it1->second.begin(); it2 != it1->second.end(); ++it2)
    7878                delete (*it2);
  • code/branches/core7/src/libraries/core/module/ModuleInstance.h

    r10530 r10535  
    4949            void removeStaticallyInitializedInstance(StaticallyInitializedInstance* instance);
    5050
    51             void loadAllStaticallyInitializedInstances(StaticallyInitializedInstance::Type type);
    52             void unloadAllStaticallyInitializedInstances(StaticallyInitializedInstance::Type type);
     51            void loadAllStaticallyInitializedInstances(StaticInitialization::Type type);
     52            void unloadAllStaticallyInitializedInstances(StaticInitialization::Type type);
    5353
    5454            void deleteAllStaticallyInitializedInstances();
     
    6666
    6767        private:
    68             std::map<StaticallyInitializedInstance::Type, std::set<StaticallyInitializedInstance*> > staticallyInitializedInstancesByType_;
     68            std::map<StaticInitialization::Type, std::set<StaticallyInitializedInstance*> > staticallyInitializedInstancesByType_;
    6969            std::string name_;
    7070            DynLib* dynLib_;
  • code/branches/core7/src/libraries/core/module/StaticInitializationHandlerIncludes.h

    r10531 r10535  
    4848        public:
    4949            StaticallyInitializedStaticInitializationHandler(StaticInitializationHandler* handler)
    50                 : StaticallyInitializedInstance(0)
     50                : StaticallyInitializedInstance(StaticInitialization::STATIC_INITIALIZATION_HANDLER)
    5151                , handler_(handler)
    5252            {}
  • code/branches/core7/src/libraries/core/module/StaticInitializationManager.h

    r10532 r10535  
    3838    class _CoreExport StaticInitializationManager
    3939    {
    40         friend class Core;
    41 
    4240        public:
    4341            static StaticInitializationManager& getInstance();
  • code/branches/core7/src/libraries/core/module/StaticallyInitializedInstance.cc

    r10530 r10535  
    3333namespace orxonox
    3434{
    35     StaticallyInitializedInstance::StaticallyInitializedInstance(Type type)
     35    StaticallyInitializedInstance::StaticallyInitializedInstance(StaticInitialization::Type type)
    3636    {
    3737        this->type_ = type;
  • code/branches/core7/src/libraries/core/module/StaticallyInitializedInstance.h

    r10530 r10535  
    3737    {
    3838        public:
    39             typedef int Type;
    4039
    41             StaticallyInitializedInstance(Type type);
     40            StaticallyInitializedInstance(StaticInitialization::Type type);
    4241            virtual ~StaticallyInitializedInstance();
    4342
     
    4544            virtual void unload() = 0;
    4645
    47             inline Type getType() const
     46            inline StaticInitialization::Type getType() const
    4847                { return this->type_; }
    4948
    5049        private:
    5150            ModuleInstance* module_;
    52             Type type_;
     51            StaticInitialization::Type type_;
    5352    };
    5453}
  • code/branches/core7/src/libraries/core/singleton/ScopedSingletonIncludes.h

    r10530 r10535  
    8181        public:
    8282            StaticallyInitializedScopedSingletonWrapper(ScopedSingletonWrapper* wrapper, ScopeID::Value scope)
    83                 : StaticallyInitializedInstance(0)
     83                : StaticallyInitializedInstance(StaticInitialization::SCOPED_SINGLETON_WRAPPER)
    8484                , wrapper_(wrapper)
    8585                , scope_(scope)
  • code/branches/core7/src/libraries/network/CMakeLists.txt

    r10478 r10535  
    3636  NetworkFunctionIncludes.cc
    3737  NetworkFunctionManager.cc
     38  NetworkStaticInitializationHandler.cc
    3839  Host.cc
    3940  Server.cc
  • code/branches/core7/src/libraries/network/NetworkFunctionIncludes.cc

    r10478 r10535  
    3030#include "NetworkFunctionManager.h"
    3131
     32#include "core/module/StaticInitializationHandlerIncludes.h"
     33#include "NetworkStaticInitializationHandler.h"
     34
    3235namespace orxonox
    3336{
     37    RegisterStaticInitializationHandler(NetworkStaticInitializationHandler);
     38
    3439    void StaticallyInitializedNetworkFunction::load()
    3540    {
  • code/branches/core7/src/libraries/network/NetworkFunctionIncludes.h

    r10530 r10535  
    5252        public:
    5353            StaticallyInitializedNetworkFunction(NetworkFunctionBase* function)
    54                 : StaticallyInitializedInstance(0)
     54                : StaticallyInitializedInstance(StaticInitialization::NETWORK_FUNCTION)
    5555                , function_(function)
    5656            {}
  • code/branches/core7/src/libraries/network/NetworkPrereqs.h

    r8858 r10535  
    9797    }
    9898  }
     99
     100  namespace StaticInitialization
     101  {
     102    typedef int Type;
     103    static const Type NETWORK_FUNCTION = 6;
     104  }
    99105}
    100106
  • code/branches/core7/test/core/class/IdentifiableTest.cc

    r10534 r10535  
    2222                virtual void SetUp()
    2323                {
    24                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(0);
     24                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    2525                }
    2626
    2727                virtual void TearDown()
    2828                {
    29                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(0);
     29                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    3030                }
    3131        };
  • code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc

    r10533 r10535  
    142142                virtual void SetUp()
    143143                {
    144                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(0);
     144                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    145145                    Identifier::initConfigValues_s = false; // TODO: hack!
    146146                    IdentifierManager::getInstance().createClassHierarchy();
     
    150150                {
    151151                    IdentifierManager::getInstance().destroyClassHierarchy();
    152                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(0);
     152                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    153153                }
    154154        };
  • code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc

    r10533 r10535  
    4949                virtual void SetUp()
    5050                {
    51                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(0);
     51                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    5252                    Identifier::initConfigValues_s = false; // TODO: hack!
    5353                    IdentifierManager::getInstance().createClassHierarchy();
     
    5757                {
    5858                    IdentifierManager::getInstance().destroyClassHierarchy();
    59                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(0);
     59                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    6060                }
    6161        };
  • code/branches/core7/test/core/class/IdentifierNestedClassHierarchyTest.cc

    r10530 r10535  
    109109                virtual void SetUp()
    110110                {
    111                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(0);
     111                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    112112                    Identifier::initConfigValues_s = false; // TODO: hack!
    113113                    IdentifierManager::getInstance().createClassHierarchy();
     
    117117                {
    118118                    IdentifierManager::getInstance().destroyClassHierarchy();
    119                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(0);
     119                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    120120                }
    121121        };
  • code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc

    r10533 r10535  
    5151                virtual void SetUp()
    5252                {
    53                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(0);
     53                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    5454                    Identifier::initConfigValues_s = false; // TODO: hack!
    5555                    IdentifierManager::getInstance().createClassHierarchy();
     
    5959                {
    6060                    IdentifierManager::getInstance().destroyClassHierarchy();
    61                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(0);
     61                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    6262                }
    6363        };
  • code/branches/core7/test/core/class/IdentifierTest.cc

    r10534 r10535  
    2929                virtual void SetUp()
    3030                {
    31                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(0);
     31                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    3232                }
    3333
    3434                virtual void TearDown()
    3535                {
    36                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(0);
     36                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    3737                }
    3838        };
  • code/branches/core7/test/core/class/SubclassIdentifierTest.cc

    r10530 r10535  
    3131                virtual void SetUp()
    3232                {
    33                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(0);
     33                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    3434                    Identifier::initConfigValues_s = false; // TODO: hack!
    3535                    IdentifierManager::getInstance().createClassHierarchy();
     
    4343
    4444                    IdentifierManager::getInstance().destroyClassHierarchy();
    45                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(0);
     45                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    4646                }
    4747        };
  • code/branches/core7/test/core/class/SuperTest.cc

    r10530 r10535  
    7272                virtual void SetUp()
    7373                {
    74                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(0);
     74                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    7575                    Identifier::initConfigValues_s = false; // TODO: hack!
    7676                    IdentifierManager::getInstance().createClassHierarchy();
     
    8484
    8585                    IdentifierManager::getInstance().destroyClassHierarchy();
    86                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(0);
     86                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    8787                }
    8888        };
  • code/branches/core7/test/core/command/CommandTest.cc

    r10530 r10535  
    140140                virtual void SetUp()
    141141                {
    142                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(0);
     142                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::CONSOLE_COMMAND);
    143143                    Identifier::initConfigValues_s = false; // TODO: hack!
    144144                    IdentifierManager::getInstance().createClassHierarchy();
     
    148148                {
    149149                    IdentifierManager::getInstance().destroyClassHierarchy();
    150                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(0);
     150                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::CONSOLE_COMMAND);
    151151                }
    152152        };
  • code/branches/core7/test/core/object/ClassFactoryTest.cc

    r10530 r10535  
    44#include "core/object/Context.h"
    55#include "core/module/ModuleInstance.h"
     6#include "core/CoreIncludes.h"
    67
    78namespace orxonox
     
    1617                {
    1718                    Context::setRootContext(new Context(NULL));
    18                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(0);
     19                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    1920                }
    2021
    2122                virtual void TearDown()
    2223                {
    23                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(0);
     24                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    2425                    Context::setRootContext(NULL);
    2526                }
  • code/branches/core7/test/core/object/ContextTest.cc

    r10530 r10535  
    2424                {
    2525                    Context::setRootContext(new Context(NULL));
    26                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(0);
     26                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    2727                }
    2828
    2929                virtual void TearDown()
    3030                {
    31                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(0);
     31                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    3232                    Context::setRootContext(NULL);
    3333                }
  • code/branches/core7/test/core/object/IteratorTest.cc

    r10530 r10535  
    3535                {
    3636                    Context::setRootContext(new Context(NULL));
    37                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(0);
     37                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    3838                }
    3939
    4040                virtual void TearDown()
    4141                {
    42                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(0);
     42                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    4343                    Context::setRootContext(NULL);
    4444                }
  • code/branches/core7/test/core/object/ListableTest.cc

    r10530 r10535  
    4040                {
    4141                    Context::setRootContext(new Context(NULL));
    42                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(0);
     42                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    4343                }
    4444
    4545                virtual void TearDown()
    4646                {
    47                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(0);
     47                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    4848                    Context::setRootContext(NULL);
    4949                }
  • code/branches/core7/test/core/object/ObjectListIteratorTest.cc

    r10530 r10535  
    2727                {
    2828                    Context::setRootContext(new Context(NULL));
    29                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(0);
     29                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    3030                }
    3131
    3232                virtual void TearDown()
    3333                {
    34                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(0);
     34                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    3535                    Context::setRootContext(NULL);
    3636                }
  • code/branches/core7/test/core/singleton/ScopeTest.cc

    r10530 r10535  
    22#include "core/singleton/ScopedSingletonIncludes.h"
    33#include "core/module/ModuleInstance.h"
     4#include "core/CoreIncludes.h"
    45
    56namespace orxonox
     
    2728                virtual void SetUp()
    2829                {
    29                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(0);
     30                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
     31                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::SCOPED_SINGLETON_WRAPPER);
    3032                }
    3133
    3234                virtual void TearDown()
    3335                {
    34                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(0);
     36                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::SCOPED_SINGLETON_WRAPPER);
     37                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
    3538                }
    3639        };
Note: See TracChangeset for help on using the changeset viewer.