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