31 #define DBG_AI_ENGINE_CPP LOG_STREAM(debug, log_ai_engine_cpp)
32 #define LOG_AI_ENGINE_CPP LOG_STREAM(info, log_ai_engine_cpp)
33 #define ERR_AI_ENGINE_CPP LOG_STREAM(err, log_ai_engine_cpp)
48 const std::string aspect_factory_key =
id+
"*"+cfg[
"name"];
52 DBG_AI_ENGINE_CPP <<
"config snippet contains: " << std::endl << cfg << std::endl;
55 aspect_ptr new_aspect = f->second->get_new_instance(
ai_,cfg,
id);
58 DBG_AI_ENGINE_CPP <<
"config snippet contains: " << std::endl << cfg << std::endl;
69 DBG_AI_ENGINE_CPP <<
"config snippet contains: " << std::endl << cfg << std::endl;
73 if (!new_candidate_action) {
75 DBG_AI_ENGINE_CPP <<
"config snippet contains: " << std::endl << cfg << std::endl;
78 *
b = new_candidate_action;
87 DBG_AI_ENGINE_CPP <<
"config snippet contains: " << std::endl << cfg << std::endl;
90 stage_ptr new_stage = f->second->get_new_instance(context,cfg);
93 DBG_AI_ENGINE_CPP <<
"config snippet contains: " << std::endl << cfg << std::endl;
105 DBG_AI_ENGINE_CPP <<
"config snippet contains: " << std::endl << cfg << std::endl;
108 goal_ptr new_goal = f->second->get_new_instance(
ai_,cfg);
109 if (!new_goal || !new_goal->ok()) {
111 DBG_AI_ENGINE_CPP <<
"config snippet contains: " << std::endl << cfg << std::endl;
123 DBG_AI_ENGINE_CPP <<
"config snippet contains: " << std::endl << cfg << std::endl;
126 engine_ptr new_engine = f->second->get_new_instance(
ai_,cfg);
129 DBG_AI_ENGINE_CPP <<
"config snippet contains: " << std::endl << cfg << std::endl;
static factory_map & get_list()
virtual void do_parse_candidate_action_from_config(rca_context &context, const config &cfg, std::back_insert_iterator< std::vector< candidate_action_ptr > > b)
static factory_map & get_list()
#define ERR_AI_ENGINE_CPP
CPP AI Support engine - creating specific ai components from config.
void do_parse_aspect_from_config(const config &cfg, const std::string &id, std::back_insert_iterator< std::vector< aspect_ptr > > b)
static lg::log_domain log_ai_engine_cpp("ai/engine/cpp")
GLdouble GLdouble GLdouble b
virtual void do_parse_stage_from_config(ai_context &context, const config &cfg, std::back_insert_iterator< std::vector< stage_ptr > > b)
A small explanation about what's going on here: Each action has access to two game_info objects First...
static factory_map & get_list()
Composite AI with turn sequence which is a vector of stages.
static factory_map & get_list()
engine_cpp(readonly_context &context, const config &cfg)
#define DBG_AI_ENGINE_CPP
virtual void do_parse_engine_from_config(const config &cfg, std::back_insert_iterator< std::vector< engine_ptr > > b)
static factory_map & get_list()
Standard logging facilities (interface).
virtual side_number get_side() const =0
Get the side number.
virtual void do_parse_goal_from_config(const config &cfg, std::back_insert_iterator< std::vector< goal_ptr > > b)
A config object defines a single node in a WML file, with access to child nodes.
GLsizei const GLcharARB ** string
candidate action framework