MapReader Class Reference

#include <mapreader.h>

List of all members.


Detailed Description

Reader for XML map files (*.tmx).

Definition at line 34 of file mapreader.h.


Static Public Member Functions

static MapreadMap (const std::string &filename)
 Read an XML map from a file.
static MapreadMap (xmlNodePtr node, const std::string &path)
 Read an XML map from a parsed XML tree.

Static Private Member Functions

static void readProperties (xmlNodePtr node, Properties *props)
 Reads the properties element.
static void readLayer (xmlNodePtr node, Map *map)
 Reads a map layer and adds it to the given map.
static TilesetreadTileset (xmlNodePtr node, const std::string &path, Map *map)
 Reads a tile set.
static int getProperty (xmlNodePtr node, const char *name, int def)
 Gets an integer property from an xmlNodePtr.

Member Function Documentation

Map * MapReader::readMap ( const std::string &  filename  )  [static]

Read an XML map from a file.

Definition at line 144 of file mapreader.cpp.

Map * MapReader::readMap ( xmlNodePtr  node,
const std::string &  path 
) [static]

Read an XML map from a parsed XML tree.

The path is used to find the location of referenced tileset images.

Definition at line 204 of file mapreader.cpp.

void MapReader::readProperties ( xmlNodePtr  node,
Properties props 
) [static, private]

Reads the properties element.

Parameters:
node The properties element.
props The Properties instance to which the properties will be assigned.

Definition at line 288 of file mapreader.cpp.

void MapReader::readLayer ( xmlNodePtr  node,
Map map 
) [static, private]

Reads a map layer and adds it to the given map.

Definition at line 319 of file mapreader.cpp.

Tileset * MapReader::readTileset ( xmlNodePtr  node,
const std::string &  path,
Map map 
) [static, private]

Reads a tile set.

Definition at line 460 of file mapreader.cpp.

static int MapReader::getProperty ( xmlNodePtr  node,
const char *  name,
int  def 
) [static, private]

Gets an integer property from an xmlNodePtr.


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

Generated on Sun Apr 26 17:30:43 2009 for The Mana World by  doxygen 1.5.5