Orxonox: orxonox::Level Class Reference

# orxonox::Level Class Reference

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

Inheritance diagram for orxonox::Level:

List of all members.

## Public Member Functions

const std::string & | getDescription () const
| Level (BaseObject *creator)
void | loadAmbientSound (const std::string &filename)
void | playerEntered (PlayerInfo *player)
void | playerLeft (PlayerInfo *player)
void | registerVariables ()
void | setDescription (const std::string &description)
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode)
| XML loading and saving.
virtual | ~Level ()

## Private Member Functions

void | addObject (BaseObject *object)
const std::string & | getGametypeString () const
BaseObject * | getObject (unsigned int index) const
void | networkcallback_applyXMLFile ()
void | setGametypeString (const std::string &gametype)

## Private Attributes

SoundBase * | ambientsound_
std::string | description_
std::string | gametype_
std::list< BaseObject * > | objects_
XMLFile * | xmlfile_
std::string | xmlfilename_

## Constructor & Destructor Documentation

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

References orxonox::BaseObject::getFilename(), orxonox::Core::getMediaPathString(), RegisterObject, registerVariables(), and xmlfilename_.

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

References ambientsound_, orxonox::LevelManager::getInstance(), orxonox::LevelManager::getInstancePtr(), orxonox::BaseObject::isInitialized(), orxonox::LevelManager::releaseActivity(), orxonox::Loader::unload(), and xmlfile_.

## Member Function Documentation

void orxonox::Level::addObject | ( | BaseObject * | object | ) | `[private]`

References orxonox::BaseObject::getGametype(), and objects_.

Referenced by XMLPort().

const std::string& orxonox::Level::getDescription | ( |  | ) | const`[inline]`

Referenced by XMLPort().

const std::string& orxonox::Level::getGametypeString | ( |  | ) | const`[inline, private]`

Referenced by XMLPort().

BaseObject * orxonox::Level::getObject | ( | unsigned int | index | ) | const`[private]`

References objects_.

Referenced by XMLPort().

void orxonox::Level::loadAmbientSound | ( | const std::string & | filename | ) |

References ambientsound_, orxonox::SoundBase::loadFile(), and orxonox::SoundBase::play().

Referenced by XMLPort().

void orxonox::Level::networkcallback_applyXMLFile | ( |  | ) | `[private]`

References Class, COUT, orxonox::ClassTreeMask::exclude(), orxonox::Core::getMediaPathString(), orxonox::ClassTreeMask::include(), orxonox::Loader::open(), xmlfile_, and xmlfilename_.

Referenced by registerVariables().

void orxonox::Level::playerEntered | ( | PlayerInfo * | player | ) |

References COUT, orxonox::PlayerInfo::getClientID(), orxonox::BaseObject::getGametype(), orxonox::BaseObject::getName(), and orxonox::BaseObject::setGametype().

Referenced by orxonox::PlayerManager::clientConnected().

void orxonox::Level::playerLeft | ( | PlayerInfo * | player | ) |

References COUT, orxonox::PlayerInfo::getClientID(), orxonox::BaseObject::getName(), and orxonox::BaseObject::setGametype().

Referenced by orxonox::PlayerManager::clientDisconnected().

void orxonox::Level::registerVariables | ( |  | ) |

References orxonox::BaseObject::changedName(), description_, orxonox::BaseObject::name_, networkcallback_applyXMLFile(), orxonox::Synchronisable::registerVariable(), orxonox::VariableDirection::ToClient, and xmlfilename_.

Referenced by Level().

void orxonox::Level::setDescription | ( | const std::string & | description | ) | `[inline]`

Referenced by XMLPort().

void orxonox::Level::setGametypeString | ( | const std::string & | gametype | ) | `[private]`

References Class, ClassByString, COUT, orxonox::Identifier::fabricate(), gametype_, orxonox::OrxonoxClass::getIdentifier(), orxonox::LevelManager::getInstance(), orxonox::LevelManager::getInstancePtr(), orxonox::Identifier::getName(), orxonox::Identifier::isA(), objects_, orxonox::LevelManager::requestActivity(), and orxonox::BaseObject::setGametype().

Referenced by XMLPort().

void orxonox::Level::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 addObject(), getDescription(), getGametypeString(), getObject(), loadAmbientSound(), setDescription(), setGametypeString(), SUPER, XMLPortObjectExtended, XMLPortParam, and XMLPortParamLoadOnly.

## Member Data Documentation

SoundBase* orxonox::Level::ambientsound_`[private]`

Referenced by loadAmbientSound(), and ~Level().

std::string orxonox::Level::description_`[private]`

Referenced by registerVariables().

std::string orxonox::Level::gametype_`[private]`

Reimplemented from orxonox::BaseObject.

Referenced by setGametypeString().

std::list<BaseObject*> orxonox::Level::objects_`[private]`

Referenced by addObject(), getObject(), and setGametypeString().

XMLFile* orxonox::Level::xmlfile_`[private]`

Referenced by networkcallback_applyXMLFile(), and ~Level().

std::string orxonox::Level::xmlfilename_`[private]`

Referenced by Level(), networkcallback_applyXMLFile(), and registerVariables().

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

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