annotate NewUI/Core/UIControlModule_wrap.cxx @ 2073:38bf1c70fc70

some text rendering fix
author Gloval
date Wed, 04 Dec 2013 08:50:24 +0400
parents 7a9477135943
children d8b40e0fa21d
rev   line source
2037
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1 /* ----------------------------------------------------------------------------
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2 * This file was automatically generated by SWIG (http://www.swig.org).
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
3 * Version 2.0.11
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
4 *
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
5 * This file is not intended to be easily readable and contains a number of
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
6 * coding conventions designed to improve portability and efficiency. Do not make
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
7 * changes to this file unless you know what you are doing--modify the SWIG
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
8 * interface file instead.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
9 * ----------------------------------------------------------------------------- */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
10
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
11 #define SWIGLUA
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
12 #define SWIG_LUA_TARGET SWIG_LUA_FLAVOR_LUA
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
13 #define SWIG_LUA_MODULE_GLOBAL
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
14
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
15
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
16 #ifdef __cplusplus
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
17 /* SwigValueWrapper is described in swig.swg */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
18 template<typename T> class SwigValueWrapper {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
19 struct SwigMovePointer {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
20 T *ptr;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
21 SwigMovePointer(T *p) : ptr(p) { }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
22 ~SwigMovePointer() { delete ptr; }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
23 SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
24 } pointer;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
25 SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
26 SwigValueWrapper(const SwigValueWrapper<T>& rhs);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
27 public:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
28 SwigValueWrapper() : pointer(0) { }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
29 SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
30 operator T&() const { return *pointer.ptr; }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
31 T *operator&() { return pointer.ptr; }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
32 };
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
33
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
34 template <typename T> T SwigValueInit() {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
35 return T();
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
36 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
37 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
38
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
39 /* -----------------------------------------------------------------------------
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
40 * This section contains generic SWIG labels for method/variable
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
41 * declarations/attributes, and other compiler dependent labels.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
42 * ----------------------------------------------------------------------------- */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
43
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
44 /* template workaround for compilers that cannot correctly implement the C++ standard */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
45 #ifndef SWIGTEMPLATEDISAMBIGUATOR
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
46 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
47 # define SWIGTEMPLATEDISAMBIGUATOR template
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
48 # elif defined(__HP_aCC)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
49 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
50 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
51 # define SWIGTEMPLATEDISAMBIGUATOR template
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
52 # else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
53 # define SWIGTEMPLATEDISAMBIGUATOR
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
54 # endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
55 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
56
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
57 /* inline attribute */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
58 #ifndef SWIGINLINE
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
59 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
60 # define SWIGINLINE inline
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
61 # else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
62 # define SWIGINLINE
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
63 # endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
64 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
65
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
66 /* attribute recognised by some compilers to avoid 'unused' warnings */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
67 #ifndef SWIGUNUSED
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
68 # if defined(__GNUC__)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
69 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
70 # define SWIGUNUSED __attribute__ ((__unused__))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
71 # else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
72 # define SWIGUNUSED
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
73 # endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
74 # elif defined(__ICC)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
75 # define SWIGUNUSED __attribute__ ((__unused__))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
76 # else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
77 # define SWIGUNUSED
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
78 # endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
79 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
80
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
81 #ifndef SWIG_MSC_UNSUPPRESS_4505
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
82 # if defined(_MSC_VER)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
83 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
84 # endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
85 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
86
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
87 #ifndef SWIGUNUSEDPARM
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
88 # ifdef __cplusplus
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
89 # define SWIGUNUSEDPARM(p)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
90 # else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
91 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
92 # endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
93 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
94
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
95 /* internal SWIG method */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
96 #ifndef SWIGINTERN
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
97 # define SWIGINTERN static SWIGUNUSED
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
98 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
99
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
100 /* internal inline SWIG method */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
101 #ifndef SWIGINTERNINLINE
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
102 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
103 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
104
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
105 /* exporting methods */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
106 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
107 # ifndef GCC_HASCLASSVISIBILITY
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
108 # define GCC_HASCLASSVISIBILITY
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
109 # endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
110 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
111
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
112 #ifndef SWIGEXPORT
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
113 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
114 # if defined(STATIC_LINKED)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
115 # define SWIGEXPORT
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
116 # else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
117 # define SWIGEXPORT __declspec(dllexport)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
118 # endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
119 # else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
120 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
121 # define SWIGEXPORT __attribute__ ((visibility("default")))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
122 # else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
123 # define SWIGEXPORT
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
124 # endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
125 # endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
126 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
127
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
128 /* calling conventions for Windows */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
129 #ifndef SWIGSTDCALL
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
130 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
131 # define SWIGSTDCALL __stdcall
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
132 # else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
133 # define SWIGSTDCALL
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
134 # endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
135 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
136
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
137 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
138 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
139 # define _CRT_SECURE_NO_DEPRECATE
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
140 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
141
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
142 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
143 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
144 # define _SCL_SECURE_NO_DEPRECATE
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
145 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
146
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
147
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
148 /* -----------------------------------------------------------------------------
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
149 * swigrun.swg
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
150 *
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
151 * This file contains generic C API SWIG runtime support for pointer
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
152 * type checking.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
153 * ----------------------------------------------------------------------------- */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
154
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
155 /* This should only be incremented when either the layout of swig_type_info changes,
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
156 or for whatever reason, the runtime changes incompatibly */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
157 #define SWIG_RUNTIME_VERSION "4"
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
158
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
159 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
160 #ifdef SWIG_TYPE_TABLE
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
161 # define SWIG_QUOTE_STRING(x) #x
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
162 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
163 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
164 #else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
165 # define SWIG_TYPE_TABLE_NAME
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
166 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
167
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
168 /*
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
169 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
170 creating a static or dynamic library from the SWIG runtime code.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
171 In 99.9% of the cases, SWIG just needs to declare them as 'static'.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
172
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
173 But only do this if strictly necessary, ie, if you have problems
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
174 with your compiler or suchlike.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
175 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
176
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
177 #ifndef SWIGRUNTIME
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
178 # define SWIGRUNTIME SWIGINTERN
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
179 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
180
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
181 #ifndef SWIGRUNTIMEINLINE
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
182 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
183 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
184
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
185 /* Generic buffer size */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
186 #ifndef SWIG_BUFFER_SIZE
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
187 # define SWIG_BUFFER_SIZE 1024
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
188 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
189
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
190 /* Flags for pointer conversions */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
191 #define SWIG_POINTER_DISOWN 0x1
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
192 #define SWIG_CAST_NEW_MEMORY 0x2
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
193
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
194 /* Flags for new pointer objects */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
195 #define SWIG_POINTER_OWN 0x1
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
196
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
197
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
198 /*
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
199 Flags/methods for returning states.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
200
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
201 The SWIG conversion methods, as ConvertPtr, return an integer
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
202 that tells if the conversion was successful or not. And if not,
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
203 an error code can be returned (see swigerrors.swg for the codes).
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
204
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
205 Use the following macros/flags to set or process the returning
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
206 states.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
207
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
208 In old versions of SWIG, code such as the following was usually written:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
209
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
210 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
211 // success code
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
212 } else {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
213 //fail code
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
214 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
215
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
216 Now you can be more explicit:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
217
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
218 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
219 if (SWIG_IsOK(res)) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
220 // success code
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
221 } else {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
222 // fail code
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
223 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
224
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
225 which is the same really, but now you can also do
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
226
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
227 Type *ptr;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
228 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
229 if (SWIG_IsOK(res)) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
230 // success code
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
231 if (SWIG_IsNewObj(res) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
232 ...
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
233 delete *ptr;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
234 } else {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
235 ...
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
236 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
237 } else {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
238 // fail code
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
239 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
240
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
241 I.e., now SWIG_ConvertPtr can return new objects and you can
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
242 identify the case and take care of the deallocation. Of course that
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
243 also requires SWIG_ConvertPtr to return new result values, such as
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
244
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
245 int SWIG_ConvertPtr(obj, ptr,...) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
246 if (<obj is ok>) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
247 if (<need new object>) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
248 *ptr = <ptr to new allocated object>;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
249 return SWIG_NEWOBJ;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
250 } else {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
251 *ptr = <ptr to old object>;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
252 return SWIG_OLDOBJ;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
253 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
254 } else {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
255 return SWIG_BADOBJ;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
256 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
257 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
258
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
259 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
260 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
261 SWIG errors code.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
262
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
263 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
264 allows to return the 'cast rank', for example, if you have this
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
265
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
266 int food(double)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
267 int fooi(int);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
268
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
269 and you call
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
270
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
271 food(1) // cast rank '1' (1 -> 1.0)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
272 fooi(1) // cast rank '0'
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
273
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
274 just use the SWIG_AddCast()/SWIG_CheckState()
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
275 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
276
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
277 #define SWIG_OK (0)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
278 #define SWIG_ERROR (-1)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
279 #define SWIG_IsOK(r) (r >= 0)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
280 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
281
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
282 /* The CastRankLimit says how many bits are used for the cast rank */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
283 #define SWIG_CASTRANKLIMIT (1 << 8)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
284 /* The NewMask denotes the object was created (using new/malloc) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
285 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
286 /* The TmpMask is for in/out typemaps that use temporal objects */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
287 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
288 /* Simple returning values */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
289 #define SWIG_BADOBJ (SWIG_ERROR)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
290 #define SWIG_OLDOBJ (SWIG_OK)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
291 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
292 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
293 /* Check, add and del mask methods */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
294 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
295 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
296 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
297 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
298 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
299 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
300
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
301 /* Cast-Rank Mode */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
302 #if defined(SWIG_CASTRANK_MODE)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
303 # ifndef SWIG_TypeRank
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
304 # define SWIG_TypeRank unsigned long
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
305 # endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
306 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
307 # define SWIG_MAXCASTRANK (2)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
308 # endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
309 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
310 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
311 SWIGINTERNINLINE int SWIG_AddCast(int r) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
312 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
313 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
314 SWIGINTERNINLINE int SWIG_CheckState(int r) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
315 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
316 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
317 #else /* no cast-rank mode */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
318 # define SWIG_AddCast(r) (r)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
319 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
320 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
321
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
322
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
323 #include <string.h>
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
324
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
325 #ifdef __cplusplus
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
326 extern "C" {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
327 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
328
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
329 typedef void *(*swig_converter_func)(void *, int *);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
330 typedef struct swig_type_info *(*swig_dycast_func)(void **);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
331
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
332 /* Structure to store information on one type */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
333 typedef struct swig_type_info {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
334 const char *name; /* mangled name of this type */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
335 const char *str; /* human readable name of this type */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
336 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
337 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
338 void *clientdata; /* language specific type data */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
339 int owndata; /* flag if the structure owns the clientdata */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
340 } swig_type_info;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
341
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
342 /* Structure to store a type and conversion function used for casting */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
343 typedef struct swig_cast_info {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
344 swig_type_info *type; /* pointer to type that is equivalent to this type */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
345 swig_converter_func converter; /* function to cast the void pointers */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
346 struct swig_cast_info *next; /* pointer to next cast in linked list */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
347 struct swig_cast_info *prev; /* pointer to the previous cast */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
348 } swig_cast_info;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
349
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
350 /* Structure used to store module information
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
351 * Each module generates one structure like this, and the runtime collects
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
352 * all of these structures and stores them in a circularly linked list.*/
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
353 typedef struct swig_module_info {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
354 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
355 size_t size; /* Number of types in this module */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
356 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
357 swig_type_info **type_initial; /* Array of initially generated type structures */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
358 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
359 void *clientdata; /* Language specific module data */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
360 } swig_module_info;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
361
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
362 /*
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
363 Compare two type names skipping the space characters, therefore
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
364 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
365
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
366 Return 0 when the two name types are equivalent, as in
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
367 strncmp, but skipping ' '.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
368 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
369 SWIGRUNTIME int
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
370 SWIG_TypeNameComp(const char *f1, const char *l1,
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
371 const char *f2, const char *l2) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
372 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
373 while ((*f1 == ' ') && (f1 != l1)) ++f1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
374 while ((*f2 == ' ') && (f2 != l2)) ++f2;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
375 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
376 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
377 return (int)((l1 - f1) - (l2 - f2));
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
378 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
379
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
380 /*
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
381 Check type equivalence in a name list like <name1>|<name2>|...
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
382 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
383 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
384 SWIGRUNTIME int
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
385 SWIG_TypeCmp(const char *nb, const char *tb) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
386 int equiv = 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
387 const char* te = tb + strlen(tb);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
388 const char* ne = nb;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
389 while (equiv != 0 && *ne) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
390 for (nb = ne; *ne; ++ne) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
391 if (*ne == '|') break;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
392 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
393 equiv = SWIG_TypeNameComp(nb, ne, tb, te);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
394 if (*ne) ++ne;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
395 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
396 return equiv;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
397 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
398
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
399 /*
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
400 Check type equivalence in a name list like <name1>|<name2>|...
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
401 Return 0 if not equal, 1 if equal
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
402 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
403 SWIGRUNTIME int
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
404 SWIG_TypeEquiv(const char *nb, const char *tb) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
405 return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
406 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
407
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
408 /*
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
409 Check the typename
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
410 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
411 SWIGRUNTIME swig_cast_info *
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
412 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
413 if (ty) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
414 swig_cast_info *iter = ty->cast;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
415 while (iter) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
416 if (strcmp(iter->type->name, c) == 0) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
417 if (iter == ty->cast)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
418 return iter;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
419 /* Move iter to the top of the linked list */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
420 iter->prev->next = iter->next;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
421 if (iter->next)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
422 iter->next->prev = iter->prev;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
423 iter->next = ty->cast;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
424 iter->prev = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
425 if (ty->cast) ty->cast->prev = iter;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
426 ty->cast = iter;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
427 return iter;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
428 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
429 iter = iter->next;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
430 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
431 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
432 return 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
433 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
434
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
435 /*
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
436 Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
437 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
438 SWIGRUNTIME swig_cast_info *
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
439 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
440 if (ty) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
441 swig_cast_info *iter = ty->cast;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
442 while (iter) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
443 if (iter->type == from) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
444 if (iter == ty->cast)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
445 return iter;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
446 /* Move iter to the top of the linked list */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
447 iter->prev->next = iter->next;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
448 if (iter->next)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
449 iter->next->prev = iter->prev;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
450 iter->next = ty->cast;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
451 iter->prev = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
452 if (ty->cast) ty->cast->prev = iter;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
453 ty->cast = iter;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
454 return iter;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
455 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
456 iter = iter->next;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
457 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
458 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
459 return 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
460 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
461
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
462 /*
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
463 Cast a pointer up an inheritance hierarchy
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
464 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
465 SWIGRUNTIMEINLINE void *
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
466 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
467 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
468 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
469
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
470 /*
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
471 Dynamic pointer casting. Down an inheritance hierarchy
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
472 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
473 SWIGRUNTIME swig_type_info *
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
474 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
475 swig_type_info *lastty = ty;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
476 if (!ty || !ty->dcast) return ty;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
477 while (ty && (ty->dcast)) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
478 ty = (*ty->dcast)(ptr);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
479 if (ty) lastty = ty;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
480 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
481 return lastty;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
482 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
483
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
484 /*
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
485 Return the name associated with this type
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
486 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
487 SWIGRUNTIMEINLINE const char *
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
488 SWIG_TypeName(const swig_type_info *ty) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
489 return ty->name;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
490 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
491
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
492 /*
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
493 Return the pretty name associated with this type,
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
494 that is an unmangled type name in a form presentable to the user.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
495 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
496 SWIGRUNTIME const char *
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
497 SWIG_TypePrettyName(const swig_type_info *type) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
498 /* The "str" field contains the equivalent pretty names of the
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
499 type, separated by vertical-bar characters. We choose
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
500 to print the last name, as it is often (?) the most
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
501 specific. */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
502 if (!type) return NULL;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
503 if (type->str != NULL) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
504 const char *last_name = type->str;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
505 const char *s;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
506 for (s = type->str; *s; s++)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
507 if (*s == '|') last_name = s+1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
508 return last_name;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
509 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
510 else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
511 return type->name;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
512 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
513
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
514 /*
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
515 Set the clientdata field for a type
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
516 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
517 SWIGRUNTIME void
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
518 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
519 swig_cast_info *cast = ti->cast;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
520 /* if (ti->clientdata == clientdata) return; */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
521 ti->clientdata = clientdata;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
522
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
523 while (cast) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
524 if (!cast->converter) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
525 swig_type_info *tc = cast->type;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
526 if (!tc->clientdata) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
527 SWIG_TypeClientData(tc, clientdata);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
528 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
529 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
530 cast = cast->next;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
531 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
532 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
533 SWIGRUNTIME void
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
534 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
535 SWIG_TypeClientData(ti, clientdata);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
536 ti->owndata = 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
537 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
538
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
539 /*
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
540 Search for a swig_type_info structure only by mangled name
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
541 Search is a O(log #types)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
542
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
543 We start searching at module start, and finish searching when start == end.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
544 Note: if start == end at the beginning of the function, we go all the way around
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
545 the circular list.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
546 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
547 SWIGRUNTIME swig_type_info *
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
548 SWIG_MangledTypeQueryModule(swig_module_info *start,
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
549 swig_module_info *end,
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
550 const char *name) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
551 swig_module_info *iter = start;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
552 do {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
553 if (iter->size) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
554 register size_t l = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
555 register size_t r = iter->size - 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
556 do {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
557 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
558 register size_t i = (l + r) >> 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
559 const char *iname = iter->types[i]->name;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
560 if (iname) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
561 register int compare = strcmp(name, iname);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
562 if (compare == 0) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
563 return iter->types[i];
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
564 } else if (compare < 0) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
565 if (i) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
566 r = i - 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
567 } else {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
568 break;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
569 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
570 } else if (compare > 0) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
571 l = i + 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
572 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
573 } else {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
574 break; /* should never happen */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
575 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
576 } while (l <= r);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
577 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
578 iter = iter->next;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
579 } while (iter != end);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
580 return 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
581 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
582
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
583 /*
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
584 Search for a swig_type_info structure for either a mangled name or a human readable name.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
585 It first searches the mangled names of the types, which is a O(log #types)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
586 If a type is not found it then searches the human readable names, which is O(#types).
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
587
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
588 We start searching at module start, and finish searching when start == end.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
589 Note: if start == end at the beginning of the function, we go all the way around
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
590 the circular list.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
591 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
592 SWIGRUNTIME swig_type_info *
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
593 SWIG_TypeQueryModule(swig_module_info *start,
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
594 swig_module_info *end,
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
595 const char *name) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
596 /* STEP 1: Search the name field using binary search */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
597 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
598 if (ret) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
599 return ret;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
600 } else {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
601 /* STEP 2: If the type hasn't been found, do a complete search
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
602 of the str field (the human readable name) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
603 swig_module_info *iter = start;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
604 do {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
605 register size_t i = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
606 for (; i < iter->size; ++i) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
607 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
608 return iter->types[i];
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
609 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
610 iter = iter->next;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
611 } while (iter != end);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
612 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
613
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
614 /* neither found a match */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
615 return 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
616 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
617
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
618 /*
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
619 Pack binary data into a string
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
620 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
621 SWIGRUNTIME char *
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
622 SWIG_PackData(char *c, void *ptr, size_t sz) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
623 static const char hex[17] = "0123456789abcdef";
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
624 register const unsigned char *u = (unsigned char *) ptr;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
625 register const unsigned char *eu = u + sz;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
626 for (; u != eu; ++u) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
627 register unsigned char uu = *u;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
628 *(c++) = hex[(uu & 0xf0) >> 4];
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
629 *(c++) = hex[uu & 0xf];
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
630 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
631 return c;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
632 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
633
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
634 /*
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
635 Unpack binary data from a string
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
636 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
637 SWIGRUNTIME const char *
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
638 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
639 register unsigned char *u = (unsigned char *) ptr;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
640 register const unsigned char *eu = u + sz;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
641 for (; u != eu; ++u) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
642 register char d = *(c++);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
643 register unsigned char uu;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
644 if ((d >= '0') && (d <= '9'))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
645 uu = ((d - '0') << 4);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
646 else if ((d >= 'a') && (d <= 'f'))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
647 uu = ((d - ('a'-10)) << 4);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
648 else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
649 return (char *) 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
650 d = *(c++);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
651 if ((d >= '0') && (d <= '9'))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
652 uu |= (d - '0');
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
653 else if ((d >= 'a') && (d <= 'f'))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
654 uu |= (d - ('a'-10));
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
655 else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
656 return (char *) 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
657 *u = uu;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
658 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
659 return c;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
660 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
661
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
662 /*
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
663 Pack 'void *' into a string buffer.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
664 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
665 SWIGRUNTIME char *
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
666 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
667 char *r = buff;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
668 if ((2*sizeof(void *) + 2) > bsz) return 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
669 *(r++) = '_';
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
670 r = SWIG_PackData(r,&ptr,sizeof(void *));
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
671 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
672 strcpy(r,name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
673 return buff;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
674 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
675
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
676 SWIGRUNTIME const char *
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
677 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
678 if (*c != '_') {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
679 if (strcmp(c,"NULL") == 0) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
680 *ptr = (void *) 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
681 return name;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
682 } else {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
683 return 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
684 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
685 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
686 return SWIG_UnpackData(++c,ptr,sizeof(void *));
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
687 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
688
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
689 SWIGRUNTIME char *
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
690 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
691 char *r = buff;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
692 size_t lname = (name ? strlen(name) : 0);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
693 if ((2*sz + 2 + lname) > bsz) return 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
694 *(r++) = '_';
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
695 r = SWIG_PackData(r,ptr,sz);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
696 if (lname) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
697 strncpy(r,name,lname+1);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
698 } else {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
699 *r = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
700 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
701 return buff;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
702 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
703
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
704 SWIGRUNTIME const char *
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
705 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
706 if (*c != '_') {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
707 if (strcmp(c,"NULL") == 0) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
708 memset(ptr,0,sz);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
709 return name;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
710 } else {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
711 return 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
712 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
713 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
714 return SWIG_UnpackData(++c,ptr,sz);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
715 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
716
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
717 #ifdef __cplusplus
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
718 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
719 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
720
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
721 /* -----------------------------------------------------------------------------
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
722 * luarun.swg
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
723 *
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
724 * This file contains the runtime support for Lua modules
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
725 * and includes code for managing global variables and pointer
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
726 * type checking.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
727 * ----------------------------------------------------------------------------- */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
728
2073
38bf1c70fc70 some text rendering fix
Gloval
parents: 2037
diff changeset
729 #include "../../lib/lua/lua.h"
2037
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
730 #ifdef __cplusplus
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
731 extern "C" {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
732 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
733
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
734 //#include "lua.h"
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
735 //#include "lauxlib.h"
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
736 #include <stdlib.h> /* for malloc */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
737 #include <assert.h> /* for a few sanity tests */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
738
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
739 /* -----------------------------------------------------------------------------
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
740 * Lua flavors
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
741 * ----------------------------------------------------------------------------- */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
742
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
743 #define SWIG_LUA_FLAVOR_LUA 1
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
744 #define SWIG_LUA_FLAVOR_ELUA 2
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
745 #define SWIG_LUA_FLAVOR_ELUAC 3
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
746
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
747 #if !defined(SWIG_LUA_TARGET)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
748 # error SWIG_LUA_TARGET not defined
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
749 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
750
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
751 #if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
752 # define SWIG_LUA_CONSTTAB_INT(B, C) LSTRKEY(B), LNUMVAL(C)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
753 # define SWIG_LUA_CONSTTAB_FLOAT(B, C) LSTRKEY(B), LNUMVAL(C)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
754 # define SWIG_LUA_CONSTTAB_STRING(B, C) LSTRKEY(B), LSTRVAL(C)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
755 # define SWIG_LUA_CONSTTAB_CHAR(B, C) LSTRKEY(B), LNUMVAL(C)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
756 #else /* SWIG_LUA_FLAVOR_LUA */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
757 # define SWIG_LUA_CONSTTAB_INT(B, C) SWIG_LUA_INT, (char *)B, (long)C, 0, 0, 0
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
758 # define SWIG_LUA_CONSTTAB_FLOAT(B, C) SWIG_LUA_FLOAT, (char *)B, 0, (double)C, 0, 0
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
759 # define SWIG_LUA_CONSTTAB_STRING(B, C) SWIG_LUA_STRING, (char *)B, 0, 0, (void *)C, 0
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
760 # define SWIG_LUA_CONSTTAB_CHAR(B, C) SWIG_LUA_CHAR, (char *)B, (long)C, 0, 0, 0
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
761 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
762
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
763 #if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
764 # define LRO_STRVAL(v) {{.p = (char *) v}, LUA_TSTRING}
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
765 # define LSTRVAL LRO_STRVAL
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
766 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
767
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
768 /* -----------------------------------------------------------------------------
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
769 * compatibility defines
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
770 * ----------------------------------------------------------------------------- */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
771
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
772 /* History of Lua C API length functions: In Lua 5.0 (and before?)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
773 there was "lua_strlen". In Lua 5.1, this was renamed "lua_objlen",
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
774 but a compatibility define of "lua_strlen" was added. In Lua 5.2,
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
775 this function was again renamed, to "lua_rawlen" (to emphasize that
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
776 it doesn't call the "__len" metamethod), and the compatibility
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
777 define of lua_strlen was removed. All SWIG uses have been updated
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
778 to "lua_rawlen", and we add our own defines of that here for older
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
779 versions of Lua. */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
780 #if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
781 # define lua_rawlen lua_strlen
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
782 #elif LUA_VERSION_NUM == 501
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
783 # define lua_rawlen lua_objlen
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
784 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
785
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
786
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
787 /* lua_pushglobaltable is the recommended "future-proof" way to get
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
788 the global table for Lua 5.2 and later. Here we define
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
789 lua_pushglobaltable ourselves for Lua versions before 5.2. */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
790 #if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
791 # define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
792 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
793
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
794
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
795 /* --------------------------------------------------------------------------
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
796 * Helper functions for error handling
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
797 * -------------------------------------------------------------------------- */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
798
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
799 /* Push the string STR on the Lua stack, like lua_pushstring, but
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
800 prefixed with the the location of the innermost Lua call-point
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
801 (as formated by luaL_where). */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
802 SWIGRUNTIME void
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
803 SWIG_Lua_pusherrstring (lua_State *L, const char *str)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
804 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
805 luaL_where (L, 1);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
806 lua_pushstring (L, str);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
807 lua_concat (L, 2);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
808 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
809
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
810 /* Push a formatted string generated from FMT and following args on
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
811 the Lua stack, like lua_pushfstring, but prefixed with the the
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
812 location of the innermost Lua call-point (as formated by luaL_where). */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
813 SWIGRUNTIME void
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
814 SWIG_Lua_pushferrstring (lua_State *L, const char *fmt, ...)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
815 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
816 va_list argp;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
817 va_start(argp, fmt);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
818 luaL_where(L, 1);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
819 lua_pushvfstring(L, fmt, argp);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
820 va_end(argp);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
821 lua_concat(L, 2);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
822 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
823
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
824
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
825 /* -----------------------------------------------------------------------------
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
826 * global swig types
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
827 * ----------------------------------------------------------------------------- */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
828 /* Constant table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
829 #define SWIG_LUA_INT 1
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
830 #define SWIG_LUA_FLOAT 2
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
831 #define SWIG_LUA_STRING 3
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
832 #define SWIG_LUA_POINTER 4
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
833 #define SWIG_LUA_BINARY 5
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
834 #define SWIG_LUA_CHAR 6
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
835
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
836 /* Structure for variable linking table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
837 typedef struct {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
838 const char *name;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
839 lua_CFunction get;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
840 lua_CFunction set;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
841 } swig_lua_var_info;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
842
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
843 /* Constant information structure */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
844 typedef struct {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
845 int type;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
846 char *name;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
847 long lvalue;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
848 double dvalue;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
849 void *pvalue;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
850 swig_type_info **ptype;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
851 } swig_lua_const_info;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
852
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
853 typedef struct {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
854 const char *name;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
855 lua_CFunction method;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
856 } swig_lua_method;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
857
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
858 typedef struct {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
859 const char *name;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
860 lua_CFunction getmethod;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
861 lua_CFunction setmethod;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
862 } swig_lua_attribute;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
863
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
864 // Can be used to create namespaces. Currently used to
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
865 // wrap class static methods/variables/constants
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
866 typedef struct {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
867 const char *name;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
868 swig_lua_method *ns_methods;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
869 swig_lua_attribute *ns_attributes;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
870 swig_lua_const_info *ns_constants;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
871 } swig_lua_namespace;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
872
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
873 typedef struct swig_lua_class {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
874 const char *name;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
875 swig_type_info **type;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
876 lua_CFunction constructor;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
877 void (*destructor)(void *);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
878 swig_lua_method *methods;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
879 swig_lua_attribute *attributes;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
880 swig_lua_namespace cls_static;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
881 struct swig_lua_class **bases;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
882 const char **base_names;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
883 } swig_lua_class;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
884
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
885 /* this is the struct for wrapping all pointers in SwigLua
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
886 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
887 typedef struct {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
888 swig_type_info *type;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
889 int own; /* 1 if owned & must be destroyed */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
890 void *ptr;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
891 } swig_lua_userdata;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
892
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
893 /* this is the struct for wrapping arbitrary packed binary data
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
894 (currently it is only used for member function pointers)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
895 the data ordering is similar to swig_lua_userdata, but it is currently not possible
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
896 to tell the two structures apart within SWIG, other than by looking at the type
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
897 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
898 typedef struct {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
899 swig_type_info *type;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
900 int own; /* 1 if owned & must be destroyed */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
901 char data[1]; /* arbitary amount of data */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
902 } swig_lua_rawdata;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
903
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
904 /* Common SWIG API */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
905 #define SWIG_NewPointerObj(L, ptr, type, owner) SWIG_Lua_NewPointerObj(L, (void *)ptr, type, owner)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
906 #define SWIG_ConvertPtr(L,idx, ptr, type, flags) SWIG_Lua_ConvertPtr(L,idx,ptr,type,flags)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
907 #define SWIG_MustGetPtr(L,idx, type,flags, argnum,fnname) SWIG_Lua_MustGetPtr(L,idx, type,flags, argnum,fnname)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
908 /* for C++ member pointers, ie, member methods */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
909 #define SWIG_ConvertMember(L, idx, ptr, sz, ty) SWIG_Lua_ConvertPacked(L, idx, ptr, sz, ty)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
910 #define SWIG_NewMemberObj(L, ptr, sz, type) SWIG_Lua_NewPackedObj(L, ptr, sz, type)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
911
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
912 /* Runtime API */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
913 #define SWIG_GetModule(clientdata) SWIG_Lua_GetModule((lua_State*)(clientdata))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
914 #define SWIG_SetModule(clientdata, pointer) SWIG_Lua_SetModule((lua_State*) (clientdata), pointer)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
915 #define SWIG_MODULE_CLIENTDATA_TYPE lua_State*
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
916
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
917 /* Contract support */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
918 #define SWIG_contract_assert(expr, msg) \
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
919 if (!(expr)) { SWIG_Lua_pusherrstring(L, (char *) msg); goto fail; } else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
920
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
921
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
922 /* helper #defines */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
923 #define SWIG_fail {goto fail;}
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
924 #define SWIG_fail_arg(func_name,argnum,type) \
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
925 {SWIG_Lua_pushferrstring(L,"Error in %s (arg %d), expected '%s' got '%s'",\
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
926 func_name,argnum,type,SWIG_Lua_typename(L,argnum));\
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
927 goto fail;}
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
928 #define SWIG_fail_ptr(func_name,argnum,type) \
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
929 SWIG_fail_arg(func_name,argnum,(type && type->str)?type->str:"void*")
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
930 #define SWIG_check_num_args(func_name,a,b) \
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
931 if (lua_gettop(L)<a || lua_gettop(L)>b) \
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
932 {SWIG_Lua_pushferrstring(L,"Error in %s expected %d..%d args, got %d",func_name,a,b,lua_gettop(L));\
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
933 goto fail;}
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
934
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
935
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
936 #define SWIG_Lua_get_table(L,n) \
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
937 (lua_pushstring(L, n), lua_rawget(L,-2))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
938
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
939 #define SWIG_Lua_add_function(L,n,f) \
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
940 (lua_pushstring(L, n), \
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
941 lua_pushcfunction(L, f), \
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
942 lua_rawset(L,-3))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
943
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
944 /* special helper for allowing 'nil' for usertypes */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
945 #define SWIG_isptrtype(L,I) (lua_isuserdata(L,I) || lua_isnil(L,I))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
946
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
947 #ifdef __cplusplus
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
948 /* Special helper for member function pointers
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
949 it gets the address, casts it, then dereferences it */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
950 //#define SWIG_mem_fn_as_voidptr(a) (*((char**)&(a)))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
951 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
952
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
953 /* storing/access of swig_module_info */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
954 SWIGRUNTIME swig_module_info *
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
955 SWIG_Lua_GetModule(lua_State* L) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
956 swig_module_info *ret = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
957 lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
958 lua_rawget(L,LUA_REGISTRYINDEX);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
959 if (lua_islightuserdata(L,-1))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
960 ret=(swig_module_info*)lua_touserdata(L,-1);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
961 lua_pop(L,1); /* tidy */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
962 return ret;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
963 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
964
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
965 SWIGRUNTIME void
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
966 SWIG_Lua_SetModule(lua_State* L, swig_module_info *module) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
967 /* add this all into the Lua registry: */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
968 lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
969 lua_pushlightuserdata(L,(void*)module);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
970 lua_rawset(L,LUA_REGISTRYINDEX);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
971 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
972
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
973 /* -----------------------------------------------------------------------------
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
974 * global variable support code: modules
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
975 * ----------------------------------------------------------------------------- */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
976
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
977 /* this function is called when trying to set an immutable.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
978 default action is to print an error.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
979 This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
980 SWIGINTERN int SWIG_Lua_set_immutable(lua_State* L)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
981 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
982 /* there should be 1 param passed in: the new value */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
983 #ifndef SWIGLUA_IGNORE_SET_IMMUTABLE
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
984 lua_pop(L,1); /* remove it */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
985 luaL_error(L,"This variable is immutable");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
986 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
987 return 0; /* should not return anything */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
988 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
989
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
990 /* the module.get method used for getting linked data */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
991 SWIGINTERN int SWIG_Lua_module_get(lua_State* L)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
992 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
993 /* there should be 2 params passed in
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
994 (1) table (not the meta table)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
995 (2) string name of the attribute
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
996 printf("SWIG_Lua_module_get %p(%s) '%s'\n",
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
997 lua_topointer(L,1),lua_typename(L,lua_type(L,1)),
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
998 lua_tostring(L,2));
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
999 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1000 /* get the metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1001 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1002 assert(lua_isrotable(L,1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1003 #else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1004 assert(lua_istable(L,1)); /* default Lua action */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1005 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1006 lua_getmetatable(L,1); /* get the metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1007 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1008 assert(lua_isrotable(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1009 #else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1010 assert(lua_istable(L,-1));
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1011 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1012 SWIG_Lua_get_table(L,".get"); /* get the .get table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1013 lua_remove(L,3); /* remove metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1014 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1015 if (lua_isrotable(L,-1))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1016 #else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1017 if (lua_istable(L,-1))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1018 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1019 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1020 /* look for the key in the .get table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1021 lua_pushvalue(L,2); /* key */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1022 lua_rawget(L,-2);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1023 lua_remove(L,3); /* remove .get */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1024 if (lua_iscfunction(L,-1))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1025 { /* found it so call the fn & return its value */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1026 lua_call(L,0,1);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1027 return 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1028 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1029 lua_pop(L,1); /* remove the top */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1030 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1031 lua_pop(L,1); /* remove the .get */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1032 lua_pushnil(L); /* return a nil */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1033 return 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1034 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1035
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1036 /* the module.set method used for setting linked data */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1037 SWIGINTERN int SWIG_Lua_module_set(lua_State* L)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1038 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1039 /* there should be 3 params passed in
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1040 (1) table (not the meta table)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1041 (2) string name of the attribute
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1042 (3) any for the new value
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1043 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1044 /* get the metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1045 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1046 assert(lua_isrotable(L,1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1047 #else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1048 assert(lua_istable(L,1)); /* default Lua action */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1049 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1050 lua_getmetatable(L,1); /* get the metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1051 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1052 assert(lua_isrotable(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1053 #else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1054 assert(lua_istable(L,-1));
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1055 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1056 SWIG_Lua_get_table(L,".set"); /* get the .set table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1057 lua_remove(L,4); /* remove metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1058 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1059 if (lua_isrotable(L,-1))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1060 #else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1061 if (lua_istable(L,-1))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1062 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1063 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1064 /* look for the key in the .set table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1065 lua_pushvalue(L,2); /* key */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1066 lua_rawget(L,-2);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1067 lua_remove(L,4); /* remove .set */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1068 if (lua_iscfunction(L,-1))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1069 { /* found it so call the fn & return its value */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1070 lua_pushvalue(L,3); /* value */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1071 lua_call(L,1,0);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1072 return 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1073 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1074 #if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1075 else {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1076 return 0; // Exits stoically if an invalid key is initialized.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1077 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1078 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1079 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1080 lua_settop(L,3); /* reset back to start */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1081 /* we now have the table, key & new value, so just set directly */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1082 lua_rawset(L,1); /* add direct */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1083 return 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1084 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1085
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1086 #if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1087 /* registering a module in lua. Pushes the module table on the stack. */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1088 SWIGINTERN void SWIG_Lua_module_begin(lua_State* L,const char* name)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1089 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1090 assert(lua_istable(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1091 lua_pushstring(L,name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1092 lua_newtable(L); /* the table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1093 /* add meta table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1094 lua_newtable(L); /* the meta table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1095 SWIG_Lua_add_function(L,"__index",SWIG_Lua_module_get);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1096 SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_module_set);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1097 lua_pushstring(L,".get");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1098 lua_newtable(L); /* the .get table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1099 lua_rawset(L,-3); /* add .get into metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1100 lua_pushstring(L,".set");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1101 lua_newtable(L); /* the .set table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1102 lua_rawset(L,-3); /* add .set into metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1103 lua_setmetatable(L,-2); /* sets meta table in module */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1104 #ifdef SWIG_LUA_MODULE_GLOBAL
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1105 /* If requested, install the module directly into the global namespace. */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1106 lua_rawset(L,-3); /* add module into parent */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1107 SWIG_Lua_get_table(L,name); /* get the table back out */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1108 #else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1109 /* Do not install the module table as global name. The stack top has
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1110 the module table with the name below. We pop the top and replace
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1111 the name with it. */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1112 lua_replace(L,-2);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1113 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1114 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1115
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1116 /* ending the register */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1117 SWIGINTERN void SWIG_Lua_module_end(lua_State* L)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1118 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1119 lua_pop(L,1); /* tidy stack (remove module) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1120 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1121
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1122 /* adding a linked variable to the module */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1123 SWIGINTERN void SWIG_Lua_module_add_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1124 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1125 assert(lua_istable(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1126 lua_getmetatable(L,-1); /* get the metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1127 assert(lua_istable(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1128 SWIG_Lua_get_table(L,".get"); /* find the .get table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1129 assert(lua_istable(L,-1)); /* should be a table: */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1130 SWIG_Lua_add_function(L,name,getFn);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1131 lua_pop(L,1); /* tidy stack (remove table) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1132 if (setFn) /* if there is a set fn */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1133 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1134 SWIG_Lua_get_table(L,".set"); /* find the .set table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1135 assert(lua_istable(L,-1)); /* should be a table: */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1136 SWIG_Lua_add_function(L,name,setFn);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1137 lua_pop(L,1); /* tidy stack (remove table) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1138 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1139 lua_pop(L,1); /* tidy stack (remove meta) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1140 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1141 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1142
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1143 /* adding a function module */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1144 SWIGINTERN void SWIG_Lua_module_add_function(lua_State* L,const char* name,lua_CFunction fn)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1145 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1146 SWIG_Lua_add_function(L,name,fn);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1147 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1148
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1149 /* -----------------------------------------------------------------------------
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1150 * global variable support code: namespaces
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1151 * ----------------------------------------------------------------------------- */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1152
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1153 SWIGINTERN int SWIG_Lua_namespace_get(lua_State* L)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1154 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1155 /* there should be 2 params passed in
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1156 (1) table (not the meta table)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1157 (2) string name of the attribute
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1158 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1159 assert(lua_istable(L,-2)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1160 lua_getmetatable(L,-2);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1161 assert(lua_istable(L,-1));
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1162 SWIG_Lua_get_table(L,".get"); /* find the .get table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1163 assert(lua_istable(L,-1));
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1164 /* look for the key in the .get table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1165 lua_pushvalue(L,2); /* key */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1166 lua_rawget(L,-2);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1167 lua_remove(L,-2); /* stack tidy, remove .get table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1168 if (lua_iscfunction(L,-1))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1169 { /* found it so call the fn & return its value */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1170 lua_call(L,0,1); /* 1 value in (userdata),1 out (result) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1171 lua_remove(L,-2); /* stack tidy, remove metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1172 return 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1173 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1174 lua_pop(L,1); /* remove whatever was there */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1175 /* ok, so try the .fn table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1176 SWIG_Lua_get_table(L,".fn"); /* find the .get table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1177 assert(lua_istable(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1178 lua_pushvalue(L,2); /* key */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1179 lua_rawget(L,-2); /* look for the fn */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1180 lua_remove(L,-2); /* stack tidy, remove .fn table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1181 if (lua_isfunction(L,-1)) /* note: whether it's a C function or lua function */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1182 { /* found it so return the fn & let lua call it */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1183 lua_remove(L,-2); /* stack tidy, remove metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1184 return 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1185 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1186 lua_pop(L,1); /* remove whatever was there */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1187 return 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1188 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1189
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1190 SWIGINTERN int SWIG_Lua_namespace_set(lua_State* L)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1191 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1192 /* there should be 3 params passed in
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1193 (1) table (not the meta table)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1194 (2) string name of the attribute
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1195 (3) any for the new value
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1196 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1197
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1198 assert(lua_istable(L,1));
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1199 lua_getmetatable(L,1); /* get the meta table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1200 assert(lua_istable(L,-1));
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1201
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1202 SWIG_Lua_get_table(L,".set"); /* find the .set table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1203 if (lua_istable(L,-1))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1204 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1205 /* look for the key in the .set table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1206 lua_pushvalue(L,2); /* key */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1207 lua_rawget(L,-2);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1208 if (lua_iscfunction(L,-1))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1209 { /* found it so call the fn & return its value */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1210 lua_pushvalue(L,3); /* value */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1211 lua_call(L,1,0);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1212 return 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1213 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1214 lua_pop(L,1); /* remove the value */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1215 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1216 lua_pop(L,1); /* remove the value .set table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1217 return 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1218 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1219
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1220 SWIGINTERN void SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]); // forward declaration
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1221 SWIGINTERN void SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn); // forward declaration
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1222
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1223 /* helper function - register namespace methods and attributes into namespace */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1224 SWIGINTERN void SWIG_Lua_add_namespace_details(lua_State* L, swig_lua_namespace* ns)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1225 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1226 int i = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1227 assert(lua_istable(L,-1));
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1228 /* There must be table at the top of the stack */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1229 SWIG_Lua_InstallConstants(L, ns->ns_constants);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1230
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1231 lua_getmetatable(L,-1);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1232
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1233 /* add fns */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1234 for(i=0;ns->ns_attributes[i].name;i++){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1235 SWIG_Lua_add_class_variable(L,ns->ns_attributes[i].name,ns->ns_attributes[i].getmethod,ns->ns_attributes[i].setmethod);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1236 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1237
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1238 /* add methods to the metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1239 SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1240 assert(lua_istable(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1241 for(i=0;ns->ns_methods[i].name;i++){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1242 SWIG_Lua_add_function(L,ns->ns_methods[i].name,ns->ns_methods[i].method);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1243 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1244 lua_pop(L,1);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1245
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1246 /* clear stack - remove metatble */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1247 lua_pop(L,1);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1248
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1249 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1250
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1251 /* helper function. creates namespace table and add it to module table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1252 SWIGINTERN void SWIG_Lua_namespace_register(lua_State* L, swig_lua_namespace* ns)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1253 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1254 assert(lua_istable(L,-1)); /* just in case. This is supposed to be module table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1255 lua_checkstack(L,5);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1256 lua_pushstring(L, ns->name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1257 lua_newtable(L); /* namespace itself */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1258 lua_newtable(L); /* metatable for namespace */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1259
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1260 /* add a table called ".get" */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1261 lua_pushstring(L,".get");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1262 lua_newtable(L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1263 lua_rawset(L,-3);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1264 /* add a table called ".set" */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1265 lua_pushstring(L,".set");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1266 lua_newtable(L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1267 lua_rawset(L,-3);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1268 /* add a table called ".fn" */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1269 lua_pushstring(L,".fn");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1270 lua_newtable(L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1271 lua_rawset(L,-3);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1272
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1273 /* add accessor fns for using the .get,.set&.fn */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1274 SWIG_Lua_add_function(L,"__index",SWIG_Lua_namespace_get);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1275 SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_namespace_set);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1276
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1277 lua_setmetatable(L,-2); /* set metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1278 lua_rawset(L,-3); /* add namespace to module table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1279 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1280 /* -----------------------------------------------------------------------------
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1281 * global variable support code: classes
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1282 * ----------------------------------------------------------------------------- */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1283
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1284 /* the class.get method, performs the lookup of class attributes */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1285 SWIGINTERN int SWIG_Lua_class_get(lua_State* L)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1286 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1287 /* there should be 2 params passed in
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1288 (1) userdata (not the meta table)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1289 (2) string name of the attribute
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1290 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1291 assert(lua_isuserdata(L,-2)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1292 lua_getmetatable(L,-2); /* get the meta table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1293 assert(lua_istable(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1294 SWIG_Lua_get_table(L,".get"); /* find the .get table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1295 assert(lua_istable(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1296 /* look for the key in the .get table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1297 lua_pushvalue(L,2); /* key */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1298 lua_rawget(L,-2);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1299 lua_remove(L,-2); /* stack tidy, remove .get table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1300 if (lua_iscfunction(L,-1))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1301 { /* found it so call the fn & return its value */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1302 lua_pushvalue(L,1); /* the userdata */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1303 lua_call(L,1,1); /* 1 value in (userdata),1 out (result) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1304 lua_remove(L,-2); /* stack tidy, remove metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1305 return 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1306 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1307 lua_pop(L,1); /* remove whatever was there */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1308 /* ok, so try the .fn table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1309 SWIG_Lua_get_table(L,".fn"); /* find the .get table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1310 assert(lua_istable(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1311 lua_pushvalue(L,2); /* key */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1312 lua_rawget(L,-2); /* look for the fn */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1313 lua_remove(L,-2); /* stack tidy, remove .fn table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1314 if (lua_isfunction(L,-1)) /* note: if its a C function or lua function */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1315 { /* found it so return the fn & let lua call it */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1316 lua_remove(L,-2); /* stack tidy, remove metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1317 return 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1318 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1319 lua_pop(L,1); /* remove whatever was there */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1320 /* NEW: looks for the __getitem() fn
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1321 this is a user provided get fn */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1322 SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1323 if (lua_iscfunction(L,-1)) /* if its there */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1324 { /* found it so call the fn & return its value */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1325 lua_pushvalue(L,1); /* the userdata */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1326 lua_pushvalue(L,2); /* the parameter */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1327 lua_call(L,2,1); /* 2 value in (userdata),1 out (result) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1328 lua_remove(L,-2); /* stack tidy, remove metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1329 return 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1330 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1331 return 0; /* sorry not known */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1332 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1333
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1334 /* the class.set method, performs the lookup of class attributes */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1335 SWIGINTERN int SWIG_Lua_class_set(lua_State* L)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1336 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1337 /* there should be 3 params passed in
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1338 (1) table (not the meta table)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1339 (2) string name of the attribute
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1340 (3) any for the new value
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1341 printf("SWIG_Lua_class_set %p(%s) '%s' %p(%s)\n",
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1342 lua_topointer(L,1),lua_typename(L,lua_type(L,1)),
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1343 lua_tostring(L,2),
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1344 lua_topointer(L,3),lua_typename(L,lua_type(L,3)));*/
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1345
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1346 assert(lua_isuserdata(L,1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1347 lua_getmetatable(L,1); /* get the meta table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1348 assert(lua_istable(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1349
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1350 SWIG_Lua_get_table(L,".set"); /* find the .set table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1351 if (lua_istable(L,-1))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1352 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1353 /* look for the key in the .set table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1354 lua_pushvalue(L,2); /* key */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1355 lua_rawget(L,-2);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1356 if (lua_iscfunction(L,-1))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1357 { /* found it so call the fn & return its value */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1358 lua_pushvalue(L,1); /* userdata */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1359 lua_pushvalue(L,3); /* value */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1360 lua_call(L,2,0);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1361 return 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1362 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1363 lua_pop(L,1); /* remove the value */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1364 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1365 lua_pop(L,1); /* remove the value .set table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1366 /* NEW: looks for the __setitem() fn
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1367 this is a user provided set fn */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1368 SWIG_Lua_get_table(L,"__setitem"); /* find the fn */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1369 if (lua_iscfunction(L,-1)) /* if its there */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1370 { /* found it so call the fn & return its value */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1371 lua_pushvalue(L,1); /* the userdata */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1372 lua_pushvalue(L,2); /* the parameter */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1373 lua_pushvalue(L,3); /* the value */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1374 lua_call(L,3,0); /* 3 values in ,0 out */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1375 lua_remove(L,-2); /* stack tidy, remove metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1376 return 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1377 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1378 return 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1379 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1380
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1381 /* the class.destruct method called by the interpreter */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1382 SWIGINTERN int SWIG_Lua_class_destruct(lua_State* L)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1383 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1384 /* there should be 1 params passed in
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1385 (1) userdata (not the meta table) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1386 swig_lua_userdata* usr;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1387 swig_lua_class* clss;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1388 assert(lua_isuserdata(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1389 usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1390 /* if must be destroyed & has a destructor */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1391 if (usr->own) /* if must be destroyed */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1392 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1393 clss=(swig_lua_class*)usr->type->clientdata; /* get the class */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1394 if (clss && clss->destructor) /* there is a destroy fn */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1395 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1396 clss->destructor(usr->ptr); /* bye bye */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1397 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1398 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1399 return 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1400 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1401
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1402 /* the class.__tostring method called by the interpreter and print */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1403 SWIGINTERN int SWIG_Lua_class_tostring(lua_State* L)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1404 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1405 /* there should be 1 param passed in
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1406 (1) userdata (not the metatable) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1407 assert(lua_isuserdata(L,1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1408 unsigned long userData = (unsigned long)lua_touserdata(L,1); /* get the userdata address for later */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1409 lua_getmetatable(L,1); /* get the meta table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1410 assert(lua_istable(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1411
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1412 lua_getfield(L, -1, ".type");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1413 const char* className = lua_tostring(L, -1);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1414
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1415 char output[256];
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1416 sprintf(output, "<%s userdata: %lX>", className, userData);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1417
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1418 lua_pushstring(L, (const char*)output);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1419 return 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1420 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1421
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1422 /* to manually disown some userdata */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1423 SWIGINTERN int SWIG_Lua_class_disown(lua_State* L)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1424 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1425 /* there should be 1 params passed in
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1426 (1) userdata (not the meta table) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1427 swig_lua_userdata* usr;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1428 assert(lua_isuserdata(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1429 usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1430
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1431 usr->own = 0; /* clear our ownership */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1432 return 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1433 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1434
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1435 /* Constructor proxy. Used when class name entry in module is not class constructor,
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1436 but special table instead. */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1437 SWIGINTERN int SWIG_Lua_constructor_proxy(lua_State* L)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1438 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1439 /* unlimited number of parameters
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1440 First one is our proxy table and we should remove it
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1441 Other we should pass to real constructor
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1442 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1443 assert(lua_istable(L,1));
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1444 lua_pushstring(L,".constructor");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1445 lua_rawget(L,1);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1446 assert(!lua_isnil(L,-1));
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1447 lua_replace(L,1); /* replace our table with real constructor */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1448 lua_call(L,lua_gettop(L)-1,1);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1449 return 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1450 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1451
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1452 /* gets the swig class registry (or creates it) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1453 SWIGINTERN void SWIG_Lua_get_class_registry(lua_State* L)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1454 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1455 /* add this all into the swig registry: */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1456 lua_pushstring(L,"SWIG");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1457 lua_rawget(L,LUA_REGISTRYINDEX); /* get the registry */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1458 if (!lua_istable(L,-1)) /* not there */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1459 { /* must be first time, so add it */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1460 lua_pop(L,1); /* remove the result */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1461 lua_pushstring(L,"SWIG");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1462 lua_newtable(L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1463 lua_rawset(L,LUA_REGISTRYINDEX);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1464 /* then get it */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1465 lua_pushstring(L,"SWIG");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1466 lua_rawget(L,LUA_REGISTRYINDEX);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1467 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1468 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1469
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1470 /* helper fn to get the classes metatable from the register */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1471 SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State* L,const char* cname)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1472 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1473 SWIG_Lua_get_class_registry(L); /* get the registry */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1474 lua_pushstring(L,cname); /* get the name */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1475 lua_rawget(L,-2); /* get it */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1476 lua_remove(L,-2); /* tidy up (remove registry) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1477 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1478
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1479 /* helper add a variable to a registered class */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1480 SWIGINTERN void SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1481 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1482 assert(lua_istable(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1483 SWIG_Lua_get_table(L,".get"); /* find the .get table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1484 assert(lua_istable(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1485 SWIG_Lua_add_function(L,name,getFn);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1486 lua_pop(L,1); /* tidy stack (remove table) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1487 if (setFn)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1488 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1489 SWIG_Lua_get_table(L,".set"); /* find the .set table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1490 assert(lua_istable(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1491 SWIG_Lua_add_function(L,name,setFn);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1492 lua_pop(L,1); /* tidy stack (remove table) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1493 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1494 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1495
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1496 /* helper to recursively add class static details (static attributes, operations and constants) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1497 SWIGINTERN void SWIG_Lua_add_class_static_details(lua_State* L, swig_lua_class* clss)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1498 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1499 int i = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1500 /* The class namespace table must be on the top of the stack */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1501 assert(lua_istable(L,-1));
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1502 /* call all the base classes first: we can then override these later: */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1503 for(i=0;clss->bases[i];i++)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1504 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1505 SWIG_Lua_add_class_static_details(L,clss->bases[i]);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1506 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1507
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1508 SWIG_Lua_add_namespace_details(L, &clss->cls_static);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1509 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1510
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1511 /* helper to recursively add class details (attributes & operations) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1512 SWIGINTERN void SWIG_Lua_add_class_details(lua_State* L,swig_lua_class* clss)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1513 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1514 int i;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1515 /* call all the base classes first: we can then override these later: */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1516 for(i=0;clss->bases[i];i++)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1517 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1518 SWIG_Lua_add_class_details(L,clss->bases[i]);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1519 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1520 /* add fns */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1521 for(i=0;clss->attributes[i].name;i++){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1522 SWIG_Lua_add_class_variable(L,clss->attributes[i].name,clss->attributes[i].getmethod,clss->attributes[i].setmethod);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1523 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1524 /* add methods to the metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1525 SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1526 assert(lua_istable(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1527 for(i=0;clss->methods[i].name;i++){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1528 SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1529 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1530 lua_pop(L,1); /* tidy stack (remove table) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1531 /* add operator overloads
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1532 these look ANY method which start with "__" and assume they
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1533 are operator overloads & add them to the metatable
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1534 (this might mess up is someone defines a method __gc (the destructor)*/
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1535 for(i=0;clss->methods[i].name;i++){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1536 if (clss->methods[i].name[0]=='_' && clss->methods[i].name[1]=='_'){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1537 SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1538 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1539 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1540 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1541
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1542 /* set up the base classes pointers.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1543 Each class structure has a list of pointers to the base class structures.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1544 This function fills them.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1545 It cannot be done at compile time, as this will not work with hireachies
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1546 spread over more than one swig file.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1547 Therefore it must be done at runtime, querying the SWIG type system.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1548 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1549 SWIGINTERN void SWIG_Lua_init_base_class(lua_State* L,swig_lua_class* clss)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1550 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1551 int i=0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1552 swig_module_info* module=SWIG_GetModule(L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1553 for(i=0;clss->base_names[i];i++)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1554 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1555 if (clss->bases[i]==0) /* not found yet */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1556 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1557 /* lookup and cache the base class */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1558 swig_type_info *info = SWIG_TypeQueryModule(module,module,clss->base_names[i]);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1559 if (info) clss->bases[i] = (swig_lua_class *) info->clientdata;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1560 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1561 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1562 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1563
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1564 /* Register class static methods,attributes etc as well as constructor proxy */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1565 SWIGINTERN void SWIG_Lua_class_register_static(lua_State* L, swig_lua_class* clss)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1566 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1567 lua_checkstack(L,5); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1568 assert(lua_istable(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1569 assert(strcmp(clss->name, clss->cls_static.name) == 0); /* in class those 2 must be equal */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1570
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1571 SWIG_Lua_namespace_register(L,&clss->cls_static);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1572
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1573 SWIG_Lua_get_table(L,clss->name); // Get namespace table back
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1574 assert(lua_istable(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1575
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1576 /* add its constructor to module with the name of the class
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1577 so you can do MyClass(...) as well as new_MyClass(...)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1578 BUT only if a constructor is defined
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1579 (this overcomes the problem of pure virtual classes without constructors)*/
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1580 if (clss->constructor)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1581 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1582 SWIG_Lua_add_function(L,".constructor", clss->constructor);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1583 lua_getmetatable(L,-1);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1584 assert(lua_istable(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1585 SWIG_Lua_add_function(L,"__call", SWIG_Lua_constructor_proxy);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1586 lua_pop(L,1);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1587 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1588
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1589 assert(lua_istable(L,-1)); /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1590 SWIG_Lua_add_class_static_details(L, clss);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1591
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1592 /* clear stack */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1593 lua_pop(L,1);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1594 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1595
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1596 /* performs the entire class registration process */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1597 SWIGINTERN void SWIG_Lua_class_register(lua_State* L,swig_lua_class* clss)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1598 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1599 SWIG_Lua_class_register_static(L,clss);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1600
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1601 SWIG_Lua_get_class_registry(L); /* get the registry */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1602 lua_pushstring(L,clss->name); /* get the name */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1603 lua_newtable(L); /* create the metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1604 /* add string of class name called ".type" */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1605 lua_pushstring(L,".type");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1606 lua_pushstring(L,clss->name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1607 lua_rawset(L,-3);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1608 /* add a table called ".get" */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1609 lua_pushstring(L,".get");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1610 lua_newtable(L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1611 lua_rawset(L,-3);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1612 /* add a table called ".set" */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1613 lua_pushstring(L,".set");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1614 lua_newtable(L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1615 lua_rawset(L,-3);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1616 /* add a table called ".fn" */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1617 lua_pushstring(L,".fn");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1618 lua_newtable(L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1619 /* add manual disown method */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1620 SWIG_Lua_add_function(L,"__disown",SWIG_Lua_class_disown);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1621 lua_rawset(L,-3);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1622 /* add accessor fns for using the .get,.set&.fn */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1623 SWIG_Lua_add_function(L,"__index",SWIG_Lua_class_get);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1624 SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_class_set);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1625 SWIG_Lua_add_function(L,"__gc",SWIG_Lua_class_destruct);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1626 /* add tostring method for better output */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1627 SWIG_Lua_add_function(L,"__tostring",SWIG_Lua_class_tostring);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1628 /* add it */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1629 lua_rawset(L,-3); /* metatable into registry */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1630 lua_pop(L,1); /* tidy stack (remove registry) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1631
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1632 SWIG_Lua_get_class_metatable(L,clss->name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1633 SWIG_Lua_add_class_details(L,clss); /* recursive adding of details (atts & ops) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1634 lua_pop(L,1); /* tidy stack (remove class metatable) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1635 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1636
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1637 /* -----------------------------------------------------------------------------
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1638 * Class/structure conversion fns
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1639 * ----------------------------------------------------------------------------- */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1640
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1641 /* helper to add metatable to new lua object */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1642 SWIGINTERN void _SWIG_Lua_AddMetatable(lua_State* L,swig_type_info *type)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1643 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1644 if (type->clientdata) /* there is clientdata: so add the metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1645 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1646 SWIG_Lua_get_class_metatable(L,((swig_lua_class*)(type->clientdata))->name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1647 if (lua_istable(L,-1))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1648 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1649 lua_setmetatable(L,-2);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1650 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1651 else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1652 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1653 lua_pop(L,1);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1654 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1655 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1656 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1657
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1658 /* pushes a new object into the lua stack */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1659 SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State* L,void* ptr,swig_type_info *type, int own)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1660 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1661 swig_lua_userdata* usr;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1662 if (!ptr){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1663 lua_pushnil(L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1664 return;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1665 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1666 usr=(swig_lua_userdata*)lua_newuserdata(L,sizeof(swig_lua_userdata)); /* get data */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1667 usr->ptr=ptr; /* set the ptr */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1668 usr->type=type;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1669 usr->own=own;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1670 #if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1671 _SWIG_Lua_AddMetatable(L,type); /* add metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1672 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1673 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1674
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1675 /* takes a object from the lua stack & converts it into an object of the correct type
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1676 (if possible) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1677 SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State* L,int index,void** ptr,swig_type_info *type,int flags)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1678 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1679 swig_lua_userdata* usr;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1680 swig_cast_info *cast;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1681 if (lua_isnil(L,index)){*ptr=0; return SWIG_OK;} /* special case: lua nil => NULL pointer */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1682 usr=(swig_lua_userdata*)lua_touserdata(L,index); /* get data */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1683 if (usr)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1684 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1685 if (flags & SWIG_POINTER_DISOWN) /* must disown the object */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1686 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1687 usr->own=0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1688 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1689 if (!type) /* special cast void*, no casting fn */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1690 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1691 *ptr=usr->ptr;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1692 return SWIG_OK; /* ok */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1693 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1694 cast=SWIG_TypeCheckStruct(usr->type,type); /* performs normal type checking */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1695 if (cast)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1696 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1697 int newmemory = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1698 *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1699 assert(!newmemory); /* newmemory handling not yet implemented */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1700 return SWIG_OK; /* ok */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1701 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1702 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1703 return SWIG_ERROR; /* error */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1704 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1705
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1706 SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State* L,int index,swig_type_info *type,int flags,
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1707 int argnum,const char* func_name){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1708 void* result;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1709 if (!SWIG_IsOK(SWIG_ConvertPtr(L,index,&result,type,flags))){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1710 luaL_error (L,"Error in %s, expected a %s at argument number %d\n",
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1711 func_name,(type && type->str)?type->str:"void*",argnum);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1712 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1713 return result;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1714 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1715
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1716 /* pushes a packed userdata. user for member fn pointers only */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1717 SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State* L,void* ptr,size_t size,swig_type_info *type)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1718 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1719 swig_lua_rawdata* raw;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1720 assert(ptr); /* not acceptable to pass in a NULL value */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1721 raw=(swig_lua_rawdata*)lua_newuserdata(L,sizeof(swig_lua_rawdata)-1+size); /* alloc data */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1722 raw->type=type;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1723 raw->own=0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1724 memcpy(raw->data,ptr,size); /* copy the data */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1725 _SWIG_Lua_AddMetatable(L,type); /* add metatable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1726 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1727
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1728 /* converts a packed userdata. user for member fn pointers only */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1729 SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State* L,int index,void* ptr,size_t size,swig_type_info *type)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1730 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1731 swig_lua_rawdata* raw;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1732 raw=(swig_lua_rawdata*)lua_touserdata(L,index); /* get data */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1733 if (!raw) return SWIG_ERROR; /* error */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1734 if (type==0 || type==raw->type) /* void* or identical type */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1735 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1736 memcpy(ptr,raw->data,size); /* copy it */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1737 return SWIG_OK; /* ok */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1738 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1739 return SWIG_ERROR; /* error */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1740 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1741
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1742 /* a function to get the typestring of a piece of data */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1743 SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1744 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1745 swig_lua_userdata* usr;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1746 if (lua_isuserdata(L,tp))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1747 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1748 usr=(swig_lua_userdata*)lua_touserdata(L,tp); /* get data */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1749 if (usr && usr->type && usr->type->str)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1750 return usr->type->str;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1751 return "userdata (unknown type)";
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1752 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1753 return lua_typename(L,lua_type(L,tp));
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1754 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1755
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1756 /* lua callable function to get the userdata's type */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1757 SWIGRUNTIME int SWIG_Lua_type(lua_State* L)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1758 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1759 lua_pushstring(L,SWIG_Lua_typename(L,1));
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1760 return 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1761 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1762
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1763 /* lua callable function to compare userdata's value
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1764 the issue is that two userdata may point to the same thing
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1765 but to lua, they are different objects */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1766 SWIGRUNTIME int SWIG_Lua_equal(lua_State* L)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1767 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1768 int result;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1769 swig_lua_userdata *usr1,*usr2;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1770 if (!lua_isuserdata(L,1) || !lua_isuserdata(L,2)) /* just in case */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1771 return 0; /* nil reply */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1772 usr1=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1773 usr2=(swig_lua_userdata*)lua_touserdata(L,2); /* get data */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1774 /*result=(usr1->ptr==usr2->ptr && usr1->type==usr2->type); only works if type is the same*/
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1775 result=(usr1->ptr==usr2->ptr);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1776 lua_pushboolean(L,result);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1777 return 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1778 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1779
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1780 /* -----------------------------------------------------------------------------
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1781 * global variable support code: class/struct typemap functions
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1782 * ----------------------------------------------------------------------------- */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1783
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1784 #if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1785 /* Install Constants */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1786 SWIGINTERN void
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1787 SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1788 int i;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1789 for (i = 0; constants[i].type; i++) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1790 switch(constants[i].type) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1791 case SWIG_LUA_INT:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1792 lua_pushstring(L,constants[i].name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1793 lua_pushnumber(L,(lua_Number)constants[i].lvalue);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1794 lua_rawset(L,-3);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1795 break;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1796 case SWIG_LUA_FLOAT:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1797 lua_pushstring(L,constants[i].name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1798 lua_pushnumber(L,(lua_Number)constants[i].dvalue);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1799 lua_rawset(L,-3);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1800 break;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1801 case SWIG_LUA_CHAR:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1802 lua_pushstring(L,constants[i].name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1803 lua_pushfstring(L,"%c",(char)constants[i].lvalue);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1804 lua_rawset(L,-3);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1805 break;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1806 case SWIG_LUA_STRING:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1807 lua_pushstring(L,constants[i].name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1808 lua_pushstring(L,(char *) constants[i].pvalue);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1809 lua_rawset(L,-3);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1810 break;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1811 case SWIG_LUA_POINTER:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1812 lua_pushstring(L,constants[i].name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1813 SWIG_NewPointerObj(L,constants[i].pvalue, *(constants[i]).ptype,0);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1814 lua_rawset(L,-3);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1815 break;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1816 case SWIG_LUA_BINARY:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1817 lua_pushstring(L,constants[i].name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1818 SWIG_NewMemberObj(L,constants[i].pvalue,constants[i].lvalue,*(constants[i]).ptype);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1819 lua_rawset(L,-3);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1820 break;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1821 default:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1822 break;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1823 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1824 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1825 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1826 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1827
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1828 /* -----------------------------------------------------------------------------
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1829 * executing lua code from within the wrapper
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1830 * ----------------------------------------------------------------------------- */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1831
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1832 #ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1833 #define SWIG_DOSTRING_FAIL(S) fprintf(stderr,"%s\n",S)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1834 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1835 /* Executes a C string in Lua which is a really simple way of calling lua from C
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1836 Unfortunately lua keeps changing its APIs, so we need a conditional compile
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1837 In lua 5.0.X its lua_dostring()
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1838 In lua 5.1.X its luaL_dostring()
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1839 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1840 SWIGINTERN int
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1841 SWIG_Lua_dostring(lua_State *L, const char* str) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1842 int ok,top;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1843 if (str==0 || str[0]==0) return 0; /* nothing to do */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1844 top=lua_gettop(L); /* save stack */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1845 #if (defined(LUA_VERSION_NUM) && (LUA_VERSION_NUM>=501))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1846 ok=luaL_dostring(L,str); /* looks like this is lua 5.1.X or later, good */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1847 #else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1848 ok=lua_dostring(L,str); /* might be lua 5.0.x, using lua_dostring */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1849 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1850 if (ok!=0) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1851 SWIG_DOSTRING_FAIL(lua_tostring(L,-1));
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1852 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1853 lua_settop(L,top); /* restore the stack */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1854 return ok;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1855 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1856
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1857 #ifdef __cplusplus
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1858 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1859 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1860
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1861 /* ------------------------------ end luarun.swg ------------------------------ */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1862
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1863
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1864 /* -------- TYPES TABLE (BEGIN) -------- */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1865
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1866 #define SWIGTYPE_p_UIControl swig_types[0]
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1867 static swig_type_info *swig_types[2];
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1868 static swig_module_info swig_module = {swig_types, 1, 0, 0, 0, 0};
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1869 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1870 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1871
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1872 /* -------- TYPES TABLE (END) -------- */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1873
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1874 #define SWIG_name "UIControl"
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1875 #define SWIG_init luaopen_UIControl
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1876 #define SWIG_init_user luaopen_UIControl_user
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1877
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1878 #define SWIG_LUACODE luaopen_UIControl_luacode
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1879
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1880 namespace swig {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1881 typedef struct{} LANGUAGE_OBJ;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1882 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1883
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1884
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1885 #include "UIControl.h"
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1886
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1887 #ifdef __cplusplus
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1888 extern "C" {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1889 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1890 static int _wrap_UIControl_Show(lua_State* L) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1891 int SWIG_arg = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1892 UIControl *arg1 = (UIControl *) 0 ;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1893
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1894 SWIG_check_num_args("UIControl::Show",1,1)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1895 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("UIControl::Show",1,"UIControl *");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1896
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1897 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_UIControl,0))){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1898 SWIG_fail_ptr("UIControl_Show",1,SWIGTYPE_p_UIControl);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1899 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1900
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1901 (arg1)->Show();
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1902
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1903 return SWIG_arg;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1904
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1905 if(0) SWIG_fail;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1906
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1907 fail:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1908 lua_error(L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1909 return SWIG_arg;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1910 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1911
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1912
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1913 static int _wrap_UIControl_Focused(lua_State* L) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1914 int SWIG_arg = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1915 UIControl *arg1 = (UIControl *) 0 ;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1916 bool result;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1917
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1918 SWIG_check_num_args("UIControl::Focused",1,1)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1919 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("UIControl::Focused",1,"UIControl *");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1920
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1921 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_UIControl,0))){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1922 SWIG_fail_ptr("UIControl_Focused",1,SWIGTYPE_p_UIControl);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1923 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1924
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1925 result = (bool)(arg1)->Focused();
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1926 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1927 return SWIG_arg;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1928
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1929 if(0) SWIG_fail;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1930
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1931 fail:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1932 lua_error(L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1933 return SWIG_arg;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1934 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1935
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1936
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1937 static int _wrap_UIControl_OnKey(lua_State* L) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1938 int SWIG_arg = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1939 UIControl *arg1 = (UIControl *) 0 ;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1940 int arg2 ;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1941 bool result;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1942
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1943 SWIG_check_num_args("UIControl::OnKey",2,2)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1944 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("UIControl::OnKey",1,"UIControl *");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1945 if(!lua_isnumber(L,2)) SWIG_fail_arg("UIControl::OnKey",2,"int");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1946
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1947 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_UIControl,0))){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1948 SWIG_fail_ptr("UIControl_OnKey",1,SWIGTYPE_p_UIControl);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1949 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1950
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1951 arg2 = (int)lua_tonumber(L, 2);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1952 result = (bool)(arg1)->OnKey(arg2);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1953 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1954 return SWIG_arg;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1955
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1956 if(0) SWIG_fail;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1957
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1958 fail:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1959 lua_error(L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1960 return SWIG_arg;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1961 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1962
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1963
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1964 static int _wrap_UIControl_OnMouseLeftClick(lua_State* L) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1965 int SWIG_arg = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1966 UIControl *arg1 = (UIControl *) 0 ;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1967 int arg2 ;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1968 int arg3 ;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1969 bool result;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1970
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1971 SWIG_check_num_args("UIControl::OnMouseLeftClick",3,3)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1972 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("UIControl::OnMouseLeftClick",1,"UIControl *");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1973 if(!lua_isnumber(L,2)) SWIG_fail_arg("UIControl::OnMouseLeftClick",2,"int");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1974 if(!lua_isnumber(L,3)) SWIG_fail_arg("UIControl::OnMouseLeftClick",3,"int");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1975
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1976 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_UIControl,0))){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1977 SWIG_fail_ptr("UIControl_OnMouseLeftClick",1,SWIGTYPE_p_UIControl);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1978 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1979
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1980 arg2 = (int)lua_tonumber(L, 2);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1981 arg3 = (int)lua_tonumber(L, 3);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1982 result = (bool)(arg1)->OnMouseLeftClick(arg2,arg3);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1983 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1984 return SWIG_arg;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1985
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1986 if(0) SWIG_fail;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1987
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1988 fail:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1989 lua_error(L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1990 return SWIG_arg;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1991 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1992
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1993
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1994 static int _wrap_UIControl_OnMouseRightClick(lua_State* L) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1995 int SWIG_arg = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1996 UIControl *arg1 = (UIControl *) 0 ;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1997 int arg2 ;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1998 int arg3 ;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
1999 bool result;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2000
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2001 SWIG_check_num_args("UIControl::OnMouseRightClick",3,3)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2002 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("UIControl::OnMouseRightClick",1,"UIControl *");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2003 if(!lua_isnumber(L,2)) SWIG_fail_arg("UIControl::OnMouseRightClick",2,"int");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2004 if(!lua_isnumber(L,3)) SWIG_fail_arg("UIControl::OnMouseRightClick",3,"int");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2005
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2006 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_UIControl,0))){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2007 SWIG_fail_ptr("UIControl_OnMouseRightClick",1,SWIGTYPE_p_UIControl);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2008 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2009
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2010 arg2 = (int)lua_tonumber(L, 2);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2011 arg3 = (int)lua_tonumber(L, 3);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2012 result = (bool)(arg1)->OnMouseRightClick(arg2,arg3);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2013 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2014 return SWIG_arg;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2015
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2016 if(0) SWIG_fail;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2017
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2018 fail:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2019 lua_error(L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2020 return SWIG_arg;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2021 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2022
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2023
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2024 static int _wrap_UIControl_OnMouseEnter(lua_State* L) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2025 int SWIG_arg = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2026 UIControl *arg1 = (UIControl *) 0 ;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2027 bool result;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2028
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2029 SWIG_check_num_args("UIControl::OnMouseEnter",1,1)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2030 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("UIControl::OnMouseEnter",1,"UIControl *");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2031
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2032 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_UIControl,0))){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2033 SWIG_fail_ptr("UIControl_OnMouseEnter",1,SWIGTYPE_p_UIControl);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2034 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2035
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2036 result = (bool)(arg1)->OnMouseEnter();
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2037 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2038 return SWIG_arg;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2039
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2040 if(0) SWIG_fail;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2041
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2042 fail:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2043 lua_error(L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2044 return SWIG_arg;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2045 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2046
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2047
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2048 static int _wrap_UIControl_OnMouseLeave(lua_State* L) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2049 int SWIG_arg = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2050 UIControl *arg1 = (UIControl *) 0 ;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2051 bool result;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2052
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2053 SWIG_check_num_args("UIControl::OnMouseLeave",1,1)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2054 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("UIControl::OnMouseLeave",1,"UIControl *");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2055
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2056 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_UIControl,0))){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2057 SWIG_fail_ptr("UIControl_OnMouseLeave",1,SWIGTYPE_p_UIControl);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2058 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2059
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2060 result = (bool)(arg1)->OnMouseLeave();
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2061 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2062 return SWIG_arg;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2063
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2064 if(0) SWIG_fail;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2065
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2066 fail:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2067 lua_error(L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2068 return SWIG_arg;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2069 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2070
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2071
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2072 static int _wrap_UIControl_AddControl(lua_State* L) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2073 int SWIG_arg = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2074 UIControl *arg1 = (UIControl *) 0 ;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2075 UIControl *arg2 = (UIControl *) 0 ;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2076 bool result;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2077
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2078 SWIG_check_num_args("UIControl::AddControl",2,2)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2079 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("UIControl::AddControl",1,"UIControl *");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2080 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("UIControl::AddControl",2,"UIControl *");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2081
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2082 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_UIControl,0))){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2083 SWIG_fail_ptr("UIControl_AddControl",1,SWIGTYPE_p_UIControl);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2084 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2085
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2086
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2087 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_UIControl,0))){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2088 SWIG_fail_ptr("UIControl_AddControl",2,SWIGTYPE_p_UIControl);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2089 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2090
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2091 result = (bool)(arg1)->AddControl(arg2);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2092 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2093 return SWIG_arg;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2094
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2095 if(0) SWIG_fail;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2096
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2097 fail:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2098 lua_error(L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2099 return SWIG_arg;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2100 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2101
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2102
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2103 static int _wrap_UIControl_RemoveControl(lua_State* L) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2104 int SWIG_arg = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2105 UIControl *arg1 = (UIControl *) 0 ;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2106 UIControl *arg2 = (UIControl *) 0 ;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2107 bool result;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2108
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2109 SWIG_check_num_args("UIControl::RemoveControl",2,2)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2110 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("UIControl::RemoveControl",1,"UIControl *");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2111 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("UIControl::RemoveControl",2,"UIControl *");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2112
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2113 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_UIControl,0))){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2114 SWIG_fail_ptr("UIControl_RemoveControl",1,SWIGTYPE_p_UIControl);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2115 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2116
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2117
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2118 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_UIControl,0))){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2119 SWIG_fail_ptr("UIControl_RemoveControl",2,SWIGTYPE_p_UIControl);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2120 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2121
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2122 result = (bool)(arg1)->RemoveControl(arg2);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2123 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2124 return SWIG_arg;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2125
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2126 if(0) SWIG_fail;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2127
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2128 fail:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2129 lua_error(L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2130 return SWIG_arg;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2131 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2132
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2133
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2134 static void swig_delete_UIControl(void *obj) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2135 UIControl *arg1 = (UIControl *) obj;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2136 delete arg1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2137 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2138 static swig_lua_method swig_UIControl_methods[] = {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2139 {"Show", _wrap_UIControl_Show},
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2140 {"Focused", _wrap_UIControl_Focused},
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2141 {"OnKey", _wrap_UIControl_OnKey},
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2142 {"OnMouseLeftClick", _wrap_UIControl_OnMouseLeftClick},
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2143 {"OnMouseRightClick", _wrap_UIControl_OnMouseRightClick},
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2144 {"OnMouseEnter", _wrap_UIControl_OnMouseEnter},
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2145 {"OnMouseLeave", _wrap_UIControl_OnMouseLeave},
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2146 {"AddControl", _wrap_UIControl_AddControl},
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2147 {"RemoveControl", _wrap_UIControl_RemoveControl},
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2148 {0,0}
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2149 };
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2150 static swig_lua_attribute swig_UIControl_attributes[] = {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2151 {0,0,0}
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2152 };
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2153 static swig_lua_attribute swig_UIControl_cls_attributes[] = {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2154 {0,0,0}
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2155 };
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2156 static swig_lua_method swig_UIControl_cls_methods[] = {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2157 {0,0}
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2158 };
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2159 static swig_lua_const_info swig_UIControl_cls_constants[] = {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2160 {0,0,0,0,0,0}
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2161 };
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2162 static swig_lua_class *swig_UIControl_bases[] = {0};
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2163 static const char *swig_UIControl_base_names[] = {0};
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2164 static swig_lua_class _wrap_class_UIControl = { "UIControl", &SWIGTYPE_p_UIControl,0, swig_delete_UIControl, swig_UIControl_methods, swig_UIControl_attributes, { "UIControl", swig_UIControl_cls_methods, swig_UIControl_cls_attributes, swig_UIControl_cls_constants }, swig_UIControl_bases, swig_UIControl_base_names };
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2165
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2166 #ifdef __cplusplus
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2167 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2168 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2169
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2170 static const struct luaL_Reg swig_commands[] = {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2171 {0,0}
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2172 };
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2173
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2174 static swig_lua_var_info swig_variables[] = {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2175 {0,0,0}
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2176 };
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2177
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2178 static swig_lua_const_info swig_constants[] = {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2179 {0,0,0,0,0,0}
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2180 };
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2181
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2182 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2183
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2184 static swig_type_info _swigt__p_UIControl = {"_p_UIControl", "UIControl *", 0, 0, (void*)&_wrap_class_UIControl, 0};
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2185
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2186 static swig_type_info *swig_type_initial[] = {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2187 &_swigt__p_UIControl,
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2188 };
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2189
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2190 static swig_cast_info _swigc__p_UIControl[] = { {&_swigt__p_UIControl, 0, 0, 0},{0, 0, 0, 0}};
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2191
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2192 static swig_cast_info *swig_cast_initial[] = {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2193 _swigc__p_UIControl,
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2194 };
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2195
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2196
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2197 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2198
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2199 /* -----------------------------------------------------------------------------
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2200 * Type initialization:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2201 * This problem is tough by the requirement that no dynamic
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2202 * memory is used. Also, since swig_type_info structures store pointers to
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2203 * swig_cast_info structures and swig_cast_info structures store pointers back
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2204 * to swig_type_info structures, we need some lookup code at initialization.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2205 * The idea is that swig generates all the structures that are needed.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2206 * The runtime then collects these partially filled structures.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2207 * The SWIG_InitializeModule function takes these initial arrays out of
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2208 * swig_module, and does all the lookup, filling in the swig_module.types
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2209 * array with the correct data and linking the correct swig_cast_info
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2210 * structures together.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2211 *
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2212 * The generated swig_type_info structures are assigned staticly to an initial
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2213 * array. We just loop through that array, and handle each type individually.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2214 * First we lookup if this type has been already loaded, and if so, use the
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2215 * loaded structure instead of the generated one. Then we have to fill in the
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2216 * cast linked list. The cast data is initially stored in something like a
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2217 * two-dimensional array. Each row corresponds to a type (there are the same
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2218 * number of rows as there are in the swig_type_initial array). Each entry in
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2219 * a column is one of the swig_cast_info structures for that type.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2220 * The cast_initial array is actually an array of arrays, because each row has
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2221 * a variable number of columns. So to actually build the cast linked list,
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2222 * we find the array of casts associated with the type, and loop through it
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2223 * adding the casts to the list. The one last trick we need to do is making
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2224 * sure the type pointer in the swig_cast_info struct is correct.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2225 *
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2226 * First off, we lookup the cast->type name to see if it is already loaded.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2227 * There are three cases to handle:
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2228 * 1) If the cast->type has already been loaded AND the type we are adding
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2229 * casting info to has not been loaded (it is in this module), THEN we
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2230 * replace the cast->type pointer with the type pointer that has already
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2231 * been loaded.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2232 * 2) If BOTH types (the one we are adding casting info to, and the
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2233 * cast->type) are loaded, THEN the cast info has already been loaded by
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2234 * the previous module so we just ignore it.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2235 * 3) Finally, if cast->type has not already been loaded, then we add that
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2236 * swig_cast_info to the linked list (because the cast->type) pointer will
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2237 * be correct.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2238 * ----------------------------------------------------------------------------- */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2239
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2240 #ifdef __cplusplus
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2241 extern "C" {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2242 #if 0
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2243 } /* c-mode */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2244 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2245 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2246
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2247 #if 0
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2248 #define SWIGRUNTIME_DEBUG
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2249 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2250
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2251
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2252 SWIGRUNTIME void
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2253 SWIG_InitializeModule(void *clientdata) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2254 size_t i;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2255 swig_module_info *module_head, *iter;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2256 int found, init;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2257
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2258 /* check to see if the circular list has been setup, if not, set it up */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2259 if (swig_module.next==0) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2260 /* Initialize the swig_module */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2261 swig_module.type_initial = swig_type_initial;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2262 swig_module.cast_initial = swig_cast_initial;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2263 swig_module.next = &swig_module;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2264 init = 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2265 } else {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2266 init = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2267 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2268
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2269 /* Try and load any already created modules */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2270 module_head = SWIG_GetModule(clientdata);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2271 if (!module_head) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2272 /* This is the first module loaded for this interpreter */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2273 /* so set the swig module into the interpreter */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2274 SWIG_SetModule(clientdata, &swig_module);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2275 module_head = &swig_module;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2276 } else {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2277 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2278 found=0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2279 iter=module_head;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2280 do {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2281 if (iter==&swig_module) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2282 found=1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2283 break;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2284 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2285 iter=iter->next;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2286 } while (iter!= module_head);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2287
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2288 /* if the is found in the list, then all is done and we may leave */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2289 if (found) return;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2290 /* otherwise we must add out module into the list */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2291 swig_module.next = module_head->next;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2292 module_head->next = &swig_module;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2293 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2294
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2295 /* When multiple interpreters are used, a module could have already been initialized in
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2296 a different interpreter, but not yet have a pointer in this interpreter.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2297 In this case, we do not want to continue adding types... everything should be
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2298 set up already */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2299 if (init == 0) return;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2300
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2301 /* Now work on filling in swig_module.types */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2302 #ifdef SWIGRUNTIME_DEBUG
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2303 printf("SWIG_InitializeModule: size %d\n", swig_module.size);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2304 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2305 for (i = 0; i < swig_module.size; ++i) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2306 swig_type_info *type = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2307 swig_type_info *ret;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2308 swig_cast_info *cast;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2309
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2310 #ifdef SWIGRUNTIME_DEBUG
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2311 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2312 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2313
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2314 /* if there is another module already loaded */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2315 if (swig_module.next != &swig_module) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2316 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2317 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2318 if (type) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2319 /* Overwrite clientdata field */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2320 #ifdef SWIGRUNTIME_DEBUG
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2321 printf("SWIG_InitializeModule: found type %s\n", type->name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2322 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2323 if (swig_module.type_initial[i]->clientdata) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2324 type->clientdata = swig_module.type_initial[i]->clientdata;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2325 #ifdef SWIGRUNTIME_DEBUG
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2326 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2327 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2328 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2329 } else {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2330 type = swig_module.type_initial[i];
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2331 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2332
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2333 /* Insert casting types */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2334 cast = swig_module.cast_initial[i];
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2335 while (cast->type) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2336
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2337 /* Don't need to add information already in the list */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2338 ret = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2339 #ifdef SWIGRUNTIME_DEBUG
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2340 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2341 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2342 if (swig_module.next != &swig_module) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2343 ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2344 #ifdef SWIGRUNTIME_DEBUG
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2345 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2346 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2347 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2348 if (ret) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2349 if (type == swig_module.type_initial[i]) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2350 #ifdef SWIGRUNTIME_DEBUG
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2351 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2352 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2353 cast->type = ret;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2354 ret = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2355 } else {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2356 /* Check for casting already in the list */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2357 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2358 #ifdef SWIGRUNTIME_DEBUG
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2359 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2360 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2361 if (!ocast) ret = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2362 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2363 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2364
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2365 if (!ret) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2366 #ifdef SWIGRUNTIME_DEBUG
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2367 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2368 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2369 if (type->cast) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2370 type->cast->prev = cast;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2371 cast->next = type->cast;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2372 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2373 type->cast = cast;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2374 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2375 cast++;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2376 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2377 /* Set entry in modules->types array equal to the type */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2378 swig_module.types[i] = type;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2379 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2380 swig_module.types[i] = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2381
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2382 #ifdef SWIGRUNTIME_DEBUG
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2383 printf("**** SWIG_InitializeModule: Cast List ******\n");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2384 for (i = 0; i < swig_module.size; ++i) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2385 int j = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2386 swig_cast_info *cast = swig_module.cast_initial[i];
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2387 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2388 while (cast->type) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2389 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2390 cast++;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2391 ++j;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2392 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2393 printf("---- Total casts: %d\n",j);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2394 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2395 printf("**** SWIG_InitializeModule: Cast List ******\n");
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2396 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2397 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2398
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2399 /* This function will propagate the clientdata field of type to
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2400 * any new swig_type_info structures that have been added into the list
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2401 * of equivalent types. It is like calling
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2402 * SWIG_TypeClientData(type, clientdata) a second time.
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2403 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2404 SWIGRUNTIME void
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2405 SWIG_PropagateClientData(void) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2406 size_t i;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2407 swig_cast_info *equiv;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2408 static int init_run = 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2409
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2410 if (init_run) return;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2411 init_run = 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2412
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2413 for (i = 0; i < swig_module.size; i++) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2414 if (swig_module.types[i]->clientdata) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2415 equiv = swig_module.types[i]->cast;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2416 while (equiv) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2417 if (!equiv->converter) {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2418 if (equiv->type && !equiv->type->clientdata)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2419 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2420 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2421 equiv = equiv->next;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2422 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2423 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2424 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2425 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2426
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2427 #ifdef __cplusplus
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2428 #if 0
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2429 { /* c-mode */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2430 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2431 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2432 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2433
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2434
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2435
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2436 /* Forward declaration of where the user's %init{} gets inserted */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2437 void SWIG_init_user(lua_State* L );
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2438
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2439 #ifdef __cplusplus
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2440 extern "C" {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2441 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2442 /* this is the initialization function
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2443 added at the very end of the code
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2444 the function is always called SWIG_init, but an earlier #define will rename it
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2445 */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2446 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2447 LUALIB_API int SWIG_init(lua_State* L)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2448 #else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2449 SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2450 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2451 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2452 #if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) /* valid for both Lua and eLua */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2453 int i;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2454 /* start with global table */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2455 lua_pushglobaltable (L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2456 /* SWIG's internal initalisation */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2457 SWIG_InitializeModule((void*)L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2458 SWIG_PropagateClientData();
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2459 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2460
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2461 #if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2462 /* add a global fn */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2463 SWIG_Lua_add_function(L,"swig_type",SWIG_Lua_type);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2464 SWIG_Lua_add_function(L,"swig_equals",SWIG_Lua_equal);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2465 /* begin the module (its a table with the same name as the module) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2466 SWIG_Lua_module_begin(L,SWIG_name);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2467 /* add commands/functions */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2468 for (i = 0; swig_commands[i].name; i++){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2469 SWIG_Lua_module_add_function(L,swig_commands[i].name,swig_commands[i].func);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2470 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2471 /* add variables */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2472 for (i = 0; swig_variables[i].name; i++){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2473 SWIG_Lua_module_add_variable(L,swig_variables[i].name,swig_variables[i].get,swig_variables[i].set);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2474 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2475 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2476
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2477 #if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2478 /* set up base class pointers (the hierarchy) */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2479 for (i = 0; swig_types[i]; i++){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2480 if (swig_types[i]->clientdata){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2481 SWIG_Lua_init_base_class(L,(swig_lua_class*)(swig_types[i]->clientdata));
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2482 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2483 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2484 /* additional registration structs & classes in lua */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2485 for (i = 0; swig_types[i]; i++){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2486 if (swig_types[i]->clientdata){
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2487 SWIG_Lua_class_register(L,(swig_lua_class*)(swig_types[i]->clientdata));
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2488 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2489 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2490 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2491
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2492 #if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2493 /* constants */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2494 SWIG_Lua_InstallConstants(L,swig_constants);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2495 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2496
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2497 #if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2498 /* invoke user-specific initialization */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2499 SWIG_init_user(L);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2500 /* end module */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2501 /* Note: We do not clean up the stack here (Lua will do this for us). At this
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2502 point, we have the globals table and out module table on the stack. Returning
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2503 one value makes the module table the result of the require command. */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2504 return 1;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2505 #else
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2506 return 0;
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2507 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2508 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2509
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2510 #ifdef __cplusplus
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2511 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2512 #endif
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2513
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2514
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2515 const char* SWIG_LUACODE=
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2516 "";
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2517
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2518 void SWIG_init_user(lua_State* L)
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2519 {
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2520 /* exec Lua code if applicable */
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2521 SWIG_Lua_dostring(L,SWIG_LUACODE);
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2522 }
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents:
diff changeset
2523