Class representing a configuration setting.
More...
#include <config.h>
Class representing a configuration setting.
◆ BlamConfigurationSetting()
BlamConfigurationSetting::BlamConfigurationSetting |
( |
std::string |
line, |
|
|
int |
line_number, |
|
|
std::string |
comment_delimeter, |
|
|
std::string |
_filename |
|
) |
| |
Prepares a new configuration setting.
This method will create new setting data, as well as convert the setting value to the appropriate type.
- Parameters
-
line | - The line in the file to interpret as a configuration setting. |
comment_delimeter | - The prefix to use when checking if the line is a comment. |
_filename | - The name of the configuration file this setting belongs to. |
◆ AsBool()
bool * BlamConfigurationSetting::AsBool |
( |
| ) |
|
Retrieves the setting value as a bool.
- Returns
- Pointer to the setting value as a bool. If the value could not be converted to a bool, then
nullptr
will be returned instead.
◆ AsColor()
BlamColor * BlamConfigurationSetting::AsColor |
( |
| ) |
|
Retrieves the setting value as a color.
- Returns
- Pointer to the setting value as a color. If the value could not be converted to a color, then
nullptr
will be returned instead.
◆ AsFloat()
float * BlamConfigurationSetting::AsFloat |
( |
| ) |
|
Retrieves the setting value as a float.
- Returns
- Pointer to the setting value as a float. If the value could not be converted to a float, then
nullptr
will be returned instead.
◆ AsInt()
int * BlamConfigurationSetting::AsInt |
( |
| ) |
|
Retrieves the setting value as an int.
- Returns
- Pointer to the setting value as an int. If the value could not be converted to an int, then
nullptr
will be returned instead.
◆ AsString()
std::string * BlamConfigurationSetting::AsString |
( |
| ) |
|
Retrieves the setting value as a string.
- Returns
- Pointer to the setting value as a string.
◆ ConvertRawValueToString()
std::string BlamConfigurationSetting::ConvertRawValueToString |
( |
| ) |
|
◆ ExpandSettingPlaceholders()
void BlamConfigurationSetting::ExpandSettingPlaceholders |
( |
| ) |
|
◆ GetRawValue()
std::string * BlamConfigurationSetting::GetRawValue |
( |
| ) |
|
◆ IsValid()
bool BlamConfigurationSetting::IsValid |
( |
| ) |
|
Whether or not the provided file line was able to be interpreted as a valid setting.
- Returns
true
if the setting is valid, otherwise returns false
.
◆ UpdateValue()
void BlamConfigurationSetting::UpdateValue |
( |
std::string |
new_value | ) |
|
◆ id
std::string BlamConfigurationSetting::id |
◆ type
The type of setting that's being stored.
The documentation for this class was generated from the following files: