Public Member Functions | Protected Member Functions | Protected Attributes

game_logic::base_candidate_action Class Reference

#include <candidates.hpp>

Inheritance diagram for game_logic::base_candidate_action:
Inheritance graph
[legend]
Collaboration diagram for game_logic::base_candidate_action:
Collaboration graph
[legend]

List of all members.

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::string & get_name () const
const std::string & get_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 43 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 83 of file candidates.cpp.

virtual game_logic::base_candidate_action::~base_candidate_action (  )  [inline, virtual]

Definition at line 47 of file candidates.hpp.


Member Function Documentation

virtual void game_logic::base_candidate_action::evaluate ( ai::formula_ai ,
unit_map  
) [inline, virtual]

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

Definition at line 50 of file candidates.hpp.

Referenced by game_logic::candidate_action_with_filters::do_filtering(), and execute_formula().

Here is the caller graph for this function:

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]

Definition at line 93 of file candidates.cpp.

References ERR_AI, evaluate(), ai::formula_ai::handle_exception(), and game::error::message.

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

Here is the call graph for this function:

Here is the caller graph for this function:

const_formula_ptr& game_logic::base_candidate_action::get_action (  )  [inline]

Definition at line 59 of file candidates.hpp.

References action_.

const std::string& game_logic::base_candidate_action::get_name (  )  const [inline]

Definition at line 61 of file candidates.hpp.

References name_.

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

Here is the caller graph for this function:

int game_logic::base_candidate_action::get_score (  )  const [inline]

Definition at line 57 of file candidates.hpp.

References score_.

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

Definition at line 62 of file candidates.hpp.

References type_.

virtual void game_logic::base_candidate_action::update_callable_map ( game_logic::map_formula_callable  )  [inline, virtual]

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

Definition at line 53 of file candidates.hpp.


Member Data Documentation

Definition at line 71 of file candidates.hpp.

Referenced by get_action().

Definition at line 68 of file candidates.hpp.

Referenced by get_name().

Definition at line 69 of file candidates.hpp.

Referenced by get_type().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:20:49 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs