![]() |
Blamite Game Engine - Blam (Core)
|
Namespace to contain anything related to Configuration files. More...
Classes | |
class | ConfigFile |
Class to contain data related to a Config file. More... | |
struct | ConfigOption |
Structure to contain data for an option within a Config file. More... | |
Functions | |
BLAM int | LoadConfig (std::string filename) |
Loads a configuration file from the specified path. More... | |
BLAM int | LoadConfig (std::string filename, bool load_defaults) |
Loads a configuration file from the specified path. More... | |
BLAM int | LoadConfig (std::string filename, bool load_defaults, int defaults_resource_id) |
Loads a configuration file from the specified path. More... | |
BLAM int | LoadConfig (std::string filename, bool load_defaults, int defaults_resource_id, const char *defaults_res_type) |
Loads a configuration file from the specified path. More... | |
BLAM int | LoadConfig () |
Loads the default engine configuration file (engine.cfg) More... | |
BLAM ConfigFile * | GetConfig (std::string filename) |
Retrieves the specified configuration file. More... | |
BLAM ConfigFile * | GetConfig () |
Retrieves the default engine configuration file. More... | |
BLAM void | ApplyPlaceholdersToAllConfigFiles () |
Applies placeholder values to all configuration files. More... | |
BLAM void | ExpandConfigOptionPlaceholders () |
Expands all placeholders, and converts them to their evaluated values. More... | |
BLAM void | InsertConfigFile (ConfigFile config) |
Inserts a loaded ConfigFile into the map of loaded configuration files. More... | |
BLAM ConfigFile * | GetConfigData (std::string filename) |
Retrieves the specified configuration file. More... | |
Namespace to contain anything related to Configuration files.
void Blam::Config::ApplyPlaceholdersToAllConfigFiles | ( | ) |
Applies placeholder values to all configuration files.
void Blam::Config::ExpandConfigOptionPlaceholders | ( | ) |
Expands all placeholders, and converts them to their evaluated values.
Blam::Config::ConfigFile * Blam::Config::GetConfig | ( | ) |
Retrieves the default engine configuration file.
Blam::Config::ConfigFile * Blam::Config::GetConfig | ( | std::string | filename | ) |
Retrieves the specified configuration file.
filename | - The configuration file path. Should be the same as what was passed into LoadConfig() |
Blam::Config::ConfigFile * Blam::Config::GetConfigData | ( | std::string | filename | ) |
Retrieves the specified configuration file.
void Blam::Config::InsertConfigFile | ( | ConfigFile | config | ) |
Inserts a loaded ConfigFile into the map of loaded configuration files.
int Blam::Config::LoadConfig | ( | ) |
Loads the default engine configuration file (engine.cfg)
int Blam::Config::LoadConfig | ( | std::string | filename | ) |
Loads a configuration file from the specified path.
filename | - The path to the configuration file |
int Blam::Config::LoadConfig | ( | std::string | filename, |
bool | load_defaults | ||
) |
Loads a configuration file from the specified path.
Resource type is assumed to be "CFG"
, and resource ID is set to 0. Will error if load_defaults
is set to true.
TODO: Remove this shit
filename | - The path to the configuration file |
load_defaults | - Whether or not to load defaults from an embedded resource. |
int Blam::Config::LoadConfig | ( | std::string | filename, |
bool | load_defaults, | ||
int | defaults_resource_id | ||
) |
Loads a configuration file from the specified path.
Resource type is assumed to be "CFG"
.
filename | - The path to the configuration file |
load_defaults | - Whether or not to load defaults from an embedded resource. |
defaults_resource_id | - The resource ID that refers to the file containing the default configuration file contents. |
int Blam::Config::LoadConfig | ( | std::string | filename, |
bool | load_defaults, | ||
int | defaults_resource_id, | ||
const char * | defaults_res_type | ||
) |
Loads a configuration file from the specified path.
filename | - The path to the configuration file |
load_defaults | - Whether or not to load defaults from an embedded resource. |
defaults_resource_id | - The resource ID that refers to the file containing the default configuration file contents. |
defaults_res_type | - The type of resource that the default configuration file is stored in. Should almost always be "CFG" |