Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 26, 2015, 4:16:49 PM (9 years ago)
Author:
landauf
Message:

added function to destroy the class hierarchy (i.e. reset all information about parents and children in Identifiers).
tests now use a fixture to create and destroy class hierarchy. this makes them independent of the order of execution (and also fixes the three *_NoFixture tests)

File:
1 edited

Legend:

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

    r10399 r10403  
    172172
    173173    /**
    174         @brief Destroys all Identifiers. Called when exiting the program.
    175     */
    176     void IdentifierManager::destroyAllIdentifiers()
    177     {
    178         for (std::set<Identifier*>::iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); ++it)
    179             delete (*it);
    180 
    181         this->identifiers_.clear();
    182         this->identifierByString_.clear();
    183         this->identifierByLowercaseString_.clear();
    184         this->identifierByNetworkId_.clear();
     174     * @brief Resets all Identifiers.
     175     */
     176    void IdentifierManager::destroyClassHierarchy()
     177    {
     178        orxout(internal_status) << "Destroy class-hierarchy" << endl;
     179        for (std::set<Identifier*>::const_iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); ++it)
     180            (*it)->reset();
    185181    }
    186182
     
    270266        this->identifierByNetworkId_.clear();
    271267    }
     268
     269    /**
     270        @brief Destroys all Identifiers. Called when exiting the program.
     271    */
     272    void IdentifierManager::destroyAllIdentifiers()
     273    {
     274        for (std::set<Identifier*>::iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); ++it)
     275            delete (*it);
     276
     277        this->identifiers_.clear();
     278        this->identifierByString_.clear();
     279        this->identifierByLowercaseString_.clear();
     280        this->identifierByNetworkId_.clear();
     281    }
    272282}
Note: See TracChangeset for help on using the changeset viewer.