#include <configuration.hpp>
Static Public Member Functions | |
static void | init (const config &game_config) |
Init the parameters of ai configuration parser. More... | |
static void | add_era_ai_from_config (const config &game_config) |
static void | add_mod_ai_from_config (config::const_child_itors configs) |
static const config & | get_default_ai_parameters () |
get default AI parameters More... | |
static const config & | get_ai_config_for (const std::string &id) |
Return the config for a specified ai. More... | |
static std::vector< description * > | get_available_ais () |
Returns a list of available AIs. More... | |
static bool | get_side_config_from_file (const std::string &file, config &cfg) |
get side config from file More... | |
static bool | parse_side_config (side_number side, const config &cfg, config &parsed_cfg) |
static void | expand_simplified_aspects (side_number side, config &cfg) |
Expand simplified aspects, similar to the change from 1.7.2 to 1.7.3 but with some additional syntax options. More... | |
Private Types | |
typedef std::map< std::string, description > | description_map |
Static Private Attributes | |
static description_map | ai_configurations_ = configuration::description_map() |
static description_map | era_ai_configurations_ = configuration::description_map() |
static description_map | mod_ai_configurations_ = configuration::description_map() |
static config | default_config_ = config() |
Definition at line 59 of file configuration.hpp.
|
private |
Definition at line 119 of file configuration.hpp.
Definition at line 104 of file configuration.cpp.
References era_ai_configurations_.
Referenced by ng::connect_engine::connect_engine().
|
static |
Definition at line 110 of file configuration.cpp.
References mod_ai_configurations_.
Referenced by ng::connect_engine::connect_engine().
|
static |
Expand simplified aspects, similar to the change from 1.7.2 to 1.7.3 but with some additional syntax options.
Definition at line 252 of file configuration.cpp.
References config::add_child(), config::all_children_range(), config::child_range(), config::clear_children(), get_ai_config_for(), config::has_attribute(), config::has_child(), config::remove_attribute(), preferences::turns(), and lg::wml_error().
Referenced by ai::holder::modify_side_ai_config(), and parse_side_config().
|
static |
Return the config for a specified ai.
Definition at line 135 of file configuration.cpp.
References ai_configurations_, default_config_, era_ai_configurations_, and mod_ai_configurations_.
Referenced by expand_simplified_aspects(), and ng::side_engine::user_description().
|
static |
Returns a list of available AIs.
Definition at line 118 of file configuration.cpp.
References ai_configurations_, DBG_AI_CONFIGURATION, era_ai_configurations_, and mod_ai_configurations_.
Referenced by mp::connect::connect().
|
static |
get default AI parameters
Definition at line 173 of file configuration.cpp.
References default_config_.
Referenced by ai::manager::get_active_ai_holder_for_side(), and intf_debug_ai().
|
static |
get side config from file
file | the file name to open. follows usual WML convention. | |
[out] | cfg | the config to be written from file. |
true | success |
false | failure |
Definition at line 160 of file configuration.cpp.
References ERR_AI_CONFIGURATION, filesystem::get_wml_location(), LOG_AI_CONFIGURATION, preprocess_file(), and read().
Referenced by ai::manager::add_ai_for_side_from_file().
Init the parameters of ai configuration parser.
game_config | game config |
Definition at line 42 of file configuration.cpp.
References ai_configurations_, ai::description::cfg, config::child(), config::child_range(), default_config_, era_ai_configurations_, ERR_AI_CONFIGURATION, ai::description::id, LOG_AI_CONFIGURATION, mod_ai_configurations_, and ai::description::text.
Referenced by game_config_manager::init_game_config().
|
static |
[in] | cfg | the config to be read |
[out] | parsed_cfg | parsed config |
true | success |
false | failure |
Definition at line 179 of file configuration.cpp.
References config::add_child(), config::add_child_at(), config::append(), config::child(), config::child_count(), config::child_range(), DBG_AI_CONFIGURATION, default_config_, ERR_AI_CONFIGURATION, expand_simplified_aspects(), config::get(), config::has_child(), LOG_AI_CONFIGURATION, config::merge_children_by_attribute(), config::remove_child(), and WRN_AI_CONFIGURATION.
Referenced by ai::manager::add_ai_for_side_from_config(), and ai::ai_composite::preparse_cfg().
|
staticprivate |
Definition at line 120 of file configuration.hpp.
Referenced by get_ai_config_for(), get_available_ais(), and init().
Definition at line 123 of file configuration.hpp.
Referenced by get_ai_config_for(), get_default_ai_parameters(), init(), and parse_side_config().
|
staticprivate |
Definition at line 121 of file configuration.hpp.
Referenced by add_era_ai_from_config(), get_ai_config_for(), get_available_ais(), and init().
|
staticprivate |
Definition at line 122 of file configuration.hpp.
Referenced by add_mod_ai_from_config(), get_ai_config_for(), get_available_ais(), and init().