Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 6, 2015, 11:52:25 PM (10 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/test/core
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • 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.