![]() |
Blamite Game Engine - blam!
00285.12.18.20.1411.blamite
The core library for the Blamite Game Engine.
|
Structure representing a configuration section. More...
#include <config.h>
Public Member Functions | |
BlamConfigurationSection (std::string _name, std::string _filename) | |
void | AddNewSetting (BlamConfigurationSetting *new_setting) |
void | AddNewDefaultSetting (BlamConfigurationSetting *new_setting) |
bool | HasOption (std::string option) |
Checks whether or not a given configuration setting exists in this section. More... | |
std::string * | GetString (std::string option) |
Retrieves a configuration setting as a string. More... | |
bool * | GetBool (std::string option) |
Retrieves a configuration setting as a bool. More... | |
float * | GetFloat (std::string option) |
Retrieves a configuration setting as a float. More... | |
int * | GetInt (std::string option) |
Retrieves a configuration setting as an int. More... | |
BlamColor * | GetColor (std::string option) |
Retrieves a configuration setting as a color. More... | |
void | ExpandSectionPlaceholders () |
Public Attributes | |
std::map< std::string, BlamConfigurationSetting * > | settings |
std::map< std::string, BlamConfigurationSetting * > | default_settings |
std::string | name |
Structure representing a configuration section.
Unlike the old configuration file setup, configuration files are broken up into sections, similar to an INI file. These can be used to group similar settings
BlamConfigurationSection::BlamConfigurationSection | ( | std::string | _name, |
std::string | _filename | ||
) |
void BlamConfigurationSection::AddNewDefaultSetting | ( | BlamConfigurationSetting * | new_setting | ) |
void BlamConfigurationSection::AddNewSetting | ( | BlamConfigurationSetting * | new_setting | ) |
void BlamConfigurationSection::ExpandSectionPlaceholders | ( | ) |
bool * BlamConfigurationSection::GetBool | ( | std::string | option | ) |
Retrieves a configuration setting as a bool.
option | - The option to retrieve. |
nullptr
. If the setting exists but cannot be interpreted as a bool, then will also return nullptr
. BlamColor * BlamConfigurationSection::GetColor | ( | std::string | option | ) |
Retrieves a configuration setting as a color.
option | - The option to retrieve. |
nullptr
. If the setting exists but cannot be interpreted as a color, then will also return nullptr
. float * BlamConfigurationSection::GetFloat | ( | std::string | option | ) |
Retrieves a configuration setting as a float.
option | - The option to retrieve. |
nullptr
. If the setting exists but cannot be interpreted as a float, then will also return nullptr
. int * BlamConfigurationSection::GetInt | ( | std::string | option | ) |
Retrieves a configuration setting as an int.
option | - The option to retrieve. |
nullptr
. If the setting exists but cannot be interpreted as an int, then will also return nullptr
. std::string * BlamConfigurationSection::GetString | ( | std::string | option | ) |
Retrieves a configuration setting as a string.
option | - The option to retrieve. |
nullptr
. If the setting exists but is not listed as a string, then will also return nullptr
. bool BlamConfigurationSection::HasOption | ( | std::string | option | ) |
Checks whether or not a given configuration setting exists in this section.
option | - The setting to look for. |
true
if the option exists, otherwise returns false
. std::map<std::string, BlamConfigurationSetting*> BlamConfigurationSection::default_settings |
std::string BlamConfigurationSection::name |
std::map<std::string, BlamConfigurationSetting*> BlamConfigurationSection::settings |