The Battle for Wesnoth  1.13.4+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
game_logic::base_candidate_action Class Reference

#include <candidates.hpp>

Inheritance diagram for game_logic::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 (game_logic::map_formula_callable &)
 
int get_score () const
 
const_formula_ptrget_action ()
 
const std::stringget_name () const
 
const std::stringget_type () const
 

Protected Member Functions

int execute_formula (const const_formula_ptr &formula, const game_logic::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 41 of file candidates.hpp.

Constructor & Destructor Documentation

game_logic::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 31 of file candidates.cpp.

virtual game_logic::base_candidate_action::~base_candidate_action ( )
inlinevirtual

Definition at line 45 of file candidates.hpp.

Member Function Documentation

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

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

Definition at line 48 of file candidates.hpp.

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

Definition at line 57 of file candidates.hpp.

References action_.

const std::string& game_logic::base_candidate_action::get_name ( ) const
inline
int game_logic::base_candidate_action::get_score ( ) const
inline

Definition at line 55 of file candidates.hpp.

References score_.

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

Definition at line 60 of file candidates.hpp.

References type_.

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

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

Definition at line 51 of file candidates.hpp.

Member Data Documentation

const_formula_ptr game_logic::base_candidate_action::action_
protected

Definition at line 69 of file candidates.hpp.

Referenced by get_action().

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

Definition at line 66 of file candidates.hpp.

Referenced by get_name().

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

Definition at line 67 of file candidates.hpp.

Referenced by get_type().


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