1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
#include "lua_cocos2dx_socket_util_manual.hpp"
#include "SocketUtil.h"
#include "tolua_fix.h"
#include "LuaBasicConversions.h"
#include "CCLuaValue.h"
int lua_cocos2dx_socket_util_SocketUtil_addStateHandlerLua(lua_State* tolua_S)
{
int argc = 0;
SocketUtil* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"SocketUtil",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (SocketUtil*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_socket_util_SocketUtil_addStateHandlerLua'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
LUA_FUNCTION arg0;
do {
arg0 = toluafix_ref_function(tolua_S,2,0);
} while(0)
;
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_socket_util_SocketUtil_addStateHandlerLua'", nullptr);
return 0;
}
cobj->addStateHandlerLua(arg0);
return 0;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "SocketUtil:addStateHandlerLua",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_socket_util_SocketUtil_addStateHandlerLua'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_socket_util_SocketUtil_addMsgHandlerLua(lua_State* tolua_S)
{
int argc = 0;
SocketUtil* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"SocketUtil",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (SocketUtil*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_socket_util_SocketUtil_addMsgHandlerLua'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
LUA_FUNCTION arg0;
do {
arg0 = toluafix_ref_function(tolua_S,2,0);
} while(0)
;
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_socket_util_SocketUtil_addMsgHandlerLua'", nullptr);
return 0;
}
cobj->addMsgHandlerLua(arg0);
return 0;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "SocketUtil:addMsgHandlerLua",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_socket_util_SocketUtil_addMsgHandlerLua'.",&tolua_err);
#endif
return 0;
}
int lua_register_cocos2dx_socket_util_SocketUtil_Manual(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"SocketUtil");
tolua_cclass(tolua_S,"SocketUtil","SocketUtil","cc.Ref",nullptr);
tolua_beginmodule(tolua_S,"SocketUtil");
tolua_function(tolua_S,"addStateHandlerLua",lua_cocos2dx_socket_util_SocketUtil_addStateHandlerLua);
tolua_function(tolua_S,"addMsgHandlerLua",lua_cocos2dx_socket_util_SocketUtil_addMsgHandlerLua);
tolua_endmodule(tolua_S);
std::string typeName = typeid(SocketUtil).name();
g_luaType[typeName] = "SocketUtil";
g_typeCast["SocketUtil"] = "SocketUtil";
return 1;
}
TOLUA_API int register_all_cocos2dx_socket_util_manual(lua_State* tolua_S)
{
tolua_open(tolua_S);
tolua_module(tolua_S,nullptr,0);
tolua_beginmodule(tolua_S,nullptr);
lua_register_cocos2dx_socket_util_SocketUtil_Manual(tolua_S);
tolua_endmodule(tolua_S);
return 1;
}
|