Changeset 10403 for code/branches/core7/src
- Timestamp:
- Apr 26, 2015, 4:16:49 PM (10 years ago)
- Location:
- code/branches/core7/src/libraries/core/class
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/class/Identifier.cc
r10400 r10403 221 221 222 222 /** 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 /** 223 236 * Verifies if the recorded trace of parent identifiers matches the expected trace according to the class hierarchy. If it doesn't match, the class 224 237 * hierarchy is likely wrong, e.g. due to wrong inheritsFrom<>() definitions in abstract classes. -
code/branches/core7/src/libraries/core/class/Identifier.h
r10400 r10403 151 151 void initializeParents(const std::list<const Identifier*>& initializationTrace); 152 152 void finishInitialization(); 153 void reset(); 153 154 154 155 bool isA(const Identifier* identifier) const; -
code/branches/core7/src/libraries/core/class/IdentifierManager.cc
r10399 r10403 172 172 173 173 /** 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(); 185 181 } 186 182 … … 270 266 this->identifierByNetworkId_.clear(); 271 267 } 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 } 272 282 } -
code/branches/core7/src/libraries/core/class/IdentifierManager.h
r10399 r10403 60 60 void createClassHierarchy(); 61 61 void verifyClassHierarchy(); 62 void destroy AllIdentifiers();62 void destroyClassHierarchy(); 63 63 64 64 void createdObject(Identifiable* identifiable); … … 88 88 inline const std::map<uint32_t, Identifier*>& getIdentifierByNetworkIdMap() 89 89 { return this->identifierByNetworkId_; } 90 91 void destroyAllIdentifiers(); 90 92 91 93 private:
Note: See TracChangeset
for help on using the changeset viewer.