TerrainType Class Reference

The type of a field. More...

#include <terraintype.h>

Inheritance diagram for TerrainType:

Inheritance graph
[legend]
List of all members.

Public Member Functions

int getID () const
ASCString getName () const
 TerrainType ()
void runTextIO (PropertyContainer &pc)
 registers the properties of this item for loading/writing into asctxt files
void read (tnstream &stream)
 read the binary representation of this item from the given stream
void write (tnstream &stream) const
 write the binary representation of this item to the given stream
int getMemoryFootprint () const
 ~TerrainType ()

Public Attributes

int id
vector< int > secondaryIDs
 when loading a file and these IDs are encountered, this object will be used.
ASCString name
Weatherweather [cwettertypennum]

Classes

class  MoveMalus
class  Weather

Detailed Description

The type of a field.

Definition at line 75 of file terraintype.h.


Constructor & Destructor Documentation

TerrainType::TerrainType (  ) 

Definition at line 127 of file terraintype.cpp.

References cwettertypennum, and weather.

TerrainType::~TerrainType (  ) 

Definition at line 381 of file terraintype.cpp.

References cwettertypennum, and weather.


Member Function Documentation

int TerrainType::getID (  )  const [inline, virtual]

Implements MapItemType.

Definition at line 82 of file terraintype.h.

ASCString TerrainType::getName (  )  const [inline, virtual]

Implements MapItemType.

Definition at line 84 of file terraintype.h.

References name.

void TerrainType::runTextIO ( PropertyContainer pc  )  [virtual]

registers the properties of this item for loading/writing into asctxt files

Implements LoadableItemType.

Definition at line 447 of file terraintype.cpp.

References PropertyContainer::addBreakpoint(), PropertyContainer::addInteger(), PropertyContainer::addIntegerArray(), PropertyContainer::addString(), PropertyContainer::addTagArray(), PropertyContainer::closeBracket(), cwettertypennum, PropertyContainer::find(), PropertyContainer::isReading(), name, PropertyContainer::openBracket(), TerrainType::Weather::runTextIO(), secondaryIDs, weather, and weatherTags.

void TerrainType::read ( tnstream stream  )  [virtual]

read the binary representation of this item from the given stream

Implements LoadableItemType.

Definition at line 303 of file terraintype.cpp.

References cwettertypennum, tnstream::getDeviceName(), name, TerrainType::Weather::read(), readClassContainer(), tnstream::readInt(), tnstream::readString(), secondaryIDs, terrain_version, and weather.

void TerrainType::write ( tnstream stream  )  const [virtual]

write the binary representation of this item to the given stream

Implements LoadableItemType.

Definition at line 335 of file terraintype.cpp.

References cwettertypennum, name, secondaryIDs, terrain_version, weather, writeClassContainer(), tnstream::writeInt(), and tnstream::writeString().

int TerrainType::getMemoryFootprint (  )  const

Definition at line 360 of file terraintype.cpp.

References cwettertypennum, and weather.


Member Data Documentation

int TerrainType::id

Definition at line 77 of file terraintype.h.

Referenced by calculateobject(), MapField::getmovemalus(), ItemFiltrationSystem::isFiltered(), TerrainType::Weather::runTextIO(), MapField::setparams(), viewterraininfo(), and tspfldloaders::writefields().

vector<int> TerrainType::secondaryIDs

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

Definition at line 80 of file terraintype.h.

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

ASCString TerrainType::name

Definition at line 82 of file terraintype.h.

Referenced by DashboardPanel::eval(), getName(), MapField::getName(), read(), runTextIO(), terrainComp(), and write().

Weather* TerrainType::weather[cwettertypennum]

Definition at line 140 of file terraintype.h.

Referenced by tmapgenerator::addcoast(), MapField::changeTerrainType(), TerrainItem::display(), MapChange::fieldOperator(), getMemoryFootprint(), MapField::getWeather(), TerrainItem::place(), placeTerrain(), read(), tspfldloaders::readfields(), GameMap::resize(), TerrainType::Weather::runTextIO(), runTextIO(), tmapgenerator::setpfield(), MapField::setWeather(), terrainComp(), TerrainType(), transformMap(), write(), tspfldloaders::writefields(), and ~TerrainType().


The documentation for this class was generated from the following files:
Generated on Mon Feb 6 01:48:26 2012 for Advanced Strategic Command by  doxygen 1.5.1