orxonox::WeaponSystem Class Reference

#include <src/orxonox/objects/weaponsystem/WeaponSystem.h>

Inheritance diagram for orxonox::WeaponSystem:

orxonox::BaseObject orxonox::OrxonoxClass

List of all members.

Public Member Functions

bool addWeaponPack (WeaponPack *wPack)
bool addWeaponSet (WeaponSet *wSet, unsigned int firemode)
bool addWeaponSet (WeaponSet *wSet)
void addWeaponSlot (WeaponSlot *wSlot)
bool canAddWeaponPack (WeaponPack *wPack)
void changeWeaponmode (WeaponPack *wPack, WeaponSet *wSet, unsigned int weaponmode)
void fire (unsigned int firemode)
MunitiongetMunition (SubclassIdentifier< Munition > *identifier)
PawngetPawn () const
WeaponPackgetWeaponPack (unsigned int index) const
WeaponSetgetWeaponSet (unsigned int index) const
WeaponSlotgetWeaponSlot (unsigned int index) const
int getWeaponSlotSize () const
void reload ()
void removeWeaponPack (WeaponPack *wPack)
void removeWeaponSet (WeaponSet *wSet)
void removeWeaponSlot (WeaponSlot *wSlot)
void setPawn (Pawn *pawn)
bool swapWeaponSlots (WeaponSlot *wSlot1, WeaponSlot *wSlot2)
 WeaponSystem (BaseObject *creator)
virtual ~WeaponSystem ()

Static Public Member Functions

static unsigned int getFiremodeMask (unsigned int firemode)

Static Public Attributes

static const unsigned int FIRE_MODE_UNASSIGNED = static_cast<unsigned int>(-1)
static const unsigned int MAX_FIRE_MODES = 8
static const unsigned int MAX_WEAPON_MODES = 8
static const unsigned int WEAPON_MODE_UNASSIGNED = static_cast<unsigned int>(-1)

Private Attributes

std::map< Identifier
*, Munition * > 
munitions_
Pawnpawn_
std::set< WeaponPack * > weaponPacks_
std::map< unsigned int,
WeaponSet * > 
weaponSets_
std::vector< WeaponSlot * > weaponSlots_


Constructor & Destructor Documentation

orxonox::WeaponSystem::WeaponSystem ( BaseObject creator  ) 

References pawn_, and RegisterObject.

orxonox::WeaponSystem::~WeaponSystem (  )  [virtual]


Member Function Documentation

bool orxonox::WeaponSystem::addWeaponPack ( WeaponPack wPack  ) 

bool orxonox::WeaponSystem::addWeaponSet ( WeaponSet wSet,
unsigned int  firemode 
)

bool orxonox::WeaponSystem::addWeaponSet ( WeaponSet wSet  ) 

void orxonox::WeaponSystem::addWeaponSlot ( WeaponSlot wSlot  ) 

bool orxonox::WeaponSystem::canAddWeaponPack ( WeaponPack wPack  ) 

void orxonox::WeaponSystem::changeWeaponmode ( WeaponPack wPack,
WeaponSet wSet,
unsigned int  weaponmode 
)

void orxonox::WeaponSystem::fire ( unsigned int  firemode  ) 

References weaponSets_.

Referenced by orxonox::Pawn::doFire().

static unsigned int orxonox::WeaponSystem::getFiremodeMask ( unsigned int  firemode  )  [inline, static]

Munition * orxonox::WeaponSystem::getMunition ( SubclassIdentifier< Munition > *  identifier  ) 

Pawn* orxonox::WeaponSystem::getPawn (  )  const [inline]

Referenced by addWeaponPack().

WeaponPack * orxonox::WeaponSystem::getWeaponPack ( unsigned int  index  )  const

References weaponPacks_.

Referenced by orxonox::Pawn::getWeaponPack().

WeaponSet * orxonox::WeaponSystem::getWeaponSet ( unsigned int  index  )  const

References weaponSets_.

Referenced by orxonox::Pawn::getWeaponSet().

WeaponSlot * orxonox::WeaponSystem::getWeaponSlot ( unsigned int  index  )  const

References weaponSlots_.

Referenced by orxonox::Pawn::getWeaponSlot().

int orxonox::WeaponSystem::getWeaponSlotSize (  )  const [inline]

void orxonox::WeaponSystem::reload (  ) 

References weaponSets_.

void orxonox::WeaponSystem::removeWeaponPack ( WeaponPack wPack  ) 

void orxonox::WeaponSystem::removeWeaponSet ( WeaponSet wSet  ) 

References weaponSets_.

Referenced by orxonox::WeaponSet::~WeaponSet().

void orxonox::WeaponSystem::removeWeaponSlot ( WeaponSlot wSlot  ) 

void orxonox::WeaponSystem::setPawn ( Pawn pawn  )  [inline]

Referenced by orxonox::Pawn::Pawn().

bool orxonox::WeaponSystem::swapWeaponSlots ( WeaponSlot wSlot1,
WeaponSlot wSlot2 
)


Member Data Documentation

const unsigned int orxonox::WeaponSystem::FIRE_MODE_UNASSIGNED = static_cast<unsigned int>(-1) [static]

const unsigned int orxonox::WeaponSystem::MAX_FIRE_MODES = 8 [static]

Referenced by addWeaponSet().

const unsigned int orxonox::WeaponSystem::MAX_WEAPON_MODES = 8 [static]

Referenced by getMunition(), and ~WeaponSystem().

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

const unsigned int orxonox::WeaponSystem::WEAPON_MODE_UNASSIGNED = static_cast<unsigned int>(-1) [static]

std::map<unsigned int, WeaponSet *> orxonox::WeaponSystem::weaponSets_ [private]


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

Generated on Tue Jul 28 16:23:15 2009 for Orxonox by  doxygen 1.5.6