#include <configuration.hpp>

Static Public Member Functions | |
| static void | init (const config &game_config) |
| Init the parameters of ai configuration parser. | |
| static void | add_era_ai_from_config (const config &game_config) |
| static const config & | get_default_ai_parameters () |
| get default AI parameters | |
| static const config & | get_ai_config_for (const std::string &id) |
| Return the config for a specified ai. | |
| static std::vector< description * > | get_available_ais () |
| Returns a list of available AIs. | |
| static bool | get_side_config_from_file (const std::string &file, config &cfg) |
| get side config from file | |
| static void | upgrade_aspect_configs_from_1_07_02_to_1_07_03 (side_number side, const config::const_child_itors &ai_parameters, config &parsed_cfg) |
| change a bunch of old aspect configs into a new-style [ai] snippet | |
| static bool | parse_side_config (side_number side, const config &cfg, config &parsed_cfg) |
Private Types | |
| typedef std::map< std::string, description > | description_map |
Static Private Member Functions | |
| static bool | upgrade_aspect_config_from_1_07_02_to_1_07_03 (side_number side, const config &cfg, config &parsed_cfg, const std::string &id, bool aspect_was_attribute=true) |
| Upgrade aspect config from version 1.7.2 to version 1.7.3. | |
| static void | upgrade_protect_goal_config_from_1_07_02_to_1_07_03 (side_number side, const config &protect_cfg, config &parsed_cfg, bool add_filter) |
| Upgrade protect goal config from version 1.7.2 to version 1.7.3. | |
| static bool | upgrade_side_config_from_1_07_02_to_1_07_03 (side_number side, config &cfg) |
| Upgrade side config from version 1.7.2 to version 1.7.3. | |
Static Private Attributes | |
| static description_map | ai_configurations_ = configuration::description_map() |
| static description_map | era_ai_configurations_ = configuration::description_map() |
| static config | default_config_ = config() |
Definition at line 60 of file configuration.hpp.
typedef std::map<std::string, description> ai::configuration::description_map [private] |
Definition at line 154 of file configuration.hpp.
| void ai::configuration::add_era_ai_from_config | ( | const config & | game_config | ) | [static] |
Definition at line 108 of file configuration.cpp.
Referenced by mp::connect::lists_init().

| const config & ai::configuration::get_ai_config_for | ( | const std::string & | id | ) | [static] |
Return the config for a specified ai.
Definition at line 146 of file configuration.cpp.
Referenced by mp::connect::side::get_config().

| std::vector< description * > ai::configuration::get_available_ais | ( | ) | [static] |
Returns a list of available AIs.
Definition at line 133 of file configuration.cpp.
Referenced by mp::connect::lists_init().

| const config & ai::configuration::get_default_ai_parameters | ( | ) | [static] |
get default AI parameters
Definition at line 178 of file configuration.cpp.
| bool ai::configuration::get_side_config_from_file | ( | const std::string & | file, | |
| config & | cfg | |||
| ) | [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 165 of file configuration.cpp.
| void ai::configuration::init | ( | const config & | game_config | ) | [static] |
Init the parameters of ai configuration parser.
| game_config_ | game config |
Definition at line 47 of file configuration.cpp.
| bool ai::configuration::parse_side_config | ( | side_number | side, | |
| const config & | cfg, | |||
| config & | parsed_cfg | |||
| ) | [static] |
| [in] | cfg | the config to be read |
| [out] | parsed_cfg | parsed config |
| true | success | |
| false | failure |
Definition at line 229 of file configuration.cpp.
Referenced by ai::testing_ai_default::fallback_to_other_ai::on_create().

| bool ai::configuration::upgrade_aspect_config_from_1_07_02_to_1_07_03 | ( | side_number | side, | |
| const config & | cfg, | |||
| config & | parsed_cfg, | |||
| const std::string & | id, | |||
| bool | aspect_was_attribute = true | |||
| ) | [static, private] |
Upgrade aspect config from version 1.7.2 to version 1.7.3.
| [in] | cfg | the config to be read |
| [out] | parsed_cfg | parsed config |
| [in] | id | id of the aspect to work on |
| aspect_was_attribute | aspect was an attribute, not a [child] |
| true | success | |
| false | failure |
Definition at line 184 of file configuration.cpp.
| void ai::configuration::upgrade_aspect_configs_from_1_07_02_to_1_07_03 | ( | side_number | side, | |
| const config::const_child_itors & | ai_parameters, | |||
| config & | parsed_cfg | |||
| ) | [static] |
change a bunch of old aspect configs into a new-style [ai] snippet
| [in] | ai_parameters | - old [ai] snippets |
| out | cfg - new-style [ai] snippet |
Definition at line 441 of file configuration.cpp.
| void ai::configuration::upgrade_protect_goal_config_from_1_07_02_to_1_07_03 | ( | side_number | side, | |
| const config & | protect_cfg, | |||
| config & | parsed_cfg, | |||
| bool | add_filter | |||
| ) | [static, private] |
Upgrade protect goal config from version 1.7.2 to version 1.7.3.
| side | side number | |
| [in] | protect_cfg | the config to be read |
| [out] | parsed_cfg | parsed config, to which a new goal is to be added |
| [in] | add_filter | should [filter] be added to criteria or not |
Definition at line 456 of file configuration.cpp.
| bool ai::configuration::upgrade_side_config_from_1_07_02_to_1_07_03 | ( | side_number | side, | |
| config & | cfg | |||
| ) | [static, private] |
Upgrade side config from version 1.7.2 to version 1.7.3.
| [in] | cfg | the config to be read |
| [out] | parsed_cfg | parsed config |
| true | success, cfg is guaranteed to be valid | |
| false | failure |
Definition at line 325 of file configuration.cpp.
References config::get(), and preferences::turns().

configuration::description_map ai::configuration::ai_configurations_ = configuration::description_map() [static, private] |
Definition at line 155 of file configuration.hpp.
config ai::configuration::default_config_ = config() [static, private] |
Definition at line 157 of file configuration.hpp.
configuration::description_map ai::configuration::era_ai_configurations_ = configuration::description_map() [static, private] |
Definition at line 156 of file configuration.hpp.
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:18:35 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |