#include <callable.hpp>
Public Member Functions | |
formula_callable (bool has_self=true) | |
variant | query_value (const std::string &key) const |
void | mutate_value (const std::string &key, const variant &value) |
std::vector< formula_input > | inputs () const |
bool | equals (const formula_callable *other) const |
bool | less (const formula_callable *other) const |
virtual void | get_inputs (std::vector< formula_input > *) const |
void | serialize (std::string &str) const |
bool | has_key (const std::string &key) const |
Public Member Functions inherited from reference_counted_object | |
reference_counted_object () | |
reference_counted_object (const reference_counted_object &) | |
reference_counted_object & | operator= (const reference_counted_object &) |
virtual | ~reference_counted_object () |
void | add_ref () const |
void | dec_ref () const |
int | refcount () const |
Protected Types | |
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 | |
virtual | ~formula_callable () |
virtual void | set_value (const std::string &key, const variant &value) |
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 | |
TYPE | type_ |
Private Member Functions | |
virtual variant | get_value (const std::string &key) const =0 |
Private Attributes | |
bool | has_self_ |
Definition at line 34 of file callable.hpp.
|
protected |
Enumerator | |
---|---|
FORMULA_C | |
TERRAIN_C | |
LOCATION_C | |
UNIT_TYPE_C | |
UNIT_C | |
ATTACK_TYPE_C | |
MOVE_PARTIAL_C | |
MOVE_C | |
ATTACK_C | |
MOVE_MAP_C |
Definition at line 96 of file callable.hpp.
|
inlineexplicit |
Definition at line 36 of file callable.hpp.
|
inlineprotectedvirtual |
Definition at line 75 of file callable.hpp.
|
inlineprotectedvirtual |
Reimplemented in game_logic::move_partial_callable, location_callable, game_logic::move_callable, lua_callable, and game_logic::attack_callable.
Definition at line 78 of file callable.hpp.
References type_.
Referenced by game_logic::attack_callable::do_compare(), lua_callable::do_compare(), game_logic::move_callable::do_compare(), game_logic::move_partial_callable::do_compare(), equals(), and less().
|
inline |
Definition at line 56 of file callable.hpp.
References do_compare().
Referenced by variant::operator==().
|
inlinevirtual |
Reimplemented in game_logic::outcome_callable, game_logic::position_callable, game_logic::move_map_callable, game_logic::safe_call_result, game_logic::safe_call_callable, config_callable, game_logic::set_unit_var_callable, unit_type_callable, game_logic::map_formula_callable, game_logic::set_var_callable, unit_callable, ai::formula_ai, game_logic::recruit_callable, game_logic::formula_variant_callable_with_backup, attack_type_callable, game_logic::recall_callable, game_logic::formula_callable_with_backup, game_logic::move_partial_callable, location_callable, ai::attack_analysis, game_logic::move_callable, game_logic::key_value_pair, terrain_callable, lua_callable, game_logic::attack_callable, and game_logic::attack_map_callable.
Definition at line 64 of file callable.hpp.
Referenced by game_logic::formula_callable_with_backup::get_inputs(), game_logic::formula_variant_callable_with_backup::get_inputs(), game_logic::map_formula_callable::get_inputs(), inputs(), and luaW_pushfaivariant().
|
privatepure virtual |
Implemented in game_logic::outcome_callable, game_logic::position_callable, game_logic::move_map_callable, game_logic::safe_call_result, game_logic::safe_call_callable, game_logic::fallback_callable, config_callable, game_logic::set_unit_var_callable, unit_type_callable, game_logic::map_formula_callable, game_logic::set_var_callable, unit_callable, ai::formula_ai, game_logic::recruit_callable, game_logic::formula_variant_callable_with_backup, attack_type_callable, game_logic::recall_callable, game_logic::formula_callable_with_backup, location_callable, game_logic::move_partial_callable, ai::attack_analysis, game_logic::key_value_pair, terrain_callable, game_logic::move_callable, game_logic::attack_callable, game_logic::attack_map_callable, lua_callable, mock_party, and mock_char.
Referenced by query_value().
|
inline |
Definition at line 71 of file callable.hpp.
References variant::is_null(), and query_value().
|
inline |
Definition at line 50 of file callable.hpp.
References get_inputs().
Referenced by ai::formula_ai::on_create(), and variant::to_debug_string().
|
inline |
Definition at line 60 of file callable.hpp.
References do_compare().
Referenced by variant::operator<=().
|
inline |
Definition at line 46 of file callable.hpp.
References set_value().
|
inline |
Definition at line 39 of file callable.hpp.
References get_value(), and has_self_.
Referenced by variant::get_member(), game_logic::formula_callable_with_backup::get_value(), game_logic::formula_variant_callable_with_backup::get_value(), game_logic::map_formula_callable::get_value(), has_key(), luaW_pushfaivariant(), and variant::to_debug_string().
|
inline |
Definition at line 67 of file callable.hpp.
References serialize_to_string().
Referenced by variant::serialize_to_string().
|
inlineprotectedvirtual |
Reimplemented in location_callable, and game_logic::key_value_pair.
Definition at line 89 of file callable.hpp.
Referenced by serialize().
|
protectedvirtual |
Reimplemented in game_logic::map_formula_callable.
Definition at line 29 of file formula.cpp.
Referenced by mutate_value().
|
private |
Definition at line 102 of file callable.hpp.
Referenced by query_value().
|
protected |
Definition at line 99 of file callable.hpp.
Referenced by game_logic::attack_callable::attack_callable(), attack_type_callable::attack_type_callable(), do_compare(), game_logic::move_callable::move_callable(), game_logic::move_map_callable::move_map_callable(), game_logic::move_partial_callable::move_partial_callable(), terrain_callable::terrain_callable(), unit_callable::unit_callable(), and unit_type_callable::unit_type_callable().