![]() |
ManaPlus
|
#include <properties.h>
Public Member Functions | |
Properties () | |
virtual | ~Properties () |
const std::string | getProperty (const std::string &name, const std::string &def) const |
float | getFloatProperty (const std::string &name, const float def) const |
bool | getBoolProperty (const std::string &name, const bool def) const |
bool | hasProperty (const std::string &name) const |
void | setProperty (const std::string &name, const std::string &value) |
Private Types | |
typedef std::map< std::string, std::string > | PropertyMap |
Private Attributes | |
PropertyMap | mProperties |
A class holding a set of properties.
Definition at line 34 of file properties.h.
|
private |
Definition at line 132 of file properties.h.
|
inline |
|
inlinevirtual |
Gets a map property as a boolean.
name | The name of the property. |
def | Default value, false by default. |
Definition at line 96 of file properties.h.
References mProperties.
Referenced by Map::initializeAmbientLayers().
|
inline |
Gets a map property as a float.
name | The name of the property. |
def | Default value, 0.0F by default. |
Definition at line 74 of file properties.h.
References mProperties.
Referenced by Map::initializeAmbientLayers().
|
inline |
Get a map property.
name | The name of the property. |
def | Default value, empty string by default. |
Definition at line 58 of file properties.h.
References mProperties.
Referenced by MapReader::addLayerToList(), Map::getFilename(), Map::getGatName(), Map::getMusicFile(), Map::getName(), Map::getUserMapDirectory(), Map::initializeAmbientLayers(), loadReplaceLayer(), MapDebugTab::logic(), LocalPlayer::moveToHome(), LocalPlayer::removeHome(), LocalPlayer::setHome(), Minimap::setMap(), QuestsWindow::setMap(), MapReader::updateMusic(), and LocalPlayer::updateNavigateList().
|
inline |
Returns whether a certain property is available.
name | The name of the property. |
true
when a property is defined, false
otherwise. Definition at line 118 of file properties.h.
References mProperties.
Referenced by Map::getName(), and Map::initializeAmbientLayers().
|
inline |
Set a map property.
name | The name of the property. |
value | The value of the property. |
Definition at line 127 of file properties.h.
References mProperties.
Referenced by MapReader::addLayerToList(), MapReader::createEmptyMap(), loadReplaceLayer(), MapReader::readProperties(), Map::setMusicFile(), and MapReader::updateMusic().
|
private |
Definition at line 133 of file properties.h.
Referenced by getBoolProperty(), getFloatProperty(), getProperty(), hasProperty(), and setProperty().