Fawkes API Fawkes Development Version
fawkesinterface_tolua.cpp
1/*
2** Lua binding: fawkesinterface
3** Generated automatically by tolua++-1.0.92
4*/
5/* This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version. A runtime exception applies to
9 * this software (see LICENSE.GPL_WRE file mentioned below for details).
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Library General Public License for more details.
15 *
16 * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
17 */
18
19#include <core/exception.h>
20
21#ifndef __cplusplus
22#include "stdlib.h"
23#endif
24#include "string.h"
25
26#include "tolua++.h"
27
28/* Exported function */
29TOLUA_API int tolua_fawkesinterface_open (lua_State* tolua_S);
30
31#include <interface/interface.h>
32#include <utils/time/time.h>
33#include <utils/time/clock.h>
34#include <interface/message.h>
35#include <interface/message_queue.h>
36
37/* function to release collected object via destructor */
38#ifdef __cplusplus
39
40static int tolua_collect_fawkes__MessageQueue__MessageIterator (lua_State* tolua_S)
41{
43 Mtolua_delete(self);
44 return 0;
45}
46
47static int tolua_collect_fawkes__Message (lua_State* tolua_S)
48{
49 fawkes::Message* self = (fawkes::Message*) tolua_tousertype(tolua_S,1,0);
50 Mtolua_delete(self);
51 return 0;
52}
53
54static int tolua_collect_fawkes__Uuid (lua_State* tolua_S)
55{
56 fawkes::Uuid* self = (fawkes::Uuid*) tolua_tousertype(tolua_S,1,0);
57 Mtolua_delete(self);
58 return 0;
59}
60
61static int tolua_collect_fawkes__MessageQueue (lua_State* tolua_S)
62{
63 fawkes::MessageQueue* self = (fawkes::MessageQueue*) tolua_tousertype(tolua_S,1,0);
64 Mtolua_delete(self);
65 return 0;
66}
67
68static int tolua_collect_size_t (lua_State* tolua_S)
69{
70 size_t* self = (size_t*) tolua_tousertype(tolua_S,1,0);
71 Mtolua_delete(self);
72 return 0;
73}
74#endif
75
76
77/* function to register type */
78static void tolua_reg_types (lua_State* tolua_S)
79{
80 tolua_usertype(tolua_S,"fawkes::Clock");
81 tolua_usertype(tolua_S,"fawkes::Interface");
82 tolua_usertype(tolua_S,"RefCount");
83 tolua_usertype(tolua_S,"size_t");
84 tolua_usertype(tolua_S,"fawkes::MessageQueue::MessageIterator");
85 tolua_usertype(tolua_S,"fawkes::Message");
86 tolua_usertype(tolua_S,"fawkes::MessageQueue");
87 tolua_usertype(tolua_S,"fawkes::Time");
88 tolua_usertype(tolua_S,"fawkes::Uuid");
89}
90
91/* method: get_string of class fawkes::Uuid */
92#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Uuid_get_string00
93static int tolua_fawkesinterface_fawkes_Uuid_get_string00(lua_State* tolua_S)
94{
95#ifndef TOLUA_RELEASE
96 tolua_Error tolua_err;
97 if (
98 !tolua_isusertype(tolua_S,1,"const fawkes::Uuid",0,&tolua_err) ||
99 !tolua_isnoobj(tolua_S,2,&tolua_err)
100 )
101 goto tolua_lerror;
102 else
103#endif
104 {
105 const fawkes::Uuid* self = (const fawkes::Uuid*) tolua_tousertype(tolua_S,1,0);
106#ifndef TOLUA_RELEASE
107 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'get_string'", NULL);
108#endif
109 bool exc_caught = false;
110 try {
111 {
112 std::string tolua_ret = (std::string) self->get_string();
113 tolua_pushcppstring(tolua_S,(const char*)tolua_ret);
114 }
115 } catch (fawkes::Exception &e) {
116 exc_caught = true;
117 lua_pushstring(tolua_S, e.what_no_backtrace());
118 }
119 catch (std::exception &e) {
120 exc_caught = true;
121 lua_pushstring(tolua_S, e.what());
122 }
123 if (exc_caught) lua_error(tolua_S);
124
125 }
126 return 1;
127#ifndef TOLUA_RELEASE
128 tolua_lerror:
129 tolua_error(tolua_S,"#ferror in function 'get_string'.",&tolua_err);
130 return 0;
131#endif
132}
133#endif //#ifndef TOLUA_DISABLE
134
135/* method: oftype of class fawkes::Interface */
136#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_oftype00
137static int tolua_fawkesinterface_fawkes_Interface_oftype00(lua_State* tolua_S)
138{
139#ifndef TOLUA_RELEASE
140 tolua_Error tolua_err;
141 if (
142 !tolua_isusertype(tolua_S,1,"const fawkes::Interface",0,&tolua_err) ||
143 !tolua_isstring(tolua_S,2,0,&tolua_err) ||
144 !tolua_isnoobj(tolua_S,3,&tolua_err)
145 )
146 goto tolua_lerror;
147 else
148#endif
149 {
150 const fawkes::Interface* self = (const fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
151 const char* interface_type = ((const char*) tolua_tostring(tolua_S,2,0));
152#ifndef TOLUA_RELEASE
153 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'oftype'", NULL);
154#endif
155 bool exc_caught = false;
156 try {
157 {
158 bool tolua_ret = (bool) self->oftype(interface_type);
159 tolua_pushboolean(tolua_S,(bool)tolua_ret);
160 }
161 } catch (fawkes::Exception &e) {
162 exc_caught = true;
163 lua_pushstring(tolua_S, e.what_no_backtrace());
164 }
165 catch (std::exception &e) {
166 exc_caught = true;
167 lua_pushstring(tolua_S, e.what());
168 }
169 if (exc_caught) lua_error(tolua_S);
170
171 }
172 return 1;
173#ifndef TOLUA_RELEASE
174 tolua_lerror:
175 tolua_error(tolua_S,"#ferror in function 'oftype'.",&tolua_err);
176 return 0;
177#endif
178}
179#endif //#ifndef TOLUA_DISABLE
180
181/* method: datachunk of class fawkes::Interface */
182#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_datachunk00
183static int tolua_fawkesinterface_fawkes_Interface_datachunk00(lua_State* tolua_S)
184{
185#ifndef TOLUA_RELEASE
186 tolua_Error tolua_err;
187 if (
188 !tolua_isusertype(tolua_S,1,"const fawkes::Interface",0,&tolua_err) ||
189 !tolua_isnoobj(tolua_S,2,&tolua_err)
190 )
191 goto tolua_lerror;
192 else
193#endif
194 {
195 const fawkes::Interface* self = (const fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
196#ifndef TOLUA_RELEASE
197 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'datachunk'", NULL);
198#endif
199 bool exc_caught = false;
200 try {
201 {
202 const void* tolua_ret = (const void*) self->datachunk();
203 tolua_pushuserdata(tolua_S,(void*)tolua_ret);
204 }
205 } catch (fawkes::Exception &e) {
206 exc_caught = true;
207 lua_pushstring(tolua_S, e.what_no_backtrace());
208 }
209 catch (std::exception &e) {
210 exc_caught = true;
211 lua_pushstring(tolua_S, e.what());
212 }
213 if (exc_caught) lua_error(tolua_S);
214
215 }
216 return 1;
217#ifndef TOLUA_RELEASE
218 tolua_lerror:
219 tolua_error(tolua_S,"#ferror in function 'datachunk'.",&tolua_err);
220 return 0;
221#endif
222}
223#endif //#ifndef TOLUA_DISABLE
224
225/* method: datasize of class fawkes::Interface */
226#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_datasize00
227static int tolua_fawkesinterface_fawkes_Interface_datasize00(lua_State* tolua_S)
228{
229#ifndef TOLUA_RELEASE
230 tolua_Error tolua_err;
231 if (
232 !tolua_isusertype(tolua_S,1,"const fawkes::Interface",0,&tolua_err) ||
233 !tolua_isnoobj(tolua_S,2,&tolua_err)
234 )
235 goto tolua_lerror;
236 else
237#endif
238 {
239 const fawkes::Interface* self = (const fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
240#ifndef TOLUA_RELEASE
241 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'datasize'", NULL);
242#endif
243 bool exc_caught = false;
244 try {
245 {
246 unsigned int tolua_ret = (unsigned int) self->datasize();
247 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
248 }
249 } catch (fawkes::Exception &e) {
250 exc_caught = true;
251 lua_pushstring(tolua_S, e.what_no_backtrace());
252 }
253 catch (std::exception &e) {
254 exc_caught = true;
255 lua_pushstring(tolua_S, e.what());
256 }
257 if (exc_caught) lua_error(tolua_S);
258
259 }
260 return 1;
261#ifndef TOLUA_RELEASE
262 tolua_lerror:
263 tolua_error(tolua_S,"#ferror in function 'datasize'.",&tolua_err);
264 return 0;
265#endif
266}
267#endif //#ifndef TOLUA_DISABLE
268
269/* method: type of class fawkes::Interface */
270#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_type00
271static int tolua_fawkesinterface_fawkes_Interface_type00(lua_State* tolua_S)
272{
273#ifndef TOLUA_RELEASE
274 tolua_Error tolua_err;
275 if (
276 !tolua_isusertype(tolua_S,1,"const fawkes::Interface",0,&tolua_err) ||
277 !tolua_isnoobj(tolua_S,2,&tolua_err)
278 )
279 goto tolua_lerror;
280 else
281#endif
282 {
283 const fawkes::Interface* self = (const fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
284#ifndef TOLUA_RELEASE
285 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'type'", NULL);
286#endif
287 bool exc_caught = false;
288 try {
289 {
290 const char* tolua_ret = (const char*) self->type();
291 tolua_pushstring(tolua_S,(const char*)tolua_ret);
292 }
293 } catch (fawkes::Exception &e) {
294 exc_caught = true;
295 lua_pushstring(tolua_S, e.what_no_backtrace());
296 }
297 catch (std::exception &e) {
298 exc_caught = true;
299 lua_pushstring(tolua_S, e.what());
300 }
301 if (exc_caught) lua_error(tolua_S);
302
303 }
304 return 1;
305#ifndef TOLUA_RELEASE
306 tolua_lerror:
307 tolua_error(tolua_S,"#ferror in function 'type'.",&tolua_err);
308 return 0;
309#endif
310}
311#endif //#ifndef TOLUA_DISABLE
312
313/* method: id of class fawkes::Interface */
314#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_id00
315static int tolua_fawkesinterface_fawkes_Interface_id00(lua_State* tolua_S)
316{
317#ifndef TOLUA_RELEASE
318 tolua_Error tolua_err;
319 if (
320 !tolua_isusertype(tolua_S,1,"const fawkes::Interface",0,&tolua_err) ||
321 !tolua_isnoobj(tolua_S,2,&tolua_err)
322 )
323 goto tolua_lerror;
324 else
325#endif
326 {
327 const fawkes::Interface* self = (const fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
328#ifndef TOLUA_RELEASE
329 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'id'", NULL);
330#endif
331 bool exc_caught = false;
332 try {
333 {
334 const char* tolua_ret = (const char*) self->id();
335 tolua_pushstring(tolua_S,(const char*)tolua_ret);
336 }
337 } catch (fawkes::Exception &e) {
338 exc_caught = true;
339 lua_pushstring(tolua_S, e.what_no_backtrace());
340 }
341 catch (std::exception &e) {
342 exc_caught = true;
343 lua_pushstring(tolua_S, e.what());
344 }
345 if (exc_caught) lua_error(tolua_S);
346
347 }
348 return 1;
349#ifndef TOLUA_RELEASE
350 tolua_lerror:
351 tolua_error(tolua_S,"#ferror in function 'id'.",&tolua_err);
352 return 0;
353#endif
354}
355#endif //#ifndef TOLUA_DISABLE
356
357/* method: uid of class fawkes::Interface */
358#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_uid00
359static int tolua_fawkesinterface_fawkes_Interface_uid00(lua_State* tolua_S)
360{
361#ifndef TOLUA_RELEASE
362 tolua_Error tolua_err;
363 if (
364 !tolua_isusertype(tolua_S,1,"const fawkes::Interface",0,&tolua_err) ||
365 !tolua_isnoobj(tolua_S,2,&tolua_err)
366 )
367 goto tolua_lerror;
368 else
369#endif
370 {
371 const fawkes::Interface* self = (const fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
372#ifndef TOLUA_RELEASE
373 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'uid'", NULL);
374#endif
375 bool exc_caught = false;
376 try {
377 {
378 const char* tolua_ret = (const char*) self->uid();
379 tolua_pushstring(tolua_S,(const char*)tolua_ret);
380 }
381 } catch (fawkes::Exception &e) {
382 exc_caught = true;
383 lua_pushstring(tolua_S, e.what_no_backtrace());
384 }
385 catch (std::exception &e) {
386 exc_caught = true;
387 lua_pushstring(tolua_S, e.what());
388 }
389 if (exc_caught) lua_error(tolua_S);
390
391 }
392 return 1;
393#ifndef TOLUA_RELEASE
394 tolua_lerror:
395 tolua_error(tolua_S,"#ferror in function 'uid'.",&tolua_err);
396 return 0;
397#endif
398}
399#endif //#ifndef TOLUA_DISABLE
400
401/* method: serial of class fawkes::Interface */
402#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_serial00
403static int tolua_fawkesinterface_fawkes_Interface_serial00(lua_State* tolua_S)
404{
405#ifndef TOLUA_RELEASE
406 tolua_Error tolua_err;
407 if (
408 !tolua_isusertype(tolua_S,1,"const fawkes::Interface",0,&tolua_err) ||
409 !tolua_isnoobj(tolua_S,2,&tolua_err)
410 )
411 goto tolua_lerror;
412 else
413#endif
414 {
415 const fawkes::Interface* self = (const fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
416#ifndef TOLUA_RELEASE
417 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'serial'", NULL);
418#endif
419 bool exc_caught = false;
420 try {
421 {
422 fawkes::Uuid tolua_ret = (fawkes::Uuid) self->serial();
423 {
424#ifdef __cplusplus
425 void* tolua_obj = Mtolua_new((fawkes::Uuid)(tolua_ret));
426 tolua_pushusertype(tolua_S,tolua_obj,"fawkes::Uuid");
427 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
428#else
429 void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(fawkes::Uuid));
430 tolua_pushusertype(tolua_S,tolua_obj,"fawkes::Uuid");
431 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
432#endif
433 }
434 }
435 } catch (fawkes::Exception &e) {
436 exc_caught = true;
437 lua_pushstring(tolua_S, e.what_no_backtrace());
438 }
439 catch (std::exception &e) {
440 exc_caught = true;
441 lua_pushstring(tolua_S, e.what());
442 }
443 if (exc_caught) lua_error(tolua_S);
444
445 }
446 return 1;
447#ifndef TOLUA_RELEASE
448 tolua_lerror:
449 tolua_error(tolua_S,"#ferror in function 'serial'.",&tolua_err);
450 return 0;
451#endif
452}
453#endif //#ifndef TOLUA_DISABLE
454
455/* method: mem_serial of class fawkes::Interface */
456#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_mem_serial00
457static int tolua_fawkesinterface_fawkes_Interface_mem_serial00(lua_State* tolua_S)
458{
459#ifndef TOLUA_RELEASE
460 tolua_Error tolua_err;
461 if (
462 !tolua_isusertype(tolua_S,1,"const fawkes::Interface",0,&tolua_err) ||
463 !tolua_isnoobj(tolua_S,2,&tolua_err)
464 )
465 goto tolua_lerror;
466 else
467#endif
468 {
469 const fawkes::Interface* self = (const fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
470#ifndef TOLUA_RELEASE
471 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'mem_serial'", NULL);
472#endif
473 bool exc_caught = false;
474 try {
475 {
476 unsigned int tolua_ret = (unsigned int) self->mem_serial();
477 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
478 }
479 } catch (fawkes::Exception &e) {
480 exc_caught = true;
481 lua_pushstring(tolua_S, e.what_no_backtrace());
482 }
483 catch (std::exception &e) {
484 exc_caught = true;
485 lua_pushstring(tolua_S, e.what());
486 }
487 if (exc_caught) lua_error(tolua_S);
488
489 }
490 return 1;
491#ifndef TOLUA_RELEASE
492 tolua_lerror:
493 tolua_error(tolua_S,"#ferror in function 'mem_serial'.",&tolua_err);
494 return 0;
495#endif
496}
497#endif //#ifndef TOLUA_DISABLE
498
499/* method: operator== of class fawkes::Interface */
500#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface__eq00
501static int tolua_fawkesinterface_fawkes_Interface__eq00(lua_State* tolua_S)
502{
503#ifndef TOLUA_RELEASE
504 tolua_Error tolua_err;
505 if (
506 !tolua_isusertype(tolua_S,1,"const fawkes::Interface",0,&tolua_err) ||
507 (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"fawkes::Interface",0,&tolua_err)) ||
508 !tolua_isnoobj(tolua_S,3,&tolua_err)
509 )
510 goto tolua_lerror;
511 else
512#endif
513 {
514 const fawkes::Interface* self = (const fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
515 fawkes::Interface* comp = ((fawkes::Interface*) tolua_tousertype(tolua_S,2,0));
516#ifndef TOLUA_RELEASE
517 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
518#endif
519 bool exc_caught = false;
520 try {
521 {
522 bool tolua_ret = (bool) self->operator==(*comp);
523 tolua_pushboolean(tolua_S,(bool)tolua_ret);
524 }
525 } catch (fawkes::Exception &e) {
526 exc_caught = true;
527 lua_pushstring(tolua_S, e.what_no_backtrace());
528 }
529 catch (std::exception &e) {
530 exc_caught = true;
531 lua_pushstring(tolua_S, e.what());
532 }
533 if (exc_caught) lua_error(tolua_S);
534
535 }
536 return 1;
537#ifndef TOLUA_RELEASE
538 tolua_lerror:
539 tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
540 return 0;
541#endif
542}
543#endif //#ifndef TOLUA_DISABLE
544
545/* method: hash of class fawkes::Interface */
546#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_hash00
547static int tolua_fawkesinterface_fawkes_Interface_hash00(lua_State* tolua_S)
548{
549#ifndef TOLUA_RELEASE
550 tolua_Error tolua_err;
551 if (
552 !tolua_isusertype(tolua_S,1,"const fawkes::Interface",0,&tolua_err) ||
553 !tolua_isnoobj(tolua_S,2,&tolua_err)
554 )
555 goto tolua_lerror;
556 else
557#endif
558 {
559 const fawkes::Interface* self = (const fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
560#ifndef TOLUA_RELEASE
561 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'hash'", NULL);
562#endif
563 bool exc_caught = false;
564 try {
565 {
566 unsigned const char* tolua_ret = ( unsigned const char*) self->hash();
567 tolua_pushstring(tolua_S,(const char*)tolua_ret);
568 }
569 } catch (fawkes::Exception &e) {
570 exc_caught = true;
571 lua_pushstring(tolua_S, e.what_no_backtrace());
572 }
573 catch (std::exception &e) {
574 exc_caught = true;
575 lua_pushstring(tolua_S, e.what());
576 }
577 if (exc_caught) lua_error(tolua_S);
578
579 }
580 return 1;
581#ifndef TOLUA_RELEASE
582 tolua_lerror:
583 tolua_error(tolua_S,"#ferror in function 'hash'.",&tolua_err);
584 return 0;
585#endif
586}
587#endif //#ifndef TOLUA_DISABLE
588
589/* method: hash_size of class fawkes::Interface */
590#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_hash_size00
591static int tolua_fawkesinterface_fawkes_Interface_hash_size00(lua_State* tolua_S)
592{
593#ifndef TOLUA_RELEASE
594 tolua_Error tolua_err;
595 if (
596 !tolua_isusertype(tolua_S,1,"const fawkes::Interface",0,&tolua_err) ||
597 !tolua_isnoobj(tolua_S,2,&tolua_err)
598 )
599 goto tolua_lerror;
600 else
601#endif
602 {
603 const fawkes::Interface* self = (const fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
604#ifndef TOLUA_RELEASE
605 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'hash_size'", NULL);
606#endif
607 bool exc_caught = false;
608 try {
609 {
610 size_t tolua_ret = (size_t) self->hash_size();
611 {
612#ifdef __cplusplus
613 void* tolua_obj = Mtolua_new((size_t)(tolua_ret));
614 tolua_pushusertype(tolua_S,tolua_obj,"size_t");
615 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
616#else
617 void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(size_t));
618 tolua_pushusertype(tolua_S,tolua_obj,"size_t");
619 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
620#endif
621 }
622 }
623 } catch (fawkes::Exception &e) {
624 exc_caught = true;
625 lua_pushstring(tolua_S, e.what_no_backtrace());
626 }
627 catch (std::exception &e) {
628 exc_caught = true;
629 lua_pushstring(tolua_S, e.what());
630 }
631 if (exc_caught) lua_error(tolua_S);
632
633 }
634 return 1;
635#ifndef TOLUA_RELEASE
636 tolua_lerror:
637 tolua_error(tolua_S,"#ferror in function 'hash_size'.",&tolua_err);
638 return 0;
639#endif
640}
641#endif //#ifndef TOLUA_DISABLE
642
643/* method: hash_printable of class fawkes::Interface */
644#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_hash_printable00
645static int tolua_fawkesinterface_fawkes_Interface_hash_printable00(lua_State* tolua_S)
646{
647#ifndef TOLUA_RELEASE
648 tolua_Error tolua_err;
649 if (
650 !tolua_isusertype(tolua_S,1,"const fawkes::Interface",0,&tolua_err) ||
651 !tolua_isnoobj(tolua_S,2,&tolua_err)
652 )
653 goto tolua_lerror;
654 else
655#endif
656 {
657 const fawkes::Interface* self = (const fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
658#ifndef TOLUA_RELEASE
659 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'hash_printable'", NULL);
660#endif
661 bool exc_caught = false;
662 try {
663 {
664 const char* tolua_ret = (const char*) self->hash_printable();
665 tolua_pushstring(tolua_S,(const char*)tolua_ret);
666 }
667 } catch (fawkes::Exception &e) {
668 exc_caught = true;
669 lua_pushstring(tolua_S, e.what_no_backtrace());
670 }
671 catch (std::exception &e) {
672 exc_caught = true;
673 lua_pushstring(tolua_S, e.what());
674 }
675 if (exc_caught) lua_error(tolua_S);
676
677 }
678 return 1;
679#ifndef TOLUA_RELEASE
680 tolua_lerror:
681 tolua_error(tolua_S,"#ferror in function 'hash_printable'.",&tolua_err);
682 return 0;
683#endif
684}
685#endif //#ifndef TOLUA_DISABLE
686
687/* method: is_writer of class fawkes::Interface */
688#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_is_writer00
689static int tolua_fawkesinterface_fawkes_Interface_is_writer00(lua_State* tolua_S)
690{
691#ifndef TOLUA_RELEASE
692 tolua_Error tolua_err;
693 if (
694 !tolua_isusertype(tolua_S,1,"const fawkes::Interface",0,&tolua_err) ||
695 !tolua_isnoobj(tolua_S,2,&tolua_err)
696 )
697 goto tolua_lerror;
698 else
699#endif
700 {
701 const fawkes::Interface* self = (const fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
702#ifndef TOLUA_RELEASE
703 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'is_writer'", NULL);
704#endif
705 bool exc_caught = false;
706 try {
707 {
708 bool tolua_ret = (bool) self->is_writer();
709 tolua_pushboolean(tolua_S,(bool)tolua_ret);
710 }
711 } catch (fawkes::Exception &e) {
712 exc_caught = true;
713 lua_pushstring(tolua_S, e.what_no_backtrace());
714 }
715 catch (std::exception &e) {
716 exc_caught = true;
717 lua_pushstring(tolua_S, e.what());
718 }
719 if (exc_caught) lua_error(tolua_S);
720
721 }
722 return 1;
723#ifndef TOLUA_RELEASE
724 tolua_lerror:
725 tolua_error(tolua_S,"#ferror in function 'is_writer'.",&tolua_err);
726 return 0;
727#endif
728}
729#endif //#ifndef TOLUA_DISABLE
730
731/* method: set_from_chunk of class fawkes::Interface */
732#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_set_from_chunk00
733static int tolua_fawkesinterface_fawkes_Interface_set_from_chunk00(lua_State* tolua_S)
734{
735#ifndef TOLUA_RELEASE
736 tolua_Error tolua_err;
737 if (
738 !tolua_isusertype(tolua_S,1,"fawkes::Interface",0,&tolua_err) ||
739 !tolua_isuserdata(tolua_S,2,0,&tolua_err) ||
740 !tolua_isnoobj(tolua_S,3,&tolua_err)
741 )
742 goto tolua_lerror;
743 else
744#endif
745 {
746 fawkes::Interface* self = (fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
747 void* chunk = ((void*) tolua_touserdata(tolua_S,2,0));
748#ifndef TOLUA_RELEASE
749 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'set_from_chunk'", NULL);
750#endif
751 bool exc_caught = false;
752 try {
753 {
754 self->set_from_chunk(chunk);
755 }
756 } catch (fawkes::Exception &e) {
757 exc_caught = true;
758 lua_pushstring(tolua_S, e.what_no_backtrace());
759 }
760 catch (std::exception &e) {
761 exc_caught = true;
762 lua_pushstring(tolua_S, e.what());
763 }
764 if (exc_caught) lua_error(tolua_S);
765
766 }
767 return 0;
768#ifndef TOLUA_RELEASE
769 tolua_lerror:
770 tolua_error(tolua_S,"#ferror in function 'set_from_chunk'.",&tolua_err);
771 return 0;
772#endif
773}
774#endif //#ifndef TOLUA_DISABLE
775
776/* method: create_message of class fawkes::Interface */
777#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_create_message_generic00
778static int tolua_fawkesinterface_fawkes_Interface_create_message_generic00(lua_State* tolua_S)
779{
780#ifndef TOLUA_RELEASE
781 tolua_Error tolua_err;
782 if (
783 !tolua_isusertype(tolua_S,1,"const fawkes::Interface",0,&tolua_err) ||
784 !tolua_isstring(tolua_S,2,0,&tolua_err) ||
785 !tolua_isnoobj(tolua_S,3,&tolua_err)
786 )
787 goto tolua_lerror;
788 else
789#endif
790 {
791 const fawkes::Interface* self = (const fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
792 const char* type = ((const char*) tolua_tostring(tolua_S,2,0));
793#ifndef TOLUA_RELEASE
794 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'create_message'", NULL);
795#endif
796 bool exc_caught = false;
797 try {
798 {
799 fawkes::Message* tolua_ret = (fawkes::Message*) self->create_message(type);
800 tolua_pushusertype(tolua_S,(void*)tolua_ret,"fawkes::Message");
801 }
802 } catch (fawkes::Exception &e) {
803 exc_caught = true;
804 lua_pushstring(tolua_S, e.what_no_backtrace());
805 }
806 catch (std::exception &e) {
807 exc_caught = true;
808 lua_pushstring(tolua_S, e.what());
809 }
810 if (exc_caught) lua_error(tolua_S);
811
812 }
813 return 1;
814#ifndef TOLUA_RELEASE
815 tolua_lerror:
816 tolua_error(tolua_S,"#ferror in function 'create_message_generic'.",&tolua_err);
817 return 0;
818#endif
819}
820#endif //#ifndef TOLUA_DISABLE
821
822/* method: read of class fawkes::Interface */
823#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_read00
824static int tolua_fawkesinterface_fawkes_Interface_read00(lua_State* tolua_S)
825{
826#ifndef TOLUA_RELEASE
827 tolua_Error tolua_err;
828 if (
829 !tolua_isusertype(tolua_S,1,"fawkes::Interface",0,&tolua_err) ||
830 !tolua_isnoobj(tolua_S,2,&tolua_err)
831 )
832 goto tolua_lerror;
833 else
834#endif
835 {
836 fawkes::Interface* self = (fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
837#ifndef TOLUA_RELEASE
838 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'read'", NULL);
839#endif
840 bool exc_caught = false;
841 try {
842 {
843 self->read();
844 }
845 } catch (fawkes::Exception &e) {
846 exc_caught = true;
847 lua_pushstring(tolua_S, e.what_no_backtrace());
848 }
849 catch (std::exception &e) {
850 exc_caught = true;
851 lua_pushstring(tolua_S, e.what());
852 }
853 if (exc_caught) lua_error(tolua_S);
854
855 }
856 return 0;
857#ifndef TOLUA_RELEASE
858 tolua_lerror:
859 tolua_error(tolua_S,"#ferror in function 'read'.",&tolua_err);
860 return 0;
861#endif
862}
863#endif //#ifndef TOLUA_DISABLE
864
865/* method: write of class fawkes::Interface */
866#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_write00
867static int tolua_fawkesinterface_fawkes_Interface_write00(lua_State* tolua_S)
868{
869#ifndef TOLUA_RELEASE
870 tolua_Error tolua_err;
871 if (
872 !tolua_isusertype(tolua_S,1,"fawkes::Interface",0,&tolua_err) ||
873 !tolua_isnoobj(tolua_S,2,&tolua_err)
874 )
875 goto tolua_lerror;
876 else
877#endif
878 {
879 fawkes::Interface* self = (fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
880#ifndef TOLUA_RELEASE
881 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'write'", NULL);
882#endif
883 bool exc_caught = false;
884 try {
885 {
886 self->write();
887 }
888 } catch (fawkes::Exception &e) {
889 exc_caught = true;
890 lua_pushstring(tolua_S, e.what_no_backtrace());
891 }
892 catch (std::exception &e) {
893 exc_caught = true;
894 lua_pushstring(tolua_S, e.what());
895 }
896 if (exc_caught) lua_error(tolua_S);
897
898 }
899 return 0;
900#ifndef TOLUA_RELEASE
901 tolua_lerror:
902 tolua_error(tolua_S,"#ferror in function 'write'.",&tolua_err);
903 return 0;
904#endif
905}
906#endif //#ifndef TOLUA_DISABLE
907
908/* method: has_writer of class fawkes::Interface */
909#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_has_writer00
910static int tolua_fawkesinterface_fawkes_Interface_has_writer00(lua_State* tolua_S)
911{
912#ifndef TOLUA_RELEASE
913 tolua_Error tolua_err;
914 if (
915 !tolua_isusertype(tolua_S,1,"const fawkes::Interface",0,&tolua_err) ||
916 !tolua_isnoobj(tolua_S,2,&tolua_err)
917 )
918 goto tolua_lerror;
919 else
920#endif
921 {
922 const fawkes::Interface* self = (const fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
923#ifndef TOLUA_RELEASE
924 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'has_writer'", NULL);
925#endif
926 bool exc_caught = false;
927 try {
928 {
929 bool tolua_ret = (bool) self->has_writer();
930 tolua_pushboolean(tolua_S,(bool)tolua_ret);
931 }
932 } catch (fawkes::Exception &e) {
933 exc_caught = true;
934 lua_pushstring(tolua_S, e.what_no_backtrace());
935 }
936 catch (std::exception &e) {
937 exc_caught = true;
938 lua_pushstring(tolua_S, e.what());
939 }
940 if (exc_caught) lua_error(tolua_S);
941
942 }
943 return 1;
944#ifndef TOLUA_RELEASE
945 tolua_lerror:
946 tolua_error(tolua_S,"#ferror in function 'has_writer'.",&tolua_err);
947 return 0;
948#endif
949}
950#endif //#ifndef TOLUA_DISABLE
951
952/* method: num_readers of class fawkes::Interface */
953#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_num_readers00
954static int tolua_fawkesinterface_fawkes_Interface_num_readers00(lua_State* tolua_S)
955{
956#ifndef TOLUA_RELEASE
957 tolua_Error tolua_err;
958 if (
959 !tolua_isusertype(tolua_S,1,"const fawkes::Interface",0,&tolua_err) ||
960 !tolua_isnoobj(tolua_S,2,&tolua_err)
961 )
962 goto tolua_lerror;
963 else
964#endif
965 {
966 const fawkes::Interface* self = (const fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
967#ifndef TOLUA_RELEASE
968 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'num_readers'", NULL);
969#endif
970 bool exc_caught = false;
971 try {
972 {
973 unsigned int tolua_ret = (unsigned int) self->num_readers();
974 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
975 }
976 } catch (fawkes::Exception &e) {
977 exc_caught = true;
978 lua_pushstring(tolua_S, e.what_no_backtrace());
979 }
980 catch (std::exception &e) {
981 exc_caught = true;
982 lua_pushstring(tolua_S, e.what());
983 }
984 if (exc_caught) lua_error(tolua_S);
985
986 }
987 return 1;
988#ifndef TOLUA_RELEASE
989 tolua_lerror:
990 tolua_error(tolua_S,"#ferror in function 'num_readers'.",&tolua_err);
991 return 0;
992#endif
993}
994#endif //#ifndef TOLUA_DISABLE
995
996/* method: changed of class fawkes::Interface */
997#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_changed00
998static int tolua_fawkesinterface_fawkes_Interface_changed00(lua_State* tolua_S)
999{
1000#ifndef TOLUA_RELEASE
1001 tolua_Error tolua_err;
1002 if (
1003 !tolua_isusertype(tolua_S,1,"const fawkes::Interface",0,&tolua_err) ||
1004 !tolua_isnoobj(tolua_S,2,&tolua_err)
1005 )
1006 goto tolua_lerror;
1007 else
1008#endif
1009 {
1010 const fawkes::Interface* self = (const fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
1011#ifndef TOLUA_RELEASE
1012 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'changed'", NULL);
1013#endif
1014 bool exc_caught = false;
1015 try {
1016 {
1017 bool tolua_ret = (bool) self->changed();
1018 tolua_pushboolean(tolua_S,(bool)tolua_ret);
1019 }
1020 } catch (fawkes::Exception &e) {
1021 exc_caught = true;
1022 lua_pushstring(tolua_S, e.what_no_backtrace());
1023 }
1024 catch (std::exception &e) {
1025 exc_caught = true;
1026 lua_pushstring(tolua_S, e.what());
1027 }
1028 if (exc_caught) lua_error(tolua_S);
1029
1030 }
1031 return 1;
1032#ifndef TOLUA_RELEASE
1033 tolua_lerror:
1034 tolua_error(tolua_S,"#ferror in function 'changed'.",&tolua_err);
1035 return 0;
1036#endif
1037}
1038#endif //#ifndef TOLUA_DISABLE
1039
1040/* method: refreshed of class fawkes::Interface */
1041#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_refreshed00
1042static int tolua_fawkesinterface_fawkes_Interface_refreshed00(lua_State* tolua_S)
1043{
1044#ifndef TOLUA_RELEASE
1045 tolua_Error tolua_err;
1046 if (
1047 !tolua_isusertype(tolua_S,1,"const fawkes::Interface",0,&tolua_err) ||
1048 !tolua_isnoobj(tolua_S,2,&tolua_err)
1049 )
1050 goto tolua_lerror;
1051 else
1052#endif
1053 {
1054 const fawkes::Interface* self = (const fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
1055#ifndef TOLUA_RELEASE
1056 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'refreshed'", NULL);
1057#endif
1058 bool exc_caught = false;
1059 try {
1060 {
1061 bool tolua_ret = (bool) self->refreshed();
1062 tolua_pushboolean(tolua_S,(bool)tolua_ret);
1063 }
1064 } catch (fawkes::Exception &e) {
1065 exc_caught = true;
1066 lua_pushstring(tolua_S, e.what_no_backtrace());
1067 }
1068 catch (std::exception &e) {
1069 exc_caught = true;
1070 lua_pushstring(tolua_S, e.what());
1071 }
1072 if (exc_caught) lua_error(tolua_S);
1073
1074 }
1075 return 1;
1076#ifndef TOLUA_RELEASE
1077 tolua_lerror:
1078 tolua_error(tolua_S,"#ferror in function 'refreshed'.",&tolua_err);
1079 return 0;
1080#endif
1081}
1082#endif //#ifndef TOLUA_DISABLE
1083
1084/* method: timestamp of class fawkes::Interface */
1085#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_timestamp00
1086static int tolua_fawkesinterface_fawkes_Interface_timestamp00(lua_State* tolua_S)
1087{
1088#ifndef TOLUA_RELEASE
1089 tolua_Error tolua_err;
1090 if (
1091 !tolua_isusertype(tolua_S,1,"const fawkes::Interface",0,&tolua_err) ||
1092 !tolua_isnoobj(tolua_S,2,&tolua_err)
1093 )
1094 goto tolua_lerror;
1095 else
1096#endif
1097 {
1098 const fawkes::Interface* self = (const fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
1099#ifndef TOLUA_RELEASE
1100 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'timestamp'", NULL);
1101#endif
1102 bool exc_caught = false;
1103 try {
1104 {
1105 const fawkes::Time* tolua_ret = (const fawkes::Time*) self->timestamp();
1106 tolua_pushusertype(tolua_S,(void*)tolua_ret,"const fawkes::Time");
1107 }
1108 } catch (fawkes::Exception &e) {
1109 exc_caught = true;
1110 lua_pushstring(tolua_S, e.what_no_backtrace());
1111 }
1112 catch (std::exception &e) {
1113 exc_caught = true;
1114 lua_pushstring(tolua_S, e.what());
1115 }
1116 if (exc_caught) lua_error(tolua_S);
1117
1118 }
1119 return 1;
1120#ifndef TOLUA_RELEASE
1121 tolua_lerror:
1122 tolua_error(tolua_S,"#ferror in function 'timestamp'.",&tolua_err);
1123 return 0;
1124#endif
1125}
1126#endif //#ifndef TOLUA_DISABLE
1127
1128/* method: set_auto_timestamping of class fawkes::Interface */
1129#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_set_auto_timestamping00
1130static int tolua_fawkesinterface_fawkes_Interface_set_auto_timestamping00(lua_State* tolua_S)
1131{
1132#ifndef TOLUA_RELEASE
1133 tolua_Error tolua_err;
1134 if (
1135 !tolua_isusertype(tolua_S,1,"fawkes::Interface",0,&tolua_err) ||
1136 !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
1137 !tolua_isnoobj(tolua_S,3,&tolua_err)
1138 )
1139 goto tolua_lerror;
1140 else
1141#endif
1142 {
1143 fawkes::Interface* self = (fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
1144 bool enabled = ((bool) tolua_toboolean(tolua_S,2,0));
1145#ifndef TOLUA_RELEASE
1146 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'set_auto_timestamping'", NULL);
1147#endif
1148 bool exc_caught = false;
1149 try {
1150 {
1151 self->set_auto_timestamping(enabled);
1152 }
1153 } catch (fawkes::Exception &e) {
1154 exc_caught = true;
1155 lua_pushstring(tolua_S, e.what_no_backtrace());
1156 }
1157 catch (std::exception &e) {
1158 exc_caught = true;
1159 lua_pushstring(tolua_S, e.what());
1160 }
1161 if (exc_caught) lua_error(tolua_S);
1162
1163 }
1164 return 0;
1165#ifndef TOLUA_RELEASE
1166 tolua_lerror:
1167 tolua_error(tolua_S,"#ferror in function 'set_auto_timestamping'.",&tolua_err);
1168 return 0;
1169#endif
1170}
1171#endif //#ifndef TOLUA_DISABLE
1172
1173/* method: set_timestamp of class fawkes::Interface */
1174#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_set_timestamp00
1175static int tolua_fawkesinterface_fawkes_Interface_set_timestamp00(lua_State* tolua_S)
1176{
1177#ifndef TOLUA_RELEASE
1178 tolua_Error tolua_err;
1179 if (
1180 !tolua_isusertype(tolua_S,1,"fawkes::Interface",0,&tolua_err) ||
1181 !tolua_isusertype(tolua_S,2,"const fawkes::Time",0,&tolua_err) ||
1182 !tolua_isnoobj(tolua_S,3,&tolua_err)
1183 )
1184 goto tolua_lerror;
1185 else
1186#endif
1187 {
1188 fawkes::Interface* self = (fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
1189 const fawkes::Time* t = ((const fawkes::Time*) tolua_tousertype(tolua_S,2,0));
1190#ifndef TOLUA_RELEASE
1191 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'set_timestamp'", NULL);
1192#endif
1193 bool exc_caught = false;
1194 try {
1195 {
1196 self->set_timestamp(t);
1197 }
1198 } catch (fawkes::Exception &e) {
1199 exc_caught = true;
1200 lua_pushstring(tolua_S, e.what_no_backtrace());
1201 }
1202 catch (std::exception &e) {
1203 exc_caught = true;
1204 lua_pushstring(tolua_S, e.what());
1205 }
1206 if (exc_caught) lua_error(tolua_S);
1207
1208 }
1209 return 0;
1210#ifndef TOLUA_RELEASE
1211 tolua_lerror:
1212 tolua_error(tolua_S,"#ferror in function 'set_timestamp'.",&tolua_err);
1213 return 0;
1214#endif
1215}
1216#endif //#ifndef TOLUA_DISABLE
1217
1218/* method: set_clock of class fawkes::Interface */
1219#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_set_clock00
1220static int tolua_fawkesinterface_fawkes_Interface_set_clock00(lua_State* tolua_S)
1221{
1222#ifndef TOLUA_RELEASE
1223 tolua_Error tolua_err;
1224 if (
1225 !tolua_isusertype(tolua_S,1,"fawkes::Interface",0,&tolua_err) ||
1226 !tolua_isusertype(tolua_S,2,"fawkes::Clock",0,&tolua_err) ||
1227 !tolua_isnoobj(tolua_S,3,&tolua_err)
1228 )
1229 goto tolua_lerror;
1230 else
1231#endif
1232 {
1233 fawkes::Interface* self = (fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
1234 fawkes::Clock* clock = ((fawkes::Clock*) tolua_tousertype(tolua_S,2,0));
1235#ifndef TOLUA_RELEASE
1236 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'set_clock'", NULL);
1237#endif
1238 bool exc_caught = false;
1239 try {
1240 {
1241 self->set_clock(clock);
1242 }
1243 } catch (fawkes::Exception &e) {
1244 exc_caught = true;
1245 lua_pushstring(tolua_S, e.what_no_backtrace());
1246 }
1247 catch (std::exception &e) {
1248 exc_caught = true;
1249 lua_pushstring(tolua_S, e.what());
1250 }
1251 if (exc_caught) lua_error(tolua_S);
1252
1253 }
1254 return 0;
1255#ifndef TOLUA_RELEASE
1256 tolua_lerror:
1257 tolua_error(tolua_S,"#ferror in function 'set_clock'.",&tolua_err);
1258 return 0;
1259#endif
1260}
1261#endif //#ifndef TOLUA_DISABLE
1262
1263/* method: msgq_enqueue_copy of class fawkes::Interface */
1264#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_msgq_enqueue_copy00
1265static int tolua_fawkesinterface_fawkes_Interface_msgq_enqueue_copy00(lua_State* tolua_S)
1266{
1267#ifndef TOLUA_RELEASE
1268 tolua_Error tolua_err;
1269 if (
1270 !tolua_isusertype(tolua_S,1,"fawkes::Interface",0,&tolua_err) ||
1271 !tolua_isusertype(tolua_S,2,"fawkes::Message",0,&tolua_err) ||
1272 !tolua_isnoobj(tolua_S,3,&tolua_err)
1273 )
1274 goto tolua_lerror;
1275 else
1276#endif
1277 {
1278 fawkes::Interface* self = (fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
1279 fawkes::Message* message = ((fawkes::Message*) tolua_tousertype(tolua_S,2,0));
1280#ifndef TOLUA_RELEASE
1281 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_enqueue_copy'", NULL);
1282#endif
1283 bool exc_caught = false;
1284 try {
1285 {
1286 unsigned int tolua_ret = (unsigned int) self->msgq_enqueue_copy(message);
1287 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1288 }
1289 } catch (fawkes::Exception &e) {
1290 exc_caught = true;
1291 lua_pushstring(tolua_S, e.what_no_backtrace());
1292 }
1293 catch (std::exception &e) {
1294 exc_caught = true;
1295 lua_pushstring(tolua_S, e.what());
1296 }
1297 if (exc_caught) lua_error(tolua_S);
1298
1299 }
1300 return 1;
1301#ifndef TOLUA_RELEASE
1302 tolua_lerror:
1303 tolua_error(tolua_S,"#ferror in function 'msgq_enqueue_copy'.",&tolua_err);
1304 return 0;
1305#endif
1306}
1307#endif //#ifndef TOLUA_DISABLE
1308
1309/* method: msgq_remove of class fawkes::Interface */
1310#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_msgq_remove00
1311static int tolua_fawkesinterface_fawkes_Interface_msgq_remove00(lua_State* tolua_S)
1312{
1313#ifndef TOLUA_RELEASE
1314 tolua_Error tolua_err;
1315 if (
1316 !tolua_isusertype(tolua_S,1,"fawkes::Interface",0,&tolua_err) ||
1317 !tolua_isusertype(tolua_S,2,"fawkes::Message",0,&tolua_err) ||
1318 !tolua_isnoobj(tolua_S,3,&tolua_err)
1319 )
1320 goto tolua_lerror;
1321 else
1322#endif
1323 {
1324 fawkes::Interface* self = (fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
1325 fawkes::Message* message = ((fawkes::Message*) tolua_tousertype(tolua_S,2,0));
1326#ifndef TOLUA_RELEASE
1327 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_remove'", NULL);
1328#endif
1329 bool exc_caught = false;
1330 try {
1331 {
1332 self->msgq_remove(message);
1333 }
1334 } catch (fawkes::Exception &e) {
1335 exc_caught = true;
1336 lua_pushstring(tolua_S, e.what_no_backtrace());
1337 }
1338 catch (std::exception &e) {
1339 exc_caught = true;
1340 lua_pushstring(tolua_S, e.what());
1341 }
1342 if (exc_caught) lua_error(tolua_S);
1343
1344 }
1345 return 0;
1346#ifndef TOLUA_RELEASE
1347 tolua_lerror:
1348 tolua_error(tolua_S,"#ferror in function 'msgq_remove'.",&tolua_err);
1349 return 0;
1350#endif
1351}
1352#endif //#ifndef TOLUA_DISABLE
1353
1354/* method: msgq_remove of class fawkes::Interface */
1355#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_msgq_remove01
1356static int tolua_fawkesinterface_fawkes_Interface_msgq_remove01(lua_State* tolua_S)
1357{
1358 tolua_Error tolua_err;
1359 if (
1360 !tolua_isusertype(tolua_S,1,"fawkes::Interface",0,&tolua_err) ||
1361 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1362 !tolua_isnoobj(tolua_S,3,&tolua_err)
1363 )
1364 goto tolua_lerror;
1365 else
1366 {
1367 fawkes::Interface* self = (fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
1368 unsigned int message_id = ((unsigned int) tolua_tonumber(tolua_S,2,0));
1369#ifndef TOLUA_RELEASE
1370 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_remove'", NULL);
1371#endif
1372 bool exc_caught = false;
1373 try {
1374 {
1375 self->msgq_remove(message_id);
1376 }
1377 } catch (fawkes::Exception &e) {
1378 exc_caught = true;
1379 lua_pushstring(tolua_S, e.what_no_backtrace());
1380 }
1381 catch (std::exception &e) {
1382 exc_caught = true;
1383 lua_pushstring(tolua_S, e.what());
1384 }
1385 if (exc_caught) lua_error(tolua_S);
1386
1387 }
1388 return 0;
1389tolua_lerror:
1390 return tolua_fawkesinterface_fawkes_Interface_msgq_remove00(tolua_S);
1391}
1392#endif //#ifndef TOLUA_DISABLE
1393
1394/* method: msgq_size of class fawkes::Interface */
1395#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_msgq_size00
1396static int tolua_fawkesinterface_fawkes_Interface_msgq_size00(lua_State* tolua_S)
1397{
1398#ifndef TOLUA_RELEASE
1399 tolua_Error tolua_err;
1400 if (
1401 !tolua_isusertype(tolua_S,1,"fawkes::Interface",0,&tolua_err) ||
1402 !tolua_isnoobj(tolua_S,2,&tolua_err)
1403 )
1404 goto tolua_lerror;
1405 else
1406#endif
1407 {
1408 fawkes::Interface* self = (fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
1409#ifndef TOLUA_RELEASE
1410 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_size'", NULL);
1411#endif
1412 bool exc_caught = false;
1413 try {
1414 {
1415 unsigned int tolua_ret = (unsigned int) self->msgq_size();
1416 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1417 }
1418 } catch (fawkes::Exception &e) {
1419 exc_caught = true;
1420 lua_pushstring(tolua_S, e.what_no_backtrace());
1421 }
1422 catch (std::exception &e) {
1423 exc_caught = true;
1424 lua_pushstring(tolua_S, e.what());
1425 }
1426 if (exc_caught) lua_error(tolua_S);
1427
1428 }
1429 return 1;
1430#ifndef TOLUA_RELEASE
1431 tolua_lerror:
1432 tolua_error(tolua_S,"#ferror in function 'msgq_size'.",&tolua_err);
1433 return 0;
1434#endif
1435}
1436#endif //#ifndef TOLUA_DISABLE
1437
1438/* method: msgq_flush of class fawkes::Interface */
1439#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_msgq_flush00
1440static int tolua_fawkesinterface_fawkes_Interface_msgq_flush00(lua_State* tolua_S)
1441{
1442#ifndef TOLUA_RELEASE
1443 tolua_Error tolua_err;
1444 if (
1445 !tolua_isusertype(tolua_S,1,"fawkes::Interface",0,&tolua_err) ||
1446 !tolua_isnoobj(tolua_S,2,&tolua_err)
1447 )
1448 goto tolua_lerror;
1449 else
1450#endif
1451 {
1452 fawkes::Interface* self = (fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
1453#ifndef TOLUA_RELEASE
1454 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_flush'", NULL);
1455#endif
1456 bool exc_caught = false;
1457 try {
1458 {
1459 self->msgq_flush();
1460 }
1461 } catch (fawkes::Exception &e) {
1462 exc_caught = true;
1463 lua_pushstring(tolua_S, e.what_no_backtrace());
1464 }
1465 catch (std::exception &e) {
1466 exc_caught = true;
1467 lua_pushstring(tolua_S, e.what());
1468 }
1469 if (exc_caught) lua_error(tolua_S);
1470
1471 }
1472 return 0;
1473#ifndef TOLUA_RELEASE
1474 tolua_lerror:
1475 tolua_error(tolua_S,"#ferror in function 'msgq_flush'.",&tolua_err);
1476 return 0;
1477#endif
1478}
1479#endif //#ifndef TOLUA_DISABLE
1480
1481/* method: msgq_lock of class fawkes::Interface */
1482#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_msgq_lock00
1483static int tolua_fawkesinterface_fawkes_Interface_msgq_lock00(lua_State* tolua_S)
1484{
1485#ifndef TOLUA_RELEASE
1486 tolua_Error tolua_err;
1487 if (
1488 !tolua_isusertype(tolua_S,1,"fawkes::Interface",0,&tolua_err) ||
1489 !tolua_isnoobj(tolua_S,2,&tolua_err)
1490 )
1491 goto tolua_lerror;
1492 else
1493#endif
1494 {
1495 fawkes::Interface* self = (fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
1496#ifndef TOLUA_RELEASE
1497 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_lock'", NULL);
1498#endif
1499 bool exc_caught = false;
1500 try {
1501 {
1502 self->msgq_lock();
1503 }
1504 } catch (fawkes::Exception &e) {
1505 exc_caught = true;
1506 lua_pushstring(tolua_S, e.what_no_backtrace());
1507 }
1508 catch (std::exception &e) {
1509 exc_caught = true;
1510 lua_pushstring(tolua_S, e.what());
1511 }
1512 if (exc_caught) lua_error(tolua_S);
1513
1514 }
1515 return 0;
1516#ifndef TOLUA_RELEASE
1517 tolua_lerror:
1518 tolua_error(tolua_S,"#ferror in function 'msgq_lock'.",&tolua_err);
1519 return 0;
1520#endif
1521}
1522#endif //#ifndef TOLUA_DISABLE
1523
1524/* method: msgq_try_lock of class fawkes::Interface */
1525#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_msgq_try_lock00
1526static int tolua_fawkesinterface_fawkes_Interface_msgq_try_lock00(lua_State* tolua_S)
1527{
1528#ifndef TOLUA_RELEASE
1529 tolua_Error tolua_err;
1530 if (
1531 !tolua_isusertype(tolua_S,1,"fawkes::Interface",0,&tolua_err) ||
1532 !tolua_isnoobj(tolua_S,2,&tolua_err)
1533 )
1534 goto tolua_lerror;
1535 else
1536#endif
1537 {
1538 fawkes::Interface* self = (fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
1539#ifndef TOLUA_RELEASE
1540 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_try_lock'", NULL);
1541#endif
1542 bool exc_caught = false;
1543 try {
1544 {
1545 bool tolua_ret = (bool) self->msgq_try_lock();
1546 tolua_pushboolean(tolua_S,(bool)tolua_ret);
1547 }
1548 } catch (fawkes::Exception &e) {
1549 exc_caught = true;
1550 lua_pushstring(tolua_S, e.what_no_backtrace());
1551 }
1552 catch (std::exception &e) {
1553 exc_caught = true;
1554 lua_pushstring(tolua_S, e.what());
1555 }
1556 if (exc_caught) lua_error(tolua_S);
1557
1558 }
1559 return 1;
1560#ifndef TOLUA_RELEASE
1561 tolua_lerror:
1562 tolua_error(tolua_S,"#ferror in function 'msgq_try_lock'.",&tolua_err);
1563 return 0;
1564#endif
1565}
1566#endif //#ifndef TOLUA_DISABLE
1567
1568/* method: msgq_unlock of class fawkes::Interface */
1569#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_msgq_unlock00
1570static int tolua_fawkesinterface_fawkes_Interface_msgq_unlock00(lua_State* tolua_S)
1571{
1572#ifndef TOLUA_RELEASE
1573 tolua_Error tolua_err;
1574 if (
1575 !tolua_isusertype(tolua_S,1,"fawkes::Interface",0,&tolua_err) ||
1576 !tolua_isnoobj(tolua_S,2,&tolua_err)
1577 )
1578 goto tolua_lerror;
1579 else
1580#endif
1581 {
1582 fawkes::Interface* self = (fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
1583#ifndef TOLUA_RELEASE
1584 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_unlock'", NULL);
1585#endif
1586 bool exc_caught = false;
1587 try {
1588 {
1589 self->msgq_unlock();
1590 }
1591 } catch (fawkes::Exception &e) {
1592 exc_caught = true;
1593 lua_pushstring(tolua_S, e.what_no_backtrace());
1594 }
1595 catch (std::exception &e) {
1596 exc_caught = true;
1597 lua_pushstring(tolua_S, e.what());
1598 }
1599 if (exc_caught) lua_error(tolua_S);
1600
1601 }
1602 return 0;
1603#ifndef TOLUA_RELEASE
1604 tolua_lerror:
1605 tolua_error(tolua_S,"#ferror in function 'msgq_unlock'.",&tolua_err);
1606 return 0;
1607#endif
1608}
1609#endif //#ifndef TOLUA_DISABLE
1610
1611/* method: msgq_pop of class fawkes::Interface */
1612#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_msgq_pop00
1613static int tolua_fawkesinterface_fawkes_Interface_msgq_pop00(lua_State* tolua_S)
1614{
1615#ifndef TOLUA_RELEASE
1616 tolua_Error tolua_err;
1617 if (
1618 !tolua_isusertype(tolua_S,1,"fawkes::Interface",0,&tolua_err) ||
1619 !tolua_isnoobj(tolua_S,2,&tolua_err)
1620 )
1621 goto tolua_lerror;
1622 else
1623#endif
1624 {
1625 fawkes::Interface* self = (fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
1626#ifndef TOLUA_RELEASE
1627 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_pop'", NULL);
1628#endif
1629 bool exc_caught = false;
1630 try {
1631 {
1632 self->msgq_pop();
1633 }
1634 } catch (fawkes::Exception &e) {
1635 exc_caught = true;
1636 lua_pushstring(tolua_S, e.what_no_backtrace());
1637 }
1638 catch (std::exception &e) {
1639 exc_caught = true;
1640 lua_pushstring(tolua_S, e.what());
1641 }
1642 if (exc_caught) lua_error(tolua_S);
1643
1644 }
1645 return 0;
1646#ifndef TOLUA_RELEASE
1647 tolua_lerror:
1648 tolua_error(tolua_S,"#ferror in function 'msgq_pop'.",&tolua_err);
1649 return 0;
1650#endif
1651}
1652#endif //#ifndef TOLUA_DISABLE
1653
1654/* method: msgq_first of class fawkes::Interface */
1655#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_msgq_first_generic00
1656static int tolua_fawkesinterface_fawkes_Interface_msgq_first_generic00(lua_State* tolua_S)
1657{
1658#ifndef TOLUA_RELEASE
1659 tolua_Error tolua_err;
1660 if (
1661 !tolua_isusertype(tolua_S,1,"fawkes::Interface",0,&tolua_err) ||
1662 !tolua_isnoobj(tolua_S,2,&tolua_err)
1663 )
1664 goto tolua_lerror;
1665 else
1666#endif
1667 {
1668 fawkes::Interface* self = (fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
1669#ifndef TOLUA_RELEASE
1670 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_first'", NULL);
1671#endif
1672 bool exc_caught = false;
1673 try {
1674 {
1675 fawkes::Message* tolua_ret = (fawkes::Message*) self->msgq_first();
1676 tolua_pushusertype(tolua_S,(void*)tolua_ret,"fawkes::Message");
1677 }
1678 } catch (fawkes::Exception &e) {
1679 exc_caught = true;
1680 lua_pushstring(tolua_S, e.what_no_backtrace());
1681 }
1682 catch (std::exception &e) {
1683 exc_caught = true;
1684 lua_pushstring(tolua_S, e.what());
1685 }
1686 if (exc_caught) lua_error(tolua_S);
1687
1688 }
1689 return 1;
1690#ifndef TOLUA_RELEASE
1691 tolua_lerror:
1692 tolua_error(tolua_S,"#ferror in function 'msgq_first_generic'.",&tolua_err);
1693 return 0;
1694#endif
1695}
1696#endif //#ifndef TOLUA_DISABLE
1697
1698/* method: msgq_empty of class fawkes::Interface */
1699#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Interface_msgq_empty00
1700static int tolua_fawkesinterface_fawkes_Interface_msgq_empty00(lua_State* tolua_S)
1701{
1702#ifndef TOLUA_RELEASE
1703 tolua_Error tolua_err;
1704 if (
1705 !tolua_isusertype(tolua_S,1,"fawkes::Interface",0,&tolua_err) ||
1706 !tolua_isnoobj(tolua_S,2,&tolua_err)
1707 )
1708 goto tolua_lerror;
1709 else
1710#endif
1711 {
1712 fawkes::Interface* self = (fawkes::Interface*) tolua_tousertype(tolua_S,1,0);
1713#ifndef TOLUA_RELEASE
1714 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_empty'", NULL);
1715#endif
1716 bool exc_caught = false;
1717 try {
1718 {
1719 bool tolua_ret = (bool) self->msgq_empty();
1720 tolua_pushboolean(tolua_S,(bool)tolua_ret);
1721 }
1722 } catch (fawkes::Exception &e) {
1723 exc_caught = true;
1724 lua_pushstring(tolua_S, e.what_no_backtrace());
1725 }
1726 catch (std::exception &e) {
1727 exc_caught = true;
1728 lua_pushstring(tolua_S, e.what());
1729 }
1730 if (exc_caught) lua_error(tolua_S);
1731
1732 }
1733 return 1;
1734#ifndef TOLUA_RELEASE
1735 tolua_lerror:
1736 tolua_error(tolua_S,"#ferror in function 'msgq_empty'.",&tolua_err);
1737 return 0;
1738#endif
1739}
1740#endif //#ifndef TOLUA_DISABLE
1741
1742/* method: new of class fawkes::Message */
1743#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Message_new00
1744static int tolua_fawkesinterface_fawkes_Message_new00(lua_State* tolua_S)
1745{
1746#ifndef TOLUA_RELEASE
1747 tolua_Error tolua_err;
1748 if (
1749 !tolua_isusertable(tolua_S,1,"fawkes::Message",0,&tolua_err) ||
1750 !tolua_isstring(tolua_S,2,0,&tolua_err) ||
1751 !tolua_isnoobj(tolua_S,3,&tolua_err)
1752 )
1753 goto tolua_lerror;
1754 else
1755#endif
1756 {
1757 const char* type = ((const char*) tolua_tostring(tolua_S,2,0));
1758 bool exc_caught = false;
1759 try {
1760 {
1761 fawkes::Message* tolua_ret = (fawkes::Message*) Mtolua_new((fawkes::Message)(type));
1762 tolua_pushusertype(tolua_S,(void*)tolua_ret,"fawkes::Message");
1763 }
1764 } catch (fawkes::Exception &e) {
1765 exc_caught = true;
1766 lua_pushstring(tolua_S, e.what_no_backtrace());
1767 }
1768 catch (std::exception &e) {
1769 exc_caught = true;
1770 lua_pushstring(tolua_S, e.what());
1771 }
1772 if (exc_caught) lua_error(tolua_S);
1773
1774 }
1775 return 1;
1776#ifndef TOLUA_RELEASE
1777 tolua_lerror:
1778 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
1779 return 0;
1780#endif
1781}
1782#endif //#ifndef TOLUA_DISABLE
1783
1784/* method: new_local of class fawkes::Message */
1785#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Message_new00_local
1786static int tolua_fawkesinterface_fawkes_Message_new00_local(lua_State* tolua_S)
1787{
1788#ifndef TOLUA_RELEASE
1789 tolua_Error tolua_err;
1790 if (
1791 !tolua_isusertable(tolua_S,1,"fawkes::Message",0,&tolua_err) ||
1792 !tolua_isstring(tolua_S,2,0,&tolua_err) ||
1793 !tolua_isnoobj(tolua_S,3,&tolua_err)
1794 )
1795 goto tolua_lerror;
1796 else
1797#endif
1798 {
1799 const char* type = ((const char*) tolua_tostring(tolua_S,2,0));
1800 bool exc_caught = false;
1801 try {
1802 {
1803 fawkes::Message* tolua_ret = (fawkes::Message*) Mtolua_new((fawkes::Message)(type));
1804 tolua_pushusertype(tolua_S,(void*)tolua_ret,"fawkes::Message");
1805 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1806 }
1807 } catch (fawkes::Exception &e) {
1808 exc_caught = true;
1809 lua_pushstring(tolua_S, e.what_no_backtrace());
1810 }
1811 catch (std::exception &e) {
1812 exc_caught = true;
1813 lua_pushstring(tolua_S, e.what());
1814 }
1815 if (exc_caught) lua_error(tolua_S);
1816
1817 }
1818 return 1;
1819#ifndef TOLUA_RELEASE
1820 tolua_lerror:
1821 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
1822 return 0;
1823#endif
1824}
1825#endif //#ifndef TOLUA_DISABLE
1826
1827/* method: new of class fawkes::Message */
1828#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Message_new01
1829static int tolua_fawkesinterface_fawkes_Message_new01(lua_State* tolua_S)
1830{
1831 tolua_Error tolua_err;
1832 if (
1833 !tolua_isusertable(tolua_S,1,"fawkes::Message",0,&tolua_err) ||
1834 !tolua_isusertype(tolua_S,2,"fawkes::Message",0,&tolua_err) ||
1835 !tolua_isnoobj(tolua_S,3,&tolua_err)
1836 )
1837 goto tolua_lerror;
1838 else
1839 {
1840 fawkes::Message* mesg = ((fawkes::Message*) tolua_tousertype(tolua_S,2,0));
1841 bool exc_caught = false;
1842 try {
1843 {
1844 fawkes::Message* tolua_ret = (fawkes::Message*) Mtolua_new((fawkes::Message)(mesg));
1845 tolua_pushusertype(tolua_S,(void*)tolua_ret,"fawkes::Message");
1846 }
1847 } catch (fawkes::Exception &e) {
1848 exc_caught = true;
1849 lua_pushstring(tolua_S, e.what_no_backtrace());
1850 }
1851 catch (std::exception &e) {
1852 exc_caught = true;
1853 lua_pushstring(tolua_S, e.what());
1854 }
1855 if (exc_caught) lua_error(tolua_S);
1856
1857 }
1858 return 1;
1859tolua_lerror:
1860 return tolua_fawkesinterface_fawkes_Message_new00(tolua_S);
1861}
1862#endif //#ifndef TOLUA_DISABLE
1863
1864/* method: new_local of class fawkes::Message */
1865#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Message_new01_local
1866static int tolua_fawkesinterface_fawkes_Message_new01_local(lua_State* tolua_S)
1867{
1868 tolua_Error tolua_err;
1869 if (
1870 !tolua_isusertable(tolua_S,1,"fawkes::Message",0,&tolua_err) ||
1871 !tolua_isusertype(tolua_S,2,"fawkes::Message",0,&tolua_err) ||
1872 !tolua_isnoobj(tolua_S,3,&tolua_err)
1873 )
1874 goto tolua_lerror;
1875 else
1876 {
1877 fawkes::Message* mesg = ((fawkes::Message*) tolua_tousertype(tolua_S,2,0));
1878 bool exc_caught = false;
1879 try {
1880 {
1881 fawkes::Message* tolua_ret = (fawkes::Message*) Mtolua_new((fawkes::Message)(mesg));
1882 tolua_pushusertype(tolua_S,(void*)tolua_ret,"fawkes::Message");
1883 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1884 }
1885 } catch (fawkes::Exception &e) {
1886 exc_caught = true;
1887 lua_pushstring(tolua_S, e.what_no_backtrace());
1888 }
1889 catch (std::exception &e) {
1890 exc_caught = true;
1891 lua_pushstring(tolua_S, e.what());
1892 }
1893 if (exc_caught) lua_error(tolua_S);
1894
1895 }
1896 return 1;
1897tolua_lerror:
1898 return tolua_fawkesinterface_fawkes_Message_new00_local(tolua_S);
1899}
1900#endif //#ifndef TOLUA_DISABLE
1901
1902/* method: new of class fawkes::Message */
1903#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Message_new02
1904static int tolua_fawkesinterface_fawkes_Message_new02(lua_State* tolua_S)
1905{
1906 tolua_Error tolua_err;
1907 if (
1908 !tolua_isusertable(tolua_S,1,"fawkes::Message",0,&tolua_err) ||
1909 (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"fawkes::Message",0,&tolua_err)) ||
1910 !tolua_isnoobj(tolua_S,3,&tolua_err)
1911 )
1912 goto tolua_lerror;
1913 else
1914 {
1915 fawkes::Message* mesg = ((fawkes::Message*) tolua_tousertype(tolua_S,2,0));
1916 bool exc_caught = false;
1917 try {
1918 {
1919 fawkes::Message* tolua_ret = (fawkes::Message*) Mtolua_new((fawkes::Message)(*mesg));
1920 tolua_pushusertype(tolua_S,(void*)tolua_ret,"fawkes::Message");
1921 }
1922 } catch (fawkes::Exception &e) {
1923 exc_caught = true;
1924 lua_pushstring(tolua_S, e.what_no_backtrace());
1925 }
1926 catch (std::exception &e) {
1927 exc_caught = true;
1928 lua_pushstring(tolua_S, e.what());
1929 }
1930 if (exc_caught) lua_error(tolua_S);
1931
1932 }
1933 return 1;
1934tolua_lerror:
1935 return tolua_fawkesinterface_fawkes_Message_new01(tolua_S);
1936}
1937#endif //#ifndef TOLUA_DISABLE
1938
1939/* method: new_local of class fawkes::Message */
1940#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Message_new02_local
1941static int tolua_fawkesinterface_fawkes_Message_new02_local(lua_State* tolua_S)
1942{
1943 tolua_Error tolua_err;
1944 if (
1945 !tolua_isusertable(tolua_S,1,"fawkes::Message",0,&tolua_err) ||
1946 (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"fawkes::Message",0,&tolua_err)) ||
1947 !tolua_isnoobj(tolua_S,3,&tolua_err)
1948 )
1949 goto tolua_lerror;
1950 else
1951 {
1952 fawkes::Message* mesg = ((fawkes::Message*) tolua_tousertype(tolua_S,2,0));
1953 bool exc_caught = false;
1954 try {
1955 {
1956 fawkes::Message* tolua_ret = (fawkes::Message*) Mtolua_new((fawkes::Message)(*mesg));
1957 tolua_pushusertype(tolua_S,(void*)tolua_ret,"fawkes::Message");
1958 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1959 }
1960 } catch (fawkes::Exception &e) {
1961 exc_caught = true;
1962 lua_pushstring(tolua_S, e.what_no_backtrace());
1963 }
1964 catch (std::exception &e) {
1965 exc_caught = true;
1966 lua_pushstring(tolua_S, e.what());
1967 }
1968 if (exc_caught) lua_error(tolua_S);
1969
1970 }
1971 return 1;
1972tolua_lerror:
1973 return tolua_fawkesinterface_fawkes_Message_new01_local(tolua_S);
1974}
1975#endif //#ifndef TOLUA_DISABLE
1976
1977/* method: id of class fawkes::Message */
1978#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Message_id00
1979static int tolua_fawkesinterface_fawkes_Message_id00(lua_State* tolua_S)
1980{
1981#ifndef TOLUA_RELEASE
1982 tolua_Error tolua_err;
1983 if (
1984 !tolua_isusertype(tolua_S,1,"const fawkes::Message",0,&tolua_err) ||
1985 !tolua_isnoobj(tolua_S,2,&tolua_err)
1986 )
1987 goto tolua_lerror;
1988 else
1989#endif
1990 {
1991 const fawkes::Message* self = (const fawkes::Message*) tolua_tousertype(tolua_S,1,0);
1992#ifndef TOLUA_RELEASE
1993 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'id'", NULL);
1994#endif
1995 bool exc_caught = false;
1996 try {
1997 {
1998 unsigned int tolua_ret = (unsigned int) self->id();
1999 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2000 }
2001 } catch (fawkes::Exception &e) {
2002 exc_caught = true;
2003 lua_pushstring(tolua_S, e.what_no_backtrace());
2004 }
2005 catch (std::exception &e) {
2006 exc_caught = true;
2007 lua_pushstring(tolua_S, e.what());
2008 }
2009 if (exc_caught) lua_error(tolua_S);
2010
2011 }
2012 return 1;
2013#ifndef TOLUA_RELEASE
2014 tolua_lerror:
2015 tolua_error(tolua_S,"#ferror in function 'id'.",&tolua_err);
2016 return 0;
2017#endif
2018}
2019#endif //#ifndef TOLUA_DISABLE
2020
2021/* method: sender_id of class fawkes::Message */
2022#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Message_sender_id00
2023static int tolua_fawkesinterface_fawkes_Message_sender_id00(lua_State* tolua_S)
2024{
2025#ifndef TOLUA_RELEASE
2026 tolua_Error tolua_err;
2027 if (
2028 !tolua_isusertype(tolua_S,1,"const fawkes::Message",0,&tolua_err) ||
2029 !tolua_isnoobj(tolua_S,2,&tolua_err)
2030 )
2031 goto tolua_lerror;
2032 else
2033#endif
2034 {
2035 const fawkes::Message* self = (const fawkes::Message*) tolua_tousertype(tolua_S,1,0);
2036#ifndef TOLUA_RELEASE
2037 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'sender_id'", NULL);
2038#endif
2039 bool exc_caught = false;
2040 try {
2041 {
2042 fawkes::Uuid tolua_ret = (fawkes::Uuid) self->sender_id();
2043 {
2044#ifdef __cplusplus
2045 void* tolua_obj = Mtolua_new((fawkes::Uuid)(tolua_ret));
2046 tolua_pushusertype(tolua_S,tolua_obj,"fawkes::Uuid");
2047 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
2048#else
2049 void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(fawkes::Uuid));
2050 tolua_pushusertype(tolua_S,tolua_obj,"fawkes::Uuid");
2051 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
2052#endif
2053 }
2054 }
2055 } catch (fawkes::Exception &e) {
2056 exc_caught = true;
2057 lua_pushstring(tolua_S, e.what_no_backtrace());
2058 }
2059 catch (std::exception &e) {
2060 exc_caught = true;
2061 lua_pushstring(tolua_S, e.what());
2062 }
2063 if (exc_caught) lua_error(tolua_S);
2064
2065 }
2066 return 1;
2067#ifndef TOLUA_RELEASE
2068 tolua_lerror:
2069 tolua_error(tolua_S,"#ferror in function 'sender_id'.",&tolua_err);
2070 return 0;
2071#endif
2072}
2073#endif //#ifndef TOLUA_DISABLE
2074
2075/* method: source_id of class fawkes::Message */
2076#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Message_source_id00
2077static int tolua_fawkesinterface_fawkes_Message_source_id00(lua_State* tolua_S)
2078{
2079#ifndef TOLUA_RELEASE
2080 tolua_Error tolua_err;
2081 if (
2082 !tolua_isusertype(tolua_S,1,"const fawkes::Message",0,&tolua_err) ||
2083 !tolua_isnoobj(tolua_S,2,&tolua_err)
2084 )
2085 goto tolua_lerror;
2086 else
2087#endif
2088 {
2089 const fawkes::Message* self = (const fawkes::Message*) tolua_tousertype(tolua_S,1,0);
2090#ifndef TOLUA_RELEASE
2091 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'source_id'", NULL);
2092#endif
2093 bool exc_caught = false;
2094 try {
2095 {
2096 fawkes::Uuid tolua_ret = (fawkes::Uuid) self->source_id();
2097 {
2098#ifdef __cplusplus
2099 void* tolua_obj = Mtolua_new((fawkes::Uuid)(tolua_ret));
2100 tolua_pushusertype(tolua_S,tolua_obj,"fawkes::Uuid");
2101 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
2102#else
2103 void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(fawkes::Uuid));
2104 tolua_pushusertype(tolua_S,tolua_obj,"fawkes::Uuid");
2105 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
2106#endif
2107 }
2108 }
2109 } catch (fawkes::Exception &e) {
2110 exc_caught = true;
2111 lua_pushstring(tolua_S, e.what_no_backtrace());
2112 }
2113 catch (std::exception &e) {
2114 exc_caught = true;
2115 lua_pushstring(tolua_S, e.what());
2116 }
2117 if (exc_caught) lua_error(tolua_S);
2118
2119 }
2120 return 1;
2121#ifndef TOLUA_RELEASE
2122 tolua_lerror:
2123 tolua_error(tolua_S,"#ferror in function 'source_id'.",&tolua_err);
2124 return 0;
2125#endif
2126}
2127#endif //#ifndef TOLUA_DISABLE
2128
2129/* method: sender_thread_name of class fawkes::Message */
2130#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Message_sender_thread_name00
2131static int tolua_fawkesinterface_fawkes_Message_sender_thread_name00(lua_State* tolua_S)
2132{
2133#ifndef TOLUA_RELEASE
2134 tolua_Error tolua_err;
2135 if (
2136 !tolua_isusertype(tolua_S,1,"const fawkes::Message",0,&tolua_err) ||
2137 !tolua_isnoobj(tolua_S,2,&tolua_err)
2138 )
2139 goto tolua_lerror;
2140 else
2141#endif
2142 {
2143 const fawkes::Message* self = (const fawkes::Message*) tolua_tousertype(tolua_S,1,0);
2144#ifndef TOLUA_RELEASE
2145 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'sender_thread_name'", NULL);
2146#endif
2147 bool exc_caught = false;
2148 try {
2149 {
2150 const char* tolua_ret = (const char*) self->sender_thread_name();
2151 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2152 }
2153 } catch (fawkes::Exception &e) {
2154 exc_caught = true;
2155 lua_pushstring(tolua_S, e.what_no_backtrace());
2156 }
2157 catch (std::exception &e) {
2158 exc_caught = true;
2159 lua_pushstring(tolua_S, e.what());
2160 }
2161 if (exc_caught) lua_error(tolua_S);
2162
2163 }
2164 return 1;
2165#ifndef TOLUA_RELEASE
2166 tolua_lerror:
2167 tolua_error(tolua_S,"#ferror in function 'sender_thread_name'.",&tolua_err);
2168 return 0;
2169#endif
2170}
2171#endif //#ifndef TOLUA_DISABLE
2172
2173/* method: interface of class fawkes::Message */
2174#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Message_interface00
2175static int tolua_fawkesinterface_fawkes_Message_interface00(lua_State* tolua_S)
2176{
2177#ifndef TOLUA_RELEASE
2178 tolua_Error tolua_err;
2179 if (
2180 !tolua_isusertype(tolua_S,1,"const fawkes::Message",0,&tolua_err) ||
2181 !tolua_isnoobj(tolua_S,2,&tolua_err)
2182 )
2183 goto tolua_lerror;
2184 else
2185#endif
2186 {
2187 const fawkes::Message* self = (const fawkes::Message*) tolua_tousertype(tolua_S,1,0);
2188#ifndef TOLUA_RELEASE
2189 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'interface'", NULL);
2190#endif
2191 bool exc_caught = false;
2192 try {
2193 {
2194 fawkes::Interface* tolua_ret = (fawkes::Interface*) self->interface();
2195 tolua_pushusertype(tolua_S,(void*)tolua_ret,"fawkes::Interface");
2196 }
2197 } catch (fawkes::Exception &e) {
2198 exc_caught = true;
2199 lua_pushstring(tolua_S, e.what_no_backtrace());
2200 }
2201 catch (std::exception &e) {
2202 exc_caught = true;
2203 lua_pushstring(tolua_S, e.what());
2204 }
2205 if (exc_caught) lua_error(tolua_S);
2206
2207 }
2208 return 1;
2209#ifndef TOLUA_RELEASE
2210 tolua_lerror:
2211 tolua_error(tolua_S,"#ferror in function 'interface'.",&tolua_err);
2212 return 0;
2213#endif
2214}
2215#endif //#ifndef TOLUA_DISABLE
2216
2217/* method: type of class fawkes::Message */
2218#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Message_type00
2219static int tolua_fawkesinterface_fawkes_Message_type00(lua_State* tolua_S)
2220{
2221#ifndef TOLUA_RELEASE
2222 tolua_Error tolua_err;
2223 if (
2224 !tolua_isusertype(tolua_S,1,"const fawkes::Message",0,&tolua_err) ||
2225 !tolua_isnoobj(tolua_S,2,&tolua_err)
2226 )
2227 goto tolua_lerror;
2228 else
2229#endif
2230 {
2231 const fawkes::Message* self = (const fawkes::Message*) tolua_tousertype(tolua_S,1,0);
2232#ifndef TOLUA_RELEASE
2233 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'type'", NULL);
2234#endif
2235 bool exc_caught = false;
2236 try {
2237 {
2238 const char* tolua_ret = (const char*) self->type();
2239 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2240 }
2241 } catch (fawkes::Exception &e) {
2242 exc_caught = true;
2243 lua_pushstring(tolua_S, e.what_no_backtrace());
2244 }
2245 catch (std::exception &e) {
2246 exc_caught = true;
2247 lua_pushstring(tolua_S, e.what());
2248 }
2249 if (exc_caught) lua_error(tolua_S);
2250
2251 }
2252 return 1;
2253#ifndef TOLUA_RELEASE
2254 tolua_lerror:
2255 tolua_error(tolua_S,"#ferror in function 'type'.",&tolua_err);
2256 return 0;
2257#endif
2258}
2259#endif //#ifndef TOLUA_DISABLE
2260
2261/* method: datachunk of class fawkes::Message */
2262#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Message_datachunk00
2263static int tolua_fawkesinterface_fawkes_Message_datachunk00(lua_State* tolua_S)
2264{
2265#ifndef TOLUA_RELEASE
2266 tolua_Error tolua_err;
2267 if (
2268 !tolua_isusertype(tolua_S,1,"const fawkes::Message",0,&tolua_err) ||
2269 !tolua_isnoobj(tolua_S,2,&tolua_err)
2270 )
2271 goto tolua_lerror;
2272 else
2273#endif
2274 {
2275 const fawkes::Message* self = (const fawkes::Message*) tolua_tousertype(tolua_S,1,0);
2276#ifndef TOLUA_RELEASE
2277 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'datachunk'", NULL);
2278#endif
2279 bool exc_caught = false;
2280 try {
2281 {
2282 const void* tolua_ret = (const void*) self->datachunk();
2283 tolua_pushuserdata(tolua_S,(void*)tolua_ret);
2284 }
2285 } catch (fawkes::Exception &e) {
2286 exc_caught = true;
2287 lua_pushstring(tolua_S, e.what_no_backtrace());
2288 }
2289 catch (std::exception &e) {
2290 exc_caught = true;
2291 lua_pushstring(tolua_S, e.what());
2292 }
2293 if (exc_caught) lua_error(tolua_S);
2294
2295 }
2296 return 1;
2297#ifndef TOLUA_RELEASE
2298 tolua_lerror:
2299 tolua_error(tolua_S,"#ferror in function 'datachunk'.",&tolua_err);
2300 return 0;
2301#endif
2302}
2303#endif //#ifndef TOLUA_DISABLE
2304
2305/* method: datasize of class fawkes::Message */
2306#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Message_datasize00
2307static int tolua_fawkesinterface_fawkes_Message_datasize00(lua_State* tolua_S)
2308{
2309#ifndef TOLUA_RELEASE
2310 tolua_Error tolua_err;
2311 if (
2312 !tolua_isusertype(tolua_S,1,"const fawkes::Message",0,&tolua_err) ||
2313 !tolua_isnoobj(tolua_S,2,&tolua_err)
2314 )
2315 goto tolua_lerror;
2316 else
2317#endif
2318 {
2319 const fawkes::Message* self = (const fawkes::Message*) tolua_tousertype(tolua_S,1,0);
2320#ifndef TOLUA_RELEASE
2321 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'datasize'", NULL);
2322#endif
2323 bool exc_caught = false;
2324 try {
2325 {
2326 unsigned int tolua_ret = (unsigned int) self->datasize();
2327 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2328 }
2329 } catch (fawkes::Exception &e) {
2330 exc_caught = true;
2331 lua_pushstring(tolua_S, e.what_no_backtrace());
2332 }
2333 catch (std::exception &e) {
2334 exc_caught = true;
2335 lua_pushstring(tolua_S, e.what());
2336 }
2337 if (exc_caught) lua_error(tolua_S);
2338
2339 }
2340 return 1;
2341#ifndef TOLUA_RELEASE
2342 tolua_lerror:
2343 tolua_error(tolua_S,"#ferror in function 'datasize'.",&tolua_err);
2344 return 0;
2345#endif
2346}
2347#endif //#ifndef TOLUA_DISABLE
2348
2349/* method: set_from_chunk of class fawkes::Message */
2350#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Message_set_from_chunk00
2351static int tolua_fawkesinterface_fawkes_Message_set_from_chunk00(lua_State* tolua_S)
2352{
2353#ifndef TOLUA_RELEASE
2354 tolua_Error tolua_err;
2355 if (
2356 !tolua_isusertype(tolua_S,1,"fawkes::Message",0,&tolua_err) ||
2357 !tolua_isuserdata(tolua_S,2,0,&tolua_err) ||
2358 !tolua_isnoobj(tolua_S,3,&tolua_err)
2359 )
2360 goto tolua_lerror;
2361 else
2362#endif
2363 {
2364 fawkes::Message* self = (fawkes::Message*) tolua_tousertype(tolua_S,1,0);
2365 const void* chunk = ((const void*) tolua_touserdata(tolua_S,2,0));
2366#ifndef TOLUA_RELEASE
2367 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'set_from_chunk'", NULL);
2368#endif
2369 bool exc_caught = false;
2370 try {
2371 {
2372 self->set_from_chunk(chunk);
2373 }
2374 } catch (fawkes::Exception &e) {
2375 exc_caught = true;
2376 lua_pushstring(tolua_S, e.what_no_backtrace());
2377 }
2378 catch (std::exception &e) {
2379 exc_caught = true;
2380 lua_pushstring(tolua_S, e.what());
2381 }
2382 if (exc_caught) lua_error(tolua_S);
2383
2384 }
2385 return 0;
2386#ifndef TOLUA_RELEASE
2387 tolua_lerror:
2388 tolua_error(tolua_S,"#ferror in function 'set_from_chunk'.",&tolua_err);
2389 return 0;
2390#endif
2391}
2392#endif //#ifndef TOLUA_DISABLE
2393
2394/* method: ref of class fawkes::Message */
2395#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Message_ref00
2396static int tolua_fawkesinterface_fawkes_Message_ref00(lua_State* tolua_S)
2397{
2398#ifndef TOLUA_RELEASE
2399 tolua_Error tolua_err;
2400 if (
2401 !tolua_isusertype(tolua_S,1,"fawkes::Message",0,&tolua_err) ||
2402 !tolua_isnoobj(tolua_S,2,&tolua_err)
2403 )
2404 goto tolua_lerror;
2405 else
2406#endif
2407 {
2408 fawkes::Message* self = (fawkes::Message*) tolua_tousertype(tolua_S,1,0);
2409#ifndef TOLUA_RELEASE
2410 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ref'", NULL);
2411#endif
2412 bool exc_caught = false;
2413 try {
2414 {
2415 self->ref();
2416 }
2417 } catch (fawkes::Exception &e) {
2418 exc_caught = true;
2419 lua_pushstring(tolua_S, e.what_no_backtrace());
2420 }
2421 catch (std::exception &e) {
2422 exc_caught = true;
2423 lua_pushstring(tolua_S, e.what());
2424 }
2425 if (exc_caught) lua_error(tolua_S);
2426
2427 }
2428 return 0;
2429#ifndef TOLUA_RELEASE
2430 tolua_lerror:
2431 tolua_error(tolua_S,"#ferror in function 'ref'.",&tolua_err);
2432 return 0;
2433#endif
2434}
2435#endif //#ifndef TOLUA_DISABLE
2436
2437/* method: unref of class fawkes::Message */
2438#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Message_unref00
2439static int tolua_fawkesinterface_fawkes_Message_unref00(lua_State* tolua_S)
2440{
2441#ifndef TOLUA_RELEASE
2442 tolua_Error tolua_err;
2443 if (
2444 !tolua_isusertype(tolua_S,1,"fawkes::Message",0,&tolua_err) ||
2445 !tolua_isnoobj(tolua_S,2,&tolua_err)
2446 )
2447 goto tolua_lerror;
2448 else
2449#endif
2450 {
2451 fawkes::Message* self = (fawkes::Message*) tolua_tousertype(tolua_S,1,0);
2452#ifndef TOLUA_RELEASE
2453 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'unref'", NULL);
2454#endif
2455 bool exc_caught = false;
2456 try {
2457 {
2458 self->unref();
2459 }
2460 } catch (fawkes::Exception &e) {
2461 exc_caught = true;
2462 lua_pushstring(tolua_S, e.what_no_backtrace());
2463 }
2464 catch (std::exception &e) {
2465 exc_caught = true;
2466 lua_pushstring(tolua_S, e.what());
2467 }
2468 if (exc_caught) lua_error(tolua_S);
2469
2470 }
2471 return 0;
2472#ifndef TOLUA_RELEASE
2473 tolua_lerror:
2474 tolua_error(tolua_S,"#ferror in function 'unref'.",&tolua_err);
2475 return 0;
2476#endif
2477}
2478#endif //#ifndef TOLUA_DISABLE
2479
2480/* method: refcount of class fawkes::Message */
2481#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_Message_refcount00
2482static int tolua_fawkesinterface_fawkes_Message_refcount00(lua_State* tolua_S)
2483{
2484#ifndef TOLUA_RELEASE
2485 tolua_Error tolua_err;
2486 if (
2487 !tolua_isusertype(tolua_S,1,"fawkes::Message",0,&tolua_err) ||
2488 !tolua_isnoobj(tolua_S,2,&tolua_err)
2489 )
2490 goto tolua_lerror;
2491 else
2492#endif
2493 {
2494 fawkes::Message* self = (fawkes::Message*) tolua_tousertype(tolua_S,1,0);
2495#ifndef TOLUA_RELEASE
2496 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'refcount'", NULL);
2497#endif
2498 bool exc_caught = false;
2499 try {
2500 {
2501 unsigned int tolua_ret = (unsigned int) self->refcount();
2502 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2503 }
2504 } catch (fawkes::Exception &e) {
2505 exc_caught = true;
2506 lua_pushstring(tolua_S, e.what_no_backtrace());
2507 }
2508 catch (std::exception &e) {
2509 exc_caught = true;
2510 lua_pushstring(tolua_S, e.what());
2511 }
2512 if (exc_caught) lua_error(tolua_S);
2513
2514 }
2515 return 1;
2516#ifndef TOLUA_RELEASE
2517 tolua_lerror:
2518 tolua_error(tolua_S,"#ferror in function 'refcount'.",&tolua_err);
2519 return 0;
2520#endif
2521}
2522#endif //#ifndef TOLUA_DISABLE
2523
2524/* method: new of class fawkes::MessageQueue */
2525#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_new00
2526static int tolua_fawkesinterface_fawkes_MessageQueue_new00(lua_State* tolua_S)
2527{
2528#ifndef TOLUA_RELEASE
2529 tolua_Error tolua_err;
2530 if (
2531 !tolua_isusertable(tolua_S,1,"fawkes::MessageQueue",0,&tolua_err) ||
2532 !tolua_isnoobj(tolua_S,2,&tolua_err)
2533 )
2534 goto tolua_lerror;
2535 else
2536#endif
2537 {
2538 bool exc_caught = false;
2539 try {
2540 {
2541 fawkes::MessageQueue* tolua_ret = (fawkes::MessageQueue*) Mtolua_new((fawkes::MessageQueue)());
2542 tolua_pushusertype(tolua_S,(void*)tolua_ret,"fawkes::MessageQueue");
2543 }
2544 } catch (fawkes::Exception &e) {
2545 exc_caught = true;
2546 lua_pushstring(tolua_S, e.what_no_backtrace());
2547 }
2548 catch (std::exception &e) {
2549 exc_caught = true;
2550 lua_pushstring(tolua_S, e.what());
2551 }
2552 if (exc_caught) lua_error(tolua_S);
2553
2554 }
2555 return 1;
2556#ifndef TOLUA_RELEASE
2557 tolua_lerror:
2558 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
2559 return 0;
2560#endif
2561}
2562#endif //#ifndef TOLUA_DISABLE
2563
2564/* method: new_local of class fawkes::MessageQueue */
2565#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_new00_local
2566static int tolua_fawkesinterface_fawkes_MessageQueue_new00_local(lua_State* tolua_S)
2567{
2568#ifndef TOLUA_RELEASE
2569 tolua_Error tolua_err;
2570 if (
2571 !tolua_isusertable(tolua_S,1,"fawkes::MessageQueue",0,&tolua_err) ||
2572 !tolua_isnoobj(tolua_S,2,&tolua_err)
2573 )
2574 goto tolua_lerror;
2575 else
2576#endif
2577 {
2578 bool exc_caught = false;
2579 try {
2580 {
2581 fawkes::MessageQueue* tolua_ret = (fawkes::MessageQueue*) Mtolua_new((fawkes::MessageQueue)());
2582 tolua_pushusertype(tolua_S,(void*)tolua_ret,"fawkes::MessageQueue");
2583 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
2584 }
2585 } catch (fawkes::Exception &e) {
2586 exc_caught = true;
2587 lua_pushstring(tolua_S, e.what_no_backtrace());
2588 }
2589 catch (std::exception &e) {
2590 exc_caught = true;
2591 lua_pushstring(tolua_S, e.what());
2592 }
2593 if (exc_caught) lua_error(tolua_S);
2594
2595 }
2596 return 1;
2597#ifndef TOLUA_RELEASE
2598 tolua_lerror:
2599 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
2600 return 0;
2601#endif
2602}
2603#endif //#ifndef TOLUA_DISABLE
2604
2605/* method: delete of class fawkes::MessageQueue */
2606#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_delete00
2607static int tolua_fawkesinterface_fawkes_MessageQueue_delete00(lua_State* tolua_S)
2608{
2609#ifndef TOLUA_RELEASE
2610 tolua_Error tolua_err;
2611 if (
2612 !tolua_isusertype(tolua_S,1,"fawkes::MessageQueue",0,&tolua_err) ||
2613 !tolua_isnoobj(tolua_S,2,&tolua_err)
2614 )
2615 goto tolua_lerror;
2616 else
2617#endif
2618 {
2619 fawkes::MessageQueue* self = (fawkes::MessageQueue*) tolua_tousertype(tolua_S,1,0);
2620#ifndef TOLUA_RELEASE
2621 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'", NULL);
2622#endif
2623 bool exc_caught = false;
2624 try {
2625 Mtolua_delete(self);
2626 } catch (fawkes::Exception &e) {
2627 exc_caught = true;
2628 lua_pushstring(tolua_S, e.what_no_backtrace());
2629 }
2630 catch (std::exception &e) {
2631 exc_caught = true;
2632 lua_pushstring(tolua_S, e.what());
2633 }
2634 if (exc_caught) lua_error(tolua_S);
2635
2636 }
2637 return 0;
2638#ifndef TOLUA_RELEASE
2639 tolua_lerror:
2640 tolua_error(tolua_S,"#ferror in function 'delete'.",&tolua_err);
2641 return 0;
2642#endif
2643}
2644#endif //#ifndef TOLUA_DISABLE
2645
2646/* method: new of class MessageIterator */
2647#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator_new00
2648static int tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator_new00(lua_State* tolua_S)
2649{
2650#ifndef TOLUA_RELEASE
2651 tolua_Error tolua_err;
2652 if (
2653 !tolua_isusertable(tolua_S,1,"fawkes::MessageQueue::MessageIterator",0,&tolua_err) ||
2654 !tolua_isnoobj(tolua_S,2,&tolua_err)
2655 )
2656 goto tolua_lerror;
2657 else
2658#endif
2659 {
2660 bool exc_caught = false;
2661 try {
2662 {
2664 tolua_pushusertype(tolua_S,(void*)tolua_ret,"fawkes::MessageQueue::MessageIterator");
2665 }
2666 } catch (fawkes::Exception &e) {
2667 exc_caught = true;
2668 lua_pushstring(tolua_S, e.what_no_backtrace());
2669 }
2670 catch (std::exception &e) {
2671 exc_caught = true;
2672 lua_pushstring(tolua_S, e.what());
2673 }
2674 if (exc_caught) lua_error(tolua_S);
2675
2676 }
2677 return 1;
2678#ifndef TOLUA_RELEASE
2679 tolua_lerror:
2680 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
2681 return 0;
2682#endif
2683}
2684#endif //#ifndef TOLUA_DISABLE
2685
2686/* method: new_local of class MessageIterator */
2687#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator_new00_local
2688static int tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator_new00_local(lua_State* tolua_S)
2689{
2690#ifndef TOLUA_RELEASE
2691 tolua_Error tolua_err;
2692 if (
2693 !tolua_isusertable(tolua_S,1,"fawkes::MessageQueue::MessageIterator",0,&tolua_err) ||
2694 !tolua_isnoobj(tolua_S,2,&tolua_err)
2695 )
2696 goto tolua_lerror;
2697 else
2698#endif
2699 {
2700 bool exc_caught = false;
2701 try {
2702 {
2704 tolua_pushusertype(tolua_S,(void*)tolua_ret,"fawkes::MessageQueue::MessageIterator");
2705 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
2706 }
2707 } catch (fawkes::Exception &e) {
2708 exc_caught = true;
2709 lua_pushstring(tolua_S, e.what_no_backtrace());
2710 }
2711 catch (std::exception &e) {
2712 exc_caught = true;
2713 lua_pushstring(tolua_S, e.what());
2714 }
2715 if (exc_caught) lua_error(tolua_S);
2716
2717 }
2718 return 1;
2719#ifndef TOLUA_RELEASE
2720 tolua_lerror:
2721 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
2722 return 0;
2723#endif
2724}
2725#endif //#ifndef TOLUA_DISABLE
2726
2727/* method: new of class MessageIterator */
2728#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator_new01
2729static int tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator_new01(lua_State* tolua_S)
2730{
2731 tolua_Error tolua_err;
2732 if (
2733 !tolua_isusertable(tolua_S,1,"fawkes::MessageQueue::MessageIterator",0,&tolua_err) ||
2734 (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const fawkes::MessageQueue::MessageIterator",0,&tolua_err)) ||
2735 !tolua_isnoobj(tolua_S,3,&tolua_err)
2736 )
2737 goto tolua_lerror;
2738 else
2739 {
2740 const fawkes::MessageQueue::MessageIterator* it = ((const fawkes::MessageQueue::MessageIterator*) tolua_tousertype(tolua_S,2,0));
2741 bool exc_caught = false;
2742 try {
2743 {
2745 tolua_pushusertype(tolua_S,(void*)tolua_ret,"fawkes::MessageQueue::MessageIterator");
2746 }
2747 } catch (fawkes::Exception &e) {
2748 exc_caught = true;
2749 lua_pushstring(tolua_S, e.what_no_backtrace());
2750 }
2751 catch (std::exception &e) {
2752 exc_caught = true;
2753 lua_pushstring(tolua_S, e.what());
2754 }
2755 if (exc_caught) lua_error(tolua_S);
2756
2757 }
2758 return 1;
2759tolua_lerror:
2760 return tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator_new00(tolua_S);
2761}
2762#endif //#ifndef TOLUA_DISABLE
2763
2764/* method: new_local of class MessageIterator */
2765#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator_new01_local
2766static int tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator_new01_local(lua_State* tolua_S)
2767{
2768 tolua_Error tolua_err;
2769 if (
2770 !tolua_isusertable(tolua_S,1,"fawkes::MessageQueue::MessageIterator",0,&tolua_err) ||
2771 (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const fawkes::MessageQueue::MessageIterator",0,&tolua_err)) ||
2772 !tolua_isnoobj(tolua_S,3,&tolua_err)
2773 )
2774 goto tolua_lerror;
2775 else
2776 {
2777 const fawkes::MessageQueue::MessageIterator* it = ((const fawkes::MessageQueue::MessageIterator*) tolua_tousertype(tolua_S,2,0));
2778 bool exc_caught = false;
2779 try {
2780 {
2782 tolua_pushusertype(tolua_S,(void*)tolua_ret,"fawkes::MessageQueue::MessageIterator");
2783 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
2784 }
2785 } catch (fawkes::Exception &e) {
2786 exc_caught = true;
2787 lua_pushstring(tolua_S, e.what_no_backtrace());
2788 }
2789 catch (std::exception &e) {
2790 exc_caught = true;
2791 lua_pushstring(tolua_S, e.what());
2792 }
2793 if (exc_caught) lua_error(tolua_S);
2794
2795 }
2796 return 1;
2797tolua_lerror:
2798 return tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator_new00_local(tolua_S);
2799}
2800#endif //#ifndef TOLUA_DISABLE
2801
2802/* method: operator+ of class MessageIterator */
2803#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator__add00
2804static int tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator__add00(lua_State* tolua_S)
2805{
2806#ifndef TOLUA_RELEASE
2807 tolua_Error tolua_err;
2808 if (
2809 !tolua_isusertype(tolua_S,1,"fawkes::MessageQueue::MessageIterator",0,&tolua_err) ||
2810 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2811 !tolua_isnoobj(tolua_S,3,&tolua_err)
2812 )
2813 goto tolua_lerror;
2814 else
2815#endif
2816 {
2818 unsigned int i = ((unsigned int) tolua_tonumber(tolua_S,2,0));
2819#ifndef TOLUA_RELEASE
2820 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
2821#endif
2822 bool exc_caught = false;
2823 try {
2824 {
2826 tolua_pushusertype(tolua_S,(void*)&tolua_ret,"fawkes::MessageQueue::MessageIterator");
2827 }
2828 } catch (fawkes::Exception &e) {
2829 exc_caught = true;
2830 lua_pushstring(tolua_S, e.what_no_backtrace());
2831 }
2832 catch (std::exception &e) {
2833 exc_caught = true;
2834 lua_pushstring(tolua_S, e.what());
2835 }
2836 if (exc_caught) lua_error(tolua_S);
2837
2838 }
2839 return 1;
2840#ifndef TOLUA_RELEASE
2841 tolua_lerror:
2842 tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
2843 return 0;
2844#endif
2845}
2846#endif //#ifndef TOLUA_DISABLE
2847
2848/* method: operator== of class MessageIterator */
2849#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator__eq00
2850static int tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator__eq00(lua_State* tolua_S)
2851{
2852#ifndef TOLUA_RELEASE
2853 tolua_Error tolua_err;
2854 if (
2855 !tolua_isusertype(tolua_S,1,"const fawkes::MessageQueue::MessageIterator",0,&tolua_err) ||
2856 (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const fawkes::MessageQueue::MessageIterator",0,&tolua_err)) ||
2857 !tolua_isnoobj(tolua_S,3,&tolua_err)
2858 )
2859 goto tolua_lerror;
2860 else
2861#endif
2862 {
2863 const fawkes::MessageQueue::MessageIterator* self = (const fawkes::MessageQueue::MessageIterator*) tolua_tousertype(tolua_S,1,0);
2864 const fawkes::MessageQueue::MessageIterator* c = ((const fawkes::MessageQueue::MessageIterator*) tolua_tousertype(tolua_S,2,0));
2865#ifndef TOLUA_RELEASE
2866 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
2867#endif
2868 bool exc_caught = false;
2869 try {
2870 {
2871 bool tolua_ret = (bool) self->operator==(*c);
2872 tolua_pushboolean(tolua_S,(bool)tolua_ret);
2873 }
2874 } catch (fawkes::Exception &e) {
2875 exc_caught = true;
2876 lua_pushstring(tolua_S, e.what_no_backtrace());
2877 }
2878 catch (std::exception &e) {
2879 exc_caught = true;
2880 lua_pushstring(tolua_S, e.what());
2881 }
2882 if (exc_caught) lua_error(tolua_S);
2883
2884 }
2885 return 1;
2886#ifndef TOLUA_RELEASE
2887 tolua_lerror:
2888 tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
2889 return 0;
2890#endif
2891}
2892#endif //#ifndef TOLUA_DISABLE
2893
2894/* method: operator* of class MessageIterator */
2895#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator__mul00
2896static int tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator__mul00(lua_State* tolua_S)
2897{
2898#ifndef TOLUA_RELEASE
2899 tolua_Error tolua_err;
2900 if (
2901 !tolua_isusertype(tolua_S,1,"const fawkes::MessageQueue::MessageIterator",0,&tolua_err) ||
2902 !tolua_isnoobj(tolua_S,2,&tolua_err)
2903 )
2904 goto tolua_lerror;
2905 else
2906#endif
2907 {
2908 const fawkes::MessageQueue::MessageIterator* self = (const fawkes::MessageQueue::MessageIterator*) tolua_tousertype(tolua_S,1,0);
2909#ifndef TOLUA_RELEASE
2910 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
2911#endif
2912 bool exc_caught = false;
2913 try {
2914 {
2915 fawkes::Message* tolua_ret = (fawkes::Message*) self->operator*();
2916 tolua_pushusertype(tolua_S,(void*)tolua_ret,"fawkes::Message");
2917 }
2918 } catch (fawkes::Exception &e) {
2919 exc_caught = true;
2920 lua_pushstring(tolua_S, e.what_no_backtrace());
2921 }
2922 catch (std::exception &e) {
2923 exc_caught = true;
2924 lua_pushstring(tolua_S, e.what());
2925 }
2926 if (exc_caught) lua_error(tolua_S);
2927
2928 }
2929 return 1;
2930#ifndef TOLUA_RELEASE
2931 tolua_lerror:
2932 tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
2933 return 0;
2934#endif
2935}
2936#endif //#ifndef TOLUA_DISABLE
2937
2938/* method: id of class MessageIterator */
2939#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator_id00
2940static int tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator_id00(lua_State* tolua_S)
2941{
2942#ifndef TOLUA_RELEASE
2943 tolua_Error tolua_err;
2944 if (
2945 !tolua_isusertype(tolua_S,1,"const fawkes::MessageQueue::MessageIterator",0,&tolua_err) ||
2946 !tolua_isnoobj(tolua_S,2,&tolua_err)
2947 )
2948 goto tolua_lerror;
2949 else
2950#endif
2951 {
2952 const fawkes::MessageQueue::MessageIterator* self = (const fawkes::MessageQueue::MessageIterator*) tolua_tousertype(tolua_S,1,0);
2953#ifndef TOLUA_RELEASE
2954 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'id'", NULL);
2955#endif
2956 bool exc_caught = false;
2957 try {
2958 {
2959 unsigned int tolua_ret = (unsigned int) self->id();
2960 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2961 }
2962 } catch (fawkes::Exception &e) {
2963 exc_caught = true;
2964 lua_pushstring(tolua_S, e.what_no_backtrace());
2965 }
2966 catch (std::exception &e) {
2967 exc_caught = true;
2968 lua_pushstring(tolua_S, e.what());
2969 }
2970 if (exc_caught) lua_error(tolua_S);
2971
2972 }
2973 return 1;
2974#ifndef TOLUA_RELEASE
2975 tolua_lerror:
2976 tolua_error(tolua_S,"#ferror in function 'id'.",&tolua_err);
2977 return 0;
2978#endif
2979}
2980#endif //#ifndef TOLUA_DISABLE
2981
2982/* method: append of class fawkes::MessageQueue */
2983#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_append00
2984static int tolua_fawkesinterface_fawkes_MessageQueue_append00(lua_State* tolua_S)
2985{
2986#ifndef TOLUA_RELEASE
2987 tolua_Error tolua_err;
2988 if (
2989 !tolua_isusertype(tolua_S,1,"fawkes::MessageQueue",0,&tolua_err) ||
2990 !tolua_isusertype(tolua_S,2,"fawkes::Message",0,&tolua_err) ||
2991 !tolua_isnoobj(tolua_S,3,&tolua_err)
2992 )
2993 goto tolua_lerror;
2994 else
2995#endif
2996 {
2997 fawkes::MessageQueue* self = (fawkes::MessageQueue*) tolua_tousertype(tolua_S,1,0);
2998 fawkes::Message* msg = ((fawkes::Message*) tolua_tousertype(tolua_S,2,0));
2999#ifndef TOLUA_RELEASE
3000 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'append'", NULL);
3001#endif
3002 bool exc_caught = false;
3003 try {
3004 {
3005 self->append(msg);
3006 }
3007 } catch (fawkes::Exception &e) {
3008 exc_caught = true;
3009 lua_pushstring(tolua_S, e.what_no_backtrace());
3010 }
3011 catch (std::exception &e) {
3012 exc_caught = true;
3013 lua_pushstring(tolua_S, e.what());
3014 }
3015 if (exc_caught) lua_error(tolua_S);
3016
3017 }
3018 return 0;
3019#ifndef TOLUA_RELEASE
3020 tolua_lerror:
3021 tolua_error(tolua_S,"#ferror in function 'append'.",&tolua_err);
3022 return 0;
3023#endif
3024}
3025#endif //#ifndef TOLUA_DISABLE
3026
3027/* method: remove of class fawkes::MessageQueue */
3028#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_remove00
3029static int tolua_fawkesinterface_fawkes_MessageQueue_remove00(lua_State* tolua_S)
3030{
3031#ifndef TOLUA_RELEASE
3032 tolua_Error tolua_err;
3033 if (
3034 !tolua_isusertype(tolua_S,1,"fawkes::MessageQueue",0,&tolua_err) ||
3035 !tolua_isusertype(tolua_S,2,"const fawkes::Message",0,&tolua_err) ||
3036 !tolua_isnoobj(tolua_S,3,&tolua_err)
3037 )
3038 goto tolua_lerror;
3039 else
3040#endif
3041 {
3042 fawkes::MessageQueue* self = (fawkes::MessageQueue*) tolua_tousertype(tolua_S,1,0);
3043 const fawkes::Message* msg = ((const fawkes::Message*) tolua_tousertype(tolua_S,2,0));
3044#ifndef TOLUA_RELEASE
3045 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'remove'", NULL);
3046#endif
3047 bool exc_caught = false;
3048 try {
3049 {
3050 self->remove(msg);
3051 }
3052 } catch (fawkes::Exception &e) {
3053 exc_caught = true;
3054 lua_pushstring(tolua_S, e.what_no_backtrace());
3055 }
3056 catch (std::exception &e) {
3057 exc_caught = true;
3058 lua_pushstring(tolua_S, e.what());
3059 }
3060 if (exc_caught) lua_error(tolua_S);
3061
3062 }
3063 return 0;
3064#ifndef TOLUA_RELEASE
3065 tolua_lerror:
3066 tolua_error(tolua_S,"#ferror in function 'remove'.",&tolua_err);
3067 return 0;
3068#endif
3069}
3070#endif //#ifndef TOLUA_DISABLE
3071
3072/* method: remove of class fawkes::MessageQueue */
3073#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_remove01
3074static int tolua_fawkesinterface_fawkes_MessageQueue_remove01(lua_State* tolua_S)
3075{
3076 tolua_Error tolua_err;
3077 if (
3078 !tolua_isusertype(tolua_S,1,"fawkes::MessageQueue",0,&tolua_err) ||
3079 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
3080 !tolua_isnoobj(tolua_S,3,&tolua_err)
3081 )
3082 goto tolua_lerror;
3083 else
3084 {
3085 fawkes::MessageQueue* self = (fawkes::MessageQueue*) tolua_tousertype(tolua_S,1,0);
3086 unsigned const int msg_id = ((unsigned const int) tolua_tonumber(tolua_S,2,0));
3087#ifndef TOLUA_RELEASE
3088 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'remove'", NULL);
3089#endif
3090 bool exc_caught = false;
3091 try {
3092 {
3093 self->remove(msg_id);
3094 }
3095 } catch (fawkes::Exception &e) {
3096 exc_caught = true;
3097 lua_pushstring(tolua_S, e.what_no_backtrace());
3098 }
3099 catch (std::exception &e) {
3100 exc_caught = true;
3101 lua_pushstring(tolua_S, e.what());
3102 }
3103 if (exc_caught) lua_error(tolua_S);
3104
3105 }
3106 return 0;
3107tolua_lerror:
3108 return tolua_fawkesinterface_fawkes_MessageQueue_remove00(tolua_S);
3109}
3110#endif //#ifndef TOLUA_DISABLE
3111
3112/* method: insert_after of class fawkes::MessageQueue */
3113#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_insert_after00
3114static int tolua_fawkesinterface_fawkes_MessageQueue_insert_after00(lua_State* tolua_S)
3115{
3116#ifndef TOLUA_RELEASE
3117 tolua_Error tolua_err;
3118 if (
3119 !tolua_isusertype(tolua_S,1,"fawkes::MessageQueue",0,&tolua_err) ||
3120 (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const fawkes::MessageQueue::MessageIterator",0,&tolua_err)) ||
3121 !tolua_isusertype(tolua_S,3,"fawkes::Message",0,&tolua_err) ||
3122 !tolua_isnoobj(tolua_S,4,&tolua_err)
3123 )
3124 goto tolua_lerror;
3125 else
3126#endif
3127 {
3128 fawkes::MessageQueue* self = (fawkes::MessageQueue*) tolua_tousertype(tolua_S,1,0);
3129 const fawkes::MessageQueue::MessageIterator* it = ((const fawkes::MessageQueue::MessageIterator*) tolua_tousertype(tolua_S,2,0));
3130 fawkes::Message* msg = ((fawkes::Message*) tolua_tousertype(tolua_S,3,0));
3131#ifndef TOLUA_RELEASE
3132 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'insert_after'", NULL);
3133#endif
3134 bool exc_caught = false;
3135 try {
3136 {
3137 self->insert_after(*it,msg);
3138 }
3139 } catch (fawkes::Exception &e) {
3140 exc_caught = true;
3141 lua_pushstring(tolua_S, e.what_no_backtrace());
3142 }
3143 catch (std::exception &e) {
3144 exc_caught = true;
3145 lua_pushstring(tolua_S, e.what());
3146 }
3147 if (exc_caught) lua_error(tolua_S);
3148
3149 }
3150 return 0;
3151#ifndef TOLUA_RELEASE
3152 tolua_lerror:
3153 tolua_error(tolua_S,"#ferror in function 'insert_after'.",&tolua_err);
3154 return 0;
3155#endif
3156}
3157#endif //#ifndef TOLUA_DISABLE
3158
3159/* method: size of class fawkes::MessageQueue */
3160#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_size00
3161static int tolua_fawkesinterface_fawkes_MessageQueue_size00(lua_State* tolua_S)
3162{
3163#ifndef TOLUA_RELEASE
3164 tolua_Error tolua_err;
3165 if (
3166 !tolua_isusertype(tolua_S,1,"const fawkes::MessageQueue",0,&tolua_err) ||
3167 !tolua_isnoobj(tolua_S,2,&tolua_err)
3168 )
3169 goto tolua_lerror;
3170 else
3171#endif
3172 {
3173 const fawkes::MessageQueue* self = (const fawkes::MessageQueue*) tolua_tousertype(tolua_S,1,0);
3174#ifndef TOLUA_RELEASE
3175 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'size'", NULL);
3176#endif
3177 bool exc_caught = false;
3178 try {
3179 {
3180 unsigned int tolua_ret = (unsigned int) self->size();
3181 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
3182 }
3183 } catch (fawkes::Exception &e) {
3184 exc_caught = true;
3185 lua_pushstring(tolua_S, e.what_no_backtrace());
3186 }
3187 catch (std::exception &e) {
3188 exc_caught = true;
3189 lua_pushstring(tolua_S, e.what());
3190 }
3191 if (exc_caught) lua_error(tolua_S);
3192
3193 }
3194 return 1;
3195#ifndef TOLUA_RELEASE
3196 tolua_lerror:
3197 tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err);
3198 return 0;
3199#endif
3200}
3201#endif //#ifndef TOLUA_DISABLE
3202
3203/* method: flush of class fawkes::MessageQueue */
3204#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_flush00
3205static int tolua_fawkesinterface_fawkes_MessageQueue_flush00(lua_State* tolua_S)
3206{
3207#ifndef TOLUA_RELEASE
3208 tolua_Error tolua_err;
3209 if (
3210 !tolua_isusertype(tolua_S,1,"fawkes::MessageQueue",0,&tolua_err) ||
3211 !tolua_isnoobj(tolua_S,2,&tolua_err)
3212 )
3213 goto tolua_lerror;
3214 else
3215#endif
3216 {
3217 fawkes::MessageQueue* self = (fawkes::MessageQueue*) tolua_tousertype(tolua_S,1,0);
3218#ifndef TOLUA_RELEASE
3219 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'flush'", NULL);
3220#endif
3221 bool exc_caught = false;
3222 try {
3223 {
3224 self->flush();
3225 }
3226 } catch (fawkes::Exception &e) {
3227 exc_caught = true;
3228 lua_pushstring(tolua_S, e.what_no_backtrace());
3229 }
3230 catch (std::exception &e) {
3231 exc_caught = true;
3232 lua_pushstring(tolua_S, e.what());
3233 }
3234 if (exc_caught) lua_error(tolua_S);
3235
3236 }
3237 return 0;
3238#ifndef TOLUA_RELEASE
3239 tolua_lerror:
3240 tolua_error(tolua_S,"#ferror in function 'flush'.",&tolua_err);
3241 return 0;
3242#endif
3243}
3244#endif //#ifndef TOLUA_DISABLE
3245
3246/* method: empty of class fawkes::MessageQueue */
3247#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_empty00
3248static int tolua_fawkesinterface_fawkes_MessageQueue_empty00(lua_State* tolua_S)
3249{
3250#ifndef TOLUA_RELEASE
3251 tolua_Error tolua_err;
3252 if (
3253 !tolua_isusertype(tolua_S,1,"const fawkes::MessageQueue",0,&tolua_err) ||
3254 !tolua_isnoobj(tolua_S,2,&tolua_err)
3255 )
3256 goto tolua_lerror;
3257 else
3258#endif
3259 {
3260 const fawkes::MessageQueue* self = (const fawkes::MessageQueue*) tolua_tousertype(tolua_S,1,0);
3261#ifndef TOLUA_RELEASE
3262 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'empty'", NULL);
3263#endif
3264 bool exc_caught = false;
3265 try {
3266 {
3267 bool tolua_ret = (bool) self->empty();
3268 tolua_pushboolean(tolua_S,(bool)tolua_ret);
3269 }
3270 } catch (fawkes::Exception &e) {
3271 exc_caught = true;
3272 lua_pushstring(tolua_S, e.what_no_backtrace());
3273 }
3274 catch (std::exception &e) {
3275 exc_caught = true;
3276 lua_pushstring(tolua_S, e.what());
3277 }
3278 if (exc_caught) lua_error(tolua_S);
3279
3280 }
3281 return 1;
3282#ifndef TOLUA_RELEASE
3283 tolua_lerror:
3284 tolua_error(tolua_S,"#ferror in function 'empty'.",&tolua_err);
3285 return 0;
3286#endif
3287}
3288#endif //#ifndef TOLUA_DISABLE
3289
3290/* method: lock of class fawkes::MessageQueue */
3291#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_lock00
3292static int tolua_fawkesinterface_fawkes_MessageQueue_lock00(lua_State* tolua_S)
3293{
3294#ifndef TOLUA_RELEASE
3295 tolua_Error tolua_err;
3296 if (
3297 !tolua_isusertype(tolua_S,1,"fawkes::MessageQueue",0,&tolua_err) ||
3298 !tolua_isnoobj(tolua_S,2,&tolua_err)
3299 )
3300 goto tolua_lerror;
3301 else
3302#endif
3303 {
3304 fawkes::MessageQueue* self = (fawkes::MessageQueue*) tolua_tousertype(tolua_S,1,0);
3305#ifndef TOLUA_RELEASE
3306 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'lock'", NULL);
3307#endif
3308 bool exc_caught = false;
3309 try {
3310 {
3311 self->lock();
3312 }
3313 } catch (fawkes::Exception &e) {
3314 exc_caught = true;
3315 lua_pushstring(tolua_S, e.what_no_backtrace());
3316 }
3317 catch (std::exception &e) {
3318 exc_caught = true;
3319 lua_pushstring(tolua_S, e.what());
3320 }
3321 if (exc_caught) lua_error(tolua_S);
3322
3323 }
3324 return 0;
3325#ifndef TOLUA_RELEASE
3326 tolua_lerror:
3327 tolua_error(tolua_S,"#ferror in function 'lock'.",&tolua_err);
3328 return 0;
3329#endif
3330}
3331#endif //#ifndef TOLUA_DISABLE
3332
3333/* method: try_lock of class fawkes::MessageQueue */
3334#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_try_lock00
3335static int tolua_fawkesinterface_fawkes_MessageQueue_try_lock00(lua_State* tolua_S)
3336{
3337#ifndef TOLUA_RELEASE
3338 tolua_Error tolua_err;
3339 if (
3340 !tolua_isusertype(tolua_S,1,"fawkes::MessageQueue",0,&tolua_err) ||
3341 !tolua_isnoobj(tolua_S,2,&tolua_err)
3342 )
3343 goto tolua_lerror;
3344 else
3345#endif
3346 {
3347 fawkes::MessageQueue* self = (fawkes::MessageQueue*) tolua_tousertype(tolua_S,1,0);
3348#ifndef TOLUA_RELEASE
3349 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'try_lock'", NULL);
3350#endif
3351 bool exc_caught = false;
3352 try {
3353 {
3354 bool tolua_ret = (bool) self->try_lock();
3355 tolua_pushboolean(tolua_S,(bool)tolua_ret);
3356 }
3357 } catch (fawkes::Exception &e) {
3358 exc_caught = true;
3359 lua_pushstring(tolua_S, e.what_no_backtrace());
3360 }
3361 catch (std::exception &e) {
3362 exc_caught = true;
3363 lua_pushstring(tolua_S, e.what());
3364 }
3365 if (exc_caught) lua_error(tolua_S);
3366
3367 }
3368 return 1;
3369#ifndef TOLUA_RELEASE
3370 tolua_lerror:
3371 tolua_error(tolua_S,"#ferror in function 'try_lock'.",&tolua_err);
3372 return 0;
3373#endif
3374}
3375#endif //#ifndef TOLUA_DISABLE
3376
3377/* method: unlock of class fawkes::MessageQueue */
3378#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_unlock00
3379static int tolua_fawkesinterface_fawkes_MessageQueue_unlock00(lua_State* tolua_S)
3380{
3381#ifndef TOLUA_RELEASE
3382 tolua_Error tolua_err;
3383 if (
3384 !tolua_isusertype(tolua_S,1,"fawkes::MessageQueue",0,&tolua_err) ||
3385 !tolua_isnoobj(tolua_S,2,&tolua_err)
3386 )
3387 goto tolua_lerror;
3388 else
3389#endif
3390 {
3391 fawkes::MessageQueue* self = (fawkes::MessageQueue*) tolua_tousertype(tolua_S,1,0);
3392#ifndef TOLUA_RELEASE
3393 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'unlock'", NULL);
3394#endif
3395 bool exc_caught = false;
3396 try {
3397 {
3398 self->unlock();
3399 }
3400 } catch (fawkes::Exception &e) {
3401 exc_caught = true;
3402 lua_pushstring(tolua_S, e.what_no_backtrace());
3403 }
3404 catch (std::exception &e) {
3405 exc_caught = true;
3406 lua_pushstring(tolua_S, e.what());
3407 }
3408 if (exc_caught) lua_error(tolua_S);
3409
3410 }
3411 return 0;
3412#ifndef TOLUA_RELEASE
3413 tolua_lerror:
3414 tolua_error(tolua_S,"#ferror in function 'unlock'.",&tolua_err);
3415 return 0;
3416#endif
3417}
3418#endif //#ifndef TOLUA_DISABLE
3419
3420/* method: first of class fawkes::MessageQueue */
3421#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_first00
3422static int tolua_fawkesinterface_fawkes_MessageQueue_first00(lua_State* tolua_S)
3423{
3424#ifndef TOLUA_RELEASE
3425 tolua_Error tolua_err;
3426 if (
3427 !tolua_isusertype(tolua_S,1,"fawkes::MessageQueue",0,&tolua_err) ||
3428 !tolua_isnoobj(tolua_S,2,&tolua_err)
3429 )
3430 goto tolua_lerror;
3431 else
3432#endif
3433 {
3434 fawkes::MessageQueue* self = (fawkes::MessageQueue*) tolua_tousertype(tolua_S,1,0);
3435#ifndef TOLUA_RELEASE
3436 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'first'", NULL);
3437#endif
3438 bool exc_caught = false;
3439 try {
3440 {
3441 fawkes::Message* tolua_ret = (fawkes::Message*) self->first();
3442 tolua_pushusertype(tolua_S,(void*)tolua_ret,"fawkes::Message");
3443 }
3444 } catch (fawkes::Exception &e) {
3445 exc_caught = true;
3446 lua_pushstring(tolua_S, e.what_no_backtrace());
3447 }
3448 catch (std::exception &e) {
3449 exc_caught = true;
3450 lua_pushstring(tolua_S, e.what());
3451 }
3452 if (exc_caught) lua_error(tolua_S);
3453
3454 }
3455 return 1;
3456#ifndef TOLUA_RELEASE
3457 tolua_lerror:
3458 tolua_error(tolua_S,"#ferror in function 'first'.",&tolua_err);
3459 return 0;
3460#endif
3461}
3462#endif //#ifndef TOLUA_DISABLE
3463
3464/* method: pop of class fawkes::MessageQueue */
3465#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_pop00
3466static int tolua_fawkesinterface_fawkes_MessageQueue_pop00(lua_State* tolua_S)
3467{
3468#ifndef TOLUA_RELEASE
3469 tolua_Error tolua_err;
3470 if (
3471 !tolua_isusertype(tolua_S,1,"fawkes::MessageQueue",0,&tolua_err) ||
3472 !tolua_isnoobj(tolua_S,2,&tolua_err)
3473 )
3474 goto tolua_lerror;
3475 else
3476#endif
3477 {
3478 fawkes::MessageQueue* self = (fawkes::MessageQueue*) tolua_tousertype(tolua_S,1,0);
3479#ifndef TOLUA_RELEASE
3480 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'pop'", NULL);
3481#endif
3482 bool exc_caught = false;
3483 try {
3484 {
3485 self->pop();
3486 }
3487 } catch (fawkes::Exception &e) {
3488 exc_caught = true;
3489 lua_pushstring(tolua_S, e.what_no_backtrace());
3490 }
3491 catch (std::exception &e) {
3492 exc_caught = true;
3493 lua_pushstring(tolua_S, e.what());
3494 }
3495 if (exc_caught) lua_error(tolua_S);
3496
3497 }
3498 return 0;
3499#ifndef TOLUA_RELEASE
3500 tolua_lerror:
3501 tolua_error(tolua_S,"#ferror in function 'pop'.",&tolua_err);
3502 return 0;
3503#endif
3504}
3505#endif //#ifndef TOLUA_DISABLE
3506
3507/* method: begin of class fawkes::MessageQueue */
3508#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_begin00
3509static int tolua_fawkesinterface_fawkes_MessageQueue_begin00(lua_State* tolua_S)
3510{
3511#ifndef TOLUA_RELEASE
3512 tolua_Error tolua_err;
3513 if (
3514 !tolua_isusertype(tolua_S,1,"fawkes::MessageQueue",0,&tolua_err) ||
3515 !tolua_isnoobj(tolua_S,2,&tolua_err)
3516 )
3517 goto tolua_lerror;
3518 else
3519#endif
3520 {
3521 fawkes::MessageQueue* self = (fawkes::MessageQueue*) tolua_tousertype(tolua_S,1,0);
3522#ifndef TOLUA_RELEASE
3523 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'begin'", NULL);
3524#endif
3525 bool exc_caught = false;
3526 try {
3527 {
3529 {
3530#ifdef __cplusplus
3531 void* tolua_obj = Mtolua_new((fawkes::MessageQueue::MessageIterator)(tolua_ret));
3532 tolua_pushusertype(tolua_S,tolua_obj,"fawkes::MessageQueue::MessageIterator");
3533 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
3534#else
3535 void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(fawkes::MessageQueue::MessageIterator));
3536 tolua_pushusertype(tolua_S,tolua_obj,"fawkes::MessageQueue::MessageIterator");
3537 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
3538#endif
3539 }
3540 }
3541 } catch (fawkes::Exception &e) {
3542 exc_caught = true;
3543 lua_pushstring(tolua_S, e.what_no_backtrace());
3544 }
3545 catch (std::exception &e) {
3546 exc_caught = true;
3547 lua_pushstring(tolua_S, e.what());
3548 }
3549 if (exc_caught) lua_error(tolua_S);
3550
3551 }
3552 return 1;
3553#ifndef TOLUA_RELEASE
3554 tolua_lerror:
3555 tolua_error(tolua_S,"#ferror in function 'begin'.",&tolua_err);
3556 return 0;
3557#endif
3558}
3559#endif //#ifndef TOLUA_DISABLE
3560
3561/* method: end of class fawkes::MessageQueue */
3562#ifndef TOLUA_DISABLE_tolua_fawkesinterface_fawkes_MessageQueue_end00
3563static int tolua_fawkesinterface_fawkes_MessageQueue_end00(lua_State* tolua_S)
3564{
3565#ifndef TOLUA_RELEASE
3566 tolua_Error tolua_err;
3567 if (
3568 !tolua_isusertype(tolua_S,1,"fawkes::MessageQueue",0,&tolua_err) ||
3569 !tolua_isnoobj(tolua_S,2,&tolua_err)
3570 )
3571 goto tolua_lerror;
3572 else
3573#endif
3574 {
3575 fawkes::MessageQueue* self = (fawkes::MessageQueue*) tolua_tousertype(tolua_S,1,0);
3576#ifndef TOLUA_RELEASE
3577 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'end'", NULL);
3578#endif
3579 bool exc_caught = false;
3580 try {
3581 {
3583 {
3584#ifdef __cplusplus
3585 void* tolua_obj = Mtolua_new((fawkes::MessageQueue::MessageIterator)(tolua_ret));
3586 tolua_pushusertype(tolua_S,tolua_obj,"fawkes::MessageQueue::MessageIterator");
3587 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
3588#else
3589 void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(fawkes::MessageQueue::MessageIterator));
3590 tolua_pushusertype(tolua_S,tolua_obj,"fawkes::MessageQueue::MessageIterator");
3591 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
3592#endif
3593 }
3594 }
3595 } catch (fawkes::Exception &e) {
3596 exc_caught = true;
3597 lua_pushstring(tolua_S, e.what_no_backtrace());
3598 }
3599 catch (std::exception &e) {
3600 exc_caught = true;
3601 lua_pushstring(tolua_S, e.what());
3602 }
3603 if (exc_caught) lua_error(tolua_S);
3604
3605 }
3606 return 1;
3607#ifndef TOLUA_RELEASE
3608 tolua_lerror:
3609 tolua_error(tolua_S,"#ferror in function 'end'.",&tolua_err);
3610 return 0;
3611#endif
3612}
3613#endif //#ifndef TOLUA_DISABLE
3614
3615/* Open function */
3616TOLUA_API int tolua_fawkesinterface_open (lua_State* tolua_S)
3617{
3618 tolua_open(tolua_S);
3619 tolua_reg_types(tolua_S);
3620 tolua_module(tolua_S,NULL,0);
3621 tolua_beginmodule(tolua_S,NULL);
3622 tolua_module(tolua_S,"fawkes",0);
3623 tolua_beginmodule(tolua_S,"fawkes");
3624 #ifdef __cplusplus
3625 tolua_cclass(tolua_S,"Uuid","fawkes::Uuid","",tolua_collect_fawkes__Uuid);
3626 #else
3627 tolua_cclass(tolua_S,"Uuid","fawkes::Uuid","",NULL);
3628 #endif
3629 tolua_beginmodule(tolua_S,"Uuid");
3630 tolua_function(tolua_S,"get_string",tolua_fawkesinterface_fawkes_Uuid_get_string00);
3631 tolua_endmodule(tolua_S);
3632 tolua_cclass(tolua_S,"Interface","fawkes::Interface","",NULL);
3633 tolua_beginmodule(tolua_S,"Interface");
3634 tolua_function(tolua_S,"oftype",tolua_fawkesinterface_fawkes_Interface_oftype00);
3635 tolua_function(tolua_S,"datachunk",tolua_fawkesinterface_fawkes_Interface_datachunk00);
3636 tolua_function(tolua_S,"datasize",tolua_fawkesinterface_fawkes_Interface_datasize00);
3637 tolua_function(tolua_S,"type",tolua_fawkesinterface_fawkes_Interface_type00);
3638 tolua_function(tolua_S,"id",tolua_fawkesinterface_fawkes_Interface_id00);
3639 tolua_function(tolua_S,"uid",tolua_fawkesinterface_fawkes_Interface_uid00);
3640 tolua_function(tolua_S,"serial",tolua_fawkesinterface_fawkes_Interface_serial00);
3641 tolua_function(tolua_S,"mem_serial",tolua_fawkesinterface_fawkes_Interface_mem_serial00);
3642 tolua_function(tolua_S,".eq",tolua_fawkesinterface_fawkes_Interface__eq00);
3643 tolua_function(tolua_S,"hash",tolua_fawkesinterface_fawkes_Interface_hash00);
3644 tolua_function(tolua_S,"hash_size",tolua_fawkesinterface_fawkes_Interface_hash_size00);
3645 tolua_function(tolua_S,"hash_printable",tolua_fawkesinterface_fawkes_Interface_hash_printable00);
3646 tolua_function(tolua_S,"is_writer",tolua_fawkesinterface_fawkes_Interface_is_writer00);
3647 tolua_function(tolua_S,"set_from_chunk",tolua_fawkesinterface_fawkes_Interface_set_from_chunk00);
3648 tolua_function(tolua_S,"create_message_generic",tolua_fawkesinterface_fawkes_Interface_create_message_generic00);
3649 tolua_function(tolua_S,"read",tolua_fawkesinterface_fawkes_Interface_read00);
3650 tolua_function(tolua_S,"write",tolua_fawkesinterface_fawkes_Interface_write00);
3651 tolua_function(tolua_S,"has_writer",tolua_fawkesinterface_fawkes_Interface_has_writer00);
3652 tolua_function(tolua_S,"num_readers",tolua_fawkesinterface_fawkes_Interface_num_readers00);
3653 tolua_function(tolua_S,"changed",tolua_fawkesinterface_fawkes_Interface_changed00);
3654 tolua_function(tolua_S,"refreshed",tolua_fawkesinterface_fawkes_Interface_refreshed00);
3655 tolua_function(tolua_S,"timestamp",tolua_fawkesinterface_fawkes_Interface_timestamp00);
3656 tolua_function(tolua_S,"set_auto_timestamping",tolua_fawkesinterface_fawkes_Interface_set_auto_timestamping00);
3657 tolua_function(tolua_S,"set_timestamp",tolua_fawkesinterface_fawkes_Interface_set_timestamp00);
3658 tolua_function(tolua_S,"set_clock",tolua_fawkesinterface_fawkes_Interface_set_clock00);
3659 tolua_function(tolua_S,"msgq_enqueue_copy",tolua_fawkesinterface_fawkes_Interface_msgq_enqueue_copy00);
3660 tolua_function(tolua_S,"msgq_remove",tolua_fawkesinterface_fawkes_Interface_msgq_remove00);
3661 tolua_function(tolua_S,"msgq_remove",tolua_fawkesinterface_fawkes_Interface_msgq_remove01);
3662 tolua_function(tolua_S,"msgq_size",tolua_fawkesinterface_fawkes_Interface_msgq_size00);
3663 tolua_function(tolua_S,"msgq_flush",tolua_fawkesinterface_fawkes_Interface_msgq_flush00);
3664 tolua_function(tolua_S,"msgq_lock",tolua_fawkesinterface_fawkes_Interface_msgq_lock00);
3665 tolua_function(tolua_S,"msgq_try_lock",tolua_fawkesinterface_fawkes_Interface_msgq_try_lock00);
3666 tolua_function(tolua_S,"msgq_unlock",tolua_fawkesinterface_fawkes_Interface_msgq_unlock00);
3667 tolua_function(tolua_S,"msgq_pop",tolua_fawkesinterface_fawkes_Interface_msgq_pop00);
3668 tolua_function(tolua_S,"msgq_first_generic",tolua_fawkesinterface_fawkes_Interface_msgq_first_generic00);
3669 tolua_function(tolua_S,"msgq_empty",tolua_fawkesinterface_fawkes_Interface_msgq_empty00);
3670 tolua_endmodule(tolua_S);
3671
3672 { /* begin embedded lua code */
3673 int top = lua_gettop(tolua_S);
3674 static const unsigned char B[] = {
3675 10,102,117,110, 99,116,105,111,110, 32,102, 97,119,107,101,
3676 115, 46, 73,110,116,101,114,102, 97, 99,101, 58,109,115,103,
3677 113, 95,102,105,114,115,116, 40, 41, 10,108,111, 99, 97,108,
3678 32,109,101,115,115, 97,103,101, 32, 61, 32,115,101,108,102,
3679 58,109,115,103,113, 95,102,105,114,115,116, 95,103,101,110,
3680 101,114,105, 99, 40, 41, 10,108,111, 99, 97,108, 32,109, 32,
3681 61, 32,116,111,108,117, 97, 46, 99, 97,115,116, 40,109,101,
3682 115,115, 97,103,101, 44, 32, 34,102, 97,119,107,101,115, 58,
3683 58, 34, 32, 46, 46, 32,115,101,108,102, 58,116,121,112,101,
3684 40, 41, 32, 46, 46, 32, 34, 58, 58, 34, 32, 46, 46, 32,109,
3685 101,115,115, 97,103,101, 58,116,121,112,101, 40, 41, 41, 10,
3686 114,101,116,117,114,110, 32,109, 10,101,110,100, 10,102,117,
3687 110, 99,116,105,111,110, 32,102, 97,119,107,101,115, 46, 73,
3688 110,116,101,114,102, 97, 99,101, 58, 99,114,101, 97,116,101,
3689 95,109,101,115,115, 97,103,101, 40,116,121,112,101, 41, 10,
3690 108,111, 99, 97,108, 32,109,101,115,115, 97,103,101, 32, 61,
3691 32,115,101,108,102, 58, 99,114,101, 97,116,101, 95,109,101,
3692 115,115, 97,103,101, 95,103,101,110,101,114,105, 99, 40,116,
3693 121,112,101, 41, 10,114,101,116,117,114,110, 32,116,111,108,
3694 117, 97, 46, 99, 97,115,116, 40,109,101,115,115, 97,103,101,
3695 44, 32, 34,102, 97,119,107,101,115, 58, 58, 34, 32, 46, 46,
3696 32,115,101,108,102, 58,116,121,112,101, 40, 41, 32, 46, 46,
3697 32, 34, 58, 58, 34, 32, 46, 46, 32,109,101,115,115, 97,103,
3698 101, 58,116,121,112,101, 40, 41, 41, 10,101,110,100, 10,102,
3699 117,110, 99,116,105,111,110, 32,102, 97,119,107,101,115, 46,
3700 73,110,116,101,114,102, 97, 99,101, 58,109,115,103,113, 95,
3701 101,110,113,117,101,117,101, 40,109,101,115,115, 97,103,101,
3702 41, 10,114,101,116,117,114,110, 32,115,101,108,102, 58,109,
3703 115,103,113, 95,101,110,113,117,101,117,101, 95, 99,111,112,
3704 121, 40,109,101,115,115, 97,103,101, 41, 10,101,110,100, 45,
3705 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,32
3706 };
3707 tolua_dobuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code 1");
3708 lua_settop(tolua_S, top);
3709 } /* end of embedded lua code */
3710
3711 tolua_endmodule(tolua_S);
3712 tolua_module(tolua_S,"fawkes",0);
3713 tolua_beginmodule(tolua_S,"fawkes");
3714 #ifdef __cplusplus
3715 tolua_cclass(tolua_S,"Message","fawkes::Message","RefCount",tolua_collect_fawkes__Message);
3716 #else
3717 tolua_cclass(tolua_S,"Message","fawkes::Message","RefCount",NULL);
3718 #endif
3719 tolua_beginmodule(tolua_S,"Message");
3720 tolua_function(tolua_S,"new",tolua_fawkesinterface_fawkes_Message_new00);
3721 tolua_function(tolua_S,"new_local",tolua_fawkesinterface_fawkes_Message_new00_local);
3722 tolua_function(tolua_S,".call",tolua_fawkesinterface_fawkes_Message_new00_local);
3723 tolua_function(tolua_S,"new",tolua_fawkesinterface_fawkes_Message_new01);
3724 tolua_function(tolua_S,"new_local",tolua_fawkesinterface_fawkes_Message_new01_local);
3725 tolua_function(tolua_S,".call",tolua_fawkesinterface_fawkes_Message_new01_local);
3726 tolua_function(tolua_S,"new",tolua_fawkesinterface_fawkes_Message_new02);
3727 tolua_function(tolua_S,"new_local",tolua_fawkesinterface_fawkes_Message_new02_local);
3728 tolua_function(tolua_S,".call",tolua_fawkesinterface_fawkes_Message_new02_local);
3729 tolua_function(tolua_S,"id",tolua_fawkesinterface_fawkes_Message_id00);
3730 tolua_function(tolua_S,"sender_id",tolua_fawkesinterface_fawkes_Message_sender_id00);
3731 tolua_function(tolua_S,"source_id",tolua_fawkesinterface_fawkes_Message_source_id00);
3732 tolua_function(tolua_S,"sender_thread_name",tolua_fawkesinterface_fawkes_Message_sender_thread_name00);
3733 tolua_function(tolua_S,"interface",tolua_fawkesinterface_fawkes_Message_interface00);
3734 tolua_function(tolua_S,"type",tolua_fawkesinterface_fawkes_Message_type00);
3735 tolua_function(tolua_S,"datachunk",tolua_fawkesinterface_fawkes_Message_datachunk00);
3736 tolua_function(tolua_S,"datasize",tolua_fawkesinterface_fawkes_Message_datasize00);
3737 tolua_function(tolua_S,"set_from_chunk",tolua_fawkesinterface_fawkes_Message_set_from_chunk00);
3738 tolua_function(tolua_S,"ref",tolua_fawkesinterface_fawkes_Message_ref00);
3739 tolua_function(tolua_S,"unref",tolua_fawkesinterface_fawkes_Message_unref00);
3740 tolua_function(tolua_S,"refcount",tolua_fawkesinterface_fawkes_Message_refcount00);
3741 tolua_endmodule(tolua_S);
3742 tolua_endmodule(tolua_S);
3743 tolua_module(tolua_S,"fawkes",0);
3744 tolua_beginmodule(tolua_S,"fawkes");
3745 #ifdef __cplusplus
3746 tolua_cclass(tolua_S,"MessageQueue","fawkes::MessageQueue","",tolua_collect_fawkes__MessageQueue);
3747 #else
3748 tolua_cclass(tolua_S,"MessageQueue","fawkes::MessageQueue","",NULL);
3749 #endif
3750 tolua_beginmodule(tolua_S,"MessageQueue");
3751 tolua_function(tolua_S,"new",tolua_fawkesinterface_fawkes_MessageQueue_new00);
3752 tolua_function(tolua_S,"new_local",tolua_fawkesinterface_fawkes_MessageQueue_new00_local);
3753 tolua_function(tolua_S,".call",tolua_fawkesinterface_fawkes_MessageQueue_new00_local);
3754 tolua_function(tolua_S,"delete",tolua_fawkesinterface_fawkes_MessageQueue_delete00);
3755 #ifdef __cplusplus
3756 tolua_cclass(tolua_S,"MessageIterator","fawkes::MessageQueue::MessageIterator","",tolua_collect_fawkes__MessageQueue__MessageIterator);
3757 #else
3758 tolua_cclass(tolua_S,"MessageIterator","fawkes::MessageQueue::MessageIterator","",NULL);
3759 #endif
3760 tolua_beginmodule(tolua_S,"MessageIterator");
3761 tolua_function(tolua_S,"new",tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator_new00);
3762 tolua_function(tolua_S,"new_local",tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator_new00_local);
3763 tolua_function(tolua_S,".call",tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator_new00_local);
3764 tolua_function(tolua_S,"new",tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator_new01);
3765 tolua_function(tolua_S,"new_local",tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator_new01_local);
3766 tolua_function(tolua_S,".call",tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator_new01_local);
3767 tolua_function(tolua_S,".add",tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator__add00);
3768 tolua_function(tolua_S,".eq",tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator__eq00);
3769 tolua_function(tolua_S,".mul",tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator__mul00);
3770 tolua_function(tolua_S,"id",tolua_fawkesinterface_fawkes_MessageQueue_MessageIterator_id00);
3771 tolua_endmodule(tolua_S);
3772 tolua_function(tolua_S,"append",tolua_fawkesinterface_fawkes_MessageQueue_append00);
3773 tolua_function(tolua_S,"remove",tolua_fawkesinterface_fawkes_MessageQueue_remove00);
3774 tolua_function(tolua_S,"remove",tolua_fawkesinterface_fawkes_MessageQueue_remove01);
3775 tolua_function(tolua_S,"insert_after",tolua_fawkesinterface_fawkes_MessageQueue_insert_after00);
3776 tolua_function(tolua_S,"size",tolua_fawkesinterface_fawkes_MessageQueue_size00);
3777 tolua_function(tolua_S,"flush",tolua_fawkesinterface_fawkes_MessageQueue_flush00);
3778 tolua_function(tolua_S,"empty",tolua_fawkesinterface_fawkes_MessageQueue_empty00);
3779 tolua_function(tolua_S,"lock",tolua_fawkesinterface_fawkes_MessageQueue_lock00);
3780 tolua_function(tolua_S,"try_lock",tolua_fawkesinterface_fawkes_MessageQueue_try_lock00);
3781 tolua_function(tolua_S,"unlock",tolua_fawkesinterface_fawkes_MessageQueue_unlock00);
3782 tolua_function(tolua_S,"first",tolua_fawkesinterface_fawkes_MessageQueue_first00);
3783 tolua_function(tolua_S,"pop",tolua_fawkesinterface_fawkes_MessageQueue_pop00);
3784 tolua_function(tolua_S,"begin",tolua_fawkesinterface_fawkes_MessageQueue_begin00);
3785 tolua_function(tolua_S,"end",tolua_fawkesinterface_fawkes_MessageQueue_end00);
3786 tolua_endmodule(tolua_S);
3787 tolua_endmodule(tolua_S);
3788 tolua_endmodule(tolua_S);
3789 return 1;
3790}
3791
3792
3793extern "C" {
3794#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
3795 TOLUA_API int luaopen_fawkesinterface (lua_State* tolua_S) {
3796 return tolua_fawkesinterface_open(tolua_S);
3797};
3798#endif
3799}
3800
3801
This is supposed to be the central clock in Fawkes.
Definition: clock.h:35
Base class for exceptions in Fawkes.
Definition: exception.h:36
virtual const char * what_no_backtrace() const noexcept
Get primary string (does not implicitly print the back trace).
Definition: exception.cpp:663
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:80
bool msgq_try_lock()
Try to lock message queue.
Definition: interface.cpp:1119
const char * hash_printable() const
Get printable interface hash.
Definition: interface.cpp:314
const void * datachunk() const
Get data chunk.
Definition: interface.cpp:436
unsigned int msgq_enqueue_copy(Message *message)
Enqueue copy of message at end of queue.
Definition: interface.cpp:953
const char * type() const
Get type of interface.
Definition: interface.cpp:652
void set_auto_timestamping(bool enabled)
Enable or disable automated timestamping.
Definition: interface.cpp:755
void msgq_pop()
Erase first message from queue.
Definition: interface.cpp:1215
const Time * timestamp() const
Get timestamp of last write.
Definition: interface.cpp:714
Message * msgq_first()
Get the first message from the message queue.
Definition: interface.cpp:1200
bool changed() const
Definition: interface.cpp:789
size_t hash_size() const
Get size of interface hash.
Definition: interface.cpp:426
virtual Message * create_message(const char *type) const =0
Create message based on type name.
bool is_writer() const
Check if this is a writing instance.
Definition: interface.cpp:445
void msgq_remove(Message *message)
Remove message from queue.
Definition: interface.cpp:1010
const unsigned char * hash() const
Get interface hash.
Definition: interface.cpp:305
unsigned int msgq_size()
Get size of message queue.
Definition: interface.cpp:1045
void write()
Write from local copy into BlackBoard memory.
Definition: interface.cpp:501
const char * id() const
Get identifier of interface.
Definition: interface.cpp:661
unsigned int mem_serial() const
Get memory serial of interface.
Definition: interface.cpp:704
Uuid serial() const
Get instance serial of interface.
Definition: interface.cpp:695
bool msgq_empty()
Check if queue is empty.
Definition: interface.cpp:1062
void set_from_chunk(void *chunk)
Set from a raw data chunk.
Definition: interface.cpp:831
void msgq_lock()
Lock message queue.
Definition: interface.cpp:1098
const char * uid() const
Get unique identifier of interface.
Definition: interface.cpp:686
void msgq_flush()
Flush all messages.
Definition: interface.cpp:1079
unsigned int num_readers() const
Get the number of readers.
Definition: interface.cpp:876
void read()
Read from BlackBoard into local copy.
Definition: interface.cpp:479
void msgq_unlock()
Unlock message queue.
Definition: interface.cpp:1137
void set_clock(Clock *clock)
Set clock to use for timestamping.
Definition: interface.cpp:745
unsigned int datasize() const
Get data size.
Definition: interface.cpp:540
bool has_writer() const
Check if there is a writer for the interface.
Definition: interface.cpp:848
bool oftype(const char *interface_type) const
Check if interface is of given type.
Definition: interface.cpp:643
void set_timestamp(const Time *t=NULL)
Set timestamp.
Definition: interface.cpp:724
bool refreshed() const
Check if data has been refreshed.
Definition: interface.cpp:811
Message queue used in interfaces.
Definition: message_queue.h:42
MessageIterator end()
Get iterator to element beyond end of message queue list.
void append(Message *msg)
Append message to queue.
void unlock()
Unlock message queue.
void pop()
Erase first message from queue.
void flush()
Delete all messages from queue.
void lock()
Lock message queue.
void remove(const Message *msg)
Remove message from queue.
bool empty() const
Check if message queue is empty.
MessageIterator begin()
Get iterator to first element in message queue.
bool try_lock()
Try to lock message queue.
void insert_after(const MessageIterator &it, Message *msg)
Enqueue message after given iterator.
unsigned int size() const
Get number of messages in queue.
Message * first()
Get first message from queue.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Definition: message.h:44
const char * type() const
Get message type.
Definition: message.cpp:381
const void * datachunk() const
Get pointer to data.
Definition: message.cpp:281
unsigned int datasize() const
Get size of data.
Definition: message.cpp:290
Uuid source_id() const
Get ID of the original source of the message.
Definition: message.cpp:346
Interface * interface() const
Get transmitting interface.
Definition: message.cpp:372
void set_from_chunk(const void *chunk)
Set from raw data chunk.
Definition: message.cpp:301
Uuid sender_id() const
Get ID of the immediate sender, not necessarily the creator of the message.
Definition: message.cpp:336
const char * sender_thread_name() const
Get sender of message.
Definition: message.cpp:327
unsigned int id() const
Get message ID.
Definition: message.cpp:181
void unref()
Decrement reference count and conditionally delete this instance.
Definition: refcount.cpp:95
void ref()
Increment reference count.
Definition: refcount.cpp:67
unsigned int refcount()
Get reference count for this instance.
Definition: refcount.cpp:120
A class for handling time.
Definition: time.h:93
A convenience class for universally unique identifiers (UUIDs).
Definition: uuid.h:29
std::string get_string() const
Get the string representation of the Uuid.
Definition: uuid.cpp:107