Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 13, 2009, 4:30:37 PM (15 years ago)
Author:
rgrieder
Message:

Tried to reduce dependencies in the core. There wasn't much to achieve though…

File:
1 edited

Legend:

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

    r3068 r3154  
    2929#include "Template.h"
    3030
     31#include <tinyxml/tinyxml.h>
    3132#include <tinyxml/ticpp.h>
    3233
     34#include "util/Debug.h"
    3335#include "core/CoreIncludes.h"
    3436#include "core/XMLPort.h"
    35 #include "util/Debug.h"
    3637
    3738namespace orxonox
     
    3940    CreateFactory(Template);
    4041
    41     Template::Template(BaseObject* creator) : BaseObject(creator), xmlelement_("")
     42    Template::Template(BaseObject* creator) : BaseObject(creator)
    4243    {
    4344        RegisterObject(Template);
    4445
     46        this->xmlelement_ = new TiXmlElement("");
    4547        this->bIsLink_ = false;
    4648        this->bLoadDefaults_ = true;
     
    5254    {
    5355        Template::getTemplateMap().erase(this->getName());
     56        delete this->xmlelement_;
    5457    }
    5558
     
    9093    }
    9194
     95    void Template::setXMLElement(const TiXmlElement& xmlelement)
     96    {
     97        *this->xmlelement_ = xmlelement;
     98    }
     99
    92100    const TiXmlElement& Template::getXMLElement() const
    93101    {
     
    115123        }
    116124
    117         return this->xmlelement_;
     125        return *this->xmlelement_;
    118126    }
    119127
Note: See TracChangeset for help on using the changeset viewer.