The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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:
Inheritance graph

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

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.

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

Definition at line 44 of file candidates.hpp.

Member Function Documentation

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.

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

Definition at line 56 of file candidates.hpp.

References action_.

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

Definition at line 58 of file candidates.hpp.

References name_.

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

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

Definition at line 54 of file candidates.hpp.

References score_.

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

Definition at line 59 of file candidates.hpp.

References type_.

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

const_formula_ptr wfl::base_candidate_action::action_
protected

Definition at line 68 of file candidates.hpp.

Referenced by get_action().

const_formula_ptr wfl::base_candidate_action::eval_
protected
std::string wfl::base_candidate_action::name_
protected

Definition at line 65 of file candidates.hpp.

Referenced by get_name().

int wfl::base_candidate_action::score_
protected
std::string wfl::base_candidate_action::type_
protected

Definition at line 66 of file candidates.hpp.

Referenced by get_type().


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