Orxonox: orxonox::WeaponSet Class Reference

# orxonox::WeaponSet Class Reference

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

Inheritance diagram for orxonox::WeaponSet:

List of all members.

## Public Member Functions

void | fire ()
unsigned int | getDesiredFiremode () const
unsigned int | getWeaponmodeLink (WeaponPack *weaponpack)
WeaponSystem * | getWeaponSystem () const
void | reload ()
void | removeWeaponmodeLink (WeaponPack *weaponpack)
void | setDesiredFiremode (const unsigned int firemode)
void | setWeaponmodeLink (WeaponPack *weaponpack, unsigned int weaponmode)
void | setWeaponSystem (WeaponSystem *weaponSystem)
| WeaponSet (BaseObject *creator)
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode)
| XML loading and saving.
virtual | ~WeaponSet ()

## Private Attributes

unsigned int | desiredFiremode_
std::map< WeaponPack *, unsigned int > | weaponpacks_
WeaponSystem * | weaponSystem_

## Constructor & Destructor Documentation

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

References desiredFiremode_, orxonox::WeaponSystem::FIRE_MODE_UNASSIGNED, RegisterObject, and weaponSystem_.

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

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

## Member Function Documentation

void orxonox::WeaponSet::fire | ( |  | ) |

References orxonox::WeaponSystem::WEAPON_MODE_UNASSIGNED, and weaponpacks_.

unsigned int orxonox::WeaponSet::getDesiredFiremode | ( |  | ) | const`[inline]`

Referenced by orxonox::WeaponSystem::addWeaponSet(), and XMLPort().

unsigned int orxonox::WeaponSet::getWeaponmodeLink | ( | WeaponPack * | weaponpack | ) |

References orxonox::WeaponSystem::WEAPON_MODE_UNASSIGNED, and weaponpacks_.

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

void orxonox::WeaponSet::reload | ( |  | ) |

References weaponpacks_.

void orxonox::WeaponSet::removeWeaponmodeLink | ( | WeaponPack * | weaponpack | ) |

References weaponpacks_.

void orxonox::WeaponSet::setDesiredFiremode | ( | const unsigned int | firemode | ) | `[inline]`

Referenced by XMLPort().

void orxonox::WeaponSet::setWeaponmodeLink | ( | WeaponPack * | weaponpack,
|  | unsigned int | weaponmode |
| ) |  |  |

References weaponpacks_.

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

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

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

void orxonox::WeaponSet::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 getDesiredFiremode(), setDesiredFiremode(), SUPER, and XMLPortParam.

## Member Data Documentation

unsigned int orxonox::WeaponSet::desiredFiremode_`[private]`

Referenced by WeaponSet().

std::map<WeaponPack*, unsigned int> orxonox::WeaponSet::weaponpacks_`[private]`

Referenced by fire(), getWeaponmodeLink(), reload(), removeWeaponmodeLink(), and setWeaponmodeLink().

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

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

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

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