Proxy class for calling AI action handlers defined in Lua. More...
#include <core.hpp>
Public Member Functions | |
~lua_ai_action_handler () | |
void | handle (const config &cfg, bool read_only, lua_object_ptr l_obj) |
Private Member Functions | |
lua_ai_action_handler (lua_State *l, lua_ai_context &context, int num) | |
Static Private Member Functions | |
static lua_ai_action_handler * | create (lua_State *L, char const *code, lua_ai_context &context) |
Private Attributes | |
lua_State * | L |
lua_ai_context & | context_ |
int | num_ |
Friends | |
class | ::game_lua_kernel |
|
inlineprivate |
ai::lua_ai_action_handler::~lua_ai_action_handler | ( | ) |
Definition at line 1134 of file core.cpp.
References aisKey, lua_pop, lua_pushlightuserdata(), lua_pushnil(), lua_rawget(), lua_rawseti(), LUA_REGISTRYINDEX, and num_.
|
staticprivate |
Definition at line 1022 of file core.cpp.
References aisKey, ERR_LUA, lua_ai_action_handler(), lua_pop, lua_pushlightuserdata(), lua_pushvalue(), lua_rawget(), lua_rawlen(), lua_rawseti(), LUA_REGISTRYINDEX, lua_remove(), lua_tostring, and luaL_loadstring().
Referenced by game_lua_kernel::create_lua_ai_action_handler().
void ai::lua_ai_action_handler::handle | ( | const config & | cfg, |
bool | read_only, | ||
lua_object_ptr | l_obj | ||
) |
Definition at line 1106 of file core.cpp.
References aisKey, context_, lua_absindex(), lua_getfield(), lua_gettop(), lua_pushlightuserdata(), lua_rawget(), lua_rawgeti(), LUA_REGISTRYINDEX, lua_remove(), lua_settop(), luaW_pcall(), luaW_pushconfig(), and num_.
|
friend |
|
private |
|
private |
Definition at line 76 of file core.hpp.
Referenced by handle(), and ~lua_ai_action_handler().