#include "scripting/lua_formula_bridge.hpp"
#include "boost/variant/static_visitor.hpp"
#include "game_board.hpp"
#include "scripting/game_lua_kernel.hpp"
#include "scripting/lua_unit.hpp"
#include "scripting/lua_common.hpp"
#include "lua/lauxlib.h"
#include "lua/lua.h"
#include "formula/callable_objects.hpp"
#include "formula/formula.hpp"
#include "variable.hpp"
#include "resources.hpp"
#include "units/map.hpp"
#include "units/unit.hpp"
Go to the source code of this file.
Classes | |
class | lua_callable |
Functions | |
void | luaW_pushfaivariant (lua_State *L, variant val) |
variant | luaW_tofaivariant (lua_State *L, int i) |
static int | impl_formula_collect (lua_State *L) |
static int | impl_formula_tostring (lua_State *L) |
Variables | |
static const char | formulaKey [] = "formula" |
|
static |
Definition at line 268 of file lua_formula_bridge.cpp.
References lua_touserdata().
Referenced by lua_formula_bridge::register_metatables().
|
static |
Definition at line 275 of file lua_formula_bridge.cpp.
References lua_pushlstring(), lua_touserdata(), and lua_formula_bridge::fwrapper::str().
Referenced by lua_formula_bridge::register_metatables().
Definition at line 122 of file lua_formula_bridge.cpp.
References wfl::variant::as_callable(), wfl::variant::as_decimal(), wfl::variant::as_int(), wfl::variant::as_list(), wfl::variant::as_map(), wfl::variant::as_string(), unit_map::find(), wfl::FORMULA_WRITE_ONLY, resources::gameboard, unit::get_location(), wfl::variant::is_callable(), wfl::variant::is_decimal(), wfl::variant::is_int(), wfl::variant::is_list(), wfl::variant::is_map(), wfl::variant::is_null(), wfl::variant::is_string(), lua_newtable, lua_pushinteger(), lua_pushlstring(), lua_pushnil(), lua_pushnumber(), lua_pushstring(), lua_rawlen(), lua_settable(), luaW_pushlocation(), luaW_pushunit(), unit::side(), wfl::variant::try_convert(), unit::underlying_id(), and game_board::units().
Referenced by lua_formula_bridge::intf_eval_formula().
Definition at line 177 of file lua_formula_bridge.cpp.
References wfl::variant::DECIMAL_VARIANT, vconfig::get_parsed_config(), LUA_TBOOLEAN, LUA_TNUMBER, lua_tointeger, lua_tonumber, lua_tostring, LUA_TSTRING, LUA_TTABLE, LUA_TUSERDATA, lua_type(), luaW_tolocation(), luaW_totstring(), luaW_tounit(), luaW_tovconfig(), t_string::str(), and vconfig::unconstructed_vconfig().
Referenced by lua_callable::get_value().
|
static |
Definition at line 32 of file lua_formula_bridge.cpp.
Referenced by lua_formula_bridge::intf_compile_formula(), lua_formula_bridge::intf_eval_formula(), and lua_formula_bridge::register_metatables().