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

The type of a field. More...

#include <terraintype.h>

Inheritance diagram for TerrainType:
Inheritance graph
[legend]

Classes

class  MoveMalus
 
class  Weather
 

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 More...
 
void read (tnstream &stream)
 read the binary representation of this item from the given stream More...
 
void write (tnstream &stream) const
 write the binary representation of this item to the given stream More...
 
int getMemoryFootprint () const
 
 ~TerrainType ()
 
- Public Member Functions inherited from MapItemType
virtual ~MapItemType ()
 
- Public Member Functions inherited from LoadableItemType
virtual ~LoadableItemType ()
 

Public Attributes

int id
 
vector< int > secondaryIDs
 when loading a file and these IDs are encountered, this object will be used. More...
 
ASCString name
 
Weatherweather [cwettertypennum]
 
- Public Attributes inherited from LoadableItemType
ASCString filename
 The name of the file from which the item was loaded. More...
 
ASCString location
 The filename and location on disk (including containerfiles) of the object. More...
 
ASCString archive
 

Detailed Description

The type of a field.

Definition at line 75 of file terraintype.h.

Constructor & Destructor Documentation

TerrainType::TerrainType ( )

Definition at line 128 of file terraintype.cpp.

References cwettertypennum, and weather.

TerrainType::~TerrainType ( )

Definition at line 382 of file terraintype.cpp.

References cwettertypennum, and weather.

Member Function Documentation

int TerrainType::getID ( ) const
inlinevirtual

Implements MapItemType.

Definition at line 82 of file terraintype.h.

int TerrainType::getMemoryFootprint ( ) const
ASCString TerrainType::getName ( ) const
inlinevirtual

Implements MapItemType.

Definition at line 84 of file terraintype.h.

References name.

void TerrainType::read ( tnstream stream)
virtual

read the binary representation of this item from the given stream

Implements LoadableItemType.

Definition at line 304 of file terraintype.cpp.

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

Referenced by TerrainType::Weather::read().

void TerrainType::runTextIO ( PropertyContainer pc)
virtual
void TerrainType::write ( tnstream stream) const
virtual

write the binary representation of this item to the given stream

Implements LoadableItemType.

Definition at line 336 of file terraintype.cpp.

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

Member Data Documentation

int TerrainType::id
ASCString TerrainType::name
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().

Weather* TerrainType::weather[cwettertypennum]

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