#include <callable_objects.hpp>


Public Types | |
| typedef map_location | location |
Public Member Functions | |
| unit_callable (const std::pair< location, unit > &pair) | |
| unit_callable (const unit &u) | |
| const unit & | get_unit () const |
| const location & | get_location () const |
| variant | get_value (const std::string &key) const |
| void | get_inputs (std::vector< game_logic::formula_input > *inputs) const |
| int | do_compare (const formula_callable *callable) const |
Private Attributes | |
| const location & | loc_ |
| const unit & | u_ |
Definition at line 144 of file callable_objects.hpp.
| typedef map_location unit_callable::location |
Definition at line 146 of file callable_objects.hpp.
Definition at line 147 of file callable_objects.hpp.
References game_logic::formula_callable::type_.
| unit_callable::unit_callable | ( | const unit & | u | ) | [inline] |
Definition at line 153 of file callable_objects.hpp.
References game_logic::formula_callable::type_.
| int unit_callable::do_compare | ( | const formula_callable * | callable | ) | const |
Definition at line 270 of file callable_objects.cpp.
References u_, and unit::underlying_id().

| void unit_callable::get_inputs | ( | std::vector< game_logic::formula_input > * | inputs | ) | const [virtual] |
Reimplemented from game_logic::formula_callable.
Definition at line 241 of file callable_objects.cpp.
References game_logic::FORMULA_READ_ONLY.
| const location& unit_callable::get_location | ( | ) | const [inline] |
Definition at line 160 of file callable_objects.hpp.
References loc_.
Referenced by game_logic::attack_candidate_action::evaluate().

| const unit& unit_callable::get_unit | ( | ) | const [inline] |
Definition at line 159 of file callable_objects.hpp.
References u_.
| variant unit_callable::get_value | ( | const std::string & | key | ) | const [virtual] |
Implements game_logic::formula_callable.
Definition at line 143 of file callable_objects.cpp.
References unit::attacks(), unit::attacks_left(), unit::can_recruit(), convert_map(), unit::cost(), unit::experience(), unit::formula_vars(), unit::get_ability_list(), unit::get_state(), unit::get_states(), unit::get_traits_list(), unit::hitpoints(), unit::id(), unit::level(), loc_, unit::max_experience(), unit::max_hitpoints(), unit::movement_left(), unit::name(), map_location::null_location, unit::side(), unit::total_movement(), unit::type_id(), u_, unit::usage(), map_location::x, and map_location::y.

const location& unit_callable::loc_ [private] |
Definition at line 166 of file callable_objects.hpp.
Referenced by get_location(), and get_value().
const unit& unit_callable::u_ [private] |
Definition at line 167 of file callable_objects.hpp.
Referenced by do_compare(), get_unit(), and get_value().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:17:29 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |