Class ConfigFile¶
Defined in File config.h
Class Documentation¶
-
class
ConfigFile Class to contain data related to a Config file.
Public Functions
-
std::string
GetString(std::string option) Retrieves the specified config option’s value as a
string.- Parameters
option: - The ID of the configuration option.
-
const char *
GetCString(std::string option) Retrieves the specified config option’s value as a
const char*, also referred to as a C-String.- Parameters
option: - The ID of the configuration option.
-
std::wstring
GetWString(std::string option) Retrieves the specified config option’s value as a
wstring.- Parameters
option: - The ID of the configuration option.
-
float
GetFloat(std::string option) Retrieves the specified config option’s value as a
float- Parameters
option: - The ID of the configuration option.
-
int
GetInt(std::string option) Retrieves the specified config option’s value as an
int(32-bit integer)- Parameters
option: - The ID of the configuration option.
-
double
GetDouble(std::string option) Retrieves the specified config option’s value as a
double- Parameters
option: - The ID of the configuration option.
-
bool
GetBoolean(std::string option) Retrieves the specified config option’s value as a
bool- Parameters
option: - The ID of the configuration option.
Public Members
-
std::string
path The path to the configuration file. Can be either absolute or relative.
-
std::string
filename The name of the configuration file.
-
std::map<std::string, ConfigOption>
options Contains all options contained within the config file.
-
std::map<std::string, ConfigOption>
default_options Contains all defaults for the config file. Usually, defaults are stored as a resource embedded within the application.
-
std::string