Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ContainerBaseType Class Reference

#include <containerbasetype.h>

Inheritance diagram for ContainerBaseType:

Inheritance graph
[legend]
List of all members.

Public Types

typedef vector< TransportationIOEntranceSystems
enum  ContainerFunctions {
  TrainingCenter, InternalVehicleProduction, AmmoProduction, InternalUnitRepair,
  RecycleUnits, Research, Sonar, SatelliteView,
  MineView, WindPowerPlant, SolarPowerPlant, MatterConverter,
  MiningStation, ProduceNonLeavableUnits, ResourceSink, ExternalEnergyTransfer,
  ExternalMaterialTransfer, ExternalFuelTransfer, ExternalAmmoTransfer, ExternalRepair,
  NoObjectChaining, SelfDestructOnConquer, Paratrooper, PlaceMines,
  CruiserLanding, ConquerBuildings, MoveAfterAttack, ExternalVehicleProduction,
  ConstructBuildings, IceBreaker, NoInairRefuelling, MakesTracks,
  DetectsMineralResources, NoReactionfire, AutoRepair, KamikazeOnly,
  ImmuneToMines, JamsOnlyOwnField, MoveWithReactionFire, OnlyMoveToAndFromTransports,
  AutoHarvestObjects, NoProductionCustomization, ManualSelfDestruct
}

Public Member Functions

 ContainerBaseType ()
bool hasFunction (ContainerFunctions function) const
bool hasAnyFunction (std::bitset< 64 > functions) const
ASCString getName () const
int getID () const
virtual ~ContainerBaseType ()
void runTextIO (PropertyContainer &pc)
bool vehicleFit (const Vehicletype *type) const
 can units of the given type be moved into this buildtype? This is a prerequisite - but not the only requirement - for a real unit to move into a real building
void read (tnstream &stream)
void write (tnstream &stream) const
virtual int getMoveMalusType () const =0
Resources getStorageCapacity (int mode) const
 returns the Storage capacity of the unit

Static Public Member Functions

static const char * getFunctionName (ContainerFunctions function)

Public Attributes

int id
vector< int > secondaryIDs
 when loading a file and these IDs are encountered, this object will be used.
ASCString name
 a short name, for example B-52
ASCString infotext
 an extensive information about the unit/building which may be several paragraphs long
int jamming
 the radar jamming power
int view
 the visibility range
Resources productionCost
int maxLoadableUnits
 the maximum number of units that can be loaded
int maxLoadableUnitSize
 the maximum size of a unit that may enter the building
int maxLoadableWeight
 the maximum total weight of all loaded units
int vehicleCategoriesStorable
 bitmapped: vehicle categories that can be stored the container
int vehicleCategoriesProduceable
 bitmapped: vehicle categories that can be produced in the container
vector< IntRangevehiclesInternallyProduceable
 the default production capabilities of this container.
EntranceSystems entranceSystems
TechAdapterDependency techDependency
ASCString infoImageFilename
 the filename of an image that is shown in info dialogs
int efficiencyfuel
 currently only used by mining stations: the efficiency of the resource extraction from the ground. Base is 1024
int efficiencymaterial
 currently only used by mining stations: the efficiency of the resource extraction from the ground. Base is 1024
int maxresearchpoints
 the maximum number of research points a research center may produce
int defaultMaxResearchpoints
 when a building of this type is placed on a map, its maxResearch property will be set to this value
int nominalresearchpoints
 the number of reseach points for which the plus settings apllies
Resources maxplus
Resources defaultProduction
 if a new building is constructed, this will be the resource production of the building
ResourceMatrix productionEfficiency
struct {
   int   range
   int   maxFieldsPerTurn
   vector< IntRange >   objectsHarvestable
 the ids of objects this unit can construct
   vector< IntRange >   objectGroupsHarvestable
 the group-ids of objects this unit can construct
autoHarvest

Static Public Attributes

static const int functionNum = 43

Protected Member Functions

void setFunction (ContainerFunctions function)

Protected Attributes

std::bitset< 64 > features
Resources asc_mode_tank
Resources bi_mode_tank

Classes

class  TransportationIO

Member Typedef Documentation

typedef vector<TransportationIO> ContainerBaseType::EntranceSystems
 

Definition at line 169 of file containerbasetype.h.


Member Enumeration Documentation

enum ContainerBaseType::ContainerFunctions
 

Enumeration values:
TrainingCenter 
InternalVehicleProduction 
AmmoProduction 
InternalUnitRepair 
RecycleUnits 
Research 
Sonar 
SatelliteView 
MineView 
WindPowerPlant 
SolarPowerPlant 
MatterConverter 
MiningStation 
ProduceNonLeavableUnits 
ResourceSink 
ExternalEnergyTransfer 
ExternalMaterialTransfer 
ExternalFuelTransfer 
ExternalAmmoTransfer 
ExternalRepair 
NoObjectChaining 
SelfDestructOnConquer 
Paratrooper 
PlaceMines 
CruiserLanding 
ConquerBuildings 
MoveAfterAttack 
ExternalVehicleProduction 
ConstructBuildings 
IceBreaker 
NoInairRefuelling 
MakesTracks 
DetectsMineralResources 
NoReactionfire 
AutoRepair 
KamikazeOnly 
ImmuneToMines 
JamsOnlyOwnField 
MoveWithReactionFire 
OnlyMoveToAndFromTransports 
AutoHarvestObjects 
NoProductionCustomization 
ManualSelfDestruct 

Definition at line 33 of file containerbasetype.h.


Constructor & Destructor Documentation

ContainerBaseType::ContainerBaseType  ) 
 

Definition at line 72 of file containerbasetype.cpp.

References autoHarvest, defaultMaxResearchpoints, efficiencyfuel, efficiencymaterial, jamming, maxint, maxLoadableUnits, maxLoadableUnitSize, maxLoadableWeight, maxresearchpoints, nominalresearchpoints, vehicleCategoriesProduceable, vehicleCategoriesStorable, and view.

virtual ContainerBaseType::~ContainerBaseType  )  [inline, virtual]
 

Definition at line 112 of file containerbasetype.h.


Member Function Documentation

const char * ContainerBaseType::getFunctionName ContainerFunctions  function  )  [static]
 

Definition at line 112 of file containerbasetype.cpp.

References ccontainerfunctions, and functionNum.

Referenced by UnitInfoDialog::UnitInfoDialog().

int ContainerBaseType::getID  )  const [inline, virtual]
 

Implements MapItemType.

Definition at line 98 of file containerbasetype.h.

virtual int ContainerBaseType::getMoveMalusType  )  const [pure virtual]
 

Implemented in BuildingType, and Vehicletype.

ASCString ContainerBaseType::getName  )  const [inline, virtual]
 

Implements MapItemType.

Reimplemented in Vehicletype.

Definition at line 97 of file containerbasetype.h.

References name.

Referenced by BuildingItem::getName(), BuildingTypeBaseWidget::getName(), and getProductionString().

Resources ContainerBaseType::getStorageCapacity int  mode  )  const
 

returns the Storage capacity of the unit

Parameters:
mode,: 0 = ASC Resource mode ; 1 = BI Resource mode

Definition at line 372 of file containerbasetype.cpp.

References asc_mode_tank, and bi_mode_tank.

Referenced by VehicleProduction_SelectionItemFactory::getCost(), ContainerBase::getStorageCapacity(), and UnitInfoDialog::UnitInfoDialog().

bool ContainerBaseType::hasAnyFunction std::bitset< 64 >  functions  )  const
 

Referenced by ContainerBase::vehicleUnloadSystem().

bool ContainerBaseType::hasFunction ContainerFunctions  function  )  const
 

Definition at line 92 of file containerbasetype.cpp.

References features.

Referenced by ResearchGraph::addSecondaryLab(), ContainerControls::ammoProducable(), TransferHandler::ammoProductionPossible(), Mine::attacksunit(), ServiceTargetSearcher::available(), SelfDestruct::available(), GuiFunctions::ConstructBuilding::available(), GuiFunctions::PutMine::available(), GuiFunctions::DestructBuilding::available(), GuiFunctions::PowerOff::available(), GuiFunctions::PowerOn::available(), Vehicle::buildingconstructable(), ContainerControls::buildProductionLine(), ContainerControls::calcDestructionOutput(), Vehicletype::calcProductionsCost(), Vehicle::ReactionFire::canMove(), Vehicle::canRepair(), Building::canRepair(), ServiceChecker::check(), VehicleService::FieldSearch::checkBuilding2Vehicle(), VehicleService::FieldSearch::checkVehicle2Vehicle(), Building::convert(), Vehicle::ReactionFire::disable(), doresearch(), Vehicle::ReactionFire::enable(), ContainerBase::endOwnTurn(), Vehicle::endRound(), evaluateProduction(), VehicleAttack::execute(), VehicleProduction_SelectionItemFactory::getAmmoFilling(), ContainerBase::getProduction(), ContainerBase::getResourceUsage(), VehicleService::getServices(), MiningWindow::hasFunction(), tcomputebuildingview::init(), tcomputevehicleview::init(), UnitPropertyEditor::init(), BuildingValues::init(), VehicleService::FieldSearch::initrefuelling(), Vehicle::postAttack(), ContainerControls::productionLinesBuyable(), Vehicletype::read(), ContainerControls::removeProductionLine(), Vehicletype::runTextIO(), Vehicle::setGeneratorStatus(), tunitattacksobject::setup(), tunitattacksbuilding::setup(), tunitattacksunit::setup(), DashboardPanel::showUnitData(), UnitInfoDialog::UnitInfoDialog(), ContainerConstControls::unitProductionAvailable(), ContainerConstControls::unitProductionPrerequisites(), ContainerControls::unitTrainingAvailable(), VehicleProduction_SelectionWindow::VehicleProduction_SelectionWindow(), and WeaponInfoPanel::WeaponInfoPanel().

void ContainerBaseType::read tnstream stream  )  [virtual]
 

Implements LoadableItemType.

Reimplemented in BuildingType, and Vehicletype.

Definition at line 260 of file containerbasetype.cpp.

References autoHarvest, entranceSystems, features, infoImageFilename, maxLoadableUnits, maxLoadableUnitSize, maxLoadableWeight, productionEfficiency, ResourceMatrix::read(), tnstream::readBitset(), readClassContainer(), tnstream::readInt(), tnstream::readString(), secondaryIDs, strrr(), vehicleCategoriesProduceable, vehicleCategoriesStorable, and vehiclesInternallyProduceable.

Referenced by Vehicletype::read(), and BuildingType::read().

void ContainerBaseType::runTextIO PropertyContainer pc  )  [virtual]
 

Implements LoadableItemType.

Reimplemented in BuildingType, and Vehicletype.

Definition at line 161 of file containerbasetype.cpp.

References PropertyContainer::addBreakpoint(), PropertyContainer::addInteger(), asc_mode_tank, autoHarvest, bi_mode_tank, cmovemalitypenum, defaultMaxResearchpoints, defaultProduction, efficiencyfuel, efficiencymaterial, entranceSystems, infoImageFilename, infotext, jamming, maxint, maxLoadableUnits, maxLoadableUnitSize, maxLoadableWeight, maxplus, maxresearchpoints, maxViewRange, name, nominalresearchpoints, PropertyContainer::openBracket(), productionEfficiency, ResourceMatrix::runTextIO(), Resources::runTextIO(), secondaryIDs, strrr(), unitCategoryTags, vehicleCategoriesProduceable, vehicleCategoriesStorable, vehiclesInternallyProduceable, and view.

Referenced by Vehicletype::runTextIO(), and BuildingType::runTextIO().

void ContainerBaseType::setFunction ContainerFunctions  function  )  [protected]
 

Definition at line 104 of file containerbasetype.cpp.

References features.

Referenced by Vehicletype::read(), and Vehicletype::runTextIO().

bool ContainerBaseType::vehicleFit const Vehicletype type  )  const
 

can units of the given type be moved into this buildtype? This is a prerequisite - but not the only requirement - for a real unit to move into a real building

Definition at line 246 of file containerbasetype.cpp.

References maxLoadableUnits, maxLoadableUnitSize, maxLoadableWeight, and vehicleCategoriesStorable.

Referenced by evaluateProduction(), ProductionItemFactory::isFiltered(), CargoItemFactory::isFiltered(), ContainerControls::productionLinesBuyable(), ContainerBase::vehicleDocking(), ContainerBase::vehicleFit(), ContainerBase::vehicleUnloadable(), and ContainerBase::vehicleUnloadSystem().

void ContainerBaseType::write tnstream stream  )  const [virtual]
 

Implements LoadableItemType.

Reimplemented in BuildingType, and Vehicletype.

Definition at line 300 of file containerbasetype.cpp.

References autoHarvest, entranceSystems, features, infoImageFilename, maxLoadableUnits, maxLoadableUnitSize, maxLoadableWeight, productionEfficiency, secondaryIDs, vehicleCategoriesProduceable, vehicleCategoriesStorable, vehiclesInternallyProduceable, ResourceMatrix::write(), and writeClassContainer().

Referenced by Vehicletype::write(), and BuildingType::write().


Member Data Documentation

Resources ContainerBaseType::asc_mode_tank [protected]
 

Definition at line 214 of file containerbasetype.h.

Referenced by getStorageCapacity(), Vehicletype::read(), BuildingType::read(), Vehicletype::runTextIO(), runTextIO(), Vehicletype::write(), and BuildingType::write().

struct { ... } ContainerBaseType::autoHarvest
 

Referenced by ContainerBaseType(), read(), AutoHarvestObjects::run(), runTextIO(), and write().

Resources ContainerBaseType::bi_mode_tank [protected]
 

Definition at line 215 of file containerbasetype.h.

Referenced by getStorageCapacity(), Vehicletype::read(), BuildingType::read(), Vehicletype::runTextIO(), runTextIO(), Vehicletype::write(), and BuildingType::write().

int ContainerBaseType::defaultMaxResearchpoints
 

when a building of this type is placed on a map, its maxResearch property will be set to this value

Definition at line 197 of file containerbasetype.h.

Referenced by ContainerBase::ContainerBase(), ContainerBaseType(), Vehicletype::read(), BuildingType::read(), runTextIO(), Vehicletype::write(), and BuildingType::write().

Resources ContainerBaseType::defaultProduction
 

if a new building is constructed, this will be the resource production of the building

Definition at line 205 of file containerbasetype.h.

Referenced by Building::Building(), putbuilding2(), Vehicletype::read(), BuildingType::read(), runTextIO(), Vehicletype::write(), and BuildingType::write().

int ContainerBaseType::efficiencyfuel
 

currently only used by mining stations: the efficiency of the resource extraction from the ground. Base is 1024

Definition at line 188 of file containerbasetype.h.

Referenced by ContainerBaseType(), BuildingValues::init(), Vehicletype::read(), BuildingType::read(), runTextIO(), Vehicletype::write(), and BuildingType::write().

int ContainerBaseType::efficiencymaterial
 

currently only used by mining stations: the efficiency of the resource extraction from the ground. Base is 1024

Definition at line 191 of file containerbasetype.h.

Referenced by ContainerBaseType(), BuildingValues::init(), Vehicletype::read(), BuildingType::read(), runTextIO(), Vehicletype::write(), and BuildingType::write().

EntranceSystems ContainerBaseType::entranceSystems
 

Definition at line 170 of file containerbasetype.h.

Referenced by Vehicletype::calcProductionsCost(), read(), runTextIO(), ContainerBase::vehicleDocking(), ContainerBase::vehicleLoadable(), ContainerBase::vehicleUnloadable(), ContainerBase::vehicleUnloadSystem(), and write().

std::bitset<64> ContainerBaseType::features [protected]
 

Definition at line 29 of file containerbasetype.h.

Referenced by Vehicletype::convertOldFunctions(), hasFunction(), Vehicletype::read(), read(), Vehicletype::runTextIO(), BuildingType::runTextIO(), setFunction(), and write().

const int ContainerBaseType::functionNum = 43 [static]
 

Definition at line 78 of file containerbasetype.h.

Referenced by getFunctionName(), Vehicletype::runTextIO(), ContainerBaseType::TransportationIO::runTextIO(), BuildingType::runTextIO(), and UnitInfoDialog::UnitInfoDialog().

int ContainerBaseType::id
 

Definition at line 88 of file containerbasetype.h.

Referenced by CalculateThreat_Vehicle::calc_threat_vehicle(), evaluateProduction(), BuildingItem::getID(), getProductionString(), getUnitSetID(), ItemFiltrationSystem::isFiltered(), MiningStation::MiningStation(), Vehicle::read(), Vehicletype::runTextIO(), GuiFunctions::VehicleBuildingGui::search(), AI::showFieldInformation(), transformMap(), viewterraininfo(), viewUnitSetinfo(), Vehicle::write(), and Building::write().

ASCString ContainerBaseType::infoImageFilename
 

the filename of an image that is shown in info dialogs

Definition at line 175 of file containerbasetype.h.

Referenced by CargoDialog::CargoDialog(), read(), runTextIO(), UnitInfoDialog::UnitInfoDialog(), and write().

ASCString ContainerBaseType::infotext
 

an extensive information about the unit/building which may be several paragraphs long

Definition at line 98 of file containerbasetype.h.

Referenced by Vehicletype::read(), BuildingType::read(), runTextIO(), UnitInfoDialog::UnitInfoDialog(), Vehicletype::write(), and BuildingType::write().

int ContainerBaseType::jamming
 

the radar jamming power

Definition at line 105 of file containerbasetype.h.

Referenced by Vehicletype::calcProductionsCost(), ContainerBaseType(), ReplayMapDisplay::displayMovingUnit(), tcomputebuildingview::init(), tcomputevehicleview::init(), Vehicletype::read(), BuildingType::read(), runTextIO(), UnitInfoDialog::UnitInfoDialog(), Vehicletype::write(), and BuildingType::write().

int ContainerBaseType::maxFieldsPerTurn
 

Definition at line 224 of file containerbasetype.h.

int ContainerBaseType::maxLoadableUnits
 

the maximum number of units that can be loaded

Definition at line 112 of file containerbasetype.h.

Referenced by CargoGuiFunctions::OpenContainer::available(), Vehicletype::calcProductionsCost(), cargoEditor(), ContainerBaseType(), read(), runTextIO(), StoringPosition::setup(), UnitInfoDialog::UnitInfoDialog(), ContainerConstControls::unitProductionAvailable(), vehicleFit(), ContainerBase::vehicleFit(), and write().

int ContainerBaseType::maxLoadableUnitSize
 

the maximum size of a unit that may enter the building

Definition at line 118 of file containerbasetype.h.

Referenced by ContainerBaseType(), read(), runTextIO(), UnitInfoDialog::UnitInfoDialog(), vehicleFit(), and write().

int ContainerBaseType::maxLoadableWeight
 

the maximum total weight of all loaded units

Definition at line 121 of file containerbasetype.h.

Referenced by ContainerBaseType(), read(), runTextIO(), UnitInfoDialog::UnitInfoDialog(), vehicleFit(), and write().

Resources ContainerBaseType::maxplus
 

Definition at line 202 of file containerbasetype.h.

Referenced by ContainerBase::ContainerBase(), BuildingValues::init(), Vehicletype::read(), BuildingType::read(), returnResourcenUseForResearch(), runTextIO(), Vehicletype::write(), and BuildingType::write().

int ContainerBaseType::maxresearchpoints
 

the maximum number of research points a research center may produce

Definition at line 194 of file containerbasetype.h.

Referenced by ContainerBaseType(), BuildingValues::init(), Vehicletype::read(), BuildingType::read(), runTextIO(), Vehicletype::write(), and BuildingType::write().

ASCString ContainerBaseType::name
 

a short name, for example B-52

Definition at line 95 of file containerbasetype.h.

Referenced by buildingComp(), BuildingComp(), BuildingTypeBaseWidget::BuildingTypeBaseWidget(), CargoDialog::CargoDialog(), Vehicletype::getName(), GuiFunctions::BuildingConstruction::getName(), GuiFunctions::VehicleBuildingGui::getName(), getName(), Building::getName(), Vehicletype::read(), BuildingType::read(), UnitTypeTransformation::run(), Vehicletype::runTextIO(), runTextIO(), DashboardPanel::showUnitData(), vehicleComp(), VehicleTypeBaseWidget::VehicleTypeBaseWidget(), viewterraininfo(), viewUnitSetinfo(), Vehicletype::write(), and BuildingType::write().

int ContainerBaseType::nominalresearchpoints
 

the number of reseach points for which the plus settings apllies

Definition at line 200 of file containerbasetype.h.

Referenced by ResearchGraph::addSecondaryLab(), ContainerBase::ContainerBase(), ContainerBaseType(), Vehicletype::read(), BuildingType::read(), returnResourcenUseForResearch(), runTextIO(), ResearchGraph::setResearch(), Vehicletype::write(), and BuildingType::write().

vector<IntRange> ContainerBaseType::objectGroupsHarvestable
 

the group-ids of objects this unit can construct

Definition at line 230 of file containerbasetype.h.

vector<IntRange> ContainerBaseType::objectsHarvestable
 

the ids of objects this unit can construct

Definition at line 227 of file containerbasetype.h.

Resources ContainerBaseType::productionCost
 

Definition at line 111 of file containerbasetype.h.

Referenced by ContainerControls::buildProductionLineResourcesNeeded(), ContainerControls::calcDestructionOutput(), trunreplay::execnextreplaymove(), GuiFunctions::BuildingConstruction::execute(), BuildingTypeSelectionItemFactory::getCost(), ContainerBase::getMaxRepair(), GuiFunctions::BuildingConstruction::getName(), GuiFunctions::VehicleBuildingGui::getName(), Vehicletype::read(), BuildingType::read(), ContainerControls::removeProductionLineResourcesNeeded(), Vehicletype::runTextIO(), BuildingType::runTextIO(), UnitInfoDialog::UnitInfoDialog(), unitStrengthValue(), Vehicle::vehicleconstructable(), Vehicletype::write(), and BuildingType::write().

ResourceMatrix ContainerBaseType::productionEfficiency
 

Definition at line 219 of file containerbasetype.h.

Referenced by BuildingType::BuildingType(), ContainerBase::getProductionCost(), read(), runTextIO(), Vehicletype::Vehicletype(), and write().

int ContainerBaseType::range
 

Definition at line 222 of file containerbasetype.h.

vector<int> ContainerBaseType::secondaryIDs
 

when loading a file and these IDs are encountered, this object will be used.

Definition at line 91 of file containerbasetype.h.

Referenced by read(), runTextIO(), and write().

TechAdapterDependency ContainerBaseType::techDependency
 

Definition at line 172 of file containerbasetype.h.

Referenced by trunreplay::execnextreplaymove(), getInstances(), Vehicletype::read(), BuildingType::read(), Vehicletype::runTextIO(), BuildingType::runTextIO(), Vehicle::vehicleconstructable(), Research::vehicletypeavailable(), Vehicletype::write(), and BuildingType::write().

int ContainerBaseType::vehicleCategoriesProduceable
 

bitmapped: vehicle categories that can be produced in the container

Definition at line 127 of file containerbasetype.h.

Referenced by ContainerBaseType(), ProductionItemFactory::isFiltered(), ContainerControls::productionLinesBuyable(), read(), runTextIO(), and write().

int ContainerBaseType::vehicleCategoriesStorable
 

bitmapped: vehicle categories that can be stored the container

Definition at line 124 of file containerbasetype.h.

Referenced by ContainerBaseType(), read(), runTextIO(), CargoDialog::userHandler(), vehicleFit(), and write().

vector<IntRange> ContainerBaseType::vehiclesInternallyProduceable
 

the default production capabilities of this container.

Please be aware that a VehicleType has additional production for building units externally

Definition at line 131 of file containerbasetype.h.

Referenced by ContainerBase::ContainerBase(), read(), runTextIO(), and write().

int ContainerBaseType::view
 

the visibility range

Definition at line 108 of file containerbasetype.h.

Referenced by Vehicletype::calcProductionsCost(), ContainerBaseType(), tcomputebuildingview::init(), tcomputevehicleview::init(), Vehicletype::read(), BuildingType::read(), Vehicletype::runTextIO(), runTextIO(), UnitInfoDialog::UnitInfoDialog(), Vehicletype::write(), and BuildingType::write().


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:16:55 2008 for Advanced Strategic Command by  doxygen 1.4.2