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*"));
6 lua_pushstring(L
, "trying to reference deleted pointer");
10 bool ret
= __lua__obj
->QSize::isValid();
11 lua_pushboolean(L
, ret
);
14 int LuaBinder
< QSize
>::__LuaWrapCall__boundedTo (lua_State
*L
) {
15 QSize
*& __lua__obj
= *static_cast<QSize
**>(lqtL_checkudata(L
, 1, "QSize*"));
17 lua_pushstring(L
, "trying to reference deleted pointer");
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*");
26 int LuaBinder
< QSize
>::__LuaWrapCall__scale__OverloadedVersion__1 (lua_State
*L
) {
27 QSize
*& __lua__obj
= *static_cast<QSize
**>(lqtL_checkudata(L
, 1, "QSize*"));
29 lua_pushstring(L
, "trying to reference deleted pointer");
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
);
39 int LuaBinder
< QSize
>::__LuaWrapCall__scale__OverloadedVersion__2 (lua_State
*L
) {
40 QSize
*& __lua__obj
= *static_cast<QSize
**>(lqtL_checkudata(L
, 1, "QSize*"));
42 lua_pushstring(L
, "trying to reference deleted pointer");
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
);
51 int LuaBinder
< QSize
>::__LuaWrapCall__scale (lua_State
*L
) {
53 const int premium
= 11+lua_gettop(L
);
55 score
[1] += lqtL_testudata(L
, 1, "QSize*")?premium
:-premium
*premium
;
56 if (lua_isnumber(L
, 2)) {
59 score
[1] += premium
-1; // table: 0x1ee7fb0;
61 score
[1] -= premium
*premium
;
63 if (lua_isnumber(L
, 3)) {
66 score
[1] += premium
-1; // table: 0x1ee79e0;
68 score
[1] -= premium
*premium
;
70 if (lqtL_isenum(L
, 4, "Qt::AspectRatioMode")) {
73 score
[1] += premium
-1; // table: 0x1ee8460;
75 score
[1] -= premium
*premium
;
78 score
[2] += lqtL_testudata(L
, 1, "QSize*")?premium
:-premium
*premium
;
79 if (lqtL_testudata(L
, 2, "QSize*")) {
82 score
[2] += premium
-1; // table: 0x1ee91c0;
84 score
[2] -= premium
*premium
;
86 if (lqtL_isenum(L
, 3, "Qt::AspectRatioMode")) {
89 score
[2] += premium
-1; // table: 0x1ee8820;
91 score
[2] -= premium
*premium
;
94 for (int i
=1;i
<=2;i
++) {
95 if (score
[best
] < score
[i
]) { best
= i
; }
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");
105 int LuaBinder
< QSize
>::__LuaWrapCall__setHeight (lua_State
*L
) {
106 QSize
*& __lua__obj
= *static_cast<QSize
**>(lqtL_checkudata(L
, 1, "QSize*"));
108 lua_pushstring(L
, "trying to reference deleted pointer");
112 int arg1
= lua_tointeger(L
, 2);
113 __lua__obj
->QSize::setHeight(arg1
);
116 int LuaBinder
< QSize
>::__LuaWrapCall__rheight (lua_State
*L
) {
117 QSize
*& __lua__obj
= *static_cast<QSize
**>(lqtL_checkudata(L
, 1, "QSize*"));
119 lua_pushstring(L
, "trying to reference deleted pointer");
123 int& ret
= __lua__obj
->QSize::rheight();
124 lua_pushinteger(L
, ret
);
127 int LuaBinder
< QSize
>::__LuaWrapCall__width (lua_State
*L
) {
128 QSize
*& __lua__obj
= *static_cast<QSize
**>(lqtL_checkudata(L
, 1, "QSize*"));
130 lua_pushstring(L
, "trying to reference deleted pointer");
134 int ret
= __lua__obj
->QSize::width();
135 lua_pushinteger(L
, ret
);
138 int LuaBinder
< QSize
>::__LuaWrapCall__new__OverloadedVersion__2 (lua_State
*L
) {
139 QSize
* ret
= new LuaBinder
< QSize
>(L
);
140 lqtL_passudata(L
, ret
, "QSize*");
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*");
150 int LuaBinder
< QSize
>::__LuaWrapCall__new (lua_State
*L
) {
152 const int premium
= 11+lua_gettop(L
);
155 if (lua_isnumber(L
, 1)) {
158 score
[3] += premium
-1; // table: 0x1ee34a0;
160 score
[3] -= premium
*premium
;
162 if (lua_isnumber(L
, 2)) {
165 score
[3] += premium
-1; // table: 0x1ee39d0;
167 score
[3] -= premium
*premium
;
170 for (int i
=1;i
<=3;i
++) {
171 if (score
[best
] < score
[i
]) { best
= i
; }
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");
181 int LuaBinder
< QSize
>::__LuaWrapCall__rwidth (lua_State
*L
) {
182 QSize
*& __lua__obj
= *static_cast<QSize
**>(lqtL_checkudata(L
, 1, "QSize*"));
184 lua_pushstring(L
, "trying to reference deleted pointer");
188 int& ret
= __lua__obj
->QSize::rwidth();
189 lua_pushinteger(L
, ret
);
192 int LuaBinder
< QSize
>::__LuaWrapCall__setWidth (lua_State
*L
) {
193 QSize
*& __lua__obj
= *static_cast<QSize
**>(lqtL_checkudata(L
, 1, "QSize*"));
195 lua_pushstring(L
, "trying to reference deleted pointer");
199 int arg1
= lua_tointeger(L
, 2);
200 __lua__obj
->QSize::setWidth(arg1
);
203 int LuaBinder
< QSize
>::__LuaWrapCall__isNull (lua_State
*L
) {
204 QSize
*& __lua__obj
= *static_cast<QSize
**>(lqtL_checkudata(L
, 1, "QSize*"));
206 lua_pushstring(L
, "trying to reference deleted pointer");
210 bool ret
= __lua__obj
->QSize::isNull();
211 lua_pushboolean(L
, ret
);
214 int LuaBinder
< QSize
>::__LuaWrapCall__height (lua_State
*L
) {
215 QSize
*& __lua__obj
= *static_cast<QSize
**>(lqtL_checkudata(L
, 1, "QSize*"));
217 lua_pushstring(L
, "trying to reference deleted pointer");
221 int ret
= __lua__obj
->QSize::height();
222 lua_pushinteger(L
, ret
);
225 int LuaBinder
< QSize
>::__LuaWrapCall__expandedTo (lua_State
*L
) {
226 QSize
*& __lua__obj
= *static_cast<QSize
**>(lqtL_checkudata(L
, 1, "QSize*"));
228 lua_pushstring(L
, "trying to reference deleted pointer");
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*");
237 int LuaBinder
< QSize
>::__LuaWrapCall__isEmpty (lua_State
*L
) {
238 QSize
*& __lua__obj
= *static_cast<QSize
**>(lqtL_checkudata(L
, 1, "QSize*"));
240 lua_pushstring(L
, "trying to reference deleted pointer");
244 bool ret
= __lua__obj
->QSize::isEmpty();
245 lua_pushboolean(L
, ret
);
248 int LuaBinder
< QSize
>::__LuaWrapCall__transpose (lua_State
*L
) {
249 QSize
*& __lua__obj
= *static_cast<QSize
**>(lqtL_checkudata(L
, 1, "QSize*"));
251 lua_pushstring(L
, "trying to reference deleted pointer");
255 __lua__obj
->QSize::transpose();
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");
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");