 |
Blamite Game Engine - Blam (Core)
|
Go to the documentation of this file.
6 #define CONFIG_COMMENT_DELIMETER "#"
7 #define CONFIG_DEFAULT_NAME "engine.cfg"
8 #define CONFIG_COLOR_NAME "console_colors.cfg"
10 #define ENGINE_CFG Blam::Config::GetConfig()
46 std::map<std::string, ConfigOption>
options;
51 std::string
GetString(std::string option);
57 int GetInt(std::string option);
65 ConfigOption* find_config_default_option(std::string option);
66 std::string get_raw_config_value(std::string config_option);
72 BLAM int LoadConfig(std::string filename,
bool load_defaults,
int defaults_resource_id);
73 BLAM int LoadConfig(std::string filename,
bool load_defaults,
int defaults_resource_id,
const char* defaults_res_type);
Namespace surrounding all major engine components.
Definition: blam_api.h:17
std::wstring GetWString(std::string option)
Retrieves the specified config option's value as a wstring.
Definition: config_accessors.cpp:68
std::map< std::string, ConfigOption > default_options
Contains all defaults for the config file. Usually, defaults are stored as a resource embedded within...
Definition: config.h:47
BLAM void ExpandConfigOptionPlaceholders()
Expands all placeholders, and converts them to their evaluated values.
Definition: config_internal.cpp:97
BLAM ConfigFile * GetConfig(std::string filename)
Retrieves the specified configuration file.
Definition: config.cpp:213
BLAM ConfigFile * GetConfigData(std::string filename)
Retrieves the specified configuration file.
Definition: config_internal.cpp:171
BLAM void ApplyPlaceholdersToAllConfigFiles()
Applies placeholder values to all configuration files.
Definition: config_internal.cpp:108
Structure to contain data for an option within a Config file.
Definition: config.h:31
BLAM int LoadConfig(std::string filename)
Loads a configuration file from the specified path.
Definition: config.cpp:56
Class to contain data related to a Config file.
Definition: config.h:40
#define BLAM
Definition: config.h:13
std::string value
The raw string value of the option, as it displays in the config file.
Definition: config.h:34
BLAM void InsertConfigFile(ConfigFile config)
Inserts a loaded ConfigFile into the map of loaded configuration files.
Definition: config_internal.cpp:163
std::map< std::string, ConfigOption > options
Contains all options contained within the config file.
Definition: config.h:46
int GetInt(std::string option)
Retrieves the specified config option's value as an int (32-bit integer)
Definition: config_accessors.cpp:82
std::string id
The ID of the configuration setting, as it displays in the config file.
Definition: config.h:33
std::string filename
The name of the configuration file.
Definition: config.h:44
std::string path
The path to the configuration file. Can be either absolute or relative.
Definition: config.h:43
float GetFloat(std::string option)
Retrieves the specified config option's value as a float
Definition: config_accessors.cpp:94
bool GetBoolean(std::string option)
Retrieves the specified config option's value as a bool
Definition: config_accessors.cpp:116
const char * GetCString(std::string option)
Retrieves the specified config option's value as a const char*, also referred to as a C-String.
Definition: config_accessors.cpp:56
double GetDouble(std::string option)
Retrieves the specified config option's value as a double
Definition: config_accessors.cpp:106
std::string GetString(std::string option)
Retrieves the specified config option's value as a string.
Definition: config_accessors.cpp:44