Eris::InnerTerrainModSlope Class Reference

Inner terrain mod class for handling slope mods. This will parse and create an instance of Mercator::SlopeTerrainMod, which is a mod which produces a sloped area in the landscape. The main parsing of the atlas data and creation of the terrain mod occurs in InnerTerrainMod_impl however, as this is a mod that uses templated shapes. More...

#include <TerrainMod.h>

Inheritance diagram for Eris::InnerTerrainModSlope:
Eris::InnerTerrainMod

List of all members.

Public Member Functions

 InnerTerrainModSlope (TerrainMod &terrainMod)
 Ctor.
virtual ~InnerTerrainModSlope ()
 Dtor.
virtual bool parseAtlasData (const Atlas::Message::MapType &modElement)
virtual Mercator::TerrainMod * getModifier ()

Protected Attributes

InnerTerrainMod_implmModifier_impl
 A reference to inner mod implementation.

Detailed Description

Inner terrain mod class for handling slope mods. This will parse and create an instance of Mercator::SlopeTerrainMod, which is a mod which produces a sloped area in the landscape. The main parsing of the atlas data and creation of the terrain mod occurs in InnerTerrainMod_impl however, as this is a mod that uses templated shapes.

Author:
Erik Hjortsberg <erik.hjortsberg@iteam.se>

Constructor & Destructor Documentation

Eris::InnerTerrainModSlope::InnerTerrainModSlope ( TerrainMod terrainMod  ) 

Ctor.

Parameters:
terrainMod The TerrainMod instance to which this instance belongs to.

Member Function Documentation

Mercator::TerrainMod * Eris::InnerTerrainModSlope::getModifier (  )  [virtual]

Accessor for the Mercator::TerrainMod created and held by this instance. If no terrain mod could be created, such as with faulty Atlas data, or if parseAtlasData() hasn't been called yet, this will return a null pointer.

Returns:
A pointer to the TerrainMod held by this instance, or null if none created.

Implements Eris::InnerTerrainMod.

References mModifier_impl.

bool Eris::InnerTerrainModSlope::parseAtlasData ( const Atlas::Message::MapType &  modElement  )  [virtual]

Tries to parse the Atlas data. It's up to the specific subclasses to provide proper parsing of the data depending on their needs. If the data is successfully parsed, a new Mercator::TerrainMod instance will be created.

Parameters:
modElement The Atlas element describing the terrainmod. This should in most instances correspond directly to the "terrainmod" element found in the root atlas attribute map.
Returns:
If the parsing was successful, true will be returned, and a new Mercator::TerrainMod will have been created, else false.

Implements Eris::InnerTerrainMod.

References Eris::InnerTerrainMod_impl::getModifier(), and mModifier_impl.


Member Data Documentation

A reference to inner mod implementation.

This is separate from this class because of the heavy use of templated shapes. The ownership is ours, so it will be destroyed when this instance is destroyed.

Referenced by getModifier(), and parseAtlasData().


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

Generated by  doxygen 1.6.2