Orxonox: orxonox::Attacher Class Reference

# orxonox::Attacher Class Reference

`#include <src/orxonox/objects/worldentities/Attacher.h>`

Inheritance diagram for orxonox::Attacher:

List of all members.

## 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_

## Constructor & Destructor Documentation

orxonox::Attacher::Attacher | ( | BaseObject * | creator | ) |

References RegisterObject, and target_.

virtual orxonox::Attacher::~Attacher | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

void orxonox::Attacher::addObject | ( | WorldEntity * | object | ) |

References orxonox::WorldEntity::attach(), and objects_.

Referenced by XMLPort().

void orxonox::Attacher::changedActivity | ( |  | ) | `[virtual]`

This function gets called if the activity of the object changes.

Reimplemented from orxonox::BaseObject.

References objects_, and SUPER.

void orxonox::Attacher::changedVisibility | ( |  | ) | `[virtual]`

This function gets called if the visibility of the object changes.

Reimplemented from orxonox::BaseObject.

References objects_, and SUPER.

WorldEntity * orxonox::Attacher::getObject | ( | unsigned int | index | ) | const

References objects_.

Referenced by XMLPort().

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]`

Reimplemented from orxonox::BaseObject.

References objects_.

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.

Parameters:

  | xmlelement | The XML-element
  | loading | Loading (true) or saving (false)

Returns:
  The XML-element

Reimplemented from orxonox::WorldEntity.

References addObject(), getObject(), getTarget(), setTarget(), SUPER, XMLPortObject, and XMLPortParam.

## Member Data Documentation

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().

The documentation for this class was generated from the following files:

- src/orxonox/objects/worldentities/Attacher.h
- src/orxonox/objects/worldentities/Attacher.cc