added "install" instruction
[Leditor.git] / src / lqt_bind_QSize.cpp
blob9c4a4fb3df6732698bb54a759da6a5b88a5bdb1c
1 #include "lqt_bind_QSize.hpp"
3 int LuaBinder< QSize >::__LuaWrapCall__isValid (lua_State *L) {
4 QSize *& __lua__obj = *static_cast<QSize**>(lqtL_checkudata(L, 1, "QSize*"));
5 if (__lua__obj==0) {
6 lua_pushstring(L, "trying to reference deleted pointer");
7 lua_error(L);
8 return 0;
10 bool ret = __lua__obj->QSize::isValid();
11 lua_pushboolean(L, ret);
12 return 1;
14 int LuaBinder< QSize >::__LuaWrapCall__boundedTo (lua_State *L) {
15 QSize *& __lua__obj = *static_cast<QSize**>(lqtL_checkudata(L, 1, "QSize*"));
16 if (__lua__obj==0) {
17 lua_pushstring(L, "trying to reference deleted pointer");
18 lua_error(L);
19 return 0;
21 const QSize& arg1 = **static_cast<QSize**>(lqtL_checkudata(L, 2, "QSize*"));
22 QSize ret = __lua__obj->QSize::boundedTo(arg1);
23 lqtL_passudata(L, new QSize(ret), "QSize*");
24 return 1;
26 int LuaBinder< QSize >::__LuaWrapCall__scale__OverloadedVersion__1 (lua_State *L) {
27 QSize *& __lua__obj = *static_cast<QSize**>(lqtL_checkudata(L, 1, "QSize*"));
28 if (__lua__obj==0) {
29 lua_pushstring(L, "trying to reference deleted pointer");
30 lua_error(L);
31 return 0;
33 int arg1 = lua_tointeger(L, 2);
34 int arg2 = lua_tointeger(L, 3);
35 Qt::AspectRatioMode arg3 = static_cast<Qt::AspectRatioMode>(lqtL_toenum(L, 4, "Qt::AspectRatioMode"));
36 __lua__obj->QSize::scale(arg1, arg2, arg3);
37 return 0;
39 int LuaBinder< QSize >::__LuaWrapCall__scale__OverloadedVersion__2 (lua_State *L) {
40 QSize *& __lua__obj = *static_cast<QSize**>(lqtL_checkudata(L, 1, "QSize*"));
41 if (__lua__obj==0) {
42 lua_pushstring(L, "trying to reference deleted pointer");
43 lua_error(L);
44 return 0;
46 const QSize& arg1 = **static_cast<QSize**>(lqtL_checkudata(L, 2, "QSize*"));
47 Qt::AspectRatioMode arg2 = static_cast<Qt::AspectRatioMode>(lqtL_toenum(L, 3, "Qt::AspectRatioMode"));
48 __lua__obj->QSize::scale(arg1, arg2);
49 return 0;
51 int LuaBinder< QSize >::__LuaWrapCall__scale (lua_State *L) {
52 int score[3];
53 const int premium = 11+lua_gettop(L);
54 score[1] = 0;
55 score[1] += lqtL_testudata(L, 1, "QSize*")?premium:-premium*premium;
56 if (lua_isnumber(L, 2)) {
57 score[1] += premium;
58 } else if (false) {
59 score[1] += premium-1; // table: 0x1ee7fb0;
60 } else {
61 score[1] -= premium*premium;
63 if (lua_isnumber(L, 3)) {
64 score[1] += premium;
65 } else if (false) {
66 score[1] += premium-1; // table: 0x1ee79e0;
67 } else {
68 score[1] -= premium*premium;
70 if (lqtL_isenum(L, 4, "Qt::AspectRatioMode")) {
71 score[1] += premium;
72 } else if (false) {
73 score[1] += premium-1; // table: 0x1ee8460;
74 } else {
75 score[1] -= premium*premium;
77 score[2] = 0;
78 score[2] += lqtL_testudata(L, 1, "QSize*")?premium:-premium*premium;
79 if (lqtL_testudata(L, 2, "QSize*")) {
80 score[2] += premium;
81 } else if (false) {
82 score[2] += premium-1; // table: 0x1ee91c0;
83 } else {
84 score[2] -= premium*premium;
86 if (lqtL_isenum(L, 3, "Qt::AspectRatioMode")) {
87 score[2] += premium;
88 } else if (false) {
89 score[2] += premium-1; // table: 0x1ee8820;
90 } else {
91 score[2] -= premium*premium;
93 int best = 1;
94 for (int i=1;i<=2;i++) {
95 if (score[best] < score[i]) { best = i; }
97 switch (best) {
98 case 1: return __LuaWrapCall__scale__OverloadedVersion__1(L); break;
99 case 2: return __LuaWrapCall__scale__OverloadedVersion__2(L); break;
101 lua_pushstring(L, "no overload of function __LuaWrapCall__scale matching arguments");
102 lua_error(L);
103 return 0;
105 int LuaBinder< QSize >::__LuaWrapCall__setHeight (lua_State *L) {
106 QSize *& __lua__obj = *static_cast<QSize**>(lqtL_checkudata(L, 1, "QSize*"));
107 if (__lua__obj==0) {
108 lua_pushstring(L, "trying to reference deleted pointer");
109 lua_error(L);
110 return 0;
112 int arg1 = lua_tointeger(L, 2);
113 __lua__obj->QSize::setHeight(arg1);
114 return 0;
116 int LuaBinder< QSize >::__LuaWrapCall__rheight (lua_State *L) {
117 QSize *& __lua__obj = *static_cast<QSize**>(lqtL_checkudata(L, 1, "QSize*"));
118 if (__lua__obj==0) {
119 lua_pushstring(L, "trying to reference deleted pointer");
120 lua_error(L);
121 return 0;
123 int& ret = __lua__obj->QSize::rheight();
124 lua_pushinteger(L, ret);
125 return 1;
127 int LuaBinder< QSize >::__LuaWrapCall__width (lua_State *L) {
128 QSize *& __lua__obj = *static_cast<QSize**>(lqtL_checkudata(L, 1, "QSize*"));
129 if (__lua__obj==0) {
130 lua_pushstring(L, "trying to reference deleted pointer");
131 lua_error(L);
132 return 0;
134 int ret = __lua__obj->QSize::width();
135 lua_pushinteger(L, ret);
136 return 1;
138 int LuaBinder< QSize >::__LuaWrapCall__new__OverloadedVersion__2 (lua_State *L) {
139 QSize * ret = new LuaBinder< QSize >(L);
140 lqtL_passudata(L, ret, "QSize*");
141 return 1;
143 int LuaBinder< QSize >::__LuaWrapCall__new__OverloadedVersion__3 (lua_State *L) {
144 int arg1 = lua_tointeger(L, 1);
145 int arg2 = lua_tointeger(L, 2);
146 QSize * ret = new LuaBinder< QSize >(L, arg1, arg2);
147 lqtL_passudata(L, ret, "QSize*");
148 return 1;
150 int LuaBinder< QSize >::__LuaWrapCall__new (lua_State *L) {
151 int score[4];
152 const int premium = 11+lua_gettop(L);
153 score[2] = 0;
154 score[3] = 0;
155 if (lua_isnumber(L, 1)) {
156 score[3] += premium;
157 } else if (false) {
158 score[3] += premium-1; // table: 0x1ee34a0;
159 } else {
160 score[3] -= premium*premium;
162 if (lua_isnumber(L, 2)) {
163 score[3] += premium;
164 } else if (false) {
165 score[3] += premium-1; // table: 0x1ee39d0;
166 } else {
167 score[3] -= premium*premium;
169 int best = 1;
170 for (int i=1;i<=3;i++) {
171 if (score[best] < score[i]) { best = i; }
173 switch (best) {
174 case 2: return __LuaWrapCall__new__OverloadedVersion__2(L); break;
175 case 3: return __LuaWrapCall__new__OverloadedVersion__3(L); break;
177 lua_pushstring(L, "no overload of function __LuaWrapCall__new matching arguments");
178 lua_error(L);
179 return 0;
181 int LuaBinder< QSize >::__LuaWrapCall__rwidth (lua_State *L) {
182 QSize *& __lua__obj = *static_cast<QSize**>(lqtL_checkudata(L, 1, "QSize*"));
183 if (__lua__obj==0) {
184 lua_pushstring(L, "trying to reference deleted pointer");
185 lua_error(L);
186 return 0;
188 int& ret = __lua__obj->QSize::rwidth();
189 lua_pushinteger(L, ret);
190 return 1;
192 int LuaBinder< QSize >::__LuaWrapCall__setWidth (lua_State *L) {
193 QSize *& __lua__obj = *static_cast<QSize**>(lqtL_checkudata(L, 1, "QSize*"));
194 if (__lua__obj==0) {
195 lua_pushstring(L, "trying to reference deleted pointer");
196 lua_error(L);
197 return 0;
199 int arg1 = lua_tointeger(L, 2);
200 __lua__obj->QSize::setWidth(arg1);
201 return 0;
203 int LuaBinder< QSize >::__LuaWrapCall__isNull (lua_State *L) {
204 QSize *& __lua__obj = *static_cast<QSize**>(lqtL_checkudata(L, 1, "QSize*"));
205 if (__lua__obj==0) {
206 lua_pushstring(L, "trying to reference deleted pointer");
207 lua_error(L);
208 return 0;
210 bool ret = __lua__obj->QSize::isNull();
211 lua_pushboolean(L, ret);
212 return 1;
214 int LuaBinder< QSize >::__LuaWrapCall__height (lua_State *L) {
215 QSize *& __lua__obj = *static_cast<QSize**>(lqtL_checkudata(L, 1, "QSize*"));
216 if (__lua__obj==0) {
217 lua_pushstring(L, "trying to reference deleted pointer");
218 lua_error(L);
219 return 0;
221 int ret = __lua__obj->QSize::height();
222 lua_pushinteger(L, ret);
223 return 1;
225 int LuaBinder< QSize >::__LuaWrapCall__expandedTo (lua_State *L) {
226 QSize *& __lua__obj = *static_cast<QSize**>(lqtL_checkudata(L, 1, "QSize*"));
227 if (__lua__obj==0) {
228 lua_pushstring(L, "trying to reference deleted pointer");
229 lua_error(L);
230 return 0;
232 const QSize& arg1 = **static_cast<QSize**>(lqtL_checkudata(L, 2, "QSize*"));
233 QSize ret = __lua__obj->QSize::expandedTo(arg1);
234 lqtL_passudata(L, new QSize(ret), "QSize*");
235 return 1;
237 int LuaBinder< QSize >::__LuaWrapCall__isEmpty (lua_State *L) {
238 QSize *& __lua__obj = *static_cast<QSize**>(lqtL_checkudata(L, 1, "QSize*"));
239 if (__lua__obj==0) {
240 lua_pushstring(L, "trying to reference deleted pointer");
241 lua_error(L);
242 return 0;
244 bool ret = __lua__obj->QSize::isEmpty();
245 lua_pushboolean(L, ret);
246 return 1;
248 int LuaBinder< QSize >::__LuaWrapCall__transpose (lua_State *L) {
249 QSize *& __lua__obj = *static_cast<QSize**>(lqtL_checkudata(L, 1, "QSize*"));
250 if (__lua__obj==0) {
251 lua_pushstring(L, "trying to reference deleted pointer");
252 lua_error(L);
253 return 0;
255 __lua__obj->QSize::transpose();
256 return 0;
258 int luaopen_QSize (lua_State *L) {
259 if (luaL_newmetatable(L, "QSize*")) {
260 lua_pushcfunction(L, LuaBinder< QSize >::__LuaWrapCall__isValid);
261 lua_setfield(L, -2, "isValid");
262 lua_pushcfunction(L, LuaBinder< QSize >::__LuaWrapCall__boundedTo);
263 lua_setfield(L, -2, "boundedTo");
264 lua_pushcfunction(L, LuaBinder< QSize >::__LuaWrapCall__scale);
265 lua_setfield(L, -2, "scale");
266 lua_pushcfunction(L, LuaBinder< QSize >::__LuaWrapCall__setHeight);
267 lua_setfield(L, -2, "setHeight");
268 lua_pushcfunction(L, LuaBinder< QSize >::__LuaWrapCall__rheight);
269 lua_setfield(L, -2, "rheight");
270 lua_pushcfunction(L, LuaBinder< QSize >::__LuaWrapCall__width);
271 lua_setfield(L, -2, "width");
272 lua_pushcfunction(L, LuaBinder< QSize >::__LuaWrapCall__new);
273 lua_setfield(L, -2, "new");
274 lua_pushcfunction(L, LuaBinder< QSize >::__LuaWrapCall__rwidth);
275 lua_setfield(L, -2, "rwidth");
276 lua_pushcfunction(L, LuaBinder< QSize >::__LuaWrapCall__setWidth);
277 lua_setfield(L, -2, "setWidth");
278 lua_pushcfunction(L, LuaBinder< QSize >::__LuaWrapCall__isNull);
279 lua_setfield(L, -2, "isNull");
280 lua_pushcfunction(L, LuaBinder< QSize >::__LuaWrapCall__height);
281 lua_setfield(L, -2, "height");
282 lua_pushcfunction(L, LuaBinder< QSize >::__LuaWrapCall__expandedTo);
283 lua_setfield(L, -2, "expandedTo");
284 lua_pushcfunction(L, LuaBinder< QSize >::__LuaWrapCall__isEmpty);
285 lua_setfield(L, -2, "isEmpty");
286 lua_pushcfunction(L, LuaBinder< QSize >::__LuaWrapCall__transpose);
287 lua_setfield(L, -2, "transpose");
288 lua_newtable(L);
289 lua_setfield(L, -2, "__base");
290 lua_pushcfunction(L, lqtL_newindex);
291 lua_setfield(L, -2, "__newindex");
292 lua_pushcfunction(L, lqtL_index);
293 lua_setfield(L, -2, "__index");
294 lua_pushcfunction(L, lqtL_gc);
295 lua_setfield(L, -2, "__gc");
296 lua_pushstring(L, "QSize");
297 lua_setfield(L, -2, "__qtype");
298 lua_setglobal(L, "QSize");
299 } else {
300 lua_pop(L, 1);
302 return 0;