Changeset 1993 for code/branches/objecthierarchy/src/core/Template.cc
- Timestamp:
- Oct 22, 2008, 5:25:01 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/core/Template.cc
r1989 r1993 33 33 #include "core/XMLPort.h" 34 34 #include "util/Debug.h" 35 #include "tinyxml/ticpp.h" 35 36 36 37 namespace orxonox … … 38 39 CreateFactory(Template); 39 40 40 Template::Template() 41 Template::Template() : xmlelement_("") 41 42 { 42 43 RegisterObject(Template); … … 59 60 XMLPortParam(Template, "baseclass", setBaseclass, getBaseclass, xmlelement, mode); 60 61 61 this->setXMLElement(* xmlelement.FirstChildElement(false));62 this->setXMLElement(*dynamic_cast<TiXmlElement*>(xmlelement.FirstChildElement(false)->GetTiXmlPointer())); 62 63 } 63 64 … … 79 80 } 80 81 81 const Element& Template::getXMLElement() const82 const TiXmlElement& Template::getXMLElement() const 82 83 { 83 84 if (this->bIsLink_) … … 89 90 { 90 91 this->bIsReturningXMLElement_ = true; 91 const Element& element = temp->getXMLElement();92 const TiXmlElement& element = temp->getXMLElement(); 92 93 this->bIsReturningXMLElement_ = false; 93 94 return element; … … 127 128 COUT(4) << object->getLoaderIndentation() << " aplying Template \"" << this->getName() << "\"..." << std::endl; 128 129 129 Element temp = this->getXMLElement();130 Element temp = ((TiXmlElement*)&this->getXMLElement()); 130 131 object->XMLPort(temp, XMLPort::LoadObject); 131 132 }
Note: See TracChangeset
for help on using the changeset viewer.