line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
/* |
2
|
|
|
|
|
|
|
* This file was generated automatically by ExtUtils::ParseXS version 3.44 from the |
3
|
|
|
|
|
|
|
* contents of Kiwisolver.xs. Do not edit this file, edit Kiwisolver.xs instead. |
4
|
|
|
|
|
|
|
* |
5
|
|
|
|
|
|
|
* ANY CHANGES MADE HERE WILL BE LOST! |
6
|
|
|
|
|
|
|
* |
7
|
|
|
|
|
|
|
*/ |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#line 1 "Kiwisolver.xs" |
10
|
|
|
|
|
|
|
#include <xs.h> |
11
|
|
|
|
|
|
|
using namespace xs; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
#include <kiwi/kiwi.h> |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
#include "Refcnt.xsi" |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
#line 18 "Kiwisolver_xsgen.cc" |
18
|
|
|
|
|
|
|
#ifndef PERL_UNUSED_VAR |
19
|
|
|
|
|
|
|
# define PERL_UNUSED_VAR(var) if (0) var = var |
20
|
|
|
|
|
|
|
#endif |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
#ifndef dVAR |
23
|
|
|
|
|
|
|
# define dVAR dNOOP |
24
|
|
|
|
|
|
|
#endif |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
/* This stuff is not part of the API! You have been warned. */ |
28
|
|
|
|
|
|
|
#ifndef PERL_VERSION_DECIMAL |
29
|
|
|
|
|
|
|
# define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s) |
30
|
|
|
|
|
|
|
#endif |
31
|
|
|
|
|
|
|
#ifndef PERL_DECIMAL_VERSION |
32
|
|
|
|
|
|
|
# define PERL_DECIMAL_VERSION \ |
33
|
|
|
|
|
|
|
PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION) |
34
|
|
|
|
|
|
|
#endif |
35
|
|
|
|
|
|
|
#ifndef PERL_VERSION_GE |
36
|
|
|
|
|
|
|
# define PERL_VERSION_GE(r,v,s) \ |
37
|
|
|
|
|
|
|
(PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s)) |
38
|
|
|
|
|
|
|
#endif |
39
|
|
|
|
|
|
|
#ifndef PERL_VERSION_LE |
40
|
|
|
|
|
|
|
# define PERL_VERSION_LE(r,v,s) \ |
41
|
|
|
|
|
|
|
(PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s)) |
42
|
|
|
|
|
|
|
#endif |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
/* XS_INTERNAL is the explicit static-linkage variant of the default |
45
|
|
|
|
|
|
|
* XS macro. |
46
|
|
|
|
|
|
|
* |
47
|
|
|
|
|
|
|
* XS_EXTERNAL is the same as XS_INTERNAL except it does not include |
48
|
|
|
|
|
|
|
* "STATIC", ie. it exports XSUB symbols. You probably don't want that |
49
|
|
|
|
|
|
|
* for anything but the BOOT XSUB. |
50
|
|
|
|
|
|
|
* |
51
|
|
|
|
|
|
|
* See XSUB.h in core! |
52
|
|
|
|
|
|
|
*/ |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
/* TODO: This might be compatible further back than 5.10.0. */ |
56
|
|
|
|
|
|
|
#if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1) |
57
|
|
|
|
|
|
|
# undef XS_EXTERNAL |
58
|
|
|
|
|
|
|
# undef XS_INTERNAL |
59
|
|
|
|
|
|
|
# if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING) |
60
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name) |
61
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC XSPROTO(name) |
62
|
|
|
|
|
|
|
# endif |
63
|
|
|
|
|
|
|
# if defined(__SYMBIAN32__) |
64
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) EXPORT_C XSPROTO(name) |
65
|
|
|
|
|
|
|
# define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name) |
66
|
|
|
|
|
|
|
# endif |
67
|
|
|
|
|
|
|
# ifndef XS_EXTERNAL |
68
|
|
|
|
|
|
|
# if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus) |
69
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__) |
70
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__) |
71
|
|
|
|
|
|
|
# else |
72
|
|
|
|
|
|
|
# ifdef __cplusplus |
73
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) extern "C" XSPROTO(name) |
74
|
|
|
|
|
|
|
# define XS_INTERNAL(name) static XSPROTO(name) |
75
|
|
|
|
|
|
|
# else |
76
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) XSPROTO(name) |
77
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC XSPROTO(name) |
78
|
|
|
|
|
|
|
# endif |
79
|
|
|
|
|
|
|
# endif |
80
|
|
|
|
|
|
|
# endif |
81
|
|
|
|
|
|
|
#endif |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
/* perl >= 5.10.0 && perl <= 5.15.1 */ |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
/* The XS_EXTERNAL macro is used for functions that must not be static |
87
|
|
|
|
|
|
|
* like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL |
88
|
|
|
|
|
|
|
* macro defined, the best we can do is assume XS is the same. |
89
|
|
|
|
|
|
|
* Dito for XS_INTERNAL. |
90
|
|
|
|
|
|
|
*/ |
91
|
|
|
|
|
|
|
#ifndef XS_EXTERNAL |
92
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) XS(name) |
93
|
|
|
|
|
|
|
#endif |
94
|
|
|
|
|
|
|
#ifndef XS_INTERNAL |
95
|
|
|
|
|
|
|
# define XS_INTERNAL(name) XS(name) |
96
|
|
|
|
|
|
|
#endif |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
/* Now, finally, after all this mess, we want an ExtUtils::ParseXS |
99
|
|
|
|
|
|
|
* internal macro that we're free to redefine for varying linkage due |
100
|
|
|
|
|
|
|
* to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use |
101
|
|
|
|
|
|
|
* XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to! |
102
|
|
|
|
|
|
|
*/ |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
#undef XS_EUPXS |
105
|
|
|
|
|
|
|
#if defined(PERL_EUPXS_ALWAYS_EXPORT) |
106
|
|
|
|
|
|
|
# define XS_EUPXS(name) XS_EXTERNAL(name) |
107
|
|
|
|
|
|
|
#else |
108
|
|
|
|
|
|
|
/* default to internal */ |
109
|
|
|
|
|
|
|
# define XS_EUPXS(name) XS_INTERNAL(name) |
110
|
|
|
|
|
|
|
#endif |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE |
113
|
|
|
|
|
|
|
#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params) |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
/* prototype to pass -Wmissing-prototypes */ |
116
|
|
|
|
|
|
|
STATIC void |
117
|
|
|
|
|
|
|
S_croak_xs_usage(const CV *const cv, const char *const params); |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
STATIC void |
120
|
|
|
|
|
|
|
S_croak_xs_usage(const CV *const cv, const char *const params) |
121
|
|
|
|
|
|
|
{ |
122
|
|
|
|
|
|
|
const GV *const gv = CvGV(cv); |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
PERL_ARGS_ASSERT_CROAK_XS_USAGE; |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
if (gv) { |
127
|
|
|
|
|
|
|
const char *const gvname = GvNAME(gv); |
128
|
|
|
|
|
|
|
const HV *const stash = GvSTASH(gv); |
129
|
|
|
|
|
|
|
const char *const hvname = stash ? HvNAME(stash) : NULL; |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
if (hvname) |
132
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params); |
133
|
|
|
|
|
|
|
else |
134
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: %s(%s)", gvname, params); |
135
|
|
|
|
|
|
|
} else { |
136
|
|
|
|
|
|
|
/* Pants. I don't think that it should be possible to get here. */ |
137
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params); |
138
|
|
|
|
|
|
|
} |
139
|
|
|
|
|
|
|
} |
140
|
|
|
|
|
|
|
#undef PERL_ARGS_ASSERT_CROAK_XS_USAGE |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
#define croak_xs_usage S_croak_xs_usage |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
#endif |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
/* NOTE: the prototype of newXSproto() is different in versions of perls, |
147
|
|
|
|
|
|
|
* so we define a portable version of newXSproto() |
148
|
|
|
|
|
|
|
*/ |
149
|
|
|
|
|
|
|
#ifdef newXS_flags |
150
|
|
|
|
|
|
|
#define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0) |
151
|
|
|
|
|
|
|
#else |
152
|
|
|
|
|
|
|
#define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv) |
153
|
|
|
|
|
|
|
#endif /* !defined(newXS_flags) */ |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
156
|
|
|
|
|
|
|
# define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file) |
157
|
|
|
|
|
|
|
#else |
158
|
|
|
|
|
|
|
# define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b) |
159
|
|
|
|
|
|
|
#endif |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
#line 162 "Kiwisolver_xsgen.cc" |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
/* INCLUDE: Including 'Variable.xsi' from 'Kiwisolver.xs' */ |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
#include <xs.h> |
166
|
|
|
|
|
|
|
#include <kiwi/kiwi.h> |
167
|
|
|
|
|
|
|
namespace xs { |
168
|
|
|
|
|
|
|
template <> |
169
|
|
|
|
|
|
|
struct Typemap<kiwi::Variable*> : TypemapObject<kiwi::Variable*, kiwi::Variable*, ObjectTypeRefcntPtr, ObjectStorageMG, StaticCast> { |
170
|
2
|
50
|
|
|
|
|
static std::string package () { return "Graphics::Layout::Kiwisolver::Variable"; } |
171
|
|
|
|
|
|
|
}; |
172
|
|
|
|
|
|
|
} |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
|
175
|
4994
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Variable_new) { xs::throw_guard(cv, [=]() |
176
|
|
|
|
|
|
|
{ |
177
|
2497
|
|
|
|
|
|
dVAR; dXSARGS; |
178
|
2497
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
50
|
|
|
|
|
|
179
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, name= \"\""); |
180
|
|
|
|
|
|
|
{ |
181
|
|
|
|
|
|
|
kiwi::Variable * RETVAL; |
182
|
2497
|
|
|
|
|
|
SV* CLASS = ST(0) |
183
|
|
|
|
|
|
|
; |
184
|
4994
|
|
|
|
|
|
std::string name; |
185
|
|
|
|
|
|
|
|
186
|
2497
|
100
|
|
|
|
|
if (items < 2) |
187
|
1283
|
50
|
|
|
|
|
name = ""; |
188
|
|
|
|
|
|
|
else { |
189
|
|
|
|
|
|
|
{ STRLEN __name_len; |
190
|
1214
|
50
|
|
|
|
|
const char* __name_buf = SvPV(ST(1), __name_len); |
|
|
0
|
|
|
|
|
|
191
|
1214
|
50
|
|
|
|
|
name.assign(__name_buf, __name_len); } |
192
|
|
|
|
|
|
|
; |
193
|
|
|
|
|
|
|
} |
194
|
|
|
|
|
|
|
#line 17 "./Variable.xsi" |
195
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
196
|
|
|
|
|
|
|
PROTO = CLASS; |
197
|
|
|
|
|
|
|
RETVAL = new kiwi::Variable(name); |
198
|
|
|
|
|
|
|
#line 199 "Kiwisolver_xsgen.cc" |
199
|
|
|
|
|
|
|
{ |
200
|
|
|
|
|
|
|
SV * RETVALSV; |
201
|
2497
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
202
|
2497
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
203
|
2497
|
|
|
|
|
|
ST(0) = RETVALSV; |
204
|
|
|
|
|
|
|
} |
205
|
|
|
|
|
|
|
} |
206
|
2497
|
|
|
|
|
|
XSRETURN(1); |
207
|
2497
|
50
|
|
|
|
|
}); } |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
|
211
|
54
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Variable_name) { xs::throw_guard(cv, [=]() |
212
|
|
|
|
|
|
|
{ |
213
|
27
|
|
|
|
|
|
dVAR; dXSARGS; |
214
|
27
|
50
|
|
|
|
|
if (items != 1) |
215
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
216
|
|
|
|
|
|
|
{ |
217
|
54
|
|
|
|
|
|
std::string RETVAL; |
218
|
27
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
219
|
27
|
50
|
|
|
|
|
kiwi::Variable* THIS = xs::in<kiwi::Variable *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
220
|
|
|
|
|
|
|
; |
221
|
|
|
|
|
|
|
#line 20 "./Variable.xsi" |
222
|
|
|
|
|
|
|
RETVAL = THIS->name(); |
223
|
|
|
|
|
|
|
#line 224 "Kiwisolver_xsgen.cc" |
224
|
27
|
|
|
|
|
|
XSprePUSH; |
225
|
27
|
50
|
|
|
|
|
PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
226
|
|
|
|
|
|
|
} |
227
|
27
|
|
|
|
|
|
XSRETURN(1); |
228
|
27
|
50
|
|
|
|
|
}); } |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
|
232
|
1026
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Variable_setName) { xs::throw_guard(cv, [=]() |
233
|
|
|
|
|
|
|
{ |
234
|
513
|
|
|
|
|
|
dVAR; dXSARGS; |
235
|
513
|
50
|
|
|
|
|
if (items != 2) |
236
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, name"); |
237
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
238
|
513
|
|
|
|
|
|
SP -= items; |
239
|
|
|
|
|
|
|
{ |
240
|
513
|
50
|
|
|
|
|
kiwi::Variable* THIS = xs::in<kiwi::Variable *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
241
|
|
|
|
|
|
|
; |
242
|
1026
|
|
|
|
|
|
std::string name; |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
{ STRLEN __name_len; |
245
|
513
|
50
|
|
|
|
|
const char* __name_buf = SvPV(ST(1), __name_len); |
|
|
0
|
|
|
|
|
|
246
|
513
|
50
|
|
|
|
|
name.assign(__name_buf, __name_len); } |
247
|
|
|
|
|
|
|
; |
248
|
|
|
|
|
|
|
#line 22 "./Variable.xsi" |
249
|
|
|
|
|
|
|
THIS->setName(name); |
250
|
|
|
|
|
|
|
#line 251 "Kiwisolver_xsgen.cc" |
251
|
513
|
|
|
|
|
|
PUTBACK; |
252
|
1026
|
|
|
|
|
|
return; |
253
|
|
|
|
|
|
|
} |
254
|
513
|
50
|
|
|
|
|
}); } |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
|
258
|
1568
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Variable_value) { xs::throw_guard(cv, [=]() |
259
|
|
|
|
|
|
|
{ |
260
|
784
|
|
|
|
|
|
dVAR; dXSARGS; |
261
|
784
|
50
|
|
|
|
|
if (items != 1) |
262
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
263
|
|
|
|
|
|
|
{ |
264
|
|
|
|
|
|
|
double RETVAL; |
265
|
784
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
266
|
784
|
50
|
|
|
|
|
kiwi::Variable* THIS = xs::in<kiwi::Variable *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
267
|
|
|
|
|
|
|
; |
268
|
|
|
|
|
|
|
#line 24 "./Variable.xsi" |
269
|
|
|
|
|
|
|
RETVAL = THIS->value(); |
270
|
|
|
|
|
|
|
#line 271 "Kiwisolver_xsgen.cc" |
271
|
784
|
|
|
|
|
|
XSprePUSH; |
272
|
784
|
100
|
|
|
|
|
PUSHn((double)RETVAL); |
|
|
50
|
|
|
|
|
|
273
|
|
|
|
|
|
|
} |
274
|
784
|
|
|
|
|
|
XSRETURN(1); |
275
|
784
|
50
|
|
|
|
|
}); } |
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
|
279
|
16
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Variable_setValue) { xs::throw_guard(cv, [=]() |
280
|
|
|
|
|
|
|
{ |
281
|
8
|
|
|
|
|
|
dVAR; dXSARGS; |
282
|
8
|
50
|
|
|
|
|
if (items != 2) |
283
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, value"); |
284
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
285
|
8
|
|
|
|
|
|
SP -= items; |
286
|
|
|
|
|
|
|
{ |
287
|
8
|
50
|
|
|
|
|
kiwi::Variable* THIS = xs::in<kiwi::Variable *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
288
|
|
|
|
|
|
|
; |
289
|
8
|
50
|
|
|
|
|
double value = (double)SvNV(ST(1)) |
290
|
|
|
|
|
|
|
; |
291
|
|
|
|
|
|
|
#line 26 "./Variable.xsi" |
292
|
|
|
|
|
|
|
THIS->setValue(value); |
293
|
|
|
|
|
|
|
#line 294 "Kiwisolver_xsgen.cc" |
294
|
8
|
|
|
|
|
|
PUTBACK; |
295
|
8
|
|
|
|
|
|
return; |
296
|
|
|
|
|
|
|
} |
297
|
8
|
50
|
|
|
|
|
}); } |
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
|
301
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Variable_equals) { xs::throw_guard(cv, [=]() |
302
|
|
|
|
|
|
|
{ |
303
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
304
|
2
|
50
|
|
|
|
|
if (items != 2) |
305
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
306
|
|
|
|
|
|
|
{ |
307
|
|
|
|
|
|
|
bool RETVAL; |
308
|
2
|
50
|
|
|
|
|
kiwi::Variable* THIS = xs::in<kiwi::Variable *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
309
|
|
|
|
|
|
|
; |
310
|
2
|
50
|
|
|
|
|
kiwi::Variable& other = xs::in<kiwi::Variable&>(ST(1)); |
311
|
|
|
|
|
|
|
; |
312
|
|
|
|
|
|
|
#line 28 "./Variable.xsi" |
313
|
|
|
|
|
|
|
RETVAL = THIS->equals(other); |
314
|
|
|
|
|
|
|
#line 315 "Kiwisolver_xsgen.cc" |
315
|
2
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
316
|
|
|
|
|
|
|
} |
317
|
2
|
|
|
|
|
|
XSRETURN(1); |
318
|
2
|
50
|
|
|
|
|
}); } |
319
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Kiwisolver.xs' from 'Variable.xsi' */ |
322
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
/* INCLUDE: Including 'Term.xsi' from 'Kiwisolver.xs' */ |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
#include <xs.h> |
327
|
|
|
|
|
|
|
#include <kiwi/kiwi.h> |
328
|
|
|
|
|
|
|
namespace xs { |
329
|
|
|
|
|
|
|
template <> |
330
|
|
|
|
|
|
|
struct Typemap<kiwi::Term*> : TypemapObject<kiwi::Term*, kiwi::Term*, ObjectTypePtr, ObjectStorageMG, StaticCast> { |
331
|
4
|
50
|
|
|
|
|
static std::string package () { return "Graphics::Layout::Kiwisolver::Term"; } |
332
|
|
|
|
|
|
|
}; |
333
|
|
|
|
|
|
|
} |
334
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
|
336
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Term_new) { xs::throw_guard(cv, [=]() |
337
|
|
|
|
|
|
|
{ |
338
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
339
|
0
|
0
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
0
|
|
|
|
|
|
340
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, variable, coefficient= 1.0"); |
341
|
|
|
|
|
|
|
{ |
342
|
|
|
|
|
|
|
kiwi::Term * RETVAL; |
343
|
0
|
|
|
|
|
|
SV* CLASS = ST(0) |
344
|
|
|
|
|
|
|
; |
345
|
0
|
0
|
|
|
|
|
kiwi::Variable* variable = xs::in<kiwi::Variable *>(ST(1)); |
346
|
|
|
|
|
|
|
; |
347
|
|
|
|
|
|
|
double coefficient; |
348
|
|
|
|
|
|
|
|
349
|
0
|
0
|
|
|
|
|
if (items < 3) |
350
|
0
|
|
|
|
|
|
coefficient = 1.0; |
351
|
|
|
|
|
|
|
else { |
352
|
0
|
|
|
|
|
|
coefficient = (double)SvNV(ST(2)) |
353
|
0
|
0
|
|
|
|
|
; |
|
|
0
|
|
|
|
|
|
354
|
|
|
|
|
|
|
} |
355
|
|
|
|
|
|
|
#line 17 "./Term.xsi" |
356
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
357
|
|
|
|
|
|
|
PROTO = CLASS; |
358
|
|
|
|
|
|
|
const kiwi::Variable& v = *variable; |
359
|
|
|
|
|
|
|
RETVAL = new kiwi::Term(v, coefficient); |
360
|
|
|
|
|
|
|
#line 361 "Kiwisolver_xsgen.cc" |
361
|
|
|
|
|
|
|
{ |
362
|
|
|
|
|
|
|
SV * RETVALSV; |
363
|
0
|
0
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
364
|
0
|
0
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
365
|
0
|
|
|
|
|
|
ST(0) = RETVALSV; |
366
|
|
|
|
|
|
|
} |
367
|
|
|
|
|
|
|
} |
368
|
0
|
|
|
|
|
|
XSRETURN(1); |
369
|
0
|
0
|
|
|
|
|
}); } |
370
|
|
|
|
|
|
|
|
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
|
373
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Term_variable) { xs::throw_guard(cv, [=]() |
374
|
|
|
|
|
|
|
{ |
375
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
376
|
3
|
50
|
|
|
|
|
if (items != 1) |
377
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
378
|
|
|
|
|
|
|
{ |
379
|
|
|
|
|
|
|
kiwi::Variable * RETVAL; |
380
|
3
|
50
|
|
|
|
|
kiwi::Term* THIS = xs::in<kiwi::Term *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
381
|
|
|
|
|
|
|
; |
382
|
|
|
|
|
|
|
#line 22 "./Term.xsi" |
383
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
384
|
|
|
|
|
|
|
RETVAL = &( const_cast<kiwi::Variable&>( THIS->variable() ) ); |
385
|
|
|
|
|
|
|
#line 386 "Kiwisolver_xsgen.cc" |
386
|
|
|
|
|
|
|
{ |
387
|
|
|
|
|
|
|
SV * RETVALSV; |
388
|
3
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
389
|
3
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
390
|
3
|
|
|
|
|
|
ST(0) = RETVALSV; |
391
|
|
|
|
|
|
|
} |
392
|
|
|
|
|
|
|
} |
393
|
3
|
|
|
|
|
|
XSRETURN(1); |
394
|
3
|
50
|
|
|
|
|
}); } |
395
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
|
398
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Term_coefficient) { xs::throw_guard(cv, [=]() |
399
|
|
|
|
|
|
|
{ |
400
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
401
|
3
|
50
|
|
|
|
|
if (items != 1) |
402
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
403
|
|
|
|
|
|
|
{ |
404
|
|
|
|
|
|
|
double RETVAL; |
405
|
3
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
406
|
3
|
50
|
|
|
|
|
kiwi::Term* THIS = xs::in<kiwi::Term *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
407
|
|
|
|
|
|
|
; |
408
|
|
|
|
|
|
|
#line 25 "./Term.xsi" |
409
|
|
|
|
|
|
|
RETVAL = THIS->coefficient(); |
410
|
|
|
|
|
|
|
#line 411 "Kiwisolver_xsgen.cc" |
411
|
3
|
|
|
|
|
|
XSprePUSH; |
412
|
3
|
100
|
|
|
|
|
PUSHn((double)RETVAL); |
|
|
50
|
|
|
|
|
|
413
|
|
|
|
|
|
|
} |
414
|
3
|
|
|
|
|
|
XSRETURN(1); |
415
|
3
|
50
|
|
|
|
|
}); } |
416
|
|
|
|
|
|
|
|
417
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
|
419
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Term_value) { xs::throw_guard(cv, [=]() |
420
|
|
|
|
|
|
|
{ |
421
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
422
|
3
|
50
|
|
|
|
|
if (items != 1) |
423
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
424
|
|
|
|
|
|
|
{ |
425
|
|
|
|
|
|
|
double RETVAL; |
426
|
3
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
427
|
3
|
50
|
|
|
|
|
kiwi::Term* THIS = xs::in<kiwi::Term *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
428
|
|
|
|
|
|
|
; |
429
|
|
|
|
|
|
|
#line 27 "./Term.xsi" |
430
|
|
|
|
|
|
|
RETVAL = THIS->value(); |
431
|
|
|
|
|
|
|
#line 432 "Kiwisolver_xsgen.cc" |
432
|
3
|
|
|
|
|
|
XSprePUSH; |
433
|
3
|
100
|
|
|
|
|
PUSHn((double)RETVAL); |
|
|
50
|
|
|
|
|
|
434
|
|
|
|
|
|
|
} |
435
|
3
|
|
|
|
|
|
XSRETURN(1); |
436
|
3
|
50
|
|
|
|
|
}); } |
437
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
|
439
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Kiwisolver.xs' from 'Term.xsi' */ |
440
|
|
|
|
|
|
|
|
441
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
/* INCLUDE: Including 'Expression.xsi' from 'Kiwisolver.xs' */ |
443
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
#include <xs.h> |
445
|
|
|
|
|
|
|
#include <kiwi/kiwi.h> |
446
|
|
|
|
|
|
|
namespace xs { |
447
|
|
|
|
|
|
|
template <> |
448
|
|
|
|
|
|
|
struct Typemap<kiwi::Expression*> : TypemapObject<kiwi::Expression*, kiwi::Expression*, ObjectTypePtr, ObjectStorageMG, StaticCast> { |
449
|
14
|
50
|
|
|
|
|
static std::string package () { return "Graphics::Layout::Kiwisolver::Expression"; } |
450
|
|
|
|
|
|
|
}; |
451
|
|
|
|
|
|
|
} |
452
|
|
|
|
|
|
|
|
453
|
|
|
|
|
|
|
|
454
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Expression_terms) { xs::throw_guard(cv, [=]() |
455
|
|
|
|
|
|
|
{ |
456
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
457
|
1
|
50
|
|
|
|
|
if (items != 1) |
458
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
459
|
|
|
|
|
|
|
{ |
460
|
2
|
|
|
|
|
|
std::vector<kiwi::Term * > RETVAL; |
461
|
1
|
50
|
|
|
|
|
kiwi::Expression* THIS = xs::in<kiwi::Expression *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
462
|
|
|
|
|
|
|
; |
463
|
|
|
|
|
|
|
#line 17 "./Expression.xsi" |
464
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
465
|
|
|
|
|
|
|
std::vector<kiwi::Term> terms = THIS->terms(); |
466
|
|
|
|
|
|
|
size_t n = terms.size(); |
467
|
|
|
|
|
|
|
RETVAL = std::vector<kiwi::Term*>(n); |
468
|
|
|
|
|
|
|
for( int i = 0; i < n; i++ ) { |
469
|
|
|
|
|
|
|
RETVAL[i] = new kiwi::Term(terms[i]); |
470
|
|
|
|
|
|
|
} |
471
|
|
|
|
|
|
|
#line 472 "Kiwisolver_xsgen.cc" |
472
|
|
|
|
|
|
|
{ |
473
|
|
|
|
|
|
|
SV * RETVALSV; |
474
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
475
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
476
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
477
|
|
|
|
|
|
|
} |
478
|
|
|
|
|
|
|
} |
479
|
1
|
|
|
|
|
|
XSRETURN(1); |
480
|
1
|
50
|
|
|
|
|
}); } |
481
|
|
|
|
|
|
|
|
482
|
|
|
|
|
|
|
|
483
|
|
|
|
|
|
|
|
484
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Expression_constant) { xs::throw_guard(cv, [=]() |
485
|
|
|
|
|
|
|
{ |
486
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
487
|
1
|
50
|
|
|
|
|
if (items != 1) |
488
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
489
|
|
|
|
|
|
|
{ |
490
|
|
|
|
|
|
|
double RETVAL; |
491
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
492
|
1
|
50
|
|
|
|
|
kiwi::Expression* THIS = xs::in<kiwi::Expression *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
493
|
|
|
|
|
|
|
; |
494
|
|
|
|
|
|
|
#line 25 "./Expression.xsi" |
495
|
|
|
|
|
|
|
RETVAL = THIS->constant(); |
496
|
|
|
|
|
|
|
#line 497 "Kiwisolver_xsgen.cc" |
497
|
1
|
|
|
|
|
|
XSprePUSH; |
498
|
1
|
50
|
|
|
|
|
PUSHn((double)RETVAL); |
|
|
50
|
|
|
|
|
|
499
|
|
|
|
|
|
|
} |
500
|
1
|
|
|
|
|
|
XSRETURN(1); |
501
|
1
|
50
|
|
|
|
|
}); } |
502
|
|
|
|
|
|
|
|
503
|
|
|
|
|
|
|
|
504
|
|
|
|
|
|
|
|
505
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Expression_value) { xs::throw_guard(cv, [=]() |
506
|
|
|
|
|
|
|
{ |
507
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
508
|
2
|
50
|
|
|
|
|
if (items != 1) |
509
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
510
|
|
|
|
|
|
|
{ |
511
|
|
|
|
|
|
|
double RETVAL; |
512
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
513
|
2
|
50
|
|
|
|
|
kiwi::Expression* THIS = xs::in<kiwi::Expression *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
514
|
|
|
|
|
|
|
; |
515
|
|
|
|
|
|
|
#line 27 "./Expression.xsi" |
516
|
|
|
|
|
|
|
RETVAL = THIS->value(); |
517
|
|
|
|
|
|
|
#line 518 "Kiwisolver_xsgen.cc" |
518
|
2
|
|
|
|
|
|
XSprePUSH; |
519
|
2
|
50
|
|
|
|
|
PUSHn((double)RETVAL); |
|
|
50
|
|
|
|
|
|
520
|
|
|
|
|
|
|
} |
521
|
2
|
|
|
|
|
|
XSRETURN(1); |
522
|
2
|
50
|
|
|
|
|
}); } |
523
|
|
|
|
|
|
|
|
524
|
|
|
|
|
|
|
|
525
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Kiwisolver.xs' from 'Expression.xsi' */ |
526
|
|
|
|
|
|
|
|
527
|
|
|
|
|
|
|
|
528
|
|
|
|
|
|
|
/* INCLUDE: Including 'Strength.xsi' from 'Kiwisolver.xs' */ |
529
|
|
|
|
|
|
|
|
530
|
|
|
|
|
|
|
#include <xs.h> |
531
|
|
|
|
|
|
|
#include <kiwi/kiwi.h> |
532
|
|
|
|
|
|
|
|
533
|
|
|
|
|
|
|
|
534
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Strength_create) { xs::throw_guard(cv, [=]() |
535
|
|
|
|
|
|
|
{ |
536
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
537
|
0
|
0
|
|
|
|
|
if (items < 3 || items > 4) |
|
|
0
|
|
|
|
|
|
538
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, c, w= 1.0"); |
539
|
|
|
|
|
|
|
{ |
540
|
|
|
|
|
|
|
double RETVAL; |
541
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
542
|
0
|
0
|
|
|
|
|
double a = (double)SvNV(ST(0)) |
|
|
0
|
|
|
|
|
|
543
|
|
|
|
|
|
|
; |
544
|
0
|
0
|
|
|
|
|
double b = (double)SvNV(ST(1)) |
|
|
0
|
|
|
|
|
|
545
|
|
|
|
|
|
|
; |
546
|
0
|
0
|
|
|
|
|
double c = (double)SvNV(ST(2)) |
|
|
0
|
|
|
|
|
|
547
|
|
|
|
|
|
|
; |
548
|
|
|
|
|
|
|
double w; |
549
|
|
|
|
|
|
|
|
550
|
0
|
0
|
|
|
|
|
if (items < 4) |
551
|
0
|
|
|
|
|
|
w = 1.0; |
552
|
|
|
|
|
|
|
else { |
553
|
0
|
|
|
|
|
|
w = (double)SvNV(ST(3)) |
554
|
0
|
0
|
|
|
|
|
; |
|
|
0
|
|
|
|
|
|
555
|
|
|
|
|
|
|
} |
556
|
|
|
|
|
|
|
#line 10 "./Strength.xsi" |
557
|
|
|
|
|
|
|
RETVAL = kiwi::strength::create(a, b, c, w); |
558
|
|
|
|
|
|
|
#line 559 "Kiwisolver_xsgen.cc" |
559
|
0
|
|
|
|
|
|
XSprePUSH; |
560
|
0
|
0
|
|
|
|
|
PUSHn((double)RETVAL); |
|
|
0
|
|
|
|
|
|
561
|
|
|
|
|
|
|
} |
562
|
0
|
|
|
|
|
|
XSRETURN(1); |
563
|
0
|
0
|
|
|
|
|
}); } |
564
|
|
|
|
|
|
|
|
565
|
|
|
|
|
|
|
|
566
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Kiwisolver.xs' from 'Strength.xsi' */ |
567
|
|
|
|
|
|
|
|
568
|
|
|
|
|
|
|
|
569
|
|
|
|
|
|
|
/* INCLUDE: Including 'Constraint.xsi' from 'Kiwisolver.xs' */ |
570
|
|
|
|
|
|
|
|
571
|
|
|
|
|
|
|
#include <xs.h> |
572
|
|
|
|
|
|
|
#include <kiwi/kiwi.h> |
573
|
|
|
|
|
|
|
namespace xs { |
574
|
|
|
|
|
|
|
template <> |
575
|
|
|
|
|
|
|
struct Typemap<kiwi::Constraint*> : TypemapObject<kiwi::Constraint*, kiwi::Constraint*, ObjectTypeRefcntPtr, ObjectStorageMG, StaticCast> { |
576
|
12
|
50
|
|
|
|
|
static std::string package () { return "Graphics::Layout::Kiwisolver::Constraint"; } |
577
|
|
|
|
|
|
|
}; |
578
|
|
|
|
|
|
|
} |
579
|
|
|
|
|
|
|
|
580
|
|
|
|
|
|
|
|
581
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Constraint_expression) { xs::throw_guard(cv, [=]() |
582
|
|
|
|
|
|
|
{ |
583
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
584
|
0
|
0
|
|
|
|
|
if (items != 1) |
585
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
586
|
|
|
|
|
|
|
{ |
587
|
|
|
|
|
|
|
kiwi::Expression * RETVAL; |
588
|
0
|
0
|
|
|
|
|
kiwi::Constraint* THIS = xs::in<kiwi::Constraint *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
589
|
|
|
|
|
|
|
; |
590
|
|
|
|
|
|
|
#line 17 "./Constraint.xsi" |
591
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
592
|
|
|
|
|
|
|
RETVAL = &( const_cast<kiwi::Expression&>( THIS->expression() ) ); |
593
|
|
|
|
|
|
|
#line 594 "Kiwisolver_xsgen.cc" |
594
|
|
|
|
|
|
|
{ |
595
|
|
|
|
|
|
|
SV * RETVALSV; |
596
|
0
|
0
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
597
|
0
|
0
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
598
|
0
|
|
|
|
|
|
ST(0) = RETVALSV; |
599
|
|
|
|
|
|
|
} |
600
|
|
|
|
|
|
|
} |
601
|
0
|
|
|
|
|
|
XSRETURN(1); |
602
|
0
|
0
|
|
|
|
|
}); } |
603
|
|
|
|
|
|
|
|
604
|
|
|
|
|
|
|
|
605
|
|
|
|
|
|
|
|
606
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Constraint_strength) { xs::throw_guard(cv, [=]() |
607
|
|
|
|
|
|
|
{ |
608
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
609
|
0
|
0
|
|
|
|
|
if (items != 1) |
610
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
611
|
|
|
|
|
|
|
{ |
612
|
|
|
|
|
|
|
double RETVAL; |
613
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
614
|
0
|
0
|
|
|
|
|
kiwi::Constraint* THIS = xs::in<kiwi::Constraint *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
615
|
|
|
|
|
|
|
; |
616
|
|
|
|
|
|
|
#line 20 "./Constraint.xsi" |
617
|
|
|
|
|
|
|
RETVAL = THIS->strength(); |
618
|
|
|
|
|
|
|
#line 619 "Kiwisolver_xsgen.cc" |
619
|
0
|
|
|
|
|
|
XSprePUSH; |
620
|
0
|
0
|
|
|
|
|
PUSHn((double)RETVAL); |
|
|
0
|
|
|
|
|
|
621
|
|
|
|
|
|
|
} |
622
|
0
|
|
|
|
|
|
XSRETURN(1); |
623
|
0
|
0
|
|
|
|
|
}); } |
624
|
|
|
|
|
|
|
|
625
|
|
|
|
|
|
|
|
626
|
|
|
|
|
|
|
|
627
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Constraint__op_neg) { xs::throw_guard(cv, [=]() |
628
|
|
|
|
|
|
|
{ |
629
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
630
|
0
|
0
|
|
|
|
|
if (items != 1) |
631
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
632
|
|
|
|
|
|
|
{ |
633
|
|
|
|
|
|
|
bool RETVAL; |
634
|
0
|
0
|
|
|
|
|
kiwi::Constraint* THIS = xs::in<kiwi::Constraint *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
635
|
|
|
|
|
|
|
; |
636
|
|
|
|
|
|
|
#line 23 "./Constraint.xsi" |
637
|
|
|
|
|
|
|
RETVAL = !(*THIS); |
638
|
|
|
|
|
|
|
#line 639 "Kiwisolver_xsgen.cc" |
639
|
0
|
0
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
640
|
|
|
|
|
|
|
} |
641
|
0
|
|
|
|
|
|
XSRETURN(1); |
642
|
0
|
0
|
|
|
|
|
}); } |
643
|
|
|
|
|
|
|
|
644
|
|
|
|
|
|
|
|
645
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Kiwisolver.xs' from 'Constraint.xsi' */ |
646
|
|
|
|
|
|
|
|
647
|
|
|
|
|
|
|
|
648
|
|
|
|
|
|
|
/* INCLUDE: Including 'Solver.xsi' from 'Kiwisolver.xs' */ |
649
|
|
|
|
|
|
|
|
650
|
|
|
|
|
|
|
#include <xs.h> |
651
|
|
|
|
|
|
|
#include <kiwi/kiwi.h> |
652
|
|
|
|
|
|
|
namespace xs { |
653
|
|
|
|
|
|
|
template <> |
654
|
|
|
|
|
|
|
struct Typemap<kiwi::Solver*> : TypemapObject<kiwi::Solver*, kiwi::Solver*, ObjectTypePtr, ObjectStorageMG, StaticCast> { |
655
|
0
|
0
|
|
|
|
|
static std::string package () { return "Graphics::Layout::Kiwisolver::Solver"; } |
656
|
|
|
|
|
|
|
}; |
657
|
|
|
|
|
|
|
} |
658
|
|
|
|
|
|
|
|
659
|
|
|
|
|
|
|
|
660
|
10
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Solver_new) { xs::throw_guard(cv, [=]() |
661
|
|
|
|
|
|
|
{ |
662
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
663
|
5
|
50
|
|
|
|
|
if (items != 1) |
664
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS"); |
665
|
|
|
|
|
|
|
{ |
666
|
|
|
|
|
|
|
kiwi::Solver * RETVAL; |
667
|
5
|
|
|
|
|
|
SV* CLASS = ST(0) |
668
|
|
|
|
|
|
|
; |
669
|
|
|
|
|
|
|
#line 16 "./Solver.xsi" |
670
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
671
|
|
|
|
|
|
|
PROTO = CLASS; |
672
|
|
|
|
|
|
|
RETVAL = new kiwi::Solver(); |
673
|
|
|
|
|
|
|
#line 674 "Kiwisolver_xsgen.cc" |
674
|
|
|
|
|
|
|
{ |
675
|
|
|
|
|
|
|
SV * RETVALSV; |
676
|
5
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
677
|
5
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
678
|
5
|
|
|
|
|
|
ST(0) = RETVALSV; |
679
|
|
|
|
|
|
|
} |
680
|
|
|
|
|
|
|
} |
681
|
5
|
|
|
|
|
|
XSRETURN(1); |
682
|
5
|
50
|
|
|
|
|
}); } |
683
|
|
|
|
|
|
|
|
684
|
|
|
|
|
|
|
|
685
|
|
|
|
|
|
|
|
686
|
4994
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Solver_addConstraint) { xs::throw_guard(cv, [=]() |
687
|
|
|
|
|
|
|
{ |
688
|
2497
|
|
|
|
|
|
dVAR; dXSARGS; |
689
|
2497
|
50
|
|
|
|
|
if (items != 2) |
690
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, constraint"); |
691
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
692
|
2497
|
|
|
|
|
|
SP -= items; |
693
|
|
|
|
|
|
|
{ |
694
|
2497
|
50
|
|
|
|
|
kiwi::Solver* THIS = xs::in<kiwi::Solver *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
695
|
|
|
|
|
|
|
; |
696
|
2497
|
|
|
|
|
|
kiwi::Constraint* constraint = xs::in<kiwi::Constraint *>(ST(1)); |
697
|
|
|
|
|
|
|
; |
698
|
|
|
|
|
|
|
#line 20 "./Solver.xsi" |
699
|
|
|
|
|
|
|
THIS->addConstraint( *constraint ); |
700
|
|
|
|
|
|
|
#line 701 "Kiwisolver_xsgen.cc" |
701
|
2497
|
|
|
|
|
|
PUTBACK; |
702
|
2497
|
|
|
|
|
|
return; |
703
|
|
|
|
|
|
|
} |
704
|
2497
|
50
|
|
|
|
|
}); } |
705
|
|
|
|
|
|
|
|
706
|
|
|
|
|
|
|
|
707
|
|
|
|
|
|
|
|
708
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Solver_removeConstraint) { xs::throw_guard(cv, [=]() |
709
|
|
|
|
|
|
|
{ |
710
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
711
|
0
|
0
|
|
|
|
|
if (items != 2) |
712
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, constraint"); |
713
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
714
|
0
|
|
|
|
|
|
SP -= items; |
715
|
|
|
|
|
|
|
{ |
716
|
0
|
0
|
|
|
|
|
kiwi::Solver* THIS = xs::in<kiwi::Solver *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
717
|
|
|
|
|
|
|
; |
718
|
0
|
|
|
|
|
|
kiwi::Constraint* constraint = xs::in<kiwi::Constraint *>(ST(1)); |
719
|
|
|
|
|
|
|
; |
720
|
|
|
|
|
|
|
#line 24 "./Solver.xsi" |
721
|
|
|
|
|
|
|
THIS->removeConstraint(*constraint); |
722
|
|
|
|
|
|
|
#line 723 "Kiwisolver_xsgen.cc" |
723
|
0
|
|
|
|
|
|
PUTBACK; |
724
|
0
|
|
|
|
|
|
return; |
725
|
|
|
|
|
|
|
} |
726
|
0
|
0
|
|
|
|
|
}); } |
727
|
|
|
|
|
|
|
|
728
|
|
|
|
|
|
|
|
729
|
|
|
|
|
|
|
|
730
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Solver_hasConstraint) { xs::throw_guard(cv, [=]() |
731
|
|
|
|
|
|
|
{ |
732
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
733
|
0
|
0
|
|
|
|
|
if (items != 2) |
734
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, constraint"); |
735
|
|
|
|
|
|
|
{ |
736
|
|
|
|
|
|
|
bool RETVAL; |
737
|
0
|
0
|
|
|
|
|
kiwi::Solver* THIS = xs::in<kiwi::Solver *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
738
|
|
|
|
|
|
|
; |
739
|
0
|
0
|
|
|
|
|
kiwi::Constraint* constraint = xs::in<kiwi::Constraint *>(ST(1)); |
740
|
|
|
|
|
|
|
; |
741
|
|
|
|
|
|
|
#line 28 "./Solver.xsi" |
742
|
|
|
|
|
|
|
RETVAL = THIS->hasConstraint(*constraint); |
743
|
|
|
|
|
|
|
#line 744 "Kiwisolver_xsgen.cc" |
744
|
0
|
0
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
745
|
|
|
|
|
|
|
} |
746
|
0
|
|
|
|
|
|
XSRETURN(1); |
747
|
0
|
0
|
|
|
|
|
}); } |
748
|
|
|
|
|
|
|
|
749
|
|
|
|
|
|
|
|
750
|
|
|
|
|
|
|
|
751
|
1438
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Solver_addEditVariable) { xs::throw_guard(cv, [=]() |
752
|
|
|
|
|
|
|
{ |
753
|
719
|
|
|
|
|
|
dVAR; dXSARGS; |
754
|
719
|
50
|
|
|
|
|
if (items != 3) |
755
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, variable, strength"); |
756
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
757
|
719
|
|
|
|
|
|
SP -= items; |
758
|
|
|
|
|
|
|
{ |
759
|
719
|
50
|
|
|
|
|
kiwi::Solver* THIS = xs::in<kiwi::Solver *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
760
|
|
|
|
|
|
|
; |
761
|
719
|
|
|
|
|
|
kiwi::Variable* variable = xs::in<kiwi::Variable *>(ST(1)); |
762
|
|
|
|
|
|
|
; |
763
|
719
|
50
|
|
|
|
|
double strength = (double)SvNV(ST(2)) |
764
|
|
|
|
|
|
|
; |
765
|
|
|
|
|
|
|
#line 32 "./Solver.xsi" |
766
|
|
|
|
|
|
|
THIS->addEditVariable(*variable, strength); |
767
|
|
|
|
|
|
|
#line 768 "Kiwisolver_xsgen.cc" |
768
|
719
|
|
|
|
|
|
PUTBACK; |
769
|
719
|
|
|
|
|
|
return; |
770
|
|
|
|
|
|
|
} |
771
|
719
|
50
|
|
|
|
|
}); } |
772
|
|
|
|
|
|
|
|
773
|
|
|
|
|
|
|
|
774
|
|
|
|
|
|
|
|
775
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Solver_removeEditVariable) { xs::throw_guard(cv, [=]() |
776
|
|
|
|
|
|
|
{ |
777
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
778
|
0
|
0
|
|
|
|
|
if (items != 2) |
779
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, variable"); |
780
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
781
|
0
|
|
|
|
|
|
SP -= items; |
782
|
|
|
|
|
|
|
{ |
783
|
0
|
0
|
|
|
|
|
kiwi::Solver* THIS = xs::in<kiwi::Solver *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
784
|
|
|
|
|
|
|
; |
785
|
0
|
|
|
|
|
|
kiwi::Variable* variable = xs::in<kiwi::Variable *>(ST(1)); |
786
|
|
|
|
|
|
|
; |
787
|
|
|
|
|
|
|
#line 36 "./Solver.xsi" |
788
|
|
|
|
|
|
|
THIS->removeEditVariable(*variable); |
789
|
|
|
|
|
|
|
#line 790 "Kiwisolver_xsgen.cc" |
790
|
0
|
|
|
|
|
|
PUTBACK; |
791
|
0
|
|
|
|
|
|
return; |
792
|
|
|
|
|
|
|
} |
793
|
0
|
0
|
|
|
|
|
}); } |
794
|
|
|
|
|
|
|
|
795
|
|
|
|
|
|
|
|
796
|
|
|
|
|
|
|
|
797
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Solver_hasEditVariable) { xs::throw_guard(cv, [=]() |
798
|
|
|
|
|
|
|
{ |
799
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
800
|
0
|
0
|
|
|
|
|
if (items != 2) |
801
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, variable"); |
802
|
|
|
|
|
|
|
{ |
803
|
|
|
|
|
|
|
bool RETVAL; |
804
|
0
|
0
|
|
|
|
|
kiwi::Solver* THIS = xs::in<kiwi::Solver *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
805
|
|
|
|
|
|
|
; |
806
|
0
|
0
|
|
|
|
|
kiwi::Variable* variable = xs::in<kiwi::Variable *>(ST(1)); |
807
|
|
|
|
|
|
|
; |
808
|
|
|
|
|
|
|
#line 40 "./Solver.xsi" |
809
|
|
|
|
|
|
|
THIS->hasEditVariable(*variable); |
810
|
|
|
|
|
|
|
#line 811 "Kiwisolver_xsgen.cc" |
811
|
0
|
0
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
812
|
|
|
|
|
|
|
} |
813
|
0
|
|
|
|
|
|
XSRETURN(1); |
814
|
0
|
0
|
|
|
|
|
}); } |
815
|
|
|
|
|
|
|
|
816
|
|
|
|
|
|
|
|
817
|
|
|
|
|
|
|
|
818
|
1238
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Solver_suggestValue) { xs::throw_guard(cv, [=]() |
819
|
|
|
|
|
|
|
{ |
820
|
619
|
|
|
|
|
|
dVAR; dXSARGS; |
821
|
619
|
50
|
|
|
|
|
if (items != 3) |
822
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, variable, value"); |
823
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
824
|
619
|
|
|
|
|
|
SP -= items; |
825
|
|
|
|
|
|
|
{ |
826
|
619
|
50
|
|
|
|
|
kiwi::Solver* THIS = xs::in<kiwi::Solver *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
827
|
|
|
|
|
|
|
; |
828
|
619
|
|
|
|
|
|
kiwi::Variable* variable = xs::in<kiwi::Variable *>(ST(1)); |
829
|
|
|
|
|
|
|
; |
830
|
619
|
100
|
|
|
|
|
double value = (double)SvNV(ST(2)) |
831
|
|
|
|
|
|
|
; |
832
|
|
|
|
|
|
|
#line 44 "./Solver.xsi" |
833
|
|
|
|
|
|
|
THIS->suggestValue(*variable, value); |
834
|
|
|
|
|
|
|
#line 835 "Kiwisolver_xsgen.cc" |
835
|
619
|
|
|
|
|
|
PUTBACK; |
836
|
619
|
|
|
|
|
|
return; |
837
|
|
|
|
|
|
|
} |
838
|
619
|
50
|
|
|
|
|
}); } |
839
|
|
|
|
|
|
|
|
840
|
|
|
|
|
|
|
|
841
|
|
|
|
|
|
|
|
842
|
16
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Solver_updateVariables) { xs::throw_guard(cv, [=]() |
843
|
|
|
|
|
|
|
{ |
844
|
8
|
|
|
|
|
|
dVAR; dXSARGS; |
845
|
8
|
50
|
|
|
|
|
if (items != 1) |
846
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
847
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
848
|
8
|
|
|
|
|
|
SP -= items; |
849
|
|
|
|
|
|
|
{ |
850
|
8
|
50
|
|
|
|
|
kiwi::Solver* THIS = xs::in<kiwi::Solver *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
851
|
|
|
|
|
|
|
; |
852
|
|
|
|
|
|
|
#line 47 "./Solver.xsi" |
853
|
|
|
|
|
|
|
THIS->updateVariables(); |
854
|
|
|
|
|
|
|
#line 855 "Kiwisolver_xsgen.cc" |
855
|
8
|
|
|
|
|
|
PUTBACK; |
856
|
8
|
|
|
|
|
|
return; |
857
|
|
|
|
|
|
|
} |
858
|
8
|
50
|
|
|
|
|
}); } |
859
|
|
|
|
|
|
|
|
860
|
|
|
|
|
|
|
|
861
|
|
|
|
|
|
|
|
862
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Solver_reset) { xs::throw_guard(cv, [=]() |
863
|
|
|
|
|
|
|
{ |
864
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
865
|
0
|
0
|
|
|
|
|
if (items != 1) |
866
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
867
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
868
|
0
|
|
|
|
|
|
SP -= items; |
869
|
|
|
|
|
|
|
{ |
870
|
0
|
0
|
|
|
|
|
kiwi::Solver* THIS = xs::in<kiwi::Solver *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
871
|
|
|
|
|
|
|
; |
872
|
|
|
|
|
|
|
#line 49 "./Solver.xsi" |
873
|
|
|
|
|
|
|
THIS->reset(); |
874
|
|
|
|
|
|
|
#line 875 "Kiwisolver_xsgen.cc" |
875
|
0
|
|
|
|
|
|
PUTBACK; |
876
|
0
|
|
|
|
|
|
return; |
877
|
|
|
|
|
|
|
} |
878
|
0
|
0
|
|
|
|
|
}); } |
879
|
|
|
|
|
|
|
|
880
|
|
|
|
|
|
|
|
881
|
|
|
|
|
|
|
|
882
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Solver_dump) { xs::throw_guard(cv, [=]() |
883
|
|
|
|
|
|
|
{ |
884
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
885
|
0
|
0
|
|
|
|
|
if (items != 1) |
886
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
887
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
888
|
0
|
|
|
|
|
|
SP -= items; |
889
|
|
|
|
|
|
|
{ |
890
|
0
|
0
|
|
|
|
|
kiwi::Solver* THIS = xs::in<kiwi::Solver *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
891
|
|
|
|
|
|
|
; |
892
|
|
|
|
|
|
|
#line 51 "./Solver.xsi" |
893
|
|
|
|
|
|
|
THIS->dump(); |
894
|
|
|
|
|
|
|
#line 895 "Kiwisolver_xsgen.cc" |
895
|
0
|
|
|
|
|
|
PUTBACK; |
896
|
0
|
|
|
|
|
|
return; |
897
|
|
|
|
|
|
|
} |
898
|
0
|
0
|
|
|
|
|
}); } |
899
|
|
|
|
|
|
|
|
900
|
|
|
|
|
|
|
|
901
|
|
|
|
|
|
|
|
902
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Solver_dumps) { xs::throw_guard(cv, [=]() |
903
|
|
|
|
|
|
|
{ |
904
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
905
|
0
|
0
|
|
|
|
|
if (items != 1) |
906
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
907
|
|
|
|
|
|
|
{ |
908
|
0
|
|
|
|
|
|
std::string RETVAL; |
909
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
910
|
0
|
0
|
|
|
|
|
kiwi::Solver* THIS = xs::in<kiwi::Solver *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
911
|
|
|
|
|
|
|
; |
912
|
|
|
|
|
|
|
#line 53 "./Solver.xsi" |
913
|
|
|
|
|
|
|
RETVAL = THIS->dumps(); |
914
|
|
|
|
|
|
|
#line 915 "Kiwisolver_xsgen.cc" |
915
|
0
|
|
|
|
|
|
XSprePUSH; |
916
|
0
|
0
|
|
|
|
|
PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
917
|
|
|
|
|
|
|
} |
918
|
0
|
|
|
|
|
|
XSRETURN(1); |
919
|
0
|
0
|
|
|
|
|
}); } |
920
|
|
|
|
|
|
|
|
921
|
|
|
|
|
|
|
|
922
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Kiwisolver.xs' from 'Solver.xsi' */ |
923
|
|
|
|
|
|
|
|
924
|
|
|
|
|
|
|
|
925
|
|
|
|
|
|
|
/* INCLUDE: Including 'Symbolics.xsi' from 'Kiwisolver.xs' */ |
926
|
|
|
|
|
|
|
|
927
|
|
|
|
|
|
|
#include <xs.h> |
928
|
|
|
|
|
|
|
#include <kiwi/kiwi.h> |
929
|
|
|
|
|
|
|
#define KIWI_MODULE_NS "Graphics::Layout::Kiwisolver::" |
930
|
|
|
|
|
|
|
#define KIWI_CLASS(x) (KIWI_MODULE_NS ## x) |
931
|
|
|
|
|
|
|
|
932
|
|
|
|
|
|
|
/* INCLUDE_COMMAND: Including output of '/usr/local/bin/perl inc/symbolics.pl' from 'Symbolics.xsi' */ |
933
|
|
|
|
|
|
|
|
934
|
|
|
|
|
|
|
|
935
|
|
|
|
|
|
|
|
936
|
2200
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Constraint__op_or) { xs::throw_guard(cv, [=]() |
937
|
|
|
|
|
|
|
{ |
938
|
1100
|
|
|
|
|
|
dVAR; dXSARGS; |
939
|
1100
|
50
|
|
|
|
|
if (items != 3) |
940
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
941
|
|
|
|
|
|
|
{ |
942
|
|
|
|
|
|
|
SV * RETVAL; |
943
|
1100
|
50
|
|
|
|
|
kiwi::Constraint* a = xs::in<kiwi::Constraint *>(ST(0)); |
944
|
|
|
|
|
|
|
; |
945
|
2200
|
|
|
|
|
|
Sv b = ST(1) |
946
|
|
|
|
|
|
|
; |
947
|
1100
|
50
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
948
|
|
|
|
|
|
|
; |
949
|
|
|
|
|
|
|
#line 7 "/usr/local/bin/perl inc/symbolics.pl" |
950
|
|
|
|
|
|
|
if( ! b.defined() ) { |
951
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation | with undef operand" ); |
952
|
|
|
|
|
|
|
} |
953
|
|
|
|
|
|
|
|
954
|
|
|
|
|
|
|
else |
955
|
|
|
|
|
|
|
// Constraint operator|( const Constraint& constraint, double strength ) (SWAP) |
956
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
957
|
|
|
|
|
|
|
kiwi::Constraint* result; |
958
|
|
|
|
|
|
|
if( ! swap ) { |
959
|
|
|
|
|
|
|
result = new kiwi::Constraint ( *a | ( xs::in<double>(b) ) ); |
960
|
|
|
|
|
|
|
} else { |
961
|
|
|
|
|
|
|
result = new kiwi::Constraint ( ( xs::in<double>(b) ) | *a ); |
962
|
|
|
|
|
|
|
} |
963
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
964
|
|
|
|
|
|
|
} |
965
|
|
|
|
|
|
|
#line 966 "Kiwisolver_xsgen.cc" |
966
|
1100
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
967
|
1100
|
|
|
|
|
|
ST(0) = RETVAL; |
968
|
|
|
|
|
|
|
} |
969
|
1100
|
|
|
|
|
|
XSRETURN(1); |
970
|
1100
|
50
|
|
|
|
|
}); } |
971
|
|
|
|
|
|
|
|
972
|
|
|
|
|
|
|
|
973
|
|
|
|
|
|
|
|
974
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Expression__op_neg) { xs::throw_guard(cv, [=]() |
975
|
|
|
|
|
|
|
{ |
976
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
977
|
1
|
50
|
|
|
|
|
if (items != 3) |
978
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
979
|
|
|
|
|
|
|
{ |
980
|
|
|
|
|
|
|
SV * RETVAL; |
981
|
1
|
50
|
|
|
|
|
kiwi::Expression* a = xs::in<kiwi::Expression *>(ST(0)); |
982
|
|
|
|
|
|
|
; |
983
|
2
|
|
|
|
|
|
Sv b = ST(1) |
984
|
|
|
|
|
|
|
; |
985
|
1
|
50
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
986
|
|
|
|
|
|
|
; |
987
|
|
|
|
|
|
|
#line 30 "/usr/local/bin/perl inc/symbolics.pl" |
988
|
|
|
|
|
|
|
// Expression operator-( const Expression& expression ) |
989
|
|
|
|
|
|
|
kiwi::Expression* result = new kiwi::Expression ( - (*a) ); |
990
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
991
|
|
|
|
|
|
|
#line 992 "Kiwisolver_xsgen.cc" |
992
|
1
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
993
|
1
|
|
|
|
|
|
ST(0) = RETVAL; |
994
|
|
|
|
|
|
|
} |
995
|
1
|
|
|
|
|
|
XSRETURN(1); |
996
|
1
|
50
|
|
|
|
|
}); } |
997
|
|
|
|
|
|
|
|
998
|
|
|
|
|
|
|
|
999
|
|
|
|
|
|
|
|
1000
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Expression__op_mult) { xs::throw_guard(cv, [=]() |
1001
|
|
|
|
|
|
|
{ |
1002
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
1003
|
0
|
0
|
|
|
|
|
if (items != 3) |
1004
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1005
|
|
|
|
|
|
|
{ |
1006
|
|
|
|
|
|
|
SV * RETVAL; |
1007
|
0
|
0
|
|
|
|
|
kiwi::Expression* a = xs::in<kiwi::Expression *>(ST(0)); |
1008
|
|
|
|
|
|
|
; |
1009
|
0
|
|
|
|
|
|
Sv b = ST(1) |
1010
|
|
|
|
|
|
|
; |
1011
|
0
|
0
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1012
|
|
|
|
|
|
|
; |
1013
|
|
|
|
|
|
|
#line 36 "/usr/local/bin/perl inc/symbolics.pl" |
1014
|
|
|
|
|
|
|
if( ! b.defined() ) { |
1015
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation * with undef operand" ); |
1016
|
|
|
|
|
|
|
} |
1017
|
|
|
|
|
|
|
|
1018
|
|
|
|
|
|
|
else |
1019
|
|
|
|
|
|
|
// Expression operator*( const Expression& expression, double coefficient ) (SWAP) |
1020
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
1021
|
|
|
|
|
|
|
kiwi::Expression* result; |
1022
|
|
|
|
|
|
|
if( ! swap ) { |
1023
|
|
|
|
|
|
|
result = new kiwi::Expression ( *a * ( xs::in<double>(b) ) ); |
1024
|
|
|
|
|
|
|
} else { |
1025
|
|
|
|
|
|
|
result = new kiwi::Expression ( ( xs::in<double>(b) ) * *a ); |
1026
|
|
|
|
|
|
|
} |
1027
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1028
|
|
|
|
|
|
|
} |
1029
|
|
|
|
|
|
|
#line 1030 "Kiwisolver_xsgen.cc" |
1030
|
0
|
0
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1031
|
0
|
|
|
|
|
|
ST(0) = RETVAL; |
1032
|
|
|
|
|
|
|
} |
1033
|
0
|
|
|
|
|
|
XSRETURN(1); |
1034
|
0
|
0
|
|
|
|
|
}); } |
1035
|
|
|
|
|
|
|
|
1036
|
|
|
|
|
|
|
|
1037
|
|
|
|
|
|
|
|
1038
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Expression__op_add) { xs::throw_guard(cv, [=]() |
1039
|
|
|
|
|
|
|
{ |
1040
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
1041
|
2
|
50
|
|
|
|
|
if (items != 3) |
1042
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1043
|
|
|
|
|
|
|
{ |
1044
|
|
|
|
|
|
|
SV * RETVAL; |
1045
|
2
|
50
|
|
|
|
|
kiwi::Expression* a = xs::in<kiwi::Expression *>(ST(0)); |
1046
|
|
|
|
|
|
|
; |
1047
|
4
|
|
|
|
|
|
Sv b = ST(1) |
1048
|
|
|
|
|
|
|
; |
1049
|
2
|
50
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1050
|
|
|
|
|
|
|
; |
1051
|
|
|
|
|
|
|
#line 54 "/usr/local/bin/perl inc/symbolics.pl" |
1052
|
|
|
|
|
|
|
if( ! b.defined() ) { |
1053
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation + with undef operand" ); |
1054
|
|
|
|
|
|
|
} |
1055
|
|
|
|
|
|
|
|
1056
|
|
|
|
|
|
|
else |
1057
|
|
|
|
|
|
|
// Expression operator+( const Expression& expression, double constant ) (SWAP) |
1058
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
1059
|
|
|
|
|
|
|
kiwi::Expression* result; |
1060
|
|
|
|
|
|
|
if( ! swap ) { |
1061
|
|
|
|
|
|
|
result = new kiwi::Expression ( *a + ( xs::in<double>(b) ) ); |
1062
|
|
|
|
|
|
|
} else { |
1063
|
|
|
|
|
|
|
result = new kiwi::Expression ( ( xs::in<double>(b) ) + *a ); |
1064
|
|
|
|
|
|
|
} |
1065
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1066
|
|
|
|
|
|
|
} |
1067
|
|
|
|
|
|
|
else |
1068
|
|
|
|
|
|
|
// Expression operator+( const Expression& first, const Expression& second ) |
1069
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Expression") ) { |
1070
|
|
|
|
|
|
|
kiwi::Expression* result = new kiwi::Expression ( *a + *( xs::in<kiwi::Expression*>(b) ) ); |
1071
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1072
|
|
|
|
|
|
|
} |
1073
|
|
|
|
|
|
|
else |
1074
|
|
|
|
|
|
|
// Expression operator+( const Expression& first, const Term& second ) |
1075
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Term") ) { |
1076
|
|
|
|
|
|
|
kiwi::Expression* result = new kiwi::Expression ( *a + *( xs::in<kiwi::Term*>(b) ) ); |
1077
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1078
|
|
|
|
|
|
|
} |
1079
|
|
|
|
|
|
|
else |
1080
|
|
|
|
|
|
|
// Expression operator+( const Expression& expression, const Variable& variable ) |
1081
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Variable") ) { |
1082
|
|
|
|
|
|
|
kiwi::Expression* result = new kiwi::Expression ( *a + *( xs::in<kiwi::Variable*>(b) ) ); |
1083
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1084
|
|
|
|
|
|
|
} |
1085
|
|
|
|
|
|
|
#line 1086 "Kiwisolver_xsgen.cc" |
1086
|
0
|
0
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1087
|
0
|
|
|
|
|
|
ST(0) = RETVAL; |
1088
|
|
|
|
|
|
|
} |
1089
|
0
|
|
|
|
|
|
XSRETURN(1); |
1090
|
2
|
0
|
|
|
|
|
}); } |
1091
|
|
|
|
|
|
|
|
1092
|
|
|
|
|
|
|
|
1093
|
|
|
|
|
|
|
|
1094
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Expression__op_minus) { xs::throw_guard(cv, [=]() |
1095
|
|
|
|
|
|
|
{ |
1096
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
1097
|
0
|
0
|
|
|
|
|
if (items != 3) |
1098
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1099
|
|
|
|
|
|
|
{ |
1100
|
|
|
|
|
|
|
SV * RETVAL; |
1101
|
0
|
0
|
|
|
|
|
kiwi::Expression* a = xs::in<kiwi::Expression *>(ST(0)); |
1102
|
|
|
|
|
|
|
; |
1103
|
0
|
|
|
|
|
|
Sv b = ST(1) |
1104
|
|
|
|
|
|
|
; |
1105
|
0
|
0
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1106
|
|
|
|
|
|
|
; |
1107
|
|
|
|
|
|
|
#line 90 "/usr/local/bin/perl inc/symbolics.pl" |
1108
|
|
|
|
|
|
|
if( ! b.defined() ) { |
1109
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation - with undef operand" ); |
1110
|
|
|
|
|
|
|
} |
1111
|
|
|
|
|
|
|
|
1112
|
|
|
|
|
|
|
else |
1113
|
|
|
|
|
|
|
// Expression operator-( const Expression& expression, double constant ) (SWAP) |
1114
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
1115
|
|
|
|
|
|
|
kiwi::Expression* result; |
1116
|
|
|
|
|
|
|
if( ! swap ) { |
1117
|
|
|
|
|
|
|
result = new kiwi::Expression ( *a - ( xs::in<double>(b) ) ); |
1118
|
|
|
|
|
|
|
} else { |
1119
|
|
|
|
|
|
|
result = new kiwi::Expression ( ( xs::in<double>(b) ) - *a ); |
1120
|
|
|
|
|
|
|
} |
1121
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1122
|
|
|
|
|
|
|
} |
1123
|
|
|
|
|
|
|
else |
1124
|
|
|
|
|
|
|
// Expression operator-( const Expression& first, const Expression& second ) |
1125
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Expression") ) { |
1126
|
|
|
|
|
|
|
kiwi::Expression* result = new kiwi::Expression ( *a - *( xs::in<kiwi::Expression*>(b) ) ); |
1127
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1128
|
|
|
|
|
|
|
} |
1129
|
|
|
|
|
|
|
else |
1130
|
|
|
|
|
|
|
// Expression operator-( const Expression& expression, const Term& term ) |
1131
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Term") ) { |
1132
|
|
|
|
|
|
|
kiwi::Expression* result = new kiwi::Expression ( *a - *( xs::in<kiwi::Term*>(b) ) ); |
1133
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1134
|
|
|
|
|
|
|
} |
1135
|
|
|
|
|
|
|
else |
1136
|
|
|
|
|
|
|
// Expression operator-( const Expression& expression, const Variable& variable ) |
1137
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Variable") ) { |
1138
|
|
|
|
|
|
|
kiwi::Expression* result = new kiwi::Expression ( *a - *( xs::in<kiwi::Variable*>(b) ) ); |
1139
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1140
|
|
|
|
|
|
|
} |
1141
|
|
|
|
|
|
|
#line 1142 "Kiwisolver_xsgen.cc" |
1142
|
0
|
0
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1143
|
0
|
|
|
|
|
|
ST(0) = RETVAL; |
1144
|
|
|
|
|
|
|
} |
1145
|
0
|
|
|
|
|
|
XSRETURN(1); |
1146
|
0
|
0
|
|
|
|
|
}); } |
1147
|
|
|
|
|
|
|
|
1148
|
|
|
|
|
|
|
|
1149
|
|
|
|
|
|
|
|
1150
|
130
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Expression__op_div) { xs::throw_guard(cv, [=]() |
1151
|
|
|
|
|
|
|
{ |
1152
|
65
|
|
|
|
|
|
dVAR; dXSARGS; |
1153
|
65
|
50
|
|
|
|
|
if (items != 3) |
1154
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1155
|
|
|
|
|
|
|
{ |
1156
|
|
|
|
|
|
|
SV * RETVAL; |
1157
|
65
|
50
|
|
|
|
|
kiwi::Expression* a = xs::in<kiwi::Expression *>(ST(0)); |
1158
|
|
|
|
|
|
|
; |
1159
|
130
|
|
|
|
|
|
Sv b = ST(1) |
1160
|
|
|
|
|
|
|
; |
1161
|
65
|
50
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1162
|
|
|
|
|
|
|
; |
1163
|
|
|
|
|
|
|
#line 126 "/usr/local/bin/perl inc/symbolics.pl" |
1164
|
|
|
|
|
|
|
if( ! b.defined() ) { |
1165
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation / with undef operand" ); |
1166
|
|
|
|
|
|
|
} |
1167
|
|
|
|
|
|
|
|
1168
|
|
|
|
|
|
|
else |
1169
|
|
|
|
|
|
|
// Expression operator/( const Expression& expression, double denominator ) |
1170
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
1171
|
|
|
|
|
|
|
kiwi::Expression* result; |
1172
|
|
|
|
|
|
|
result = new kiwi::Expression ( *a / ( xs::in<double>(b) ) ); |
1173
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1174
|
|
|
|
|
|
|
} |
1175
|
|
|
|
|
|
|
#line 1176 "Kiwisolver_xsgen.cc" |
1176
|
65
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1177
|
65
|
|
|
|
|
|
ST(0) = RETVAL; |
1178
|
|
|
|
|
|
|
} |
1179
|
65
|
|
|
|
|
|
XSRETURN(1); |
1180
|
65
|
50
|
|
|
|
|
}); } |
1181
|
|
|
|
|
|
|
|
1182
|
|
|
|
|
|
|
|
1183
|
|
|
|
|
|
|
|
1184
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Expression__op_num_le) { xs::throw_guard(cv, [=]() |
1185
|
|
|
|
|
|
|
{ |
1186
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
1187
|
0
|
0
|
|
|
|
|
if (items != 3) |
1188
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1189
|
|
|
|
|
|
|
{ |
1190
|
|
|
|
|
|
|
SV * RETVAL; |
1191
|
0
|
0
|
|
|
|
|
kiwi::Expression* a = xs::in<kiwi::Expression *>(ST(0)); |
1192
|
|
|
|
|
|
|
; |
1193
|
0
|
|
|
|
|
|
Sv b = ST(1) |
1194
|
|
|
|
|
|
|
; |
1195
|
0
|
0
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1196
|
|
|
|
|
|
|
; |
1197
|
|
|
|
|
|
|
#line 140 "/usr/local/bin/perl inc/symbolics.pl" |
1198
|
|
|
|
|
|
|
if( ! b.defined() ) { |
1199
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation <= with undef operand" ); |
1200
|
|
|
|
|
|
|
} |
1201
|
|
|
|
|
|
|
|
1202
|
|
|
|
|
|
|
else |
1203
|
|
|
|
|
|
|
// Constraint operator<=( const Expression& expression, double constant ) (SWAP) |
1204
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
1205
|
|
|
|
|
|
|
kiwi::Constraint* result; |
1206
|
|
|
|
|
|
|
if( ! swap ) { |
1207
|
|
|
|
|
|
|
result = new kiwi::Constraint ( *a <= ( xs::in<double>(b) ) ); |
1208
|
|
|
|
|
|
|
} else { |
1209
|
|
|
|
|
|
|
result = new kiwi::Constraint ( ( xs::in<double>(b) ) <= *a ); |
1210
|
|
|
|
|
|
|
} |
1211
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1212
|
|
|
|
|
|
|
} |
1213
|
|
|
|
|
|
|
else |
1214
|
|
|
|
|
|
|
// Constraint operator<=( const Expression& first, const Expression& second ) |
1215
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Expression") ) { |
1216
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a <= *( xs::in<kiwi::Expression*>(b) ) ); |
1217
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1218
|
|
|
|
|
|
|
} |
1219
|
|
|
|
|
|
|
else |
1220
|
|
|
|
|
|
|
// Constraint operator<=( const Expression& expression, const Term& term ) |
1221
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Term") ) { |
1222
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a <= *( xs::in<kiwi::Term*>(b) ) ); |
1223
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1224
|
|
|
|
|
|
|
} |
1225
|
|
|
|
|
|
|
else |
1226
|
|
|
|
|
|
|
// Constraint operator<=( const Expression& expression, const Variable& variable ) |
1227
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Variable") ) { |
1228
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a <= *( xs::in<kiwi::Variable*>(b) ) ); |
1229
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1230
|
|
|
|
|
|
|
} |
1231
|
|
|
|
|
|
|
#line 1232 "Kiwisolver_xsgen.cc" |
1232
|
0
|
0
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1233
|
0
|
|
|
|
|
|
ST(0) = RETVAL; |
1234
|
|
|
|
|
|
|
} |
1235
|
0
|
|
|
|
|
|
XSRETURN(1); |
1236
|
0
|
0
|
|
|
|
|
}); } |
1237
|
|
|
|
|
|
|
|
1238
|
|
|
|
|
|
|
|
1239
|
|
|
|
|
|
|
|
1240
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Expression__op_num_eq) { xs::throw_guard(cv, [=]() |
1241
|
|
|
|
|
|
|
{ |
1242
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
1243
|
1
|
50
|
|
|
|
|
if (items != 3) |
1244
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1245
|
|
|
|
|
|
|
{ |
1246
|
|
|
|
|
|
|
SV * RETVAL; |
1247
|
1
|
50
|
|
|
|
|
kiwi::Expression* a = xs::in<kiwi::Expression *>(ST(0)); |
1248
|
|
|
|
|
|
|
; |
1249
|
2
|
|
|
|
|
|
Sv b = ST(1) |
1250
|
|
|
|
|
|
|
; |
1251
|
1
|
50
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1252
|
|
|
|
|
|
|
; |
1253
|
|
|
|
|
|
|
#line 176 "/usr/local/bin/perl inc/symbolics.pl" |
1254
|
|
|
|
|
|
|
if( ! b.defined() ) { |
1255
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation == with undef operand" ); |
1256
|
|
|
|
|
|
|
} |
1257
|
|
|
|
|
|
|
|
1258
|
|
|
|
|
|
|
else |
1259
|
|
|
|
|
|
|
// Constraint operator==( const Expression& expression, double constant ) (SWAP) |
1260
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
1261
|
|
|
|
|
|
|
kiwi::Constraint* result; |
1262
|
|
|
|
|
|
|
if( ! swap ) { |
1263
|
|
|
|
|
|
|
result = new kiwi::Constraint ( *a == ( xs::in<double>(b) ) ); |
1264
|
|
|
|
|
|
|
} else { |
1265
|
|
|
|
|
|
|
result = new kiwi::Constraint ( ( xs::in<double>(b) ) == *a ); |
1266
|
|
|
|
|
|
|
} |
1267
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1268
|
|
|
|
|
|
|
} |
1269
|
|
|
|
|
|
|
else |
1270
|
|
|
|
|
|
|
// Constraint operator==( const Expression& first, const Expression& second ) |
1271
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Expression") ) { |
1272
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a == *( xs::in<kiwi::Expression*>(b) ) ); |
1273
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1274
|
|
|
|
|
|
|
} |
1275
|
|
|
|
|
|
|
else |
1276
|
|
|
|
|
|
|
// Constraint operator==( const Expression& expression, const Term& term ) |
1277
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Term") ) { |
1278
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a == *( xs::in<kiwi::Term*>(b) ) ); |
1279
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1280
|
|
|
|
|
|
|
} |
1281
|
|
|
|
|
|
|
else |
1282
|
|
|
|
|
|
|
// Constraint operator==( const Expression& expression, const Variable& variable ) |
1283
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Variable") ) { |
1284
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a == *( xs::in<kiwi::Variable*>(b) ) ); |
1285
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1286
|
|
|
|
|
|
|
} |
1287
|
|
|
|
|
|
|
#line 1288 "Kiwisolver_xsgen.cc" |
1288
|
1
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1289
|
1
|
|
|
|
|
|
ST(0) = RETVAL; |
1290
|
|
|
|
|
|
|
} |
1291
|
1
|
|
|
|
|
|
XSRETURN(1); |
1292
|
1
|
50
|
|
|
|
|
}); } |
1293
|
|
|
|
|
|
|
|
1294
|
|
|
|
|
|
|
|
1295
|
|
|
|
|
|
|
|
1296
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Expression__op_num_ge) { xs::throw_guard(cv, [=]() |
1297
|
|
|
|
|
|
|
{ |
1298
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
1299
|
0
|
0
|
|
|
|
|
if (items != 3) |
1300
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1301
|
|
|
|
|
|
|
{ |
1302
|
|
|
|
|
|
|
SV * RETVAL; |
1303
|
0
|
0
|
|
|
|
|
kiwi::Expression* a = xs::in<kiwi::Expression *>(ST(0)); |
1304
|
|
|
|
|
|
|
; |
1305
|
0
|
|
|
|
|
|
Sv b = ST(1) |
1306
|
|
|
|
|
|
|
; |
1307
|
0
|
0
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1308
|
|
|
|
|
|
|
; |
1309
|
|
|
|
|
|
|
#line 212 "/usr/local/bin/perl inc/symbolics.pl" |
1310
|
|
|
|
|
|
|
if( ! b.defined() ) { |
1311
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation >= with undef operand" ); |
1312
|
|
|
|
|
|
|
} |
1313
|
|
|
|
|
|
|
|
1314
|
|
|
|
|
|
|
else |
1315
|
|
|
|
|
|
|
// Constraint operator>=( const Expression& expression, double constant ) (SWAP) |
1316
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
1317
|
|
|
|
|
|
|
kiwi::Constraint* result; |
1318
|
|
|
|
|
|
|
if( ! swap ) { |
1319
|
|
|
|
|
|
|
result = new kiwi::Constraint ( *a >= ( xs::in<double>(b) ) ); |
1320
|
|
|
|
|
|
|
} else { |
1321
|
|
|
|
|
|
|
result = new kiwi::Constraint ( ( xs::in<double>(b) ) >= *a ); |
1322
|
|
|
|
|
|
|
} |
1323
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1324
|
|
|
|
|
|
|
} |
1325
|
|
|
|
|
|
|
else |
1326
|
|
|
|
|
|
|
// Constraint operator>=( const Expression& first, const Expression& second ) |
1327
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Expression") ) { |
1328
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a >= *( xs::in<kiwi::Expression*>(b) ) ); |
1329
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1330
|
|
|
|
|
|
|
} |
1331
|
|
|
|
|
|
|
else |
1332
|
|
|
|
|
|
|
// Constraint operator>=( const Expression& expression, const Term& term ) |
1333
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Term") ) { |
1334
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a >= *( xs::in<kiwi::Term*>(b) ) ); |
1335
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1336
|
|
|
|
|
|
|
} |
1337
|
|
|
|
|
|
|
else |
1338
|
|
|
|
|
|
|
// Constraint operator>=( const Expression& expression, const Variable& variable ) |
1339
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Variable") ) { |
1340
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a >= *( xs::in<kiwi::Variable*>(b) ) ); |
1341
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1342
|
|
|
|
|
|
|
} |
1343
|
|
|
|
|
|
|
#line 1344 "Kiwisolver_xsgen.cc" |
1344
|
0
|
0
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1345
|
0
|
|
|
|
|
|
ST(0) = RETVAL; |
1346
|
|
|
|
|
|
|
} |
1347
|
0
|
|
|
|
|
|
XSRETURN(1); |
1348
|
0
|
0
|
|
|
|
|
}); } |
1349
|
|
|
|
|
|
|
|
1350
|
|
|
|
|
|
|
|
1351
|
|
|
|
|
|
|
|
1352
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Term__op_neg) { xs::throw_guard(cv, [=]() |
1353
|
|
|
|
|
|
|
{ |
1354
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
1355
|
1
|
50
|
|
|
|
|
if (items != 3) |
1356
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1357
|
|
|
|
|
|
|
{ |
1358
|
|
|
|
|
|
|
SV * RETVAL; |
1359
|
1
|
50
|
|
|
|
|
kiwi::Term* a = xs::in<kiwi::Term *>(ST(0)); |
1360
|
|
|
|
|
|
|
; |
1361
|
2
|
|
|
|
|
|
Sv b = ST(1) |
1362
|
|
|
|
|
|
|
; |
1363
|
1
|
50
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1364
|
|
|
|
|
|
|
; |
1365
|
|
|
|
|
|
|
#line 253 "/usr/local/bin/perl inc/symbolics.pl" |
1366
|
|
|
|
|
|
|
// Term operator-( const Term& term ) |
1367
|
|
|
|
|
|
|
kiwi::Term* result = new kiwi::Term ( - (*a) ); |
1368
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Term*>(result, NULL).detach(); |
1369
|
|
|
|
|
|
|
#line 1370 "Kiwisolver_xsgen.cc" |
1370
|
1
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1371
|
1
|
|
|
|
|
|
ST(0) = RETVAL; |
1372
|
|
|
|
|
|
|
} |
1373
|
1
|
|
|
|
|
|
XSRETURN(1); |
1374
|
1
|
50
|
|
|
|
|
}); } |
1375
|
|
|
|
|
|
|
|
1376
|
|
|
|
|
|
|
|
1377
|
|
|
|
|
|
|
|
1378
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Term__op_mult) { xs::throw_guard(cv, [=]() |
1379
|
|
|
|
|
|
|
{ |
1380
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
1381
|
2
|
50
|
|
|
|
|
if (items != 3) |
1382
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1383
|
|
|
|
|
|
|
{ |
1384
|
|
|
|
|
|
|
SV * RETVAL; |
1385
|
2
|
50
|
|
|
|
|
kiwi::Term* a = xs::in<kiwi::Term *>(ST(0)); |
1386
|
|
|
|
|
|
|
; |
1387
|
4
|
|
|
|
|
|
Sv b = ST(1) |
1388
|
|
|
|
|
|
|
; |
1389
|
2
|
50
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1390
|
|
|
|
|
|
|
; |
1391
|
|
|
|
|
|
|
#line 259 "/usr/local/bin/perl inc/symbolics.pl" |
1392
|
|
|
|
|
|
|
if( ! b.defined() ) { |
1393
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation * with undef operand" ); |
1394
|
|
|
|
|
|
|
} |
1395
|
|
|
|
|
|
|
|
1396
|
|
|
|
|
|
|
else |
1397
|
|
|
|
|
|
|
// Term operator*( const Term& term, double coefficient ) (SWAP) |
1398
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
1399
|
|
|
|
|
|
|
kiwi::Term* result; |
1400
|
|
|
|
|
|
|
if( ! swap ) { |
1401
|
|
|
|
|
|
|
result = new kiwi::Term ( *a * ( xs::in<double>(b) ) ); |
1402
|
|
|
|
|
|
|
} else { |
1403
|
|
|
|
|
|
|
result = new kiwi::Term ( ( xs::in<double>(b) ) * *a ); |
1404
|
|
|
|
|
|
|
} |
1405
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Term*>(result, NULL).detach(); |
1406
|
|
|
|
|
|
|
} |
1407
|
|
|
|
|
|
|
#line 1408 "Kiwisolver_xsgen.cc" |
1408
|
0
|
0
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1409
|
0
|
|
|
|
|
|
ST(0) = RETVAL; |
1410
|
|
|
|
|
|
|
} |
1411
|
0
|
|
|
|
|
|
XSRETURN(1); |
1412
|
2
|
0
|
|
|
|
|
}); } |
1413
|
|
|
|
|
|
|
|
1414
|
|
|
|
|
|
|
|
1415
|
|
|
|
|
|
|
|
1416
|
30
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Term__op_add) { xs::throw_guard(cv, [=]() |
1417
|
|
|
|
|
|
|
{ |
1418
|
15
|
|
|
|
|
|
dVAR; dXSARGS; |
1419
|
15
|
50
|
|
|
|
|
if (items != 3) |
1420
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1421
|
|
|
|
|
|
|
{ |
1422
|
|
|
|
|
|
|
SV * RETVAL; |
1423
|
15
|
50
|
|
|
|
|
kiwi::Term* a = xs::in<kiwi::Term *>(ST(0)); |
1424
|
|
|
|
|
|
|
; |
1425
|
30
|
|
|
|
|
|
Sv b = ST(1) |
1426
|
|
|
|
|
|
|
; |
1427
|
15
|
50
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1428
|
|
|
|
|
|
|
; |
1429
|
|
|
|
|
|
|
#line 277 "/usr/local/bin/perl inc/symbolics.pl" |
1430
|
|
|
|
|
|
|
if( ! b.defined() ) { |
1431
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation + with undef operand" ); |
1432
|
|
|
|
|
|
|
} |
1433
|
|
|
|
|
|
|
|
1434
|
|
|
|
|
|
|
else |
1435
|
|
|
|
|
|
|
// Expression operator+( const Term& term, double constant ) (SWAP) |
1436
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
1437
|
|
|
|
|
|
|
kiwi::Expression* result; |
1438
|
|
|
|
|
|
|
if( ! swap ) { |
1439
|
|
|
|
|
|
|
result = new kiwi::Expression ( *a + ( xs::in<double>(b) ) ); |
1440
|
|
|
|
|
|
|
} else { |
1441
|
|
|
|
|
|
|
result = new kiwi::Expression ( ( xs::in<double>(b) ) + *a ); |
1442
|
|
|
|
|
|
|
} |
1443
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1444
|
|
|
|
|
|
|
} |
1445
|
|
|
|
|
|
|
else |
1446
|
|
|
|
|
|
|
// Expression operator+( const Term& term, const Expression& expression ) |
1447
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Expression") ) { |
1448
|
|
|
|
|
|
|
kiwi::Expression* result = new kiwi::Expression ( *a + *( xs::in<kiwi::Expression*>(b) ) ); |
1449
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1450
|
|
|
|
|
|
|
} |
1451
|
|
|
|
|
|
|
else |
1452
|
|
|
|
|
|
|
// Expression operator+( const Term& first, const Term& second ) |
1453
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Term") ) { |
1454
|
|
|
|
|
|
|
kiwi::Expression* result = new kiwi::Expression ( *a + *( xs::in<kiwi::Term*>(b) ) ); |
1455
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1456
|
|
|
|
|
|
|
} |
1457
|
|
|
|
|
|
|
else |
1458
|
|
|
|
|
|
|
// Expression operator+( const Term& term, const Variable& variable ) |
1459
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Variable") ) { |
1460
|
|
|
|
|
|
|
kiwi::Expression* result = new kiwi::Expression ( *a + *( xs::in<kiwi::Variable*>(b) ) ); |
1461
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1462
|
|
|
|
|
|
|
} |
1463
|
|
|
|
|
|
|
#line 1464 "Kiwisolver_xsgen.cc" |
1464
|
13
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1465
|
13
|
|
|
|
|
|
ST(0) = RETVAL; |
1466
|
|
|
|
|
|
|
} |
1467
|
13
|
|
|
|
|
|
XSRETURN(1); |
1468
|
15
|
50
|
|
|
|
|
}); } |
1469
|
|
|
|
|
|
|
|
1470
|
|
|
|
|
|
|
|
1471
|
|
|
|
|
|
|
|
1472
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Term__op_minus) { xs::throw_guard(cv, [=]() |
1473
|
|
|
|
|
|
|
{ |
1474
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
1475
|
3
|
50
|
|
|
|
|
if (items != 3) |
1476
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1477
|
|
|
|
|
|
|
{ |
1478
|
|
|
|
|
|
|
SV * RETVAL; |
1479
|
3
|
50
|
|
|
|
|
kiwi::Term* a = xs::in<kiwi::Term *>(ST(0)); |
1480
|
|
|
|
|
|
|
; |
1481
|
6
|
|
|
|
|
|
Sv b = ST(1) |
1482
|
|
|
|
|
|
|
; |
1483
|
3
|
50
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1484
|
|
|
|
|
|
|
; |
1485
|
|
|
|
|
|
|
#line 313 "/usr/local/bin/perl inc/symbolics.pl" |
1486
|
|
|
|
|
|
|
if( ! b.defined() ) { |
1487
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation - with undef operand" ); |
1488
|
|
|
|
|
|
|
} |
1489
|
|
|
|
|
|
|
|
1490
|
|
|
|
|
|
|
else |
1491
|
|
|
|
|
|
|
// Expression operator-( const Term& term, double constant ) (SWAP) |
1492
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
1493
|
|
|
|
|
|
|
kiwi::Expression* result; |
1494
|
|
|
|
|
|
|
if( ! swap ) { |
1495
|
|
|
|
|
|
|
result = new kiwi::Expression ( *a - ( xs::in<double>(b) ) ); |
1496
|
|
|
|
|
|
|
} else { |
1497
|
|
|
|
|
|
|
result = new kiwi::Expression ( ( xs::in<double>(b) ) - *a ); |
1498
|
|
|
|
|
|
|
} |
1499
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1500
|
|
|
|
|
|
|
} |
1501
|
|
|
|
|
|
|
else |
1502
|
|
|
|
|
|
|
// Expression operator-( const Term& term, const Expression& expression ) |
1503
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Expression") ) { |
1504
|
|
|
|
|
|
|
kiwi::Expression* result = new kiwi::Expression ( *a - *( xs::in<kiwi::Expression*>(b) ) ); |
1505
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1506
|
|
|
|
|
|
|
} |
1507
|
|
|
|
|
|
|
else |
1508
|
|
|
|
|
|
|
// Expression operator-( const Term& first, const Term& second ) |
1509
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Term") ) { |
1510
|
|
|
|
|
|
|
kiwi::Expression* result = new kiwi::Expression ( *a - *( xs::in<kiwi::Term*>(b) ) ); |
1511
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1512
|
|
|
|
|
|
|
} |
1513
|
|
|
|
|
|
|
else |
1514
|
|
|
|
|
|
|
// Expression operator-( const Term& term, const Variable& variable ) |
1515
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Variable") ) { |
1516
|
|
|
|
|
|
|
kiwi::Expression* result = new kiwi::Expression ( *a - *( xs::in<kiwi::Variable*>(b) ) ); |
1517
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1518
|
|
|
|
|
|
|
} |
1519
|
|
|
|
|
|
|
#line 1520 "Kiwisolver_xsgen.cc" |
1520
|
3
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1521
|
3
|
|
|
|
|
|
ST(0) = RETVAL; |
1522
|
|
|
|
|
|
|
} |
1523
|
3
|
|
|
|
|
|
XSRETURN(1); |
1524
|
3
|
50
|
|
|
|
|
}); } |
1525
|
|
|
|
|
|
|
|
1526
|
|
|
|
|
|
|
|
1527
|
|
|
|
|
|
|
|
1528
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Term__op_div) { xs::throw_guard(cv, [=]() |
1529
|
|
|
|
|
|
|
{ |
1530
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
1531
|
1
|
50
|
|
|
|
|
if (items != 3) |
1532
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1533
|
|
|
|
|
|
|
{ |
1534
|
|
|
|
|
|
|
SV * RETVAL; |
1535
|
1
|
50
|
|
|
|
|
kiwi::Term* a = xs::in<kiwi::Term *>(ST(0)); |
1536
|
|
|
|
|
|
|
; |
1537
|
2
|
|
|
|
|
|
Sv b = ST(1) |
1538
|
|
|
|
|
|
|
; |
1539
|
1
|
50
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1540
|
|
|
|
|
|
|
; |
1541
|
|
|
|
|
|
|
#line 349 "/usr/local/bin/perl inc/symbolics.pl" |
1542
|
|
|
|
|
|
|
if( ! b.defined() ) { |
1543
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation / with undef operand" ); |
1544
|
|
|
|
|
|
|
} |
1545
|
|
|
|
|
|
|
|
1546
|
|
|
|
|
|
|
else |
1547
|
|
|
|
|
|
|
// Term operator/( const Term& term, double denominator ) |
1548
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
1549
|
|
|
|
|
|
|
kiwi::Term* result; |
1550
|
|
|
|
|
|
|
result = new kiwi::Term ( *a / ( xs::in<double>(b) ) ); |
1551
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Term*>(result, NULL).detach(); |
1552
|
|
|
|
|
|
|
} |
1553
|
|
|
|
|
|
|
#line 1554 "Kiwisolver_xsgen.cc" |
1554
|
1
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1555
|
1
|
|
|
|
|
|
ST(0) = RETVAL; |
1556
|
|
|
|
|
|
|
} |
1557
|
1
|
|
|
|
|
|
XSRETURN(1); |
1558
|
1
|
50
|
|
|
|
|
}); } |
1559
|
|
|
|
|
|
|
|
1560
|
|
|
|
|
|
|
|
1561
|
|
|
|
|
|
|
|
1562
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Term__op_num_le) { xs::throw_guard(cv, [=]() |
1563
|
|
|
|
|
|
|
{ |
1564
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
1565
|
0
|
0
|
|
|
|
|
if (items != 3) |
1566
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1567
|
|
|
|
|
|
|
{ |
1568
|
|
|
|
|
|
|
SV * RETVAL; |
1569
|
0
|
0
|
|
|
|
|
kiwi::Term* a = xs::in<kiwi::Term *>(ST(0)); |
1570
|
|
|
|
|
|
|
; |
1571
|
0
|
|
|
|
|
|
Sv b = ST(1) |
1572
|
|
|
|
|
|
|
; |
1573
|
0
|
0
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1574
|
|
|
|
|
|
|
; |
1575
|
|
|
|
|
|
|
#line 363 "/usr/local/bin/perl inc/symbolics.pl" |
1576
|
|
|
|
|
|
|
if( ! b.defined() ) { |
1577
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation <= with undef operand" ); |
1578
|
|
|
|
|
|
|
} |
1579
|
|
|
|
|
|
|
|
1580
|
|
|
|
|
|
|
else |
1581
|
|
|
|
|
|
|
// Constraint operator<=( const Term& term, double constant ) (SWAP) |
1582
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
1583
|
|
|
|
|
|
|
kiwi::Constraint* result; |
1584
|
|
|
|
|
|
|
if( ! swap ) { |
1585
|
|
|
|
|
|
|
result = new kiwi::Constraint ( *a <= ( xs::in<double>(b) ) ); |
1586
|
|
|
|
|
|
|
} else { |
1587
|
|
|
|
|
|
|
result = new kiwi::Constraint ( ( xs::in<double>(b) ) <= *a ); |
1588
|
|
|
|
|
|
|
} |
1589
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1590
|
|
|
|
|
|
|
} |
1591
|
|
|
|
|
|
|
else |
1592
|
|
|
|
|
|
|
// Constraint operator<=( const Term& term, const Expression& expression ) |
1593
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Expression") ) { |
1594
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a <= *( xs::in<kiwi::Expression*>(b) ) ); |
1595
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1596
|
|
|
|
|
|
|
} |
1597
|
|
|
|
|
|
|
else |
1598
|
|
|
|
|
|
|
// Constraint operator<=( const Term& first, const Term& second ) |
1599
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Term") ) { |
1600
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a <= *( xs::in<kiwi::Term*>(b) ) ); |
1601
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1602
|
|
|
|
|
|
|
} |
1603
|
|
|
|
|
|
|
else |
1604
|
|
|
|
|
|
|
// Constraint operator<=( const Term& term, const Variable& variable ) |
1605
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Variable") ) { |
1606
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a <= *( xs::in<kiwi::Variable*>(b) ) ); |
1607
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1608
|
|
|
|
|
|
|
} |
1609
|
|
|
|
|
|
|
#line 1610 "Kiwisolver_xsgen.cc" |
1610
|
0
|
0
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1611
|
0
|
|
|
|
|
|
ST(0) = RETVAL; |
1612
|
|
|
|
|
|
|
} |
1613
|
0
|
|
|
|
|
|
XSRETURN(1); |
1614
|
0
|
0
|
|
|
|
|
}); } |
1615
|
|
|
|
|
|
|
|
1616
|
|
|
|
|
|
|
|
1617
|
|
|
|
|
|
|
|
1618
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Term__op_num_eq) { xs::throw_guard(cv, [=]() |
1619
|
|
|
|
|
|
|
{ |
1620
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
1621
|
2
|
50
|
|
|
|
|
if (items != 3) |
1622
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1623
|
|
|
|
|
|
|
{ |
1624
|
|
|
|
|
|
|
SV * RETVAL; |
1625
|
2
|
50
|
|
|
|
|
kiwi::Term* a = xs::in<kiwi::Term *>(ST(0)); |
1626
|
|
|
|
|
|
|
; |
1627
|
4
|
|
|
|
|
|
Sv b = ST(1) |
1628
|
|
|
|
|
|
|
; |
1629
|
2
|
50
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1630
|
|
|
|
|
|
|
; |
1631
|
|
|
|
|
|
|
#line 399 "/usr/local/bin/perl inc/symbolics.pl" |
1632
|
|
|
|
|
|
|
if( ! b.defined() ) { |
1633
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation == with undef operand" ); |
1634
|
|
|
|
|
|
|
} |
1635
|
|
|
|
|
|
|
|
1636
|
|
|
|
|
|
|
else |
1637
|
|
|
|
|
|
|
// Constraint operator==( const Term& term, double constant ) (SWAP) |
1638
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
1639
|
|
|
|
|
|
|
kiwi::Constraint* result; |
1640
|
|
|
|
|
|
|
if( ! swap ) { |
1641
|
|
|
|
|
|
|
result = new kiwi::Constraint ( *a == ( xs::in<double>(b) ) ); |
1642
|
|
|
|
|
|
|
} else { |
1643
|
|
|
|
|
|
|
result = new kiwi::Constraint ( ( xs::in<double>(b) ) == *a ); |
1644
|
|
|
|
|
|
|
} |
1645
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1646
|
|
|
|
|
|
|
} |
1647
|
|
|
|
|
|
|
else |
1648
|
|
|
|
|
|
|
// Constraint operator==( const Term& term, const Expression& expression ) |
1649
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Expression") ) { |
1650
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a == *( xs::in<kiwi::Expression*>(b) ) ); |
1651
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1652
|
|
|
|
|
|
|
} |
1653
|
|
|
|
|
|
|
else |
1654
|
|
|
|
|
|
|
// Constraint operator==( const Term& first, const Term& second ) |
1655
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Term") ) { |
1656
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a == *( xs::in<kiwi::Term*>(b) ) ); |
1657
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1658
|
|
|
|
|
|
|
} |
1659
|
|
|
|
|
|
|
else |
1660
|
|
|
|
|
|
|
// Constraint operator==( const Term& term, const Variable& variable ) |
1661
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Variable") ) { |
1662
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a == *( xs::in<kiwi::Variable*>(b) ) ); |
1663
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1664
|
|
|
|
|
|
|
} |
1665
|
|
|
|
|
|
|
#line 1666 "Kiwisolver_xsgen.cc" |
1666
|
2
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1667
|
2
|
|
|
|
|
|
ST(0) = RETVAL; |
1668
|
|
|
|
|
|
|
} |
1669
|
2
|
|
|
|
|
|
XSRETURN(1); |
1670
|
2
|
50
|
|
|
|
|
}); } |
1671
|
|
|
|
|
|
|
|
1672
|
|
|
|
|
|
|
|
1673
|
|
|
|
|
|
|
|
1674
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Term__op_num_ge) { xs::throw_guard(cv, [=]() |
1675
|
|
|
|
|
|
|
{ |
1676
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
1677
|
0
|
0
|
|
|
|
|
if (items != 3) |
1678
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1679
|
|
|
|
|
|
|
{ |
1680
|
|
|
|
|
|
|
SV * RETVAL; |
1681
|
0
|
0
|
|
|
|
|
kiwi::Term* a = xs::in<kiwi::Term *>(ST(0)); |
1682
|
|
|
|
|
|
|
; |
1683
|
0
|
|
|
|
|
|
Sv b = ST(1) |
1684
|
|
|
|
|
|
|
; |
1685
|
0
|
0
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1686
|
|
|
|
|
|
|
; |
1687
|
|
|
|
|
|
|
#line 435 "/usr/local/bin/perl inc/symbolics.pl" |
1688
|
|
|
|
|
|
|
if( ! b.defined() ) { |
1689
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation >= with undef operand" ); |
1690
|
|
|
|
|
|
|
} |
1691
|
|
|
|
|
|
|
|
1692
|
|
|
|
|
|
|
else |
1693
|
|
|
|
|
|
|
// Constraint operator>=( const Term& term, double constant ) (SWAP) |
1694
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
1695
|
|
|
|
|
|
|
kiwi::Constraint* result; |
1696
|
|
|
|
|
|
|
if( ! swap ) { |
1697
|
|
|
|
|
|
|
result = new kiwi::Constraint ( *a >= ( xs::in<double>(b) ) ); |
1698
|
|
|
|
|
|
|
} else { |
1699
|
|
|
|
|
|
|
result = new kiwi::Constraint ( ( xs::in<double>(b) ) >= *a ); |
1700
|
|
|
|
|
|
|
} |
1701
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1702
|
|
|
|
|
|
|
} |
1703
|
|
|
|
|
|
|
else |
1704
|
|
|
|
|
|
|
// Constraint operator>=( const Term& term, const Expression& expression ) |
1705
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Expression") ) { |
1706
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a >= *( xs::in<kiwi::Expression*>(b) ) ); |
1707
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1708
|
|
|
|
|
|
|
} |
1709
|
|
|
|
|
|
|
else |
1710
|
|
|
|
|
|
|
// Constraint operator>=( const Term& first, const Term& second ) |
1711
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Term") ) { |
1712
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a >= *( xs::in<kiwi::Term*>(b) ) ); |
1713
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1714
|
|
|
|
|
|
|
} |
1715
|
|
|
|
|
|
|
else |
1716
|
|
|
|
|
|
|
// Constraint operator>=( const Term& term, const Variable& variable ) |
1717
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Variable") ) { |
1718
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a >= *( xs::in<kiwi::Variable*>(b) ) ); |
1719
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1720
|
|
|
|
|
|
|
} |
1721
|
|
|
|
|
|
|
#line 1722 "Kiwisolver_xsgen.cc" |
1722
|
0
|
0
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1723
|
0
|
|
|
|
|
|
ST(0) = RETVAL; |
1724
|
|
|
|
|
|
|
} |
1725
|
0
|
|
|
|
|
|
XSRETURN(1); |
1726
|
0
|
0
|
|
|
|
|
}); } |
1727
|
|
|
|
|
|
|
|
1728
|
|
|
|
|
|
|
|
1729
|
|
|
|
|
|
|
|
1730
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Variable__op_neg) { xs::throw_guard(cv, [=]() |
1731
|
|
|
|
|
|
|
{ |
1732
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
1733
|
1
|
50
|
|
|
|
|
if (items != 3) |
1734
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1735
|
|
|
|
|
|
|
{ |
1736
|
|
|
|
|
|
|
SV * RETVAL; |
1737
|
1
|
50
|
|
|
|
|
kiwi::Variable* a = xs::in<kiwi::Variable *>(ST(0)); |
1738
|
|
|
|
|
|
|
; |
1739
|
2
|
|
|
|
|
|
Sv b = ST(1) |
1740
|
|
|
|
|
|
|
; |
1741
|
1
|
50
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1742
|
|
|
|
|
|
|
; |
1743
|
|
|
|
|
|
|
#line 476 "/usr/local/bin/perl inc/symbolics.pl" |
1744
|
|
|
|
|
|
|
// Term operator-( const Variable& variable ) |
1745
|
|
|
|
|
|
|
kiwi::Term* result = new kiwi::Term ( - (*a) ); |
1746
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Term*>(result, NULL).detach(); |
1747
|
|
|
|
|
|
|
#line 1748 "Kiwisolver_xsgen.cc" |
1748
|
1
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1749
|
1
|
|
|
|
|
|
ST(0) = RETVAL; |
1750
|
|
|
|
|
|
|
} |
1751
|
1
|
|
|
|
|
|
XSRETURN(1); |
1752
|
1
|
50
|
|
|
|
|
}); } |
1753
|
|
|
|
|
|
|
|
1754
|
|
|
|
|
|
|
|
1755
|
|
|
|
|
|
|
|
1756
|
56
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Variable__op_mult) { xs::throw_guard(cv, [=]() |
1757
|
|
|
|
|
|
|
{ |
1758
|
28
|
|
|
|
|
|
dVAR; dXSARGS; |
1759
|
28
|
50
|
|
|
|
|
if (items != 3) |
1760
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1761
|
|
|
|
|
|
|
{ |
1762
|
|
|
|
|
|
|
SV * RETVAL; |
1763
|
28
|
50
|
|
|
|
|
kiwi::Variable* a = xs::in<kiwi::Variable *>(ST(0)); |
1764
|
|
|
|
|
|
|
; |
1765
|
56
|
|
|
|
|
|
Sv b = ST(1) |
1766
|
|
|
|
|
|
|
; |
1767
|
28
|
50
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1768
|
|
|
|
|
|
|
; |
1769
|
|
|
|
|
|
|
#line 482 "/usr/local/bin/perl inc/symbolics.pl" |
1770
|
|
|
|
|
|
|
if( ! b.defined() ) { |
1771
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation * with undef operand" ); |
1772
|
|
|
|
|
|
|
} |
1773
|
|
|
|
|
|
|
|
1774
|
|
|
|
|
|
|
else |
1775
|
|
|
|
|
|
|
// Term operator*( const Variable& variable, double coefficient ) (SWAP) |
1776
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
1777
|
|
|
|
|
|
|
kiwi::Term* result; |
1778
|
|
|
|
|
|
|
if( ! swap ) { |
1779
|
|
|
|
|
|
|
result = new kiwi::Term ( *a * ( xs::in<double>(b) ) ); |
1780
|
|
|
|
|
|
|
} else { |
1781
|
|
|
|
|
|
|
result = new kiwi::Term ( ( xs::in<double>(b) ) * *a ); |
1782
|
|
|
|
|
|
|
} |
1783
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Term*>(result, NULL).detach(); |
1784
|
|
|
|
|
|
|
} |
1785
|
|
|
|
|
|
|
#line 1786 "Kiwisolver_xsgen.cc" |
1786
|
26
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1787
|
26
|
|
|
|
|
|
ST(0) = RETVAL; |
1788
|
|
|
|
|
|
|
} |
1789
|
26
|
|
|
|
|
|
XSRETURN(1); |
1790
|
28
|
50
|
|
|
|
|
}); } |
1791
|
|
|
|
|
|
|
|
1792
|
|
|
|
|
|
|
|
1793
|
|
|
|
|
|
|
|
1794
|
1618
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Variable__op_add) { xs::throw_guard(cv, [=]() |
1795
|
|
|
|
|
|
|
{ |
1796
|
809
|
|
|
|
|
|
dVAR; dXSARGS; |
1797
|
809
|
50
|
|
|
|
|
if (items != 3) |
1798
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1799
|
|
|
|
|
|
|
{ |
1800
|
|
|
|
|
|
|
SV * RETVAL; |
1801
|
809
|
50
|
|
|
|
|
kiwi::Variable* a = xs::in<kiwi::Variable *>(ST(0)); |
1802
|
|
|
|
|
|
|
; |
1803
|
1618
|
|
|
|
|
|
Sv b = ST(1) |
1804
|
|
|
|
|
|
|
; |
1805
|
809
|
50
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1806
|
|
|
|
|
|
|
; |
1807
|
|
|
|
|
|
|
#line 500 "/usr/local/bin/perl inc/symbolics.pl" |
1808
|
|
|
|
|
|
|
if( ! b.defined() ) { |
1809
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation + with undef operand" ); |
1810
|
|
|
|
|
|
|
} |
1811
|
|
|
|
|
|
|
|
1812
|
|
|
|
|
|
|
else |
1813
|
|
|
|
|
|
|
// Expression operator+( const Variable& variable, double constant ) (SWAP) |
1814
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
1815
|
|
|
|
|
|
|
kiwi::Expression* result; |
1816
|
|
|
|
|
|
|
if( ! swap ) { |
1817
|
|
|
|
|
|
|
result = new kiwi::Expression ( *a + ( xs::in<double>(b) ) ); |
1818
|
|
|
|
|
|
|
} else { |
1819
|
|
|
|
|
|
|
result = new kiwi::Expression ( ( xs::in<double>(b) ) + *a ); |
1820
|
|
|
|
|
|
|
} |
1821
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1822
|
|
|
|
|
|
|
} |
1823
|
|
|
|
|
|
|
else |
1824
|
|
|
|
|
|
|
// Expression operator+( const Variable& variable, const Expression& expression ) |
1825
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Expression") ) { |
1826
|
|
|
|
|
|
|
kiwi::Expression* result = new kiwi::Expression ( *a + *( xs::in<kiwi::Expression*>(b) ) ); |
1827
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1828
|
|
|
|
|
|
|
} |
1829
|
|
|
|
|
|
|
else |
1830
|
|
|
|
|
|
|
// Expression operator+( const Variable& variable, const Term& term ) |
1831
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Term") ) { |
1832
|
|
|
|
|
|
|
kiwi::Expression* result = new kiwi::Expression ( *a + *( xs::in<kiwi::Term*>(b) ) ); |
1833
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1834
|
|
|
|
|
|
|
} |
1835
|
|
|
|
|
|
|
else |
1836
|
|
|
|
|
|
|
// Expression operator+( const Variable& first, const Variable& second ) |
1837
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Variable") ) { |
1838
|
|
|
|
|
|
|
kiwi::Expression* result = new kiwi::Expression ( *a + *( xs::in<kiwi::Variable*>(b) ) ); |
1839
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1840
|
|
|
|
|
|
|
} |
1841
|
|
|
|
|
|
|
#line 1842 "Kiwisolver_xsgen.cc" |
1842
|
807
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1843
|
807
|
|
|
|
|
|
ST(0) = RETVAL; |
1844
|
|
|
|
|
|
|
} |
1845
|
807
|
|
|
|
|
|
XSRETURN(1); |
1846
|
809
|
50
|
|
|
|
|
}); } |
1847
|
|
|
|
|
|
|
|
1848
|
|
|
|
|
|
|
|
1849
|
|
|
|
|
|
|
|
1850
|
250
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Variable__op_minus) { xs::throw_guard(cv, [=]() |
1851
|
|
|
|
|
|
|
{ |
1852
|
125
|
|
|
|
|
|
dVAR; dXSARGS; |
1853
|
125
|
50
|
|
|
|
|
if (items != 3) |
1854
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1855
|
|
|
|
|
|
|
{ |
1856
|
|
|
|
|
|
|
SV * RETVAL; |
1857
|
125
|
50
|
|
|
|
|
kiwi::Variable* a = xs::in<kiwi::Variable *>(ST(0)); |
1858
|
|
|
|
|
|
|
; |
1859
|
250
|
|
|
|
|
|
Sv b = ST(1) |
1860
|
|
|
|
|
|
|
; |
1861
|
125
|
50
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1862
|
|
|
|
|
|
|
; |
1863
|
|
|
|
|
|
|
#line 536 "/usr/local/bin/perl inc/symbolics.pl" |
1864
|
|
|
|
|
|
|
if( ! b.defined() ) { |
1865
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation - with undef operand" ); |
1866
|
|
|
|
|
|
|
} |
1867
|
|
|
|
|
|
|
|
1868
|
|
|
|
|
|
|
else |
1869
|
|
|
|
|
|
|
// Expression operator-( const Variable& variable, double constant ) (SWAP) |
1870
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
1871
|
|
|
|
|
|
|
kiwi::Expression* result; |
1872
|
|
|
|
|
|
|
if( ! swap ) { |
1873
|
|
|
|
|
|
|
result = new kiwi::Expression ( *a - ( xs::in<double>(b) ) ); |
1874
|
|
|
|
|
|
|
} else { |
1875
|
|
|
|
|
|
|
result = new kiwi::Expression ( ( xs::in<double>(b) ) - *a ); |
1876
|
|
|
|
|
|
|
} |
1877
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1878
|
|
|
|
|
|
|
} |
1879
|
|
|
|
|
|
|
else |
1880
|
|
|
|
|
|
|
// Expression operator-( const Variable& variable, const Expression& expression ) |
1881
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Expression") ) { |
1882
|
|
|
|
|
|
|
kiwi::Expression* result = new kiwi::Expression ( *a - *( xs::in<kiwi::Expression*>(b) ) ); |
1883
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1884
|
|
|
|
|
|
|
} |
1885
|
|
|
|
|
|
|
else |
1886
|
|
|
|
|
|
|
// Expression operator-( const Variable& variable, const Term& term ) |
1887
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Term") ) { |
1888
|
|
|
|
|
|
|
kiwi::Expression* result = new kiwi::Expression ( *a - *( xs::in<kiwi::Term*>(b) ) ); |
1889
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1890
|
|
|
|
|
|
|
} |
1891
|
|
|
|
|
|
|
else |
1892
|
|
|
|
|
|
|
// Expression operator-( const Variable& first, const Variable& second ) |
1893
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Variable") ) { |
1894
|
|
|
|
|
|
|
kiwi::Expression* result = new kiwi::Expression ( *a - *( xs::in<kiwi::Variable*>(b) ) ); |
1895
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Expression*>(result, NULL).detach(); |
1896
|
|
|
|
|
|
|
} |
1897
|
|
|
|
|
|
|
#line 1898 "Kiwisolver_xsgen.cc" |
1898
|
123
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1899
|
123
|
|
|
|
|
|
ST(0) = RETVAL; |
1900
|
|
|
|
|
|
|
} |
1901
|
123
|
|
|
|
|
|
XSRETURN(1); |
1902
|
125
|
50
|
|
|
|
|
}); } |
1903
|
|
|
|
|
|
|
|
1904
|
|
|
|
|
|
|
|
1905
|
|
|
|
|
|
|
|
1906
|
22
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Variable__op_div) { xs::throw_guard(cv, [=]() |
1907
|
|
|
|
|
|
|
{ |
1908
|
11
|
|
|
|
|
|
dVAR; dXSARGS; |
1909
|
11
|
50
|
|
|
|
|
if (items != 3) |
1910
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1911
|
|
|
|
|
|
|
{ |
1912
|
|
|
|
|
|
|
SV * RETVAL; |
1913
|
11
|
50
|
|
|
|
|
kiwi::Variable* a = xs::in<kiwi::Variable *>(ST(0)); |
1914
|
|
|
|
|
|
|
; |
1915
|
22
|
|
|
|
|
|
Sv b = ST(1) |
1916
|
|
|
|
|
|
|
; |
1917
|
11
|
50
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1918
|
|
|
|
|
|
|
; |
1919
|
|
|
|
|
|
|
#line 572 "/usr/local/bin/perl inc/symbolics.pl" |
1920
|
|
|
|
|
|
|
if( ! b.defined() ) { |
1921
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation / with undef operand" ); |
1922
|
|
|
|
|
|
|
} |
1923
|
|
|
|
|
|
|
|
1924
|
|
|
|
|
|
|
else |
1925
|
|
|
|
|
|
|
// Term operator/( const Variable& variable, double denominator ) |
1926
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
1927
|
|
|
|
|
|
|
kiwi::Term* result; |
1928
|
|
|
|
|
|
|
result = new kiwi::Term ( *a / ( xs::in<double>(b) ) ); |
1929
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Term*>(result, NULL).detach(); |
1930
|
|
|
|
|
|
|
} |
1931
|
|
|
|
|
|
|
#line 1932 "Kiwisolver_xsgen.cc" |
1932
|
11
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1933
|
11
|
|
|
|
|
|
ST(0) = RETVAL; |
1934
|
|
|
|
|
|
|
} |
1935
|
11
|
|
|
|
|
|
XSRETURN(1); |
1936
|
11
|
50
|
|
|
|
|
}); } |
1937
|
|
|
|
|
|
|
|
1938
|
|
|
|
|
|
|
|
1939
|
|
|
|
|
|
|
|
1940
|
750
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Variable__op_num_le) { xs::throw_guard(cv, [=]() |
1941
|
|
|
|
|
|
|
{ |
1942
|
375
|
|
|
|
|
|
dVAR; dXSARGS; |
1943
|
375
|
50
|
|
|
|
|
if (items != 3) |
1944
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
1945
|
|
|
|
|
|
|
{ |
1946
|
|
|
|
|
|
|
SV * RETVAL; |
1947
|
375
|
50
|
|
|
|
|
kiwi::Variable* a = xs::in<kiwi::Variable *>(ST(0)); |
1948
|
|
|
|
|
|
|
; |
1949
|
750
|
|
|
|
|
|
Sv b = ST(1) |
1950
|
|
|
|
|
|
|
; |
1951
|
375
|
50
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1952
|
|
|
|
|
|
|
; |
1953
|
|
|
|
|
|
|
#line 586 "/usr/local/bin/perl inc/symbolics.pl" |
1954
|
|
|
|
|
|
|
if( ! b.defined() ) { |
1955
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation <= with undef operand" ); |
1956
|
|
|
|
|
|
|
} |
1957
|
|
|
|
|
|
|
|
1958
|
|
|
|
|
|
|
else |
1959
|
|
|
|
|
|
|
// Constraint operator<=( const Variable& variable, double constant ) (SWAP) |
1960
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
1961
|
|
|
|
|
|
|
kiwi::Constraint* result; |
1962
|
|
|
|
|
|
|
if( ! swap ) { |
1963
|
|
|
|
|
|
|
result = new kiwi::Constraint ( *a <= ( xs::in<double>(b) ) ); |
1964
|
|
|
|
|
|
|
} else { |
1965
|
|
|
|
|
|
|
result = new kiwi::Constraint ( ( xs::in<double>(b) ) <= *a ); |
1966
|
|
|
|
|
|
|
} |
1967
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1968
|
|
|
|
|
|
|
} |
1969
|
|
|
|
|
|
|
else |
1970
|
|
|
|
|
|
|
// Constraint operator<=( const Variable& variable, const Expression& expression ) |
1971
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Expression") ) { |
1972
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a <= *( xs::in<kiwi::Expression*>(b) ) ); |
1973
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1974
|
|
|
|
|
|
|
} |
1975
|
|
|
|
|
|
|
else |
1976
|
|
|
|
|
|
|
// Constraint operator<=( const Variable& variable, const Term& term ) |
1977
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Term") ) { |
1978
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a <= *( xs::in<kiwi::Term*>(b) ) ); |
1979
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1980
|
|
|
|
|
|
|
} |
1981
|
|
|
|
|
|
|
else |
1982
|
|
|
|
|
|
|
// Constraint operator<=( const Variable& first, const Variable& second ) |
1983
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Variable") ) { |
1984
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a <= *( xs::in<kiwi::Variable*>(b) ) ); |
1985
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
1986
|
|
|
|
|
|
|
} |
1987
|
|
|
|
|
|
|
#line 1988 "Kiwisolver_xsgen.cc" |
1988
|
375
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
1989
|
375
|
|
|
|
|
|
ST(0) = RETVAL; |
1990
|
|
|
|
|
|
|
} |
1991
|
375
|
|
|
|
|
|
XSRETURN(1); |
1992
|
375
|
50
|
|
|
|
|
}); } |
1993
|
|
|
|
|
|
|
|
1994
|
|
|
|
|
|
|
|
1995
|
|
|
|
|
|
|
|
1996
|
3478
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Variable__op_num_eq) { xs::throw_guard(cv, [=]() |
1997
|
|
|
|
|
|
|
{ |
1998
|
1739
|
|
|
|
|
|
dVAR; dXSARGS; |
1999
|
1739
|
50
|
|
|
|
|
if (items != 3) |
2000
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
2001
|
|
|
|
|
|
|
{ |
2002
|
|
|
|
|
|
|
SV * RETVAL; |
2003
|
1739
|
50
|
|
|
|
|
kiwi::Variable* a = xs::in<kiwi::Variable *>(ST(0)); |
2004
|
|
|
|
|
|
|
; |
2005
|
3478
|
|
|
|
|
|
Sv b = ST(1) |
2006
|
|
|
|
|
|
|
; |
2007
|
1739
|
50
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
2008
|
|
|
|
|
|
|
; |
2009
|
|
|
|
|
|
|
#line 622 "/usr/local/bin/perl inc/symbolics.pl" |
2010
|
|
|
|
|
|
|
if( ! b.defined() ) { |
2011
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation == with undef operand" ); |
2012
|
|
|
|
|
|
|
} |
2013
|
|
|
|
|
|
|
|
2014
|
|
|
|
|
|
|
else |
2015
|
|
|
|
|
|
|
// Constraint operator==( const Variable& variable, double constant ) (SWAP) |
2016
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
2017
|
|
|
|
|
|
|
kiwi::Constraint* result; |
2018
|
|
|
|
|
|
|
if( ! swap ) { |
2019
|
|
|
|
|
|
|
result = new kiwi::Constraint ( *a == ( xs::in<double>(b) ) ); |
2020
|
|
|
|
|
|
|
} else { |
2021
|
|
|
|
|
|
|
result = new kiwi::Constraint ( ( xs::in<double>(b) ) == *a ); |
2022
|
|
|
|
|
|
|
} |
2023
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
2024
|
|
|
|
|
|
|
} |
2025
|
|
|
|
|
|
|
else |
2026
|
|
|
|
|
|
|
// Constraint operator==( const Variable& variable, const Expression& expression ) |
2027
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Expression") ) { |
2028
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a == *( xs::in<kiwi::Expression*>(b) ) ); |
2029
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
2030
|
|
|
|
|
|
|
} |
2031
|
|
|
|
|
|
|
else |
2032
|
|
|
|
|
|
|
// Constraint operator==( const Variable& variable, const Term& term ) |
2033
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Term") ) { |
2034
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a == *( xs::in<kiwi::Term*>(b) ) ); |
2035
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
2036
|
|
|
|
|
|
|
} |
2037
|
|
|
|
|
|
|
else |
2038
|
|
|
|
|
|
|
// Constraint operator==( const Variable& first, const Variable& second ) |
2039
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Variable") ) { |
2040
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a == *( xs::in<kiwi::Variable*>(b) ) ); |
2041
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
2042
|
|
|
|
|
|
|
} |
2043
|
|
|
|
|
|
|
#line 2044 "Kiwisolver_xsgen.cc" |
2044
|
1739
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
2045
|
1739
|
|
|
|
|
|
ST(0) = RETVAL; |
2046
|
|
|
|
|
|
|
} |
2047
|
1739
|
|
|
|
|
|
XSRETURN(1); |
2048
|
1739
|
50
|
|
|
|
|
}); } |
2049
|
|
|
|
|
|
|
|
2050
|
|
|
|
|
|
|
|
2051
|
|
|
|
|
|
|
|
2052
|
768
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Variable__op_num_ge) { xs::throw_guard(cv, [=]() |
2053
|
|
|
|
|
|
|
{ |
2054
|
384
|
|
|
|
|
|
dVAR; dXSARGS; |
2055
|
384
|
50
|
|
|
|
|
if (items != 3) |
2056
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, swap"); |
2057
|
|
|
|
|
|
|
{ |
2058
|
|
|
|
|
|
|
SV * RETVAL; |
2059
|
384
|
50
|
|
|
|
|
kiwi::Variable* a = xs::in<kiwi::Variable *>(ST(0)); |
2060
|
|
|
|
|
|
|
; |
2061
|
768
|
|
|
|
|
|
Sv b = ST(1) |
2062
|
|
|
|
|
|
|
; |
2063
|
384
|
50
|
|
|
|
|
bool swap = (bool)SvTRUE(ST(2)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
2064
|
|
|
|
|
|
|
; |
2065
|
|
|
|
|
|
|
#line 658 "/usr/local/bin/perl inc/symbolics.pl" |
2066
|
|
|
|
|
|
|
if( ! b.defined() ) { |
2067
|
|
|
|
|
|
|
throw std::invalid_argument( "Graphics::Layout::Kiwisolver: operation >= with undef operand" ); |
2068
|
|
|
|
|
|
|
} |
2069
|
|
|
|
|
|
|
|
2070
|
|
|
|
|
|
|
else |
2071
|
|
|
|
|
|
|
// Constraint operator>=( const Variable& variable, double constant ) (SWAP) |
2072
|
|
|
|
|
|
|
if( ! b.is_object() && b.is_like_number() ) { |
2073
|
|
|
|
|
|
|
kiwi::Constraint* result; |
2074
|
|
|
|
|
|
|
if( ! swap ) { |
2075
|
|
|
|
|
|
|
result = new kiwi::Constraint ( *a >= ( xs::in<double>(b) ) ); |
2076
|
|
|
|
|
|
|
} else { |
2077
|
|
|
|
|
|
|
result = new kiwi::Constraint ( ( xs::in<double>(b) ) >= *a ); |
2078
|
|
|
|
|
|
|
} |
2079
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
2080
|
|
|
|
|
|
|
} |
2081
|
|
|
|
|
|
|
else |
2082
|
|
|
|
|
|
|
// Constraint operator>=( const Variable& variable, const Expression& expression ) |
2083
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Expression") ) { |
2084
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a >= *( xs::in<kiwi::Expression*>(b) ) ); |
2085
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
2086
|
|
|
|
|
|
|
} |
2087
|
|
|
|
|
|
|
else |
2088
|
|
|
|
|
|
|
// Constraint operator>=( const Variable& variable, const Term& term ) |
2089
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Term") ) { |
2090
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a >= *( xs::in<kiwi::Term*>(b) ) ); |
2091
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
2092
|
|
|
|
|
|
|
} |
2093
|
|
|
|
|
|
|
else |
2094
|
|
|
|
|
|
|
// Constraint operator>=( const Variable& first, const Variable& second ) |
2095
|
|
|
|
|
|
|
if( xs::Object(b).isa("Graphics::Layout::Kiwisolver::Variable") ) { |
2096
|
|
|
|
|
|
|
kiwi::Constraint* result = new kiwi::Constraint ( *a >= *( xs::in<kiwi::Variable*>(b) ) ); |
2097
|
|
|
|
|
|
|
RETVAL = xs::out<kiwi::Constraint*>(result, NULL).detach(); |
2098
|
|
|
|
|
|
|
} |
2099
|
|
|
|
|
|
|
#line 2100 "Kiwisolver_xsgen.cc" |
2100
|
384
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
2101
|
384
|
|
|
|
|
|
ST(0) = RETVAL; |
2102
|
|
|
|
|
|
|
} |
2103
|
384
|
|
|
|
|
|
XSRETURN(1); |
2104
|
384
|
50
|
|
|
|
|
}); } |
2105
|
|
|
|
|
|
|
|
2106
|
|
|
|
|
|
|
|
2107
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Symbolics.xsi' from '/usr/local/bin/perl inc/symbolics.pl' */ |
2108
|
|
|
|
|
|
|
|
2109
|
|
|
|
|
|
|
|
2110
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Kiwisolver.xs' from 'Symbolics.xsi' */ |
2111
|
|
|
|
|
|
|
|
2112
|
|
|
|
|
|
|
|
2113
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Graphics__Layout__Kiwisolver__Variable_nil) { xs::throw_guard(cv, [=]() |
2114
|
|
|
|
|
|
|
{ |
2115
|
0
|
|
|
|
|
|
dXSARGS; |
2116
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); |
2117
|
0
|
|
|
|
|
|
XSRETURN_EMPTY; |
2118
|
0
|
0
|
|
|
|
|
}); } |
2119
|
|
|
|
|
|
|
|
2120
|
|
|
|
|
|
|
#ifdef __cplusplus |
2121
|
|
|
|
|
|
|
extern "C" |
2122
|
|
|
|
|
|
|
#endif |
2123
|
|
|
|
|
|
|
|
2124
|
16
|
|
|
|
|
|
XS_EXTERNAL(boot_Graphics__Layout__Kiwisolver) { xs::throw_guard(cv, [=]() mutable |
2125
|
|
|
|
|
|
|
{ |
2126
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
2127
|
|
|
|
|
|
|
dVAR; dXSARGS; |
2128
|
|
|
|
|
|
|
#else |
2129
|
8
|
50
|
|
|
|
|
dVAR; dXSBOOTARGSXSAPIVERCHK; |
|
|
50
|
|
|
|
|
|
2130
|
|
|
|
|
|
|
#endif |
2131
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 8, 999) /* PERL_VERSION_LT is 5.33+ */ |
2132
|
|
|
|
|
|
|
char* file = __FILE__; |
2133
|
|
|
|
|
|
|
#else |
2134
|
8
|
|
|
|
|
|
const char* file = __FILE__; |
2135
|
|
|
|
|
|
|
#endif |
2136
|
|
|
|
|
|
|
|
2137
|
|
|
|
|
|
|
PERL_UNUSED_VAR(file); |
2138
|
|
|
|
|
|
|
|
2139
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
2140
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); /* -W */ |
2141
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
2142
|
|
|
|
|
|
|
XS_VERSION_BOOTCHECK; |
2143
|
|
|
|
|
|
|
# ifdef XS_APIVERSION_BOOTCHECK |
2144
|
|
|
|
|
|
|
XS_APIVERSION_BOOTCHECK; |
2145
|
|
|
|
|
|
|
# endif |
2146
|
|
|
|
|
|
|
#endif |
2147
|
|
|
|
|
|
|
|
2148
|
|
|
|
|
|
|
/* register the overloading (type 'A') magic */ |
2149
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 8, 999) /* PERL_VERSION_LT is 5.33+ */ |
2150
|
|
|
|
|
|
|
PL_amagic_generation++; |
2151
|
|
|
|
|
|
|
#endif |
2152
|
|
|
|
|
|
|
/* The magic for overload gets a GV* via gv_fetchmeth as */ |
2153
|
|
|
|
|
|
|
/* mentioned above, and looks in the SV* slot of it for */ |
2154
|
|
|
|
|
|
|
/* the "fallback" status. */ |
2155
|
8
|
|
|
|
|
|
sv_setsv( |
2156
|
|
|
|
|
|
|
get_sv( "Graphics::Layout::Kiwisolver::Variable::()", TRUE ), |
2157
|
|
|
|
|
|
|
&PL_sv_undef |
2158
|
8
|
|
|
|
|
|
); |
2159
|
|
|
|
|
|
|
/* Making a sub named "Graphics::Layout::Kiwisolver::Variable::()" allows the package */ |
2160
|
|
|
|
|
|
|
/* to be findable via fetchmethod(), and causes */ |
2161
|
|
|
|
|
|
|
/* overload::Overloaded("Graphics::Layout::Kiwisolver::Variable") to return true. */ |
2162
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Variable::()", XS_Graphics__Layout__Kiwisolver__Variable_nil); |
2163
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Variable::new", XS_Graphics__Layout__Kiwisolver__Variable_new); |
2164
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Variable::name", XS_Graphics__Layout__Kiwisolver__Variable_name); |
2165
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Variable::setName", XS_Graphics__Layout__Kiwisolver__Variable_setName); |
2166
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Variable::value", XS_Graphics__Layout__Kiwisolver__Variable_value); |
2167
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Variable::setValue", XS_Graphics__Layout__Kiwisolver__Variable_setValue); |
2168
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Variable::equals", XS_Graphics__Layout__Kiwisolver__Variable_equals); |
2169
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Term::new", XS_Graphics__Layout__Kiwisolver__Term_new); |
2170
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Term::variable", XS_Graphics__Layout__Kiwisolver__Term_variable); |
2171
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Term::coefficient", XS_Graphics__Layout__Kiwisolver__Term_coefficient); |
2172
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Term::value", XS_Graphics__Layout__Kiwisolver__Term_value); |
2173
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Expression::terms", XS_Graphics__Layout__Kiwisolver__Expression_terms); |
2174
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Expression::constant", XS_Graphics__Layout__Kiwisolver__Expression_constant); |
2175
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Expression::value", XS_Graphics__Layout__Kiwisolver__Expression_value); |
2176
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Strength::create", XS_Graphics__Layout__Kiwisolver__Strength_create); |
2177
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Constraint::expression", XS_Graphics__Layout__Kiwisolver__Constraint_expression); |
2178
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Constraint::strength", XS_Graphics__Layout__Kiwisolver__Constraint_strength); |
2179
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Constraint::_op_neg", XS_Graphics__Layout__Kiwisolver__Constraint__op_neg); |
2180
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Solver::new", XS_Graphics__Layout__Kiwisolver__Solver_new); |
2181
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Solver::addConstraint", XS_Graphics__Layout__Kiwisolver__Solver_addConstraint); |
2182
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Solver::removeConstraint", XS_Graphics__Layout__Kiwisolver__Solver_removeConstraint); |
2183
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Solver::hasConstraint", XS_Graphics__Layout__Kiwisolver__Solver_hasConstraint); |
2184
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Solver::addEditVariable", XS_Graphics__Layout__Kiwisolver__Solver_addEditVariable); |
2185
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Solver::removeEditVariable", XS_Graphics__Layout__Kiwisolver__Solver_removeEditVariable); |
2186
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Solver::hasEditVariable", XS_Graphics__Layout__Kiwisolver__Solver_hasEditVariable); |
2187
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Solver::suggestValue", XS_Graphics__Layout__Kiwisolver__Solver_suggestValue); |
2188
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Solver::updateVariables", XS_Graphics__Layout__Kiwisolver__Solver_updateVariables); |
2189
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Solver::reset", XS_Graphics__Layout__Kiwisolver__Solver_reset); |
2190
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Solver::dump", XS_Graphics__Layout__Kiwisolver__Solver_dump); |
2191
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Solver::dumps", XS_Graphics__Layout__Kiwisolver__Solver_dumps); |
2192
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Constraint::(|", XS_Graphics__Layout__Kiwisolver__Constraint__op_or); |
2193
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Constraint::_op_or", XS_Graphics__Layout__Kiwisolver__Constraint__op_or); |
2194
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Expression::(neg", XS_Graphics__Layout__Kiwisolver__Expression__op_neg); |
2195
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Expression::_op_neg", XS_Graphics__Layout__Kiwisolver__Expression__op_neg); |
2196
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Expression::(*", XS_Graphics__Layout__Kiwisolver__Expression__op_mult); |
2197
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Expression::_op_mult", XS_Graphics__Layout__Kiwisolver__Expression__op_mult); |
2198
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Expression::(+", XS_Graphics__Layout__Kiwisolver__Expression__op_add); |
2199
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Expression::_op_add", XS_Graphics__Layout__Kiwisolver__Expression__op_add); |
2200
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Expression::(-", XS_Graphics__Layout__Kiwisolver__Expression__op_minus); |
2201
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Expression::_op_minus", XS_Graphics__Layout__Kiwisolver__Expression__op_minus); |
2202
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Expression::(/", XS_Graphics__Layout__Kiwisolver__Expression__op_div); |
2203
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Expression::_op_div", XS_Graphics__Layout__Kiwisolver__Expression__op_div); |
2204
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Expression::(<=", XS_Graphics__Layout__Kiwisolver__Expression__op_num_le); |
2205
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Expression::_op_num_le", XS_Graphics__Layout__Kiwisolver__Expression__op_num_le); |
2206
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Expression::(==", XS_Graphics__Layout__Kiwisolver__Expression__op_num_eq); |
2207
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Expression::_op_num_eq", XS_Graphics__Layout__Kiwisolver__Expression__op_num_eq); |
2208
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Expression::(>=", XS_Graphics__Layout__Kiwisolver__Expression__op_num_ge); |
2209
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Expression::_op_num_ge", XS_Graphics__Layout__Kiwisolver__Expression__op_num_ge); |
2210
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Term::(neg", XS_Graphics__Layout__Kiwisolver__Term__op_neg); |
2211
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Term::_op_neg", XS_Graphics__Layout__Kiwisolver__Term__op_neg); |
2212
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Term::(*", XS_Graphics__Layout__Kiwisolver__Term__op_mult); |
2213
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Term::_op_mult", XS_Graphics__Layout__Kiwisolver__Term__op_mult); |
2214
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Term::(+", XS_Graphics__Layout__Kiwisolver__Term__op_add); |
2215
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Term::_op_add", XS_Graphics__Layout__Kiwisolver__Term__op_add); |
2216
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Term::(-", XS_Graphics__Layout__Kiwisolver__Term__op_minus); |
2217
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Term::_op_minus", XS_Graphics__Layout__Kiwisolver__Term__op_minus); |
2218
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Term::(/", XS_Graphics__Layout__Kiwisolver__Term__op_div); |
2219
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Term::_op_div", XS_Graphics__Layout__Kiwisolver__Term__op_div); |
2220
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Term::(<=", XS_Graphics__Layout__Kiwisolver__Term__op_num_le); |
2221
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Term::_op_num_le", XS_Graphics__Layout__Kiwisolver__Term__op_num_le); |
2222
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Term::(==", XS_Graphics__Layout__Kiwisolver__Term__op_num_eq); |
2223
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Term::_op_num_eq", XS_Graphics__Layout__Kiwisolver__Term__op_num_eq); |
2224
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Term::(>=", XS_Graphics__Layout__Kiwisolver__Term__op_num_ge); |
2225
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Term::_op_num_ge", XS_Graphics__Layout__Kiwisolver__Term__op_num_ge); |
2226
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Variable::(neg", XS_Graphics__Layout__Kiwisolver__Variable__op_neg); |
2227
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Variable::_op_neg", XS_Graphics__Layout__Kiwisolver__Variable__op_neg); |
2228
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Variable::(*", XS_Graphics__Layout__Kiwisolver__Variable__op_mult); |
2229
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Variable::_op_mult", XS_Graphics__Layout__Kiwisolver__Variable__op_mult); |
2230
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Variable::(+", XS_Graphics__Layout__Kiwisolver__Variable__op_add); |
2231
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Variable::_op_add", XS_Graphics__Layout__Kiwisolver__Variable__op_add); |
2232
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Variable::(-", XS_Graphics__Layout__Kiwisolver__Variable__op_minus); |
2233
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Variable::_op_minus", XS_Graphics__Layout__Kiwisolver__Variable__op_minus); |
2234
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Variable::(/", XS_Graphics__Layout__Kiwisolver__Variable__op_div); |
2235
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Variable::_op_div", XS_Graphics__Layout__Kiwisolver__Variable__op_div); |
2236
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Variable::(<=", XS_Graphics__Layout__Kiwisolver__Variable__op_num_le); |
2237
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Variable::_op_num_le", XS_Graphics__Layout__Kiwisolver__Variable__op_num_le); |
2238
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Variable::(==", XS_Graphics__Layout__Kiwisolver__Variable__op_num_eq); |
2239
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Variable::_op_num_eq", XS_Graphics__Layout__Kiwisolver__Variable__op_num_eq); |
2240
|
8
|
|
|
|
|
|
(void)newXS_deffile("Graphics::Layout::Kiwisolver::Variable::(>=", XS_Graphics__Layout__Kiwisolver__Variable__op_num_ge); |
2241
|
8
|
|
|
|
|
|
newXS_deffile("Graphics::Layout::Kiwisolver::Variable::_op_num_ge", XS_Graphics__Layout__Kiwisolver__Variable__op_num_ge); |
2242
|
|
|
|
|
|
|
|
2243
|
|
|
|
|
|
|
/* Initialisation Section */ |
2244
|
|
|
|
|
|
|
|
2245
|
|
|
|
|
|
|
#line 11 "Kiwisolver.xs" |
2246
|
|
|
|
|
|
|
{ |
2247
|
|
|
|
|
|
|
Stash("Graphics::Layout::Kiwisolver", GV_ADD).mark_as_loaded("Graphics::Layout::Kiwisolver"); |
2248
|
|
|
|
|
|
|
} |
2249
|
|
|
|
|
|
|
|
2250
|
|
|
|
|
|
|
#line 30 "./Variable.xsi" |
2251
|
|
|
|
|
|
|
{ |
2252
|
|
|
|
|
|
|
Stash("Graphics::Layout::Kiwisolver::Variable", GV_ADD).mark_as_loaded("Graphics::Layout::Kiwisolver"); |
2253
|
|
|
|
|
|
|
} |
2254
|
|
|
|
|
|
|
|
2255
|
|
|
|
|
|
|
#line 29 "./Term.xsi" |
2256
|
|
|
|
|
|
|
{ |
2257
|
|
|
|
|
|
|
Stash("Graphics::Layout::Kiwisolver::Term", GV_ADD).mark_as_loaded("Graphics::Layout::Kiwisolver"); |
2258
|
|
|
|
|
|
|
} |
2259
|
|
|
|
|
|
|
|
2260
|
|
|
|
|
|
|
#line 29 "./Expression.xsi" |
2261
|
|
|
|
|
|
|
{ |
2262
|
|
|
|
|
|
|
Stash("Graphics::Layout::Kiwisolver::Expression", GV_ADD).mark_as_loaded("Graphics::Layout::Kiwisolver"); |
2263
|
|
|
|
|
|
|
} |
2264
|
|
|
|
|
|
|
|
2265
|
|
|
|
|
|
|
#line 13 "./Strength.xsi" |
2266
|
|
|
|
|
|
|
{ |
2267
|
|
|
|
|
|
|
Stash stash = Stash("Graphics::Layout::Kiwisolver::Strength", GV_ADD); |
2268
|
|
|
|
|
|
|
stash.mark_as_loaded("Graphics::Layout::Kiwisolver"); |
2269
|
|
|
|
|
|
|
stash.add_const_sub("REQUIRED" , Simple(kiwi::strength::required) ); |
2270
|
|
|
|
|
|
|
stash.add_const_sub("STRONG" , Simple(kiwi::strength::strong) ); |
2271
|
|
|
|
|
|
|
stash.add_const_sub("MEDIUM" , Simple(kiwi::strength::medium) ); |
2272
|
|
|
|
|
|
|
stash.add_const_sub("WEAK" , Simple(kiwi::strength::weak) ); |
2273
|
|
|
|
|
|
|
} |
2274
|
|
|
|
|
|
|
|
2275
|
|
|
|
|
|
|
#line 26 "./Constraint.xsi" |
2276
|
|
|
|
|
|
|
{ |
2277
|
|
|
|
|
|
|
Stash("Graphics::Layout::Kiwisolver::Constraint", GV_ADD).mark_as_loaded("Graphics::Layout::Kiwisolver"); |
2278
|
|
|
|
|
|
|
} |
2279
|
|
|
|
|
|
|
|
2280
|
|
|
|
|
|
|
#line 55 "./Solver.xsi" |
2281
|
|
|
|
|
|
|
{ |
2282
|
|
|
|
|
|
|
Stash("Graphics::Layout::Kiwisolver::Solver", GV_ADD).mark_as_loaded("Graphics::Layout::Kiwisolver"); |
2283
|
|
|
|
|
|
|
} |
2284
|
|
|
|
|
|
|
|
2285
|
|
|
|
|
|
|
#line 2286 "Kiwisolver_xsgen.cc" |
2286
|
|
|
|
|
|
|
|
2287
|
|
|
|
|
|
|
/* End of Initialisation Section */ |
2288
|
|
|
|
|
|
|
|
2289
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
2290
|
|
|
|
|
|
|
# if PERL_VERSION_GE(5, 9, 0) |
2291
|
|
|
|
|
|
|
if (PL_unitcheckav) |
2292
|
|
|
|
|
|
|
call_list(PL_scopestack_ix, PL_unitcheckav); |
2293
|
|
|
|
|
|
|
# endif |
2294
|
|
|
|
|
|
|
XSRETURN_YES; |
2295
|
|
|
|
|
|
|
#else |
2296
|
8
|
|
|
|
|
|
Perl_xs_boot_epilog(aTHX_ ax); |
2297
|
|
|
|
|
|
|
#endif |
2298
|
48
|
50
|
|
|
|
|
}); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
2299
|
|
|
|
|
|
|
|