Public Member Functions | |
lua_callable (lua_State *L, int i) | |
variant | get_value (const std::string &key) const |
void | get_inputs (std::vector< formula_input > *inputs) const |
int | do_compare (const formula_callable *other) const |
![]() | |
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 |
void | serialize (std::string &str) const |
bool | has_key (const std::string &key) const |
![]() | |
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 |
Private Attributes | |
lua_State * | mState |
int | table_i |
Additional Inherited Members | |
![]() | |
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 } |
![]() | |
virtual | ~formula_callable () |
virtual void | set_value (const std::string &key, const variant &value) |
virtual void | serialize_to_string (std::string &) const |
![]() | |
void | turn_reference_counting_off () const |
![]() | |
TYPE | type_ |
Definition at line 35 of file lua_formula_bridge.cpp.
Definition at line 39 of file lua_formula_bridge.cpp.
|
inlinevirtual |
Reimplemented from game_logic::formula_callable.
Definition at line 78 of file lua_formula_bridge.cpp.
References game_logic::formula_callable::do_compare(), lua_compare(), lua_getfield(), lua_getmetatable(), lua_gettop(), lua_isnoneornil, LUA_OPEQ, LUA_OPLT, lua_settop(), lua_topointer(), mState, and table_i.
|
inlinevirtual |
Reimplemented from game_logic::formula_callable.
Definition at line 66 of file lua_formula_bridge.cpp.
References game_logic::FORMULA_READ_ONLY, game_logic::formula::id_chars, lua_isnumber(), lua_isstring(), lua_next(), lua_pop, lua_pushnil(), and lua_tostring.
|
inlinevirtual |
Implements game_logic::formula_callable.
Definition at line 40 of file lua_formula_bridge.cpp.
References i, lua_gettable(), lua_next(), lua_pop, lua_pushinteger(), lua_pushlstring(), lua_pushnil(), lua_rawlen(), and luaW_tofaivariant().
|
private |
Definition at line 36 of file lua_formula_bridge.cpp.
Referenced by do_compare().
|
private |
Definition at line 37 of file lua_formula_bridge.cpp.
Referenced by do_compare().