The Battle for Wesnoth  1.19.7+dev
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
wfl::base_candidate_action Class Reference

#include <candidates.hpp>

Inheritance diagram for wfl::base_candidate_action:

Public Member Functions

 base_candidate_action (const std::string &name, const std::string &type, const config &cfg, function_symbol_table *function_table)
 
virtual ~base_candidate_action ()
 
virtual void evaluate (ai::formula_ai *, unit_map &)
 
virtual void update_callable_map (map_formula_callable &)
 
int get_score () const
 
const_formula_ptrget_action ()
 
const std::string & get_name () const
 
const std::string & get_type () const
 

Protected Member Functions

int execute_formula (const const_formula_ptr &formula, const formula_callable &callable, const ai::formula_ai *ai)
 

Protected Attributes

std::string name_
 
std::string type_
 
const_formula_ptr eval_
 
const_formula_ptr action_
 
int score_
 

Detailed Description

Definition at line 40 of file candidates.hpp.

Constructor & Destructor Documentation

◆ base_candidate_action()

wfl::base_candidate_action::base_candidate_action ( const std::string &  name,
const std::string &  type,
const config cfg,
function_symbol_table function_table 
)

Definition at line 32 of file candidates.cpp.

◆ ~base_candidate_action()

virtual wfl::base_candidate_action::~base_candidate_action ( )
inlinevirtual

Definition at line 44 of file candidates.hpp.

Member Function Documentation

◆ evaluate()

virtual void wfl::base_candidate_action::evaluate ( ai::formula_ai ,
unit_map  
)
inlinevirtual

Reimplemented in wfl::attack_candidate_action, and wfl::move_candidate_action.

Definition at line 47 of file candidates.hpp.

◆ execute_formula()

int wfl::base_candidate_action::execute_formula ( const const_formula_ptr formula,
const formula_callable callable,
const ai::formula_ai ai 
)
protected

◆ get_action()

const_formula_ptr& wfl::base_candidate_action::get_action ( )
inline

Definition at line 55 of file candidates.hpp.

References action_.

◆ get_name()

const std::string& wfl::base_candidate_action::get_name ( ) const
inline

Definition at line 57 of file candidates.hpp.

References name_.

Referenced by wfl::move_candidate_action::evaluate(), and wfl::attack_candidate_action::evaluate().

◆ get_score()

int wfl::base_candidate_action::get_score ( ) const
inline

Definition at line 53 of file candidates.hpp.

References score_.

◆ get_type()

const std::string& wfl::base_candidate_action::get_type ( ) const
inline

Definition at line 58 of file candidates.hpp.

References type_.

◆ update_callable_map()

virtual void wfl::base_candidate_action::update_callable_map ( map_formula_callable )
inlinevirtual

Reimplemented in wfl::attack_candidate_action, and wfl::move_candidate_action.

Definition at line 50 of file candidates.hpp.

Member Data Documentation

◆ action_

const_formula_ptr wfl::base_candidate_action::action_
protected

Definition at line 67 of file candidates.hpp.

Referenced by get_action().

◆ eval_

const_formula_ptr wfl::base_candidate_action::eval_
protected

◆ name_

std::string wfl::base_candidate_action::name_
protected

Definition at line 64 of file candidates.hpp.

Referenced by get_name().

◆ score_

int wfl::base_candidate_action::score_
protected

◆ type_

std::string wfl::base_candidate_action::type_
protected

Definition at line 65 of file candidates.hpp.

Referenced by get_type().


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