1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
5 * This file is not intended to be easily readable and contains a number of
6 * coding conventions designed to improve portability and efficiency. Do not make
7 * changes to this file unless you know what you are doing--modify the SWIG
8 * interface file instead.
9 * ----------------------------------------------------------------------------- */
12 #define SWIG_LUA_TARGET SWIG_LUA_FLAVOR_LUA
13 #define SWIG_LUA_MODULE_GLOBAL
17 /* SwigValueWrapper is described in swig.swg */
18 template<typename T> class SwigValueWrapper {
19 struct SwigMovePointer {
21 SwigMovePointer(T *p) : ptr(p) { }
22 ~SwigMovePointer() { delete ptr; }
23 SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
25 SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
26 SwigValueWrapper(const SwigValueWrapper<T>& rhs);
28 SwigValueWrapper() : pointer(0) { }
29 SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
30 operator T&() const { return *pointer.ptr; }
31 T *operator&() { return pointer.ptr; }
34 template <typename T> T SwigValueInit() {
39 /* -----------------------------------------------------------------------------
40 * This section contains generic SWIG labels for method/variable
41 * declarations/attributes, and other compiler dependent labels.
42 * ----------------------------------------------------------------------------- */
44 /* template workaround for compilers that cannot correctly implement the C++ standard */
45 #ifndef SWIGTEMPLATEDISAMBIGUATOR
46 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
47 # define SWIGTEMPLATEDISAMBIGUATOR template
48 # elif defined(__HP_aCC)
49 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
50 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
51 # define SWIGTEMPLATEDISAMBIGUATOR template
53 # define SWIGTEMPLATEDISAMBIGUATOR
57 /* inline attribute */
59 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
60 # define SWIGINLINE inline
66 /* attribute recognised by some compilers to avoid 'unused' warnings */
68 # if defined(__GNUC__)
69 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
70 # define SWIGUNUSED __attribute__ ((__unused__))
75 # define SWIGUNUSED __attribute__ ((__unused__))
81 #ifndef SWIG_MSC_UNSUPPRESS_4505
82 # if defined(_MSC_VER)
83 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
87 #ifndef SWIGUNUSEDPARM
89 # define SWIGUNUSEDPARM(p)
91 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
95 /* internal SWIG method */
97 # define SWIGINTERN static SWIGUNUSED
100 /* internal inline SWIG method */
101 #ifndef SWIGINTERNINLINE
102 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
105 /* exporting methods */
106 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
107 # ifndef GCC_HASCLASSVISIBILITY
108 # define GCC_HASCLASSVISIBILITY
113 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
114 # if defined(STATIC_LINKED)
117 # define SWIGEXPORT __declspec(dllexport)
120 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
121 # define SWIGEXPORT __attribute__ ((visibility("default")))
128 /* calling conventions for Windows */
130 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
131 # define SWIGSTDCALL __stdcall
137 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
138 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
139 # define _CRT_SECURE_NO_DEPRECATE
142 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
143 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
144 # define _SCL_SECURE_NO_DEPRECATE
148 /* -----------------------------------------------------------------------------
151 * This file contains generic C API SWIG runtime support for pointer
153 * ----------------------------------------------------------------------------- */
155 /* This should only be incremented when either the layout of swig_type_info changes,
156 or for whatever reason, the runtime changes incompatibly */
157 #define SWIG_RUNTIME_VERSION "4"
159 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
160 #ifdef SWIG_TYPE_TABLE
161 # define SWIG_QUOTE_STRING(x) #x
162 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
163 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
165 # define SWIG_TYPE_TABLE_NAME
169 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
170 creating a static or dynamic library from the SWIG runtime code.
171 In 99.9% of the cases, SWIG just needs to declare them as 'static'.
173 But only do this if strictly necessary, ie, if you have problems
174 with your compiler or suchlike.
178 # define SWIGRUNTIME SWIGINTERN
181 #ifndef SWIGRUNTIMEINLINE
182 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
185 /* Generic buffer size */
186 #ifndef SWIG_BUFFER_SIZE
187 # define SWIG_BUFFER_SIZE 1024
190 /* Flags for pointer conversions */
191 #define SWIG_POINTER_DISOWN 0x1
192 #define SWIG_CAST_NEW_MEMORY 0x2
194 /* Flags for new pointer objects */
195 #define SWIG_POINTER_OWN 0x1
199 Flags/methods for returning states.
201 The SWIG conversion methods, as ConvertPtr, return an integer
202 that tells if the conversion was successful or not. And if not,
203 an error code can be returned (see swigerrors.swg for the codes).
205 Use the following macros/flags to set or process the returning
208 In old versions of SWIG, code such as the following was usually written:
210 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
216 Now you can be more explicit:
218 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
219 if (SWIG_IsOK(res)) {
225 which is the same really, but now you can also do
228 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
229 if (SWIG_IsOK(res)) {
231 if (SWIG_IsNewObj(res) {
241 I.e., now SWIG_ConvertPtr can return new objects and you can
242 identify the case and take care of the deallocation. Of course that
243 also requires SWIG_ConvertPtr to return new result values, such as
245 int SWIG_ConvertPtr(obj, ptr,...) {
247 if (<need new object>) {
248 *ptr = <ptr to new allocated object>;
251 *ptr = <ptr to old object>;
259 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
260 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
263 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
264 allows to return the 'cast rank', for example, if you have this
271 food(1) // cast rank '1' (1 -> 1.0)
272 fooi(1) // cast rank '0'
274 just use the SWIG_AddCast()/SWIG_CheckState()
278 #define SWIG_ERROR (-1)
279 #define SWIG_IsOK(r) (r >= 0)
280 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
282 /* The CastRankLimit says how many bits are used for the cast rank */
283 #define SWIG_CASTRANKLIMIT (1 << 8)
284 /* The NewMask denotes the object was created (using new/malloc) */
285 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
286 /* The TmpMask is for in/out typemaps that use temporal objects */
287 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
288 /* Simple returning values */
289 #define SWIG_BADOBJ (SWIG_ERROR)
290 #define SWIG_OLDOBJ (SWIG_OK)
291 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
292 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
293 /* Check, add and del mask methods */
294 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
295 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
296 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
297 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
298 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
299 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
302 #if defined(SWIG_CASTRANK_MODE)
303 # ifndef SWIG_TypeRank
304 # define SWIG_TypeRank unsigned long
306 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
307 # define SWIG_MAXCASTRANK (2)
309 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
310 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
311 SWIGINTERNINLINE int SWIG_AddCast(int r) {
312 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
314 SWIGINTERNINLINE int SWIG_CheckState(int r) {
315 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
317 #else /* no cast-rank mode */
318 # define SWIG_AddCast
319 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
326 // removed: extern "C" {
329 typedef void *(*swig_converter_func)(void *, int *);
330 typedef struct swig_type_info *(*swig_dycast_func)(void **);
332 /* Structure to store information on one type */
333 typedef struct swig_type_info {
334 const char *name; /* mangled name of this type */
335 const char *str; /* human readable name of this type */
336 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
337 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
338 void *clientdata; /* language specific type data */
339 int owndata; /* flag if the structure owns the clientdata */
342 /* Structure to store a type and conversion function used for casting */
343 typedef struct swig_cast_info {
344 swig_type_info *type; /* pointer to type that is equivalent to this type */
345 swig_converter_func converter; /* function to cast the void pointers */
346 struct swig_cast_info *next; /* pointer to next cast in linked list */
347 struct swig_cast_info *prev; /* pointer to the previous cast */
350 /* Structure used to store module information
351 * Each module generates one structure like this, and the runtime collects
352 * all of these structures and stores them in a circularly linked list.*/
353 typedef struct swig_module_info {
354 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
355 size_t size; /* Number of types in this module */
356 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
357 swig_type_info **type_initial; /* Array of initially generated type structures */
358 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
359 void *clientdata; /* Language specific module data */
363 Compare two type names skipping the space characters, therefore
364 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
366 Return 0 when the two name types are equivalent, as in
367 strncmp, but skipping ' '.
370 SWIG_TypeNameComp(const char *f1, const char *l1,
371 const char *f2, const char *l2) {
372 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
373 while ((*f1 == ' ') && (f1 != l1)) ++f1;
374 while ((*f2 == ' ') && (f2 != l2)) ++f2;
375 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
377 return (int)((l1 - f1) - (l2 - f2));
381 Check type equivalence in a name list like <name1>|<name2>|...
382 Return 0 if not equal, 1 if equal
385 SWIG_TypeEquiv(const char *nb, const char *tb) {
387 const char* te = tb + strlen(tb);
389 while (!equiv && *ne) {
390 for (nb = ne; *ne; ++ne) {
391 if (*ne == '|') break;
393 equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
400 Check type equivalence in a name list like <name1>|<name2>|...
401 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
404 SWIG_TypeCompare(const char *nb, const char *tb) {
406 const char* te = tb + strlen(tb);
408 while (!equiv && *ne) {
409 for (nb = ne; *ne; ++ne) {
410 if (*ne == '|') break;
412 equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
422 SWIGRUNTIME swig_cast_info *
423 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
425 swig_cast_info *iter = ty->cast;
427 if (strcmp(iter->type->name, c) == 0) {
428 if (iter == ty->cast)
430 /* Move iter to the top of the linked list */
431 iter->prev->next = iter->next;
433 iter->next->prev = iter->prev;
434 iter->next = ty->cast;
436 if (ty->cast) ty->cast->prev = iter;
447 Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
449 SWIGRUNTIME swig_cast_info *
450 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
452 swig_cast_info *iter = ty->cast;
454 if (iter->type == from) {
455 if (iter == ty->cast)
457 /* Move iter to the top of the linked list */
458 iter->prev->next = iter->next;
460 iter->next->prev = iter->prev;
461 iter->next = ty->cast;
463 if (ty->cast) ty->cast->prev = iter;
474 Cast a pointer up an inheritance hierarchy
476 SWIGRUNTIMEINLINE void *
477 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
478 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
482 Dynamic pointer casting. Down an inheritance hierarchy
484 SWIGRUNTIME swig_type_info *
485 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
486 swig_type_info *lastty = ty;
487 if (!ty || !ty->dcast) return ty;
488 while (ty && (ty->dcast)) {
489 ty = (*ty->dcast)(ptr);
496 Return the name associated with this type
498 SWIGRUNTIMEINLINE const char *
499 SWIG_TypeName(const swig_type_info *ty) {
504 Return the pretty name associated with this type,
505 that is an unmangled type name in a form presentable to the user.
507 SWIGRUNTIME const char *
508 SWIG_TypePrettyName(const swig_type_info *type) {
509 /* The "str" field contains the equivalent pretty names of the
510 type, separated by vertical-bar characters. We choose
511 to print the last name, as it is often (?) the most
513 if (!type) return NULL;
514 if (type->str != NULL) {
515 const char *last_name = type->str;
517 for (s = type->str; *s; s++)
518 if (*s == '|') last_name = s+1;
526 Set the clientdata field for a type
529 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
530 swig_cast_info *cast = ti->cast;
531 /* if (ti->clientdata == clientdata) return; */
532 ti->clientdata = clientdata;
535 if (!cast->converter) {
536 swig_type_info *tc = cast->type;
537 if (!tc->clientdata) {
538 SWIG_TypeClientData(tc, clientdata);
545 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
546 SWIG_TypeClientData(ti, clientdata);
551 Search for a swig_type_info structure only by mangled name
552 Search is a O(log #types)
554 We start searching at module start, and finish searching when start == end.
555 Note: if start == end at the beginning of the function, we go all the way around
558 SWIGRUNTIME swig_type_info *
559 SWIG_MangledTypeQueryModule(swig_module_info *start,
560 swig_module_info *end,
562 swig_module_info *iter = start;
565 register size_t l = 0;
566 register size_t r = iter->size - 1;
568 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
569 register size_t i = (l + r) >> 1;
570 const char *iname = iter->types[i]->name;
572 register int compare = strcmp(name, iname);
574 return iter->types[i];
575 } else if (compare < 0) {
581 } else if (compare > 0) {
585 break; /* should never happen */
590 } while (iter != end);
595 Search for a swig_type_info structure for either a mangled name or a human readable name.
596 It first searches the mangled names of the types, which is a O(log #types)
597 If a type is not found it then searches the human readable names, which is O(#types).
599 We start searching at module start, and finish searching when start == end.
600 Note: if start == end at the beginning of the function, we go all the way around
603 SWIGRUNTIME swig_type_info *
604 SWIG_TypeQueryModule(swig_module_info *start,
605 swig_module_info *end,
607 /* STEP 1: Search the name field using binary search */
608 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
612 /* STEP 2: If the type hasn't been found, do a complete search
613 of the str field (the human readable name) */
614 swig_module_info *iter = start;
616 register size_t i = 0;
617 for (; i < iter->size; ++i) {
618 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
619 return iter->types[i];
622 } while (iter != end);
625 /* neither found a match */
630 Pack binary data into a string
633 SWIG_PackData(char *c, void *ptr, size_t sz) {
634 static const char hex[17] = "0123456789abcdef";
635 register const unsigned char *u = (unsigned char *) ptr;
636 register const unsigned char *eu = u + sz;
637 for (; u != eu; ++u) {
638 register unsigned char uu = *u;
639 *(c++) = hex[(uu & 0xf0) >> 4];
640 *(c++) = hex[uu & 0xf];
646 Unpack binary data from a string
648 SWIGRUNTIME const char *
649 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
650 register unsigned char *u = (unsigned char *) ptr;
651 register const unsigned char *eu = u + sz;
652 for (; u != eu; ++u) {
653 register char d = *(c++);
654 register unsigned char uu;
655 if ((d >= '0') && (d <= '9'))
656 uu = ((d - '0') << 4);
657 else if ((d >= 'a') && (d <= 'f'))
658 uu = ((d - ('a'-10)) << 4);
662 if ((d >= '0') && (d <= '9'))
664 else if ((d >= 'a') && (d <= 'f'))
665 uu |= (d - ('a'-10));
674 Pack 'void *' into a string buffer.
677 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
679 if ((2*sizeof(void *) + 2) > bsz) return 0;
681 r = SWIG_PackData(r,&ptr,sizeof(void *));
682 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
687 SWIGRUNTIME const char *
688 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
690 if (strcmp(c,"NULL") == 0) {
697 return SWIG_UnpackData(++c,ptr,sizeof(void *));
701 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
703 size_t lname = (name ? strlen(name) : 0);
704 if ((2*sz + 2 + lname) > bsz) return 0;
706 r = SWIG_PackData(r,ptr,sz);
708 strncpy(r,name,lname+1);
715 SWIGRUNTIME const char *
716 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
718 if (strcmp(c,"NULL") == 0) {
725 return SWIG_UnpackData(++c,ptr,sz);
732 /* -----------------------------------------------------------------------------
735 * This file contains the runtime support for Lua modules
736 * and includes code for managing global variables and pointer
738 * ----------------------------------------------------------------------------- */
741 // removed: extern "C" {
746 #include <stdlib.h> /* for malloc */
747 #include <assert.h> /* for a few sanity tests */
749 /* -----------------------------------------------------------------------------
751 * ----------------------------------------------------------------------------- */
753 #define SWIG_LUA_FLAVOR_LUA 1
754 #define SWIG_LUA_FLAVOR_ELUA 2
755 #define SWIG_LUA_FLAVOR_ELUAC 3
757 #if !defined(SWIG_LUA_TARGET)
758 # error SWIG_LUA_TARGET not defined
761 #if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
762 # define SWIG_LUA_CONSTTAB_INT(B, C) LSTRKEY(B), LNUMVAL(C)
763 # define SWIG_LUA_CONSTTAB_FLOAT(B, C) LSTRKEY(B), LNUMVAL(C)
764 # define SWIG_LUA_CONSTTAB_STRING(B, C) LSTRKEY(B), LSTRVAL(C)
765 # define SWIG_LUA_CONSTTAB_CHAR(B, C) LSTRKEY(B), LNUMVAL(C)
766 #else /* SWIG_LUA_FLAVOR_LUA */
767 # define SWIG_LUA_CONSTTAB_INT(B, C) SWIG_LUA_INT, (char *)B, (long)C, 0, 0, 0
768 # define SWIG_LUA_CONSTTAB_FLOAT(B, C) SWIG_LUA_FLOAT, (char *)B, 0, (double)C, 0, 0
769 # define SWIG_LUA_CONSTTAB_STRING(B, C) SWIG_LUA_STRING, (char *)B, 0, 0, (void *)C, 0
770 # define SWIG_LUA_CONSTTAB_CHAR(B, C) SWIG_LUA_CHAR, (char *)B, (long)C, 0, 0, 0
773 #if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
774 # define LRO_STRVAL(v) {{.p = (char *) v}, LUA_TSTRING}
775 # define LSTRVAL LRO_STRVAL
778 /* -----------------------------------------------------------------------------
779 * compatibility defines
780 * ----------------------------------------------------------------------------- */
782 /* History of Lua C API length functions: In Lua 5.0 (and before?)
783 there was "lua_strlen". In Lua 5.1, this was renamed "lua_objlen",
784 but a compatibility define of "lua_strlen" was added. In Lua 5.2,
785 this function was again renamed, to "lua_rawlen" (to emphasize that
786 it doesn't call the "__len" metamethod), and the compatibility
787 define of lua_strlen was removed. All SWIG uses have been updated
788 to "lua_rawlen", and we add our own defines of that here for older
790 #if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
791 # define lua_rawlen lua_strlen
792 #elif LUA_VERSION_NUM == 501
793 # define lua_rawlen lua_objlen
797 /* lua_pushglobaltable is the recommended "future-proof" way to get
798 the global table for Lua 5.2 and later. Here we define
799 lua_pushglobaltable ourselves for Lua versions before 5.2. */
800 #if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
801 # define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
805 /* -----------------------------------------------------------------------------
807 * ----------------------------------------------------------------------------- */
809 #define SWIG_LUA_INT 1
810 #define SWIG_LUA_FLOAT 2
811 #define SWIG_LUA_STRING 3
812 #define SWIG_LUA_POINTER 4
813 #define SWIG_LUA_BINARY 5
814 #define SWIG_LUA_CHAR 6
816 /* Structure for variable linking table */
823 /* Constant information structure */
830 swig_type_info **ptype;
831 } swig_lua_const_info;
835 lua_CFunction method;
840 lua_CFunction getmethod;
841 lua_CFunction setmethod;
842 } swig_lua_attribute;
844 typedef struct swig_lua_class {
846 swig_type_info **type;
847 lua_CFunction constructor;
848 void (*destructor)(void *);
849 swig_lua_method *methods;
850 swig_lua_attribute *attributes;
851 struct swig_lua_class **bases;
852 const char **base_names;
855 /* this is the struct for wrappering all pointers in SwigLua
858 swig_type_info *type;
859 int own; /* 1 if owned & must be destroyed */
863 /* this is the struct for wrapping arbitary packed binary data
864 (currently it is only used for member function pointers)
865 the data ordering is similar to swig_lua_userdata, but it is currently not possible
866 to tell the two structures apart within SWIG, other than by looking at the type
869 swig_type_info *type;
870 int own; /* 1 if owned & must be destroyed */
871 char data[1]; /* arbitary amount of data */
874 /* Common SWIG API */
875 #define SWIG_NewPointerObj(L, ptr, type, owner) SWIG_Lua_NewPointerObj(L, (void *)ptr, type, owner)
876 #define SWIG_ConvertPtr(L,idx, ptr, type, flags) SWIG_Lua_ConvertPtr(L,idx,ptr,type,flags)
877 #define SWIG_MustGetPtr(L,idx, type,flags, argnum,fnname) SWIG_Lua_MustGetPtr(L,idx, type,flags, argnum,fnname)
878 /* for C++ member pointers, ie, member methods */
879 #define SWIG_ConvertMember(L, idx, ptr, sz, ty) SWIG_Lua_ConvertPacked(L, idx, ptr, sz, ty)
880 #define SWIG_NewMemberObj(L, ptr, sz, type) SWIG_Lua_NewPackedObj(L, ptr, sz, type)
883 #define SWIG_GetModule(clientdata) SWIG_Lua_GetModule((lua_State*)(clientdata))
884 #define SWIG_SetModule(clientdata, pointer) SWIG_Lua_SetModule((lua_State*) (clientdata), pointer)
885 #define SWIG_MODULE_CLIENTDATA_TYPE lua_State*
887 /* Contract support */
888 #define SWIG_contract_assert(expr, msg) \
889 if (!(expr)) { lua_pushstring(L, (char *) msg); goto fail; } else
891 /* helper #defines */
892 #define SWIG_fail {goto fail;}
893 #define SWIG_fail_arg(func_name,argnum,type) \
894 {lua_pushfstring(L,"Error in %s (arg %d), expected '%s' got '%s'",\
895 func_name,argnum,type,SWIG_Lua_typename(L,argnum));\
897 #define SWIG_fail_ptr(func_name,argnum,type) \
898 SWIG_fail_arg(func_name,argnum,(type && type->str)?type->str:"void*")
899 #define SWIG_check_num_args(func_name,a,b) \
900 if (lua_gettop(L)<a || lua_gettop(L)>b) \
901 {lua_pushfstring(L,"Error in %s expected %d..%d args, got %d",func_name,a,b,lua_gettop(L));\
905 #define SWIG_Lua_get_table(L,n) \
906 (lua_pushstring(L, n), lua_rawget(L,-2))
908 #define SWIG_Lua_add_function(L,n,f) \
909 (lua_pushstring(L, n), \
910 lua_pushcfunction(L, f), \
913 /* special helper for allowing 'nil' for usertypes */
914 #define SWIG_isptrtype(L,I) (lua_isuserdata(L,I) || lua_isnil(L,I))
917 /* Special helper for member function pointers
918 it gets the address, casts it, then dereferences it */
919 //#define SWIG_mem_fn_as_voidptr(a) (*((char**)&(a)))
922 /* storing/access of swig_module_info */
923 SWIGRUNTIME swig_module_info *
924 SWIG_Lua_GetModule(lua_State* L) {
925 swig_module_info *ret = 0;
926 lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
927 lua_rawget(L,LUA_REGISTRYINDEX);
928 if (lua_islightuserdata(L,-1))
929 ret=(swig_module_info*)lua_touserdata(L,-1);
930 lua_pop(L,1); /* tidy */
935 SWIG_Lua_SetModule(lua_State* L, swig_module_info *module) {
936 /* add this all into the Lua registry: */
937 lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
938 lua_pushlightuserdata(L,(void*)module);
939 lua_rawset(L,LUA_REGISTRYINDEX);
942 /* -----------------------------------------------------------------------------
943 * global variable support code: modules
944 * ----------------------------------------------------------------------------- */
946 /* this function is called when trying to set an immutable.
947 default value is to print an error.
948 This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */
949 SWIGINTERN int SWIG_Lua_set_immutable(lua_State* L)
951 /* there should be 1 param passed in: the new value */
952 #ifndef SWIGLUA_IGNORE_SET_IMMUTABLE
953 lua_pop(L,1); /* remove it */
954 lua_pushstring(L,"This variable is immutable");
957 return 0; /* should not return anything */
960 /* the module.get method used for getting linked data */
961 SWIGINTERN int SWIG_Lua_module_get(lua_State* L)
963 /* there should be 2 params passed in
964 (1) table (not the meta table)
965 (2) string name of the attribute
966 printf("SWIG_Lua_module_get %p(%s) '%s'\n",
967 lua_topointer(L,1),lua_typename(L,lua_type(L,1)),
970 /* get the metatable */
971 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
972 assert(lua_isrotable(L,1)); /* just in case */
974 assert(lua_istable(L,1)); /* default Lua action */
976 lua_getmetatable(L,1); /* get the metatable */
977 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
978 assert(lua_isrotable(L,-1)); /* just in case */
980 assert(lua_istable(L,-1));
982 SWIG_Lua_get_table(L,".get"); /* get the .get table */
983 lua_remove(L,3); /* remove metatable */
984 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
985 if (lua_isrotable(L,-1))
987 if (lua_istable(L,-1))
990 /* look for the key in the .get table */
991 lua_pushvalue(L,2); /* key */
993 lua_remove(L,3); /* remove .get */
994 if (lua_iscfunction(L,-1))
995 { /* found it so call the fn & return its value */
999 lua_pop(L,1); /* remove the top */
1001 lua_pop(L,1); /* remove the .get */
1002 lua_pushnil(L); /* return a nil */
1006 /* the module.set method used for setting linked data */
1007 SWIGINTERN int SWIG_Lua_module_set(lua_State* L)
1009 /* there should be 3 params passed in
1010 (1) table (not the meta table)
1011 (2) string name of the attribute
1012 (3) any for the new value
1014 /* get the metatable */
1015 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
1016 assert(lua_isrotable(L,1)); /* just in case */
1018 assert(lua_istable(L,1)); /* default Lua action */
1020 lua_getmetatable(L,1); /* get the metatable */
1021 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
1022 assert(lua_isrotable(L,-1)); /* just in case */
1024 assert(lua_istable(L,-1));
1026 SWIG_Lua_get_table(L,".set"); /* get the .set table */
1027 lua_remove(L,4); /* remove metatable */
1028 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
1029 if (lua_isrotable(L,-1))
1031 if (lua_istable(L,-1))
1034 /* look for the key in the .set table */
1035 lua_pushvalue(L,2); /* key */
1037 lua_remove(L,4); /* remove .set */
1038 if (lua_iscfunction(L,-1))
1039 { /* found it so call the fn & return its value */
1040 lua_pushvalue(L,3); /* value */
1044 #if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA)
1046 return 0; // Exits stoically if an invalid key is initialized.
1050 lua_settop(L,3); /* reset back to start */
1051 /* we now have the table, key & new value, so just set directly */
1052 lua_rawset(L,1); /* add direct */
1056 #if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
1057 /* registering a module in lua. Pushes the module table on the stack. */
1058 SWIGINTERN void SWIG_Lua_module_begin(lua_State* L,const char* name)
1060 assert(lua_istable(L,-1)); /* just in case */
1061 lua_pushstring(L,name);
1062 lua_newtable(L); /* the table */
1063 /* add meta table */
1064 lua_newtable(L); /* the meta table */
1065 SWIG_Lua_add_function(L,"__index",SWIG_Lua_module_get);
1066 SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_module_set);
1067 lua_pushstring(L,".get");
1068 lua_newtable(L); /* the .get table */
1069 lua_rawset(L,-3); /* add .get into metatable */
1070 lua_pushstring(L,".set");
1071 lua_newtable(L); /* the .set table */
1072 lua_rawset(L,-3); /* add .set into metatable */
1073 lua_setmetatable(L,-2); /* sets meta table in module */
1074 #ifdef SWIG_LUA_MODULE_GLOBAL
1075 /* If requested, install the module directly into the global namespace. */
1076 lua_rawset(L,-3); /* add module into parent */
1077 SWIG_Lua_get_table(L,name); /* get the table back out */
1079 /* Do not install the module table as global name. The stack top has
1080 the module table with the name below. We pop the top and replace
1081 the name with it. */
1086 /* ending the register */
1087 SWIGINTERN void SWIG_Lua_module_end(lua_State* L)
1089 lua_pop(L,1); /* tidy stack (remove module) */
1092 /* adding a linked variable to the module */
1093 SWIGINTERN void SWIG_Lua_module_add_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn)
1095 assert(lua_istable(L,-1)); /* just in case */
1096 lua_getmetatable(L,-1); /* get the metatable */
1097 assert(lua_istable(L,-1)); /* just in case */
1098 SWIG_Lua_get_table(L,".get"); /* find the .get table */
1099 assert(lua_istable(L,-1)); /* should be a table: */
1100 SWIG_Lua_add_function(L,name,getFn);
1101 lua_pop(L,1); /* tidy stack (remove table) */
1102 if (setFn) /* if there is a set fn */
1104 SWIG_Lua_get_table(L,".set"); /* find the .set table */
1105 assert(lua_istable(L,-1)); /* should be a table: */
1106 SWIG_Lua_add_function(L,name,setFn);
1107 lua_pop(L,1); /* tidy stack (remove table) */
1109 lua_pop(L,1); /* tidy stack (remove meta) */
1113 /* adding a function module */
1114 SWIGINTERN void SWIG_Lua_module_add_function(lua_State* L,const char* name,lua_CFunction fn)
1116 SWIG_Lua_add_function(L,name,fn);
1119 /* -----------------------------------------------------------------------------
1120 * global variable support code: classes
1121 * ----------------------------------------------------------------------------- */
1123 /* the class.get method, performs the lookup of class attributes */
1124 SWIGINTERN int SWIG_Lua_class_get(lua_State* L)
1126 /* there should be 2 params passed in
1127 (1) userdata (not the meta table)
1128 (2) string name of the attribute
1130 assert(lua_isuserdata(L,-2)); /* just in case */
1131 lua_getmetatable(L,-2); /* get the meta table */
1132 assert(lua_istable(L,-1)); /* just in case */
1133 SWIG_Lua_get_table(L,".get"); /* find the .get table */
1134 assert(lua_istable(L,-1)); /* just in case */
1135 /* look for the key in the .get table */
1136 lua_pushvalue(L,2); /* key */
1138 lua_remove(L,-2); /* stack tidy, remove .get table */
1139 if (lua_iscfunction(L,-1))
1140 { /* found it so call the fn & return its value */
1141 lua_pushvalue(L,1); /* the userdata */
1142 lua_call(L,1,1); /* 1 value in (userdata),1 out (result) */
1143 lua_remove(L,-2); /* stack tidy, remove metatable */
1146 lua_pop(L,1); /* remove whatever was there */
1147 /* ok, so try the .fn table */
1148 SWIG_Lua_get_table(L,".fn"); /* find the .get table */
1149 assert(lua_istable(L,-1)); /* just in case */
1150 lua_pushvalue(L,2); /* key */
1151 lua_rawget(L,-2); /* look for the fn */
1152 lua_remove(L,-2); /* stack tidy, remove .fn table */
1153 if (lua_isfunction(L,-1)) /* note: if its a C function or lua function */
1154 { /* found it so return the fn & let lua call it */
1155 lua_remove(L,-2); /* stack tidy, remove metatable */
1158 lua_pop(L,1); /* remove whatever was there */
1159 /* NEW: looks for the __getitem() fn
1160 this is a user provided get fn */
1161 SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */
1162 if (lua_iscfunction(L,-1)) /* if its there */
1163 { /* found it so call the fn & return its value */
1164 lua_pushvalue(L,1); /* the userdata */
1165 lua_pushvalue(L,2); /* the parameter */
1166 lua_call(L,2,1); /* 2 value in (userdata),1 out (result) */
1167 lua_remove(L,-2); /* stack tidy, remove metatable */
1170 return 0; /* sorry not known */
1173 /* the class.set method, performs the lookup of class attributes */
1174 SWIGINTERN int SWIG_Lua_class_set(lua_State* L)
1176 /* there should be 3 params passed in
1177 (1) table (not the meta table)
1178 (2) string name of the attribute
1179 (3) any for the new value
1180 printf("SWIG_Lua_class_set %p(%s) '%s' %p(%s)\n",
1181 lua_topointer(L,1),lua_typename(L,lua_type(L,1)),
1183 lua_topointer(L,3),lua_typename(L,lua_type(L,3)));*/
1185 assert(lua_isuserdata(L,1)); /* just in case */
1186 lua_getmetatable(L,1); /* get the meta table */
1187 assert(lua_istable(L,-1)); /* just in case */
1189 SWIG_Lua_get_table(L,".set"); /* find the .set table */
1190 if (lua_istable(L,-1))
1192 /* look for the key in the .set table */
1193 lua_pushvalue(L,2); /* key */
1195 if (lua_iscfunction(L,-1))
1196 { /* found it so call the fn & return its value */
1197 lua_pushvalue(L,1); /* userdata */
1198 lua_pushvalue(L,3); /* value */
1202 lua_pop(L,1); /* remove the value */
1204 lua_pop(L,1); /* remove the value .set table */
1205 /* NEW: looks for the __setitem() fn
1206 this is a user provided set fn */
1207 SWIG_Lua_get_table(L,"__setitem"); /* find the fn */
1208 if (lua_iscfunction(L,-1)) /* if its there */
1209 { /* found it so call the fn & return its value */
1210 lua_pushvalue(L,1); /* the userdata */
1211 lua_pushvalue(L,2); /* the parameter */
1212 lua_pushvalue(L,3); /* the value */
1213 lua_call(L,3,0); /* 3 values in ,0 out */
1214 lua_remove(L,-2); /* stack tidy, remove metatable */
1220 /* the class.destruct method called by the interpreter */
1221 SWIGINTERN int SWIG_Lua_class_destruct(lua_State* L)
1223 /* there should be 1 params passed in
1224 (1) userdata (not the meta table) */
1225 swig_lua_userdata* usr;
1226 swig_lua_class* clss;
1227 assert(lua_isuserdata(L,-1)); /* just in case */
1228 usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
1229 /* if must be destroyed & has a destructor */
1230 if (usr->own) /* if must be destroyed */
1232 clss=(swig_lua_class*)usr->type->clientdata; /* get the class */
1233 if (clss && clss->destructor) /* there is a destroy fn */
1235 clss->destructor(usr->ptr); /* bye bye */
1241 /* the class.__tostring method called by the interpreter and print */
1242 SWIGINTERN int SWIG_Lua_class_tostring(lua_State* L)
1244 /* there should be 1 param passed in
1245 (1) userdata (not the metatable) */
1246 assert(lua_isuserdata(L,1)); /* just in case */
1247 unsigned long userData = (unsigned long)lua_touserdata(L,1); /* get the userdata address for later */
1248 lua_getmetatable(L,1); /* get the meta table */
1249 assert(lua_istable(L,-1)); /* just in case */
1251 lua_getfield(L, -1, ".type");
1252 const char* className = lua_tostring(L, -1);
1255 sprintf(output, "<%s userdata: %lX>", className, userData);
1257 lua_pushstring(L, (const char*)output);
1261 /* to manually disown some userdata */
1262 SWIGINTERN int SWIG_Lua_class_disown(lua_State* L)
1264 /* there should be 1 params passed in
1265 (1) userdata (not the meta table) */
1266 swig_lua_userdata* usr;
1267 assert(lua_isuserdata(L,-1)); /* just in case */
1268 usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
1270 usr->own = 0; /* clear our ownership */
1274 /* gets the swig class registry (or creates it) */
1275 SWIGINTERN void SWIG_Lua_get_class_registry(lua_State* L)
1277 /* add this all into the swig registry: */
1278 lua_pushstring(L,"SWIG");
1279 lua_rawget(L,LUA_REGISTRYINDEX); /* get the registry */
1280 if (!lua_istable(L,-1)) /* not there */
1281 { /* must be first time, so add it */
1282 lua_pop(L,1); /* remove the result */
1283 lua_pushstring(L,"SWIG");
1285 lua_rawset(L,LUA_REGISTRYINDEX);
1287 lua_pushstring(L,"SWIG");
1288 lua_rawget(L,LUA_REGISTRYINDEX);
1292 /* helper fn to get the classes metatable from the register */
1293 SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State* L,const char* cname)
1295 SWIG_Lua_get_class_registry(L); /* get the registry */
1296 lua_pushstring(L,cname); /* get the name */
1297 lua_rawget(L,-2); /* get it */
1298 lua_remove(L,-2); /* tidy up (remove registry) */
1301 /* helper add a variable to a registered class */
1302 SWIGINTERN void SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn)
1304 assert(lua_istable(L,-1)); /* just in case */
1305 SWIG_Lua_get_table(L,".get"); /* find the .get table */
1306 assert(lua_istable(L,-1)); /* just in case */
1307 SWIG_Lua_add_function(L,name,getFn);
1308 lua_pop(L,1); /* tidy stack (remove table) */
1311 SWIG_Lua_get_table(L,".set"); /* find the .set table */
1312 assert(lua_istable(L,-1)); /* just in case */
1313 SWIG_Lua_add_function(L,name,setFn);
1314 lua_pop(L,1); /* tidy stack (remove table) */
1318 /* helper to recursively add class details (attributes & operations) */
1319 SWIGINTERN void SWIG_Lua_add_class_details(lua_State* L,swig_lua_class* clss)
1322 /* call all the base classes first: we can then override these later: */
1323 for(i=0;clss->bases[i];i++)
1325 SWIG_Lua_add_class_details(L,clss->bases[i]);
1328 for(i=0;clss->attributes[i].name;i++){
1329 SWIG_Lua_add_class_variable(L,clss->attributes[i].name,clss->attributes[i].getmethod,clss->attributes[i].setmethod);
1331 /* add methods to the metatable */
1332 SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
1333 assert(lua_istable(L,-1)); /* just in case */
1334 for(i=0;clss->methods[i].name;i++){
1335 SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method);
1337 lua_pop(L,1); /* tidy stack (remove table) */
1338 /* add operator overloads
1339 these look ANY method which start with "__" and assume they
1340 are operator overloads & add them to the metatable
1341 (this might mess up is someone defines a method __gc (the destructor)*/
1342 for(i=0;clss->methods[i].name;i++){
1343 if (clss->methods[i].name[0]=='_' && clss->methods[i].name[1]=='_'){
1344 SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method);
1349 /* set up the base classes pointers.
1350 Each class structure has a list of pointers to the base class structures.
1351 This function fills them.
1352 It cannot be done at compile time, as this will not work with hireachies
1353 spread over more than one swig file.
1354 Therefore it must be done at runtime, querying the SWIG type system.
1356 SWIGINTERN void SWIG_Lua_init_base_class(lua_State* L,swig_lua_class* clss)
1359 swig_module_info* module=SWIG_GetModule(L);
1360 for(i=0;clss->base_names[i];i++)
1362 if (clss->bases[i]==0) /* not found yet */
1364 /* lookup and cache the base class */
1365 swig_type_info *info = SWIG_TypeQueryModule(module,module,clss->base_names[i]);
1366 if (info) clss->bases[i] = (swig_lua_class *) info->clientdata;
1371 /* performs the entire class registration process */
1372 SWIGINTERN void SWIG_Lua_class_register(lua_State* L,swig_lua_class* clss)
1374 /* add its constructor to module with the name of the class
1375 so you can do MyClass(...) as well as new_MyClass(...)
1376 BUT only if a constructor is defined
1377 (this overcomes the problem of pure virtual classes without constructors)*/
1378 if (clss->constructor)
1379 SWIG_Lua_add_function(L,clss->name,clss->constructor);
1381 SWIG_Lua_get_class_registry(L); /* get the registry */
1382 lua_pushstring(L,clss->name); /* get the name */
1383 lua_newtable(L); /* create the metatable */
1384 /* add string of class name called ".type" */
1385 lua_pushstring(L,".type");
1386 lua_pushstring(L,clss->name);
1388 /* add a table called ".get" */
1389 lua_pushstring(L,".get");
1392 /* add a table called ".set" */
1393 lua_pushstring(L,".set");
1396 /* add a table called ".fn" */
1397 lua_pushstring(L,".fn");
1399 /* add manual disown method */
1400 SWIG_Lua_add_function(L,"__disown",SWIG_Lua_class_disown);
1402 /* add accessor fns for using the .get,.set&.fn */
1403 SWIG_Lua_add_function(L,"__index",SWIG_Lua_class_get);
1404 SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_class_set);
1405 SWIG_Lua_add_function(L,"__gc",SWIG_Lua_class_destruct);
1406 /* add tostring method for better output */
1407 SWIG_Lua_add_function(L,"__tostring",SWIG_Lua_class_tostring);
1409 lua_rawset(L,-3); /* metatable into registry */
1410 lua_pop(L,1); /* tidy stack (remove registry) */
1412 SWIG_Lua_get_class_metatable(L,clss->name);
1413 SWIG_Lua_add_class_details(L,clss); /* recursive adding of details (atts & ops) */
1414 lua_pop(L,1); /* tidy stack (remove class metatable) */
1417 /* -----------------------------------------------------------------------------
1418 * Class/structure conversion fns
1419 * ----------------------------------------------------------------------------- */
1421 /* helper to add metatable to new lua object */
1422 SWIGINTERN void _SWIG_Lua_AddMetatable(lua_State* L,swig_type_info *type)
1424 if (type->clientdata) /* there is clientdata: so add the metatable */
1426 SWIG_Lua_get_class_metatable(L,((swig_lua_class*)(type->clientdata))->name);
1427 if (lua_istable(L,-1))
1429 lua_setmetatable(L,-2);
1438 /* pushes a new object into the lua stack */
1439 SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State* L,void* ptr,swig_type_info *type, int own)
1441 swig_lua_userdata* usr;
1446 usr=(swig_lua_userdata*)lua_newuserdata(L,sizeof(swig_lua_userdata)); /* get data */
1447 usr->ptr=ptr; /* set the ptr */
1450 #if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
1451 _SWIG_Lua_AddMetatable(L,type); /* add metatable */
1455 /* takes a object from the lua stack & converts it into an object of the correct type
1457 SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State* L,int index,void** ptr,swig_type_info *type,int flags)
1459 swig_lua_userdata* usr;
1460 swig_cast_info *cast;
1461 if (lua_isnil(L,index)){*ptr=0; return SWIG_OK;} /* special case: lua nil => NULL pointer */
1462 usr=(swig_lua_userdata*)lua_touserdata(L,index); /* get data */
1465 if (flags & SWIG_POINTER_DISOWN) /* must disown the object */
1469 if (!type) /* special cast void*, no casting fn */
1472 return SWIG_OK; /* ok */
1474 cast=SWIG_TypeCheckStruct(usr->type,type); /* performs normal type checking */
1478 *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory);
1479 assert(!newmemory); /* newmemory handling not yet implemented */
1480 return SWIG_OK; /* ok */
1483 return SWIG_ERROR; /* error */
1486 SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State* L,int index,swig_type_info *type,int flags,
1487 int argnum,const char* func_name){
1489 if (!SWIG_IsOK(SWIG_ConvertPtr(L,index,&result,type,flags))){
1490 lua_pushfstring(L,"Error in %s, expected a %s at argument number %d\n",
1491 func_name,(type && type->str)?type->str:"void*",argnum);
1497 /* pushes a packed userdata. user for member fn pointers only */
1498 SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State* L,void* ptr,size_t size,swig_type_info *type)
1500 swig_lua_rawdata* raw;
1501 assert(ptr); /* not acceptable to pass in a NULL value */
1502 raw=(swig_lua_rawdata*)lua_newuserdata(L,sizeof(swig_lua_rawdata)-1+size); /* alloc data */
1505 memcpy(raw->data,ptr,size); /* copy the data */
1506 _SWIG_Lua_AddMetatable(L,type); /* add metatable */
1509 /* converts a packed userdata. user for member fn pointers only */
1510 SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State* L,int index,void* ptr,size_t size,swig_type_info *type)
1512 swig_lua_rawdata* raw;
1513 raw=(swig_lua_rawdata*)lua_touserdata(L,index); /* get data */
1514 if (!raw) return SWIG_ERROR; /* error */
1515 if (type==0 || type==raw->type) /* void* or identical type */
1517 memcpy(ptr,raw->data,size); /* copy it */
1518 return SWIG_OK; /* ok */
1520 return SWIG_ERROR; /* error */
1523 /* a function to get the typestring of a piece of data */
1524 SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp)
1526 swig_lua_userdata* usr;
1527 if (lua_isuserdata(L,tp))
1529 usr=(swig_lua_userdata*)lua_touserdata(L,tp); /* get data */
1530 if (usr && usr->type && usr->type->str)
1531 return usr->type->str;
1532 return "userdata (unknown type)";
1534 return lua_typename(L,lua_type(L,tp));
1537 /* lua callable function to get the userdata's type */
1538 SWIGRUNTIME int SWIG_Lua_type(lua_State* L)
1540 lua_pushstring(L,SWIG_Lua_typename(L,1));
1544 /* lua callable function to compare userdata's value
1545 the issue is that two userdata may point to the same thing
1546 but to lua, they are different objects */
1547 SWIGRUNTIME int SWIG_Lua_equal(lua_State* L)
1550 swig_lua_userdata *usr1,*usr2;
1551 if (!lua_isuserdata(L,1) || !lua_isuserdata(L,2)) /* just in case */
1552 return 0; /* nil reply */
1553 usr1=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1554 usr2=(swig_lua_userdata*)lua_touserdata(L,2); /* get data */
1555 /*result=(usr1->ptr==usr2->ptr && usr1->type==usr2->type); only works if type is the same*/
1556 result=(usr1->ptr==usr2->ptr);
1557 lua_pushboolean(L,result);
1561 /* -----------------------------------------------------------------------------
1562 * global variable support code: class/struct typemap functions
1563 * ----------------------------------------------------------------------------- */
1565 #if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
1566 /* Install Constants */
1568 SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]) {
1570 for (i = 0; constants[i].type; i++) {
1571 switch(constants[i].type) {
1573 lua_pushstring(L,constants[i].name);
1574 lua_pushnumber(L,(lua_Number)constants[i].lvalue);
1577 case SWIG_LUA_FLOAT:
1578 lua_pushstring(L,constants[i].name);
1579 lua_pushnumber(L,(lua_Number)constants[i].dvalue);
1583 lua_pushstring(L,constants[i].name);
1584 lua_pushfstring(L,"%c",(char)constants[i].lvalue);
1587 case SWIG_LUA_STRING:
1588 lua_pushstring(L,constants[i].name);
1589 lua_pushstring(L,(char *) constants[i].pvalue);
1592 case SWIG_LUA_POINTER:
1593 lua_pushstring(L,constants[i].name);
1594 SWIG_NewPointerObj(L,constants[i].pvalue, *(constants[i]).ptype,0);
1597 case SWIG_LUA_BINARY:
1598 lua_pushstring(L,constants[i].name);
1599 SWIG_NewMemberObj(L,constants[i].pvalue,constants[i].lvalue,*(constants[i]).ptype);
1609 /* -----------------------------------------------------------------------------
1610 * executing lua code from within the wrapper
1611 * ----------------------------------------------------------------------------- */
1613 #ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */
1614 #define SWIG_DOSTRING_FAIL(S) fprintf(stderr,"%s\n",S)
1616 /* Executes a C string in Lua a really simple way of calling lua from C
1617 Unfortunately lua keeps changing its API's, so we need a conditional compile
1618 In lua 5.0.X its lua_dostring()
1619 In lua 5.1.X its luaL_dostring()
1622 SWIG_Lua_dostring(lua_State *L, const char* str) {
1624 if (str==0 || str[0]==0) return 0; /* nothing to do */
1625 top=lua_gettop(L); /* save stack */
1626 #if (defined(LUA_VERSION_NUM) && (LUA_VERSION_NUM>=501))
1627 ok=luaL_dostring(L,str); /* looks like this is lua 5.1.X or later, good */
1629 ok=lua_dostring(L,str); /* might be lua 5.0.x, using lua_dostring */
1632 SWIG_DOSTRING_FAIL(lua_tostring(L,-1));
1634 lua_settop(L,top); /* restore the stack */
1642 /* ------------------------------ end luarun.swg ------------------------------ */
1645 /* -------- TYPES TABLE (BEGIN) -------- */
1647 #define SWIGTYPE_p_L4Re__Event_stream_info swig_types[0]
1648 #define SWIGTYPE_p_Mag_server__Axis_buf swig_types[1]
1649 #define SWIGTYPE_p_Mag_server__Axis_info swig_types[2]
1650 #define SWIGTYPE_p_Mag_server__Axis_info_vector swig_types[3]
1651 #define SWIGTYPE_p_Mag_server__Hid_report swig_types[4]
1652 #define SWIGTYPE_p_Mag_server__Input_source swig_types[5]
1653 #define SWIGTYPE_p_Mag_server__User_state swig_types[6]
1654 #define SWIGTYPE_p_Mag_server__ValuatorT_int_t swig_types[7]
1655 #define SWIGTYPE_p_Mag_server__ValueT_int_t swig_types[8]
1656 #define SWIGTYPE_p_Mag_server__View_proxy swig_types[9]
1657 #define SWIGTYPE_p_int swig_types[10]
1658 #define SWIGTYPE_p_l4_int32_t swig_types[11]
1659 #define SWIGTYPE_p_l4_umword_t swig_types[12]
1660 #define SWIGTYPE_p_l4re_event_absinfo_t swig_types[13]
1661 #define SWIGTYPE_p_l4re_event_stream_id_t swig_types[14]
1662 #define SWIGTYPE_p_p_L4Re__Event_stream_info swig_types[15]
1663 #define SWIGTYPE_p_p_Mag_server__Axis_info swig_types[16]
1664 #define SWIGTYPE_p_unsigned_int swig_types[17]
1665 static swig_type_info *swig_types[19];
1666 static swig_module_info swig_module = {swig_types, 18, 0, 0, 0, 0};
1667 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1668 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1670 /* -------- TYPES TABLE (END) -------- */
1672 #define SWIG_name "Mag"
1673 #define SWIG_init luaopen_Mag
1674 #define SWIG_init_user luaopen_Mag_user
1676 #define SWIG_LUACODE luaopen_Mag_luacode
1679 typedef struct{} LANGUAGE_OBJ;
1683 #ifdef __cplusplus /* generic alloc/dealloc fns*/
1684 #define SWIG_ALLOC_ARRAY(TYPE,LEN) new TYPE[LEN]
1685 #define SWIG_FREE_ARRAY(PTR) delete[] PTR
1687 #define SWIG_ALLOC_ARRAY(TYPE,LEN) (TYPE *)malloc(LEN*sizeof(TYPE))
1688 #define SWIG_FREE_ARRAY(PTR) free(PTR)
1690 /* counting the size of arrays:*/
1691 SWIGINTERN int SWIG_itable_size(lua_State* L, int index)
1695 lua_rawgeti(L,index,n+1);
1696 if (lua_isnil(L,-1))break;
1704 SWIGINTERN int SWIG_table_size(lua_State* L, int index)
1707 lua_pushnil(L); /* first key*/
1708 while (lua_next(L, index) != 0) {
1710 lua_pop(L, 1); /* removes `value'; keeps `key' for next iteration*/
1715 /* super macro to declare array typemap helper fns */
1716 #define SWIG_DECLARE_TYPEMAP_ARR_FN(NAME,TYPE)\
1717 SWIGINTERN int SWIG_read_##NAME##_num_array(lua_State* L,int index,TYPE *array,int size){\
1719 for (i = 0; i < size; i++) {\
1720 lua_rawgeti(L,index,i+1);\
1721 if (lua_isnumber(L,-1)){\
1722 array[i] = (TYPE)lua_tonumber(L,-1);\
1731 SWIGINTERN TYPE* SWIG_get_##NAME##_num_array_fixed(lua_State* L, int index, int size){\
1733 if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {\
1734 lua_pushfstring(L,"expected a table of size %d",size);\
1737 array=SWIG_ALLOC_ARRAY(TYPE,size);\
1738 if (!SWIG_read_##NAME##_num_array(L,index,array,size)){\
1739 lua_pushstring(L,"table must contain numbers");\
1740 SWIG_FREE_ARRAY(array);\
1745 SWIGINTERN TYPE* SWIG_get_##NAME##_num_array_var(lua_State* L, int index, int* size)\
1748 if (!lua_istable(L,index)) {\
1749 lua_pushstring(L,"expected a table");\
1752 *size=SWIG_itable_size(L,index);\
1754 lua_pushstring(L,"table appears to be empty");\
1757 array=SWIG_ALLOC_ARRAY(TYPE,*size);\
1758 if (!SWIG_read_##NAME##_num_array(L,index,array,*size)){\
1759 lua_pushstring(L,"table must contain numbers");\
1760 SWIG_FREE_ARRAY(array);\
1765 SWIGINTERN void SWIG_write_##NAME##_num_array(lua_State* L,TYPE *array,int size){\
1768 for (i = 0; i < size; i++){\
1769 lua_pushnumber(L,(lua_Number)array[i]);\
1770 lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/ \
1774 SWIG_DECLARE_TYPEMAP_ARR_FN(schar,signed char);
1775 SWIG_DECLARE_TYPEMAP_ARR_FN(uchar,unsigned char);
1776 SWIG_DECLARE_TYPEMAP_ARR_FN(int,int);
1777 SWIG_DECLARE_TYPEMAP_ARR_FN(uint,unsigned int);
1778 SWIG_DECLARE_TYPEMAP_ARR_FN(short,short);
1779 SWIG_DECLARE_TYPEMAP_ARR_FN(ushort,unsigned short);
1780 SWIG_DECLARE_TYPEMAP_ARR_FN(long,long);
1781 SWIG_DECLARE_TYPEMAP_ARR_FN(ulong,unsigned long);
1782 SWIG_DECLARE_TYPEMAP_ARR_FN(float,float);
1783 SWIG_DECLARE_TYPEMAP_ARR_FN(double,double);
1785 SWIGINTERN int SWIG_read_ptr_array(lua_State* L,int index,void **array,int size,swig_type_info *type){
1787 for (i = 0; i < size; i++) {
1788 lua_rawgeti(L,index,i+1);
1789 if (!lua_isuserdata(L,-1) || SWIG_ConvertPtr(L,-1,&array[i],type,0)==-1){
1797 SWIGINTERN void** SWIG_get_ptr_array_fixed(lua_State* L, int index, int size,swig_type_info *type){
1799 if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {
1800 lua_pushfstring(L,"expected a table of size %d",size);
1803 array=SWIG_ALLOC_ARRAY(void*,size);
1804 if (!SWIG_read_ptr_array(L,index,array,size,type)){
1805 lua_pushfstring(L,"table must contain pointers of type %s",type->name);
1806 SWIG_FREE_ARRAY(array);
1811 SWIGINTERN void** SWIG_get_ptr_array_var(lua_State* L, int index, int* size,swig_type_info *type){
1813 if (!lua_istable(L,index)) {
1814 lua_pushstring(L,"expected a table");
1817 *size=SWIG_itable_size(L,index);
1819 lua_pushstring(L,"table appears to be empty");
1822 array=SWIG_ALLOC_ARRAY(void*,*size);
1823 if (!SWIG_read_ptr_array(L,index,array,*size,type)){
1824 lua_pushfstring(L,"table must contain pointers of type %s",type->name);
1825 SWIG_FREE_ARRAY(array);
1830 SWIGINTERN void SWIG_write_ptr_array(lua_State* L,void **array,int size,swig_type_info *type,int own){
1833 for (i = 0; i < size; i++){
1834 SWIG_NewPointerObj(L,array[i],type,own);
1835 lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/
1840 #include <l4/mag/server/hid_report>
1841 #include <l4/mag/server/valuator>
1842 #include <l4/mag/server/user_state>
1843 #include <l4/mag/server/input_source>
1844 #include "axis_buf.h"
1846 namespace Mag_server {
1847 extern Mag_server::User_state *user_state;
1850 int luaopen_Mag(lua_State*);
1853 SWIGINTERN void L4Re_Event_stream_info_get_device_id(L4Re::Event_stream_info *self,unsigned int *bus,unsigned int *vendor,unsigned int *product,unsigned int *version){
1854 *bus = self->id.bustype;
1855 *vendor = self->id.vendor;
1856 *product = self->id.product;
1857 *version = self->id.version;
1859 SWIGINTERN Mag_server::Value< int > Mag_server_Valuator_Sl_int_Sg____getitem__(Mag_server::Valuator< int > const *self,unsigned int idx){
1860 return self->get(idx);
1862 SWIGINTERN Mag_server::Axis_info *Mag_server_Axis_info_vector___getitem__(Mag_server::Axis_info_vector *self,unsigned int idx){
1863 return self->get(idx);
1865 SWIGINTERN Mag_server::Valuator< int > *Mag_server_Hid_report___getitem__(Mag_server::Hid_report *self,unsigned char type){
1866 return self->get_vals(type);
1868 SWIGINTERN bool Mag_server_User_state_set_kbd_focus(Mag_server::User_state *self,Mag_server::View_proxy *vp){
1870 return self->set_focus(0);
1872 return self->set_focus(vp->view());
1874 SWIGINTERN void Mag_server_User_state_post_event(Mag_server::User_state *self,Mag_server::View_proxy *vp,Mag_server::Hid_report *e,bool update,bool core_ev){
1875 Mag_server::View *v = vp ? vp->view() : self->kbd_focus();
1877 self->vstack()->update_all_views();
1879 //maybe_screenshot(ust, e);
1881 if (v && (!self->vstack()->mode().kill() || v->super_view()))
1882 v->handle_event(e, self->mouse_pos(), core_ev);
1884 SWIGINTERN void Mag_server_User_state_toggle_mode(Mag_server::User_state *self,Mag_server::Mode::Mode_flag mode){
1885 self->vstack()->toggle_mode(mode);
1887 SWIGINTERN void Mag_server_User_state_find_pointed_view(Mag_server::User_state *self,Mag_server::View_proxy *vp){
1891 vp->view(self->vstack()->find(self->mouse_pos()));
1893 SWIGINTERN void Mag_server_User_state_screen_size(Mag_server::User_state *self,int *w,int *h){
1894 Mag_gfx::Area s = self->vstack()->canvas()->size();
1898 SWIGINTERN void Mag_server_View_proxy_set(Mag_server::View_proxy *self,Mag_server::View_proxy *src){
1899 self->view(src ? src->view() : 0);
1901 SWIGINTERN int Mag_server_Input_source_get_stream_info(Mag_server::Input_source *self,l4_umword_t id,L4Re::Event_stream_info **OUTPUT){
1902 *OUTPUT = new L4Re::Event_stream_info;
1903 return self->get_stream_info(id, *OUTPUT);
1905 SWIGINTERN int Mag_server_Input_source_get_abs_info(Mag_server::Input_source *self,l4_umword_t id,unsigned int axis,Mag_server::Axis_info **OUTPUT){
1909 L4Re::Event_absinfo info[1];
1910 int res = self->get_axis_info(id, 1, axes, info);
1914 Mag_server::Axis_info *i = new Mag_server::Axis_info();
1917 i->value = info->value;
1920 i->fuzz = info->fuzz;
1921 i->flat = info->flat;
1922 i->resolution = info->resolution;
1923 i->delta = info->max - info->min;
1928 static Mag_server::User_state *get_user_state()
1930 return Mag_server::user_state;
1934 // removed: extern "C" {
1936 static int _wrap_Event_stream_info_get_propbit(lua_State* L) { int SWIG_arg = 0;
1937 L4Re::Event_stream_info *arg1 = (L4Re::Event_stream_info *) 0 ; unsigned int arg2 ; bool result;
1938 SWIG_check_num_args("L4Re::Event_stream_info::get_propbit",2,2)
1939 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("L4Re::Event_stream_info::get_propbit",1,"L4Re::Event_stream_info const *");
1940 if(!lua_isnumber(L,2)) SWIG_fail_arg("L4Re::Event_stream_info::get_propbit",2,"unsigned int");
1941 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_L4Re__Event_stream_info,0))){
1942 SWIG_fail_ptr("Event_stream_info_get_propbit",1,SWIGTYPE_p_L4Re__Event_stream_info); }
1943 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
1944 result = (bool)((L4Re::Event_stream_info const *)arg1)->get_propbit(arg2); lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
1945 return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
1946 static int _wrap_Event_stream_info_set_propbit(lua_State* L) { int SWIG_arg = 0;
1947 L4Re::Event_stream_info *arg1 = (L4Re::Event_stream_info *) 0 ; unsigned int arg2 ; bool arg3 ;
1948 SWIG_check_num_args("L4Re::Event_stream_info::set_propbit",3,3)
1949 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("L4Re::Event_stream_info::set_propbit",1,"L4Re::Event_stream_info *");
1950 if(!lua_isnumber(L,2)) SWIG_fail_arg("L4Re::Event_stream_info::set_propbit",2,"unsigned int");
1951 if(!lua_isboolean(L,3)) SWIG_fail_arg("L4Re::Event_stream_info::set_propbit",3,"bool");
1952 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_L4Re__Event_stream_info,0))){
1953 SWIG_fail_ptr("Event_stream_info_set_propbit",1,SWIGTYPE_p_L4Re__Event_stream_info); }
1954 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
1955 arg3 = (lua_toboolean(L, 3)!=0); (arg1)->set_propbit(arg2,arg3); return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L);
1957 static int _wrap_Event_stream_info_get_evbit(lua_State* L) { int SWIG_arg = 0;
1958 L4Re::Event_stream_info *arg1 = (L4Re::Event_stream_info *) 0 ; unsigned int arg2 ; bool result;
1959 SWIG_check_num_args("L4Re::Event_stream_info::get_evbit",2,2)
1960 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("L4Re::Event_stream_info::get_evbit",1,"L4Re::Event_stream_info const *");
1961 if(!lua_isnumber(L,2)) SWIG_fail_arg("L4Re::Event_stream_info::get_evbit",2,"unsigned int");
1962 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_L4Re__Event_stream_info,0))){
1963 SWIG_fail_ptr("Event_stream_info_get_evbit",1,SWIGTYPE_p_L4Re__Event_stream_info); }
1964 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
1965 result = (bool)((L4Re::Event_stream_info const *)arg1)->get_evbit(arg2); lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
1966 return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
1967 static int _wrap_Event_stream_info_set_evbit(lua_State* L) { int SWIG_arg = 0;
1968 L4Re::Event_stream_info *arg1 = (L4Re::Event_stream_info *) 0 ; unsigned int arg2 ; bool arg3 ;
1969 SWIG_check_num_args("L4Re::Event_stream_info::set_evbit",3,3)
1970 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("L4Re::Event_stream_info::set_evbit",1,"L4Re::Event_stream_info *");
1971 if(!lua_isnumber(L,2)) SWIG_fail_arg("L4Re::Event_stream_info::set_evbit",2,"unsigned int");
1972 if(!lua_isboolean(L,3)) SWIG_fail_arg("L4Re::Event_stream_info::set_evbit",3,"bool");
1973 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_L4Re__Event_stream_info,0))){
1974 SWIG_fail_ptr("Event_stream_info_set_evbit",1,SWIGTYPE_p_L4Re__Event_stream_info); }
1975 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
1976 arg3 = (lua_toboolean(L, 3)!=0); (arg1)->set_evbit(arg2,arg3); return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L);
1978 static int _wrap_Event_stream_info_get_keybit(lua_State* L) { int SWIG_arg = 0;
1979 L4Re::Event_stream_info *arg1 = (L4Re::Event_stream_info *) 0 ; unsigned int arg2 ; bool result;
1980 SWIG_check_num_args("L4Re::Event_stream_info::get_keybit",2,2)
1981 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("L4Re::Event_stream_info::get_keybit",1,"L4Re::Event_stream_info const *");
1982 if(!lua_isnumber(L,2)) SWIG_fail_arg("L4Re::Event_stream_info::get_keybit",2,"unsigned int");
1983 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_L4Re__Event_stream_info,0))){
1984 SWIG_fail_ptr("Event_stream_info_get_keybit",1,SWIGTYPE_p_L4Re__Event_stream_info); }
1985 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
1986 result = (bool)((L4Re::Event_stream_info const *)arg1)->get_keybit(arg2); lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
1987 return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
1988 static int _wrap_Event_stream_info_set_keybit(lua_State* L) { int SWIG_arg = 0;
1989 L4Re::Event_stream_info *arg1 = (L4Re::Event_stream_info *) 0 ; unsigned int arg2 ; bool arg3 ;
1990 SWIG_check_num_args("L4Re::Event_stream_info::set_keybit",3,3)
1991 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("L4Re::Event_stream_info::set_keybit",1,"L4Re::Event_stream_info *");
1992 if(!lua_isnumber(L,2)) SWIG_fail_arg("L4Re::Event_stream_info::set_keybit",2,"unsigned int");
1993 if(!lua_isboolean(L,3)) SWIG_fail_arg("L4Re::Event_stream_info::set_keybit",3,"bool");
1994 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_L4Re__Event_stream_info,0))){
1995 SWIG_fail_ptr("Event_stream_info_set_keybit",1,SWIGTYPE_p_L4Re__Event_stream_info); }
1996 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
1997 arg3 = (lua_toboolean(L, 3)!=0); (arg1)->set_keybit(arg2,arg3); return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L);
1999 static int _wrap_Event_stream_info_get_relbit(lua_State* L) { int SWIG_arg = 0;
2000 L4Re::Event_stream_info *arg1 = (L4Re::Event_stream_info *) 0 ; unsigned int arg2 ; bool result;
2001 SWIG_check_num_args("L4Re::Event_stream_info::get_relbit",2,2)
2002 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("L4Re::Event_stream_info::get_relbit",1,"L4Re::Event_stream_info const *");
2003 if(!lua_isnumber(L,2)) SWIG_fail_arg("L4Re::Event_stream_info::get_relbit",2,"unsigned int");
2004 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_L4Re__Event_stream_info,0))){
2005 SWIG_fail_ptr("Event_stream_info_get_relbit",1,SWIGTYPE_p_L4Re__Event_stream_info); }
2006 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2007 result = (bool)((L4Re::Event_stream_info const *)arg1)->get_relbit(arg2); lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
2008 return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2009 static int _wrap_Event_stream_info_set_relbit(lua_State* L) { int SWIG_arg = 0;
2010 L4Re::Event_stream_info *arg1 = (L4Re::Event_stream_info *) 0 ; unsigned int arg2 ; bool arg3 ;
2011 SWIG_check_num_args("L4Re::Event_stream_info::set_relbit",3,3)
2012 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("L4Re::Event_stream_info::set_relbit",1,"L4Re::Event_stream_info *");
2013 if(!lua_isnumber(L,2)) SWIG_fail_arg("L4Re::Event_stream_info::set_relbit",2,"unsigned int");
2014 if(!lua_isboolean(L,3)) SWIG_fail_arg("L4Re::Event_stream_info::set_relbit",3,"bool");
2015 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_L4Re__Event_stream_info,0))){
2016 SWIG_fail_ptr("Event_stream_info_set_relbit",1,SWIGTYPE_p_L4Re__Event_stream_info); }
2017 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2018 arg3 = (lua_toboolean(L, 3)!=0); (arg1)->set_relbit(arg2,arg3); return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L);
2020 static int _wrap_Event_stream_info_get_absbit(lua_State* L) { int SWIG_arg = 0;
2021 L4Re::Event_stream_info *arg1 = (L4Re::Event_stream_info *) 0 ; unsigned int arg2 ; bool result;
2022 SWIG_check_num_args("L4Re::Event_stream_info::get_absbit",2,2)
2023 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("L4Re::Event_stream_info::get_absbit",1,"L4Re::Event_stream_info const *");
2024 if(!lua_isnumber(L,2)) SWIG_fail_arg("L4Re::Event_stream_info::get_absbit",2,"unsigned int");
2025 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_L4Re__Event_stream_info,0))){
2026 SWIG_fail_ptr("Event_stream_info_get_absbit",1,SWIGTYPE_p_L4Re__Event_stream_info); }
2027 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2028 result = (bool)((L4Re::Event_stream_info const *)arg1)->get_absbit(arg2); lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
2029 return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2030 static int _wrap_Event_stream_info_set_absbit(lua_State* L) { int SWIG_arg = 0;
2031 L4Re::Event_stream_info *arg1 = (L4Re::Event_stream_info *) 0 ; unsigned int arg2 ; bool arg3 ;
2032 SWIG_check_num_args("L4Re::Event_stream_info::set_absbit",3,3)
2033 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("L4Re::Event_stream_info::set_absbit",1,"L4Re::Event_stream_info *");
2034 if(!lua_isnumber(L,2)) SWIG_fail_arg("L4Re::Event_stream_info::set_absbit",2,"unsigned int");
2035 if(!lua_isboolean(L,3)) SWIG_fail_arg("L4Re::Event_stream_info::set_absbit",3,"bool");
2036 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_L4Re__Event_stream_info,0))){
2037 SWIG_fail_ptr("Event_stream_info_set_absbit",1,SWIGTYPE_p_L4Re__Event_stream_info); }
2038 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2039 arg3 = (lua_toboolean(L, 3)!=0); (arg1)->set_absbit(arg2,arg3); return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L);
2041 static int _wrap_Event_stream_info_get_device_id(lua_State* L) { int SWIG_arg = 0;
2042 L4Re::Event_stream_info *arg1 = (L4Re::Event_stream_info *) 0 ; unsigned int *arg2 = (unsigned int *) 0 ;
2043 unsigned int *arg3 = (unsigned int *) 0 ; unsigned int *arg4 = (unsigned int *) 0 ; unsigned int *arg5 = (unsigned int *) 0 ;
2044 unsigned int temp2 ; unsigned int temp3 ; unsigned int temp4 ; unsigned int temp5 ; arg2 = &temp2; arg3 = &temp3;
2045 arg4 = &temp4; arg5 = &temp5; SWIG_check_num_args("L4Re::Event_stream_info::get_device_id",1,1)
2046 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("L4Re::Event_stream_info::get_device_id",1,"L4Re::Event_stream_info *");
2047 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_L4Re__Event_stream_info,0))){
2048 SWIG_fail_ptr("Event_stream_info_get_device_id",1,SWIGTYPE_p_L4Re__Event_stream_info); }
2049 L4Re_Event_stream_info_get_device_id(arg1,arg2,arg3,arg4,arg5); lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
2050 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++; lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
2051 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2052 static int _wrap_new_Event_stream_info(lua_State* L) { int SWIG_arg = 0; L4Re::Event_stream_info *result = 0 ;
2053 SWIG_check_num_args("L4Re::Event_stream_info::Event_stream_info",0,0)
2054 result = (L4Re::Event_stream_info *)new L4Re::Event_stream_info();
2055 SWIG_NewPointerObj(L,result,SWIGTYPE_p_L4Re__Event_stream_info,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2056 lua_error(L); return SWIG_arg; }
2057 static void swig_delete_Event_stream_info(void *obj) {
2058 L4Re::Event_stream_info *arg1 = (L4Re::Event_stream_info *) obj;
2061 static swig_lua_method swig_L4Re_Event_stream_info_methods[] = {
2062 {"get_propbit", _wrap_Event_stream_info_get_propbit},
2063 {"set_propbit", _wrap_Event_stream_info_set_propbit},
2064 {"get_evbit", _wrap_Event_stream_info_get_evbit},
2065 {"set_evbit", _wrap_Event_stream_info_set_evbit},
2066 {"get_keybit", _wrap_Event_stream_info_get_keybit},
2067 {"set_keybit", _wrap_Event_stream_info_set_keybit},
2068 {"get_relbit", _wrap_Event_stream_info_get_relbit},
2069 {"set_relbit", _wrap_Event_stream_info_set_relbit},
2070 {"get_absbit", _wrap_Event_stream_info_get_absbit},
2071 {"set_absbit", _wrap_Event_stream_info_set_absbit},
2072 {"get_device_id", _wrap_Event_stream_info_get_device_id},
2075 static swig_lua_attribute swig_L4Re_Event_stream_info_attributes[] = {
2078 static swig_lua_class *swig_L4Re_Event_stream_info_bases[] = {0};
2079 static const char *swig_L4Re_Event_stream_info_base_names[] = {0};
2080 static swig_lua_class _wrap_class_L4Re_Event_stream_info = { "Event_stream_info", &SWIGTYPE_p_L4Re__Event_stream_info,_wrap_new_Event_stream_info, swig_delete_Event_stream_info, swig_L4Re_Event_stream_info_methods, swig_L4Re_Event_stream_info_attributes, swig_L4Re_Event_stream_info_bases, swig_L4Re_Event_stream_info_base_names };
2082 static int _wrap_new_Axis_buf(lua_State* L) { int SWIG_arg = 0; unsigned char arg1 ; Mag_server::Axis_buf *result = 0 ;
2083 SWIG_check_num_args("Mag_server::Axis_buf::Axis_buf",1,1)
2084 if(!lua_isnumber(L,1)) SWIG_fail_arg("Mag_server::Axis_buf::Axis_buf",1,"unsigned char");
2085 SWIG_contract_assert((lua_tointeger(L,1)>=0),"number must not be negative") arg1 = (unsigned char)lua_tointeger(L, 1);
2086 result = (Mag_server::Axis_buf *)new Mag_server::Axis_buf(arg1);
2087 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__Axis_buf,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2088 lua_error(L); return SWIG_arg; }
2089 static int _wrap_Axis_buf_get(lua_State* L) { int SWIG_arg = 0; Mag_server::Axis_buf *arg1 = (Mag_server::Axis_buf *) 0 ;
2090 unsigned char arg2 ; l4_int32_t result; SWIG_check_num_args("Mag_server::Axis_buf::get",2,2)
2091 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_buf::get",1,"Mag_server::Axis_buf const *");
2092 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Axis_buf::get",2,"unsigned char");
2093 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_buf,0))){
2094 SWIG_fail_ptr("Axis_buf_get",1,SWIGTYPE_p_Mag_server__Axis_buf); }
2095 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned char)lua_tointeger(L, 2);
2096 result = ((Mag_server::Axis_buf const *)arg1)->get(arg2); lua_pushinteger(L, result); SWIG_arg++; return SWIG_arg;
2097 if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2098 static int _wrap_Axis_buf_set(lua_State* L) { int SWIG_arg = 0; Mag_server::Axis_buf *arg1 = (Mag_server::Axis_buf *) 0 ;
2099 unsigned char arg2 ; l4_int32_t arg3 ; SWIG_check_num_args("Mag_server::Axis_buf::set",3,3)
2100 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_buf::set",1,"Mag_server::Axis_buf *");
2101 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Axis_buf::set",2,"unsigned char");
2102 if(!lua_isnumber(L,3)) SWIG_fail_arg("Mag_server::Axis_buf::set",3,"l4_int32_t");
2103 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_buf,0))){
2104 SWIG_fail_ptr("Axis_buf_set",1,SWIGTYPE_p_Mag_server__Axis_buf); }
2105 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned char)lua_tointeger(L, 2);
2106 arg3 = (l4_int32_t)lua_tointeger(L, 3); (arg1)->set(arg2,arg3); return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L);
2108 static int _wrap_Axis_buf_copy(lua_State* L) { int SWIG_arg = 0; Mag_server::Axis_buf *arg1 = (Mag_server::Axis_buf *) 0 ;
2109 unsigned char arg2 ; unsigned char arg3 ; SWIG_check_num_args("Mag_server::Axis_buf::copy",3,3)
2110 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_buf::copy",1,"Mag_server::Axis_buf *");
2111 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Axis_buf::copy",2,"unsigned char");
2112 if(!lua_isnumber(L,3)) SWIG_fail_arg("Mag_server::Axis_buf::copy",3,"unsigned char");
2113 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_buf,0))){
2114 SWIG_fail_ptr("Axis_buf_copy",1,SWIGTYPE_p_Mag_server__Axis_buf); }
2115 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned char)lua_tointeger(L, 2);
2116 SWIG_contract_assert((lua_tointeger(L,3)>=0),"number must not be negative") arg3 = (unsigned char)lua_tointeger(L, 3);
2117 (arg1)->copy(arg2,arg3); return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2118 static int _wrap_Axis_buf___getitem(lua_State* L) { int SWIG_arg = 0; Mag_server::Axis_buf *arg1 = (Mag_server::Axis_buf *) 0 ;
2119 unsigned char arg2 ; l4_int32_t result; SWIG_check_num_args("Mag_server::Axis_buf::__getitem__",2,2)
2120 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_buf::__getitem__",1,"Mag_server::Axis_buf const *");
2121 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Axis_buf::__getitem__",2,"unsigned char");
2122 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_buf,0))){
2123 SWIG_fail_ptr("Axis_buf___getitem",1,SWIGTYPE_p_Mag_server__Axis_buf); }
2124 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned char)lua_tointeger(L, 2);
2125 result = ((Mag_server::Axis_buf const *)arg1)->__getitem__(arg2); lua_pushinteger(L, result); SWIG_arg++; return SWIG_arg;
2126 if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2127 static int _wrap_Axis_buf___setitem(lua_State* L) { int SWIG_arg = 0; Mag_server::Axis_buf *arg1 = (Mag_server::Axis_buf *) 0 ;
2128 unsigned char arg2 ; l4_int32_t arg3 ; SWIG_check_num_args("Mag_server::Axis_buf::__setitem__",3,3)
2129 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_buf::__setitem__",1,"Mag_server::Axis_buf *");
2130 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Axis_buf::__setitem__",2,"unsigned char");
2131 if(!lua_isnumber(L,3)) SWIG_fail_arg("Mag_server::Axis_buf::__setitem__",3,"l4_int32_t");
2132 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_buf,0))){
2133 SWIG_fail_ptr("Axis_buf___setitem",1,SWIGTYPE_p_Mag_server__Axis_buf); }
2134 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned char)lua_tointeger(L, 2);
2135 arg3 = (l4_int32_t)lua_tointeger(L, 3); (arg1)->__setitem__(arg2,arg3); return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L);
2137 static void swig_delete_Axis_buf(void *obj) {
2138 Mag_server::Axis_buf *arg1 = (Mag_server::Axis_buf *) obj;
2141 static swig_lua_method swig_Mag_server_Axis_buf_methods[] = {
2142 {"get", _wrap_Axis_buf_get},
2143 {"set", _wrap_Axis_buf_set},
2144 {"copy", _wrap_Axis_buf_copy},
2145 {"__getitem", _wrap_Axis_buf___getitem},
2146 {"__setitem", _wrap_Axis_buf___setitem},
2149 static swig_lua_attribute swig_Mag_server_Axis_buf_attributes[] = {
2152 static swig_lua_class *swig_Mag_server_Axis_buf_bases[] = {0};
2153 static const char *swig_Mag_server_Axis_buf_base_names[] = {0};
2154 static swig_lua_class _wrap_class_Mag_server_Axis_buf = { "Axis_buf", &SWIGTYPE_p_Mag_server__Axis_buf,_wrap_new_Axis_buf, swig_delete_Axis_buf, swig_Mag_server_Axis_buf_methods, swig_Mag_server_Axis_buf_attributes, swig_Mag_server_Axis_buf_bases, swig_Mag_server_Axis_buf_base_names };
2156 static int _wrap_new_Valuatori__SWIG_0(lua_State* L) { int SWIG_arg = 0; Mag_server::Valuator< int > *arg1 = 0 ;
2157 Mag_server::Valuator< int > *result = 0 ; SWIG_check_num_args("Mag_server::Valuator< int >::Valuator",1,1)
2158 if(!lua_isuserdata(L,1)) SWIG_fail_arg("Mag_server::Valuator< int >::Valuator",1,"Mag_server::Valuator< int > &");
2159 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__ValuatorT_int_t,0))){
2160 SWIG_fail_ptr("new_Valuatori",1,SWIGTYPE_p_Mag_server__ValuatorT_int_t); }
2161 result = (Mag_server::Valuator< int > *)new Mag_server::Valuator< int >(*arg1);
2162 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__ValuatorT_int_t,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2163 lua_error(L); return SWIG_arg; }
2164 static int _wrap_Valuatori_swap(lua_State* L) { int SWIG_arg = 0;
2165 Mag_server::Valuator< int > *arg1 = (Mag_server::Valuator< int > *) 0 ; Mag_server::Valuator< int > *arg2 = 0 ;
2166 SWIG_check_num_args("Mag_server::Valuator< int >::swap",2,2)
2167 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Valuator< int >::swap",1,"Mag_server::Valuator< int > *");
2168 if(!lua_isuserdata(L,2)) SWIG_fail_arg("Mag_server::Valuator< int >::swap",2,"Mag_server::Valuator< int > &");
2169 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__ValuatorT_int_t,0))){
2170 SWIG_fail_ptr("Valuatori_swap",1,SWIGTYPE_p_Mag_server__ValuatorT_int_t); }
2171 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Mag_server__ValuatorT_int_t,0))){
2172 SWIG_fail_ptr("Valuatori_swap",2,SWIGTYPE_p_Mag_server__ValuatorT_int_t); } (arg1)->swap(*arg2); return SWIG_arg;
2173 if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2174 static int _wrap_new_Valuatori__SWIG_1(lua_State* L) { int SWIG_arg = 0; Mag_server::Valuator< int > *result = 0 ;
2175 SWIG_check_num_args("Mag_server::Valuator< int >::Valuator",0,0)
2176 result = (Mag_server::Valuator< int > *)new Mag_server::Valuator< int >();
2177 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__ValuatorT_int_t,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2178 lua_error(L); return SWIG_arg; }
2179 static int _wrap_Valuatori_create(lua_State* L) { int SWIG_arg = 0;
2180 Mag_server::Valuator< int > *arg1 = (Mag_server::Valuator< int > *) 0 ; unsigned int arg2 ; unsigned int arg3 ;
2181 SWIG_check_num_args("Mag_server::Valuator< int >::create",3,3)
2182 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Valuator< int >::create",1,"Mag_server::Valuator< int > *");
2183 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Valuator< int >::create",2,"unsigned int");
2184 if(!lua_isnumber(L,3)) SWIG_fail_arg("Mag_server::Valuator< int >::create",3,"unsigned int");
2185 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__ValuatorT_int_t,0))){
2186 SWIG_fail_ptr("Valuatori_create",1,SWIGTYPE_p_Mag_server__ValuatorT_int_t); }
2187 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2188 SWIG_contract_assert((lua_tointeger(L,3)>=0),"number must not be negative") arg3 = (unsigned int)lua_tointeger(L, 3);
2189 (arg1)->create(arg2,arg3); return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2190 static int _wrap_new_Valuatori__SWIG_2(lua_State* L) { int SWIG_arg = 0; unsigned int arg1 ; unsigned int arg2 ;
2191 Mag_server::Valuator< int > *result = 0 ; SWIG_check_num_args("Mag_server::Valuator< int >::Valuator",2,2)
2192 if(!lua_isnumber(L,1)) SWIG_fail_arg("Mag_server::Valuator< int >::Valuator",1,"unsigned int");
2193 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Valuator< int >::Valuator",2,"unsigned int");
2194 SWIG_contract_assert((lua_tointeger(L,1)>=0),"number must not be negative") arg1 = (unsigned int)lua_tointeger(L, 1);
2195 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2196 result = (Mag_server::Valuator< int > *)new Mag_server::Valuator< int >(arg1,arg2);
2197 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__ValuatorT_int_t,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2198 lua_error(L); return SWIG_arg; }
2199 static int _wrap_new_Valuatori(lua_State* L) { int argc; int argv[3]={ 1,2,3} ; argc = lua_gettop(L); if (argc == 0) {
2200 return _wrap_new_Valuatori__SWIG_1(L);} if (argc == 1) { int _v; { void *ptr;
2201 if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Mag_server__ValuatorT_int_t, 0)) {
2202 _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_Valuatori__SWIG_0(L);} } if (argc == 2) { int _v; {
2203 _v = lua_isnumber(L,argv[0]); } if (_v) { { _v = lua_isnumber(L,argv[1]); } if (_v) {
2204 return _wrap_new_Valuatori__SWIG_2(L);} } }
2205 lua_pushstring(L,"Wrong arguments for overloaded function 'new_Valuatori'\n" " Possible C/C++ prototypes are:\n"
2206 " Mag_server::Valuator< int >::Valuator(Mag_server::Valuator< int > &)\n" " Mag_server::Valuator< int >::Valuator()\n"
2207 " Mag_server::Valuator< int >::Valuator(unsigned int,unsigned int)\n"); lua_error(L);return 0; }
2208 static int _wrap_Valuatori_clear(lua_State* L) { int SWIG_arg = 0;
2209 Mag_server::Valuator< int > *arg1 = (Mag_server::Valuator< int > *) 0 ;
2210 SWIG_check_num_args("Mag_server::Valuator< int >::clear",1,1)
2211 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Valuator< int >::clear",1,"Mag_server::Valuator< int > *");
2212 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__ValuatorT_int_t,0))){
2213 SWIG_fail_ptr("Valuatori_clear",1,SWIGTYPE_p_Mag_server__ValuatorT_int_t); } (arg1)->clear(); return SWIG_arg;
2214 if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2215 static int _wrap_Valuatori_valid(lua_State* L) { int SWIG_arg = 0;
2216 Mag_server::Valuator< int > *arg1 = (Mag_server::Valuator< int > *) 0 ; unsigned int arg2 ; bool result;
2217 SWIG_check_num_args("Mag_server::Valuator< int >::valid",2,2)
2218 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Valuator< int >::valid",1,"Mag_server::Valuator< int > const *");
2219 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Valuator< int >::valid",2,"unsigned int");
2220 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__ValuatorT_int_t,0))){
2221 SWIG_fail_ptr("Valuatori_valid",1,SWIGTYPE_p_Mag_server__ValuatorT_int_t); }
2222 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2223 result = (bool)((Mag_server::Valuator< int > const *)arg1)->valid(arg2); lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
2224 return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2225 static int _wrap_Valuatori_get(lua_State* L) { int SWIG_arg = 0;
2226 Mag_server::Valuator< int > *arg1 = (Mag_server::Valuator< int > *) 0 ; unsigned int arg2 ; Mag_server::Value< int > result;
2227 SWIG_check_num_args("Mag_server::Valuator< int >::get",2,2)
2228 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Valuator< int >::get",1,"Mag_server::Valuator< int > const *");
2229 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Valuator< int >::get",2,"unsigned int");
2230 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__ValuatorT_int_t,0))){
2231 SWIG_fail_ptr("Valuatori_get",1,SWIGTYPE_p_Mag_server__ValuatorT_int_t); }
2232 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2233 result = ((Mag_server::Valuator< int > const *)arg1)->get(arg2);
2234 if ((&result)->valid()) lua_pushinteger(L, (&result)->val()); else lua_pushnil(L); SWIG_arg++; return SWIG_arg;
2235 if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2236 static int _wrap_Valuatori_set(lua_State* L) { int SWIG_arg = 0;
2237 Mag_server::Valuator< int > *arg1 = (Mag_server::Valuator< int > *) 0 ; unsigned int arg2 ; int arg3 ;
2238 SWIG_check_num_args("Mag_server::Valuator< int >::set",3,3)
2239 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Valuator< int >::set",1,"Mag_server::Valuator< int > *");
2240 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Valuator< int >::set",2,"unsigned int");
2241 if(!lua_isnumber(L,3)) SWIG_fail_arg("Mag_server::Valuator< int >::set",3,"int");
2242 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__ValuatorT_int_t,0))){
2243 SWIG_fail_ptr("Valuatori_set",1,SWIGTYPE_p_Mag_server__ValuatorT_int_t); }
2244 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2245 arg3 = (int)lua_tointeger(L, 3); (arg1)->set(arg2,arg3); return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L);
2247 static int _wrap_Valuatori_inv(lua_State* L) { int SWIG_arg = 0;
2248 Mag_server::Valuator< int > *arg1 = (Mag_server::Valuator< int > *) 0 ; unsigned int arg2 ;
2249 SWIG_check_num_args("Mag_server::Valuator< int >::inv",2,2)
2250 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Valuator< int >::inv",1,"Mag_server::Valuator< int > *");
2251 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Valuator< int >::inv",2,"unsigned int");
2252 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__ValuatorT_int_t,0))){
2253 SWIG_fail_ptr("Valuatori_inv",1,SWIGTYPE_p_Mag_server__ValuatorT_int_t); }
2254 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2255 (arg1)->inv(arg2); return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2256 static int _wrap_Valuatori_size(lua_State* L) { int SWIG_arg = 0;
2257 Mag_server::Valuator< int > *arg1 = (Mag_server::Valuator< int > *) 0 ; unsigned int result;
2258 SWIG_check_num_args("Mag_server::Valuator< int >::size",1,1)
2259 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Valuator< int >::size",1,"Mag_server::Valuator< int > const *");
2260 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__ValuatorT_int_t,0))){
2261 SWIG_fail_ptr("Valuatori_size",1,SWIGTYPE_p_Mag_server__ValuatorT_int_t); }
2262 result = (unsigned int)((Mag_server::Valuator< int > const *)arg1)->size(); lua_pushinteger(L, result); SWIG_arg++;
2263 return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2264 static int _wrap_Valuatori___getitem(lua_State* L) { int SWIG_arg = 0;
2265 Mag_server::Valuator< int > *arg1 = (Mag_server::Valuator< int > *) 0 ; unsigned int arg2 ; Mag_server::Value< int > result;
2266 SWIG_check_num_args("Mag_server::Valuator< int >::__getitem__",2,2)
2267 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Valuator< int >::__getitem__",1,"Mag_server::Valuator< int > const *");
2268 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Valuator< int >::__getitem__",2,"unsigned int");
2269 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__ValuatorT_int_t,0))){
2270 SWIG_fail_ptr("Valuatori___getitem",1,SWIGTYPE_p_Mag_server__ValuatorT_int_t); }
2271 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2272 result = Mag_server_Valuator_Sl_int_Sg____getitem__((Mag_server::Valuator< int > const *)arg1,arg2);
2273 if ((&result)->valid()) lua_pushinteger(L, (&result)->val()); else lua_pushnil(L); SWIG_arg++; return SWIG_arg;
2274 if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2275 static void swig_delete_Valuatori(void *obj) {
2276 Mag_server::Valuator< int > *arg1 = (Mag_server::Valuator< int > *) obj;
2279 static swig_lua_method swig_Mag_server_Valuator_Sl_int_Sg__methods[] = {
2280 {"swap", _wrap_Valuatori_swap},
2281 {"create", _wrap_Valuatori_create},
2282 {"clear", _wrap_Valuatori_clear},
2283 {"valid", _wrap_Valuatori_valid},
2284 {"get", _wrap_Valuatori_get},
2285 {"set", _wrap_Valuatori_set},
2286 {"inv", _wrap_Valuatori_inv},
2287 {"size", _wrap_Valuatori_size},
2288 {"__getitem", _wrap_Valuatori___getitem},
2291 static swig_lua_attribute swig_Mag_server_Valuator_Sl_int_Sg__attributes[] = {
2294 static swig_lua_class *swig_Mag_server_Valuator_Sl_int_Sg__bases[] = {0};
2295 static const char *swig_Mag_server_Valuator_Sl_int_Sg__base_names[] = {0};
2296 static swig_lua_class _wrap_class_Mag_server_Valuator_Sl_int_Sg_ = { "Valuatori", &SWIGTYPE_p_Mag_server__ValuatorT_int_t,_wrap_new_Valuatori, swig_delete_Valuatori, swig_Mag_server_Valuator_Sl_int_Sg__methods, swig_Mag_server_Valuator_Sl_int_Sg__attributes, swig_Mag_server_Valuator_Sl_int_Sg__bases, swig_Mag_server_Valuator_Sl_int_Sg__base_names };
2298 static int _wrap_new_Valuei__SWIG_0(lua_State* L) { int SWIG_arg = 0; Mag_server::Value< int > *result = 0 ;
2299 SWIG_check_num_args("Mag_server::Value< int >::Value",0,0)
2300 result = (Mag_server::Value< int > *)new Mag_server::Value< int >();
2301 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__ValueT_int_t,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2302 lua_error(L); return SWIG_arg; }
2303 static int _wrap_new_Valuei__SWIG_1(lua_State* L) { int SWIG_arg = 0; int arg1 ; Mag_server::Value< int > *result = 0 ;
2304 SWIG_check_num_args("Mag_server::Value< int >::Value",1,1)
2305 if(!lua_isnumber(L,1)) SWIG_fail_arg("Mag_server::Value< int >::Value",1,"int"); arg1 = (int)lua_tointeger(L, 1);
2306 result = (Mag_server::Value< int > *)new Mag_server::Value< int >(arg1);
2307 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__ValueT_int_t,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2308 lua_error(L); return SWIG_arg; }
2309 static int _wrap_new_Valuei__SWIG_2(lua_State* L) { int SWIG_arg = 0; bool arg1 ; int arg2 ;
2310 Mag_server::Value< int > *result = 0 ; SWIG_check_num_args("Mag_server::Value< int >::Value",2,2)
2311 if(!lua_isboolean(L,1)) SWIG_fail_arg("Mag_server::Value< int >::Value",1,"bool");
2312 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Value< int >::Value",2,"int"); arg1 = (lua_toboolean(L, 1)!=0);
2313 arg2 = (int)lua_tointeger(L, 2); result = (Mag_server::Value< int > *)new Mag_server::Value< int >(arg1,arg2);
2314 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__ValueT_int_t,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2315 lua_error(L); return SWIG_arg; }
2316 static int _wrap_new_Valuei(lua_State* L) { int argc; int argv[3]={ 1,2,3} ; argc = lua_gettop(L); if (argc == 0) {
2317 return _wrap_new_Valuei__SWIG_0(L);} if (argc == 1) { int _v; { _v = lua_isnumber(L,argv[0]); } if (_v) {
2318 return _wrap_new_Valuei__SWIG_1(L);} } if (argc == 2) { int _v; { _v = lua_isboolean(L,argv[0]); } if (_v) { {
2319 _v = lua_isnumber(L,argv[1]); } if (_v) { return _wrap_new_Valuei__SWIG_2(L);} } }
2320 lua_pushstring(L,"Wrong arguments for overloaded function 'new_Valuei'\n" " Possible C/C++ prototypes are:\n"
2321 " Mag_server::Value< int >::Value()\n" " Mag_server::Value< int >::Value(int)\n"
2322 " Mag_server::Value< int >::Value(bool,int)\n"); lua_error(L);return 0; }
2323 static int _wrap_Valuei_set(lua_State* L) { int SWIG_arg = 0; Mag_server::Value< int > *arg1 = (Mag_server::Value< int > *) 0 ;
2324 int arg2 ; SWIG_check_num_args("Mag_server::Value< int >::set",2,2)
2325 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Value< int >::set",1,"Mag_server::Value< int > *");
2326 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Value< int >::set",2,"int");
2327 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__ValueT_int_t,0))){
2328 SWIG_fail_ptr("Valuei_set",1,SWIGTYPE_p_Mag_server__ValueT_int_t); } arg2 = (int)lua_tointeger(L, 2); (arg1)->set(arg2);
2329 return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2330 static int _wrap_Valuei_inv(lua_State* L) { int SWIG_arg = 0; Mag_server::Value< int > *arg1 = (Mag_server::Value< int > *) 0 ;
2331 SWIG_check_num_args("Mag_server::Value< int >::inv",1,1)
2332 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Value< int >::inv",1,"Mag_server::Value< int > *");
2333 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__ValueT_int_t,0))){
2334 SWIG_fail_ptr("Valuei_inv",1,SWIGTYPE_p_Mag_server__ValueT_int_t); } (arg1)->inv(); return SWIG_arg; if(0) SWIG_fail; fail:
2335 lua_error(L); return SWIG_arg; }
2336 static int _wrap_Valuei_valid(lua_State* L) { int SWIG_arg = 0;
2337 Mag_server::Value< int > *arg1 = (Mag_server::Value< int > *) 0 ; bool result;
2338 SWIG_check_num_args("Mag_server::Value< int >::valid",1,1)
2339 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Value< int >::valid",1,"Mag_server::Value< int > const *");
2340 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__ValueT_int_t,0))){
2341 SWIG_fail_ptr("Valuei_valid",1,SWIGTYPE_p_Mag_server__ValueT_int_t); }
2342 result = (bool)((Mag_server::Value< int > const *)arg1)->valid(); lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
2343 return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2344 static int _wrap_Valuei_val(lua_State* L) { int SWIG_arg = 0; Mag_server::Value< int > *arg1 = (Mag_server::Value< int > *) 0 ;
2345 int result; SWIG_check_num_args("Mag_server::Value< int >::val",1,1)
2346 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Value< int >::val",1,"Mag_server::Value< int > const *");
2347 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__ValueT_int_t,0))){
2348 SWIG_fail_ptr("Valuei_val",1,SWIGTYPE_p_Mag_server__ValueT_int_t); }
2349 result = (int)((Mag_server::Value< int > const *)arg1)->val(); lua_pushinteger(L, result); SWIG_arg++; return SWIG_arg;
2350 if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2351 static void swig_delete_Valuei(void *obj) {
2352 Mag_server::Value< int > *arg1 = (Mag_server::Value< int > *) obj;
2355 static swig_lua_method swig_Mag_server_Value_Sl_int_Sg__methods[] = {
2356 {"set", _wrap_Valuei_set},
2357 {"inv", _wrap_Valuei_inv},
2358 {"valid", _wrap_Valuei_valid},
2359 {"val", _wrap_Valuei_val},
2362 static swig_lua_attribute swig_Mag_server_Value_Sl_int_Sg__attributes[] = {
2365 static swig_lua_class *swig_Mag_server_Value_Sl_int_Sg__bases[] = {0};
2366 static const char *swig_Mag_server_Value_Sl_int_Sg__base_names[] = {0};
2367 static swig_lua_class _wrap_class_Mag_server_Value_Sl_int_Sg_ = { "Valuei", &SWIGTYPE_p_Mag_server__ValueT_int_t,_wrap_new_Valuei, swig_delete_Valuei, swig_Mag_server_Value_Sl_int_Sg__methods, swig_Mag_server_Value_Sl_int_Sg__attributes, swig_Mag_server_Value_Sl_int_Sg__bases, swig_Mag_server_Value_Sl_int_Sg__base_names };
2369 static int _wrap_Axis_info_value_set(lua_State* L) { int SWIG_arg = 0;
2370 Mag_server::Axis_info *arg1 = (Mag_server::Axis_info *) 0 ; int arg2 ; SWIG_check_num_args("Mag_server::Axis_info::value",2,2)
2371 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info::value",1,"Mag_server::Axis_info *");
2372 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Axis_info::value",2,"int");
2373 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info,0))){
2374 SWIG_fail_ptr("Axis_info_value_set",1,SWIGTYPE_p_Mag_server__Axis_info); } arg2 = (int)lua_tointeger(L, 2);
2375 if (arg1) (arg1)->value = arg2; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2376 static int _wrap_Axis_info_value_get(lua_State* L) { int SWIG_arg = 0;
2377 Mag_server::Axis_info *arg1 = (Mag_server::Axis_info *) 0 ; int result;
2378 SWIG_check_num_args("Mag_server::Axis_info::value",1,1)
2379 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info::value",1,"Mag_server::Axis_info *");
2380 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info,0))){
2381 SWIG_fail_ptr("Axis_info_value_get",1,SWIGTYPE_p_Mag_server__Axis_info); } result = (int) ((arg1)->value);
2382 lua_pushinteger(L, result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2383 static int _wrap_Axis_info_min_set(lua_State* L) { int SWIG_arg = 0; Mag_server::Axis_info *arg1 = (Mag_server::Axis_info *) 0 ;
2384 int arg2 ; SWIG_check_num_args("Mag_server::Axis_info::min",2,2)
2385 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info::min",1,"Mag_server::Axis_info *");
2386 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Axis_info::min",2,"int");
2387 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info,0))){
2388 SWIG_fail_ptr("Axis_info_min_set",1,SWIGTYPE_p_Mag_server__Axis_info); } arg2 = (int)lua_tointeger(L, 2);
2389 if (arg1) (arg1)->min = arg2; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2390 static int _wrap_Axis_info_min_get(lua_State* L) { int SWIG_arg = 0; Mag_server::Axis_info *arg1 = (Mag_server::Axis_info *) 0 ;
2391 int result; SWIG_check_num_args("Mag_server::Axis_info::min",1,1)
2392 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info::min",1,"Mag_server::Axis_info *");
2393 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info,0))){
2394 SWIG_fail_ptr("Axis_info_min_get",1,SWIGTYPE_p_Mag_server__Axis_info); } result = (int) ((arg1)->min);
2395 lua_pushinteger(L, result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2396 static int _wrap_Axis_info_max_set(lua_State* L) { int SWIG_arg = 0; Mag_server::Axis_info *arg1 = (Mag_server::Axis_info *) 0 ;
2397 int arg2 ; SWIG_check_num_args("Mag_server::Axis_info::max",2,2)
2398 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info::max",1,"Mag_server::Axis_info *");
2399 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Axis_info::max",2,"int");
2400 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info,0))){
2401 SWIG_fail_ptr("Axis_info_max_set",1,SWIGTYPE_p_Mag_server__Axis_info); } arg2 = (int)lua_tointeger(L, 2);
2402 if (arg1) (arg1)->max = arg2; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2403 static int _wrap_Axis_info_max_get(lua_State* L) { int SWIG_arg = 0; Mag_server::Axis_info *arg1 = (Mag_server::Axis_info *) 0 ;
2404 int result; SWIG_check_num_args("Mag_server::Axis_info::max",1,1)
2405 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info::max",1,"Mag_server::Axis_info *");
2406 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info,0))){
2407 SWIG_fail_ptr("Axis_info_max_get",1,SWIGTYPE_p_Mag_server__Axis_info); } result = (int) ((arg1)->max);
2408 lua_pushinteger(L, result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2409 static int _wrap_Axis_info_fuzz_set(lua_State* L) { int SWIG_arg = 0;
2410 Mag_server::Axis_info *arg1 = (Mag_server::Axis_info *) 0 ; int arg2 ; SWIG_check_num_args("Mag_server::Axis_info::fuzz",2,2)
2411 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info::fuzz",1,"Mag_server::Axis_info *");
2412 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Axis_info::fuzz",2,"int");
2413 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info,0))){
2414 SWIG_fail_ptr("Axis_info_fuzz_set",1,SWIGTYPE_p_Mag_server__Axis_info); } arg2 = (int)lua_tointeger(L, 2);
2415 if (arg1) (arg1)->fuzz = arg2; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2416 static int _wrap_Axis_info_fuzz_get(lua_State* L) { int SWIG_arg = 0;
2417 Mag_server::Axis_info *arg1 = (Mag_server::Axis_info *) 0 ; int result; SWIG_check_num_args("Mag_server::Axis_info::fuzz",1,1)
2418 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info::fuzz",1,"Mag_server::Axis_info *");
2419 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info,0))){
2420 SWIG_fail_ptr("Axis_info_fuzz_get",1,SWIGTYPE_p_Mag_server__Axis_info); } result = (int) ((arg1)->fuzz);
2421 lua_pushinteger(L, result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2422 static int _wrap_Axis_info_flat_set(lua_State* L) { int SWIG_arg = 0;
2423 Mag_server::Axis_info *arg1 = (Mag_server::Axis_info *) 0 ; int arg2 ; SWIG_check_num_args("Mag_server::Axis_info::flat",2,2)
2424 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info::flat",1,"Mag_server::Axis_info *");
2425 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Axis_info::flat",2,"int");
2426 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info,0))){
2427 SWIG_fail_ptr("Axis_info_flat_set",1,SWIGTYPE_p_Mag_server__Axis_info); } arg2 = (int)lua_tointeger(L, 2);
2428 if (arg1) (arg1)->flat = arg2; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2429 static int _wrap_Axis_info_flat_get(lua_State* L) { int SWIG_arg = 0;
2430 Mag_server::Axis_info *arg1 = (Mag_server::Axis_info *) 0 ; int result; SWIG_check_num_args("Mag_server::Axis_info::flat",1,1)
2431 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info::flat",1,"Mag_server::Axis_info *");
2432 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info,0))){
2433 SWIG_fail_ptr("Axis_info_flat_get",1,SWIGTYPE_p_Mag_server__Axis_info); } result = (int) ((arg1)->flat);
2434 lua_pushinteger(L, result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2435 static int _wrap_Axis_info_resolution_set(lua_State* L) { int SWIG_arg = 0;
2436 Mag_server::Axis_info *arg1 = (Mag_server::Axis_info *) 0 ; int arg2 ;
2437 SWIG_check_num_args("Mag_server::Axis_info::resolution",2,2)
2438 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info::resolution",1,"Mag_server::Axis_info *");
2439 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Axis_info::resolution",2,"int");
2440 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info,0))){
2441 SWIG_fail_ptr("Axis_info_resolution_set",1,SWIGTYPE_p_Mag_server__Axis_info); } arg2 = (int)lua_tointeger(L, 2);
2442 if (arg1) (arg1)->resolution = arg2; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2443 static int _wrap_Axis_info_resolution_get(lua_State* L) { int SWIG_arg = 0;
2444 Mag_server::Axis_info *arg1 = (Mag_server::Axis_info *) 0 ; int result;
2445 SWIG_check_num_args("Mag_server::Axis_info::resolution",1,1)
2446 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info::resolution",1,"Mag_server::Axis_info *");
2447 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info,0))){
2448 SWIG_fail_ptr("Axis_info_resolution_get",1,SWIGTYPE_p_Mag_server__Axis_info); } result = (int) ((arg1)->resolution);
2449 lua_pushinteger(L, result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2450 static int _wrap_Axis_info_delta_set(lua_State* L) { int SWIG_arg = 0;
2451 Mag_server::Axis_info *arg1 = (Mag_server::Axis_info *) 0 ; int arg2 ; SWIG_check_num_args("Mag_server::Axis_info::delta",2,2)
2452 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info::delta",1,"Mag_server::Axis_info *");
2453 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Axis_info::delta",2,"int");
2454 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info,0))){
2455 SWIG_fail_ptr("Axis_info_delta_set",1,SWIGTYPE_p_Mag_server__Axis_info); } arg2 = (int)lua_tointeger(L, 2);
2456 if (arg1) (arg1)->delta = arg2; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2457 static int _wrap_Axis_info_delta_get(lua_State* L) { int SWIG_arg = 0;
2458 Mag_server::Axis_info *arg1 = (Mag_server::Axis_info *) 0 ; int result;
2459 SWIG_check_num_args("Mag_server::Axis_info::delta",1,1)
2460 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info::delta",1,"Mag_server::Axis_info *");
2461 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info,0))){
2462 SWIG_fail_ptr("Axis_info_delta_get",1,SWIGTYPE_p_Mag_server__Axis_info); } result = (int) ((arg1)->delta);
2463 lua_pushinteger(L, result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2464 static int _wrap_Axis_info_mode_set(lua_State* L) { int SWIG_arg = 0;
2465 Mag_server::Axis_info *arg1 = (Mag_server::Axis_info *) 0 ; int arg2 ; SWIG_check_num_args("Mag_server::Axis_info::mode",2,2)
2466 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info::mode",1,"Mag_server::Axis_info *");
2467 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Axis_info::mode",2,"int");
2468 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info,0))){
2469 SWIG_fail_ptr("Axis_info_mode_set",1,SWIGTYPE_p_Mag_server__Axis_info); } arg2 = (int)lua_tointeger(L, 2);
2470 if (arg1) (arg1)->mode = arg2; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2471 static int _wrap_Axis_info_mode_get(lua_State* L) { int SWIG_arg = 0;
2472 Mag_server::Axis_info *arg1 = (Mag_server::Axis_info *) 0 ; int result; SWIG_check_num_args("Mag_server::Axis_info::mode",1,1)
2473 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info::mode",1,"Mag_server::Axis_info *");
2474 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info,0))){
2475 SWIG_fail_ptr("Axis_info_mode_get",1,SWIGTYPE_p_Mag_server__Axis_info); } result = (int) ((arg1)->mode);
2476 lua_pushinteger(L, result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2477 static int _wrap_new_Axis_info(lua_State* L) { int SWIG_arg = 0; Mag_server::Axis_info *result = 0 ;
2478 SWIG_check_num_args("Mag_server::Axis_info::Axis_info",0,0) result = (Mag_server::Axis_info *)new Mag_server::Axis_info();
2479 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__Axis_info,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2480 lua_error(L); return SWIG_arg; }
2481 static void swig_delete_Axis_info(void *obj) {
2482 Mag_server::Axis_info *arg1 = (Mag_server::Axis_info *) obj;
2485 static swig_lua_method swig_Mag_server_Axis_info_methods[] = {
2488 static swig_lua_attribute swig_Mag_server_Axis_info_attributes[] = {
2489 { "value", _wrap_Axis_info_value_get, _wrap_Axis_info_value_set},
2490 { "min", _wrap_Axis_info_min_get, _wrap_Axis_info_min_set},
2491 { "max", _wrap_Axis_info_max_get, _wrap_Axis_info_max_set},
2492 { "fuzz", _wrap_Axis_info_fuzz_get, _wrap_Axis_info_fuzz_set},
2493 { "flat", _wrap_Axis_info_flat_get, _wrap_Axis_info_flat_set},
2494 { "resolution", _wrap_Axis_info_resolution_get, _wrap_Axis_info_resolution_set},
2495 { "delta", _wrap_Axis_info_delta_get, _wrap_Axis_info_delta_set},
2496 { "mode", _wrap_Axis_info_mode_get, _wrap_Axis_info_mode_set},
2499 static swig_lua_class *swig_Mag_server_Axis_info_bases[] = {0};
2500 static const char *swig_Mag_server_Axis_info_base_names[] = {0};
2501 static swig_lua_class _wrap_class_Mag_server_Axis_info = { "Axis_info", &SWIGTYPE_p_Mag_server__Axis_info,_wrap_new_Axis_info, swig_delete_Axis_info, swig_Mag_server_Axis_info_methods, swig_Mag_server_Axis_info_attributes, swig_Mag_server_Axis_info_bases, swig_Mag_server_Axis_info_base_names };
2503 static int _wrap_new_Axis_info_vector__SWIG_0(lua_State* L) { int SWIG_arg = 0; Mag_server::Axis_info_vector *result = 0 ;
2504 SWIG_check_num_args("Mag_server::Axis_info_vector::Axis_info_vector",0,0)
2505 result = (Mag_server::Axis_info_vector *)new Mag_server::Axis_info_vector();
2506 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__Axis_info_vector,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2507 lua_error(L); return SWIG_arg; }
2508 static int _wrap_new_Axis_info_vector__SWIG_1(lua_State* L) { int SWIG_arg = 0; unsigned int arg1 ;
2509 Mag_server::Axis_info_vector *result = 0 ; SWIG_check_num_args("Mag_server::Axis_info_vector::Axis_info_vector",1,1)
2510 if(!lua_isnumber(L,1)) SWIG_fail_arg("Mag_server::Axis_info_vector::Axis_info_vector",1,"unsigned int");
2511 SWIG_contract_assert((lua_tointeger(L,1)>=0),"number must not be negative") arg1 = (unsigned int)lua_tointeger(L, 1);
2512 result = (Mag_server::Axis_info_vector *)new Mag_server::Axis_info_vector(arg1);
2513 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__Axis_info_vector,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2514 lua_error(L); return SWIG_arg; }
2515 static int _wrap_new_Axis_info_vector(lua_State* L) { int argc; int argv[2]={ 1,2} ; argc = lua_gettop(L); if (argc == 0) {
2516 return _wrap_new_Axis_info_vector__SWIG_0(L);} if (argc == 1) { int _v; { _v = lua_isnumber(L,argv[0]); } if (_v) {
2517 return _wrap_new_Axis_info_vector__SWIG_1(L);} }
2518 lua_pushstring(L,"Wrong arguments for overloaded function 'new_Axis_info_vector'\n" " Possible C/C++ prototypes are:\n"
2519 " Mag_server::Axis_info_vector::Axis_info_vector()\n"
2520 " Mag_server::Axis_info_vector::Axis_info_vector(unsigned int)\n"); lua_error(L);return 0; }
2521 static int _wrap_Axis_info_vector_size(lua_State* L) { int SWIG_arg = 0;
2522 Mag_server::Axis_info_vector *arg1 = (Mag_server::Axis_info_vector *) 0 ; unsigned int result;
2523 SWIG_check_num_args("Mag_server::Axis_info_vector::size",1,1)
2524 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info_vector::size",1,"Mag_server::Axis_info_vector const *");
2525 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info_vector,0))){
2526 SWIG_fail_ptr("Axis_info_vector_size",1,SWIGTYPE_p_Mag_server__Axis_info_vector); }
2527 result = (unsigned int)((Mag_server::Axis_info_vector const *)arg1)->size(); lua_pushinteger(L, result); SWIG_arg++;
2528 return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2529 static int _wrap_Axis_info_vector_get__SWIG_0(lua_State* L) { int SWIG_arg = 0;
2530 Mag_server::Axis_info_vector *arg1 = (Mag_server::Axis_info_vector *) 0 ; unsigned int arg2 ;
2531 Mag_server::Axis_info *result = 0 ; SWIG_check_num_args("Mag_server::Axis_info_vector::get",2,2)
2532 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info_vector::get",1,"Mag_server::Axis_info_vector const *");
2533 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Axis_info_vector::get",2,"unsigned int");
2534 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info_vector,0))){
2535 SWIG_fail_ptr("Axis_info_vector_get",1,SWIGTYPE_p_Mag_server__Axis_info_vector); }
2536 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2537 result = (Mag_server::Axis_info *)((Mag_server::Axis_info_vector const *)arg1)->get(arg2);
2538 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__Axis_info,0); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2539 lua_error(L); return SWIG_arg; }
2540 static int _wrap_Axis_info_vector_get__SWIG_1(lua_State* L) { int SWIG_arg = 0;
2541 Mag_server::Axis_info_vector *arg1 = (Mag_server::Axis_info_vector *) 0 ; unsigned int arg2 ;
2542 Mag_server::Axis_info *result = 0 ; SWIG_check_num_args("Mag_server::Axis_info_vector::get",2,2)
2543 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info_vector::get",1,"Mag_server::Axis_info_vector *");
2544 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Axis_info_vector::get",2,"unsigned int");
2545 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info_vector,0))){
2546 SWIG_fail_ptr("Axis_info_vector_get",1,SWIGTYPE_p_Mag_server__Axis_info_vector); }
2547 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2548 result = (Mag_server::Axis_info *)(arg1)->get(arg2);
2549 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__Axis_info,0); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2550 lua_error(L); return SWIG_arg; }
2551 static int _wrap_Axis_info_vector_get(lua_State* L) { int argc; int argv[3]={ 1,2,3} ; argc = lua_gettop(L); if (argc == 2) {
2552 int _v; { void *ptr;
2553 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Mag_server__Axis_info_vector, 0)) {
2554 _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isnumber(L,argv[1]); } if (_v) {
2555 return _wrap_Axis_info_vector_get__SWIG_1(L);} } } if (argc == 2) { int _v; { void *ptr;
2556 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Mag_server__Axis_info_vector, 0)) {
2557 _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isnumber(L,argv[1]); } if (_v) {
2558 return _wrap_Axis_info_vector_get__SWIG_0(L);} } }
2559 lua_pushstring(L,"Wrong arguments for overloaded function 'Axis_info_vector_get'\n" " Possible C/C++ prototypes are:\n"
2560 " Mag_server::Axis_info_vector::get(unsigned int) const\n" " Mag_server::Axis_info_vector::get(unsigned int)\n");
2561 lua_error(L);return 0; }
2562 static int _wrap_Axis_info_vector_create(lua_State* L) { int SWIG_arg = 0;
2563 Mag_server::Axis_info_vector *arg1 = (Mag_server::Axis_info_vector *) 0 ; unsigned int arg2 ;
2564 Mag_server::Axis_info *result = 0 ; SWIG_check_num_args("Mag_server::Axis_info_vector::create",2,2)
2565 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info_vector::create",1,"Mag_server::Axis_info_vector *");
2566 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Axis_info_vector::create",2,"unsigned int");
2567 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info_vector,0))){
2568 SWIG_fail_ptr("Axis_info_vector_create",1,SWIGTYPE_p_Mag_server__Axis_info_vector); }
2569 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2570 result = (Mag_server::Axis_info *)(arg1)->create(arg2);
2571 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__Axis_info,0); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2572 lua_error(L); return SWIG_arg; }
2573 static int _wrap_Axis_info_vector_set(lua_State* L) { int SWIG_arg = 0;
2574 Mag_server::Axis_info_vector *arg1 = (Mag_server::Axis_info_vector *) 0 ; unsigned int arg2 ;
2575 Mag_server::Axis_info *arg3 = (Mag_server::Axis_info *) 0 ; bool result;
2576 SWIG_check_num_args("Mag_server::Axis_info_vector::set",3,3)
2577 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info_vector::set",1,"Mag_server::Axis_info_vector *");
2578 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Axis_info_vector::set",2,"unsigned int");
2579 if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("Mag_server::Axis_info_vector::set",3,"Mag_server::Axis_info *");
2580 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info_vector,0))){
2581 SWIG_fail_ptr("Axis_info_vector_set",1,SWIGTYPE_p_Mag_server__Axis_info_vector); }
2582 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2583 if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_Mag_server__Axis_info,SWIG_POINTER_DISOWN))){
2584 SWIG_fail_ptr("Axis_info_vector_set",3,SWIGTYPE_p_Mag_server__Axis_info); } result = (bool)(arg1)->set(arg2,arg3);
2585 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2586 static int _wrap_Axis_info_vector___getitem(lua_State* L) { int SWIG_arg = 0;
2587 Mag_server::Axis_info_vector *arg1 = (Mag_server::Axis_info_vector *) 0 ; unsigned int arg2 ;
2588 Mag_server::Axis_info *result = 0 ; SWIG_check_num_args("Mag_server::Axis_info_vector::__getitem__",2,2)
2589 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Axis_info_vector::__getitem__",1,"Mag_server::Axis_info_vector *");
2590 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Axis_info_vector::__getitem__",2,"unsigned int");
2591 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Axis_info_vector,0))){
2592 SWIG_fail_ptr("Axis_info_vector___getitem",1,SWIGTYPE_p_Mag_server__Axis_info_vector); }
2593 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2594 result = (Mag_server::Axis_info *)Mag_server_Axis_info_vector___getitem__(arg1,arg2);
2595 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__Axis_info,0); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2596 lua_error(L); return SWIG_arg; }
2597 static void swig_delete_Axis_info_vector(void *obj) {
2598 Mag_server::Axis_info_vector *arg1 = (Mag_server::Axis_info_vector *) obj;
2601 static swig_lua_method swig_Mag_server_Axis_info_vector_methods[] = {
2602 {"size", _wrap_Axis_info_vector_size},
2603 {"get", _wrap_Axis_info_vector_get},
2604 {"create", _wrap_Axis_info_vector_create},
2605 {"set", _wrap_Axis_info_vector_set},
2606 {"__getitem", _wrap_Axis_info_vector___getitem},
2609 static swig_lua_attribute swig_Mag_server_Axis_info_vector_attributes[] = {
2612 static swig_lua_class *swig_Mag_server_Axis_info_vector_bases[] = {0};
2613 static const char *swig_Mag_server_Axis_info_vector_base_names[] = {0};
2614 static swig_lua_class _wrap_class_Mag_server_Axis_info_vector = { "Axis_info_vector", &SWIGTYPE_p_Mag_server__Axis_info_vector,_wrap_new_Axis_info_vector, swig_delete_Axis_info_vector, swig_Mag_server_Axis_info_vector_methods, swig_Mag_server_Axis_info_vector_attributes, swig_Mag_server_Axis_info_vector_bases, swig_Mag_server_Axis_info_vector_base_names };
2616 static int _wrap_new_Hid_report(lua_State* L) { int SWIG_arg = 0; l4_umword_t arg1 ; unsigned int arg2 ; unsigned int arg3 ;
2617 unsigned int arg4 ; unsigned int arg5 ; unsigned int arg6 ; Mag_server::Hid_report *result = 0 ;
2618 SWIG_check_num_args("Mag_server::Hid_report::Hid_report",6,6)
2619 if(!lua_isnumber(L,1)) SWIG_fail_arg("Mag_server::Hid_report::Hid_report",1,"l4_umword_t");
2620 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Hid_report::Hid_report",2,"unsigned int");
2621 if(!lua_isnumber(L,3)) SWIG_fail_arg("Mag_server::Hid_report::Hid_report",3,"unsigned int");
2622 if(!lua_isnumber(L,4)) SWIG_fail_arg("Mag_server::Hid_report::Hid_report",4,"unsigned int");
2623 if(!lua_isnumber(L,5)) SWIG_fail_arg("Mag_server::Hid_report::Hid_report",5,"unsigned int");
2624 if(!lua_isnumber(L,6)) SWIG_fail_arg("Mag_server::Hid_report::Hid_report",6,"unsigned int");
2625 SWIG_contract_assert((lua_tointeger(L,1)>=0),"number must not be negative") arg1 = (l4_umword_t)lua_tointeger(L, 1);
2626 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2627 SWIG_contract_assert((lua_tointeger(L,3)>=0),"number must not be negative") arg3 = (unsigned int)lua_tointeger(L, 3);
2628 SWIG_contract_assert((lua_tointeger(L,4)>=0),"number must not be negative") arg4 = (unsigned int)lua_tointeger(L, 4);
2629 SWIG_contract_assert((lua_tointeger(L,5)>=0),"number must not be negative") arg5 = (unsigned int)lua_tointeger(L, 5);
2630 SWIG_contract_assert((lua_tointeger(L,6)>=0),"number must not be negative") arg6 = (unsigned int)lua_tointeger(L, 6);
2631 result = (Mag_server::Hid_report *)new Mag_server::Hid_report(arg1,arg2,arg3,arg4,arg5,arg6);
2632 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__Hid_report,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2633 lua_error(L); return SWIG_arg; }
2634 static int _wrap_Hid_report_get(lua_State* L) { int SWIG_arg = 0; Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) 0 ;
2635 unsigned char arg2 ; unsigned int arg3 ; int *arg4 = 0 ; bool result; SWIG_check_num_args("Mag_server::Hid_report::get",4,4)
2636 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Hid_report::get",1,"Mag_server::Hid_report const *");
2637 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Hid_report::get",2,"unsigned char");
2638 if(!lua_isnumber(L,3)) SWIG_fail_arg("Mag_server::Hid_report::get",3,"unsigned int");
2639 if(!lua_isuserdata(L,4)) SWIG_fail_arg("Mag_server::Hid_report::get",4,"int &");
2640 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Hid_report,0))){
2641 SWIG_fail_ptr("Hid_report_get",1,SWIGTYPE_p_Mag_server__Hid_report); }
2642 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned char)lua_tointeger(L, 2);
2643 SWIG_contract_assert((lua_tointeger(L,3)>=0),"number must not be negative") arg3 = (unsigned int)lua_tointeger(L, 3);
2644 if (!SWIG_IsOK(SWIG_ConvertPtr(L,4,(void**)&arg4,SWIGTYPE_p_int,0))){ SWIG_fail_ptr("Hid_report_get",4,SWIGTYPE_p_int); }
2645 result = (bool)((Mag_server::Hid_report const *)arg1)->get(arg2,arg3,*arg4); lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
2646 return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2647 static int _wrap_Hid_report_set(lua_State* L) { int SWIG_arg = 0; Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) 0 ;
2648 unsigned char arg2 ; unsigned int arg3 ; int arg4 ; SWIG_check_num_args("Mag_server::Hid_report::set",4,4)
2649 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Hid_report::set",1,"Mag_server::Hid_report *");
2650 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Hid_report::set",2,"unsigned char");
2651 if(!lua_isnumber(L,3)) SWIG_fail_arg("Mag_server::Hid_report::set",3,"unsigned int");
2652 if(!lua_isnumber(L,4)) SWIG_fail_arg("Mag_server::Hid_report::set",4,"int");
2653 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Hid_report,0))){
2654 SWIG_fail_ptr("Hid_report_set",1,SWIGTYPE_p_Mag_server__Hid_report); }
2655 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned char)lua_tointeger(L, 2);
2656 SWIG_contract_assert((lua_tointeger(L,3)>=0),"number must not be negative") arg3 = (unsigned int)lua_tointeger(L, 3);
2657 arg4 = (int)lua_tointeger(L, 4); (arg1)->set(arg2,arg3,arg4); return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L);
2659 static int _wrap_Hid_report_mt_get(lua_State* L) { int SWIG_arg = 0;
2660 Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) 0 ; unsigned int arg2 ; unsigned int arg3 ; int *arg4 = 0 ;
2661 bool result; SWIG_check_num_args("Mag_server::Hid_report::mt_get",4,4)
2662 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Hid_report::mt_get",1,"Mag_server::Hid_report const *");
2663 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Hid_report::mt_get",2,"unsigned int");
2664 if(!lua_isnumber(L,3)) SWIG_fail_arg("Mag_server::Hid_report::mt_get",3,"unsigned int");
2665 if(!lua_isuserdata(L,4)) SWIG_fail_arg("Mag_server::Hid_report::mt_get",4,"int &");
2666 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Hid_report,0))){
2667 SWIG_fail_ptr("Hid_report_mt_get",1,SWIGTYPE_p_Mag_server__Hid_report); }
2668 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2669 SWIG_contract_assert((lua_tointeger(L,3)>=0),"number must not be negative") arg3 = (unsigned int)lua_tointeger(L, 3);
2670 if (!SWIG_IsOK(SWIG_ConvertPtr(L,4,(void**)&arg4,SWIGTYPE_p_int,0))){ SWIG_fail_ptr("Hid_report_mt_get",4,SWIGTYPE_p_int); }
2671 result = (bool)((Mag_server::Hid_report const *)arg1)->mt_get(arg2,arg3,*arg4);
2672 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2673 static int _wrap_Hid_report_mt_set(lua_State* L) { int SWIG_arg = 0;
2674 Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) 0 ; unsigned int arg2 ; int arg3 ;
2675 SWIG_check_num_args("Mag_server::Hid_report::mt_set",3,3)
2676 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Hid_report::mt_set",1,"Mag_server::Hid_report *");
2677 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Hid_report::mt_set",2,"unsigned int");
2678 if(!lua_isnumber(L,3)) SWIG_fail_arg("Mag_server::Hid_report::mt_set",3,"int");
2679 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Hid_report,0))){
2680 SWIG_fail_ptr("Hid_report_mt_set",1,SWIGTYPE_p_Mag_server__Hid_report); }
2681 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2682 arg3 = (int)lua_tointeger(L, 3); (arg1)->mt_set(arg2,arg3); return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L);
2684 static int _wrap_Hid_report_submit_mt(lua_State* L) { int SWIG_arg = 0;
2685 Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) 0 ; bool result;
2686 SWIG_check_num_args("Mag_server::Hid_report::submit_mt",1,1)
2687 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Hid_report::submit_mt",1,"Mag_server::Hid_report *");
2688 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Hid_report,0))){
2689 SWIG_fail_ptr("Hid_report_submit_mt",1,SWIGTYPE_p_Mag_server__Hid_report); } result = (bool)(arg1)->submit_mt();
2690 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2691 static int _wrap_Hid_report_get_vals__SWIG_0(lua_State* L) { int SWIG_arg = 0;
2692 Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) 0 ; unsigned char arg2 ; Mag_server::Valuator< int > *result = 0 ;
2693 SWIG_check_num_args("Mag_server::Hid_report::get_vals",2,2)
2694 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Hid_report::get_vals",1,"Mag_server::Hid_report const *");
2695 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Hid_report::get_vals",2,"unsigned char");
2696 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Hid_report,0))){
2697 SWIG_fail_ptr("Hid_report_get_vals",1,SWIGTYPE_p_Mag_server__Hid_report); }
2698 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned char)lua_tointeger(L, 2);
2699 result = (Mag_server::Valuator< int > *)((Mag_server::Hid_report const *)arg1)->get_vals(arg2);
2700 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__ValuatorT_int_t,0); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2701 lua_error(L); return SWIG_arg; }
2702 static int _wrap_Hid_report_get_vals__SWIG_1(lua_State* L) { int SWIG_arg = 0;
2703 Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) 0 ; unsigned char arg2 ; Mag_server::Valuator< int > *result = 0 ;
2704 SWIG_check_num_args("Mag_server::Hid_report::get_vals",2,2)
2705 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Hid_report::get_vals",1,"Mag_server::Hid_report *");
2706 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Hid_report::get_vals",2,"unsigned char");
2707 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Hid_report,0))){
2708 SWIG_fail_ptr("Hid_report_get_vals",1,SWIGTYPE_p_Mag_server__Hid_report); }
2709 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned char)lua_tointeger(L, 2);
2710 result = (Mag_server::Valuator< int > *)(arg1)->get_vals(arg2);
2711 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__ValuatorT_int_t,0); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2712 lua_error(L); return SWIG_arg; }
2713 static int _wrap_Hid_report_get_vals(lua_State* L) { int argc; int argv[3]={ 1,2,3} ; argc = lua_gettop(L); if (argc == 2) {
2714 int _v; { void *ptr;
2715 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Mag_server__Hid_report, 0)) {
2716 _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isnumber(L,argv[1]); } if (_v) {
2717 return _wrap_Hid_report_get_vals__SWIG_1(L);} } } if (argc == 2) { int _v; { void *ptr;
2718 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Mag_server__Hid_report, 0)) {
2719 _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isnumber(L,argv[1]); } if (_v) {
2720 return _wrap_Hid_report_get_vals__SWIG_0(L);} } }
2721 lua_pushstring(L,"Wrong arguments for overloaded function 'Hid_report_get_vals'\n" " Possible C/C++ prototypes are:\n"
2722 " Mag_server::Hid_report::get_vals(unsigned char) const\n" " Mag_server::Hid_report::get_vals(unsigned char)\n");
2723 lua_error(L);return 0; }
2724 static int _wrap_Hid_report_get_mt_vals(lua_State* L) { int SWIG_arg = 0;
2725 Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) 0 ; unsigned int arg2 ; Mag_server::Valuator< int > *result = 0 ;
2726 SWIG_check_num_args("Mag_server::Hid_report::get_mt_vals",2,2)
2727 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Hid_report::get_mt_vals",1,"Mag_server::Hid_report const *");
2728 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Hid_report::get_mt_vals",2,"unsigned int");
2729 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Hid_report,0))){
2730 SWIG_fail_ptr("Hid_report_get_mt_vals",1,SWIGTYPE_p_Mag_server__Hid_report); }
2731 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2732 result = (Mag_server::Valuator< int > *)((Mag_server::Hid_report const *)arg1)->get_mt_vals(arg2);
2733 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__ValuatorT_int_t,0); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2734 lua_error(L); return SWIG_arg; }
2735 static int _wrap_Hid_report_add_key(lua_State* L) { int SWIG_arg = 0;
2736 Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) 0 ; int arg2 ; int arg3 ; bool result;
2737 SWIG_check_num_args("Mag_server::Hid_report::add_key",3,3)
2738 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Hid_report::add_key",1,"Mag_server::Hid_report *");
2739 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Hid_report::add_key",2,"int");
2740 if(!lua_isnumber(L,3)) SWIG_fail_arg("Mag_server::Hid_report::add_key",3,"int");
2741 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Hid_report,0))){
2742 SWIG_fail_ptr("Hid_report_add_key",1,SWIGTYPE_p_Mag_server__Hid_report); } arg2 = (int)lua_tointeger(L, 2);
2743 arg3 = (int)lua_tointeger(L, 3); result = (bool)(arg1)->add_key(arg2,arg3); lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
2744 return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2745 static int _wrap_Hid_report_get_key_event(lua_State* L) { int SWIG_arg = 0;
2746 Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) 0 ; unsigned int arg2 ;
2747 Mag_server::Hid_report::Key_event *result = 0 ; SWIG_check_num_args("Mag_server::Hid_report::get_key_event",2,2)
2748 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Hid_report::get_key_event",1,"Mag_server::Hid_report const *");
2749 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Hid_report::get_key_event",2,"unsigned int");
2750 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Hid_report,0))){
2751 SWIG_fail_ptr("Hid_report_get_key_event",1,SWIGTYPE_p_Mag_server__Hid_report); }
2752 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tointeger(L, 2);
2753 result = (Mag_server::Hid_report::Key_event *)((Mag_server::Hid_report const *)arg1)->get_key_event(arg2); if (result) {
2754 lua_pushinteger(L, result->code); lua_pushinteger(L, result->value); SWIG_arg += 2; } return SWIG_arg; if(0) SWIG_fail;
2755 fail: lua_error(L); return SWIG_arg; }
2756 static int _wrap_Hid_report_find_key_event(lua_State* L) { int SWIG_arg = 0;
2757 Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) 0 ; int arg2 ; Mag_server::Hid_report::Key_event *result = 0 ;
2758 SWIG_check_num_args("Mag_server::Hid_report::find_key_event",2,2)
2759 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Hid_report::find_key_event",1,"Mag_server::Hid_report const *");
2760 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Hid_report::find_key_event",2,"int");
2761 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Hid_report,0))){
2762 SWIG_fail_ptr("Hid_report_find_key_event",1,SWIGTYPE_p_Mag_server__Hid_report); } arg2 = (int)lua_tointeger(L, 2);
2763 result = (Mag_server::Hid_report::Key_event *)((Mag_server::Hid_report const *)arg1)->find_key_event(arg2); if (result) {
2764 lua_pushinteger(L, result->code); lua_pushinteger(L, result->value); SWIG_arg += 2; } return SWIG_arg; if(0) SWIG_fail;
2765 fail: lua_error(L); return SWIG_arg; }
2766 static int _wrap_Hid_report_remove_key_event(lua_State* L) { int SWIG_arg = 0;
2767 Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) 0 ; int arg2 ;
2768 SWIG_check_num_args("Mag_server::Hid_report::remove_key_event",2,2)
2769 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Hid_report::remove_key_event",1,"Mag_server::Hid_report *");
2770 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Hid_report::remove_key_event",2,"int");
2771 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Hid_report,0))){
2772 SWIG_fail_ptr("Hid_report_remove_key_event",1,SWIGTYPE_p_Mag_server__Hid_report); } arg2 = (int)lua_tointeger(L, 2);
2773 (arg1)->remove_key_event(arg2); return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2774 static int _wrap_Hid_report_sync(lua_State* L) { int SWIG_arg = 0; Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) 0 ;
2775 long long arg2 ; SWIG_check_num_args("Mag_server::Hid_report::sync",2,2)
2776 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Hid_report::sync",1,"Mag_server::Hid_report *");
2777 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Hid_report::sync",2,"long long");
2778 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Hid_report,0))){
2779 SWIG_fail_ptr("Hid_report_sync",1,SWIGTYPE_p_Mag_server__Hid_report); } arg2 = (long long)lua_tonumber(L, 2);
2780 (arg1)->sync(arg2); return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2781 static int _wrap_Hid_report_time(lua_State* L) { int SWIG_arg = 0; Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) 0 ;
2782 long long result; SWIG_check_num_args("Mag_server::Hid_report::time",1,1)
2783 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Hid_report::time",1,"Mag_server::Hid_report const *");
2784 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Hid_report,0))){
2785 SWIG_fail_ptr("Hid_report_time",1,SWIGTYPE_p_Mag_server__Hid_report); }
2786 result = (long long)((Mag_server::Hid_report const *)arg1)->time(); lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2787 return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2788 static int _wrap_Hid_report_clear(lua_State* L) { int SWIG_arg = 0;
2789 Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) 0 ; SWIG_check_num_args("Mag_server::Hid_report::clear",1,1)
2790 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Hid_report::clear",1,"Mag_server::Hid_report *");
2791 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Hid_report,0))){
2792 SWIG_fail_ptr("Hid_report_clear",1,SWIGTYPE_p_Mag_server__Hid_report); } (arg1)->clear(); return SWIG_arg; if(0) SWIG_fail;
2793 fail: lua_error(L); return SWIG_arg; }
2794 static int _wrap_Hid_report_device_id(lua_State* L) { int SWIG_arg = 0;
2795 Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) 0 ; l4_umword_t result;
2796 SWIG_check_num_args("Mag_server::Hid_report::device_id",1,1)
2797 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Hid_report::device_id",1,"Mag_server::Hid_report const *");
2798 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Hid_report,0))){
2799 SWIG_fail_ptr("Hid_report_device_id",1,SWIGTYPE_p_Mag_server__Hid_report); }
2800 result = ((Mag_server::Hid_report const *)arg1)->device_id(); lua_pushinteger(L, result); SWIG_arg++; return SWIG_arg;
2801 if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2802 static int _wrap_Hid_report_abs_infos__SWIG_0(lua_State* L) { int SWIG_arg = 0;
2803 Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) 0 ; Mag_server::Axis_info_vector *result = 0 ;
2804 SWIG_check_num_args("Mag_server::Hid_report::abs_infos",1,1)
2805 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Hid_report::abs_infos",1,"Mag_server::Hid_report const *");
2806 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Hid_report,0))){
2807 SWIG_fail_ptr("Hid_report_abs_infos",1,SWIGTYPE_p_Mag_server__Hid_report); }
2808 result = (Mag_server::Axis_info_vector *)((Mag_server::Hid_report const *)arg1)->abs_infos();
2809 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__Axis_info_vector,0); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2810 lua_error(L); return SWIG_arg; }
2811 static int _wrap_Hid_report_abs_infos__SWIG_1(lua_State* L) { int SWIG_arg = 0;
2812 Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) 0 ; Mag_server::Axis_info_vector *result = 0 ;
2813 SWIG_check_num_args("Mag_server::Hid_report::abs_infos",1,1)
2814 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Hid_report::abs_infos",1,"Mag_server::Hid_report *");
2815 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Hid_report,0))){
2816 SWIG_fail_ptr("Hid_report_abs_infos",1,SWIGTYPE_p_Mag_server__Hid_report); }
2817 result = (Mag_server::Axis_info_vector *)(arg1)->abs_infos();
2818 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__Axis_info_vector,0); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2819 lua_error(L); return SWIG_arg; }
2820 static int _wrap_Hid_report_abs_infos(lua_State* L) { int argc; int argv[2]={ 1,2} ; argc = lua_gettop(L); if (argc == 1) {
2821 int _v; { void *ptr;
2822 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Mag_server__Hid_report, 0)) {
2823 _v = 0; } else { _v = 1; } } if (_v) { return _wrap_Hid_report_abs_infos__SWIG_1(L);} } if (argc == 1) { int _v; {
2825 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Mag_server__Hid_report, 0)) {
2826 _v = 0; } else { _v = 1; } } if (_v) { return _wrap_Hid_report_abs_infos__SWIG_0(L);} }
2827 lua_pushstring(L,"Wrong arguments for overloaded function 'Hid_report_abs_infos'\n" " Possible C/C++ prototypes are:\n"
2828 " Mag_server::Hid_report::abs_infos() const\n" " Mag_server::Hid_report::abs_infos()\n"); lua_error(L);return 0; }
2829 static int _wrap_Hid_report_set_abs_info(lua_State* L) { int SWIG_arg = 0;
2830 Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) 0 ;
2831 Mag_server::Axis_info_vector *arg2 = (Mag_server::Axis_info_vector *) 0 ;
2832 SWIG_check_num_args("Mag_server::Hid_report::set_abs_info",2,2)
2833 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Hid_report::set_abs_info",1,"Mag_server::Hid_report *");
2834 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Mag_server::Hid_report::set_abs_info",2,"Mag_server::Axis_info_vector *");
2835 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Hid_report,0))){
2836 SWIG_fail_ptr("Hid_report_set_abs_info",1,SWIGTYPE_p_Mag_server__Hid_report); }
2837 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Mag_server__Axis_info_vector,0))){
2838 SWIG_fail_ptr("Hid_report_set_abs_info",2,SWIGTYPE_p_Mag_server__Axis_info_vector); } (arg1)->set_abs_info(arg2);
2839 return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2840 static int _wrap_Hid_report___getitem(lua_State* L) { int SWIG_arg = 0;
2841 Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) 0 ; unsigned char arg2 ; Mag_server::Valuator< int > *result = 0 ;
2842 SWIG_check_num_args("Mag_server::Hid_report::__getitem__",2,2)
2843 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Hid_report::__getitem__",1,"Mag_server::Hid_report *");
2844 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::Hid_report::__getitem__",2,"unsigned char");
2845 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Hid_report,0))){
2846 SWIG_fail_ptr("Hid_report___getitem",1,SWIGTYPE_p_Mag_server__Hid_report); }
2847 SWIG_contract_assert((lua_tointeger(L,2)>=0),"number must not be negative") arg2 = (unsigned char)lua_tointeger(L, 2);
2848 result = (Mag_server::Valuator< int > *)Mag_server_Hid_report___getitem__(arg1,arg2);
2849 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__ValuatorT_int_t,0); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2850 lua_error(L); return SWIG_arg; }
2851 static void swig_delete_Hid_report(void *obj) {
2852 Mag_server::Hid_report *arg1 = (Mag_server::Hid_report *) obj;
2855 static swig_lua_method swig_Mag_server_Hid_report_methods[] = {
2856 {"get", _wrap_Hid_report_get},
2857 {"set", _wrap_Hid_report_set},
2858 {"mt_get", _wrap_Hid_report_mt_get},
2859 {"mt_set", _wrap_Hid_report_mt_set},
2860 {"submit_mt", _wrap_Hid_report_submit_mt},
2861 {"get_vals", _wrap_Hid_report_get_vals},
2862 {"get_mt_vals", _wrap_Hid_report_get_mt_vals},
2863 {"add_key", _wrap_Hid_report_add_key},
2864 {"get_key_event", _wrap_Hid_report_get_key_event},
2865 {"find_key_event", _wrap_Hid_report_find_key_event},
2866 {"remove_key_event", _wrap_Hid_report_remove_key_event},
2867 {"sync", _wrap_Hid_report_sync},
2868 {"time", _wrap_Hid_report_time},
2869 {"clear", _wrap_Hid_report_clear},
2870 {"device_id", _wrap_Hid_report_device_id},
2871 {"abs_infos", _wrap_Hid_report_abs_infos},
2872 {"set_abs_info", _wrap_Hid_report_set_abs_info},
2873 {"__getitem", _wrap_Hid_report___getitem},
2876 static swig_lua_attribute swig_Mag_server_Hid_report_attributes[] = {
2879 static swig_lua_class *swig_Mag_server_Hid_report_bases[] = {0};
2880 static const char *swig_Mag_server_Hid_report_base_names[] = {0};
2881 static swig_lua_class _wrap_class_Mag_server_Hid_report = { "Hid_report", &SWIGTYPE_p_Mag_server__Hid_report,_wrap_new_Hid_report, swig_delete_Hid_report, swig_Mag_server_Hid_report_methods, swig_Mag_server_Hid_report_attributes, swig_Mag_server_Hid_report_bases, swig_Mag_server_Hid_report_base_names };
2883 static int _wrap_User_state_set_pointer(lua_State* L) { int SWIG_arg = 0;
2884 Mag_server::User_state *arg1 = (Mag_server::User_state *) 0 ; int arg2 ; int arg3 ; bool arg4 ;
2885 SWIG_check_num_args("Mag_server::User_state::set_pointer",4,4)
2886 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::User_state::set_pointer",1,"Mag_server::User_state *");
2887 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::User_state::set_pointer",2,"int");
2888 if(!lua_isnumber(L,3)) SWIG_fail_arg("Mag_server::User_state::set_pointer",3,"int");
2889 if(!lua_isboolean(L,4)) SWIG_fail_arg("Mag_server::User_state::set_pointer",4,"bool");
2890 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__User_state,0))){
2891 SWIG_fail_ptr("User_state_set_pointer",1,SWIGTYPE_p_Mag_server__User_state); } arg2 = (int)lua_tointeger(L, 2);
2892 arg3 = (int)lua_tointeger(L, 3); arg4 = (lua_toboolean(L, 4)!=0); (arg1)->set_pointer(arg2,arg3,arg4); return SWIG_arg;
2893 if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2894 static int _wrap_User_state_set_kbd_focus(lua_State* L) { int SWIG_arg = 0;
2895 Mag_server::User_state *arg1 = (Mag_server::User_state *) 0 ; Mag_server::View_proxy *arg2 = (Mag_server::View_proxy *) 0 ;
2896 bool result; SWIG_check_num_args("Mag_server::User_state::set_kbd_focus",2,2)
2897 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::User_state::set_kbd_focus",1,"Mag_server::User_state *");
2898 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Mag_server::User_state::set_kbd_focus",2,"Mag_server::View_proxy *");
2899 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__User_state,0))){
2900 SWIG_fail_ptr("User_state_set_kbd_focus",1,SWIGTYPE_p_Mag_server__User_state); }
2901 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Mag_server__View_proxy,0))){
2902 SWIG_fail_ptr("User_state_set_kbd_focus",2,SWIGTYPE_p_Mag_server__View_proxy); }
2903 result = (bool)Mag_server_User_state_set_kbd_focus(arg1,arg2); lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
2904 return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2905 static int _wrap_User_state_post_event(lua_State* L) { int SWIG_arg = 0;
2906 Mag_server::User_state *arg1 = (Mag_server::User_state *) 0 ; Mag_server::View_proxy *arg2 = (Mag_server::View_proxy *) 0 ;
2907 Mag_server::Hid_report *arg3 = (Mag_server::Hid_report *) 0 ; bool arg4 ; bool arg5 ;
2908 SWIG_check_num_args("Mag_server::User_state::post_event",5,5)
2909 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::User_state::post_event",1,"Mag_server::User_state *");
2910 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Mag_server::User_state::post_event",2,"Mag_server::View_proxy *");
2911 if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("Mag_server::User_state::post_event",3,"Mag_server::Hid_report *");
2912 if(!lua_isboolean(L,4)) SWIG_fail_arg("Mag_server::User_state::post_event",4,"bool");
2913 if(!lua_isboolean(L,5)) SWIG_fail_arg("Mag_server::User_state::post_event",5,"bool");
2914 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__User_state,0))){
2915 SWIG_fail_ptr("User_state_post_event",1,SWIGTYPE_p_Mag_server__User_state); }
2916 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Mag_server__View_proxy,0))){
2917 SWIG_fail_ptr("User_state_post_event",2,SWIGTYPE_p_Mag_server__View_proxy); }
2918 if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_Mag_server__Hid_report,0))){
2919 SWIG_fail_ptr("User_state_post_event",3,SWIGTYPE_p_Mag_server__Hid_report); } arg4 = (lua_toboolean(L, 4)!=0);
2920 arg5 = (lua_toboolean(L, 5)!=0); Mag_server_User_state_post_event(arg1,arg2,arg3,arg4,arg5); return SWIG_arg; if(0) SWIG_fail;
2921 fail: lua_error(L); return SWIG_arg; }
2922 static int _wrap_User_state_toggle_mode(lua_State* L) { int SWIG_arg = 0;
2923 Mag_server::User_state *arg1 = (Mag_server::User_state *) 0 ; Mag_server::Mode::Mode_flag arg2 ;
2924 SWIG_check_num_args("Mag_server::User_state::toggle_mode",2,2)
2925 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::User_state::toggle_mode",1,"Mag_server::User_state *");
2926 if(!lua_isnumber(L,2)) SWIG_fail_arg("Mag_server::User_state::toggle_mode",2,"Mag_server::Mode::Mode_flag");
2927 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__User_state,0))){
2928 SWIG_fail_ptr("User_state_toggle_mode",1,SWIGTYPE_p_Mag_server__User_state); }
2929 arg2 = (Mag_server::Mode::Mode_flag)(int)lua_tointeger(L, 2); Mag_server_User_state_toggle_mode(arg1,arg2); return SWIG_arg;
2930 if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2931 static int _wrap_User_state_find_pointed_view(lua_State* L) { int SWIG_arg = 0;
2932 Mag_server::User_state *arg1 = (Mag_server::User_state *) 0 ; Mag_server::View_proxy *arg2 = (Mag_server::View_proxy *) 0 ;
2933 SWIG_check_num_args("Mag_server::User_state::find_pointed_view",2,2)
2934 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::User_state::find_pointed_view",1,"Mag_server::User_state *");
2935 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Mag_server::User_state::find_pointed_view",2,"Mag_server::View_proxy *");
2936 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__User_state,0))){
2937 SWIG_fail_ptr("User_state_find_pointed_view",1,SWIGTYPE_p_Mag_server__User_state); }
2938 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Mag_server__View_proxy,0))){
2939 SWIG_fail_ptr("User_state_find_pointed_view",2,SWIGTYPE_p_Mag_server__View_proxy); }
2940 Mag_server_User_state_find_pointed_view(arg1,arg2); return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2941 static int _wrap_User_state_screen_size(lua_State* L) { int SWIG_arg = 0;
2942 Mag_server::User_state *arg1 = (Mag_server::User_state *) 0 ; int *arg2 = (int *) 0 ; int *arg3 = (int *) 0 ; int temp2 ;
2943 int temp3 ; arg2 = &temp2; arg3 = &temp3; SWIG_check_num_args("Mag_server::User_state::screen_size",1,1)
2944 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::User_state::screen_size",1,"Mag_server::User_state *");
2945 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__User_state,0))){
2946 SWIG_fail_ptr("User_state_screen_size",1,SWIGTYPE_p_Mag_server__User_state); }
2947 Mag_server_User_state_screen_size(arg1,arg2,arg3); lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
2948 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2949 static void swig_delete_User_state(void *obj) {
2950 Mag_server::User_state *arg1 = (Mag_server::User_state *) obj;
2953 static swig_lua_method swig_Mag_server_User_state_methods[] = {
2954 {"set_pointer", _wrap_User_state_set_pointer},
2955 {"set_kbd_focus", _wrap_User_state_set_kbd_focus},
2956 {"post_event", _wrap_User_state_post_event},
2957 {"toggle_mode", _wrap_User_state_toggle_mode},
2958 {"find_pointed_view", _wrap_User_state_find_pointed_view},
2959 {"screen_size", _wrap_User_state_screen_size},
2962 static swig_lua_attribute swig_Mag_server_User_state_attributes[] = {
2965 static swig_lua_class *swig_Mag_server_User_state_bases[] = {0};
2966 static const char *swig_Mag_server_User_state_base_names[] = {0};
2967 static swig_lua_class _wrap_class_Mag_server_User_state = { "User_state", &SWIGTYPE_p_Mag_server__User_state,0, swig_delete_User_state, swig_Mag_server_User_state_methods, swig_Mag_server_User_state_attributes, swig_Mag_server_User_state_bases, swig_Mag_server_User_state_base_names };
2969 static int _wrap_new_View_proxy(lua_State* L) { int SWIG_arg = 0; Mag_server::User_state *arg1 = (Mag_server::User_state *) 0 ;
2970 Mag_server::View_proxy *result = 0 ; SWIG_check_num_args("Mag_server::View_proxy::View_proxy",1,1)
2971 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::View_proxy::View_proxy",1,"Mag_server::User_state *");
2972 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__User_state,0))){
2973 SWIG_fail_ptr("new_View_proxy",1,SWIGTYPE_p_Mag_server__User_state); }
2974 result = (Mag_server::View_proxy *)new Mag_server::View_proxy(arg1);
2975 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__View_proxy,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
2976 lua_error(L); return SWIG_arg; }
2977 static int _wrap_View_proxy_set(lua_State* L) { int SWIG_arg = 0; Mag_server::View_proxy *arg1 = (Mag_server::View_proxy *) 0 ;
2978 Mag_server::View_proxy *arg2 = (Mag_server::View_proxy *) 0 ; SWIG_check_num_args("Mag_server::View_proxy::set",2,2)
2979 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::View_proxy::set",1,"Mag_server::View_proxy *");
2980 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Mag_server::View_proxy::set",2,"Mag_server::View_proxy *");
2981 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__View_proxy,0))){
2982 SWIG_fail_ptr("View_proxy_set",1,SWIGTYPE_p_Mag_server__View_proxy); }
2983 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Mag_server__View_proxy,0))){
2984 SWIG_fail_ptr("View_proxy_set",2,SWIGTYPE_p_Mag_server__View_proxy); } Mag_server_View_proxy_set(arg1,arg2);
2985 return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
2986 static void swig_delete_View_proxy(void *obj) {
2987 Mag_server::View_proxy *arg1 = (Mag_server::View_proxy *) obj;
2990 static swig_lua_method swig_Mag_server_View_proxy_methods[] = {
2991 {"set", _wrap_View_proxy_set},
2994 static swig_lua_attribute swig_Mag_server_View_proxy_attributes[] = {
2997 static swig_lua_class *swig_Mag_server_View_proxy_bases[] = {0};
2998 static const char *swig_Mag_server_View_proxy_base_names[] = {0};
2999 static swig_lua_class _wrap_class_Mag_server_View_proxy = { "View_proxy", &SWIGTYPE_p_Mag_server__View_proxy,_wrap_new_View_proxy, swig_delete_View_proxy, swig_Mag_server_View_proxy_methods, swig_Mag_server_View_proxy_attributes, swig_Mag_server_View_proxy_bases, swig_Mag_server_View_proxy_base_names };
3001 static int _wrap_Input_source_get_stream_info(lua_State* L) { int SWIG_arg = 0;
3002 Mag_server::Input_source *arg1 = (Mag_server::Input_source *) 0 ; l4_umword_t arg2 ;
3003 L4Re::Event_stream_info **arg3 = (L4Re::Event_stream_info **) 0 ; L4Re::Event_stream_info *temp3 ; int result;
3004 temp3 = (L4Re::Event_stream_info *)0; arg3 = &temp3; SWIG_check_num_args("Mag_server::Input_source::get_stream_info",2,2)
3005 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Input_source::get_stream_info",1,"Mag_server::Input_source *");
3006 if(!lua_isuserdata(L,2)) SWIG_fail_arg("Mag_server::Input_source::get_stream_info",2,"l4_umword_t");
3007 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Input_source,0))){
3008 SWIG_fail_ptr("Input_source_get_stream_info",1,SWIGTYPE_p_Mag_server__Input_source); }
3009 arg2 = (l4_umword_t)lua_touserdata(L, 2); result = (int)Mag_server_Input_source_get_stream_info(arg1,arg2,arg3);
3010 lua_pushinteger(L, result); SWIG_arg++; SWIG_NewPointerObj(L,*arg3,SWIGTYPE_p_L4Re__Event_stream_info,1); SWIG_arg++;
3011 return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
3012 static int _wrap_Input_source_get_abs_info(lua_State* L) { int SWIG_arg = 0;
3013 Mag_server::Input_source *arg1 = (Mag_server::Input_source *) 0 ; l4_umword_t arg2 ; unsigned int arg3 ;
3014 Mag_server::Axis_info **arg4 = (Mag_server::Axis_info **) 0 ; Mag_server::Axis_info *temp4 ; int result;
3015 temp4 = (Mag_server::Axis_info *)0; arg4 = &temp4; SWIG_check_num_args("Mag_server::Input_source::get_abs_info",3,3)
3016 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Mag_server::Input_source::get_abs_info",1,"Mag_server::Input_source *");
3017 if(!lua_isuserdata(L,2)) SWIG_fail_arg("Mag_server::Input_source::get_abs_info",2,"l4_umword_t");
3018 if(!lua_isnumber(L,3)) SWIG_fail_arg("Mag_server::Input_source::get_abs_info",3,"unsigned int");
3019 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Mag_server__Input_source,0))){
3020 SWIG_fail_ptr("Input_source_get_abs_info",1,SWIGTYPE_p_Mag_server__Input_source); }
3021 arg2 = (l4_umword_t)lua_touserdata(L, 2); SWIG_contract_assert((lua_tointeger(L,3)>=0),"number must not be negative")
3022 arg3 = (unsigned int)lua_tointeger(L, 3); result = (int)Mag_server_Input_source_get_abs_info(arg1,arg2,arg3,arg4);
3023 lua_pushinteger(L, result); SWIG_arg++; SWIG_NewPointerObj(L,*arg4,SWIGTYPE_p_Mag_server__Axis_info,1); SWIG_arg++;
3024 return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
3025 static void swig_delete_Input_source(void *obj) {
3026 Mag_server::Input_source *arg1 = (Mag_server::Input_source *) obj;
3029 static swig_lua_method swig_Mag_server_Input_source_methods[] = {
3030 {"get_stream_info", _wrap_Input_source_get_stream_info},
3031 {"get_abs_info", _wrap_Input_source_get_abs_info},
3034 static swig_lua_attribute swig_Mag_server_Input_source_attributes[] = {
3037 static swig_lua_class *swig_Mag_server_Input_source_bases[] = {0};
3038 static const char *swig_Mag_server_Input_source_base_names[] = {0};
3039 static swig_lua_class _wrap_class_Mag_server_Input_source = { "Input_source", &SWIGTYPE_p_Mag_server__Input_source,0, swig_delete_Input_source, swig_Mag_server_Input_source_methods, swig_Mag_server_Input_source_attributes, swig_Mag_server_Input_source_bases, swig_Mag_server_Input_source_base_names };
3041 static int _wrap_get_user_state(lua_State* L) { int SWIG_arg = 0; Mag_server::User_state *result = 0 ;
3042 SWIG_check_num_args("get_user_state",0,0) result = (Mag_server::User_state *)get_user_state();
3043 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Mag_server__User_state,0); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail:
3044 lua_error(L); return SWIG_arg; }
3049 static const struct luaL_Reg swig_commands[] = {
3050 { "get_user_state", _wrap_get_user_state},
3054 static swig_lua_var_info swig_variables[] = {
3058 static swig_lua_const_info swig_constants[] = {
3062 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
3064 static swig_type_info _swigt__p_L4Re__Event_stream_info = {"_p_L4Re__Event_stream_info", "L4Re::Event_stream_info *", 0, 0, (void*)&_wrap_class_L4Re_Event_stream_info, 0};
3065 static swig_type_info _swigt__p_Mag_server__Axis_buf = {"_p_Mag_server__Axis_buf", "Mag_server::Axis_buf *", 0, 0, (void*)&_wrap_class_Mag_server_Axis_buf, 0};
3066 static swig_type_info _swigt__p_Mag_server__Axis_info = {"_p_Mag_server__Axis_info", "Mag_server::Axis_info *", 0, 0, (void*)&_wrap_class_Mag_server_Axis_info, 0};
3067 static swig_type_info _swigt__p_Mag_server__Axis_info_vector = {"_p_Mag_server__Axis_info_vector", "Mag_server::Axis_info_vector *", 0, 0, (void*)&_wrap_class_Mag_server_Axis_info_vector, 0};
3068 static swig_type_info _swigt__p_Mag_server__Hid_report = {"_p_Mag_server__Hid_report", "Mag_server::Hid_report *", 0, 0, (void*)&_wrap_class_Mag_server_Hid_report, 0};
3069 static swig_type_info _swigt__p_Mag_server__Input_source = {"_p_Mag_server__Input_source", "Mag_server::Input_source *", 0, 0, (void*)&_wrap_class_Mag_server_Input_source, 0};
3070 static swig_type_info _swigt__p_Mag_server__User_state = {"_p_Mag_server__User_state", "Mag_server::User_state *", 0, 0, (void*)&_wrap_class_Mag_server_User_state, 0};
3071 static swig_type_info _swigt__p_Mag_server__ValuatorT_int_t = {"_p_Mag_server__ValuatorT_int_t", "Mag_server::Valuator< int > *", 0, 0, (void*)&_wrap_class_Mag_server_Valuator_Sl_int_Sg_, 0};
3072 static swig_type_info _swigt__p_Mag_server__ValueT_int_t = {"_p_Mag_server__ValueT_int_t", "Mag_server::Value< int > *", 0, 0, (void*)&_wrap_class_Mag_server_Value_Sl_int_Sg_, 0};
3073 static swig_type_info _swigt__p_Mag_server__View_proxy = {"_p_Mag_server__View_proxy", "Mag_server::View_proxy *", 0, 0, (void*)&_wrap_class_Mag_server_View_proxy, 0};
3074 static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0};
3075 static swig_type_info _swigt__p_l4_int32_t = {"_p_l4_int32_t", "l4_int32_t *", 0, 0, (void*)0, 0};
3076 static swig_type_info _swigt__p_l4_umword_t = {"_p_l4_umword_t", "l4_umword_t *", 0, 0, (void*)0, 0};
3077 static swig_type_info _swigt__p_l4re_event_absinfo_t = {"_p_l4re_event_absinfo_t", "L4Re::Event_absinfo *|l4re_event_absinfo_t *", 0, 0, (void*)0, 0};
3078 static swig_type_info _swigt__p_l4re_event_stream_id_t = {"_p_l4re_event_stream_id_t", "l4re_event_stream_id_t *|L4Re::Event_stream_id *", 0, 0, (void*)0, 0};
3079 static swig_type_info _swigt__p_p_L4Re__Event_stream_info = {"_p_p_L4Re__Event_stream_info", "L4Re::Event_stream_info **", 0, 0, (void*)0, 0};
3080 static swig_type_info _swigt__p_p_Mag_server__Axis_info = {"_p_p_Mag_server__Axis_info", "Mag_server::Axis_info **", 0, 0, (void*)0, 0};
3081 static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *", 0, 0, (void*)0, 0};
3083 static swig_type_info *swig_type_initial[] = {
3084 &_swigt__p_L4Re__Event_stream_info,
3085 &_swigt__p_Mag_server__Axis_buf,
3086 &_swigt__p_Mag_server__Axis_info,
3087 &_swigt__p_Mag_server__Axis_info_vector,
3088 &_swigt__p_Mag_server__Hid_report,
3089 &_swigt__p_Mag_server__Input_source,
3090 &_swigt__p_Mag_server__User_state,
3091 &_swigt__p_Mag_server__ValuatorT_int_t,
3092 &_swigt__p_Mag_server__ValueT_int_t,
3093 &_swigt__p_Mag_server__View_proxy,
3095 &_swigt__p_l4_int32_t,
3096 &_swigt__p_l4_umword_t,
3097 &_swigt__p_l4re_event_absinfo_t,
3098 &_swigt__p_l4re_event_stream_id_t,
3099 &_swigt__p_p_L4Re__Event_stream_info,
3100 &_swigt__p_p_Mag_server__Axis_info,
3101 &_swigt__p_unsigned_int,
3104 static swig_cast_info _swigc__p_L4Re__Event_stream_info[] = { {&_swigt__p_L4Re__Event_stream_info, 0, 0, 0},{0, 0, 0, 0}};
3105 static swig_cast_info _swigc__p_Mag_server__Axis_buf[] = { {&_swigt__p_Mag_server__Axis_buf, 0, 0, 0},{0, 0, 0, 0}};
3106 static swig_cast_info _swigc__p_Mag_server__Axis_info[] = { {&_swigt__p_Mag_server__Axis_info, 0, 0, 0},{0, 0, 0, 0}};
3107 static swig_cast_info _swigc__p_Mag_server__Axis_info_vector[] = { {&_swigt__p_Mag_server__Axis_info_vector, 0, 0, 0},{0, 0, 0, 0}};
3108 static swig_cast_info _swigc__p_Mag_server__Hid_report[] = { {&_swigt__p_Mag_server__Hid_report, 0, 0, 0},{0, 0, 0, 0}};
3109 static swig_cast_info _swigc__p_Mag_server__Input_source[] = { {&_swigt__p_Mag_server__Input_source, 0, 0, 0},{0, 0, 0, 0}};
3110 static swig_cast_info _swigc__p_Mag_server__User_state[] = { {&_swigt__p_Mag_server__User_state, 0, 0, 0},{0, 0, 0, 0}};
3111 static swig_cast_info _swigc__p_Mag_server__ValuatorT_int_t[] = { {&_swigt__p_Mag_server__ValuatorT_int_t, 0, 0, 0},{0, 0, 0, 0}};
3112 static swig_cast_info _swigc__p_Mag_server__ValueT_int_t[] = { {&_swigt__p_Mag_server__ValueT_int_t, 0, 0, 0},{0, 0, 0, 0}};
3113 static swig_cast_info _swigc__p_Mag_server__View_proxy[] = { {&_swigt__p_Mag_server__View_proxy, 0, 0, 0},{0, 0, 0, 0}};
3114 static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
3115 static swig_cast_info _swigc__p_l4_int32_t[] = { {&_swigt__p_l4_int32_t, 0, 0, 0},{0, 0, 0, 0}};
3116 static swig_cast_info _swigc__p_l4_umword_t[] = { {&_swigt__p_l4_umword_t, 0, 0, 0},{0, 0, 0, 0}};
3117 static swig_cast_info _swigc__p_l4re_event_absinfo_t[] = { {&_swigt__p_l4re_event_absinfo_t, 0, 0, 0},{0, 0, 0, 0}};
3118 static swig_cast_info _swigc__p_l4re_event_stream_id_t[] = { {&_swigt__p_l4re_event_stream_id_t, 0, 0, 0},{0, 0, 0, 0}};
3119 static swig_cast_info _swigc__p_p_L4Re__Event_stream_info[] = { {&_swigt__p_p_L4Re__Event_stream_info, 0, 0, 0},{0, 0, 0, 0}};
3120 static swig_cast_info _swigc__p_p_Mag_server__Axis_info[] = { {&_swigt__p_p_Mag_server__Axis_info, 0, 0, 0},{0, 0, 0, 0}};
3121 static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
3123 static swig_cast_info *swig_cast_initial[] = {
3124 _swigc__p_L4Re__Event_stream_info,
3125 _swigc__p_Mag_server__Axis_buf,
3126 _swigc__p_Mag_server__Axis_info,
3127 _swigc__p_Mag_server__Axis_info_vector,
3128 _swigc__p_Mag_server__Hid_report,
3129 _swigc__p_Mag_server__Input_source,
3130 _swigc__p_Mag_server__User_state,
3131 _swigc__p_Mag_server__ValuatorT_int_t,
3132 _swigc__p_Mag_server__ValueT_int_t,
3133 _swigc__p_Mag_server__View_proxy,
3135 _swigc__p_l4_int32_t,
3136 _swigc__p_l4_umword_t,
3137 _swigc__p_l4re_event_absinfo_t,
3138 _swigc__p_l4re_event_stream_id_t,
3139 _swigc__p_p_L4Re__Event_stream_info,
3140 _swigc__p_p_Mag_server__Axis_info,
3141 _swigc__p_unsigned_int,
3145 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
3147 /* -----------------------------------------------------------------------------
3148 * Type initialization:
3149 * This problem is tough by the requirement that no dynamic
3150 * memory is used. Also, since swig_type_info structures store pointers to
3151 * swig_cast_info structures and swig_cast_info structures store pointers back
3152 * to swig_type_info structures, we need some lookup code at initialization.
3153 * The idea is that swig generates all the structures that are needed.
3154 * The runtime then collects these partially filled structures.
3155 * The SWIG_InitializeModule function takes these initial arrays out of
3156 * swig_module, and does all the lookup, filling in the swig_module.types
3157 * array with the correct data and linking the correct swig_cast_info
3158 * structures together.
3160 * The generated swig_type_info structures are assigned staticly to an initial
3161 * array. We just loop through that array, and handle each type individually.
3162 * First we lookup if this type has been already loaded, and if so, use the
3163 * loaded structure instead of the generated one. Then we have to fill in the
3164 * cast linked list. The cast data is initially stored in something like a
3165 * two-dimensional array. Each row corresponds to a type (there are the same
3166 * number of rows as there are in the swig_type_initial array). Each entry in
3167 * a column is one of the swig_cast_info structures for that type.
3168 * The cast_initial array is actually an array of arrays, because each row has
3169 * a variable number of columns. So to actually build the cast linked list,
3170 * we find the array of casts associated with the type, and loop through it
3171 * adding the casts to the list. The one last trick we need to do is making
3172 * sure the type pointer in the swig_cast_info struct is correct.
3174 * First off, we lookup the cast->type name to see if it is already loaded.
3175 * There are three cases to handle:
3176 * 1) If the cast->type has already been loaded AND the type we are adding
3177 * casting info to has not been loaded (it is in this module), THEN we
3178 * replace the cast->type pointer with the type pointer that has already
3180 * 2) If BOTH types (the one we are adding casting info to, and the
3181 * cast->type) are loaded, THEN the cast info has already been loaded by
3182 * the previous module so we just ignore it.
3183 * 3) Finally, if cast->type has not already been loaded, then we add that
3184 * swig_cast_info to the linked list (because the cast->type) pointer will
3186 * ----------------------------------------------------------------------------- */
3189 // removed: extern "C" {
3196 #define SWIGRUNTIME_DEBUG
3201 SWIG_InitializeModule(void *clientdata) {
3203 swig_module_info *module_head, *iter;
3206 clientdata = clientdata;
3208 /* check to see if the circular list has been setup, if not, set it up */
3209 if (swig_module.next==0) {
3210 /* Initialize the swig_module */
3211 swig_module.type_initial = swig_type_initial;
3212 swig_module.cast_initial = swig_cast_initial;
3213 swig_module.next = &swig_module;
3219 /* Try and load any already created modules */
3220 module_head = SWIG_GetModule(clientdata);
3222 /* This is the first module loaded for this interpreter */
3223 /* so set the swig module into the interpreter */
3224 SWIG_SetModule(clientdata, &swig_module);
3225 module_head = &swig_module;
3227 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
3231 if (iter==&swig_module) {
3236 } while (iter!= module_head);
3238 /* if the is found in the list, then all is done and we may leave */
3240 /* otherwise we must add out module into the list */
3241 swig_module.next = module_head->next;
3242 module_head->next = &swig_module;
3245 /* When multiple interpeters are used, a module could have already been initialized in
3246 a different interpreter, but not yet have a pointer in this interpreter.
3247 In this case, we do not want to continue adding types... everything should be
3249 if (init == 0) return;
3251 /* Now work on filling in swig_module.types */
3252 #ifdef SWIGRUNTIME_DEBUG
3253 printf("SWIG_InitializeModule: size %d\n", swig_module.size);
3255 for (i = 0; i < swig_module.size; ++i) {
3256 swig_type_info *type = 0;
3257 swig_type_info *ret;
3258 swig_cast_info *cast;
3260 #ifdef SWIGRUNTIME_DEBUG
3261 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
3264 /* if there is another module already loaded */
3265 if (swig_module.next != &swig_module) {
3266 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
3269 /* Overwrite clientdata field */
3270 #ifdef SWIGRUNTIME_DEBUG
3271 printf("SWIG_InitializeModule: found type %s\n", type->name);
3273 if (swig_module.type_initial[i]->clientdata) {
3274 type->clientdata = swig_module.type_initial[i]->clientdata;
3275 #ifdef SWIGRUNTIME_DEBUG
3276 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
3280 type = swig_module.type_initial[i];
3283 /* Insert casting types */
3284 cast = swig_module.cast_initial[i];
3285 while (cast->type) {
3287 /* Don't need to add information already in the list */
3289 #ifdef SWIGRUNTIME_DEBUG
3290 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
3292 if (swig_module.next != &swig_module) {
3293 ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
3294 #ifdef SWIGRUNTIME_DEBUG
3295 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
3299 if (type == swig_module.type_initial[i]) {
3300 #ifdef SWIGRUNTIME_DEBUG
3301 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
3306 /* Check for casting already in the list */
3307 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
3308 #ifdef SWIGRUNTIME_DEBUG
3309 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
3311 if (!ocast) ret = 0;
3316 #ifdef SWIGRUNTIME_DEBUG
3317 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
3320 type->cast->prev = cast;
3321 cast->next = type->cast;
3327 /* Set entry in modules->types array equal to the type */
3328 swig_module.types[i] = type;
3330 swig_module.types[i] = 0;
3332 #ifdef SWIGRUNTIME_DEBUG
3333 printf("**** SWIG_InitializeModule: Cast List ******\n");
3334 for (i = 0; i < swig_module.size; ++i) {
3336 swig_cast_info *cast = swig_module.cast_initial[i];
3337 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
3338 while (cast->type) {
3339 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
3343 printf("---- Total casts: %d\n",j);
3345 printf("**** SWIG_InitializeModule: Cast List ******\n");
3349 /* This function will propagate the clientdata field of type to
3350 * any new swig_type_info structures that have been added into the list
3351 * of equivalent types. It is like calling
3352 * SWIG_TypeClientData(type, clientdata) a second time.
3355 SWIG_PropagateClientData(void) {
3357 swig_cast_info *equiv;
3358 static int init_run = 0;
3360 if (init_run) return;
3363 for (i = 0; i < swig_module.size; i++) {
3364 if (swig_module.types[i]->clientdata) {
3365 equiv = swig_module.types[i]->cast;
3367 if (!equiv->converter) {
3368 if (equiv->type && !equiv->type->clientdata)
3369 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
3371 equiv = equiv->next;
3386 /* Forward declaration of where the user's %init{} gets inserted */
3387 void SWIG_init_user(lua_State* L );
3390 // removed: extern "C" {
3392 /* this is the initialization function
3393 added at the very end of the code
3394 the function is always called SWIG_init, but an earlier #define will rename it
3396 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
3397 LUALIB_API int SWIG_init(lua_State* L)
3399 SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
3402 #if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) /* valid for both Lua and eLua */
3404 /* start with global table */
3405 lua_pushglobaltable (L);
3406 /* SWIG's internal initalisation */
3407 SWIG_InitializeModule((void*)L);
3408 SWIG_PropagateClientData();
3411 #if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
3412 /* add a global fn */
3413 SWIG_Lua_add_function(L,"swig_type",SWIG_Lua_type);
3414 SWIG_Lua_add_function(L,"swig_equals",SWIG_Lua_equal);
3415 /* begin the module (its a table with the same name as the module) */
3416 SWIG_Lua_module_begin(L,SWIG_name);
3417 /* add commands/functions */
3418 for (i = 0; swig_commands[i].name; i++){
3419 SWIG_Lua_module_add_function(L,swig_commands[i].name,swig_commands[i].func);
3422 for (i = 0; swig_variables[i].name; i++){
3423 SWIG_Lua_module_add_variable(L,swig_variables[i].name,swig_variables[i].get,swig_variables[i].set);
3427 #if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
3428 /* set up base class pointers (the hierarchy) */
3429 for (i = 0; swig_types[i]; i++){
3430 if (swig_types[i]->clientdata){
3431 SWIG_Lua_init_base_class(L,(swig_lua_class*)(swig_types[i]->clientdata));
3434 /* additional registration structs & classes in lua */
3435 for (i = 0; swig_types[i]; i++){
3436 if (swig_types[i]->clientdata){
3437 SWIG_Lua_class_register(L,(swig_lua_class*)(swig_types[i]->clientdata));
3442 #if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
3444 SWIG_Lua_InstallConstants(L,swig_constants);
3447 #if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
3448 /* invoke user-specific initialization */
3451 /* Note: We do not clean up the stack here (Lua will do this for us). At this
3452 point, we have the globals table and out module table on the stack. Returning
3453 one value makes the module table the result of the require command. */
3465 const char* SWIG_LUACODE=
3468 void SWIG_init_user(lua_State* L)
3470 /* exec Lua code if applicable */
3471 SWIG_Lua_dostring(L,SWIG_LUACODE);