libtmx  0.4.0
an C++11 library for reading TMX files
Public Member Functions | List of all members
tmx::Terrain Class Reference

A terrain describes a kind of terrain on the map. More...

#include <tmx/Terrain.h>

Inheritance diagram for tmx::Terrain:
Inheritance graph
[legend]

Public Member Functions

 Terrain (const std::string &name, unsigned tile)
 Terrain constructor. More...
 
const std::string & getName () const noexcept
 Get the name of the terrain. More...
 
unsigned getTile () const noexcept
 Get the representing tile for the terrain. More...
 
- Public Member Functions inherited from tmx::Component
bool hasProperty (const std::string &key) const noexcept
 Tell if the object has a given property. More...
 
const std::string & getProperty (const std::string &key, const std::string &def) const noexcept
 Get a property value. More...
 
bool addProperty (const std::string &key, const std::string &value)
 Add a property. More...
 

Detailed Description

A terrain describes a kind of terrain on the map.

Constructor & Destructor Documentation

tmx::Terrain::Terrain ( const std::string &  name,
unsigned  tile 
)
inline

Terrain constructor.

Member Function Documentation

const std::string& tmx::Terrain::getName ( ) const
inlinenoexcept

Get the name of the terrain.

Returns
the name of the terrain
unsigned tmx::Terrain::getTile ( ) const
inlinenoexcept

Get the representing tile for the terrain.

Returns
the representing tile