TankType Class Reference

#include <TankType.h>

List of all members.

Public Member Functions

 TankType ()
virtual ~TankType ()
const char * getName ()
const char * getDescription ()
fixed getLife ()
fixed getPower ()
std::map< Accessory *,
int > & 
getAccessories ()
bool getAccessoryDisabled (Accessory *accessory)
bool initFromXML (ScorchedContext &context, XMLNode *node)

Protected Attributes

std::string name_
std::string description_
std::map< Accessory *,
int > 
accessories_
std::set< Accessory * > disabledAccessories_
fixed life_
fixed power_


Detailed Description

Definition at line 32 of file TankType.h.


Constructor & Destructor Documentation

TankType::TankType (  ) 

Definition at line 27 of file TankType.cpp.

TankType::~TankType (  )  [virtual]

Definition at line 31 of file TankType.cpp.


Member Function Documentation

const char* TankType::getName (  )  [inline]

Definition at line 38 of file TankType.h.

References name_.

Referenced by TankTypes::getType().

const char * TankType::getDescription (  ) 

Definition at line 84 of file TankType.cpp.

References accessories_, description_, disabledAccessories_, S3D::formatStringBuffer(), getLife(), Accessory::getName(), and getPower().

Referenced by GLWTankViewer::draw().

fixed TankType::getLife (  )  [inline]

Definition at line 40 of file TankType.h.

References life_.

Referenced by getDescription(), and Tank::newGame().

fixed TankType::getPower (  )  [inline]

Definition at line 41 of file TankType.h.

References power_.

Referenced by TankPosition::clientNewGame(), getDescription(), and TankPosition::newGame().

std::map<Accessory *, int>& TankType::getAccessories (  )  [inline]

Definition at line 43 of file TankType.h.

References accessories_.

Referenced by TankAccessories::newMatch().

bool TankType::getAccessoryDisabled ( Accessory accessory  ) 

Definition at line 78 of file TankType.cpp.

References disabledAccessories_.

Referenced by TankAccessories::accessoryAllowed().

bool TankType::initFromXML ( ScorchedContext context,
XMLNode node 
)

Definition at line 35 of file TankType.cpp.

References accessories_, disabledAccessories_, XMLNode::failChildren(), ScorchedContext::getAccessoryStore(), XMLNode::getNamedChild(), life_, name_, power_, and XMLNode::returnError().

Referenced by TankTypes::loadTankTypes().


Member Data Documentation

std::string TankType::name_ [protected]

Definition at line 49 of file TankType.h.

Referenced by getName(), and initFromXML().

std::string TankType::description_ [protected]

Definition at line 49 of file TankType.h.

Referenced by getDescription().

std::map<Accessory *, int> TankType::accessories_ [protected]

Definition at line 50 of file TankType.h.

Referenced by getAccessories(), getDescription(), and initFromXML().

std::set<Accessory *> TankType::disabledAccessories_ [protected]

Definition at line 51 of file TankType.h.

Referenced by getAccessoryDisabled(), getDescription(), and initFromXML().

fixed TankType::life_ [protected]

Definition at line 52 of file TankType.h.

Referenced by getLife(), and initFromXML().

fixed TankType::power_ [protected]

Definition at line 53 of file TankType.h.

Referenced by getPower(), and initFromXML().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:07 2009 for Scorched3D by  doxygen 1.5.3