Base class that holds the AI and current AI parameters. More...
#include <manager.hpp>
Public Member Functions | |
holder (side_number side, const config &cfg) | |
virtual | ~holder () |
ai_composite & | get_ai_ref () |
std::string | describe_ai () const |
config | to_config () const |
void | modify_ai (const config &cfg) |
void | micro_ai (const config &cfg) |
void | append_ai (const config &cfg) |
std::string | get_ai_overview () |
std::string | get_ai_structure () |
std::string | get_ai_identifier () const |
component * | get_component (component *root, const std::string &path) |
Private Member Functions | |
void | init (side_number side) |
Private Attributes | |
composite_ai_ptr | ai_ |
std::unique_ptr< side_context > | side_context_ |
std::unique_ptr< readonly_context > | readonly_context_ |
std::unique_ptr< readwrite_context > | readwrite_context_ |
std::unique_ptr< default_ai_context > | default_ai_context_ |
side_number | side_ |
config | cfg_ |
Base class that holds the AI and current AI parameters.
It is an implementation detail.
Definition at line 50 of file manager.hpp.
ai::holder::holder | ( | side_number | side, |
const config & | cfg | ||
) |
Definition at line 74 of file manager.cpp.
References DBG_AI_MANAGER, and describe_ai().
|
virtual |
Definition at line 128 of file manager.cpp.
References ai_, describe_ai(), and LOG_AI_MANAGER.
void ai::holder::append_ai | ( | const config & | cfg | ) |
Definition at line 189 of file manager.cpp.
References ai_, config::child_range(), get_ai_ref(), micro_ai(), modify_ai(), and side_context_.
Referenced by ai::manager::append_active_ai_for_side().
std::string ai::holder::describe_ai | ( | ) | const |
std::string ai::holder::get_ai_identifier | ( | ) | const |
Definition at line 305 of file manager.cpp.
References cfg_.
Referenced by ai::manager::get_active_ai_identifier_for_side().
std::string ai::holder::get_ai_overview | ( | ) |
Definition at line 253 of file manager.cpp.
References ai_, get_ai_ref(), utils::join(), and s.
Referenced by ai::manager::get_active_ai_overview_for_side().
ai_composite & ai::holder::get_ai_ref | ( | ) |
Definition at line 137 of file manager.cpp.
References ai_, init(), and side_.
Referenced by append_ai(), ai::manager::get_active_ai_for_side(), ai::manager::get_advancement_aspect_for_side(), get_ai_overview(), get_ai_structure(), and modify_ai().
std::string ai::holder::get_ai_structure | ( | ) |
Definition at line 297 of file manager.cpp.
References ai_, get_ai_ref(), and ai::component_manager::print_component_tree().
Referenced by ai::manager::get_active_ai_structure_for_side().
Definition at line 310 of file manager.cpp.
References ai_, game_config::debug, ai::component_manager::get_component(), init(), game_config::path, and side_.
Referenced by intf_debug_ai().
|
private |
Definition at line 80 of file manager.cpp.
References ai_, cfg_, config::child_range(), config::clear_children(), default_ai_context_, describe_ai(), ERR_AI_MANAGER, micro_ai(), modify_ai(), readonly_context_, readwrite_context_, and side_context_.
Referenced by get_ai_ref(), get_component(), and micro_ai().
void ai::holder::micro_ai | ( | const config & | cfg | ) |
Definition at line 147 of file manager.cpp.
References ai_, init(), and side_.
Referenced by append_ai(), and init().
void ai::holder::modify_ai | ( | const config & | cfg | ) |
Definition at line 160 of file manager.cpp.
References ai::component_manager::add_component(), ai_, ai::component_manager::change_component(), DBG_AI_MOD, ai::component_manager::delete_component(), ERR_AI_MOD, get_ai_ref(), LOG_AI_MOD, side_, and to_config().
Referenced by append_ai(), init(), and ai::manager::modify_active_ai_for_side().
config ai::holder::to_config | ( | ) | const |
Definition at line 221 of file manager.cpp.
References ai_, cfg_, default_ai_context_, config::merge_with(), readonly_context_, readwrite_context_, and side_context_.
Referenced by modify_ai(), and ai::manager::to_config().
|
private |
Definition at line 78 of file manager.hpp.
Referenced by append_ai(), describe_ai(), get_ai_overview(), get_ai_ref(), get_ai_structure(), get_component(), init(), micro_ai(), modify_ai(), to_config(), and ~holder().
|
private |
Definition at line 84 of file manager.hpp.
Referenced by describe_ai(), get_ai_identifier(), init(), and to_config().
|
private |
Definition at line 82 of file manager.hpp.
Referenced by init(), and to_config().
|
private |
Definition at line 80 of file manager.hpp.
Referenced by init(), and to_config().
|
private |
Definition at line 81 of file manager.hpp.
Referenced by init(), and to_config().
|
private |
Definition at line 83 of file manager.hpp.
Referenced by describe_ai(), get_ai_ref(), get_component(), micro_ai(), and modify_ai().
|
private |
Definition at line 79 of file manager.hpp.
Referenced by append_ai(), init(), and to_config().