Orxonox: orxonox::BaseObject Class Reference

# orxonox::BaseObject Class Reference

The BaseObject is the parent of all classes representing an instance in the game. More...

`#include <src/core/BaseObject.h>`

Inheritance diagram for orxonox::BaseObject:

List of all members.

## Public Member Functions

void | addEvent (BaseObject *event, const std::string &sectionname)
void | addEventContainer (const std::string &sectionname, EventContainer *container)
void | addTemplate (Template *temp)
| Adds a Template to the object.
void | addTemplate (const std::string &name)
| Adds a Template to the object.
| BaseObject (BaseObject *creator)
| Constructor: Registers the object in the BaseObject-list.
virtual void | changedActivity ()
| This function gets called if the activity of the object changes.
virtual void | changedGametype ()
virtual void | changedMainState ()
virtual void | changedName ()
| This function gets called if the name of the object changes.
virtual void | changedVisibility ()
| This function gets called if the visibility of the object changes.
void | fireEvent (Event &event)
void | fireEvent (bool activate, BaseObject *originator)
void | fireEvent (bool activate)
void | fireEvent ()
BaseObject * | getCreator () const
BaseObject * | getEvent (unsigned int index) const
EventContainer * | getEventContainer (const std::string &sectionname) const
const XMLFile * | getFile () const
| Returns a pointer to the XMLFile that loaded this object.
const std::string & | getFilename () const
| Returns the levelfile that loaded this object.
Gametype * | getGametype () const
const std::string & | getLoaderIndentation () const
| Returns the indentation of the debug output in the Loader.
bool | getMainState () const
const std::string & | getMainStateName () const
const std::string & | getName () const
| Returns the name of the object.
Namespace * | getNamespace () const
Gametype * | getOldGametype () const
const std::string & | getOldName () const
| Returns the old name of the object.
Scene * | getScene () const
const std::set< Template * > & | getTemplates () const
| Returns the set of all aplied templates.
const mbool & | isActive () const
| Returns the state of the objects activity.
bool | isInitialized () const
| Returns if the object was initialized (passed the object registration).
const mbool & | isVisible () const
| Returns the state of the objects visibility.
virtual void | processEvent (Event &event)
void | registerEventListener (BaseObject *object, const std::string &sectionname)
void | removeEvent (BaseObject *event)
void | setActive (bool bActive)
| Sets the state of the objects activity.
void | setCreator (BaseObject *creator)
void | setFile (const XMLFile *file)
| Sets a pointer to the xml file that loaded this object.
void | setGametype (Gametype *gametype)
void | setLoaderIndentation (const std::string &indentation)
| Sets the indentation of the debug output in the Loader.
void | setMainState (bool state)
void | setMainStateName (const std::string &name)
void | setName (const std::string &name)
| Sets the name of the object.
virtual void | setNamespace (Namespace *ns)
void | setScene (Scene *scene)
void | setVisible (bool bVisible)
| Sets the state of the objects visibility.
void | unregisterEventListener (BaseObject *object)
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode)
| XML loading and saving.
virtual | ~BaseObject ()
| Destructor.

## Protected Attributes

mbool | bActive_
| True = the object is active.
mbool | bVisible_
| True = the object is visible.
Functor * | functorGetMainState_
Functor * | functorSetMainState_
std::string | mainStateName_
std::string | name_
| The name of the object.
std::string | oldName_
| The old name of the object.

## Private Member Functions

Template * | getTemplate (unsigned int index) const
| Returns the Template with the given index.
void | setXMLName (const std::string &name)
| Loads the name of the object through XML and calls all XMLNameListener.

## Private Attributes

bool | bInitialized_
| True if the object was initialized (passed the object registration).
BaseObject * | creator_
std::map< std::string, EventContainer * > | eventContainers_
std::map< BaseObject *, std::string > | eventListeners_
std::list< BaseObject * > | events_
const XMLFile * | file_
| The XMLFile that loaded this object.
Gametype * | gametype_
Element * | lastLoadedXMLElement_
| Non 0 if the TinyXML attributes have already been copied to our own lowercase map.
std::string | loaderIndentation_
| Indentation of the debug output in the Loader.
Namespace * | namespace_
Gametype * | oldGametype_
Scene * | scene_
std::set< Template * > | templates_
std::map< std::string, std::string > | xmlAttributes_
| Lowercase XML attributes.

## Friends

class | XMLPortClassParamContainer

## Detailed Description

The BaseObject is the parent of all classes representing an instance in the game.

## Constructor & Destructor Documentation

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

Constructor: Registers the object in the BaseObject-list.

References bActive_, bInitialized_, bVisible_, creator_, file_, functorGetMainState_, functorSetMainState_, gametype_, getFile(), getGametype(), getNamespace(), getScene(), lastLoadedXMLElement_, namespace_, oldGametype_, RegisterRootObject, scene_, setCreator(), setFile(), setGametype(), setNamespace(), and setScene().

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

Destructor.

References eventListeners_, events_, functorGetMainState_, functorSetMainState_, isInitialized(), and unregisterEventListener().

## Member Function Documentation

void orxonox::BaseObject::addEvent | ( | BaseObject * | event,
|  | const std::string & | sectionname |
| ) |  |  |

References events_.

Referenced by XMLPort().

void orxonox::BaseObject::addEventContainer | ( | const std::string & | sectionname,
|  | EventContainer * | container |
| ) |  |  |

References COUT, eventContainers_, orxonox::OrxonoxClass::getIdentifier(), and orxonox::Identifier::getName().

void orxonox::BaseObject::addTemplate | ( | Template * | temp | ) |

Adds a Template to the object.

Parameters:

  | temp | The Template

References orxonox::Template::applyOn(), and templates_.

void orxonox::BaseObject::addTemplate | ( | const std::string & | name | ) |

Adds a Template to the object.

Parameters:

  | name | The name of the Template

References COUT, orxonox::OrxonoxClass::getIdentifier(), getName(), orxonox::Identifier::getName(), and orxonox::Template::getTemplate().

Referenced by orxonox::Gametype::Gametype(), orxonox::SpaceShip::loadEngineTemplate(), orxonox::SpawnPoint::spawn(), orxonox::Pong::start(), orxonox::ControllableEntity::startLocalHumanControl(), orxonox::PickupSpawner::trigger(), orxonox::HumanPlayer::updateGametypeHUD(), orxonox::HumanPlayer::updateHumanHUD(), orxonox::PickupSpawner::XMLPort(), and XMLPort().

virtual void orxonox::BaseObject::changedActivity | ( |  | ) | `[inline, virtual]`

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

Reimplemented in orxonox::Engine, orxonox::PickupSpawner, orxonox::Attacher, orxonox::FadingBillboard, orxonox::ParticleEmitter, and orxonox::CheckPoint.

Referenced by orxonox::WorldEntity::registerVariables().

virtual void orxonox::BaseObject::changedGametype | ( |  | ) | `[inline, virtual]`

Reimplemented in orxonox::HumanPlayer, orxonox::PlayerInfo, and orxonox::PongCenterpoint.

void orxonox::BaseObject::changedMainState | ( |  | ) | `[virtual]`

References isActive(), isVisible(), setActive(), SetMainState, and setVisible().

Referenced by orxonox::WorldEntity::registerVariables(), and setMainStateName().

virtual void orxonox::BaseObject::changedName | ( |  | ) | `[inline, virtual]`

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

Reimplemented in orxonox::Template, orxonox::EventTarget, orxonox::PlayerInfo, orxonox::HUDHealthBar, and orxonox::OrxonoxOverlay.

Referenced by orxonox::Level::registerVariables().

virtual void orxonox::BaseObject::changedVisibility | ( |  | ) | `[inline, virtual]`

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

Reimplemented in orxonox::GlobalShader, orxonox::BillboardProjectile, orxonox::ParticleProjectile, orxonox::Attacher, orxonox::Backlight, orxonox::Billboard, orxonox::FadingBillboard, orxonox::Light, orxonox::Model, orxonox::ParticleEmitter, orxonox::Planet, orxonox::Trigger, orxonox::GUIOverlay, orxonox::HUDHealthBar, orxonox::OrxonoxOverlay, orxonox::OverlayGroup, and orxonox::Scoreboard.

Referenced by orxonox::WorldEntity::registerVariables().

void orxonox::BaseObject::fireEvent | ( | Event & | event | ) |

References eventListeners_.

void orxonox::BaseObject::fireEvent | ( | bool | activate,
|  | BaseObject * | originator |
| ) |  |  |

References eventListeners_.

void orxonox::BaseObject::fireEvent | ( | bool | activate | ) |

References fireEvent().

void orxonox::BaseObject::fireEvent | ( |  | ) |

Referenced by orxonox::TeamBaseMatchBase::changeTeamColour(), orxonox::QuestListener::execute(), fireEvent(), orxonox::Pong::playerScored(), orxonox::EventListener::processEvent(), orxonox::SpawnPoint::spawn(), orxonox::PickupSpawner::trigger(), and orxonox::Trigger::triggered().

BaseObject* orxonox::BaseObject::getCreator | ( |  | ) | const`[inline]`

Referenced by orxonox::Projectile::collidesAgainst(), orxonox::Pawn::deatheffect(), orxonox::Gametype::end(), orxonox::Pawn::goWithStyle(), orxonox::BigExplosion::init(), orxonox::Gametype::pawnKilled(), orxonox::Pawn::spawneffect(), and orxonox::Synchronisable::Synchronisable().

BaseObject * orxonox::BaseObject::getEvent | ( | unsigned int | index | ) | const

References events_.

Referenced by XMLPort().

EventContainer * orxonox::BaseObject::getEventContainer | ( | const std::string & | sectionname | ) | const

References eventContainers_.

const XMLFile* orxonox::BaseObject::getFile | ( |  | ) | const`[inline]`

Returns a pointer to the XMLFile that loaded this object.

Returns:
  The XMLFile

Referenced by BaseObject().

const std::string & orxonox::BaseObject::getFilename | ( |  | ) | const

Returns the levelfile that loaded this object.

Returns:
  The levelfile

References orxonox::BLANKSTRING, file_, and orxonox::XMLFile::getFilename().

Referenced by orxonox::Level::Level(), and orxonox::XMLPortClassParamContainer< T >::port().

Gametype* orxonox::BaseObject::getGametype | ( |  | ) | const`[inline]`

Referenced by orxonox::HumanController::addBots(), orxonox::Level::addObject(), BaseObject(), orxonox::Bot::Bot(), orxonox::PlayerInfo::changedGametype(), orxonox::HumanPlayer::changedGametype(), orxonox::PlayerInfo::changedName(), orxonox::UnderAttackHealthBar::changedOwner(), orxonox::TeamBaseMatchScore::changedOwner(), orxonox::PongScore::changedOwner(), orxonox::TeamBaseMatchBase::changeTeamColour(), orxonox::PongCenterpoint::checkGametype(), orxonox::Pawn::damage(), orxonox::Pawn::death(), orxonox::Destroyer::Destroyer(), orxonox::Pawn::hit(), orxonox::HumanController::killBots(), orxonox::HumanPlayer::networkcallback_client_initialized(), orxonox::Level::playerEntered(), orxonox::Pawn::removePlayer(), orxonox::WaypointPatrolController::searchEnemy(), orxonox::ArtificialController::searchNewTarget(), orxonox::Pawn::setPlayer(), orxonox::SpawnPoint::spawn(), orxonox::SpawnPoint::SpawnPoint(), orxonox::TeamBaseMatchBase::TeamBaseMatchBase(), orxonox::Scoreboard::tick(), orxonox::HUDTimer::tick(), orxonox::PongBall::tick(), orxonox::CheckPoint::triggered(), orxonox::PlayerInfo::updateGametypeInfo(), and orxonox::PlayerInfo::~PlayerInfo().

const std::string& orxonox::BaseObject::getLoaderIndentation | ( |  | ) | const`[inline]`

Returns the indentation of the debug output in the Loader.

Returns:
  The indentation

Referenced by orxonox::XMLPortClassParamContainer< T >::port().

bool orxonox::BaseObject::getMainState | ( |  | ) | const

References COUT, functorGetMainState_, orxonox::OrxonoxClass::getIdentifier(), orxonox::Identifier::getName(), getName(), and orxonox::Functor::getReturnvalue().

const std::string& orxonox::BaseObject::getMainStateName | ( |  | ) | const`[inline]`

Referenced by XMLPort().

const std::string& orxonox::BaseObject::getName | ( |  | ) | const`[inline]`

Returns the name of the object.

Referenced by orxonox::DistanceTrigger::addTargets(), addTemplate(), orxonox::Template::applyOn(), orxonox::Backlight::Backlight(), orxonox::BaseItem::BaseItem(), orxonox::OrxonoxOverlay::changedName(), orxonox::HUDHealthBar::changedName(), orxonox::EventTarget::changedName(), orxonox::Template::changedName(), getMainState(), orxonox::Template::getXMLElement(), orxonox::ChatOverlay::incomingChat(), orxonox::Attacher::loadedNewXMLName(), orxonox::EventTarget::loadedNewXMLName(), orxonox::EventListener::loadedNewXMLName(), orxonox::Gametype::pawnKilled(), orxonox::Deathmatch::pawnKilled(), orxonox::Gametype::playerChangedName(), orxonox::Deathmatch::playerChangedName(), orxonox::Level::playerEntered(), orxonox::Deathmatch::playerEntered(), orxonox::Level::playerLeft(), orxonox::Deathmatch::playerLeft(), orxonox::Pong::playerScored(), orxonox::Deathmatch::playerScored(), orxonox::XMLPortClassObjectContainer< T, O >::port(), orxonox::XMLPortClassParamContainer< T >::port(), orxonox::EventListener::processEvent(), setMainState(), orxonox::SpawnPoint::setTemplate(), orxonox::ControllableEntity::setXMLController(), orxonox::PongScore::tick(), orxonox::Namespace::XMLPort(), XMLPort(), orxonox::OrxonoxOverlay::~OrxonoxOverlay(), and orxonox::Template::~Template().

Namespace* orxonox::BaseObject::getNamespace | ( |  | ) | const`[inline]`

Referenced by BaseObject(), and orxonox::Namespace::XMLPort().

Gametype* orxonox::BaseObject::getOldGametype | ( |  | ) | const`[inline]`

Referenced by orxonox::PlayerInfo::changedGametype().

const std::string& orxonox::BaseObject::getOldName | ( |  | ) | const`[inline]`

Returns the old name of the object.

Referenced by orxonox::OrxonoxOverlay::changedName(), orxonox::Template::changedName(), orxonox::Gametype::playerChangedName(), and orxonox::Deathmatch::playerChangedName().

Scene* orxonox::BaseObject::getScene | ( |  | ) | const`[inline]`

Referenced by orxonox::WorldEntity::activatePhysics(), orxonox::Backlight::Backlight(), BaseObject(), orxonox::BigExplosion::BigExplosion(), orxonox::BillboardProjectile::BillboardProjectile(), orxonox::Camera::Camera(), orxonox::Billboard::changedMaterial(), orxonox::Planet::changedMesh(), orxonox::Model::changedMesh(), orxonox::WorldEntity::deactivatePhysics(), orxonox::ExplosionChunk::ExplosionChunk(), orxonox::GlobalShader::GlobalShader(), orxonox::Planet::init(), orxonox::BigExplosion::init(), orxonox::Light::Light(), orxonox::ParticleEmitter::ParticleEmitter(), orxonox::ParticleProjectile::ParticleProjectile(), orxonox::CameraManager::releaseFocus(), orxonox::ParticleEmitter::sourceChanged(), orxonox::Spectator::Spectator(), orxonox::Engine::tick(), orxonox::Trigger::Trigger(), orxonox::WorldEntity::WorldEntity(), orxonox::Backlight::~Backlight(), orxonox::Camera::~Camera(), orxonox::ControllableEntity::~ControllableEntity(), orxonox::Light::~Light(), and orxonox::WorldEntity::~WorldEntity().

Template * orxonox::BaseObject::getTemplate | ( | unsigned int | index | ) | const`[private]`

Returns the Template with the given index.

Parameters:

  | index | The index

References templates_.

Referenced by XMLPort().

const std::set<Template*>& orxonox::BaseObject::getTemplates | ( |  | ) | const`[inline]`

Returns the set of all aplied templates.

const mbool& orxonox::BaseObject::isActive | ( | void |  | ) | const`[inline]`

Returns the state of the objects activity.

Returns:
  The state of the activity

Reimplemented in orxonox::QuestEffectBeacon, and orxonox::Trigger.

Referenced by orxonox::WorldEntity::activatePhysics(), orxonox::CheckPoint::changedActivity(), orxonox::ParticleEmitter::changedActivity(), orxonox::FadingBillboard::changedColour(), changedMainState(), orxonox::FadingBillboard::changedVisibility(), orxonox::LocalQuest::isCompletable(), orxonox::GlobalQuest::isCompletable(), orxonox::LocalQuest::isFailable(), orxonox::GlobalQuest::isFailable(), orxonox::LocalQuest::isStartable(), orxonox::GlobalQuest::isStartable(), orxonox::QuestHint::setActive(), orxonox::ParticleEmitter::sourceChanged(), orxonox::FadingBillboard::startturnonoff(), orxonox::Backlight::startturnonoff(), orxonox::Trigger::tick(), orxonox::MobileEntity::tick(), orxonox::ControllableEntity::tick(), orxonox::BlinkingBillboard::tick(), orxonox::Projectile::tick(), orxonox::PickupSpawner::tick(), orxonox::Engine::tick(), orxonox::WaypointPatrolController::tick(), orxonox::WaypointController::tick(), orxonox::AIController::tick(), orxonox::PickupSpawner::trigger(), and XMLPort().

bool orxonox::BaseObject::isInitialized | ( |  | ) | const`[inline]`

Returns if the object was initialized (passed the object registration).

Returns:
  True was the object is initialized

Reimplemented in orxonox::Bot, orxonox::HumanPlayer, and orxonox::PlayerInfo.

Referenced by orxonox::Planet::changedVisibility(), orxonox::Backlight::~Backlight(), ~BaseObject(), orxonox::BigExplosion::~BigExplosion(), orxonox::Billboard::~Billboard(), orxonox::BillboardProjectile::~BillboardProjectile(), orxonox::BoxCollisionShape::~BoxCollisionShape(), orxonox::Camera::~Camera(), orxonox::CollisionShape::~CollisionShape(), orxonox::CompoundCollisionShape::~CompoundCollisionShape(), orxonox::ConeCollisionShape::~ConeCollisionShape(), orxonox::ControllableEntity::~ControllableEntity(), orxonox::Engine::~Engine(), orxonox::EventDispatcher::~EventDispatcher(), orxonox::ExplosionChunk::~ExplosionChunk(), orxonox::HUDBar::~HUDBar(), orxonox::HUDHealthBar::~HUDHealthBar(), orxonox::HUDNavigation::~HUDNavigation(), orxonox::HUDRadar::~HUDRadar(), orxonox::HumanPlayer::~HumanPlayer(), orxonox::Level::~Level(), orxonox::Light::~Light(), orxonox::Model::~Model(), orxonox::MovableEntity::~MovableEntity(), orxonox::MultiStateEngine::~MultiStateEngine(), orxonox::OrxonoxOverlay::~OrxonoxOverlay(), orxonox::OverlayText::~OverlayText(), orxonox::ParticleEmitter::~ParticleEmitter(), orxonox::ParticleProjectile::~ParticleProjectile(), orxonox::Pawn::~Pawn(), orxonox::PlaneCollisionShape::~PlaneCollisionShape(), orxonox::Planet::~Planet(), orxonox::PlayerInfo::~PlayerInfo(), orxonox::Scene::~Scene(), orxonox::SpaceShip::~SpaceShip(), orxonox::Spectator::~Spectator(), orxonox::SphereCollisionShape::~SphereCollisionShape(), orxonox::Stats::~Stats(), orxonox::UnderAttackHealthBar::~UnderAttackHealthBar(), orxonox::WaypointController::~WaypointController(), orxonox::Weapon::~Weapon(), orxonox::WeaponPack::~WeaponPack(), orxonox::WeaponSet::~WeaponSet(), orxonox::WeaponSlot::~WeaponSlot(), orxonox::WeaponSystem::~WeaponSystem(), and orxonox::WorldEntity::~WorldEntity().

const mbool& orxonox::BaseObject::isVisible | ( |  | ) | const`[inline]`

Returns the state of the objects visibility.

Returns:
  The state of the visibility

Referenced by orxonox::OverlayGroup::addElement(), orxonox::Engine::changedActivity(), changedMainState(), orxonox::Billboard::changedMaterial(), orxonox::Planet::changedMesh(), orxonox::Model::changedMesh(), orxonox::Scoreboard::changedVisibility(), orxonox::OrxonoxOverlay::changedVisibility(), orxonox::HUDHealthBar::changedVisibility(), orxonox::GUIOverlay::changedVisibility(), orxonox::Trigger::changedVisibility(), orxonox::Planet::changedVisibility(), orxonox::ParticleEmitter::changedVisibility(), orxonox::Model::changedVisibility(), orxonox::Light::changedVisibility(), orxonox::FadingBillboard::changedVisibility(), orxonox::Billboard::changedVisibility(), orxonox::Backlight::changedVisibility(), orxonox::ParticleProjectile::changedVisibility(), orxonox::BillboardProjectile::changedVisibility(), orxonox::GlobalShader::changedVisibility(), orxonox::ParticleEmitter::sourceChanged(), orxonox::FadingBillboard::startturnonoff(), orxonox::Backlight::startturnonoff(), orxonox::Scoreboard::tick(), orxonox::Planet::tick(), orxonox::OrxonoxOverlay::toggleVisibility(), and XMLPort().

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

Reimplemented in orxonox::EventDispatcher, orxonox::EventListener, orxonox::QuestEffectBeacon, orxonox::Attacher, orxonox::ParticleSpawner, and orxonox::EventTrigger.

References ORXONOX_SET_EVENT, setActive(), and setVisible().

void orxonox::BaseObject::registerEventListener | ( | BaseObject * | object,
|  | const std::string & | sectionname |
| ) |  |  | `[inline]`

void orxonox::BaseObject::removeEvent | ( | BaseObject * | event | ) |

References events_.

void orxonox::BaseObject::setActive | ( | bool | bActive | ) | `[inline]`

Sets the state of the objects activity.

Parameters:

  | bActive | True = active

Reimplemented in orxonox::QuestEffectBeacon.

Referenced by changedMainState(), orxonox::ParticleSpawner::fireParticleSpawner(), processEvent(), orxonox::PickupSpawner::respawnTimerCallback(), orxonox::ParticleSpawner::startParticleSpawner(), orxonox::ParticleSpawner::stopParticleSpawner(), orxonox::PickupSpawner::trigger(), and XMLPort().

void orxonox::BaseObject::setCreator | ( | BaseObject * | creator | ) | `[inline]`

Referenced by BaseObject().

void orxonox::BaseObject::setFile | ( | const XMLFile * | file | ) | `[inline]`

Sets a pointer to the xml file that loaded this object.

Parameters:

  | file | The pointer to the XMLFile

Referenced by BaseObject(), and orxonox::Loader::load().

void orxonox::BaseObject::setGametype | ( | Gametype * | gametype | ) | `[inline]`

Referenced by BaseObject(), orxonox::Gametype::Gametype(), orxonox::Level::playerEntered(), orxonox::Level::playerLeft(), and orxonox::Level::setGametypeString().

void orxonox::BaseObject::setLoaderIndentation | ( | const std::string & | indentation | ) | `[inline]`

Sets the indentation of the debug output in the Loader.

Parameters:

  | indentation | The indentation

Referenced by orxonox::Loader::load(), and orxonox::XMLPortClassObjectContainer< T, O >::port().

void orxonox::BaseObject::setMainState | ( | bool | state | ) |

References COUT, functorSetMainState_, orxonox::OrxonoxClass::getIdentifier(), orxonox::Identifier::getName(), and getName().

void orxonox::BaseObject::setMainStateName | ( | const std::string & | name | ) |

References changedMainState(), COUT, functorGetMainState_, functorSetMainState_, and mainStateName_.

Referenced by XMLPort().

void orxonox::BaseObject::setName | ( | const std::string & | name | ) | `[inline]`

Sets the name of the object.

Parameters:

  | name | The name

Referenced by orxonox::Bot::Bot(), orxonox::HUDHealthBar::changedName(), orxonox::HumanPlayer::configvaluecallback_changednick(), orxonox::HumanPlayer::networkcallback_changednick(), orxonox::HumanPlayer::networkcallback_clientIDchanged(), and setXMLName().

virtual void orxonox::BaseObject::setNamespace | ( | Namespace * | ns | ) | `[inline, virtual]`

Referenced by BaseObject(), and orxonox::Loader::load().

void orxonox::BaseObject::setScene | ( | Scene * | scene | ) | `[inline]`

Referenced by BaseObject(), and orxonox::Scene::Scene().

void orxonox::BaseObject::setVisible | ( | bool | bVisible | ) | `[inline]`

Sets the state of the objects visibility.

Parameters:

  | bVisible | True = visible

Reimplemented in orxonox::Trigger.

Referenced by orxonox::OverlayGroup::addElement(), changedMainState(), orxonox::HUDHealthBar::changedVisibility(), orxonox::HUDNavigation::HUDNavigation(), processEvent(), orxonox::CreateLines::setVisibility(), and XMLPort().

void orxonox::BaseObject::setXMLName | ( | const std::string & | name | ) | `[private]`

Loads the name of the object through XML and calls all XMLNameListener.

Parameters:

  | name | The name of the object

References setName().

Referenced by XMLPort().

void orxonox::BaseObject::unregisterEventListener | ( | BaseObject * | object | ) | `[inline]`

Referenced by ~BaseObject().

void orxonox::BaseObject::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 in orxonox::Namespace, orxonox::Template, orxonox::BoxCollisionShape, orxonox::CollisionShape, orxonox::CompoundCollisionShape, orxonox::ConeCollisionShape, orxonox::PlaneCollisionShape, orxonox::SphereCollisionShape, orxonox::WaypointController, orxonox::WaypointPatrolController, orxonox::EventDispatcher, orxonox::EventListener, orxonox::GlobalShader, orxonox::Engine, orxonox::MultiStateEngine, orxonox::Level, orxonox::BaseItem, orxonox::HealthImmediate, orxonox::HealthUsable, orxonox::Jump, orxonox::ModifierPickup, orxonox::PickupSpawner, orxonox::AddQuest, orxonox::AddQuestHint, orxonox::AddReward, orxonox::ChangeQuestStatus, orxonox::CompleteQuest, orxonox::FailQuest, orxonox::GlobalQuest, orxonox::LocalQuest, orxonox::Quest, orxonox::QuestDescription, orxonox::QuestEffectBeacon, orxonox::QuestHint, orxonox::QuestItem, orxonox::QuestListener, orxonox::Scene, orxonox::Script, orxonox::DefaultWeaponmodeLink, orxonox::Weapon, orxonox::WeaponMode, orxonox::EnergyDrink, orxonox::HsW01, orxonox::WeaponPack, orxonox::WeaponSet, orxonox::WeaponSlot, orxonox::Attacher, orxonox::Backlight, orxonox::Billboard, orxonox::BlinkingBillboard, orxonox::CameraPosition, orxonox::ControllableEntity, orxonox::FadingBillboard, orxonox::ForceField, orxonox::Light, orxonox::MobileEntity, orxonox::Model, orxonox::MovableEntity, orxonox::ParticleEmitter, orxonox::ParticleSpawner, orxonox::Pawn, orxonox::SpaceShip, orxonox::Planet, orxonox::PongCenterpoint, orxonox::SpawnPoint, orxonox::TeamSpawnPoint, orxonox::CheckPoint, orxonox::DistanceTrigger, orxonox::PlayerTrigger, orxonox::Trigger, orxonox::WorldEntity, orxonox::FadeoutText, orxonox::GUIOverlay, orxonox::BarColour, orxonox::HUDBar, orxonox::HUDHealthBar, orxonox::HUDNavigation, orxonox::HUDRadar, orxonox::PongScore, orxonox::TeamBaseMatchScore, orxonox::UnderAttackHealthBar, orxonox::Map, orxonox::NotificationQueue, orxonox::OrxonoxOverlay, orxonox::OverlayGroup, orxonox::OverlayText, orxonox::Scoreboard, and orxonox::Stats.

References addEvent(), addTemplate(), orxonox::Identifier::addXMLPortEventContainer(), orxonox::createExecutor(), orxonox::XMLPort::ExpandObject, getEvent(), orxonox::OrxonoxClass::getIdentifier(), getMainStateName(), getName(), getTemplate(), orxonox::Identifier::getXMLPortEventContainer(), orxonox::Identifier::getXMLPortEventMapBegin(), orxonox::Identifier::getXMLPortEventMapEnd(), isActive(), isVisible(), orxonox::XMLPort::LoadObject, orxonox::XMLPortClassObjectContainer< T, O >::port(), orxonox::XMLPort::SaveObject, setActive(), orxonox::Executor::setDefaultValue(), setMainStateName(), setVisible(), setXMLName(), XMLPortObjectTemplate, and XMLPortParam.

Referenced by orxonox::XMLPortClassObjectContainer< T, O >::port(), and orxonox::Script::XMLPort().

## Friends And Related Function Documentation

friend class XMLPortClassParamContainer`[friend]`

## Member Data Documentation

mbool orxonox::BaseObject::bActive_`[protected]`

True = the object is active.

Reimplemented in orxonox::EventListener, and orxonox::Trigger.

Referenced by BaseObject(), and orxonox::WorldEntity::registerVariables().

bool orxonox::BaseObject::bInitialized_`[private]`

True if the object was initialized (passed the object registration).

Referenced by BaseObject().

mbool orxonox::BaseObject::bVisible_`[protected]`

True = the object is visible.

Referenced by BaseObject(), orxonox::WorldEntity::registerVariables(), and orxonox::GlobalShader::registerVariables().

BaseObject* orxonox::BaseObject::creator_`[private]`

Referenced by BaseObject().

std::map<std::string, EventContainer*> orxonox::BaseObject::eventContainers_`[private]`

Referenced by addEventContainer(), and getEventContainer().

std::map<BaseObject*, std::string> orxonox::BaseObject::eventListeners_`[private]`

Referenced by fireEvent(), and ~BaseObject().

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

Referenced by addEvent(), getEvent(), removeEvent(), and ~BaseObject().

const XMLFile* orxonox::BaseObject::file_`[private]`

The XMLFile that loaded this object.

Referenced by BaseObject(), and getFilename().

Functor* orxonox::BaseObject::functorGetMainState_`[protected]`

Referenced by BaseObject(), getMainState(), setMainStateName(), and ~BaseObject().

Functor* orxonox::BaseObject::functorSetMainState_`[protected]`

Referenced by BaseObject(), setMainState(), setMainStateName(), and ~BaseObject().

Gametype* orxonox::BaseObject::gametype_`[private]`

Reimplemented in orxonox::Level.

Referenced by BaseObject().

Element* orxonox::BaseObject::lastLoadedXMLElement_`[private]`

Non 0 if the TinyXML attributes have already been copied to our own lowercase map.

Referenced by BaseObject(), and orxonox::XMLPortClassParamContainer< T >::port().

std::string orxonox::BaseObject::loaderIndentation_`[private]`

Indentation of the debug output in the Loader.

std::string orxonox::BaseObject::mainStateName_`[protected]`

Referenced by orxonox::WorldEntity::registerVariables(), and setMainStateName().

std::string orxonox::BaseObject::name_`[protected]`

The name of the object.

Referenced by orxonox::Level::registerVariables(), and orxonox::PlayerInfo::registerVariables().

Namespace* orxonox::BaseObject::namespace_`[private]`

Referenced by BaseObject().

Gametype* orxonox::BaseObject::oldGametype_`[private]`

Referenced by BaseObject().

std::string orxonox::BaseObject::oldName_`[protected]`

The old name of the object.

Scene* orxonox::BaseObject::scene_`[private]`

Referenced by BaseObject().

std::set<Template*> orxonox::BaseObject::templates_`[private]`

Referenced by addTemplate(), and getTemplate().

std::map<std::string, std::string> orxonox::BaseObject::xmlAttributes_`[private]`

Lowercase XML attributes.

Referenced by orxonox::XMLPortClassParamContainer< T >::port().

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

- src/core/BaseObject.h
- src/core/BaseObject.cc