#include <src/core/Template.h>
Public Member Functions | |
void | applyOn (BaseObject *object) |
virtual void | changedName () |
This function gets called if the name of the object changes. | |
const std::string & | getBaseclass () const |
Identifier * | getBaseclassIdentifier () const |
const std::string & | getLink () const |
bool | getLoadDefaults () const |
const TiXmlElement & | getXMLElement () const |
void | setBaseclass (const std::string &baseclass) |
void | setLink (const std::string &link) |
void | setLoadDefaults (bool bLoadDefaults) |
void | setXMLElement (const TiXmlElement &xmlelement) |
Template (BaseObject *creator) | |
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode) |
XML loading and saving. | |
virtual | ~Template () |
Static Public Member Functions | |
static void | apply (const std::string &name, BaseObject *object) |
static Template * | getTemplate (const std::string &name) |
static std::map< std::string, Template * > & | getTemplateMap () |
Private Attributes | |
std::string | baseclass_ |
Identifier * | baseclassIdentifier_ |
bool | bIsLink_ |
bool | bIsReturningXMLElement_ |
bool | bLoadDefaults_ |
std::string | link_ |
TiXmlElement * | xmlelement_ |
orxonox::Template::Template | ( | BaseObject * | creator | ) |
References baseclassIdentifier_, bIsLink_, bIsReturningXMLElement_, bLoadDefaults_, RegisterObject, and xmlelement_.
orxonox::Template::~Template | ( | ) | [virtual] |
References orxonox::BaseObject::getName(), getTemplateMap(), and xmlelement_.
void orxonox::Template::apply | ( | const std::string & | name, | |
BaseObject * | object | |||
) | [static] |
References getTemplateMap().
void orxonox::Template::applyOn | ( | BaseObject * | object | ) |
void orxonox::Template::changedName | ( | ) | [virtual] |
This function gets called if the name of the object changes.
Reimplemented from orxonox::BaseObject.
References COUT, orxonox::BaseObject::getName(), orxonox::BaseObject::getOldName(), getTemplateMap(), and SUPER.
const std::string& orxonox::Template::getBaseclass | ( | ) | const [inline] |
Referenced by XMLPort().
Identifier* orxonox::Template::getBaseclassIdentifier | ( | ) | const [inline] |
const std::string& orxonox::Template::getLink | ( | ) | const [inline] |
Referenced by XMLPort().
bool orxonox::Template::getLoadDefaults | ( | ) | const [inline] |
Referenced by XMLPort().
Template * orxonox::Template::getTemplate | ( | const std::string & | name | ) | [static] |
std::map< std::string, Template * > & orxonox::Template::getTemplateMap | ( | ) | [static] |
Referenced by apply(), changedName(), getTemplate(), and ~Template().
const TiXmlElement & orxonox::Template::getXMLElement | ( | ) | const |
References bIsLink_, bIsReturningXMLElement_, COUT, orxonox::BaseObject::getName(), getTemplate(), getXMLElement(), link_, and xmlelement_.
Referenced by applyOn(), and getXMLElement().
void orxonox::Template::setBaseclass | ( | const std::string & | baseclass | ) |
void orxonox::Template::setLink | ( | const std::string & | link | ) | [inline] |
Referenced by XMLPort().
void orxonox::Template::setLoadDefaults | ( | bool | bLoadDefaults | ) | [inline] |
Referenced by XMLPort().
void orxonox::Template::setXMLElement | ( | const TiXmlElement & | xmlelement | ) |
void orxonox::Template::XMLPort | ( | Element & | xmlelement, | |
XMLPort::Mode | mode | |||
) | [virtual] |
XML loading and saving.
xmlelement | The XML-element | |
loading | Loading (true) or saving (false) |
Reimplemented from orxonox::BaseObject.
References getBaseclass(), getLink(), getLoadDefaults(), setBaseclass(), setLink(), setLoadDefaults(), setXMLElement(), SUPER, and XMLPortParam.
std::string orxonox::Template::baseclass_ [private] |
Referenced by setBaseclass().
Referenced by applyOn(), setBaseclass(), and Template().
bool orxonox::Template::bIsLink_ [private] |
Referenced by getXMLElement(), and Template().
bool orxonox::Template::bIsReturningXMLElement_ [mutable, private] |
Referenced by getXMLElement(), and Template().
bool orxonox::Template::bLoadDefaults_ [private] |
Referenced by applyOn(), and Template().
std::string orxonox::Template::link_ [private] |
Referenced by getXMLElement().
TiXmlElement* orxonox::Template::xmlelement_ [private] |
Referenced by getXMLElement(), setXMLElement(), Template(), and ~Template().