Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 29, 2013, 10:37:15 PM (12 years ago)
Author:
landauf
Message:

delete factory before setting a new one (mostly for unit tests)

Location:
code/branches/core6/src/libraries/core/class
Files:
2 edited

Legend:

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

    r9593 r9602  
    165165    }
    166166
     167    void Identifier::setFactory(Factory* factory)
     168    {
     169        if (this->factory_)
     170            delete this->factory_;
     171
     172        this->factory_ = factory;
     173    }
     174
     175
    167176    /**
    168177        @brief Creates an object of the type the Identifier belongs to.
  • code/branches/core6/src/libraries/core/class/Identifier.h

    r9597 r9602  
    131131
    132132            /// Sets the Factory.
    133             inline void addFactory(Factory* factory) { this->factory_ = factory; }
     133            void setFactory(Factory* factory);
    134134            /// Returns true if the Identifier has a Factory.
    135135            inline bool hasFactory() const { return (this->factory_ != 0); }
Note: See TracChangeset for help on using the changeset viewer.