Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10405 for code/branches/core7


Ignore:
Timestamp:
Apr 26, 2015, 8:49:32 PM (10 years ago)
Author:
landauf
Message:

fixed some TODOs in tests and code by using the new unload() function

Location:
code/branches/core7
Files:
8 edited

Legend:

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

    r10403 r10405  
    225225    void Identifier::reset()
    226226    {
    227         if (this->factory_ != NULL) // TODO: should reset ALL identifiers, but currently the calls to inheritsFrom<>() are not reproducible
    228             this->directParents_.clear();
     227        this->directParents_.clear();
    229228        this->parents_.clear();
    230229        this->directChildren_.clear();
  • code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc

    r10403 r10405  
    143143                {
    144144                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
    145                     ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
    146145                    Identifier::initConfigValues_s = false; // TODO: hack!
    147146                    IdentifierManager::getInstance().createClassHierarchy();
     
    151150                {
    152151                    IdentifierManager::getInstance().destroyClassHierarchy();
     152                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances();
    153153                }
    154154        };
  • code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc

    r10403 r10405  
    5050                {
    5151                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
    52                     ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
    5352                    Identifier::initConfigValues_s = false; // TODO: hack!
    5453                    IdentifierManager::getInstance().createClassHierarchy();
     
    5857                {
    5958                    IdentifierManager::getInstance().destroyClassHierarchy();
     59                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances();
    6060                }
    6161        };
  • code/branches/core7/test/core/class/IdentifierNestedClassHierarchyTest.cc

    r10403 r10405  
    110110                {
    111111                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
    112                     ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
    113112                    Identifier::initConfigValues_s = false; // TODO: hack!
    114113                    IdentifierManager::getInstance().createClassHierarchy();
     
    118117                {
    119118                    IdentifierManager::getInstance().destroyClassHierarchy();
     119                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances();
    120120                }
    121121        };
  • code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc

    r10403 r10405  
    5252                {
    5353                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
    54                     ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
    5554                    Identifier::initConfigValues_s = false; // TODO: hack!
    5655                    IdentifierManager::getInstance().createClassHierarchy();
     
    6059                {
    6160                    IdentifierManager::getInstance().destroyClassHierarchy();
     61                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances();
    6262                }
    6363        };
  • code/branches/core7/test/core/class/SubclassIdentifierTest.cc

    r10403 r10405  
    3232                {
    3333                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
    34                     ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
    3534                    Identifier::initConfigValues_s = false; // TODO: hack!
    3635                    IdentifierManager::getInstance().createClassHierarchy();
     
    4443
    4544                    IdentifierManager::getInstance().destroyClassHierarchy();
     45                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances();
    4646                }
    4747        };
  • code/branches/core7/test/core/class/SuperTest.cc

    r10403 r10405  
    7373                {
    7474                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
    75                     ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
    7675                    Identifier::initConfigValues_s = false; // TODO: hack!
    7776                    IdentifierManager::getInstance().createClassHierarchy();
     
    8584
    8685                    IdentifierManager::getInstance().destroyClassHierarchy();
     86                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances();
    8787                }
    8888        };
  • code/branches/core7/test/core/command/CommandTest.cc

    r10403 r10405  
    141141                {
    142142                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
    143                     ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
    144143                    Identifier::initConfigValues_s = false; // TODO: hack!
    145144                    IdentifierManager::getInstance().createClassHierarchy();
     
    149148                {
    150149                    IdentifierManager::getInstance().destroyClassHierarchy();
     150                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances();
    151151                }
    152152        };
Note: See TracChangeset for help on using the changeset viewer.