Advanced Strategic Command
Public Member Functions | Public Attributes | List of all members
TerrainAccess Class Reference

This class is used by buildings, vehicles and objects to specify which terrain it can move to / be built on. More...

#include <terraintype.h>

Public Member Functions

 TerrainAccess (void)
 
int accessible (const TerrainBits &bts) const
 checks whether a field with the given terrainbits is accessible. More...
 
void read (tnstream &stream)
 
void write (tnstream &stream) const
 
void runTextIO (PropertyContainer &pc)
 
ASCString toString (bool brief=true) const
 

Public Attributes

TerrainBits terrain
 at least one of these bits must match on of the terrain More...
 
TerrainBits terrainreq
 ALL these bits must be set in the terrain. More...
 
TerrainBits terrainnot
 if one of these bits is set, the field will NOT be accessible More...
 
TerrainBits terrainkill
 if a terrain is not accessible AND one of these bits is matched, the unit will be destroyed More...
 

Detailed Description

This class is used by buildings, vehicles and objects to specify which terrain it can move to / be built on.

Definition at line 42 of file terraintype.h.

Constructor & Destructor Documentation

TerrainAccess::TerrainAccess ( void  )

Definition at line 391 of file terraintype.cpp.

Member Function Documentation

int TerrainAccess::accessible ( const TerrainBits bts) const

checks whether a field with the given terrainbits is accessible.

Returns
1 if the field is accessible; 0 if it is not accessible -1 if it is not accessible and the unit is killed by it

Definition at line 396 of file terraintype.cpp.

Referenced by ConstructBuildingCommand::buildingFits(), checkunitsforremoval(), VehicleItem::place(), BuildingItem::place(), stu_height(), and terrainaccessible2().

void TerrainAccess::read ( tnstream stream)
void TerrainAccess::runTextIO ( PropertyContainer pc)
ASCString TerrainAccess::toString ( bool  brief = true) const

Definition at line 584 of file terraintype.cpp.

Referenced by GuiFunctions::BuildVehicleCommand::execute(), and viewterraininfo().

void TerrainAccess::write ( tnstream stream) const

Member Data Documentation

TerrainBits TerrainAccess::terrain

at least one of these bits must match on of the terrain

Definition at line 47 of file terraintype.h.

Referenced by read(), VehicleType::read(), runTextIO(), DataTab::setData(), UnitInfoDialog::userHandler(), and write().

TerrainBits TerrainAccess::terrainkill

if a terrain is not accessible AND one of these bits is matched, the unit will be destroyed

Definition at line 56 of file terraintype.h.

Referenced by read(), VehicleType::read(), runTextIO(), DataTab::setData(), UnitInfoDialog::userHandler(), and write().

TerrainBits TerrainAccess::terrainnot

if one of these bits is set, the field will NOT be accessible

Definition at line 53 of file terraintype.h.

Referenced by read(), VehicleType::read(), runTextIO(), DataTab::setData(), UnitInfoDialog::userHandler(), and write().

TerrainBits TerrainAccess::terrainreq

ALL these bits must be set in the terrain.

Definition at line 50 of file terraintype.h.

Referenced by read(), VehicleType::read(), runTextIO(), DataTab::setData(), UnitInfoDialog::userHandler(), and write().


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