Changeset 6517 in orxonox.OLD for trunk/src/lib/lang/base_object.cc
- Timestamp:
- Jan 17, 2006, 11:13:05 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/lang/base_object.cc
r6498 r6517 32 32 * @param root the element to load from 33 33 */ 34 BaseObject::BaseObject( const TiXmlElement* root)34 BaseObject::BaseObject() 35 35 { 36 36 this->className = "BaseObject"; … … 39 39 this->objectName = NULL; 40 40 this->classList = NULL; 41 42 if (root) 43 this->loadParams(root); 41 this->xmlElem = NULL; 44 42 45 43 // ClassList::addToClassList(this, this->classID, "BaseObject"); … … 56 54 if (this->objectName) 57 55 delete[] this->objectName; 56 if (this->xmlElem != NULL) 57 delete this->xmlElem; 58 58 } 59 59 … … 64 64 void BaseObject::loadParams(const TiXmlElement* root) 65 65 { 66 // all loadParams should sometime arrive here. 67 assert (root != NULL); 68 69 if (this->xmlElem != NULL) 70 delete this->xmlElem; 71 this->xmlElem = root->Clone(); 66 72 // name setup 67 73 LoadParam(root, "name", this, BaseObject, setName)
Note: See TracChangeset
for help on using the changeset viewer.