Changeset 10370
- Timestamp:
- Apr 16, 2015, 9:59:58 PM (10 years ago)
- Location:
- code/branches/core7/src/libraries/core/class
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/class/IdentifierManager.cc
r10366 r10370 54 54 this->hierarchyCreatingCounter_s = 0; 55 55 this->classIDCounter_s = 0; 56 this->recordTraceForIdentifier_ = NULL; 56 57 } 57 58 … … 119 120 { 120 121 this->identifierTraceOfNewObject_.clear(); 122 this->recordTraceForIdentifier_ = it->second; 123 121 124 Identifiable* temp = it->second->fabricate(&temporaryContext); 125 126 this->recordTraceForIdentifier_ = NULL; 127 122 128 if (temp->getIdentifier() != it->second) 123 129 orxout(internal_error) << "Newly created object of type " << it->second->getName() << " has unexpected identifier. Did you forget to use RegisterObject(classname)?" << endl; … … 209 215 { 210 216 if (this->isCreatingHierarchy()) 211 this->identifierTraceOfNewObject_[identifiable].insert(identifiable->getIdentifier()); 217 { 218 if (this->recordTraceForIdentifier_) 219 { 220 if (this->identifierTraceOfNewObject_[identifiable].insert(identifiable->getIdentifier()).second == false) 221 { 222 orxout(internal_warning) << this->recordTraceForIdentifier_->getName() << " inherits two times from " << 223 identifiable->getIdentifier()->getName() << ". Did you forget to use virtual inheritance?" << endl; 224 } 225 } 226 } 212 227 else 213 228 orxout(internal_warning) << "createdObject() called outside of class hierarchy creation" << endl; -
code/branches/core7/src/libraries/core/class/IdentifierManager.h
r10366 r10370 112 112 /// a consequence of this, e.g. nested member objects). 113 113 std::map<Identifiable*, std::set<const Identifier*> > identifierTraceOfNewObject_; 114 Identifier* recordTraceForIdentifier_; //!< The identifier for which we want to record the trace of identifiers during object creation. If null, no trace is recorded. 114 115 }; 115 116 }
Note: See TracChangeset
for help on using the changeset viewer.