#include <src/orxonox/objects/worldentities/Attacher.h>
Public Member Functions | |
void | addObject (WorldEntity *object) |
Attacher (BaseObject *creator) | |
virtual void | changedActivity () |
This function gets called if the activity of the object changes. | |
virtual void | changedVisibility () |
This function gets called if the visibility of the object changes. | |
WorldEntity * | getObject (unsigned int index) const |
const std::string & | getTarget () const |
void | loadedNewXMLName (BaseObject *object) |
virtual void | processEvent (Event &event) |
void | setTarget (const std::string &target) |
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode) |
XML loading and saving. | |
virtual | ~Attacher () |
Private Attributes | |
std::list< WorldEntity * > | objects_ |
WorldEntity * | target_ |
std::string | targetname_ |
orxonox::Attacher::Attacher | ( | BaseObject * | creator | ) |
References RegisterObject, and target_.
virtual orxonox::Attacher::~Attacher | ( | ) | [inline, virtual] |
void orxonox::Attacher::addObject | ( | WorldEntity * | object | ) |
void orxonox::Attacher::changedActivity | ( | ) | [virtual] |
This function gets called if the activity of the object changes.
Reimplemented from orxonox::BaseObject.
void orxonox::Attacher::changedVisibility | ( | ) | [virtual] |
This function gets called if the visibility of the object changes.
Reimplemented from orxonox::BaseObject.
WorldEntity * orxonox::Attacher::getObject | ( | unsigned int | index | ) | const |
const std::string& orxonox::Attacher::getTarget | ( | ) | const [inline] |
Referenced by XMLPort().
void orxonox::Attacher::loadedNewXMLName | ( | BaseObject * | object | ) | [virtual] |
Implements orxonox::XMLNameListener.
References orxonox::WorldEntity::attachToParent(), orxonox::BaseObject::getName(), target_, and targetname_.
void orxonox::Attacher::processEvent | ( | Event & | event | ) | [virtual] |
void orxonox::Attacher::setTarget | ( | const std::string & | target | ) |
References orxonox::WorldEntity::attachToParent(), target_, and targetname_.
Referenced by XMLPort().
void orxonox::Attacher::XMLPort | ( | Element & | xmlelement, | |
XMLPort::Mode | mode | |||
) | [virtual] |
XML loading and saving.
xmlelement | The XML-element | |
loading | Loading (true) or saving (false) |
Reimplemented from orxonox::WorldEntity.
References addObject(), getObject(), getTarget(), setTarget(), SUPER, XMLPortObject, and XMLPortParam.
std::list<WorldEntity*> orxonox::Attacher::objects_ [private] |
Referenced by addObject(), changedActivity(), changedVisibility(), getObject(), and processEvent().
WorldEntity* orxonox::Attacher::target_ [private] |
Referenced by Attacher(), loadedNewXMLName(), and setTarget().
std::string orxonox::Attacher::targetname_ [private] |
Referenced by loadedNewXMLName(), and setTarget().