1 | |
2 | |
3 | |
4 | |
5 | |
6 | #ifndef __cplusplus201103L |
7 | #include <stdlib.h> |
8 | #endif |
9 | #include <string.h> |
10 | |
11 | #include <tolua++.h> |
12 | |
13 | #include "/home/jenkins/workspace/orxonox_qc_trunk_checks/src/modules/dialogue/DialogueManager.h" |
14 | |
15 | #include "core/LuaState.h" |
16 | int tolua_Dialogue_open(lua_State* tolua_S); |
17 | static orxonox::ToluaBindingsHelper initialiser(&tolua_Dialogue_open, "Dialogue"); |
18 | |
19 | #ifdef ORXONOX_RELEASE |
20 | # define TOLUA_RELEASE |
21 | #endif |
22 | |
23 | |
24 | static void tolua_reg_types (lua_State* tolua_S) |
25 | { |
26 | tolua_usertype(tolua_S,"orxonox::DialogueManager"); |
27 | } |
28 | |
29 | |
30 | #ifndef TOLUA_DISABLE_tolua_Dialogue_orxonox_DialogueManager_getInstance00 |
31 | static int tolua_Dialogue_orxonox_DialogueManager_getInstance00(lua_State* tolua_S) |
32 | { |
33 | #ifndef TOLUA_RELEASE |
34 | tolua_Error tolua_err; |
35 | if ( |
36 | !tolua_isusertable(tolua_S,1,"orxonox::DialogueManager",0,&tolua_err) || |
37 | !tolua_isnoobj(tolua_S,2,&tolua_err) |
38 | ) |
39 | goto tolua_lerror; |
40 | else |
41 | #endif |
42 | { |
43 | { |
44 | orxonox::DialogueManager& tolua_ret = (orxonox::DialogueManager&) orxonox::DialogueManager::getInstance(); |
45 | tolua_pushusertype(tolua_S,(void*)&tolua_ret,"orxonox::DialogueManager"); |
46 | } |
47 | } |
48 | return 1; |
49 | #ifndef TOLUA_RELEASE |
50 | tolua_lerror: |
51 | tolua_error(tolua_S,"#ferror in function 'getInstance'.",&tolua_err); |
52 | return 0; |
53 | #endif |
54 | } |
55 | #endif //#ifndef TOLUA_DISABLE |
56 | |
57 | |
58 | #ifndef TOLUA_DISABLE_tolua_Dialogue_orxonox_DialogueManager_setquestion00 |
59 | static int tolua_Dialogue_orxonox_DialogueManager_setquestion00(lua_State* tolua_S) |
60 | { |
61 | #ifndef TOLUA_RELEASE |
62 | tolua_Error tolua_err; |
63 | if ( |
64 | !tolua_isusertype(tolua_S,1,"orxonox::DialogueManager",0,&tolua_err) || |
65 | !tolua_iscppstringtolua_isstring(tolua_S,2,0,&tolua_err) || |
66 | !tolua_isnoobj(tolua_S,3,&tolua_err) |
67 | ) |
68 | goto tolua_lerror; |
69 | else |
70 | #endif |
71 | { |
72 | orxonox::DialogueManager* self = (orxonox::DialogueManager*) tolua_tousertype(tolua_S,1,0); |
73 | std::string question = ((std::string) tolua_tocppstring(tolua_S,2,0)); |
74 | #ifndef TOLUA_RELEASE |
75 | if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setquestion'",NULL__null); |
76 | #endif |
77 | { |
78 | self->setquestion(question); |
79 | } |
80 | } |
81 | return 0; |
82 | #ifndef TOLUA_RELEASE |
83 | tolua_lerror: |
84 | tolua_error(tolua_S,"#ferror in function 'setquestion'.",&tolua_err); |
85 | return 0; |
86 | #endif |
87 | } |
88 | #endif //#ifndef TOLUA_DISABLE |
89 | |
90 | |
91 | #ifndef TOLUA_DISABLE_tolua_Dialogue_orxonox_DialogueManager_getquestion00 |
92 | static int tolua_Dialogue_orxonox_DialogueManager_getquestion00(lua_State* tolua_S) |
93 | { |
94 | #ifndef TOLUA_RELEASE |
95 | tolua_Error tolua_err; |
96 | if ( |
97 | !tolua_isusertype(tolua_S,1,"orxonox::DialogueManager",0,&tolua_err) || |
98 | !tolua_isnoobj(tolua_S,2,&tolua_err) |
99 | ) |
100 | goto tolua_lerror; |
101 | else |
102 | #endif |
103 | { |
104 | orxonox::DialogueManager* self = (orxonox::DialogueManager*) tolua_tousertype(tolua_S,1,0); |
105 | #ifndef TOLUA_RELEASE |
106 | if (!self) tolua_error(tolua_S,"invalid 'self' in function 'getquestion'",NULL__null); |
107 | #endif |
108 | { |
109 | std::string tolua_ret = (std::string) self->getquestion(); |
110 | tolua_pushcppstring(tolua_S,(const char*)tolua_ret)tolua_pushstring(tolua_S,(const char*)tolua_ret.c_str()); |
111 | } |
112 | } |
113 | return 1; |
114 | #ifndef TOLUA_RELEASE |
115 | tolua_lerror: |
116 | tolua_error(tolua_S,"#ferror in function 'getquestion'.",&tolua_err); |
117 | return 0; |
118 | #endif |
119 | } |
120 | #endif //#ifndef TOLUA_DISABLE |
121 | |
122 | |
123 | #ifndef TOLUA_DISABLE_tolua_Dialogue_orxonox_DialogueManager_setanswers100 |
124 | static int tolua_Dialogue_orxonox_DialogueManager_setanswers100(lua_State* tolua_S) |
125 | { |
126 | #ifndef TOLUA_RELEASE |
127 | tolua_Error tolua_err; |
128 | if ( |
129 | !tolua_isusertype(tolua_S,1,"orxonox::DialogueManager",0,&tolua_err) || |
130 | !tolua_iscppstringtolua_isstring(tolua_S,2,0,&tolua_err) || |
131 | !tolua_isnoobj(tolua_S,3,&tolua_err) |
132 | ) |
133 | goto tolua_lerror; |
134 | else |
135 | #endif |
136 | { |
137 | orxonox::DialogueManager* self = (orxonox::DialogueManager*) tolua_tousertype(tolua_S,1,0); |
138 | std::string a1 = ((std::string) tolua_tocppstring(tolua_S,2,0)); |
139 | #ifndef TOLUA_RELEASE |
140 | if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setanswers1'",NULL__null); |
141 | #endif |
142 | { |
143 | self->setanswers1(a1); |
144 | } |
145 | } |
146 | return 0; |
147 | #ifndef TOLUA_RELEASE |
148 | tolua_lerror: |
149 | tolua_error(tolua_S,"#ferror in function 'setanswers1'.",&tolua_err); |
150 | return 0; |
151 | #endif |
152 | } |
153 | #endif //#ifndef TOLUA_DISABLE |
154 | |
155 | |
156 | #ifndef TOLUA_DISABLE_tolua_Dialogue_orxonox_DialogueManager_getanswers100 |
157 | static int tolua_Dialogue_orxonox_DialogueManager_getanswers100(lua_State* tolua_S) |
158 | { |
159 | #ifndef TOLUA_RELEASE |
160 | tolua_Error tolua_err; |
161 | if ( |
162 | !tolua_isusertype(tolua_S,1,"orxonox::DialogueManager",0,&tolua_err) || |
163 | !tolua_isnoobj(tolua_S,2,&tolua_err) |
164 | ) |
165 | goto tolua_lerror; |
166 | else |
167 | #endif |
168 | { |
169 | orxonox::DialogueManager* self = (orxonox::DialogueManager*) tolua_tousertype(tolua_S,1,0); |
170 | #ifndef TOLUA_RELEASE |
171 | if (!self) tolua_error(tolua_S,"invalid 'self' in function 'getanswers1'",NULL__null); |
172 | #endif |
173 | { |
174 | std::string tolua_ret = (std::string) self->getanswers1(); |
175 | tolua_pushcppstring(tolua_S,(const char*)tolua_ret)tolua_pushstring(tolua_S,(const char*)tolua_ret.c_str()); |
176 | } |
177 | } |
178 | return 1; |
179 | #ifndef TOLUA_RELEASE |
180 | tolua_lerror: |
181 | tolua_error(tolua_S,"#ferror in function 'getanswers1'.",&tolua_err); |
182 | return 0; |
183 | #endif |
184 | } |
185 | #endif //#ifndef TOLUA_DISABLE |
186 | |
187 | |
188 | #ifndef TOLUA_DISABLE_tolua_Dialogue_orxonox_DialogueManager_setanswers200 |
189 | static int tolua_Dialogue_orxonox_DialogueManager_setanswers200(lua_State* tolua_S) |
190 | { |
191 | #ifndef TOLUA_RELEASE |
192 | tolua_Error tolua_err; |
193 | if ( |
194 | !tolua_isusertype(tolua_S,1,"orxonox::DialogueManager",0,&tolua_err) || |
195 | !tolua_iscppstringtolua_isstring(tolua_S,2,0,&tolua_err) || |
196 | !tolua_isnoobj(tolua_S,3,&tolua_err) |
197 | ) |
198 | goto tolua_lerror; |
199 | else |
200 | #endif |
201 | { |
202 | orxonox::DialogueManager* self = (orxonox::DialogueManager*) tolua_tousertype(tolua_S,1,0); |
203 | std::string a2 = ((std::string) tolua_tocppstring(tolua_S,2,0)); |
204 | #ifndef TOLUA_RELEASE |
205 | if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setanswers2'",NULL__null); |
206 | #endif |
207 | { |
208 | self->setanswers2(a2); |
209 | } |
210 | } |
211 | return 0; |
212 | #ifndef TOLUA_RELEASE |
213 | tolua_lerror: |
214 | tolua_error(tolua_S,"#ferror in function 'setanswers2'.",&tolua_err); |
215 | return 0; |
216 | #endif |
217 | } |
218 | #endif //#ifndef TOLUA_DISABLE |
219 | |
220 | |
221 | #ifndef TOLUA_DISABLE_tolua_Dialogue_orxonox_DialogueManager_getanswers200 |
222 | static int tolua_Dialogue_orxonox_DialogueManager_getanswers200(lua_State* tolua_S) |
223 | { |
224 | #ifndef TOLUA_RELEASE |
225 | tolua_Error tolua_err; |
226 | if ( |
227 | !tolua_isusertype(tolua_S,1,"orxonox::DialogueManager",0,&tolua_err) || |
228 | !tolua_isnoobj(tolua_S,2,&tolua_err) |
229 | ) |
230 | goto tolua_lerror; |
231 | else |
232 | #endif |
233 | { |
234 | orxonox::DialogueManager* self = (orxonox::DialogueManager*) tolua_tousertype(tolua_S,1,0); |
235 | #ifndef TOLUA_RELEASE |
236 | if (!self) tolua_error(tolua_S,"invalid 'self' in function 'getanswers2'",NULL__null); |
237 | #endif |
238 | { |
239 | std::string tolua_ret = (std::string) self->getanswers2(); |
240 | tolua_pushcppstring(tolua_S,(const char*)tolua_ret)tolua_pushstring(tolua_S,(const char*)tolua_ret.c_str()); |
241 | } |
242 | } |
243 | return 1; |
244 | #ifndef TOLUA_RELEASE |
245 | tolua_lerror: |
246 | tolua_error(tolua_S,"#ferror in function 'getanswers2'.",&tolua_err); |
247 | return 0; |
248 | #endif |
249 | } |
250 | #endif //#ifndef TOLUA_DISABLE |
251 | |
252 | |
253 | #ifndef TOLUA_DISABLE_tolua_Dialogue_orxonox_DialogueManager_a1clicked00 |
254 | static int tolua_Dialogue_orxonox_DialogueManager_a1clicked00(lua_State* tolua_S) |
255 | { |
256 | #ifndef TOLUA_RELEASE |
257 | tolua_Error tolua_err; |
258 | if ( |
259 | !tolua_isusertype(tolua_S,1,"orxonox::DialogueManager",0,&tolua_err) || |
260 | !tolua_isnoobj(tolua_S,2,&tolua_err) |
261 | ) |
262 | goto tolua_lerror; |
263 | else |
264 | #endif |
265 | { |
266 | orxonox::DialogueManager* self = (orxonox::DialogueManager*) tolua_tousertype(tolua_S,1,0); |
267 | #ifndef TOLUA_RELEASE |
268 | if (!self) tolua_error(tolua_S,"invalid 'self' in function 'a1clicked'",NULL__null); |
269 | #endif |
270 | { |
271 | self->a1clicked(); |
272 | } |
273 | } |
274 | return 0; |
275 | #ifndef TOLUA_RELEASE |
276 | tolua_lerror: |
277 | tolua_error(tolua_S,"#ferror in function 'a1clicked'.",&tolua_err); |
278 | return 0; |
279 | #endif |
280 | } |
281 | #endif //#ifndef TOLUA_DISABLE |
282 | |
283 | |
284 | #ifndef TOLUA_DISABLE_tolua_Dialogue_orxonox_DialogueManager_a2clicked00 |
285 | static int tolua_Dialogue_orxonox_DialogueManager_a2clicked00(lua_State* tolua_S) |
286 | { |
287 | #ifndef TOLUA_RELEASE |
288 | tolua_Error tolua_err; |
289 | if ( |
| |
290 | !tolua_isusertype(tolua_S,1,"orxonox::DialogueManager",0,&tolua_err) || |
291 | !tolua_isnoobj(tolua_S,2,&tolua_err) |
292 | ) |
293 | goto tolua_lerror; |
294 | else |
295 | #endif |
296 | { |
297 | orxonox::DialogueManager* self = (orxonox::DialogueManager*) tolua_tousertype(tolua_S,1,0); |
| |
298 | #ifndef TOLUA_RELEASE |
299 | if (!self) tolua_error(tolua_S,"invalid 'self' in function 'a2clicked'",NULL__null); |
| |
| |
300 | #endif |
301 | { |
302 | self->a2clicked(); |
| 5 | | Called C++ object pointer is null |
|
303 | } |
304 | } |
305 | return 0; |
306 | #ifndef TOLUA_RELEASE |
307 | tolua_lerror: |
308 | tolua_error(tolua_S,"#ferror in function 'a2clicked'.",&tolua_err); |
309 | return 0; |
310 | #endif |
311 | } |
312 | #endif //#ifndef TOLUA_DISABLE |
313 | |
314 | |
315 | #ifndef TOLUA_DISABLE_tolua_Dialogue_orxonox_DialogueManager_theEnd00 |
316 | static int tolua_Dialogue_orxonox_DialogueManager_theEnd00(lua_State* tolua_S) |
317 | { |
318 | #ifndef TOLUA_RELEASE |
319 | tolua_Error tolua_err; |
320 | if ( |
321 | !tolua_isusertype(tolua_S,1,"orxonox::DialogueManager",0,&tolua_err) || |
322 | !tolua_isnoobj(tolua_S,2,&tolua_err) |
323 | ) |
324 | goto tolua_lerror; |
325 | else |
326 | #endif |
327 | { |
328 | orxonox::DialogueManager* self = (orxonox::DialogueManager*) tolua_tousertype(tolua_S,1,0); |
329 | #ifndef TOLUA_RELEASE |
330 | if (!self) tolua_error(tolua_S,"invalid 'self' in function 'theEnd'",NULL__null); |
331 | #endif |
332 | { |
333 | bool tolua_ret = (bool) self->theEnd(); |
334 | tolua_pushboolean(tolua_S,(bool)tolua_ret); |
335 | } |
336 | } |
337 | return 1; |
338 | #ifndef TOLUA_RELEASE |
339 | tolua_lerror: |
340 | tolua_error(tolua_S,"#ferror in function 'theEnd'.",&tolua_err); |
341 | return 0; |
342 | #endif |
343 | } |
344 | #endif //#ifndef TOLUA_DISABLE |
345 | |
346 | |
347 | int tolua_Dialogue_open (lua_State* tolua_S) |
348 | { |
349 | tolua_open(tolua_S); |
350 | tolua_reg_types(tolua_S); |
351 | tolua_module(tolua_S,NULL__null,0); |
352 | tolua_beginmodule(tolua_S,NULL__null); |
353 | tolua_module(tolua_S,"orxonox",0); |
354 | tolua_beginmodule(tolua_S,"orxonox"); |
355 | tolua_cclass(tolua_S,"DialogueManager","orxonox::DialogueManager","",NULL__null); |
356 | tolua_beginmodule(tolua_S,"DialogueManager"); |
357 | tolua_function(tolua_S,"getInstance",tolua_Dialogue_orxonox_DialogueManager_getInstance00); |
358 | tolua_function(tolua_S,"setquestion",tolua_Dialogue_orxonox_DialogueManager_setquestion00); |
359 | tolua_function(tolua_S,"getquestion",tolua_Dialogue_orxonox_DialogueManager_getquestion00); |
360 | tolua_function(tolua_S,"setanswers1",tolua_Dialogue_orxonox_DialogueManager_setanswers100); |
361 | tolua_function(tolua_S,"getanswers1",tolua_Dialogue_orxonox_DialogueManager_getanswers100); |
362 | tolua_function(tolua_S,"setanswers2",tolua_Dialogue_orxonox_DialogueManager_setanswers200); |
363 | tolua_function(tolua_S,"getanswers2",tolua_Dialogue_orxonox_DialogueManager_getanswers200); |
364 | tolua_function(tolua_S,"a1clicked",tolua_Dialogue_orxonox_DialogueManager_a1clicked00); |
365 | tolua_function(tolua_S,"a2clicked",tolua_Dialogue_orxonox_DialogueManager_a2clicked00); |
366 | tolua_function(tolua_S,"theEnd",tolua_Dialogue_orxonox_DialogueManager_theEnd00); |
367 | tolua_endmodule(tolua_S); |
368 | tolua_endmodule(tolua_S); |
369 | tolua_endmodule(tolua_S); |
370 | return 1; |
371 | } |
372 | |
373 | |
374 | #if defined(LUA_VERSION_NUM501) && LUA_VERSION_NUM501 >= 501 |
375 | int luaopen_Dialogue (lua_State* tolua_S) { |
376 | return tolua_Dialogue_open(tolua_S); |
377 | }; |
378 | #endif |
379 | |