Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 22, 2008, 5:25:01 AM (16 years ago)
Author:
landauf
Message:

added several new classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/core/Template.cc

    r1989 r1993  
    3333#include "core/XMLPort.h"
    3434#include "util/Debug.h"
     35#include "tinyxml/ticpp.h"
    3536
    3637namespace orxonox
     
    3839    CreateFactory(Template);
    3940
    40     Template::Template()
     41    Template::Template() : xmlelement_("")
    4142    {
    4243        RegisterObject(Template);
     
    5960        XMLPortParam(Template, "baseclass", setBaseclass, getBaseclass, xmlelement, mode);
    6061
    61         this->setXMLElement(*xmlelement.FirstChildElement(false));
     62        this->setXMLElement(*dynamic_cast<TiXmlElement*>(xmlelement.FirstChildElement(false)->GetTiXmlPointer()));
    6263    }
    6364
     
    7980    }
    8081
    81     const Element& Template::getXMLElement() const
     82    const TiXmlElement& Template::getXMLElement() const
    8283    {
    8384        if (this->bIsLink_)
     
    8990                {
    9091                    this->bIsReturningXMLElement_ = true;
    91                     const Element& element = temp->getXMLElement();
     92                    const TiXmlElement& element = temp->getXMLElement();
    9293                    this->bIsReturningXMLElement_ = false;
    9394                    return element;
     
    127128        COUT(4) << object->getLoaderIndentation() << " aplying Template \"" << this->getName() << "\"..." << std::endl;
    128129
    129         Element temp = this->getXMLElement();
     130        Element temp = ((TiXmlElement*)&this->getXMLElement());
    130131        object->XMLPort(temp, XMLPort::LoadObject);
    131132    }
Note: See TracChangeset for help on using the changeset viewer.