51 const ParameterInfo& psInfo,
53 int offsetToFirstParam = 0);
63 int index,
bool bIsVector)
69 const std::vector<T>& vec = ps.
to<std::vector<T> >(index);
70 lua_createtable(L, vec.size(), 0);
71 int newTable = lua_gettop(L);
72 for(
int i=0; i < (int)vec.size(); i++) {
74 lua_rawseti(L, newTable, i + 1);
81 int index,
bool bIsVector)
89 lua_createtable(L, spVec->size(), 0);
90 int newTable = lua_gettop(L);
91 for(
int i=0; i < (int)spVec->size(); i++) {
93 lua_rawseti(L, newTable, i + 1);
100 int index,
bool bIsVector)
109 if (lua_istable(L, index)){
113 while (lua_next(L, index) != 0) {
116 while (lua_next(L, index) != 0) lua_pop(L, 1);
129 template <
typename T>
131 int index,
const char* baseClassName,
134 typedef std::pair<T, const ClassNameNode*> result_type;
139 ps.
push(res.first, res.second);
144 if (lua_istable(L, index)){
148 while (lua_next(L, index) != 0) {
151 while (lua_next(L, index) != 0) lua_pop(L, 1);
154 spVec->push_back(res);
Definition: smart_pointer.h:108
const char * class_name(int index) const
returns the class name for an element in the param stack
Definition: parameter_stack.h:123
A stack that can hold values together with their type-id.
Definition: parameter_stack.h:270
T to(int index) const
return element in param stack casted to type
Definition: parameter_stack.h:481
void push(void *ptr, const ClassNameNode *classNameNode)
Definition: parameter_stack.h:367
struct lua_State lua_State
Definition: lua_table_handle.h:40
int ParamsToLuaStack(const ParameterStack &ps, lua_State *L)
Pushes the parameter-values to the Lua-Stack.
Definition: lua_stack.cpp:169
static bool PushLuaStackPointerEntryToParamStack(ParameterStack &ps, lua_State *L, int index, const char *baseClassName, bool bIsVector)
Definition: lua_stack.h:130
int LuaStackToParams(ParameterStack &ps, const ParameterInfo &psInfo, lua_State *L, int offsetToFirstParam)
copies parameter values from the lua-stack to a parameter-list.
Definition: lua_stack.cpp:53
static void ParamStackPointerEntryToLuaStack(const ParameterStack &ps, lua_State *L, int index, bool bIsVector)
Definition: lua_stack.h:80
static void ParamStackEntryToLuaStack(const ParameterStack &ps, lua_State *L, int index, bool bIsVector)
Definition: lua_stack.h:62
static bool PushLuaStackEntryToParamStack(ParameterStack &ps, lua_State *L, int index, bool bIsVector)
Definition: lua_stack.h:99
Definition: lua_parsing.h:51