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 35 of file properties.h.
|
private |
Definition at line 133 of file properties.h.
|
inline |
Definition at line 38 of file properties.h.
|
inlinevirtual |
|
inline |
Gets a map property as a boolean.
name | The name of the property. |
def | Default value, false by default. |
Definition at line 97 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 75 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 59 of file properties.h.
References mProperties.
Referenced by Map::getFilename(), Map::getGatName(), Map::getMusicFile(), Map::getName(), Map::getUserMapDirectory(), Map::initializeAmbientLayers(), 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 119 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 128 of file properties.h.
References mProperties.
Referenced by MapReader::createEmptyMap(), and MapReader::updateMusic().
|
private |
Definition at line 134 of file properties.h.
Referenced by getBoolProperty(), getFloatProperty(), getProperty(), hasProperty(), and setProperty().