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/Identifier.cc

    r10400 r10403  
    221221
    222222    /**
     223     * Resets all information about the class hierarchy. The identifier is considered uninitialized afterwards.
     224     */
     225    void Identifier::reset()
     226    {
     227        if (this->factory_ != NULL) // TODO: should reset ALL identifiers, but currently the calls to inheritsFrom<>() are not reproducible
     228            this->directParents_.clear();
     229        this->parents_.clear();
     230        this->directChildren_.clear();
     231        this->children_.clear();
     232        this->bInitialized_ = false;
     233    }
     234
     235    /**
    223236     * Verifies if the recorded trace of parent identifiers matches the expected trace according to the class hierarchy. If it doesn't match, the class
    224237     * hierarchy is likely wrong, e.g. due to wrong inheritsFrom<>() definitions in abstract classes.
Note: See TracChangeset for help on using the changeset viewer.