Orxonox: orxonox::EventListener Class Reference

# orxonox::EventListener Class Reference

`#include <src/orxonox/objects/EventListener.h>`

Inheritance diagram for orxonox::EventListener:

List of all members.

## Public Member Functions

| EventListener (BaseObject *creator)
const std::string & | getEventName () const
virtual void | processEvent (Event &event)
void | setEventName (const std::string &eventname)
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode)
| XML loading and saving.
virtual | ~EventListener ()

## Private Member Functions

virtual void | loadedNewXMLName (BaseObject *object)
void | registerAsListener (BaseObject *object)

## Private Attributes

bool | bActive_
| True = the object is active.
std::string | eventName_

## Constructor & Destructor Documentation

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

References bActive_, and RegisterObject.

orxonox::EventListener::~EventListener | ( |  | ) | `[virtual]`

## Member Function Documentation

const std::string& orxonox::EventListener::getEventName | ( |  | ) | const`[inline]`

Referenced by XMLPort().

void orxonox::EventListener::loadedNewXMLName | ( | BaseObject * | object | ) | `[private, virtual]`

Implements orxonox::XMLNameListener.

References eventName_, orxonox::BaseObject::getName(), and registerAsListener().

void orxonox::EventListener::processEvent | ( | Event & | event | ) | `[virtual]`

Reimplemented from orxonox::BaseObject.

References orxonox::Event::activate_, bActive_, COUT, orxonox::BaseObject::fireEvent(), orxonox::BaseObject::getName(), and orxonox::Event::originator_.

void orxonox::EventListener::registerAsListener | ( | BaseObject * | object | ) | `[private]`

Referenced by loadedNewXMLName(), and setEventName().

void orxonox::EventListener::setEventName | ( | const std::string & | eventname | ) |

References eventName_, and registerAsListener().

Referenced by XMLPort().

void orxonox::EventListener::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::BaseObject.

References getEventName(), setEventName(), SUPER, and XMLPortParam.

## Member Data Documentation

bool orxonox::EventListener::bActive_`[private]`

True = the object is active.

Reimplemented from orxonox::BaseObject.

Referenced by EventListener(), and processEvent().

std::string orxonox::EventListener::eventName_`[private]`

Referenced by loadedNewXMLName(), and setEventName().

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

- src/orxonox/objects/EventListener.h
- src/orxonox/objects/EventListener.cc