- Timestamp:
- Apr 15, 2015, 10:11:15 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/class/Identifier.cc
r10363 r10366 144 144 /** 145 145 * @brief Initializes the parents of this Identifier while creating the class hierarchy. 146 * @param instance The instance that was used to determine the class hierarchy of this identifier. 147 * @param identifiers All identifiers that were used to create the instance of this class (including this identifier itself) 146 * @param initializationTrace All identifiers that were recorded while creating an instance of this class (including nested classes and this identifier itself) 148 147 */ 149 void Identifier::initializeParents( Identifiable* instance, const std::set<const Identifier*>& identifiers)148 void Identifier::initializeParents(const std::set<const Identifier*>& initializationTrace) 150 149 { 151 150 if (!IdentifierManager::getInstance().isCreatingHierarchy()) … … 155 154 } 156 155 157 // Add all identifiers which are real parents (dynamic_cast is possible) and that are not equal to THIS identifier. 158 // Checking for dynamic_cast is necessary because some classes may have other classes as nested members. This means that the Identifiers of the nested 159 // classes are also added to the set of potential parents. The only way to distinguish them is to use RTTI (i.e. dynamic_cast). 160 for (std::set<const Identifier*>::const_iterator it = identifiers.begin(); it != identifiers.end(); ++it) 161 if (*it != this && (*it)->canDynamicCastObjectToIdentifierClass(instance)) 156 for (std::set<const Identifier*>::const_iterator it = initializationTrace.begin(); it != initializationTrace.end(); ++it) 157 if (*it != this) 162 158 this->parents_.insert(*it); 163 159 }
Note: See TracChangeset
for help on using the changeset viewer.