axmol/extensions/scripting/lua-bindings/auto/axlua_csloader_auto.cpp

760 lines
21 KiB
C++
Raw Normal View History

2022-08-08 18:02:17 +08:00
#include "scripting/lua-bindings/auto/axlua_csloader_auto.hpp"
#include "cocostudio/ActionTimeline/CSLoader.h"
2019-11-23 20:27:39 +08:00
#include "scripting/lua-bindings/manual/tolua_fix.h"
#include "scripting/lua-bindings/manual/LuaBasicConversions.h"
int lua_ax_csloader_CSLoader_createNodeFromJson(lua_State* tolua_S)
2019-11-23 20:27:39 +08:00
{
int argc = 0;
ax::CSLoader* cobj = nullptr;
2019-11-23 20:27:39 +08:00
bool ok = true;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_Error tolua_err;
#endif
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2022-07-12 21:31:54 +08:00
if (!tolua_isusertype(tolua_S,1,"ax.CSLoader",0,&tolua_err)) goto tolua_lerror;
2019-11-23 20:27:39 +08:00
#endif
cobj = (ax::CSLoader*)tolua_tousertype(tolua_S,1,0);
2019-11-23 20:27:39 +08:00
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_ax_csloader_CSLoader_createNodeFromJson'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
std::string_view arg0;
2019-11-23 20:27:39 +08:00
2022-07-12 21:31:54 +08:00
ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "ax.CSLoader:createNodeFromJson");
2019-11-23 20:27:39 +08:00
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_csloader_CSLoader_createNodeFromJson'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
auto&& ret = cobj->createNodeFromJson(arg0);
object_to_luaval<ax::Node>(tolua_S, "ax.Node",(ax::Node*)ret);
2019-11-23 20:27:39 +08:00
return 1;
}
2022-07-12 21:31:54 +08:00
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ax.CSLoader:createNodeFromJson",argc, 1);
2019-11-23 20:27:39 +08:00
return 0;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_ax_csloader_CSLoader_createNodeFromJson'.",&tolua_err);
2019-11-23 20:27:39 +08:00
#endif
return 0;
}
int lua_ax_csloader_CSLoader_createNodeWithFlatBuffersFile(lua_State* tolua_S)
2019-11-23 20:27:39 +08:00
{
int argc = 0;
ax::CSLoader* cobj = nullptr;
2019-11-23 20:27:39 +08:00
bool ok = true;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_Error tolua_err;
#endif
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2022-07-12 21:31:54 +08:00
if (!tolua_isusertype(tolua_S,1,"ax.CSLoader",0,&tolua_err)) goto tolua_lerror;
2019-11-23 20:27:39 +08:00
#endif
cobj = (ax::CSLoader*)tolua_tousertype(tolua_S,1,0);
2019-11-23 20:27:39 +08:00
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_ax_csloader_CSLoader_createNodeWithFlatBuffersFile'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
std::string_view arg0;
2019-11-23 20:27:39 +08:00
2022-07-12 21:31:54 +08:00
ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "ax.CSLoader:createNodeWithFlatBuffersFile");
2019-11-23 20:27:39 +08:00
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_csloader_CSLoader_createNodeWithFlatBuffersFile'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
auto&& ret = cobj->createNodeWithFlatBuffersFile(arg0);
object_to_luaval<ax::Node>(tolua_S, "ax.Node",(ax::Node*)ret);
2019-11-23 20:27:39 +08:00
return 1;
}
2022-07-12 21:31:54 +08:00
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ax.CSLoader:createNodeWithFlatBuffersFile",argc, 1);
2019-11-23 20:27:39 +08:00
return 0;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_ax_csloader_CSLoader_createNodeWithFlatBuffersFile'.",&tolua_err);
2019-11-23 20:27:39 +08:00
#endif
return 0;
}
int lua_ax_csloader_CSLoader_loadNodeWithFile(lua_State* tolua_S)
2019-11-23 20:27:39 +08:00
{
int argc = 0;
ax::CSLoader* cobj = nullptr;
2019-11-23 20:27:39 +08:00
bool ok = true;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_Error tolua_err;
#endif
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2022-07-12 21:31:54 +08:00
if (!tolua_isusertype(tolua_S,1,"ax.CSLoader",0,&tolua_err)) goto tolua_lerror;
2019-11-23 20:27:39 +08:00
#endif
cobj = (ax::CSLoader*)tolua_tousertype(tolua_S,1,0);
2019-11-23 20:27:39 +08:00
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_ax_csloader_CSLoader_loadNodeWithFile'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
std::string_view arg0;
2019-11-23 20:27:39 +08:00
2022-07-12 21:31:54 +08:00
ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "ax.CSLoader:loadNodeWithFile");
2019-11-23 20:27:39 +08:00
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_csloader_CSLoader_loadNodeWithFile'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
auto&& ret = cobj->loadNodeWithFile(arg0);
object_to_luaval<ax::Node>(tolua_S, "ax.Node",(ax::Node*)ret);
2019-11-23 20:27:39 +08:00
return 1;
}
2022-07-12 21:31:54 +08:00
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ax.CSLoader:loadNodeWithFile",argc, 1);
2019-11-23 20:27:39 +08:00
return 0;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_ax_csloader_CSLoader_loadNodeWithFile'.",&tolua_err);
2019-11-23 20:27:39 +08:00
#endif
return 0;
}
int lua_ax_csloader_CSLoader_bindCallback(lua_State* tolua_S)
2019-11-23 20:27:39 +08:00
{
int argc = 0;
ax::CSLoader* cobj = nullptr;
2019-11-23 20:27:39 +08:00
bool ok = true;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_Error tolua_err;
#endif
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2022-07-12 21:31:54 +08:00
if (!tolua_isusertype(tolua_S,1,"ax.CSLoader",0,&tolua_err)) goto tolua_lerror;
2019-11-23 20:27:39 +08:00
#endif
cobj = (ax::CSLoader*)tolua_tousertype(tolua_S,1,0);
2019-11-23 20:27:39 +08:00
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_ax_csloader_CSLoader_bindCallback'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 4)
{
std::string_view arg0;
std::string_view arg1;
ax::ui::Widget* arg2;
ax::Node* arg3;
2019-11-23 20:27:39 +08:00
2022-07-12 21:31:54 +08:00
ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "ax.CSLoader:bindCallback");
2019-11-23 20:27:39 +08:00
2022-07-12 21:31:54 +08:00
ok &= luaval_to_std_string_view(tolua_S, 3,&arg1, "ax.CSLoader:bindCallback");
2019-11-23 20:27:39 +08:00
ok &= luaval_to_object<ax::ui::Widget>(tolua_S, 4, "axui.Widget",&arg2, "ax.CSLoader:bindCallback");
2019-11-23 20:27:39 +08:00
ok &= luaval_to_object<ax::Node>(tolua_S, 5, "ax.Node",&arg3, "ax.CSLoader:bindCallback");
2019-11-23 20:27:39 +08:00
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_csloader_CSLoader_bindCallback'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
auto&& ret = cobj->bindCallback(arg0, arg1, arg2, arg3);
2019-11-23 20:27:39 +08:00
tolua_pushboolean(tolua_S,(bool)ret);
return 1;
}
2022-07-12 21:31:54 +08:00
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ax.CSLoader:bindCallback",argc, 4);
2019-11-23 20:27:39 +08:00
return 0;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_ax_csloader_CSLoader_bindCallback'.",&tolua_err);
2019-11-23 20:27:39 +08:00
#endif
return 0;
}
int lua_ax_csloader_CSLoader_setJsonPath(lua_State* tolua_S)
2019-11-23 20:27:39 +08:00
{
int argc = 0;
ax::CSLoader* cobj = nullptr;
2019-11-23 20:27:39 +08:00
bool ok = true;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_Error tolua_err;
#endif
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2022-07-12 21:31:54 +08:00
if (!tolua_isusertype(tolua_S,1,"ax.CSLoader",0,&tolua_err)) goto tolua_lerror;
2019-11-23 20:27:39 +08:00
#endif
cobj = (ax::CSLoader*)tolua_tousertype(tolua_S,1,0);
2019-11-23 20:27:39 +08:00
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_ax_csloader_CSLoader_setJsonPath'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
std::string arg0;
2022-07-12 21:31:54 +08:00
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ax.CSLoader:setJsonPath");
2019-11-23 20:27:39 +08:00
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_csloader_CSLoader_setJsonPath'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
cobj->setJsonPath(arg0);
lua_settop(tolua_S, 1);
return 1;
}
2022-07-12 21:31:54 +08:00
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ax.CSLoader:setJsonPath",argc, 1);
2019-11-23 20:27:39 +08:00
return 0;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_ax_csloader_CSLoader_setJsonPath'.",&tolua_err);
2019-11-23 20:27:39 +08:00
#endif
return 0;
}
int lua_ax_csloader_CSLoader_init(lua_State* tolua_S)
2019-11-23 20:27:39 +08:00
{
int argc = 0;
ax::CSLoader* cobj = nullptr;
2019-11-23 20:27:39 +08:00
bool ok = true;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_Error tolua_err;
#endif
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2022-07-12 21:31:54 +08:00
if (!tolua_isusertype(tolua_S,1,"ax.CSLoader",0,&tolua_err)) goto tolua_lerror;
2019-11-23 20:27:39 +08:00
#endif
cobj = (ax::CSLoader*)tolua_tousertype(tolua_S,1,0);
2019-11-23 20:27:39 +08:00
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_ax_csloader_CSLoader_init'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_csloader_CSLoader_init'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
cobj->init();
lua_settop(tolua_S, 1);
return 1;
}
2022-07-12 21:31:54 +08:00
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ax.CSLoader:init",argc, 0);
2019-11-23 20:27:39 +08:00
return 0;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_ax_csloader_CSLoader_init'.",&tolua_err);
2019-11-23 20:27:39 +08:00
#endif
return 0;
}
int lua_ax_csloader_CSLoader_loadNodeWithContent(lua_State* tolua_S)
2019-11-23 20:27:39 +08:00
{
int argc = 0;
ax::CSLoader* cobj = nullptr;
2019-11-23 20:27:39 +08:00
bool ok = true;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_Error tolua_err;
#endif
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2022-07-12 21:31:54 +08:00
if (!tolua_isusertype(tolua_S,1,"ax.CSLoader",0,&tolua_err)) goto tolua_lerror;
2019-11-23 20:27:39 +08:00
#endif
cobj = (ax::CSLoader*)tolua_tousertype(tolua_S,1,0);
2019-11-23 20:27:39 +08:00
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_ax_csloader_CSLoader_loadNodeWithContent'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
std::string_view arg0;
2019-11-23 20:27:39 +08:00
2022-07-12 21:31:54 +08:00
ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "ax.CSLoader:loadNodeWithContent");
2019-11-23 20:27:39 +08:00
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_csloader_CSLoader_loadNodeWithContent'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
auto&& ret = cobj->loadNodeWithContent(arg0);
object_to_luaval<ax::Node>(tolua_S, "ax.Node",(ax::Node*)ret);
2019-11-23 20:27:39 +08:00
return 1;
}
2022-07-12 21:31:54 +08:00
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ax.CSLoader:loadNodeWithContent",argc, 1);
2019-11-23 20:27:39 +08:00
return 0;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_ax_csloader_CSLoader_loadNodeWithContent'.",&tolua_err);
2019-11-23 20:27:39 +08:00
#endif
return 0;
}
int lua_ax_csloader_CSLoader_isRecordJsonPath(lua_State* tolua_S)
2019-11-23 20:27:39 +08:00
{
int argc = 0;
ax::CSLoader* cobj = nullptr;
2019-11-23 20:27:39 +08:00
bool ok = true;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_Error tolua_err;
#endif
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2022-07-12 21:31:54 +08:00
if (!tolua_isusertype(tolua_S,1,"ax.CSLoader",0,&tolua_err)) goto tolua_lerror;
2019-11-23 20:27:39 +08:00
#endif
cobj = (ax::CSLoader*)tolua_tousertype(tolua_S,1,0);
2019-11-23 20:27:39 +08:00
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_ax_csloader_CSLoader_isRecordJsonPath'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_csloader_CSLoader_isRecordJsonPath'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
auto&& ret = cobj->isRecordJsonPath();
2019-11-23 20:27:39 +08:00
tolua_pushboolean(tolua_S,(bool)ret);
return 1;
}
2022-07-12 21:31:54 +08:00
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ax.CSLoader:isRecordJsonPath",argc, 0);
2019-11-23 20:27:39 +08:00
return 0;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_ax_csloader_CSLoader_isRecordJsonPath'.",&tolua_err);
2019-11-23 20:27:39 +08:00
#endif
return 0;
}
int lua_ax_csloader_CSLoader_getJsonPath(lua_State* tolua_S)
2019-11-23 20:27:39 +08:00
{
int argc = 0;
ax::CSLoader* cobj = nullptr;
2019-11-23 20:27:39 +08:00
bool ok = true;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_Error tolua_err;
#endif
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2022-07-12 21:31:54 +08:00
if (!tolua_isusertype(tolua_S,1,"ax.CSLoader",0,&tolua_err)) goto tolua_lerror;
2019-11-23 20:27:39 +08:00
#endif
cobj = (ax::CSLoader*)tolua_tousertype(tolua_S,1,0);
2019-11-23 20:27:39 +08:00
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_ax_csloader_CSLoader_getJsonPath'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_csloader_CSLoader_getJsonPath'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
auto&& ret = cobj->getJsonPath();
2019-11-23 20:27:39 +08:00
lua_pushlstring(tolua_S,ret.c_str(),ret.length());
return 1;
}
2022-07-12 21:31:54 +08:00
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ax.CSLoader:getJsonPath",argc, 0);
2019-11-23 20:27:39 +08:00
return 0;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_ax_csloader_CSLoader_getJsonPath'.",&tolua_err);
2019-11-23 20:27:39 +08:00
#endif
return 0;
}
int lua_ax_csloader_CSLoader_setRecordJsonPath(lua_State* tolua_S)
2019-11-23 20:27:39 +08:00
{
int argc = 0;
ax::CSLoader* cobj = nullptr;
2019-11-23 20:27:39 +08:00
bool ok = true;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_Error tolua_err;
#endif
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2022-07-12 21:31:54 +08:00
if (!tolua_isusertype(tolua_S,1,"ax.CSLoader",0,&tolua_err)) goto tolua_lerror;
2019-11-23 20:27:39 +08:00
#endif
cobj = (ax::CSLoader*)tolua_tousertype(tolua_S,1,0);
2019-11-23 20:27:39 +08:00
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_ax_csloader_CSLoader_setRecordJsonPath'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
bool arg0;
2022-07-12 21:31:54 +08:00
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "ax.CSLoader:setRecordJsonPath");
2019-11-23 20:27:39 +08:00
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_csloader_CSLoader_setRecordJsonPath'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
cobj->setRecordJsonPath(arg0);
lua_settop(tolua_S, 1);
return 1;
}
2022-07-12 21:31:54 +08:00
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ax.CSLoader:setRecordJsonPath",argc, 1);
2019-11-23 20:27:39 +08:00
return 0;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_ax_csloader_CSLoader_setRecordJsonPath'.",&tolua_err);
2019-11-23 20:27:39 +08:00
#endif
return 0;
}
int lua_ax_csloader_CSLoader_createNodeWithFlatBuffersForSimulator(lua_State* tolua_S)
2019-11-23 20:27:39 +08:00
{
int argc = 0;
ax::CSLoader* cobj = nullptr;
2019-11-23 20:27:39 +08:00
bool ok = true;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_Error tolua_err;
#endif
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2022-07-12 21:31:54 +08:00
if (!tolua_isusertype(tolua_S,1,"ax.CSLoader",0,&tolua_err)) goto tolua_lerror;
2019-11-23 20:27:39 +08:00
#endif
cobj = (ax::CSLoader*)tolua_tousertype(tolua_S,1,0);
2019-11-23 20:27:39 +08:00
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_ax_csloader_CSLoader_createNodeWithFlatBuffersForSimulator'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
std::string_view arg0;
2019-11-23 20:27:39 +08:00
2022-07-12 21:31:54 +08:00
ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "ax.CSLoader:createNodeWithFlatBuffersForSimulator");
2019-11-23 20:27:39 +08:00
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_csloader_CSLoader_createNodeWithFlatBuffersForSimulator'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
auto&& ret = cobj->createNodeWithFlatBuffersForSimulator(arg0);
object_to_luaval<ax::Node>(tolua_S, "ax.Node",(ax::Node*)ret);
2019-11-23 20:27:39 +08:00
return 1;
}
2022-07-12 21:31:54 +08:00
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ax.CSLoader:createNodeWithFlatBuffersForSimulator",argc, 1);
2019-11-23 20:27:39 +08:00
return 0;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_ax_csloader_CSLoader_createNodeWithFlatBuffersForSimulator'.",&tolua_err);
2019-11-23 20:27:39 +08:00
#endif
return 0;
}
int lua_ax_csloader_CSLoader_destroyInstance(lua_State* tolua_S)
2019-11-23 20:27:39 +08:00
{
int argc = 0;
bool ok = true;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_Error tolua_err;
#endif
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2022-07-12 21:31:54 +08:00
if (!tolua_isusertable(tolua_S,1,"ax.CSLoader",0,&tolua_err)) goto tolua_lerror;
2019-11-23 20:27:39 +08:00
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_csloader_CSLoader_destroyInstance'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
ax::CSLoader::destroyInstance();
2019-11-23 20:27:39 +08:00
lua_settop(tolua_S, 1);
return 1;
}
2022-07-12 21:31:54 +08:00
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.CSLoader:destroyInstance",argc, 0);
2019-11-23 20:27:39 +08:00
return 0;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_ax_csloader_CSLoader_destroyInstance'.",&tolua_err);
2019-11-23 20:27:39 +08:00
#endif
return 0;
}
int lua_ax_csloader_CSLoader_createNodeWithVisibleSize(lua_State* tolua_S)
2019-11-23 20:27:39 +08:00
{
int argc = 0;
bool ok = true;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_Error tolua_err;
#endif
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2022-07-12 21:31:54 +08:00
if (!tolua_isusertable(tolua_S,1,"ax.CSLoader",0,&tolua_err)) goto tolua_lerror;
2019-11-23 20:27:39 +08:00
#endif
argc = lua_gettop(tolua_S)-1;
do
{
if (argc == 2)
{
std::string_view arg0;
2022-07-12 21:31:54 +08:00
ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "ax.CSLoader:createNodeWithVisibleSize");
2019-11-23 20:27:39 +08:00
if (!ok) { break; }
std::function<void (ax::Ref *)> arg1;
2019-11-23 20:27:39 +08:00
do {
// Lambda binding for lua is not supported.
assert(false);
} while(0)
;
if (!ok) { break; }
ax::Node* ret = ax::CSLoader::createNodeWithVisibleSize(arg0, arg1);
object_to_luaval<ax::Node>(tolua_S, "ax.Node",(ax::Node*)ret);
2019-11-23 20:27:39 +08:00
return 1;
}
} while (0);
ok = true;
do
{
if (argc == 1)
{
std::string_view arg0;
2022-07-12 21:31:54 +08:00
ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "ax.CSLoader:createNodeWithVisibleSize");
2019-11-23 20:27:39 +08:00
if (!ok) { break; }
ax::Node* ret = ax::CSLoader::createNodeWithVisibleSize(arg0);
object_to_luaval<ax::Node>(tolua_S, "ax.Node",(ax::Node*)ret);
2019-11-23 20:27:39 +08:00
return 1;
}
} while (0);
ok = true;
2022-07-12 21:31:54 +08:00
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "ax.CSLoader:createNodeWithVisibleSize",argc, 1);
2019-11-23 20:27:39 +08:00
return 0;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_ax_csloader_CSLoader_createNodeWithVisibleSize'.",&tolua_err);
2019-11-23 20:27:39 +08:00
#endif
return 0;
}
int lua_ax_csloader_CSLoader_getInstance(lua_State* tolua_S)
2019-11-23 20:27:39 +08:00
{
int argc = 0;
bool ok = true;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_Error tolua_err;
#endif
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2022-07-12 21:31:54 +08:00
if (!tolua_isusertable(tolua_S,1,"ax.CSLoader",0,&tolua_err)) goto tolua_lerror;
2019-11-23 20:27:39 +08:00
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_csloader_CSLoader_getInstance'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
auto&& ret = ax::CSLoader::getInstance();
object_to_luaval<ax::CSLoader>(tolua_S, "ax.CSLoader",(ax::CSLoader*)ret);
2019-11-23 20:27:39 +08:00
return 1;
}
2022-07-12 21:31:54 +08:00
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.CSLoader:getInstance",argc, 0);
2019-11-23 20:27:39 +08:00
return 0;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_ax_csloader_CSLoader_getInstance'.",&tolua_err);
2019-11-23 20:27:39 +08:00
#endif
return 0;
}
int lua_ax_csloader_CSLoader_constructor(lua_State* tolua_S)
2019-11-23 20:27:39 +08:00
{
int argc = 0;
ax::CSLoader* cobj = nullptr;
2019-11-23 20:27:39 +08:00
bool ok = true;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
2019-11-23 20:27:39 +08:00
tolua_Error tolua_err;
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_csloader_CSLoader_constructor'", nullptr);
2019-11-23 20:27:39 +08:00
return 0;
}
cobj = new ax::CSLoader();
2022-07-12 21:31:54 +08:00
tolua_pushusertype(tolua_S,(void*)cobj,"ax.CSLoader");
2019-11-23 20:27:39 +08:00
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
return 1;
}
2022-07-12 21:31:54 +08:00
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ax.CSLoader:CSLoader",argc, 0);
2019-11-23 20:27:39 +08:00
return 0;
2022-08-08 18:02:17 +08:00
#if _AX_DEBUG >= 1
tolua_error(tolua_S,"#ferror in function 'lua_ax_csloader_CSLoader_constructor'.",&tolua_err);
2019-11-23 20:27:39 +08:00
#endif
return 0;
}
static int lua_ax_csloader_CSLoader_finalize(lua_State* tolua_S)
2019-11-23 20:27:39 +08:00
{
printf("luabindings: finalizing LUA object (CSLoader)");
return 0;
}
int lua_register_ax_csloader_CSLoader(lua_State* tolua_S)
2019-11-23 20:27:39 +08:00
{
2022-07-12 21:31:54 +08:00
tolua_usertype(tolua_S,"ax.CSLoader");
tolua_cclass(tolua_S,"CSLoader","ax.CSLoader","",nullptr);
2019-11-23 20:27:39 +08:00
tolua_beginmodule(tolua_S,"CSLoader");
tolua_function(tolua_S,"new",lua_ax_csloader_CSLoader_constructor);
tolua_function(tolua_S,"createNodeFromJson",lua_ax_csloader_CSLoader_createNodeFromJson);
tolua_function(tolua_S,"createNodeWithFlatBuffersFile",lua_ax_csloader_CSLoader_createNodeWithFlatBuffersFile);
tolua_function(tolua_S,"loadNodeWithFile",lua_ax_csloader_CSLoader_loadNodeWithFile);
tolua_function(tolua_S,"bindCallback",lua_ax_csloader_CSLoader_bindCallback);
tolua_function(tolua_S,"setJsonPath",lua_ax_csloader_CSLoader_setJsonPath);
tolua_function(tolua_S,"init",lua_ax_csloader_CSLoader_init);
tolua_function(tolua_S,"loadNodeWithContent",lua_ax_csloader_CSLoader_loadNodeWithContent);
tolua_function(tolua_S,"isRecordJsonPath",lua_ax_csloader_CSLoader_isRecordJsonPath);
tolua_function(tolua_S,"getJsonPath",lua_ax_csloader_CSLoader_getJsonPath);
tolua_function(tolua_S,"setRecordJsonPath",lua_ax_csloader_CSLoader_setRecordJsonPath);
tolua_function(tolua_S,"createNodeWithFlatBuffersForSimulator",lua_ax_csloader_CSLoader_createNodeWithFlatBuffersForSimulator);
tolua_function(tolua_S,"destroyInstance", lua_ax_csloader_CSLoader_destroyInstance);
tolua_function(tolua_S,"createNodeWithVisibleSize", lua_ax_csloader_CSLoader_createNodeWithVisibleSize);
tolua_function(tolua_S,"getInstance", lua_ax_csloader_CSLoader_getInstance);
2019-11-23 20:27:39 +08:00
tolua_endmodule(tolua_S);
auto typeName = typeid(ax::CSLoader).name(); // rtti is literal storage
2022-07-12 21:31:54 +08:00
g_luaType[reinterpret_cast<uintptr_t>(typeName)] = "ax.CSLoader";
g_typeCast[typeName] = "ax.CSLoader";
2019-11-23 20:27:39 +08:00
return 1;
}
TOLUA_API int register_all_ax_csloader(lua_State* tolua_S)
2019-11-23 20:27:39 +08:00
{
tolua_open(tolua_S);
2022-07-12 21:31:54 +08:00
tolua_module(tolua_S,"ax",0);
tolua_beginmodule(tolua_S,"ax");
2019-11-23 20:27:39 +08:00
lua_register_ax_csloader_CSLoader(tolua_S);
2019-11-23 20:27:39 +08:00
tolua_endmodule(tolua_S);
return 1;
}