Orxonox: orxonox::WeaponSlot Class Reference

# orxonox::WeaponSlot Class Reference

`#include <src/orxonox/objects/weaponsystem/WeaponSlot.h>`

Inheritance diagram for orxonox::WeaponSlot:

List of all members.

## Public Member Functions

void | attachWeapon (Weapon *weapon)
Weapon * | getWeapon () const
WeaponSystem * | getWeaponSystem () const
bool | isOccupied () const
void | removeWeapon ()
void | setWeaponSystem (WeaponSystem *weaponSystem)
| WeaponSlot (BaseObject *creator)
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode)
| XML loading and saving.
virtual | ~WeaponSlot ()

## Private Attributes

Weapon * | weapon_
WeaponSystem * | weaponSystem_

## Constructor & Destructor Documentation

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

References RegisterObject, orxonox::Synchronisable::setObjectMode(), weapon_, and weaponSystem_.

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

References orxonox::BaseObject::isInitialized(), orxonox::WeaponSystem::removeWeaponSlot(), and weaponSystem_.

## Member Function Documentation

void orxonox::WeaponSlot::attachWeapon | ( | Weapon * | weapon | ) |

References orxonox::WorldEntity::getPosition(), removeWeapon(), orxonox::StaticEntity::setPosition(), orxonox::Weapon::setWeaponSlot(), and weapon_.

Referenced by orxonox::WeaponSystem::swapWeaponSlots().

Weapon* orxonox::WeaponSlot::getWeapon | ( |  | ) | const`[inline]`

Referenced by orxonox::WeaponSystem::removeWeaponSlot(), and orxonox::WeaponSystem::swapWeaponSlots().

WeaponSystem* orxonox::WeaponSlot::getWeaponSystem | ( |  | ) | const`[inline]`

bool orxonox::WeaponSlot::isOccupied | ( |  | ) | const`[inline]`

void orxonox::WeaponSlot::removeWeapon | ( |  | ) |

References orxonox::Weapon::setWeaponSlot(), and weapon_.

Referenced by attachWeapon(), and orxonox::WeaponSystem::removeWeaponPack().

void orxonox::WeaponSlot::setWeaponSystem | ( | WeaponSystem * | weaponSystem | ) | `[inline]`

Referenced by orxonox::WeaponSystem::addWeaponSlot().

void orxonox::WeaponSlot::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 SUPER.

## Member Data Documentation

Weapon* orxonox::WeaponSlot::weapon_`[private]`

Referenced by attachWeapon(), removeWeapon(), and WeaponSlot().

WeaponSystem* orxonox::WeaponSlot::weaponSystem_`[private]`

Referenced by WeaponSlot(), and ~WeaponSlot().

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

- src/orxonox/objects/weaponsystem/WeaponSlot.h
- src/orxonox/objects/weaponsystem/WeaponSlot.cc