map::ump::UMPFile Class Reference
#include <UMPFile.h>
Detailed Description
An ump file is a file that defines a theme for the RMA (random map assembly). It contains a list of UMPTiles objects that are part of the definition. Besides the tiles there are some UMPAssembly objects that defines a set of UMPTiles to be used for the assembling of the map. See http://ufoai.ninex.info/wiki/index.php/Mapping/Random_map_assembly/Algorithm
Definition at line 25 of file UMPFile.h.
Member Typedef Documentation
Constructor & Destructor Documentation
Creates a new umpFile object
- Parameters:
-
| fileName | The ump file to create or read |
| base | The prefix for all ump tiles |
virtual map::ump::UMPFile::~UMPFile |
( |
|
) |
[virtual] |
Member Function Documentation
void map::ump::UMPFile::addTile |
( |
UMPTile & |
tile |
) |
|
Adds a new ump tile to the file
- Parameters:
-
void map::ump::UMPFile::forEachTile |
( |
UMPTileVisitor & |
visitor |
) |
const [inline] |
Visits each tile of this UMP file.
- Parameters:
-
| visitor | visitor to invoke for each tile. |
Definition at line 114 of file UMPFile.h.
References _umpTiles, and i.
const std::string& map::ump::UMPFile::getBase |
( |
|
) |
const |
- Returns:
- The prefix for all ump tiles
const std::string& map::ump::UMPFile::getFileName |
( |
|
) |
const |
- Returns:
- The filename of the ump file
- Parameters:
-
| tile | The tile to get the map name for |
- Returns:
- The map name that was assembled by the tile name and the base (if a base is set)
- Parameters:
-
| map | The name of the map to search the ump file for (base is handled automatically) |
- Returns:
NULL
if not found, the tile pointer otherwise
Converts the map name into a tile name when a base is set
- Parameters:
-
| map | The map to get the tile name for |
- Returns:
- The tile name that might be shorter if a base is set
bool map::ump::UMPFile::load |
( |
|
) |
|
Load the ump file
- Returns:
true
if the load was successful, false
otherwise
void map::ump::UMPFile::parse |
( |
Tokeniser & |
tokenizer |
) |
[private] |
bool map::ump::UMPFile::save |
( |
|
) |
|
Save the ump file
- Returns:
true
if the save was successful, false
otherwise
Field Documentation
The documentation for this class was generated from the following file: