static int lua_cocos2dx_LayoutParameter_getMargin(lua_State* L) { if (nullptr == L) return 0; int argc = 0; LayoutParameter* self = nullptr; #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; if (!tolua_isusertype(L,1,"ccui.LayoutParameter",0,&tolua_err)) goto tolua_lerror; #endif self = static_cast<LayoutParameter*>(tolua_tousertype(L,1,0)); #if COCOS2D_DEBUG >= 1 if (nullptr == self) { tolua_error(L,"invalid 'self' in function 'lua_cocos2dx_LayoutParameter_getMargin'\n", NULL); return 0; } #endif argc = lua_gettop(L) - 1; if (0 == argc) { Margin margin = self->getMargin(); lua_newtable(L); lua_pushstring(L, "left"); lua_pushnumber(L, (lua_Number) margin.left); lua_rawset(L, -3); lua_pushstring(L, "top"); lua_pushnumber(L, (lua_Number) margin.top); lua_rawset(L, -3); lua_pushstring(L, "right"); lua_pushnumber(L, (lua_Number) margin.right); lua_rawset(L, -3); lua_pushstring(L, "bottom"); lua_pushnumber(L, (lua_Number) margin.bottom); lua_rawset(L, -3); return 1; } CCLOG("'getMargin' function of LayoutParameter has wrong number of arguments: %d, was expecting %d\n", argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: tolua_error(L,"#ferror in function 'getMargin'.",&tolua_err); return 0; #endif }
static int tolua_Cocos2dx_LayoutParameter_getMargin00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"LayoutParameter",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { LayoutParameter* self = (LayoutParameter*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE if (!self) tolua_error(tolua_S,"invalid 'self' in function 'getMargin'", NULL); #endif Margin margin = self->getMargin(); lua_newtable(tolua_S); lua_pushstring(tolua_S, "left"); lua_pushnumber(tolua_S, (lua_Number) margin.left); lua_rawset(tolua_S, -3); lua_pushstring(tolua_S, "top"); lua_pushnumber(tolua_S, (lua_Number) margin.top); lua_rawset(tolua_S, -3); lua_pushstring(tolua_S, "right"); lua_pushnumber(tolua_S, (lua_Number) margin.right); lua_rawset(tolua_S, -3); lua_pushstring(tolua_S, "bottom"); lua_pushnumber(tolua_S, (lua_Number) margin.bottom); lua_rawset(tolua_S, -3); return 1; } return 0; #ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function 'getMargin'.",&tolua_err); return 0; #endif }