#include <string>#include <vector>#include "irrlichttypes.h"#include "util/basic_macros.h"#include <lua.h>
Include dependency graph for c_packer.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | PackedInstr |
| Represents a single instruction that pushes a new value or operates with existing ones. More... | |
| struct | PackedValue |
| A packed value can be a primitive like a string or number but also a table including all of its contents. More... | |
Macros | |
| #define | INSTR_SETTABLE (-10) |
| #define | INSTR_POP (-11) |
| #define | INSTR_PUSHREF (-12) |
| #define | INSTR_SETMETATABLE (-13) |
Typedefs | |
| typedef void *(* | PackInFunc) (lua_State *L, int idx) |
| typedef void(* | PackOutFunc) (lua_State *L, void *ptr) |
Functions | |
| void | script_register_packer (lua_State *L, const char *regname, PackInFunc fin, PackOutFunc fout) |
| PackedValue * | script_pack (lua_State *L, int idx) |
| void | script_unpack (lua_State *L, PackedValue *val) |
| void | script_dump_packed (const PackedValue *val) |
| #define INSTR_POP (-11) |
Referenced by emplace(), pack_inner(), script_dump_packed(), and script_unpack().
| #define INSTR_PUSHREF (-12) |
Referenced by record_object(), script_dump_packed(), and script_unpack().
| #define INSTR_SETMETATABLE (-13) |
Referenced by pack_inner(), script_dump_packed(), and script_unpack().
| #define INSTR_SETTABLE (-10) |
Referenced by pack_inner(), script_dump_packed(), and script_unpack().
| typedef void *(* PackInFunc) (lua_State *L, int idx) |
| typedef void(* PackOutFunc) (lua_State *L, void *ptr) |
| void script_dump_packed | ( | const PackedValue * | val | ) |
References FATAL_ERROR, PackedValue::i, INSTR_POP, INSTR_PUSHREF, INSTR_SETMETATABLE, INSTR_SETTABLE, and uses_sdata().
Referenced by ModApiServer::l_serialize_roundtrip().
Here is the call graph for this function:
Here is the caller graph for this function:| PackedValue * script_pack | ( | lua_State * | L, |
| int | idx ) |
References absidx(), idx, and pack_inner().
Referenced by ModApiServer::l_do_async_callback(), ModApiServer::l_serialize_roundtrip(), read_pv(), AsyncWorkerThread::run(), and ServerScripting::saveGlobals().
Here is the call graph for this function:
Here is the caller graph for this function:| void script_register_packer | ( | lua_State * | L, |
| const char * | regname, | ||
| PackInFunc | fin, | ||
| PackOutFunc | fout ) |
References CUSTOM_RIDX_METATABLE_MAP, FATAL_ERROR_IF, g_packers, and g_packers_lock.
Referenced by LuaItemStack::Register(), LuaPerlinNoise::Register(), LuaPerlinNoiseMap::Register(), and LuaVoxelManip::Register().
Here is the caller graph for this function:| void script_unpack | ( | lua_State * | L, |
| PackedValue * | val ) |
References PackedValue::contains_userdata, find_packer(), get_known_lua_metatables(), PackedValue::i, INSTR_POP, INSTR_PUSHREF, INSTR_SETMETATABLE, INSTR_SETTABLE, sanity_check, and uses_sdata().
Referenced by EmergeScripting::EmergeScripting(), ServerScripting::InitializeAsync(), ModApiIPC::l_ipc_cas(), ModApiIPC::l_ipc_get(), ModApiServer::l_serialize_roundtrip(), AsyncWorkerThread::run(), and AsyncEngine::stepJobResults().
Here is the call graph for this function:
Here is the caller graph for this function: