#include <engine.hpp>
Public Member Functions | |
engine (readonly_context &context, const config &cfg) | |
virtual | ~engine () |
virtual bool | is_ok () const |
virtual void | do_parse_aspect_from_config (const config &cfg, const std::string &id, std::back_insert_iterator< std::vector< aspect_ptr > > b) |
virtual void | do_parse_candidate_action_from_config (rca_context &context, const config &cfg, std::back_insert_iterator< std::vector< candidate_action_ptr > > b) |
virtual void | do_parse_goal_from_config (const config &cfg, std::back_insert_iterator< std::vector< goal_ptr > > b) |
virtual void | do_parse_engine_from_config (const config &cfg, std::back_insert_iterator< std::vector< engine_ptr > > b) |
virtual void | do_parse_stage_from_config (ai_context &context, const config &cfg, std::back_insert_iterator< std::vector< stage_ptr > > b) |
virtual std::string | evaluate (const std::string &str) |
readonly_context & | get_readonly_context () |
virtual void | set_ai_context (ai_context_ptr context) |
set ai context (which is not available during early initialization) More... | |
virtual ai_context_ptr | get_ai_context () |
virtual config | to_config () const |
serialize More... | |
virtual std::string | get_id () const |
virtual std::string | get_engine () const |
virtual std::string | get_name () const |
Public Member Functions inherited from ai::component | |
component () | |
virtual | ~component () |
virtual component * | get_child (const path_element &child) |
virtual std::vector< component * > | get_children (const std::string &type) |
virtual std::vector< std::string > | get_children_types () |
virtual bool | change_child (const path_element &child, const config &cfg) |
virtual bool | add_child (const path_element &child, const config &cfg) |
virtual bool | delete_child (const path_element &child) |
property_handler_map & | property_handlers () |
Static Public Member Functions | |
static void | parse_aspect_from_config (readonly_context &context, const config &cfg, const std::string &id, std::back_insert_iterator< std::vector< aspect_ptr > > b) |
static void | parse_goal_from_config (readonly_context &context, const config &cfg, std::back_insert_iterator< std::vector< goal_ptr > > b) |
static void | parse_candidate_action_from_config (rca_context &context, const config &cfg, std::back_insert_iterator< std::vector< candidate_action_ptr > > b) |
static void | parse_engine_from_config (readonly_context &context, const config &cfg, std::back_insert_iterator< std::vector< engine_ptr > > b) |
static void | parse_stage_from_config (ai_context &context, const config &cfg, std::back_insert_iterator< std::vector< stage_ptr > > b) |
Protected Attributes | |
readonly_context & | ai_ |
ai_context_ptr | ai_context_ |
std::string | engine_ |
name of the engine which has created this engine More... | |
std::string | id_ |
std::string | name_ |
Definition at line 38 of file engine.hpp.
ai::engine::engine | ( | readonly_context & | context, |
const config & | cfg | ||
) |
Definition at line 32 of file engine.cpp.
References ai_, ai::side_context::get_side(), LOG_AI_ENGINE, and name_.
|
virtual |
Definition at line 42 of file engine.cpp.
|
virtual |
Reimplemented in ai::engine_lua, and ai::engine_cpp.
Definition at line 98 of file engine.cpp.
|
virtual |
Reimplemented in ai::engine_lua, ai::engine_cpp, and ai::engine_fai.
Definition at line 104 of file engine.cpp.
|
virtual |
Reimplemented in ai::engine_cpp.
Definition at line 108 of file engine.cpp.
|
virtual |
Reimplemented in ai::engine_lua, and ai::engine_cpp.
Definition at line 113 of file engine.cpp.
|
virtual |
Reimplemented in ai::engine_lua, ai::engine_cpp, and ai::engine_fai.
Definition at line 118 of file engine.cpp.
|
virtual |
Reimplemented in ai::engine_lua, and ai::engine_fai.
Definition at line 123 of file engine.cpp.
|
virtual |
Definition at line 133 of file engine.cpp.
References ai_context_.
Referenced by ai::cfun_ai_get_targets().
|
inlinevirtual |
|
inlinevirtual |
Implements ai::component.
Definition at line 96 of file engine.hpp.
References id_.
Referenced by ai::engine_lua::to_config().
|
inlinevirtual |
Implements ai::component.
Definition at line 102 of file engine.hpp.
References name_.
Referenced by to_config().
readonly_context & ai::engine::get_readonly_context | ( | ) |
Definition at line 146 of file engine.cpp.
References ai_.
Referenced by ai::lua_ai_context::create(), ai::get_readonly_context(), ai::impl_ai_aspect_get(), and ai::impl_ai_get().
|
virtual |
Reimplemented in ai::engine_lua.
Definition at line 46 of file engine.cpp.
|
static |
Definition at line 51 of file engine.cpp.
References ai::readonly_context::get_engine_by_cfg().
Referenced by ai::composite_aspect< T >::add_facet(), ai::composite_aspect< T >::composite_aspect(), ai::composite_aspect< T >::create_facet(), ai::readonly_context_impl::on_readonly_context_create(), and ai::ai_composite::replace_aspect().
|
static |
Definition at line 60 of file engine.cpp.
References ai::readonly_context::get_engine_by_cfg().
Referenced by ai::ai_default_rca::candidate_action_evaluation_loop::create_candidate_action(), and ai::ai_default_rca::candidate_action_evaluation_loop::on_create().
|
static |
Definition at line 69 of file engine.cpp.
References ai::readonly_context::get_engine_by_cfg().
Referenced by ai::ai_composite::create_engine(), and ai::readonly_context_impl::on_readonly_context_create().
|
static |
Definition at line 79 of file engine.cpp.
References ai::readonly_context::get_engine_by_cfg().
Referenced by ai::ai_composite::create_goal(), and ai::readonly_context_impl::on_readonly_context_create().
|
static |
Definition at line 89 of file engine.cpp.
References ai::readonly_context::get_engine_by_cfg().
Referenced by ai::ai_composite::create_stage().
|
virtual |
set ai context (which is not available during early initialization)
Definition at line 128 of file engine.cpp.
References ai_context_.
|
virtual |
serialize
Reimplemented in ai::engine_lua, and ai::engine_fai.
Definition at line 138 of file engine.cpp.
References engine_, and get_name().
Referenced by ai::engine_fai::to_config(), and ai::engine_lua::to_config().
|
protected |
Definition at line 106 of file engine.hpp.
Referenced by ai::engine_cpp::do_parse_aspect_from_config(), ai::engine_lua::do_parse_aspect_from_config(), ai::engine_fai::do_parse_candidate_action_from_config(), ai::engine_cpp::do_parse_candidate_action_from_config(), ai::engine_cpp::do_parse_engine_from_config(), ai::engine_cpp::do_parse_goal_from_config(), ai::engine_lua::do_parse_goal_from_config(), ai::engine_cpp::do_parse_stage_from_config(), engine(), and get_readonly_context().
|
protected |
Definition at line 107 of file engine.hpp.
Referenced by get_ai_context(), and set_ai_context().
|
protected |
name of the engine which has created this engine
Definition at line 110 of file engine.hpp.
Referenced by get_engine(), and to_config().
|
protected |
Definition at line 111 of file engine.hpp.
Referenced by get_id().
|
protected |
Definition at line 112 of file engine.hpp.
Referenced by engine(), ai::engine_cpp::engine_cpp(), ai::engine_fai::engine_fai(), ai::engine_lua::engine_lua(), and get_name().