The Battle for Wesnoth  1.19.5+dev
Public Member Functions | Private Attributes | List of all members
ai::engine_fai Class Reference

#include <engine_fai.hpp>

Inheritance diagram for ai::engine_fai:

Public Member Functions

 engine_fai (readonly_context &context, const config &cfg)
 
virtual ~engine_fai ()
 
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_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)
 
virtual config to_config () const
 serialize More...
 
virtual void set_ai_context (ai_context *context)
 
- Public Member Functions inherited from ai::engine
 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_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)
 
readonly_contextget_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 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 componentget_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_mapproperty_handlers ()
 

Private Attributes

std::shared_ptr< formula_aiformula_ai_
 

Additional Inherited Members

- Static Public Member Functions inherited from ai::engine
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 inherited from ai::engine
readonly_contextai_
 
ai_context_ptr ai_context_
 
std::string engine_
 name of the engine which has created this engine More...
 
std::string id_
 
std::string name_
 

Detailed Description

Definition at line 30 of file engine_fai.hpp.

Constructor & Destructor Documentation

◆ engine_fai()

ai::engine_fai::engine_fai ( readonly_context context,
const config cfg 
)

Definition at line 67 of file engine_fai.cpp.

References formula_ai_, and ai::engine::name_.

◆ ~engine_fai()

ai::engine_fai::~engine_fai ( )
virtual

Definition at line 74 of file engine_fai.cpp.

Member Function Documentation

◆ do_parse_candidate_action_from_config()

void ai::engine_fai::do_parse_candidate_action_from_config ( rca_context context,
const config cfg,
std::back_insert_iterator< std::vector< candidate_action_ptr >>  b 
)
virtual

Reimplemented from ai::engine.

Definition at line 78 of file engine_fai.cpp.

References ai::engine::ai_, b, DBG_AI_ENGINE_FAI, ERR_AI_ENGINE_FAI, formula_ai_, and ai::side_context::get_side().

◆ do_parse_stage_from_config()

void ai::engine_fai::do_parse_stage_from_config ( ai_context context,
const config cfg,
std::back_insert_iterator< std::vector< stage_ptr >>  b 
)
virtual

Reimplemented from ai::engine.

Definition at line 90 of file engine_fai.cpp.

References b, ERR_AI_ENGINE_FAI, and formula_ai_.

◆ evaluate()

std::string ai::engine_fai::evaluate ( const std::string &  str)
virtual

Reimplemented from ai::engine.

Definition at line 113 of file engine_fai.cpp.

References formula_ai_.

◆ set_ai_context()

void ai::engine_fai::set_ai_context ( ai_context context)
virtual

Definition at line 118 of file engine_fai.cpp.

References DBG_AI_ENGINE_FAI, and formula_ai_.

◆ to_config()

config ai::engine_fai::to_config ( ) const
virtual

serialize

Reimplemented from ai::engine.

Definition at line 128 of file engine_fai.cpp.

References config::add_child(), formula_ai_, and ai::engine::to_config().

Member Data Documentation

◆ formula_ai_

std::shared_ptr<formula_ai> ai::engine_fai::formula_ai_
private

The documentation for this class was generated from the following files: