BWAPI
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
BWAPI::Race Class Reference

#include <Race.h>

List of all members.

Public Member Functions

 Race ()
 Race (int id)
 Race (const Race &other)
Raceoperator= (const Race &other)
 operator int () const
int getID () const
std::string getName () const
UnitType getWorker () const
UnitType getCenter () const
UnitType getRefinery () const
UnitType getTransport () const
UnitType getSupplyProvider () const

Private Attributes

int id

Detailed Description

Definition at line 7 of file Race.h.


Constructor & Destructor Documentation

BWAPI::Race::Race ( int  id)
BWAPI::Race::Race ( const Race other)

Member Function Documentation

Returns the center unit type for the given race. For example Races::Terran.getCenter() will return a pointer to UnitTypes::Terran_Command_Center. While there are three center types for Zerg (Hatchery, Lair, and Hive), Races::Zerg.getCenter() will only return a pointer to UnitTypes::Zerg_Hatchery, since it is the unit type needed to make a new center.

Referenced by BuildingPlacerClass::calculateReservations(), PossibleLocationCompare::operator()(), and BuildingPlacerClass::rememberBestExpandLocation().

Here is the caller graph for this function:

int BWAPI::Race::getID ( ) const

Returns a unique ID for this race.

std::string BWAPI::Race::getName ( ) const

Returns the name of the race. For example Races::Terran.getName() will return a std::string object containing "Terran".

Returns the refinery unit type for the given race. For example: Races::Zerg.getRefinery() will return a pointer to UnitTypes::Zerg_Extractor?.

Referenced by BuildingPlacerClass::calculateReservations(), and ExpansionManagerClass::updateRefineries().

Here is the caller graph for this function:

Returns the main supply provider unit type for the given race. For example: Races::Terran.getSupplyProvider() will return a pointer to UnitTypes::Terran_Supply_Depot?.

Referenced by SupplyManagerClass::update().

Here is the caller graph for this function:

Returns the transport unit type for the given race. For example: Races::Protoss.getTransport() will return a pointer to UnitTypes::Protoss_Shuttle.

Returns the worker unit type for the given race. For example Races::Protoss.getWorker() will return a pointer to UnitTypes::Protoss_Probe.

BWAPI::Race::operator int ( ) const
Race& BWAPI::Race::operator= ( const Race other)

Member Data Documentation

int BWAPI::Race::id [private]

Definition at line 45 of file Race.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines