#include <callable.hpp>
Public Types | |
typedef std::map< std::string, variant >::const_iterator | const_iterator |
Private Member Functions | |
variant | get_value (const std::string &key) const |
void | get_inputs (std::vector< formula_input > *inputs) const |
void | set_value (const std::string &key, const variant &value) |
Private Attributes | |
std::map< std::string, variant > | values_ |
const formula_callable * | fallback_ |
Additional Inherited Members | |
Protected Types inherited from game_logic::formula_callable | |
enum | TYPE { FORMULA_C, TERRAIN_C, LOCATION_C, UNIT_TYPE_C, UNIT_C, ATTACK_TYPE_C, MOVE_PARTIAL_C, MOVE_C, ATTACK_C, MOVE_MAP_C } |
Protected Member Functions inherited from game_logic::formula_callable | |
virtual | ~formula_callable () |
virtual int | do_compare (const formula_callable *callable) const |
virtual void | serialize_to_string (std::string &) const |
Protected Member Functions inherited from reference_counted_object | |
void | turn_reference_counting_off () const |
Protected Attributes inherited from game_logic::formula_callable | |
TYPE | type_ |
Definition at line 155 of file callable.hpp.
typedef std::map<std::string,variant>::const_iterator game_logic::map_formula_callable::const_iterator |
Definition at line 163 of file callable.hpp.
|
explicit |
Definition at line 35 of file formula.cpp.
map_formula_callable & game_logic::map_formula_callable::add | ( | const std::string & | key, |
const variant & | value | ||
) |
Definition at line 41 of file formula.cpp.
References values_.
Referenced by BOOST_AUTO_TEST_CASE(), game_logic::candidate_action_with_filters::do_filtering(), ai::stage_unit_formulas::do_play_stage(), gui2::tcanvas::draw(), game_logic::move_candidate_action::evaluate(), game_logic::attack_candidate_action::evaluate(), game_logic::formula_function_expression::execute(), ai::formula_ai::execute_variant(), gui2::get_screen_size_variables(), ai::attack_analysis::get_value(), basic_unit_filter_impl::internal_matches_filter(), gui2::twindow::layout(), ai::formula_ai::on_create(), gui2::tcanvas::set_variable(), gui2::twindow::set_variable(), game_logic::move_candidate_action::update_callable_map(), game_logic::attack_candidate_action::update_callable_map(), and gui2::ttext_box::update_offsets().
|
inline |
Definition at line 165 of file callable.hpp.
References values_.
Referenced by ai::formula_ai::to_config().
|
inline |
Definition at line 161 of file callable.hpp.
References values_.
|
inline |
Definition at line 160 of file callable.hpp.
References values_.
Referenced by ai::formula_ai::to_config().
|
inline |
Definition at line 166 of file callable.hpp.
References values_.
Referenced by ai::formula_ai::to_config().
|
privatevirtual |
Reimplemented from game_logic::formula_callable.
Definition at line 60 of file formula.cpp.
References fallback_, game_logic::FORMULA_READ_WRITE, game_logic::formula_callable::get_inputs(), i, and values_.
|
privatevirtual |
Implements game_logic::formula_callable.
Definition at line 48 of file formula.cpp.
References fallback_, game_logic::formula_callable::query_value(), and values_.
|
inline |
Definition at line 159 of file callable.hpp.
References fallback_.
Referenced by game_logic::formula_function_expression::execute().
|
privatevirtual |
Reimplemented from game_logic::formula_callable.
Definition at line 70 of file formula.cpp.
References values_.
|
private |
Definition at line 173 of file callable.hpp.
Referenced by get_inputs(), get_value(), and set_fallback().
|
private |
Definition at line 172 of file callable.hpp.
Referenced by add(), begin(), clear(), empty(), end(), get_inputs(), get_value(), and set_value().