#include <config.h>
◆ BlamConfigurationFile()
BlamConfigurationFile::BlamConfigurationFile |
( |
std::string |
_filename, |
|
|
std::string |
_comment_delimeter |
|
) |
| |
Prepares a new configuration file to be loaded.
- Parameters
-
_filename | - The path to the configuration file. |
_comment_delimeter | - The prefix to use when checking if a line is a comment. |
◆ AddNewSection()
Adds a new configuration section to the file.
◆ GetConfigurationSection()
Retrieves a configuration section from the configuration file.
- Returns
- The specified configuration section if it exists, otherwise returns
NULL
.
◆ HasConfigurationSection()
bool BlamConfigurationFile::HasConfigurationSection |
( |
std::string |
section_name | ) |
|
Checks whether or not a given configuration section exists in the file.
- Parameters
-
section_name | - The name of the section to look for. |
- Returns
true
if the section exists, otherwise returns false
.
◆ IsLoaded()
bool BlamConfigurationFile::IsLoaded |
( |
| ) |
|
Whether or not this configuration file has been loaded.
- Returns
- Whether or not this configuration file has been loaded.
◆ Load()
Loads the configuration file from disk.
- Returns
#BlamResult::Success_OK
if the file was loaded successfully, otherwise returns an error code.
◆ LoadDefaults()
BlamResult BlamConfigurationFile::LoadDefaults |
( |
HMODULE |
dll_handle, |
|
|
int |
resource_id, |
|
|
const char * |
resource_type |
|
) |
| |
Load the list of default sections.
- Parameters
-
dll_handle | - The handle to the module that the resource is stored in. |
resource_id | - The resource ID for the default configuration values. |
resource_type | - The type of resource that the default configuration data is stored in. |
◆ Reload()
Cleans up old data and reloads the configuration file from disk.
- Returns
#BlamResult::Success_OK
if the file was loaded successfully, otherwise returns an error code.
◆ Save()
void BlamConfigurationFile::Save |
( |
| ) |
|
Saves the configuration file back to disk.
- Returns
#BlamResult::Success_OK
if the file was saved successfully, otherwise returns an error code.
◆ comment_delimeter
std::string BlamConfigurationFile::comment_delimeter = "" |
The character or string used to indicate a comment within the file.
◆ filename
std::string BlamConfigurationFile::filename = "" |
The name of the configuration file.
◆ sections
The list of configuration sections contained within the file.
The documentation for this class was generated from the following files: