rqr 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3984 @@
1
+ /* ----------------------------------------------------------------------------
2
+ * This file was automatically generated by SWIG (http://www.swig.org).
3
+ * Version 1.3.31
4
+ *
5
+ * This file is not intended to be easily readable and contains a number of
6
+ * coding conventions designed to improve portability and efficiency. Do not make
7
+ * changes to this file unless you know what you are doing--modify the SWIG
8
+ * interface file instead.
9
+ * ----------------------------------------------------------------------------- */
10
+
11
+ #define SWIGRUBY
12
+
13
+ #ifdef __cplusplus
14
+ template<class T> class SwigValueWrapper {
15
+ T *tt;
16
+ public:
17
+ SwigValueWrapper() : tt(0) { }
18
+ SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
19
+ SwigValueWrapper(const T& t) : tt(new T(t)) { }
20
+ ~SwigValueWrapper() { delete tt; }
21
+ SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
22
+ operator T&() const { return *tt; }
23
+ T *operator&() { return tt; }
24
+ private:
25
+ SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
26
+ };
27
+ #endif
28
+
29
+ /* -----------------------------------------------------------------------------
30
+ * This section contains generic SWIG labels for method/variable
31
+ * declarations/attributes, and other compiler dependent labels.
32
+ * ----------------------------------------------------------------------------- */
33
+
34
+ /* template workaround for compilers that cannot correctly implement the C++ standard */
35
+ #ifndef SWIGTEMPLATEDISAMBIGUATOR
36
+ # if defined(__SUNPRO_CC)
37
+ # if (__SUNPRO_CC <= 0x560)
38
+ # define SWIGTEMPLATEDISAMBIGUATOR template
39
+ # else
40
+ # define SWIGTEMPLATEDISAMBIGUATOR
41
+ # endif
42
+ # else
43
+ # define SWIGTEMPLATEDISAMBIGUATOR
44
+ # endif
45
+ #endif
46
+
47
+ /* inline attribute */
48
+ #ifndef SWIGINLINE
49
+ # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
50
+ # define SWIGINLINE inline
51
+ # else
52
+ # define SWIGINLINE
53
+ # endif
54
+ #endif
55
+
56
+ /* attribute recognised by some compilers to avoid 'unused' warnings */
57
+ #ifndef SWIGUNUSED
58
+ # if defined(__GNUC__)
59
+ # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
60
+ # define SWIGUNUSED __attribute__ ((__unused__))
61
+ # else
62
+ # define SWIGUNUSED
63
+ # endif
64
+ # elif defined(__ICC)
65
+ # define SWIGUNUSED __attribute__ ((__unused__))
66
+ # else
67
+ # define SWIGUNUSED
68
+ # endif
69
+ #endif
70
+
71
+ #ifndef SWIGUNUSEDPARM
72
+ # ifdef __cplusplus
73
+ # define SWIGUNUSEDPARM(p)
74
+ # else
75
+ # define SWIGUNUSEDPARM(p) p SWIGUNUSED
76
+ # endif
77
+ #endif
78
+
79
+ /* internal SWIG method */
80
+ #ifndef SWIGINTERN
81
+ # define SWIGINTERN static SWIGUNUSED
82
+ #endif
83
+
84
+ /* internal inline SWIG method */
85
+ #ifndef SWIGINTERNINLINE
86
+ # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
87
+ #endif
88
+
89
+ /* exporting methods */
90
+ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
91
+ # ifndef GCC_HASCLASSVISIBILITY
92
+ # define GCC_HASCLASSVISIBILITY
93
+ # endif
94
+ #endif
95
+
96
+ #ifndef SWIGEXPORT
97
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
98
+ # if defined(STATIC_LINKED)
99
+ # define SWIGEXPORT
100
+ # else
101
+ # define SWIGEXPORT __declspec(dllexport)
102
+ # endif
103
+ # else
104
+ # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
105
+ # define SWIGEXPORT __attribute__ ((visibility("default")))
106
+ # else
107
+ # define SWIGEXPORT
108
+ # endif
109
+ # endif
110
+ #endif
111
+
112
+ /* calling conventions for Windows */
113
+ #ifndef SWIGSTDCALL
114
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
115
+ # define SWIGSTDCALL __stdcall
116
+ # else
117
+ # define SWIGSTDCALL
118
+ # endif
119
+ #endif
120
+
121
+ /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
122
+ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
123
+ # define _CRT_SECURE_NO_DEPRECATE
124
+ #endif
125
+
126
+ /* -----------------------------------------------------------------------------
127
+ * This section contains generic SWIG labels for method/variable
128
+ * declarations/attributes, and other compiler dependent labels.
129
+ * ----------------------------------------------------------------------------- */
130
+
131
+ /* template workaround for compilers that cannot correctly implement the C++ standard */
132
+ #ifndef SWIGTEMPLATEDISAMBIGUATOR
133
+ # if defined(__SUNPRO_CC)
134
+ # if (__SUNPRO_CC <= 0x560)
135
+ # define SWIGTEMPLATEDISAMBIGUATOR template
136
+ # else
137
+ # define SWIGTEMPLATEDISAMBIGUATOR
138
+ # endif
139
+ # else
140
+ # define SWIGTEMPLATEDISAMBIGUATOR
141
+ # endif
142
+ #endif
143
+
144
+ /* inline attribute */
145
+ #ifndef SWIGINLINE
146
+ # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
147
+ # define SWIGINLINE inline
148
+ # else
149
+ # define SWIGINLINE
150
+ # endif
151
+ #endif
152
+
153
+ /* attribute recognised by some compilers to avoid 'unused' warnings */
154
+ #ifndef SWIGUNUSED
155
+ # if defined(__GNUC__)
156
+ # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
157
+ # define SWIGUNUSED __attribute__ ((__unused__))
158
+ # else
159
+ # define SWIGUNUSED
160
+ # endif
161
+ # elif defined(__ICC)
162
+ # define SWIGUNUSED __attribute__ ((__unused__))
163
+ # else
164
+ # define SWIGUNUSED
165
+ # endif
166
+ #endif
167
+
168
+ #ifndef SWIGUNUSEDPARM
169
+ # ifdef __cplusplus
170
+ # define SWIGUNUSEDPARM(p)
171
+ # else
172
+ # define SWIGUNUSEDPARM(p) p SWIGUNUSED
173
+ # endif
174
+ #endif
175
+
176
+ /* internal SWIG method */
177
+ #ifndef SWIGINTERN
178
+ # define SWIGINTERN static SWIGUNUSED
179
+ #endif
180
+
181
+ /* internal inline SWIG method */
182
+ #ifndef SWIGINTERNINLINE
183
+ # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
184
+ #endif
185
+
186
+ /* exporting methods */
187
+ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
188
+ # ifndef GCC_HASCLASSVISIBILITY
189
+ # define GCC_HASCLASSVISIBILITY
190
+ # endif
191
+ #endif
192
+
193
+ #ifndef SWIGEXPORT
194
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
195
+ # if defined(STATIC_LINKED)
196
+ # define SWIGEXPORT
197
+ # else
198
+ # define SWIGEXPORT __declspec(dllexport)
199
+ # endif
200
+ # else
201
+ # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
202
+ # define SWIGEXPORT __attribute__ ((visibility("default")))
203
+ # else
204
+ # define SWIGEXPORT
205
+ # endif
206
+ # endif
207
+ #endif
208
+
209
+ /* calling conventions for Windows */
210
+ #ifndef SWIGSTDCALL
211
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
212
+ # define SWIGSTDCALL __stdcall
213
+ # else
214
+ # define SWIGSTDCALL
215
+ # endif
216
+ #endif
217
+
218
+ /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
219
+ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
220
+ # define _CRT_SECURE_NO_DEPRECATE
221
+ #endif
222
+
223
+ /* -----------------------------------------------------------------------------
224
+ * swigrun.swg
225
+ *
226
+ * This file contains generic CAPI SWIG runtime support for pointer
227
+ * type checking.
228
+ * ----------------------------------------------------------------------------- */
229
+
230
+ /* This should only be incremented when either the layout of swig_type_info changes,
231
+ or for whatever reason, the runtime changes incompatibly */
232
+ #define SWIG_RUNTIME_VERSION "3"
233
+
234
+ /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
235
+ #ifdef SWIG_TYPE_TABLE
236
+ # define SWIG_QUOTE_STRING(x) #x
237
+ # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
238
+ # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
239
+ #else
240
+ # define SWIG_TYPE_TABLE_NAME
241
+ #endif
242
+
243
+ /*
244
+ You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
245
+ creating a static or dynamic library from the swig runtime code.
246
+ In 99.9% of the cases, swig just needs to declare them as 'static'.
247
+
248
+ But only do this if is strictly necessary, ie, if you have problems
249
+ with your compiler or so.
250
+ */
251
+
252
+ #ifndef SWIGRUNTIME
253
+ # define SWIGRUNTIME SWIGINTERN
254
+ #endif
255
+
256
+ #ifndef SWIGRUNTIMEINLINE
257
+ # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
258
+ #endif
259
+
260
+ /* Generic buffer size */
261
+ #ifndef SWIG_BUFFER_SIZE
262
+ # define SWIG_BUFFER_SIZE 1024
263
+ #endif
264
+
265
+ /* Flags for pointer conversions */
266
+ #define SWIG_POINTER_DISOWN 0x1
267
+
268
+ /* Flags for new pointer objects */
269
+ #define SWIG_POINTER_OWN 0x1
270
+
271
+
272
+ /*
273
+ Flags/methods for returning states.
274
+
275
+ The swig conversion methods, as ConvertPtr, return and integer
276
+ that tells if the conversion was successful or not. And if not,
277
+ an error code can be returned (see swigerrors.swg for the codes).
278
+
279
+ Use the following macros/flags to set or process the returning
280
+ states.
281
+
282
+ In old swig versions, you usually write code as:
283
+
284
+ if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
285
+ // success code
286
+ } else {
287
+ //fail code
288
+ }
289
+
290
+ Now you can be more explicit as:
291
+
292
+ int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
293
+ if (SWIG_IsOK(res)) {
294
+ // success code
295
+ } else {
296
+ // fail code
297
+ }
298
+
299
+ that seems to be the same, but now you can also do
300
+
301
+ Type *ptr;
302
+ int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
303
+ if (SWIG_IsOK(res)) {
304
+ // success code
305
+ if (SWIG_IsNewObj(res) {
306
+ ...
307
+ delete *ptr;
308
+ } else {
309
+ ...
310
+ }
311
+ } else {
312
+ // fail code
313
+ }
314
+
315
+ I.e., now SWIG_ConvertPtr can return new objects and you can
316
+ identify the case and take care of the deallocation. Of course that
317
+ requires also to SWIG_ConvertPtr to return new result values, as
318
+
319
+ int SWIG_ConvertPtr(obj, ptr,...) {
320
+ if (<obj is ok>) {
321
+ if (<need new object>) {
322
+ *ptr = <ptr to new allocated object>;
323
+ return SWIG_NEWOBJ;
324
+ } else {
325
+ *ptr = <ptr to old object>;
326
+ return SWIG_OLDOBJ;
327
+ }
328
+ } else {
329
+ return SWIG_BADOBJ;
330
+ }
331
+ }
332
+
333
+ Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
334
+ more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
335
+ swig errors code.
336
+
337
+ Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
338
+ allows to return the 'cast rank', for example, if you have this
339
+
340
+ int food(double)
341
+ int fooi(int);
342
+
343
+ and you call
344
+
345
+ food(1) // cast rank '1' (1 -> 1.0)
346
+ fooi(1) // cast rank '0'
347
+
348
+ just use the SWIG_AddCast()/SWIG_CheckState()
349
+
350
+
351
+ */
352
+ #define SWIG_OK (0)
353
+ #define SWIG_ERROR (-1)
354
+ #define SWIG_IsOK(r) (r >= 0)
355
+ #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
356
+
357
+ /* The CastRankLimit says how many bits are used for the cast rank */
358
+ #define SWIG_CASTRANKLIMIT (1 << 8)
359
+ /* The NewMask denotes the object was created (using new/malloc) */
360
+ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
361
+ /* The TmpMask is for in/out typemaps that use temporal objects */
362
+ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
363
+ /* Simple returning values */
364
+ #define SWIG_BADOBJ (SWIG_ERROR)
365
+ #define SWIG_OLDOBJ (SWIG_OK)
366
+ #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
367
+ #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
368
+ /* Check, add and del mask methods */
369
+ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
370
+ #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
371
+ #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
372
+ #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
373
+ #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
374
+ #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
375
+
376
+
377
+ /* Cast-Rank Mode */
378
+ #if defined(SWIG_CASTRANK_MODE)
379
+ # ifndef SWIG_TypeRank
380
+ # define SWIG_TypeRank unsigned long
381
+ # endif
382
+ # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
383
+ # define SWIG_MAXCASTRANK (2)
384
+ # endif
385
+ # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
386
+ # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
387
+ SWIGINTERNINLINE int SWIG_AddCast(int r) {
388
+ return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
389
+ }
390
+ SWIGINTERNINLINE int SWIG_CheckState(int r) {
391
+ return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
392
+ }
393
+ #else /* no cast-rank mode */
394
+ # define SWIG_AddCast
395
+ # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
396
+ #endif
397
+
398
+
399
+
400
+
401
+ #include <string.h>
402
+
403
+ #ifdef __cplusplus
404
+ extern "C" {
405
+ #endif
406
+
407
+ typedef void *(*swig_converter_func)(void *);
408
+ typedef struct swig_type_info *(*swig_dycast_func)(void **);
409
+
410
+ /* Structure to store inforomation on one type */
411
+ typedef struct swig_type_info {
412
+ const char *name; /* mangled name of this type */
413
+ const char *str; /* human readable name of this type */
414
+ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
415
+ struct swig_cast_info *cast; /* linked list of types that can cast into this type */
416
+ void *clientdata; /* language specific type data */
417
+ int owndata; /* flag if the structure owns the clientdata */
418
+ } swig_type_info;
419
+
420
+ /* Structure to store a type and conversion function used for casting */
421
+ typedef struct swig_cast_info {
422
+ swig_type_info *type; /* pointer to type that is equivalent to this type */
423
+ swig_converter_func converter; /* function to cast the void pointers */
424
+ struct swig_cast_info *next; /* pointer to next cast in linked list */
425
+ struct swig_cast_info *prev; /* pointer to the previous cast */
426
+ } swig_cast_info;
427
+
428
+ /* Structure used to store module information
429
+ * Each module generates one structure like this, and the runtime collects
430
+ * all of these structures and stores them in a circularly linked list.*/
431
+ typedef struct swig_module_info {
432
+ swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
433
+ size_t size; /* Number of types in this module */
434
+ struct swig_module_info *next; /* Pointer to next element in circularly linked list */
435
+ swig_type_info **type_initial; /* Array of initially generated type structures */
436
+ swig_cast_info **cast_initial; /* Array of initially generated casting structures */
437
+ void *clientdata; /* Language specific module data */
438
+ } swig_module_info;
439
+
440
+ /*
441
+ Compare two type names skipping the space characters, therefore
442
+ "char*" == "char *" and "Class<int>" == "Class<int >", etc.
443
+
444
+ Return 0 when the two name types are equivalent, as in
445
+ strncmp, but skipping ' '.
446
+ */
447
+ SWIGRUNTIME int
448
+ SWIG_TypeNameComp(const char *f1, const char *l1,
449
+ const char *f2, const char *l2) {
450
+ for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
451
+ while ((*f1 == ' ') && (f1 != l1)) ++f1;
452
+ while ((*f2 == ' ') && (f2 != l2)) ++f2;
453
+ if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
454
+ }
455
+ return (l1 - f1) - (l2 - f2);
456
+ }
457
+
458
+ /*
459
+ Check type equivalence in a name list like <name1>|<name2>|...
460
+ Return 0 if not equal, 1 if equal
461
+ */
462
+ SWIGRUNTIME int
463
+ SWIG_TypeEquiv(const char *nb, const char *tb) {
464
+ int equiv = 0;
465
+ const char* te = tb + strlen(tb);
466
+ const char* ne = nb;
467
+ while (!equiv && *ne) {
468
+ for (nb = ne; *ne; ++ne) {
469
+ if (*ne == '|') break;
470
+ }
471
+ equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
472
+ if (*ne) ++ne;
473
+ }
474
+ return equiv;
475
+ }
476
+
477
+ /*
478
+ Check type equivalence in a name list like <name1>|<name2>|...
479
+ Return 0 if equal, -1 if nb < tb, 1 if nb > tb
480
+ */
481
+ SWIGRUNTIME int
482
+ SWIG_TypeCompare(const char *nb, const char *tb) {
483
+ int equiv = 0;
484
+ const char* te = tb + strlen(tb);
485
+ const char* ne = nb;
486
+ while (!equiv && *ne) {
487
+ for (nb = ne; *ne; ++ne) {
488
+ if (*ne == '|') break;
489
+ }
490
+ equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
491
+ if (*ne) ++ne;
492
+ }
493
+ return equiv;
494
+ }
495
+
496
+
497
+ /* think of this as a c++ template<> or a scheme macro */
498
+ #define SWIG_TypeCheck_Template(comparison, ty) \
499
+ if (ty) { \
500
+ swig_cast_info *iter = ty->cast; \
501
+ while (iter) { \
502
+ if (comparison) { \
503
+ if (iter == ty->cast) return iter; \
504
+ /* Move iter to the top of the linked list */ \
505
+ iter->prev->next = iter->next; \
506
+ if (iter->next) \
507
+ iter->next->prev = iter->prev; \
508
+ iter->next = ty->cast; \
509
+ iter->prev = 0; \
510
+ if (ty->cast) ty->cast->prev = iter; \
511
+ ty->cast = iter; \
512
+ return iter; \
513
+ } \
514
+ iter = iter->next; \
515
+ } \
516
+ } \
517
+ return 0
518
+
519
+ /*
520
+ Check the typename
521
+ */
522
+ SWIGRUNTIME swig_cast_info *
523
+ SWIG_TypeCheck(const char *c, swig_type_info *ty) {
524
+ SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
525
+ }
526
+
527
+ /* Same as previous function, except strcmp is replaced with a pointer comparison */
528
+ SWIGRUNTIME swig_cast_info *
529
+ SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
530
+ SWIG_TypeCheck_Template(iter->type == from, into);
531
+ }
532
+
533
+ /*
534
+ Cast a pointer up an inheritance hierarchy
535
+ */
536
+ SWIGRUNTIMEINLINE void *
537
+ SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
538
+ return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
539
+ }
540
+
541
+ /*
542
+ Dynamic pointer casting. Down an inheritance hierarchy
543
+ */
544
+ SWIGRUNTIME swig_type_info *
545
+ SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
546
+ swig_type_info *lastty = ty;
547
+ if (!ty || !ty->dcast) return ty;
548
+ while (ty && (ty->dcast)) {
549
+ ty = (*ty->dcast)(ptr);
550
+ if (ty) lastty = ty;
551
+ }
552
+ return lastty;
553
+ }
554
+
555
+ /*
556
+ Return the name associated with this type
557
+ */
558
+ SWIGRUNTIMEINLINE const char *
559
+ SWIG_TypeName(const swig_type_info *ty) {
560
+ return ty->name;
561
+ }
562
+
563
+ /*
564
+ Return the pretty name associated with this type,
565
+ that is an unmangled type name in a form presentable to the user.
566
+ */
567
+ SWIGRUNTIME const char *
568
+ SWIG_TypePrettyName(const swig_type_info *type) {
569
+ /* The "str" field contains the equivalent pretty names of the
570
+ type, separated by vertical-bar characters. We choose
571
+ to print the last name, as it is often (?) the most
572
+ specific. */
573
+ if (!type) return NULL;
574
+ if (type->str != NULL) {
575
+ const char *last_name = type->str;
576
+ const char *s;
577
+ for (s = type->str; *s; s++)
578
+ if (*s == '|') last_name = s+1;
579
+ return last_name;
580
+ }
581
+ else
582
+ return type->name;
583
+ }
584
+
585
+ /*
586
+ Set the clientdata field for a type
587
+ */
588
+ SWIGRUNTIME void
589
+ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
590
+ swig_cast_info *cast = ti->cast;
591
+ /* if (ti->clientdata == clientdata) return; */
592
+ ti->clientdata = clientdata;
593
+
594
+ while (cast) {
595
+ if (!cast->converter) {
596
+ swig_type_info *tc = cast->type;
597
+ if (!tc->clientdata) {
598
+ SWIG_TypeClientData(tc, clientdata);
599
+ }
600
+ }
601
+ cast = cast->next;
602
+ }
603
+ }
604
+ SWIGRUNTIME void
605
+ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
606
+ SWIG_TypeClientData(ti, clientdata);
607
+ ti->owndata = 1;
608
+ }
609
+
610
+ /*
611
+ Search for a swig_type_info structure only by mangled name
612
+ Search is a O(log #types)
613
+
614
+ We start searching at module start, and finish searching when start == end.
615
+ Note: if start == end at the beginning of the function, we go all the way around
616
+ the circular list.
617
+ */
618
+ SWIGRUNTIME swig_type_info *
619
+ SWIG_MangledTypeQueryModule(swig_module_info *start,
620
+ swig_module_info *end,
621
+ const char *name) {
622
+ swig_module_info *iter = start;
623
+ do {
624
+ if (iter->size) {
625
+ register size_t l = 0;
626
+ register size_t r = iter->size - 1;
627
+ do {
628
+ /* since l+r >= 0, we can (>> 1) instead (/ 2) */
629
+ register size_t i = (l + r) >> 1;
630
+ const char *iname = iter->types[i]->name;
631
+ if (iname) {
632
+ register int compare = strcmp(name, iname);
633
+ if (compare == 0) {
634
+ return iter->types[i];
635
+ } else if (compare < 0) {
636
+ if (i) {
637
+ r = i - 1;
638
+ } else {
639
+ break;
640
+ }
641
+ } else if (compare > 0) {
642
+ l = i + 1;
643
+ }
644
+ } else {
645
+ break; /* should never happen */
646
+ }
647
+ } while (l <= r);
648
+ }
649
+ iter = iter->next;
650
+ } while (iter != end);
651
+ return 0;
652
+ }
653
+
654
+ /*
655
+ Search for a swig_type_info structure for either a mangled name or a human readable name.
656
+ It first searches the mangled names of the types, which is a O(log #types)
657
+ If a type is not found it then searches the human readable names, which is O(#types).
658
+
659
+ We start searching at module start, and finish searching when start == end.
660
+ Note: if start == end at the beginning of the function, we go all the way around
661
+ the circular list.
662
+ */
663
+ SWIGRUNTIME swig_type_info *
664
+ SWIG_TypeQueryModule(swig_module_info *start,
665
+ swig_module_info *end,
666
+ const char *name) {
667
+ /* STEP 1: Search the name field using binary search */
668
+ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
669
+ if (ret) {
670
+ return ret;
671
+ } else {
672
+ /* STEP 2: If the type hasn't been found, do a complete search
673
+ of the str field (the human readable name) */
674
+ swig_module_info *iter = start;
675
+ do {
676
+ register size_t i = 0;
677
+ for (; i < iter->size; ++i) {
678
+ if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
679
+ return iter->types[i];
680
+ }
681
+ iter = iter->next;
682
+ } while (iter != end);
683
+ }
684
+
685
+ /* neither found a match */
686
+ return 0;
687
+ }
688
+
689
+ /*
690
+ Pack binary data into a string
691
+ */
692
+ SWIGRUNTIME char *
693
+ SWIG_PackData(char *c, void *ptr, size_t sz) {
694
+ static const char hex[17] = "0123456789abcdef";
695
+ register const unsigned char *u = (unsigned char *) ptr;
696
+ register const unsigned char *eu = u + sz;
697
+ for (; u != eu; ++u) {
698
+ register unsigned char uu = *u;
699
+ *(c++) = hex[(uu & 0xf0) >> 4];
700
+ *(c++) = hex[uu & 0xf];
701
+ }
702
+ return c;
703
+ }
704
+
705
+ /*
706
+ Unpack binary data from a string
707
+ */
708
+ SWIGRUNTIME const char *
709
+ SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
710
+ register unsigned char *u = (unsigned char *) ptr;
711
+ register const unsigned char *eu = u + sz;
712
+ for (; u != eu; ++u) {
713
+ register char d = *(c++);
714
+ register unsigned char uu;
715
+ if ((d >= '0') && (d <= '9'))
716
+ uu = ((d - '0') << 4);
717
+ else if ((d >= 'a') && (d <= 'f'))
718
+ uu = ((d - ('a'-10)) << 4);
719
+ else
720
+ return (char *) 0;
721
+ d = *(c++);
722
+ if ((d >= '0') && (d <= '9'))
723
+ uu |= (d - '0');
724
+ else if ((d >= 'a') && (d <= 'f'))
725
+ uu |= (d - ('a'-10));
726
+ else
727
+ return (char *) 0;
728
+ *u = uu;
729
+ }
730
+ return c;
731
+ }
732
+
733
+ /*
734
+ Pack 'void *' into a string buffer.
735
+ */
736
+ SWIGRUNTIME char *
737
+ SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
738
+ char *r = buff;
739
+ if ((2*sizeof(void *) + 2) > bsz) return 0;
740
+ *(r++) = '_';
741
+ r = SWIG_PackData(r,&ptr,sizeof(void *));
742
+ if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
743
+ strcpy(r,name);
744
+ return buff;
745
+ }
746
+
747
+ SWIGRUNTIME const char *
748
+ SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
749
+ if (*c != '_') {
750
+ if (strcmp(c,"NULL") == 0) {
751
+ *ptr = (void *) 0;
752
+ return name;
753
+ } else {
754
+ return 0;
755
+ }
756
+ }
757
+ return SWIG_UnpackData(++c,ptr,sizeof(void *));
758
+ }
759
+
760
+ SWIGRUNTIME char *
761
+ SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
762
+ char *r = buff;
763
+ size_t lname = (name ? strlen(name) : 0);
764
+ if ((2*sz + 2 + lname) > bsz) return 0;
765
+ *(r++) = '_';
766
+ r = SWIG_PackData(r,ptr,sz);
767
+ if (lname) {
768
+ strncpy(r,name,lname+1);
769
+ } else {
770
+ *r = 0;
771
+ }
772
+ return buff;
773
+ }
774
+
775
+ SWIGRUNTIME const char *
776
+ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
777
+ if (*c != '_') {
778
+ if (strcmp(c,"NULL") == 0) {
779
+ memset(ptr,0,sz);
780
+ return name;
781
+ } else {
782
+ return 0;
783
+ }
784
+ }
785
+ return SWIG_UnpackData(++c,ptr,sz);
786
+ }
787
+
788
+ #ifdef __cplusplus
789
+ }
790
+ #endif
791
+
792
+ /* Errors in SWIG */
793
+ #define SWIG_UnknownError -1
794
+ #define SWIG_IOError -2
795
+ #define SWIG_RuntimeError -3
796
+ #define SWIG_IndexError -4
797
+ #define SWIG_TypeError -5
798
+ #define SWIG_DivisionByZero -6
799
+ #define SWIG_OverflowError -7
800
+ #define SWIG_SyntaxError -8
801
+ #define SWIG_ValueError -9
802
+ #define SWIG_SystemError -10
803
+ #define SWIG_AttributeError -11
804
+ #define SWIG_MemoryError -12
805
+ #define SWIG_NullReferenceError -13
806
+
807
+
808
+
809
+ #include <ruby.h>
810
+
811
+ /* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
812
+ #ifndef NUM2LL
813
+ #define NUM2LL(x) NUM2LONG((x))
814
+ #endif
815
+ #ifndef LL2NUM
816
+ #define LL2NUM(x) INT2NUM((long) (x))
817
+ #endif
818
+ #ifndef ULL2NUM
819
+ #define ULL2NUM(x) UINT2NUM((unsigned long) (x))
820
+ #endif
821
+
822
+ /* Ruby 1.7 doesn't (yet) define NUM2ULL() */
823
+ #ifndef NUM2ULL
824
+ #ifdef HAVE_LONG_LONG
825
+ #define NUM2ULL(x) rb_num2ull((x))
826
+ #else
827
+ #define NUM2ULL(x) NUM2ULONG(x)
828
+ #endif
829
+ #endif
830
+
831
+ /* RSTRING_LEN, etc are new in Ruby 1.9, but ->ptr and ->len no longer work */
832
+ /* Define these for older versions so we can just write code the new way */
833
+ #ifndef RSTRING_LEN
834
+ # define RSTRING_LEN(x) RSTRING(x)->len
835
+ #endif
836
+ #ifndef RSTRING_PTR
837
+ # define RSTRING_PTR(x) RSTRING(x)->ptr
838
+ #endif
839
+ #ifndef RARRAY_LEN
840
+ # define RARRAY_LEN(x) RARRAY(x)->len
841
+ #endif
842
+ #ifndef RARRAY_PTR
843
+ # define RARRAY_PTR(x) RARRAY(x)->ptr
844
+ #endif
845
+
846
+ /*
847
+ * Need to be very careful about how these macros are defined, especially
848
+ * when compiling C++ code or C code with an ANSI C compiler.
849
+ *
850
+ * VALUEFUNC(f) is a macro used to typecast a C function that implements
851
+ * a Ruby method so that it can be passed as an argument to API functions
852
+ * like rb_define_method() and rb_define_singleton_method().
853
+ *
854
+ * VOIDFUNC(f) is a macro used to typecast a C function that implements
855
+ * either the "mark" or "free" stuff for a Ruby Data object, so that it
856
+ * can be passed as an argument to API functions like Data_Wrap_Struct()
857
+ * and Data_Make_Struct().
858
+ */
859
+
860
+ #ifdef __cplusplus
861
+ # ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
862
+ # define PROTECTFUNC(f) ((VALUE (*)()) f)
863
+ # define VALUEFUNC(f) ((VALUE (*)()) f)
864
+ # define VOIDFUNC(f) ((void (*)()) f)
865
+ # else
866
+ # ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
867
+ # define PROTECTFUNC(f) ((VALUE (*)()) f)
868
+ # define VALUEFUNC(f) ((VALUE (*)()) f)
869
+ # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
870
+ # else /* These definitions should work for Ruby 1.7+ */
871
+ # define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
872
+ # define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
873
+ # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
874
+ # endif
875
+ # endif
876
+ #else
877
+ # define VALUEFUNC(f) (f)
878
+ # define VOIDFUNC(f) (f)
879
+ #endif
880
+
881
+ /* Don't use for expressions have side effect */
882
+ #ifndef RB_STRING_VALUE
883
+ #define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s)))
884
+ #endif
885
+ #ifndef StringValue
886
+ #define StringValue(s) RB_STRING_VALUE(s)
887
+ #endif
888
+ #ifndef StringValuePtr
889
+ #define StringValuePtr(s) RSTRING_PTR(RB_STRING_VALUE(s))
890
+ #endif
891
+ #ifndef StringValueLen
892
+ #define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s))
893
+ #endif
894
+ #ifndef SafeStringValue
895
+ #define SafeStringValue(v) do {\
896
+ StringValue(v);\
897
+ rb_check_safe_str(v);\
898
+ } while (0)
899
+ #endif
900
+
901
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
902
+ #define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1)
903
+ #define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
904
+ #endif
905
+
906
+
907
+ /* -----------------------------------------------------------------------------
908
+ * error manipulation
909
+ * ----------------------------------------------------------------------------- */
910
+
911
+
912
+ /* Define some additional error types */
913
+ #define SWIG_ObjectPreviouslyDeletedError -100
914
+
915
+
916
+ /* Define custom exceptions for errors that do not map to existing Ruby
917
+ exceptions. Note this only works for C++ since a global cannot be
918
+ initialized by a funtion in C. For C, fallback to rb_eRuntimeError.*/
919
+
920
+ SWIGINTERN VALUE
921
+ getNullReferenceError(void) {
922
+ static int init = 0;
923
+ static VALUE rb_eNullReferenceError ;
924
+ if (!init) {
925
+ init = 1;
926
+ rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError);
927
+ }
928
+ return rb_eNullReferenceError;
929
+ }
930
+
931
+ SWIGINTERN VALUE
932
+ getObjectPreviouslyDeletedError(void) {
933
+ static int init = 0;
934
+ static VALUE rb_eObjectPreviouslyDeleted ;
935
+ if (!init) {
936
+ init = 1;
937
+ rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError);
938
+ }
939
+ return rb_eObjectPreviouslyDeleted;
940
+ }
941
+
942
+
943
+ SWIGINTERN VALUE
944
+ SWIG_Ruby_ErrorType(int SWIG_code) {
945
+ VALUE type;
946
+ switch (SWIG_code) {
947
+ case SWIG_MemoryError:
948
+ type = rb_eNoMemError;
949
+ break;
950
+ case SWIG_IOError:
951
+ type = rb_eIOError;
952
+ break;
953
+ case SWIG_RuntimeError:
954
+ type = rb_eRuntimeError;
955
+ break;
956
+ case SWIG_IndexError:
957
+ type = rb_eIndexError;
958
+ break;
959
+ case SWIG_TypeError:
960
+ type = rb_eTypeError;
961
+ break;
962
+ case SWIG_DivisionByZero:
963
+ type = rb_eZeroDivError;
964
+ break;
965
+ case SWIG_OverflowError:
966
+ type = rb_eRangeError;
967
+ break;
968
+ case SWIG_SyntaxError:
969
+ type = rb_eSyntaxError;
970
+ break;
971
+ case SWIG_ValueError:
972
+ type = rb_eArgError;
973
+ break;
974
+ case SWIG_SystemError:
975
+ type = rb_eFatal;
976
+ break;
977
+ case SWIG_AttributeError:
978
+ type = rb_eRuntimeError;
979
+ break;
980
+ case SWIG_NullReferenceError:
981
+ type = getNullReferenceError();
982
+ break;
983
+ case SWIG_ObjectPreviouslyDeletedError:
984
+ type = getObjectPreviouslyDeletedError();
985
+ break;
986
+ case SWIG_UnknownError:
987
+ type = rb_eRuntimeError;
988
+ break;
989
+ default:
990
+ type = rb_eRuntimeError;
991
+ }
992
+ return type;
993
+ }
994
+
995
+
996
+
997
+
998
+ /* -----------------------------------------------------------------------------
999
+ * See the LICENSE file for information on copyright, usage and redistribution
1000
+ * of SWIG, and the README file for authors - http://www.swig.org/release.html.
1001
+ *
1002
+ * rubytracking.swg
1003
+ *
1004
+ * This file contains support for tracking mappings from
1005
+ * Ruby objects to C++ objects. This functionality is needed
1006
+ * to implement mark functions for Ruby's mark and sweep
1007
+ * garbage collector.
1008
+ * ----------------------------------------------------------------------------- */
1009
+
1010
+ #ifdef __cplusplus
1011
+ extern "C" {
1012
+ #endif
1013
+
1014
+
1015
+ /* Global Ruby hash table to store Trackings from C/C++
1016
+ structs to Ruby Objects. */
1017
+ static VALUE swig_ruby_trackings;
1018
+
1019
+ /* Global variable that stores a reference to the ruby
1020
+ hash table delete function. */
1021
+ static ID swig_ruby_hash_delete = 0;
1022
+
1023
+ /* Setup a Ruby hash table to store Trackings */
1024
+ SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
1025
+ /* Create a ruby hash table to store Trackings from C++
1026
+ objects to Ruby objects. Also make sure to tell
1027
+ the garabage collector about the hash table. */
1028
+ swig_ruby_trackings = rb_hash_new();
1029
+ rb_gc_register_address(&swig_ruby_trackings);
1030
+
1031
+ /* Now store a reference to the hash table delete function
1032
+ so that we only have to look it up once.*/
1033
+ swig_ruby_hash_delete = rb_intern("delete");
1034
+ }
1035
+
1036
+ /* Get a Ruby number to reference a pointer */
1037
+ SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) {
1038
+ /* We cast the pointer to an unsigned long
1039
+ and then store a reference to it using
1040
+ a Ruby number object. */
1041
+
1042
+ /* Convert the pointer to a Ruby number */
1043
+ unsigned long value = (unsigned long) ptr;
1044
+ return LONG2NUM(value);
1045
+ }
1046
+
1047
+ /* Get a Ruby number to reference an object */
1048
+ SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) {
1049
+ /* We cast the object to an unsigned long
1050
+ and then store a reference to it using
1051
+ a Ruby number object. */
1052
+
1053
+ /* Convert the Object to a Ruby number */
1054
+ unsigned long value = (unsigned long) object;
1055
+ return LONG2NUM(value);
1056
+ }
1057
+
1058
+ /* Get a Ruby object from a previously stored reference */
1059
+ SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) {
1060
+ /* The provided Ruby number object is a reference
1061
+ to the Ruby object we want.*/
1062
+
1063
+ /* First convert the Ruby number to a C number */
1064
+ unsigned long value = NUM2LONG(reference);
1065
+ return (VALUE) value;
1066
+ }
1067
+
1068
+ /* Add a Tracking from a C/C++ struct to a Ruby object */
1069
+ SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) {
1070
+ /* In a Ruby hash table we store the pointer and
1071
+ the associated Ruby object. The trick here is
1072
+ that we cannot store the Ruby object directly - if
1073
+ we do then it cannot be garbage collected. So
1074
+ instead we typecast it as a unsigned long and
1075
+ convert it to a Ruby number object.*/
1076
+
1077
+ /* Get a reference to the pointer as a Ruby number */
1078
+ VALUE key = SWIG_RubyPtrToReference(ptr);
1079
+
1080
+ /* Get a reference to the Ruby object as a Ruby number */
1081
+ VALUE value = SWIG_RubyObjectToReference(object);
1082
+
1083
+ /* Store the mapping to the global hash table. */
1084
+ rb_hash_aset(swig_ruby_trackings, key, value);
1085
+ }
1086
+
1087
+ /* Get the Ruby object that owns the specified C/C++ struct */
1088
+ SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
1089
+ /* Get a reference to the pointer as a Ruby number */
1090
+ VALUE key = SWIG_RubyPtrToReference(ptr);
1091
+
1092
+ /* Now lookup the value stored in the global hash table */
1093
+ VALUE value = rb_hash_aref(swig_ruby_trackings, key);
1094
+
1095
+ if (value == Qnil) {
1096
+ /* No object exists - return nil. */
1097
+ return Qnil;
1098
+ }
1099
+ else {
1100
+ /* Convert this value to Ruby object */
1101
+ return SWIG_RubyReferenceToObject(value);
1102
+ }
1103
+ }
1104
+
1105
+ /* Remove a Tracking from a C/C++ struct to a Ruby object. It
1106
+ is very important to remove objects once they are destroyed
1107
+ since the same memory address may be reused later to create
1108
+ a new object. */
1109
+ SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
1110
+ /* Get a reference to the pointer as a Ruby number */
1111
+ VALUE key = SWIG_RubyPtrToReference(ptr);
1112
+
1113
+ /* Delete the object from the hash table by calling Ruby's
1114
+ do this we need to call the Hash.delete method.*/
1115
+ rb_funcall(swig_ruby_trackings, swig_ruby_hash_delete, 1, key);
1116
+ }
1117
+
1118
+ /* This is a helper method that unlinks a Ruby object from its
1119
+ underlying C++ object. This is needed if the lifetime of the
1120
+ Ruby object is longer than the C++ object */
1121
+ SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
1122
+ VALUE object = SWIG_RubyInstanceFor(ptr);
1123
+
1124
+ if (object != Qnil) {
1125
+ DATA_PTR(object) = 0;
1126
+ }
1127
+ }
1128
+
1129
+
1130
+ #ifdef __cplusplus
1131
+ }
1132
+ #endif
1133
+
1134
+ /* -----------------------------------------------------------------------------
1135
+ * Ruby API portion that goes into the runtime
1136
+ * ----------------------------------------------------------------------------- */
1137
+
1138
+ #ifdef __cplusplus
1139
+ extern "C" {
1140
+ #endif
1141
+
1142
+ SWIGINTERN VALUE
1143
+ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
1144
+ if (NIL_P(target)) {
1145
+ target = o;
1146
+ } else {
1147
+ if (TYPE(target) != T_ARRAY) {
1148
+ VALUE o2 = target;
1149
+ target = rb_ary_new();
1150
+ rb_ary_push(target, o2);
1151
+ }
1152
+ rb_ary_push(target, o);
1153
+ }
1154
+ return target;
1155
+ }
1156
+
1157
+ #ifdef __cplusplus
1158
+ }
1159
+ #endif
1160
+
1161
+
1162
+ /* -----------------------------------------------------------------------------
1163
+ * See the LICENSE file for information on copyright, usage and redistribution
1164
+ * of SWIG, and the README file for authors - http://www.swig.org/release.html.
1165
+ *
1166
+ * rubyrun.swg
1167
+ *
1168
+ * This file contains the runtime support for Ruby modules
1169
+ * and includes code for managing global variables and pointer
1170
+ * type checking.
1171
+ * ----------------------------------------------------------------------------- */
1172
+
1173
+ /* For backward compatibility only */
1174
+ #define SWIG_POINTER_EXCEPTION 0
1175
+
1176
+ /* for raw pointers */
1177
+ #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1178
+ #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1179
+ #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags)
1180
+ #define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own)
1181
+ #define swig_owntype ruby_owntype
1182
+
1183
+ /* for raw packed data */
1184
+ #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
1185
+ #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type)
1186
+
1187
+ /* for class or struct pointers */
1188
+ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1189
+ #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1190
+
1191
+ /* for C or C++ function pointers */
1192
+ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0)
1193
+ #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0)
1194
+
1195
+ /* for C++ member pointers, ie, member methods */
1196
+ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty)
1197
+ #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type)
1198
+
1199
+
1200
+ /* Runtime API */
1201
+
1202
+ #define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule()
1203
+ #define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer)
1204
+
1205
+
1206
+ /* Error manipulation */
1207
+
1208
+ #define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code)
1209
+ #define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), msg)
1210
+ #define SWIG_fail goto fail
1211
+
1212
+
1213
+ /* Ruby-specific SWIG API */
1214
+
1215
+ #define SWIG_InitRuntime() SWIG_Ruby_InitRuntime()
1216
+ #define SWIG_define_class(ty) SWIG_Ruby_define_class(ty)
1217
+ #define SWIG_NewClassInstance(value, ty) SWIG_Ruby_NewClassInstance(value, ty)
1218
+ #define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value)
1219
+ #define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty)
1220
+
1221
+
1222
+ /* -----------------------------------------------------------------------------
1223
+ * pointers/data manipulation
1224
+ * ----------------------------------------------------------------------------- */
1225
+
1226
+ #ifdef __cplusplus
1227
+ extern "C" {
1228
+ #if 0
1229
+ } /* cc-mode */
1230
+ #endif
1231
+ #endif
1232
+
1233
+ typedef struct {
1234
+ VALUE klass;
1235
+ VALUE mImpl;
1236
+ void (*mark)(void *);
1237
+ void (*destroy)(void *);
1238
+ int trackObjects;
1239
+ } swig_class;
1240
+
1241
+
1242
+ static VALUE _mSWIG = Qnil;
1243
+ static VALUE _cSWIG_Pointer = Qnil;
1244
+ static VALUE swig_runtime_data_type_pointer = Qnil;
1245
+
1246
+ SWIGRUNTIME VALUE
1247
+ getExceptionClass(void) {
1248
+ static int init = 0;
1249
+ static VALUE rubyExceptionClass ;
1250
+ if (!init) {
1251
+ init = 1;
1252
+ rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception"));
1253
+ }
1254
+ return rubyExceptionClass;
1255
+ }
1256
+
1257
+ /* This code checks to see if the Ruby object being raised as part
1258
+ of an exception inherits from the Ruby class Exception. If so,
1259
+ the object is simply returned. If not, then a new Ruby exception
1260
+ object is created and that will be returned to Ruby.*/
1261
+ SWIGRUNTIME VALUE
1262
+ SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) {
1263
+ VALUE exceptionClass = getExceptionClass();
1264
+ if (rb_obj_is_kind_of(obj, exceptionClass)) {
1265
+ return obj;
1266
+ } else {
1267
+ return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj));
1268
+ }
1269
+ }
1270
+
1271
+ /* Initialize Ruby runtime support */
1272
+ SWIGRUNTIME void
1273
+ SWIG_Ruby_InitRuntime(void)
1274
+ {
1275
+ if (_mSWIG == Qnil) {
1276
+ _mSWIG = rb_define_module("SWIG");
1277
+ }
1278
+ }
1279
+
1280
+ /* Define Ruby class for C type */
1281
+ SWIGRUNTIME void
1282
+ SWIG_Ruby_define_class(swig_type_info *type)
1283
+ {
1284
+ VALUE klass;
1285
+ char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1286
+ sprintf(klass_name, "TYPE%s", type->name);
1287
+ if (NIL_P(_cSWIG_Pointer)) {
1288
+ _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
1289
+ rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
1290
+ }
1291
+ klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
1292
+ free((void *) klass_name);
1293
+ }
1294
+
1295
+ /* Create a new pointer object */
1296
+ SWIGRUNTIME VALUE
1297
+ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1298
+ {
1299
+ int own = flags & SWIG_POINTER_OWN;
1300
+
1301
+ char *klass_name;
1302
+ swig_class *sklass;
1303
+ VALUE klass;
1304
+ VALUE obj;
1305
+
1306
+ if (!ptr)
1307
+ return Qnil;
1308
+
1309
+ if (type->clientdata) {
1310
+ sklass = (swig_class *) type->clientdata;
1311
+
1312
+ /* Are we tracking this class and have we already returned this Ruby object? */
1313
+ if (sklass->trackObjects) {
1314
+ obj = SWIG_RubyInstanceFor(ptr);
1315
+
1316
+ /* Check the object's type and make sure it has the correct type.
1317
+ It might not in cases where methods do things like
1318
+ downcast methods. */
1319
+ if (obj != Qnil) {
1320
+ VALUE value = rb_iv_get(obj, "__swigtype__");
1321
+ char* type_name = RSTRING_PTR(value);
1322
+
1323
+ if (strcmp(type->name, type_name) == 0) {
1324
+ return obj;
1325
+ }
1326
+ }
1327
+ }
1328
+
1329
+ /* Create a new Ruby object */
1330
+ obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), (own ? VOIDFUNC(sklass->destroy) : 0), ptr);
1331
+
1332
+ /* If tracking is on for this class then track this object. */
1333
+ if (sklass->trackObjects) {
1334
+ SWIG_RubyAddTracking(ptr, obj);
1335
+ }
1336
+ } else {
1337
+ klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1338
+ sprintf(klass_name, "TYPE%s", type->name);
1339
+ klass = rb_const_get(_mSWIG, rb_intern(klass_name));
1340
+ free((void *) klass_name);
1341
+ obj = Data_Wrap_Struct(klass, 0, 0, ptr);
1342
+ }
1343
+ rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
1344
+
1345
+ return obj;
1346
+ }
1347
+
1348
+ /* Create a new class instance (always owned) */
1349
+ SWIGRUNTIME VALUE
1350
+ SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
1351
+ {
1352
+ VALUE obj;
1353
+ swig_class *sklass = (swig_class *) type->clientdata;
1354
+ obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
1355
+ rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
1356
+ return obj;
1357
+ }
1358
+
1359
+ /* Get type mangle from class name */
1360
+ SWIGRUNTIMEINLINE char *
1361
+ SWIG_Ruby_MangleStr(VALUE obj)
1362
+ {
1363
+ VALUE stype = rb_iv_get(obj, "__swigtype__");
1364
+ return StringValuePtr(stype);
1365
+ }
1366
+
1367
+ /* Acquire a pointer value */
1368
+ typedef void (*ruby_owntype)(void*);
1369
+
1370
+ SWIGRUNTIME ruby_owntype
1371
+ SWIG_Ruby_AcquirePtr(VALUE obj, ruby_owntype own) {
1372
+ if (obj) {
1373
+ ruby_owntype oldown = RDATA(obj)->dfree;
1374
+ RDATA(obj)->dfree = own;
1375
+ return oldown;
1376
+ } else {
1377
+ return 0;
1378
+ }
1379
+ }
1380
+
1381
+ /* Convert a pointer value */
1382
+ SWIGRUNTIME int
1383
+ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, ruby_owntype *own)
1384
+ {
1385
+ char *c;
1386
+ swig_cast_info *tc;
1387
+ void *vptr = 0;
1388
+
1389
+ /* Grab the pointer */
1390
+ if (NIL_P(obj)) {
1391
+ *ptr = 0;
1392
+ return SWIG_OK;
1393
+ } else {
1394
+ if (TYPE(obj) != T_DATA) {
1395
+ return SWIG_ERROR;
1396
+ }
1397
+ Data_Get_Struct(obj, void, vptr);
1398
+ }
1399
+
1400
+ if (own) *own = RDATA(obj)->dfree;
1401
+
1402
+ /* Check to see if the input object is giving up ownership
1403
+ of the underlying C struct or C++ object. If so then we
1404
+ need to reset the destructor since the Ruby object no
1405
+ longer owns the underlying C++ object.*/
1406
+ if (flags & SWIG_POINTER_DISOWN) {
1407
+ /* Is tracking on for this class? */
1408
+ int track = 0;
1409
+ if (ty && ty->clientdata) {
1410
+ swig_class *sklass = (swig_class *) ty->clientdata;
1411
+ track = sklass->trackObjects;
1412
+ }
1413
+
1414
+ if (track) {
1415
+ /* We are tracking objects for this class. Thus we change the destructor
1416
+ * to SWIG_RubyRemoveTracking. This allows us to
1417
+ * remove the mapping from the C++ to Ruby object
1418
+ * when the Ruby object is garbage collected. If we don't
1419
+ * do this, then it is possible we will return a reference
1420
+ * to a Ruby object that no longer exists thereby crashing Ruby. */
1421
+ RDATA(obj)->dfree = SWIG_RubyRemoveTracking;
1422
+ } else {
1423
+ RDATA(obj)->dfree = 0;
1424
+ }
1425
+ }
1426
+
1427
+ /* Do type-checking if type info was provided */
1428
+ if (ty) {
1429
+ if (ty->clientdata) {
1430
+ if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) {
1431
+ if (vptr == 0) {
1432
+ /* The object has already been deleted */
1433
+ return SWIG_ObjectPreviouslyDeletedError;
1434
+ }
1435
+ *ptr = vptr;
1436
+ return SWIG_OK;
1437
+ }
1438
+ }
1439
+ if ((c = SWIG_MangleStr(obj)) == NULL) {
1440
+ return SWIG_ERROR;
1441
+ }
1442
+ tc = SWIG_TypeCheck(c, ty);
1443
+ if (!tc) {
1444
+ return SWIG_ERROR;
1445
+ }
1446
+ *ptr = SWIG_TypeCast(tc, vptr);
1447
+ } else {
1448
+ *ptr = vptr;
1449
+ }
1450
+
1451
+ return SWIG_OK;
1452
+ }
1453
+
1454
+ /* Check convert */
1455
+ SWIGRUNTIMEINLINE int
1456
+ SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
1457
+ {
1458
+ char *c = SWIG_MangleStr(obj);
1459
+ if (!c) return 0;
1460
+ return SWIG_TypeCheck(c,ty) != 0;
1461
+ }
1462
+
1463
+ SWIGRUNTIME VALUE
1464
+ SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
1465
+ char result[1024];
1466
+ char *r = result;
1467
+ if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
1468
+ *(r++) = '_';
1469
+ r = SWIG_PackData(r, ptr, sz);
1470
+ strcpy(r, type->name);
1471
+ return rb_str_new2(result);
1472
+ }
1473
+
1474
+ /* Convert a packed value value */
1475
+ SWIGRUNTIME int
1476
+ SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
1477
+ swig_cast_info *tc;
1478
+ const char *c;
1479
+
1480
+ if (TYPE(obj) != T_STRING) goto type_error;
1481
+ c = StringValuePtr(obj);
1482
+ /* Pointer values must start with leading underscore */
1483
+ if (*c != '_') goto type_error;
1484
+ c++;
1485
+ c = SWIG_UnpackData(c, ptr, sz);
1486
+ if (ty) {
1487
+ tc = SWIG_TypeCheck(c, ty);
1488
+ if (!tc) goto type_error;
1489
+ }
1490
+ return SWIG_OK;
1491
+
1492
+ type_error:
1493
+ return SWIG_ERROR;
1494
+ }
1495
+
1496
+ SWIGRUNTIME swig_module_info *
1497
+ SWIG_Ruby_GetModule(void)
1498
+ {
1499
+ VALUE pointer;
1500
+ swig_module_info *ret = 0;
1501
+ VALUE verbose = rb_gv_get("VERBOSE");
1502
+
1503
+ /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */
1504
+ rb_gv_set("VERBOSE", Qfalse);
1505
+
1506
+ /* first check if pointer already created */
1507
+ pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1508
+ if (pointer != Qnil) {
1509
+ Data_Get_Struct(pointer, swig_module_info, ret);
1510
+ }
1511
+
1512
+ /* reinstate warnings */
1513
+ rb_gv_set("VERBOSE", verbose);
1514
+ return ret;
1515
+ }
1516
+
1517
+ SWIGRUNTIME void
1518
+ SWIG_Ruby_SetModule(swig_module_info *pointer)
1519
+ {
1520
+ /* register a new class */
1521
+ VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
1522
+ /* create and store the structure pointer to a global variable */
1523
+ swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
1524
+ rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
1525
+ }
1526
+
1527
+ #ifdef __cplusplus
1528
+ #if 0
1529
+ { /* cc-mode */
1530
+ #endif
1531
+ }
1532
+ #endif
1533
+
1534
+
1535
+
1536
+ #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1537
+
1538
+ #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1539
+
1540
+
1541
+
1542
+ /* -------- TYPES TABLE (BEGIN) -------- */
1543
+
1544
+ #define SWIGTYPE_p_CQR_Encode swig_types[0]
1545
+ #define SWIGTYPE_p_QRDraw swig_types[1]
1546
+ #define SWIGTYPE_p_QRDrawJPEG swig_types[2]
1547
+ #define SWIGTYPE_p_QRDrawPNG swig_types[3]
1548
+ #define SWIGTYPE_p_QRDrawPS swig_types[4]
1549
+ #define SWIGTYPE_p_QRDrawTIFF swig_types[5]
1550
+ #define SWIGTYPE_p_a_177__unsigned_char swig_types[6]
1551
+ #define SWIGTYPE_p_bool swig_types[7]
1552
+ #define SWIGTYPE_p_char swig_types[8]
1553
+ #define SWIGTYPE_p_int swig_types[9]
1554
+ #define SWIGTYPE_p_tagQR_VERSIONINFO swig_types[10]
1555
+ #define SWIGTYPE_p_tagRS_BLOCKINFO swig_types[11]
1556
+ #define SWIGTYPE_p_unsigned_char swig_types[12]
1557
+ #define SWIGTYPE_p_unsigned_short swig_types[13]
1558
+ static swig_type_info *swig_types[15];
1559
+ static swig_module_info swig_module = {swig_types, 14, 0, 0, 0, 0};
1560
+ #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1561
+ #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1562
+
1563
+ /* -------- TYPES TABLE (END) -------- */
1564
+
1565
+ #define SWIG_init Init_QR
1566
+ #define SWIG_name "QR"
1567
+
1568
+ static VALUE mQR;
1569
+
1570
+ #define SWIGVERSION 0x010331
1571
+ #define SWIG_VERSION SWIGVERSION
1572
+
1573
+
1574
+ #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
1575
+ #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
1576
+
1577
+
1578
+ #include <stdexcept>
1579
+
1580
+
1581
+ #include "win2ansi.h"
1582
+ #include "QR_Encode.h"
1583
+ #include "qr_draw.h"
1584
+ #include "qr_draw_jpeg.h"
1585
+ #include "qr_draw_png.h"
1586
+ #include "qr_draw_ps.h"
1587
+ #include "qr_draw_tiff.h"
1588
+
1589
+
1590
+ #include <limits.h>
1591
+ #ifndef LLONG_MIN
1592
+ # define LLONG_MIN LONG_LONG_MIN
1593
+ #endif
1594
+ #ifndef LLONG_MAX
1595
+ # define LLONG_MAX LONG_LONG_MAX
1596
+ #endif
1597
+ #ifndef ULLONG_MAX
1598
+ # define ULLONG_MAX ULONG_LONG_MAX
1599
+ #endif
1600
+
1601
+
1602
+ #define SWIG_From_long LONG2NUM
1603
+
1604
+
1605
+ SWIGINTERNINLINE VALUE
1606
+ SWIG_From_int (int value)
1607
+ {
1608
+ return SWIG_From_long (value);
1609
+ }
1610
+
1611
+
1612
+ SWIGINTERN swig_type_info*
1613
+ SWIG_pchar_descriptor(void)
1614
+ {
1615
+ static int init = 0;
1616
+ static swig_type_info* info = 0;
1617
+ if (!init) {
1618
+ info = SWIG_TypeQuery("_p_char");
1619
+ init = 1;
1620
+ }
1621
+ return info;
1622
+ }
1623
+
1624
+
1625
+ SWIGINTERN int
1626
+ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
1627
+ {
1628
+ if (TYPE(obj) == T_STRING) {
1629
+
1630
+
1631
+
1632
+ char *cstr = STR2CSTR(obj);
1633
+
1634
+ size_t size = RSTRING_LEN(obj) + 1;
1635
+ if (cptr) {
1636
+ if (alloc) {
1637
+ if (*alloc == SWIG_NEWOBJ) {
1638
+ *cptr = reinterpret_cast< char* >(memcpy((new char[size]), cstr, sizeof(char)*(size)));
1639
+ } else {
1640
+ *cptr = cstr;
1641
+ *alloc = SWIG_OLDOBJ;
1642
+ }
1643
+ }
1644
+ }
1645
+ if (psize) *psize = size;
1646
+ return SWIG_OK;
1647
+ } else {
1648
+ swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
1649
+ if (pchar_descriptor) {
1650
+ void* vptr = 0;
1651
+ if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
1652
+ if (cptr) *cptr = (char *)vptr;
1653
+ if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0;
1654
+ if (alloc) *alloc = SWIG_OLDOBJ;
1655
+ return SWIG_OK;
1656
+ }
1657
+ }
1658
+ }
1659
+ return SWIG_TypeError;
1660
+ }
1661
+
1662
+
1663
+
1664
+
1665
+
1666
+ SWIGINTERN VALUE
1667
+ SWIG_ruby_failed(void)
1668
+ {
1669
+ return Qnil;
1670
+ }
1671
+
1672
+
1673
+ /*@SWIG:%ruby_aux_method@*/
1674
+ SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
1675
+ {
1676
+ VALUE obj = args[0];
1677
+ VALUE type = TYPE(obj);
1678
+ long *res = (long *)(args[1]);
1679
+ *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj);
1680
+ return obj;
1681
+ }
1682
+ /*@SWIG@*/
1683
+
1684
+ SWIGINTERN int
1685
+ SWIG_AsVal_long (VALUE obj, long* val)
1686
+ {
1687
+ VALUE type = TYPE(obj);
1688
+ if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
1689
+ long v;
1690
+ VALUE a[2];
1691
+ a[0] = obj;
1692
+ a[1] = (VALUE)(&v);
1693
+ if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
1694
+ if (val) *val = v;
1695
+ return SWIG_OK;
1696
+ }
1697
+ }
1698
+ return SWIG_TypeError;
1699
+ }
1700
+
1701
+
1702
+ SWIGINTERN int
1703
+ SWIG_AsVal_int (VALUE obj, int *val)
1704
+ {
1705
+ long v;
1706
+ int res = SWIG_AsVal_long (obj, &v);
1707
+ if (SWIG_IsOK(res)) {
1708
+ if ((v < INT_MIN || v > INT_MAX)) {
1709
+ return SWIG_OverflowError;
1710
+ } else {
1711
+ if (val) *val = static_cast< int >(v);
1712
+ }
1713
+ }
1714
+ return res;
1715
+ }
1716
+
1717
+
1718
+ SWIGINTERN int
1719
+ SWIG_AsVal_bool (VALUE obj, bool *val)
1720
+ {
1721
+ if (obj == Qtrue) {
1722
+ if (val) *val = true;
1723
+ return SWIG_OK;
1724
+ } else if (obj == Qfalse) {
1725
+ if (val) *val = false;
1726
+ return SWIG_OK;
1727
+ } else {
1728
+ int res = 0;
1729
+ if (SWIG_AsVal_int (obj, &res) == SWIG_OK) {
1730
+ if (val) *val = res ? true : false;
1731
+ return SWIG_OK;
1732
+ }
1733
+ }
1734
+ return SWIG_TypeError;
1735
+ }
1736
+
1737
+
1738
+ SWIGINTERNINLINE VALUE
1739
+ SWIG_From_bool (bool value)
1740
+ {
1741
+ return value ? Qtrue : Qfalse;
1742
+ }
1743
+
1744
+ swig_class cQRDraw;
1745
+
1746
+ SWIGINTERN void
1747
+ free_QRDraw(QRDraw *arg1) {
1748
+ delete arg1;
1749
+ }
1750
+
1751
+ SWIGINTERN VALUE
1752
+ _wrap_QRDraw_setup(int argc, VALUE *argv, VALUE self) {
1753
+ QRDraw *arg1 = (QRDraw *) 0 ;
1754
+ char *arg2 = (char *) 0 ;
1755
+ int arg3 ;
1756
+ int arg4 ;
1757
+ void *argp1 = 0 ;
1758
+ int res1 = 0 ;
1759
+ int res2 ;
1760
+ char *buf2 = 0 ;
1761
+ int alloc2 = 0 ;
1762
+ int val3 ;
1763
+ int ecode3 = 0 ;
1764
+ int val4 ;
1765
+ int ecode4 = 0 ;
1766
+
1767
+ if ((argc < 3) || (argc > 3)) {
1768
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
1769
+ }
1770
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_QRDraw, 0 | 0 );
1771
+ if (!SWIG_IsOK(res1)) {
1772
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setup" "', argument " "1"" of type '" "QRDraw *""'");
1773
+ }
1774
+ arg1 = reinterpret_cast< QRDraw * >(argp1);
1775
+ res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
1776
+ if (!SWIG_IsOK(res2)) {
1777
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setup" "', argument " "2"" of type '" "char *""'");
1778
+ }
1779
+ arg2 = reinterpret_cast< char * >(buf2);
1780
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
1781
+ if (!SWIG_IsOK(ecode3)) {
1782
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "setup" "', argument " "3"" of type '" "int""'");
1783
+ }
1784
+ arg3 = static_cast< int >(val3);
1785
+ ecode4 = SWIG_AsVal_int(argv[2], &val4);
1786
+ if (!SWIG_IsOK(ecode4)) {
1787
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "setup" "', argument " "4"" of type '" "int""'");
1788
+ }
1789
+ arg4 = static_cast< int >(val4);
1790
+ (arg1)->setup(arg2,arg3,arg4);
1791
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
1792
+ return Qnil;
1793
+ fail:
1794
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
1795
+ return Qnil;
1796
+ }
1797
+
1798
+
1799
+ SWIGINTERN VALUE
1800
+ _wrap_QRDraw_draw(int argc, VALUE *argv, VALUE self) {
1801
+ QRDraw *arg1 = (QRDraw *) 0 ;
1802
+ char *arg2 = (char *) 0 ;
1803
+ int arg3 ;
1804
+ int arg4 ;
1805
+ unsigned char (*arg5)[177] ;
1806
+ void *arg6 = (void *) 0 ;
1807
+ int result;
1808
+ void *argp1 = 0 ;
1809
+ int res1 = 0 ;
1810
+ int res2 ;
1811
+ char *buf2 = 0 ;
1812
+ int alloc2 = 0 ;
1813
+ int val3 ;
1814
+ int ecode3 = 0 ;
1815
+ int val4 ;
1816
+ int ecode4 = 0 ;
1817
+ void *argp5 = 0 ;
1818
+ int res5 = 0 ;
1819
+ int res6 ;
1820
+ VALUE vresult = Qnil;
1821
+
1822
+ if ((argc < 5) || (argc > 5)) {
1823
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
1824
+ }
1825
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_QRDraw, 0 | 0 );
1826
+ if (!SWIG_IsOK(res1)) {
1827
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "draw" "', argument " "1"" of type '" "QRDraw *""'");
1828
+ }
1829
+ arg1 = reinterpret_cast< QRDraw * >(argp1);
1830
+ res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
1831
+ if (!SWIG_IsOK(res2)) {
1832
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "draw" "', argument " "2"" of type '" "char *""'");
1833
+ }
1834
+ arg2 = reinterpret_cast< char * >(buf2);
1835
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
1836
+ if (!SWIG_IsOK(ecode3)) {
1837
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "draw" "', argument " "3"" of type '" "int""'");
1838
+ }
1839
+ arg3 = static_cast< int >(val3);
1840
+ ecode4 = SWIG_AsVal_int(argv[2], &val4);
1841
+ if (!SWIG_IsOK(ecode4)) {
1842
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "draw" "', argument " "4"" of type '" "int""'");
1843
+ }
1844
+ arg4 = static_cast< int >(val4);
1845
+ res5 = SWIG_ConvertPtr(argv[3], &argp5,SWIGTYPE_p_a_177__unsigned_char, 0 | 0 );
1846
+ if (!SWIG_IsOK(res5)) {
1847
+ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "draw" "', argument " "5"" of type '" "unsigned char [177][177]""'");
1848
+ }
1849
+ arg5 = reinterpret_cast< unsigned char (*)[177] >(argp5);
1850
+ res6 = SWIG_ConvertPtr(argv[4],SWIG_as_voidptrptr(&arg6), 0, 0);
1851
+ if (!SWIG_IsOK(res6)) {
1852
+ SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "draw" "', argument " "6"" of type '" "void *""'");
1853
+ }
1854
+ result = (int)(arg1)->draw(arg2,arg3,arg4,(unsigned char (*)[177])arg5,arg6);
1855
+ vresult = SWIG_From_int(static_cast< int >(result));
1856
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
1857
+ return vresult;
1858
+ fail:
1859
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
1860
+ return Qnil;
1861
+ }
1862
+
1863
+
1864
+ swig_class cQRDrawJPEG;
1865
+
1866
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
1867
+ SWIGINTERN VALUE
1868
+ _wrap_QRDrawJPEG_allocate(VALUE self) {
1869
+ #else
1870
+ SWIGINTERN VALUE
1871
+ _wrap_QRDrawJPEG_allocate(int argc, VALUE *argv, VALUE self) {
1872
+ #endif
1873
+
1874
+
1875
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_QRDrawJPEG);
1876
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
1877
+ rb_obj_call_init(vresult, argc, argv);
1878
+ #endif
1879
+ return vresult;
1880
+ }
1881
+
1882
+
1883
+ SWIGINTERN VALUE
1884
+ _wrap_new_QRDrawJPEG(int argc, VALUE *argv, VALUE self) {
1885
+ QRDrawJPEG *result = 0 ;
1886
+
1887
+ if ((argc < 0) || (argc > 0)) {
1888
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
1889
+ }
1890
+ result = (QRDrawJPEG *)new QRDrawJPEG();DATA_PTR(self) = result;
1891
+
1892
+ return self;
1893
+ fail:
1894
+ return Qnil;
1895
+ }
1896
+
1897
+
1898
+ SWIGINTERN void
1899
+ free_QRDrawJPEG(QRDrawJPEG *arg1) {
1900
+ delete arg1;
1901
+ }
1902
+
1903
+ SWIGINTERN VALUE
1904
+ _wrap_QRDrawJPEG_draw(int argc, VALUE *argv, VALUE self) {
1905
+ QRDrawJPEG *arg1 = (QRDrawJPEG *) 0 ;
1906
+ char *arg2 = (char *) 0 ;
1907
+ int arg3 ;
1908
+ int arg4 ;
1909
+ unsigned char (*arg5)[177] ;
1910
+ void *arg6 = (void *) 0 ;
1911
+ int result;
1912
+ void *argp1 = 0 ;
1913
+ int res1 = 0 ;
1914
+ int res2 ;
1915
+ char *buf2 = 0 ;
1916
+ int alloc2 = 0 ;
1917
+ int val3 ;
1918
+ int ecode3 = 0 ;
1919
+ int val4 ;
1920
+ int ecode4 = 0 ;
1921
+ void *argp5 = 0 ;
1922
+ int res5 = 0 ;
1923
+ int res6 ;
1924
+ VALUE vresult = Qnil;
1925
+
1926
+ if ((argc < 5) || (argc > 5)) {
1927
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
1928
+ }
1929
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_QRDrawJPEG, 0 | 0 );
1930
+ if (!SWIG_IsOK(res1)) {
1931
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "draw" "', argument " "1"" of type '" "QRDrawJPEG *""'");
1932
+ }
1933
+ arg1 = reinterpret_cast< QRDrawJPEG * >(argp1);
1934
+ res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
1935
+ if (!SWIG_IsOK(res2)) {
1936
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "draw" "', argument " "2"" of type '" "char *""'");
1937
+ }
1938
+ arg2 = reinterpret_cast< char * >(buf2);
1939
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
1940
+ if (!SWIG_IsOK(ecode3)) {
1941
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "draw" "', argument " "3"" of type '" "int""'");
1942
+ }
1943
+ arg3 = static_cast< int >(val3);
1944
+ ecode4 = SWIG_AsVal_int(argv[2], &val4);
1945
+ if (!SWIG_IsOK(ecode4)) {
1946
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "draw" "', argument " "4"" of type '" "int""'");
1947
+ }
1948
+ arg4 = static_cast< int >(val4);
1949
+ res5 = SWIG_ConvertPtr(argv[3], &argp5,SWIGTYPE_p_a_177__unsigned_char, 0 | 0 );
1950
+ if (!SWIG_IsOK(res5)) {
1951
+ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "draw" "', argument " "5"" of type '" "unsigned char [177][177]""'");
1952
+ }
1953
+ arg5 = reinterpret_cast< unsigned char (*)[177] >(argp5);
1954
+ res6 = SWIG_ConvertPtr(argv[4],SWIG_as_voidptrptr(&arg6), 0, 0);
1955
+ if (!SWIG_IsOK(res6)) {
1956
+ SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "draw" "', argument " "6"" of type '" "void *""'");
1957
+ }
1958
+ result = (int)(arg1)->draw(arg2,arg3,arg4,(unsigned char (*)[177])arg5,arg6);
1959
+ vresult = SWIG_From_int(static_cast< int >(result));
1960
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
1961
+ return vresult;
1962
+ fail:
1963
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
1964
+ return Qnil;
1965
+ }
1966
+
1967
+
1968
+ swig_class cQRDrawPNG;
1969
+
1970
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
1971
+ SWIGINTERN VALUE
1972
+ _wrap_QRDrawPNG_allocate(VALUE self) {
1973
+ #else
1974
+ SWIGINTERN VALUE
1975
+ _wrap_QRDrawPNG_allocate(int argc, VALUE *argv, VALUE self) {
1976
+ #endif
1977
+
1978
+
1979
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_QRDrawPNG);
1980
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
1981
+ rb_obj_call_init(vresult, argc, argv);
1982
+ #endif
1983
+ return vresult;
1984
+ }
1985
+
1986
+
1987
+ SWIGINTERN VALUE
1988
+ _wrap_new_QRDrawPNG(int argc, VALUE *argv, VALUE self) {
1989
+ QRDrawPNG *result = 0 ;
1990
+
1991
+ if ((argc < 0) || (argc > 0)) {
1992
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
1993
+ }
1994
+ result = (QRDrawPNG *)new QRDrawPNG();DATA_PTR(self) = result;
1995
+
1996
+ return self;
1997
+ fail:
1998
+ return Qnil;
1999
+ }
2000
+
2001
+
2002
+ SWIGINTERN void
2003
+ free_QRDrawPNG(QRDrawPNG *arg1) {
2004
+ delete arg1;
2005
+ }
2006
+
2007
+ SWIGINTERN VALUE
2008
+ _wrap_QRDrawPNG_draw(int argc, VALUE *argv, VALUE self) {
2009
+ QRDrawPNG *arg1 = (QRDrawPNG *) 0 ;
2010
+ char *arg2 = (char *) 0 ;
2011
+ int arg3 ;
2012
+ int arg4 ;
2013
+ unsigned char (*arg5)[177] ;
2014
+ void *arg6 = (void *) 0 ;
2015
+ int result;
2016
+ void *argp1 = 0 ;
2017
+ int res1 = 0 ;
2018
+ int res2 ;
2019
+ char *buf2 = 0 ;
2020
+ int alloc2 = 0 ;
2021
+ int val3 ;
2022
+ int ecode3 = 0 ;
2023
+ int val4 ;
2024
+ int ecode4 = 0 ;
2025
+ void *argp5 = 0 ;
2026
+ int res5 = 0 ;
2027
+ int res6 ;
2028
+ VALUE vresult = Qnil;
2029
+
2030
+ if ((argc < 5) || (argc > 5)) {
2031
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
2032
+ }
2033
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_QRDrawPNG, 0 | 0 );
2034
+ if (!SWIG_IsOK(res1)) {
2035
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "draw" "', argument " "1"" of type '" "QRDrawPNG *""'");
2036
+ }
2037
+ arg1 = reinterpret_cast< QRDrawPNG * >(argp1);
2038
+ res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
2039
+ if (!SWIG_IsOK(res2)) {
2040
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "draw" "', argument " "2"" of type '" "char *""'");
2041
+ }
2042
+ arg2 = reinterpret_cast< char * >(buf2);
2043
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
2044
+ if (!SWIG_IsOK(ecode3)) {
2045
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "draw" "', argument " "3"" of type '" "int""'");
2046
+ }
2047
+ arg3 = static_cast< int >(val3);
2048
+ ecode4 = SWIG_AsVal_int(argv[2], &val4);
2049
+ if (!SWIG_IsOK(ecode4)) {
2050
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "draw" "', argument " "4"" of type '" "int""'");
2051
+ }
2052
+ arg4 = static_cast< int >(val4);
2053
+ res5 = SWIG_ConvertPtr(argv[3], &argp5,SWIGTYPE_p_a_177__unsigned_char, 0 | 0 );
2054
+ if (!SWIG_IsOK(res5)) {
2055
+ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "draw" "', argument " "5"" of type '" "unsigned char [177][177]""'");
2056
+ }
2057
+ arg5 = reinterpret_cast< unsigned char (*)[177] >(argp5);
2058
+ res6 = SWIG_ConvertPtr(argv[4],SWIG_as_voidptrptr(&arg6), 0, 0);
2059
+ if (!SWIG_IsOK(res6)) {
2060
+ SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "draw" "', argument " "6"" of type '" "void *""'");
2061
+ }
2062
+ result = (int)(arg1)->draw(arg2,arg3,arg4,(unsigned char (*)[177])arg5,arg6);
2063
+ vresult = SWIG_From_int(static_cast< int >(result));
2064
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
2065
+ return vresult;
2066
+ fail:
2067
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
2068
+ return Qnil;
2069
+ }
2070
+
2071
+
2072
+ swig_class cQRDrawPS;
2073
+
2074
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2075
+ SWIGINTERN VALUE
2076
+ _wrap_QRDrawPS_allocate(VALUE self) {
2077
+ #else
2078
+ SWIGINTERN VALUE
2079
+ _wrap_QRDrawPS_allocate(int argc, VALUE *argv, VALUE self) {
2080
+ #endif
2081
+
2082
+
2083
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_QRDrawPS);
2084
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2085
+ rb_obj_call_init(vresult, argc, argv);
2086
+ #endif
2087
+ return vresult;
2088
+ }
2089
+
2090
+
2091
+ SWIGINTERN VALUE
2092
+ _wrap_new_QRDrawPS(int argc, VALUE *argv, VALUE self) {
2093
+ QRDrawPS *result = 0 ;
2094
+
2095
+ if ((argc < 0) || (argc > 0)) {
2096
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2097
+ }
2098
+ result = (QRDrawPS *)new QRDrawPS();DATA_PTR(self) = result;
2099
+
2100
+ return self;
2101
+ fail:
2102
+ return Qnil;
2103
+ }
2104
+
2105
+
2106
+ SWIGINTERN VALUE
2107
+ _wrap_QRDrawPS_draw(int argc, VALUE *argv, VALUE self) {
2108
+ QRDrawPS *arg1 = (QRDrawPS *) 0 ;
2109
+ char *arg2 = (char *) 0 ;
2110
+ int arg3 ;
2111
+ int arg4 ;
2112
+ unsigned char (*arg5)[177] ;
2113
+ void *arg6 = (void *) 0 ;
2114
+ int result;
2115
+ void *argp1 = 0 ;
2116
+ int res1 = 0 ;
2117
+ int res2 ;
2118
+ char *buf2 = 0 ;
2119
+ int alloc2 = 0 ;
2120
+ int val3 ;
2121
+ int ecode3 = 0 ;
2122
+ int val4 ;
2123
+ int ecode4 = 0 ;
2124
+ void *argp5 = 0 ;
2125
+ int res5 = 0 ;
2126
+ int res6 ;
2127
+ VALUE vresult = Qnil;
2128
+
2129
+ if ((argc < 5) || (argc > 5)) {
2130
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
2131
+ }
2132
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_QRDrawPS, 0 | 0 );
2133
+ if (!SWIG_IsOK(res1)) {
2134
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "draw" "', argument " "1"" of type '" "QRDrawPS *""'");
2135
+ }
2136
+ arg1 = reinterpret_cast< QRDrawPS * >(argp1);
2137
+ res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
2138
+ if (!SWIG_IsOK(res2)) {
2139
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "draw" "', argument " "2"" of type '" "char *""'");
2140
+ }
2141
+ arg2 = reinterpret_cast< char * >(buf2);
2142
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
2143
+ if (!SWIG_IsOK(ecode3)) {
2144
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "draw" "', argument " "3"" of type '" "int""'");
2145
+ }
2146
+ arg3 = static_cast< int >(val3);
2147
+ ecode4 = SWIG_AsVal_int(argv[2], &val4);
2148
+ if (!SWIG_IsOK(ecode4)) {
2149
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "draw" "', argument " "4"" of type '" "int""'");
2150
+ }
2151
+ arg4 = static_cast< int >(val4);
2152
+ res5 = SWIG_ConvertPtr(argv[3], &argp5,SWIGTYPE_p_a_177__unsigned_char, 0 | 0 );
2153
+ if (!SWIG_IsOK(res5)) {
2154
+ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "draw" "', argument " "5"" of type '" "unsigned char [177][177]""'");
2155
+ }
2156
+ arg5 = reinterpret_cast< unsigned char (*)[177] >(argp5);
2157
+ res6 = SWIG_ConvertPtr(argv[4],SWIG_as_voidptrptr(&arg6), 0, 0);
2158
+ if (!SWIG_IsOK(res6)) {
2159
+ SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "draw" "', argument " "6"" of type '" "void *""'");
2160
+ }
2161
+ result = (int)(arg1)->draw(arg2,arg3,arg4,(unsigned char (*)[177])arg5,arg6);
2162
+ vresult = SWIG_From_int(static_cast< int >(result));
2163
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
2164
+ return vresult;
2165
+ fail:
2166
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
2167
+ return Qnil;
2168
+ }
2169
+
2170
+
2171
+ SWIGINTERN void
2172
+ free_QRDrawPS(QRDrawPS *arg1) {
2173
+ delete arg1;
2174
+ }
2175
+
2176
+ swig_class cQRDrawTIFF;
2177
+
2178
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2179
+ SWIGINTERN VALUE
2180
+ _wrap_QRDrawTIFF_allocate(VALUE self) {
2181
+ #else
2182
+ SWIGINTERN VALUE
2183
+ _wrap_QRDrawTIFF_allocate(int argc, VALUE *argv, VALUE self) {
2184
+ #endif
2185
+
2186
+
2187
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_QRDrawTIFF);
2188
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2189
+ rb_obj_call_init(vresult, argc, argv);
2190
+ #endif
2191
+ return vresult;
2192
+ }
2193
+
2194
+
2195
+ SWIGINTERN VALUE
2196
+ _wrap_new_QRDrawTIFF(int argc, VALUE *argv, VALUE self) {
2197
+ QRDrawTIFF *result = 0 ;
2198
+
2199
+ if ((argc < 0) || (argc > 0)) {
2200
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2201
+ }
2202
+ result = (QRDrawTIFF *)new QRDrawTIFF();DATA_PTR(self) = result;
2203
+
2204
+ return self;
2205
+ fail:
2206
+ return Qnil;
2207
+ }
2208
+
2209
+
2210
+ SWIGINTERN void
2211
+ free_QRDrawTIFF(QRDrawTIFF *arg1) {
2212
+ delete arg1;
2213
+ }
2214
+
2215
+ SWIGINTERN VALUE
2216
+ _wrap_QRDrawTIFF_draw(int argc, VALUE *argv, VALUE self) {
2217
+ QRDrawTIFF *arg1 = (QRDrawTIFF *) 0 ;
2218
+ char *arg2 = (char *) 0 ;
2219
+ int arg3 ;
2220
+ int arg4 ;
2221
+ unsigned char (*arg5)[177] ;
2222
+ void *arg6 = (void *) 0 ;
2223
+ int result;
2224
+ void *argp1 = 0 ;
2225
+ int res1 = 0 ;
2226
+ int res2 ;
2227
+ char *buf2 = 0 ;
2228
+ int alloc2 = 0 ;
2229
+ int val3 ;
2230
+ int ecode3 = 0 ;
2231
+ int val4 ;
2232
+ int ecode4 = 0 ;
2233
+ void *argp5 = 0 ;
2234
+ int res5 = 0 ;
2235
+ int res6 ;
2236
+ VALUE vresult = Qnil;
2237
+
2238
+ if ((argc < 5) || (argc > 5)) {
2239
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
2240
+ }
2241
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_QRDrawTIFF, 0 | 0 );
2242
+ if (!SWIG_IsOK(res1)) {
2243
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "draw" "', argument " "1"" of type '" "QRDrawTIFF *""'");
2244
+ }
2245
+ arg1 = reinterpret_cast< QRDrawTIFF * >(argp1);
2246
+ res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
2247
+ if (!SWIG_IsOK(res2)) {
2248
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "draw" "', argument " "2"" of type '" "char *""'");
2249
+ }
2250
+ arg2 = reinterpret_cast< char * >(buf2);
2251
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
2252
+ if (!SWIG_IsOK(ecode3)) {
2253
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "draw" "', argument " "3"" of type '" "int""'");
2254
+ }
2255
+ arg3 = static_cast< int >(val3);
2256
+ ecode4 = SWIG_AsVal_int(argv[2], &val4);
2257
+ if (!SWIG_IsOK(ecode4)) {
2258
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "draw" "', argument " "4"" of type '" "int""'");
2259
+ }
2260
+ arg4 = static_cast< int >(val4);
2261
+ res5 = SWIG_ConvertPtr(argv[3], &argp5,SWIGTYPE_p_a_177__unsigned_char, 0 | 0 );
2262
+ if (!SWIG_IsOK(res5)) {
2263
+ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "draw" "', argument " "5"" of type '" "unsigned char [177][177]""'");
2264
+ }
2265
+ arg5 = reinterpret_cast< unsigned char (*)[177] >(argp5);
2266
+ res6 = SWIG_ConvertPtr(argv[4],SWIG_as_voidptrptr(&arg6), 0, 0);
2267
+ if (!SWIG_IsOK(res6)) {
2268
+ SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "draw" "', argument " "6"" of type '" "void *""'");
2269
+ }
2270
+ result = (int)(arg1)->draw(arg2,arg3,arg4,(unsigned char (*)[177])arg5,arg6);
2271
+ vresult = SWIG_From_int(static_cast< int >(result));
2272
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
2273
+ return vresult;
2274
+ fail:
2275
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
2276
+ return Qnil;
2277
+ }
2278
+
2279
+
2280
+ swig_class cRS_BLOCKINFO;
2281
+
2282
+ SWIGINTERN VALUE
2283
+ _wrap_RS_BLOCKINFO_ncRSBlock_set(int argc, VALUE *argv, VALUE self) {
2284
+ RS_BLOCKINFO *arg1 = (RS_BLOCKINFO *) 0 ;
2285
+ int arg2 ;
2286
+ void *argp1 = 0 ;
2287
+ int res1 = 0 ;
2288
+ int val2 ;
2289
+ int ecode2 = 0 ;
2290
+
2291
+ if ((argc < 1) || (argc > 1)) {
2292
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2293
+ }
2294
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagRS_BLOCKINFO, 0 | 0 );
2295
+ if (!SWIG_IsOK(res1)) {
2296
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncRSBlock" "', argument " "1"" of type '" "RS_BLOCKINFO *""'");
2297
+ }
2298
+ arg1 = reinterpret_cast< RS_BLOCKINFO * >(argp1);
2299
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
2300
+ if (!SWIG_IsOK(ecode2)) {
2301
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ncRSBlock" "', argument " "2"" of type '" "int""'");
2302
+ }
2303
+ arg2 = static_cast< int >(val2);
2304
+ if (arg1) (arg1)->ncRSBlock = arg2;
2305
+
2306
+ return Qnil;
2307
+ fail:
2308
+ return Qnil;
2309
+ }
2310
+
2311
+
2312
+ SWIGINTERN VALUE
2313
+ _wrap_RS_BLOCKINFO_ncRSBlock_get(int argc, VALUE *argv, VALUE self) {
2314
+ RS_BLOCKINFO *arg1 = (RS_BLOCKINFO *) 0 ;
2315
+ int result;
2316
+ void *argp1 = 0 ;
2317
+ int res1 = 0 ;
2318
+ VALUE vresult = Qnil;
2319
+
2320
+ if ((argc < 0) || (argc > 0)) {
2321
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2322
+ }
2323
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagRS_BLOCKINFO, 0 | 0 );
2324
+ if (!SWIG_IsOK(res1)) {
2325
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncRSBlock" "', argument " "1"" of type '" "RS_BLOCKINFO *""'");
2326
+ }
2327
+ arg1 = reinterpret_cast< RS_BLOCKINFO * >(argp1);
2328
+ result = (int) ((arg1)->ncRSBlock);
2329
+ vresult = SWIG_From_int(static_cast< int >(result));
2330
+ return vresult;
2331
+ fail:
2332
+ return Qnil;
2333
+ }
2334
+
2335
+
2336
+ SWIGINTERN VALUE
2337
+ _wrap_RS_BLOCKINFO_ncAllCodeWord_set(int argc, VALUE *argv, VALUE self) {
2338
+ RS_BLOCKINFO *arg1 = (RS_BLOCKINFO *) 0 ;
2339
+ int arg2 ;
2340
+ void *argp1 = 0 ;
2341
+ int res1 = 0 ;
2342
+ int val2 ;
2343
+ int ecode2 = 0 ;
2344
+
2345
+ if ((argc < 1) || (argc > 1)) {
2346
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2347
+ }
2348
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagRS_BLOCKINFO, 0 | 0 );
2349
+ if (!SWIG_IsOK(res1)) {
2350
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncAllCodeWord" "', argument " "1"" of type '" "RS_BLOCKINFO *""'");
2351
+ }
2352
+ arg1 = reinterpret_cast< RS_BLOCKINFO * >(argp1);
2353
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
2354
+ if (!SWIG_IsOK(ecode2)) {
2355
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ncAllCodeWord" "', argument " "2"" of type '" "int""'");
2356
+ }
2357
+ arg2 = static_cast< int >(val2);
2358
+ if (arg1) (arg1)->ncAllCodeWord = arg2;
2359
+
2360
+ return Qnil;
2361
+ fail:
2362
+ return Qnil;
2363
+ }
2364
+
2365
+
2366
+ SWIGINTERN VALUE
2367
+ _wrap_RS_BLOCKINFO_ncAllCodeWord_get(int argc, VALUE *argv, VALUE self) {
2368
+ RS_BLOCKINFO *arg1 = (RS_BLOCKINFO *) 0 ;
2369
+ int result;
2370
+ void *argp1 = 0 ;
2371
+ int res1 = 0 ;
2372
+ VALUE vresult = Qnil;
2373
+
2374
+ if ((argc < 0) || (argc > 0)) {
2375
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2376
+ }
2377
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagRS_BLOCKINFO, 0 | 0 );
2378
+ if (!SWIG_IsOK(res1)) {
2379
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncAllCodeWord" "', argument " "1"" of type '" "RS_BLOCKINFO *""'");
2380
+ }
2381
+ arg1 = reinterpret_cast< RS_BLOCKINFO * >(argp1);
2382
+ result = (int) ((arg1)->ncAllCodeWord);
2383
+ vresult = SWIG_From_int(static_cast< int >(result));
2384
+ return vresult;
2385
+ fail:
2386
+ return Qnil;
2387
+ }
2388
+
2389
+
2390
+ SWIGINTERN VALUE
2391
+ _wrap_RS_BLOCKINFO_ncDataCodeWord_set(int argc, VALUE *argv, VALUE self) {
2392
+ RS_BLOCKINFO *arg1 = (RS_BLOCKINFO *) 0 ;
2393
+ int arg2 ;
2394
+ void *argp1 = 0 ;
2395
+ int res1 = 0 ;
2396
+ int val2 ;
2397
+ int ecode2 = 0 ;
2398
+
2399
+ if ((argc < 1) || (argc > 1)) {
2400
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2401
+ }
2402
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagRS_BLOCKINFO, 0 | 0 );
2403
+ if (!SWIG_IsOK(res1)) {
2404
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncDataCodeWord" "', argument " "1"" of type '" "RS_BLOCKINFO *""'");
2405
+ }
2406
+ arg1 = reinterpret_cast< RS_BLOCKINFO * >(argp1);
2407
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
2408
+ if (!SWIG_IsOK(ecode2)) {
2409
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ncDataCodeWord" "', argument " "2"" of type '" "int""'");
2410
+ }
2411
+ arg2 = static_cast< int >(val2);
2412
+ if (arg1) (arg1)->ncDataCodeWord = arg2;
2413
+
2414
+ return Qnil;
2415
+ fail:
2416
+ return Qnil;
2417
+ }
2418
+
2419
+
2420
+ SWIGINTERN VALUE
2421
+ _wrap_RS_BLOCKINFO_ncDataCodeWord_get(int argc, VALUE *argv, VALUE self) {
2422
+ RS_BLOCKINFO *arg1 = (RS_BLOCKINFO *) 0 ;
2423
+ int result;
2424
+ void *argp1 = 0 ;
2425
+ int res1 = 0 ;
2426
+ VALUE vresult = Qnil;
2427
+
2428
+ if ((argc < 0) || (argc > 0)) {
2429
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2430
+ }
2431
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagRS_BLOCKINFO, 0 | 0 );
2432
+ if (!SWIG_IsOK(res1)) {
2433
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncDataCodeWord" "', argument " "1"" of type '" "RS_BLOCKINFO *""'");
2434
+ }
2435
+ arg1 = reinterpret_cast< RS_BLOCKINFO * >(argp1);
2436
+ result = (int) ((arg1)->ncDataCodeWord);
2437
+ vresult = SWIG_From_int(static_cast< int >(result));
2438
+ return vresult;
2439
+ fail:
2440
+ return Qnil;
2441
+ }
2442
+
2443
+
2444
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2445
+ SWIGINTERN VALUE
2446
+ _wrap_RS_BLOCKINFO_allocate(VALUE self) {
2447
+ #else
2448
+ SWIGINTERN VALUE
2449
+ _wrap_RS_BLOCKINFO_allocate(int argc, VALUE *argv, VALUE self) {
2450
+ #endif
2451
+
2452
+
2453
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_tagRS_BLOCKINFO);
2454
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2455
+ rb_obj_call_init(vresult, argc, argv);
2456
+ #endif
2457
+ return vresult;
2458
+ }
2459
+
2460
+
2461
+ SWIGINTERN VALUE
2462
+ _wrap_new_RS_BLOCKINFO(int argc, VALUE *argv, VALUE self) {
2463
+ RS_BLOCKINFO *result = 0 ;
2464
+
2465
+ if ((argc < 0) || (argc > 0)) {
2466
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2467
+ }
2468
+ result = (RS_BLOCKINFO *)new RS_BLOCKINFO();DATA_PTR(self) = result;
2469
+
2470
+ return self;
2471
+ fail:
2472
+ return Qnil;
2473
+ }
2474
+
2475
+
2476
+ SWIGINTERN void
2477
+ free_RS_BLOCKINFO(RS_BLOCKINFO *arg1) {
2478
+ delete arg1;
2479
+ }
2480
+
2481
+ swig_class cQR_VERSIONINFO;
2482
+
2483
+ SWIGINTERN VALUE
2484
+ _wrap_QR_VERSIONINFO_nVersionNo_set(int argc, VALUE *argv, VALUE self) {
2485
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2486
+ int arg2 ;
2487
+ void *argp1 = 0 ;
2488
+ int res1 = 0 ;
2489
+ int val2 ;
2490
+ int ecode2 = 0 ;
2491
+
2492
+ if ((argc < 1) || (argc > 1)) {
2493
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2494
+ }
2495
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2496
+ if (!SWIG_IsOK(res1)) {
2497
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nVersionNo" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2498
+ }
2499
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2500
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
2501
+ if (!SWIG_IsOK(ecode2)) {
2502
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "nVersionNo" "', argument " "2"" of type '" "int""'");
2503
+ }
2504
+ arg2 = static_cast< int >(val2);
2505
+ if (arg1) (arg1)->nVersionNo = arg2;
2506
+
2507
+ return Qnil;
2508
+ fail:
2509
+ return Qnil;
2510
+ }
2511
+
2512
+
2513
+ SWIGINTERN VALUE
2514
+ _wrap_QR_VERSIONINFO_nVersionNo_get(int argc, VALUE *argv, VALUE self) {
2515
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2516
+ int result;
2517
+ void *argp1 = 0 ;
2518
+ int res1 = 0 ;
2519
+ VALUE vresult = Qnil;
2520
+
2521
+ if ((argc < 0) || (argc > 0)) {
2522
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2523
+ }
2524
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2525
+ if (!SWIG_IsOK(res1)) {
2526
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nVersionNo" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2527
+ }
2528
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2529
+ result = (int) ((arg1)->nVersionNo);
2530
+ vresult = SWIG_From_int(static_cast< int >(result));
2531
+ return vresult;
2532
+ fail:
2533
+ return Qnil;
2534
+ }
2535
+
2536
+
2537
+ SWIGINTERN VALUE
2538
+ _wrap_QR_VERSIONINFO_ncAllCodeWord_set(int argc, VALUE *argv, VALUE self) {
2539
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2540
+ int arg2 ;
2541
+ void *argp1 = 0 ;
2542
+ int res1 = 0 ;
2543
+ int val2 ;
2544
+ int ecode2 = 0 ;
2545
+
2546
+ if ((argc < 1) || (argc > 1)) {
2547
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2548
+ }
2549
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2550
+ if (!SWIG_IsOK(res1)) {
2551
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncAllCodeWord" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2552
+ }
2553
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2554
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
2555
+ if (!SWIG_IsOK(ecode2)) {
2556
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ncAllCodeWord" "', argument " "2"" of type '" "int""'");
2557
+ }
2558
+ arg2 = static_cast< int >(val2);
2559
+ if (arg1) (arg1)->ncAllCodeWord = arg2;
2560
+
2561
+ return Qnil;
2562
+ fail:
2563
+ return Qnil;
2564
+ }
2565
+
2566
+
2567
+ SWIGINTERN VALUE
2568
+ _wrap_QR_VERSIONINFO_ncAllCodeWord_get(int argc, VALUE *argv, VALUE self) {
2569
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2570
+ int result;
2571
+ void *argp1 = 0 ;
2572
+ int res1 = 0 ;
2573
+ VALUE vresult = Qnil;
2574
+
2575
+ if ((argc < 0) || (argc > 0)) {
2576
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2577
+ }
2578
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2579
+ if (!SWIG_IsOK(res1)) {
2580
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncAllCodeWord" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2581
+ }
2582
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2583
+ result = (int) ((arg1)->ncAllCodeWord);
2584
+ vresult = SWIG_From_int(static_cast< int >(result));
2585
+ return vresult;
2586
+ fail:
2587
+ return Qnil;
2588
+ }
2589
+
2590
+
2591
+ SWIGINTERN VALUE
2592
+ _wrap_QR_VERSIONINFO_ncDataCodeWord_set(int argc, VALUE *argv, VALUE self) {
2593
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2594
+ int *arg2 ;
2595
+ void *argp1 = 0 ;
2596
+ int res1 = 0 ;
2597
+ void *argp2 = 0 ;
2598
+ int res2 = 0 ;
2599
+
2600
+ if ((argc < 1) || (argc > 1)) {
2601
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2602
+ }
2603
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2604
+ if (!SWIG_IsOK(res1)) {
2605
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncDataCodeWord" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2606
+ }
2607
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2608
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_int, 0 | 0 );
2609
+ if (!SWIG_IsOK(res2)) {
2610
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ncDataCodeWord" "', argument " "2"" of type '" "int [4]""'");
2611
+ }
2612
+ arg2 = reinterpret_cast< int * >(argp2);
2613
+ {
2614
+ if (arg2) {
2615
+ size_t ii = 0;
2616
+ for (; ii < (size_t)4; ++ii) arg1->ncDataCodeWord[ii] = arg2[ii];
2617
+ } else {
2618
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""ncDataCodeWord""' of type '""int [4]""'");
2619
+ }
2620
+ }
2621
+ return Qnil;
2622
+ fail:
2623
+ return Qnil;
2624
+ }
2625
+
2626
+
2627
+ SWIGINTERN VALUE
2628
+ _wrap_QR_VERSIONINFO_ncDataCodeWord_get(int argc, VALUE *argv, VALUE self) {
2629
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2630
+ int *result = 0 ;
2631
+ void *argp1 = 0 ;
2632
+ int res1 = 0 ;
2633
+ VALUE vresult = Qnil;
2634
+
2635
+ if ((argc < 0) || (argc > 0)) {
2636
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2637
+ }
2638
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2639
+ if (!SWIG_IsOK(res1)) {
2640
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncDataCodeWord" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2641
+ }
2642
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2643
+ result = (int *)(int *) ((arg1)->ncDataCodeWord);
2644
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
2645
+ return vresult;
2646
+ fail:
2647
+ return Qnil;
2648
+ }
2649
+
2650
+
2651
+ SWIGINTERN VALUE
2652
+ _wrap_QR_VERSIONINFO_ncAlignPoint_set(int argc, VALUE *argv, VALUE self) {
2653
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2654
+ int arg2 ;
2655
+ void *argp1 = 0 ;
2656
+ int res1 = 0 ;
2657
+ int val2 ;
2658
+ int ecode2 = 0 ;
2659
+
2660
+ if ((argc < 1) || (argc > 1)) {
2661
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2662
+ }
2663
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2664
+ if (!SWIG_IsOK(res1)) {
2665
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncAlignPoint" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2666
+ }
2667
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2668
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
2669
+ if (!SWIG_IsOK(ecode2)) {
2670
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ncAlignPoint" "', argument " "2"" of type '" "int""'");
2671
+ }
2672
+ arg2 = static_cast< int >(val2);
2673
+ if (arg1) (arg1)->ncAlignPoint = arg2;
2674
+
2675
+ return Qnil;
2676
+ fail:
2677
+ return Qnil;
2678
+ }
2679
+
2680
+
2681
+ SWIGINTERN VALUE
2682
+ _wrap_QR_VERSIONINFO_ncAlignPoint_get(int argc, VALUE *argv, VALUE self) {
2683
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2684
+ int result;
2685
+ void *argp1 = 0 ;
2686
+ int res1 = 0 ;
2687
+ VALUE vresult = Qnil;
2688
+
2689
+ if ((argc < 0) || (argc > 0)) {
2690
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2691
+ }
2692
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2693
+ if (!SWIG_IsOK(res1)) {
2694
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncAlignPoint" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2695
+ }
2696
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2697
+ result = (int) ((arg1)->ncAlignPoint);
2698
+ vresult = SWIG_From_int(static_cast< int >(result));
2699
+ return vresult;
2700
+ fail:
2701
+ return Qnil;
2702
+ }
2703
+
2704
+
2705
+ SWIGINTERN VALUE
2706
+ _wrap_QR_VERSIONINFO_nAlignPoint_set(int argc, VALUE *argv, VALUE self) {
2707
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2708
+ int *arg2 ;
2709
+ void *argp1 = 0 ;
2710
+ int res1 = 0 ;
2711
+ void *argp2 = 0 ;
2712
+ int res2 = 0 ;
2713
+
2714
+ if ((argc < 1) || (argc > 1)) {
2715
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2716
+ }
2717
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2718
+ if (!SWIG_IsOK(res1)) {
2719
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nAlignPoint" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2720
+ }
2721
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2722
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_int, 0 | 0 );
2723
+ if (!SWIG_IsOK(res2)) {
2724
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "nAlignPoint" "', argument " "2"" of type '" "int [6]""'");
2725
+ }
2726
+ arg2 = reinterpret_cast< int * >(argp2);
2727
+ {
2728
+ if (arg2) {
2729
+ size_t ii = 0;
2730
+ for (; ii < (size_t)6; ++ii) arg1->nAlignPoint[ii] = arg2[ii];
2731
+ } else {
2732
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""nAlignPoint""' of type '""int [6]""'");
2733
+ }
2734
+ }
2735
+ return Qnil;
2736
+ fail:
2737
+ return Qnil;
2738
+ }
2739
+
2740
+
2741
+ SWIGINTERN VALUE
2742
+ _wrap_QR_VERSIONINFO_nAlignPoint_get(int argc, VALUE *argv, VALUE self) {
2743
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2744
+ int *result = 0 ;
2745
+ void *argp1 = 0 ;
2746
+ int res1 = 0 ;
2747
+ VALUE vresult = Qnil;
2748
+
2749
+ if ((argc < 0) || (argc > 0)) {
2750
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2751
+ }
2752
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2753
+ if (!SWIG_IsOK(res1)) {
2754
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nAlignPoint" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2755
+ }
2756
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2757
+ result = (int *)(int *) ((arg1)->nAlignPoint);
2758
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
2759
+ return vresult;
2760
+ fail:
2761
+ return Qnil;
2762
+ }
2763
+
2764
+
2765
+ SWIGINTERN VALUE
2766
+ _wrap_QR_VERSIONINFO_RS_BlockInfo1_set(int argc, VALUE *argv, VALUE self) {
2767
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2768
+ RS_BLOCKINFO *arg2 ;
2769
+ void *argp1 = 0 ;
2770
+ int res1 = 0 ;
2771
+ void *argp2 = 0 ;
2772
+ int res2 = 0 ;
2773
+
2774
+ if ((argc < 1) || (argc > 1)) {
2775
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2776
+ }
2777
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2778
+ if (!SWIG_IsOK(res1)) {
2779
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RS_BlockInfo1" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2780
+ }
2781
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2782
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_tagRS_BLOCKINFO, 0 | 0 );
2783
+ if (!SWIG_IsOK(res2)) {
2784
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RS_BlockInfo1" "', argument " "2"" of type '" "RS_BLOCKINFO [4]""'");
2785
+ }
2786
+ arg2 = reinterpret_cast< RS_BLOCKINFO * >(argp2);
2787
+ {
2788
+ if (arg2) {
2789
+ size_t ii = 0;
2790
+ for (; ii < (size_t)4; ++ii) arg1->RS_BlockInfo1[ii] = arg2[ii];
2791
+ } else {
2792
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""RS_BlockInfo1""' of type '""RS_BLOCKINFO [4]""'");
2793
+ }
2794
+ }
2795
+ return Qnil;
2796
+ fail:
2797
+ return Qnil;
2798
+ }
2799
+
2800
+
2801
+ SWIGINTERN VALUE
2802
+ _wrap_QR_VERSIONINFO_RS_BlockInfo1_get(int argc, VALUE *argv, VALUE self) {
2803
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2804
+ RS_BLOCKINFO *result = 0 ;
2805
+ void *argp1 = 0 ;
2806
+ int res1 = 0 ;
2807
+ VALUE vresult = Qnil;
2808
+
2809
+ if ((argc < 0) || (argc > 0)) {
2810
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2811
+ }
2812
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2813
+ if (!SWIG_IsOK(res1)) {
2814
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RS_BlockInfo1" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2815
+ }
2816
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2817
+ result = (RS_BLOCKINFO *)(RS_BLOCKINFO *) ((arg1)->RS_BlockInfo1);
2818
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tagRS_BLOCKINFO, 0 | 0 );
2819
+ return vresult;
2820
+ fail:
2821
+ return Qnil;
2822
+ }
2823
+
2824
+
2825
+ SWIGINTERN VALUE
2826
+ _wrap_QR_VERSIONINFO_RS_BlockInfo2_set(int argc, VALUE *argv, VALUE self) {
2827
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2828
+ RS_BLOCKINFO *arg2 ;
2829
+ void *argp1 = 0 ;
2830
+ int res1 = 0 ;
2831
+ void *argp2 = 0 ;
2832
+ int res2 = 0 ;
2833
+
2834
+ if ((argc < 1) || (argc > 1)) {
2835
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2836
+ }
2837
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2838
+ if (!SWIG_IsOK(res1)) {
2839
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RS_BlockInfo2" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2840
+ }
2841
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2842
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_tagRS_BLOCKINFO, 0 | 0 );
2843
+ if (!SWIG_IsOK(res2)) {
2844
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RS_BlockInfo2" "', argument " "2"" of type '" "RS_BLOCKINFO [4]""'");
2845
+ }
2846
+ arg2 = reinterpret_cast< RS_BLOCKINFO * >(argp2);
2847
+ {
2848
+ if (arg2) {
2849
+ size_t ii = 0;
2850
+ for (; ii < (size_t)4; ++ii) arg1->RS_BlockInfo2[ii] = arg2[ii];
2851
+ } else {
2852
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""RS_BlockInfo2""' of type '""RS_BLOCKINFO [4]""'");
2853
+ }
2854
+ }
2855
+ return Qnil;
2856
+ fail:
2857
+ return Qnil;
2858
+ }
2859
+
2860
+
2861
+ SWIGINTERN VALUE
2862
+ _wrap_QR_VERSIONINFO_RS_BlockInfo2_get(int argc, VALUE *argv, VALUE self) {
2863
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2864
+ RS_BLOCKINFO *result = 0 ;
2865
+ void *argp1 = 0 ;
2866
+ int res1 = 0 ;
2867
+ VALUE vresult = Qnil;
2868
+
2869
+ if ((argc < 0) || (argc > 0)) {
2870
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2871
+ }
2872
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2873
+ if (!SWIG_IsOK(res1)) {
2874
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RS_BlockInfo2" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2875
+ }
2876
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2877
+ result = (RS_BLOCKINFO *)(RS_BLOCKINFO *) ((arg1)->RS_BlockInfo2);
2878
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tagRS_BLOCKINFO, 0 | 0 );
2879
+ return vresult;
2880
+ fail:
2881
+ return Qnil;
2882
+ }
2883
+
2884
+
2885
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2886
+ SWIGINTERN VALUE
2887
+ _wrap_QR_VERSIONINFO_allocate(VALUE self) {
2888
+ #else
2889
+ SWIGINTERN VALUE
2890
+ _wrap_QR_VERSIONINFO_allocate(int argc, VALUE *argv, VALUE self) {
2891
+ #endif
2892
+
2893
+
2894
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_tagQR_VERSIONINFO);
2895
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2896
+ rb_obj_call_init(vresult, argc, argv);
2897
+ #endif
2898
+ return vresult;
2899
+ }
2900
+
2901
+
2902
+ SWIGINTERN VALUE
2903
+ _wrap_new_QR_VERSIONINFO(int argc, VALUE *argv, VALUE self) {
2904
+ QR_VERSIONINFO *result = 0 ;
2905
+
2906
+ if ((argc < 0) || (argc > 0)) {
2907
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2908
+ }
2909
+ result = (QR_VERSIONINFO *)new QR_VERSIONINFO();DATA_PTR(self) = result;
2910
+
2911
+ return self;
2912
+ fail:
2913
+ return Qnil;
2914
+ }
2915
+
2916
+
2917
+ SWIGINTERN void
2918
+ free_QR_VERSIONINFO(QR_VERSIONINFO *arg1) {
2919
+ delete arg1;
2920
+ }
2921
+
2922
+ swig_class cCQR_Encode;
2923
+
2924
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2925
+ SWIGINTERN VALUE
2926
+ _wrap_CQR_Encode_allocate(VALUE self) {
2927
+ #else
2928
+ SWIGINTERN VALUE
2929
+ _wrap_CQR_Encode_allocate(int argc, VALUE *argv, VALUE self) {
2930
+ #endif
2931
+
2932
+
2933
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_CQR_Encode);
2934
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2935
+ rb_obj_call_init(vresult, argc, argv);
2936
+ #endif
2937
+ return vresult;
2938
+ }
2939
+
2940
+
2941
+ SWIGINTERN VALUE
2942
+ _wrap_new_CQR_Encode(int argc, VALUE *argv, VALUE self) {
2943
+ CQR_Encode *result = 0 ;
2944
+
2945
+ if ((argc < 0) || (argc > 0)) {
2946
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2947
+ }
2948
+ result = (CQR_Encode *)new CQR_Encode();DATA_PTR(self) = result;
2949
+
2950
+ return self;
2951
+ fail:
2952
+ return Qnil;
2953
+ }
2954
+
2955
+
2956
+ SWIGINTERN void
2957
+ free_CQR_Encode(CQR_Encode *arg1) {
2958
+ delete arg1;
2959
+ }
2960
+
2961
+ SWIGINTERN VALUE
2962
+ _wrap_CQR_Encode_m_nLevel_set(int argc, VALUE *argv, VALUE self) {
2963
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
2964
+ int arg2 ;
2965
+ void *argp1 = 0 ;
2966
+ int res1 = 0 ;
2967
+ int val2 ;
2968
+ int ecode2 = 0 ;
2969
+
2970
+ if ((argc < 1) || (argc > 1)) {
2971
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2972
+ }
2973
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
2974
+ if (!SWIG_IsOK(res1)) {
2975
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_nLevel" "', argument " "1"" of type '" "CQR_Encode *""'");
2976
+ }
2977
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
2978
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
2979
+ if (!SWIG_IsOK(ecode2)) {
2980
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "m_nLevel" "', argument " "2"" of type '" "int""'");
2981
+ }
2982
+ arg2 = static_cast< int >(val2);
2983
+ if (arg1) (arg1)->m_nLevel = arg2;
2984
+
2985
+ return Qnil;
2986
+ fail:
2987
+ return Qnil;
2988
+ }
2989
+
2990
+
2991
+ SWIGINTERN VALUE
2992
+ _wrap_CQR_Encode_m_nLevel_get(int argc, VALUE *argv, VALUE self) {
2993
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
2994
+ int result;
2995
+ void *argp1 = 0 ;
2996
+ int res1 = 0 ;
2997
+ VALUE vresult = Qnil;
2998
+
2999
+ if ((argc < 0) || (argc > 0)) {
3000
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3001
+ }
3002
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3003
+ if (!SWIG_IsOK(res1)) {
3004
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_nLevel" "', argument " "1"" of type '" "CQR_Encode *""'");
3005
+ }
3006
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3007
+ result = (int) ((arg1)->m_nLevel);
3008
+ vresult = SWIG_From_int(static_cast< int >(result));
3009
+ return vresult;
3010
+ fail:
3011
+ return Qnil;
3012
+ }
3013
+
3014
+
3015
+ SWIGINTERN VALUE
3016
+ _wrap_CQR_Encode_m_nVersion_set(int argc, VALUE *argv, VALUE self) {
3017
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3018
+ int arg2 ;
3019
+ void *argp1 = 0 ;
3020
+ int res1 = 0 ;
3021
+ int val2 ;
3022
+ int ecode2 = 0 ;
3023
+
3024
+ if ((argc < 1) || (argc > 1)) {
3025
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3026
+ }
3027
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3028
+ if (!SWIG_IsOK(res1)) {
3029
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_nVersion" "', argument " "1"" of type '" "CQR_Encode *""'");
3030
+ }
3031
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3032
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
3033
+ if (!SWIG_IsOK(ecode2)) {
3034
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "m_nVersion" "', argument " "2"" of type '" "int""'");
3035
+ }
3036
+ arg2 = static_cast< int >(val2);
3037
+ if (arg1) (arg1)->m_nVersion = arg2;
3038
+
3039
+ return Qnil;
3040
+ fail:
3041
+ return Qnil;
3042
+ }
3043
+
3044
+
3045
+ SWIGINTERN VALUE
3046
+ _wrap_CQR_Encode_m_nVersion_get(int argc, VALUE *argv, VALUE self) {
3047
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3048
+ int result;
3049
+ void *argp1 = 0 ;
3050
+ int res1 = 0 ;
3051
+ VALUE vresult = Qnil;
3052
+
3053
+ if ((argc < 0) || (argc > 0)) {
3054
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3055
+ }
3056
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3057
+ if (!SWIG_IsOK(res1)) {
3058
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_nVersion" "', argument " "1"" of type '" "CQR_Encode *""'");
3059
+ }
3060
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3061
+ result = (int) ((arg1)->m_nVersion);
3062
+ vresult = SWIG_From_int(static_cast< int >(result));
3063
+ return vresult;
3064
+ fail:
3065
+ return Qnil;
3066
+ }
3067
+
3068
+
3069
+ SWIGINTERN VALUE
3070
+ _wrap_CQR_Encode_m_bAutoExtent_set(int argc, VALUE *argv, VALUE self) {
3071
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3072
+ BOOL arg2 ;
3073
+ void *argp1 = 0 ;
3074
+ int res1 = 0 ;
3075
+ bool val2 ;
3076
+ int ecode2 = 0 ;
3077
+
3078
+ if ((argc < 1) || (argc > 1)) {
3079
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3080
+ }
3081
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3082
+ if (!SWIG_IsOK(res1)) {
3083
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_bAutoExtent" "', argument " "1"" of type '" "CQR_Encode *""'");
3084
+ }
3085
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3086
+ ecode2 = SWIG_AsVal_bool(argv[0], &val2);
3087
+ if (!SWIG_IsOK(ecode2)) {
3088
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "m_bAutoExtent" "', argument " "2"" of type '" "BOOL""'");
3089
+ }
3090
+ arg2 = static_cast< BOOL >(val2);
3091
+ if (arg1) (arg1)->m_bAutoExtent = arg2;
3092
+
3093
+ return Qnil;
3094
+ fail:
3095
+ return Qnil;
3096
+ }
3097
+
3098
+
3099
+ SWIGINTERN VALUE
3100
+ _wrap_CQR_Encode_m_bAutoExtent_get(int argc, VALUE *argv, VALUE self) {
3101
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3102
+ BOOL result;
3103
+ void *argp1 = 0 ;
3104
+ int res1 = 0 ;
3105
+ VALUE vresult = Qnil;
3106
+
3107
+ if ((argc < 0) || (argc > 0)) {
3108
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3109
+ }
3110
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3111
+ if (!SWIG_IsOK(res1)) {
3112
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_bAutoExtent" "', argument " "1"" of type '" "CQR_Encode *""'");
3113
+ }
3114
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3115
+ result = (BOOL) ((arg1)->m_bAutoExtent);
3116
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3117
+ return vresult;
3118
+ fail:
3119
+ return Qnil;
3120
+ }
3121
+
3122
+
3123
+ SWIGINTERN VALUE
3124
+ _wrap_CQR_Encode_m_nMaskingNo_set(int argc, VALUE *argv, VALUE self) {
3125
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3126
+ int arg2 ;
3127
+ void *argp1 = 0 ;
3128
+ int res1 = 0 ;
3129
+ int val2 ;
3130
+ int ecode2 = 0 ;
3131
+
3132
+ if ((argc < 1) || (argc > 1)) {
3133
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3134
+ }
3135
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3136
+ if (!SWIG_IsOK(res1)) {
3137
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_nMaskingNo" "', argument " "1"" of type '" "CQR_Encode *""'");
3138
+ }
3139
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3140
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
3141
+ if (!SWIG_IsOK(ecode2)) {
3142
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "m_nMaskingNo" "', argument " "2"" of type '" "int""'");
3143
+ }
3144
+ arg2 = static_cast< int >(val2);
3145
+ if (arg1) (arg1)->m_nMaskingNo = arg2;
3146
+
3147
+ return Qnil;
3148
+ fail:
3149
+ return Qnil;
3150
+ }
3151
+
3152
+
3153
+ SWIGINTERN VALUE
3154
+ _wrap_CQR_Encode_m_nMaskingNo_get(int argc, VALUE *argv, VALUE self) {
3155
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3156
+ int result;
3157
+ void *argp1 = 0 ;
3158
+ int res1 = 0 ;
3159
+ VALUE vresult = Qnil;
3160
+
3161
+ if ((argc < 0) || (argc > 0)) {
3162
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3163
+ }
3164
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3165
+ if (!SWIG_IsOK(res1)) {
3166
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_nMaskingNo" "', argument " "1"" of type '" "CQR_Encode *""'");
3167
+ }
3168
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3169
+ result = (int) ((arg1)->m_nMaskingNo);
3170
+ vresult = SWIG_From_int(static_cast< int >(result));
3171
+ return vresult;
3172
+ fail:
3173
+ return Qnil;
3174
+ }
3175
+
3176
+
3177
+ SWIGINTERN VALUE
3178
+ _wrap_CQR_Encode_m_nSymbleSize_set(int argc, VALUE *argv, VALUE self) {
3179
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3180
+ int arg2 ;
3181
+ void *argp1 = 0 ;
3182
+ int res1 = 0 ;
3183
+ int val2 ;
3184
+ int ecode2 = 0 ;
3185
+
3186
+ if ((argc < 1) || (argc > 1)) {
3187
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3188
+ }
3189
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3190
+ if (!SWIG_IsOK(res1)) {
3191
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_nSymbleSize" "', argument " "1"" of type '" "CQR_Encode *""'");
3192
+ }
3193
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3194
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
3195
+ if (!SWIG_IsOK(ecode2)) {
3196
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "m_nSymbleSize" "', argument " "2"" of type '" "int""'");
3197
+ }
3198
+ arg2 = static_cast< int >(val2);
3199
+ if (arg1) (arg1)->m_nSymbleSize = arg2;
3200
+
3201
+ return Qnil;
3202
+ fail:
3203
+ return Qnil;
3204
+ }
3205
+
3206
+
3207
+ SWIGINTERN VALUE
3208
+ _wrap_CQR_Encode_m_nSymbleSize_get(int argc, VALUE *argv, VALUE self) {
3209
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3210
+ int result;
3211
+ void *argp1 = 0 ;
3212
+ int res1 = 0 ;
3213
+ VALUE vresult = Qnil;
3214
+
3215
+ if ((argc < 0) || (argc > 0)) {
3216
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3217
+ }
3218
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3219
+ if (!SWIG_IsOK(res1)) {
3220
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_nSymbleSize" "', argument " "1"" of type '" "CQR_Encode *""'");
3221
+ }
3222
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3223
+ result = (int) ((arg1)->m_nSymbleSize);
3224
+ vresult = SWIG_From_int(static_cast< int >(result));
3225
+ return vresult;
3226
+ fail:
3227
+ return Qnil;
3228
+ }
3229
+
3230
+
3231
+ SWIGINTERN VALUE
3232
+ _wrap_CQR_Encode_m_byModuleData_set(int argc, VALUE *argv, VALUE self) {
3233
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3234
+ BYTE (*arg2)[177] ;
3235
+ void *argp1 = 0 ;
3236
+ int res1 = 0 ;
3237
+ void *argp2 = 0 ;
3238
+ int res2 = 0 ;
3239
+
3240
+ if ((argc < 1) || (argc > 1)) {
3241
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3242
+ }
3243
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3244
+ if (!SWIG_IsOK(res1)) {
3245
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_byModuleData" "', argument " "1"" of type '" "CQR_Encode *""'");
3246
+ }
3247
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3248
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_a_177__unsigned_char, 0 | 0 );
3249
+ if (!SWIG_IsOK(res2)) {
3250
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "m_byModuleData" "', argument " "2"" of type '" "BYTE [177][177]""'");
3251
+ }
3252
+ arg2 = reinterpret_cast< BYTE (*)[177] >(argp2);
3253
+ {
3254
+ if (arg2) {
3255
+ size_t ii = 0;
3256
+ for (; ii < (size_t)177; ++ii) {
3257
+ if (arg2[ii]) {
3258
+ size_t jj = 0;
3259
+ for (; jj < (size_t)177; ++jj) arg1->m_byModuleData[ii][jj] = arg2[ii][jj];
3260
+ } else {
3261
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""m_byModuleData""' of type '""BYTE [177][177]""'");
3262
+ }
3263
+ }
3264
+ } else {
3265
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""m_byModuleData""' of type '""BYTE [177][177]""'");
3266
+ }
3267
+ }
3268
+ return Qnil;
3269
+ fail:
3270
+ return Qnil;
3271
+ }
3272
+
3273
+
3274
+ SWIGINTERN VALUE
3275
+ _wrap_CQR_Encode_m_byModuleData_get(int argc, VALUE *argv, VALUE self) {
3276
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3277
+ BYTE (*result)[177] = 0 ;
3278
+ void *argp1 = 0 ;
3279
+ int res1 = 0 ;
3280
+ VALUE vresult = Qnil;
3281
+
3282
+ if ((argc < 0) || (argc > 0)) {
3283
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3284
+ }
3285
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3286
+ if (!SWIG_IsOK(res1)) {
3287
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_byModuleData" "', argument " "1"" of type '" "CQR_Encode *""'");
3288
+ }
3289
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3290
+ result = (BYTE (*)[177])(BYTE (*)[177]) ((arg1)->m_byModuleData);
3291
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_a_177__unsigned_char, 0 | 0 );
3292
+ return vresult;
3293
+ fail:
3294
+ return Qnil;
3295
+ }
3296
+
3297
+
3298
+ SWIGINTERN VALUE
3299
+ _wrap_CQR_Encode_EncodeData__SWIG_0(int argc, VALUE *argv, VALUE self) {
3300
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3301
+ int arg2 ;
3302
+ int arg3 ;
3303
+ BOOL arg4 ;
3304
+ int arg5 ;
3305
+ LPCSTR arg6 = (LPCSTR) 0 ;
3306
+ int arg7 ;
3307
+ BOOL result;
3308
+ void *argp1 = 0 ;
3309
+ int res1 = 0 ;
3310
+ int val2 ;
3311
+ int ecode2 = 0 ;
3312
+ int val3 ;
3313
+ int ecode3 = 0 ;
3314
+ bool val4 ;
3315
+ int ecode4 = 0 ;
3316
+ int val5 ;
3317
+ int ecode5 = 0 ;
3318
+ int res6 ;
3319
+ char *buf6 = 0 ;
3320
+ int alloc6 = 0 ;
3321
+ int val7 ;
3322
+ int ecode7 = 0 ;
3323
+ VALUE vresult = Qnil;
3324
+
3325
+ if ((argc < 6) || (argc > 6)) {
3326
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
3327
+ }
3328
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3329
+ if (!SWIG_IsOK(res1)) {
3330
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EncodeData" "', argument " "1"" of type '" "CQR_Encode *""'");
3331
+ }
3332
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3333
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
3334
+ if (!SWIG_IsOK(ecode2)) {
3335
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EncodeData" "', argument " "2"" of type '" "int""'");
3336
+ }
3337
+ arg2 = static_cast< int >(val2);
3338
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
3339
+ if (!SWIG_IsOK(ecode3)) {
3340
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "EncodeData" "', argument " "3"" of type '" "int""'");
3341
+ }
3342
+ arg3 = static_cast< int >(val3);
3343
+ ecode4 = SWIG_AsVal_bool(argv[2], &val4);
3344
+ if (!SWIG_IsOK(ecode4)) {
3345
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "EncodeData" "', argument " "4"" of type '" "BOOL""'");
3346
+ }
3347
+ arg4 = static_cast< BOOL >(val4);
3348
+ ecode5 = SWIG_AsVal_int(argv[3], &val5);
3349
+ if (!SWIG_IsOK(ecode5)) {
3350
+ SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "EncodeData" "', argument " "5"" of type '" "int""'");
3351
+ }
3352
+ arg5 = static_cast< int >(val5);
3353
+ res6 = SWIG_AsCharPtrAndSize(argv[4], &buf6, NULL, &alloc6);
3354
+ if (!SWIG_IsOK(res6)) {
3355
+ SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "EncodeData" "', argument " "6"" of type '" "LPCSTR""'");
3356
+ }
3357
+ arg6 = reinterpret_cast< LPCSTR >(buf6);
3358
+ ecode7 = SWIG_AsVal_int(argv[5], &val7);
3359
+ if (!SWIG_IsOK(ecode7)) {
3360
+ SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "EncodeData" "', argument " "7"" of type '" "int""'");
3361
+ }
3362
+ arg7 = static_cast< int >(val7);
3363
+ result = (BOOL)(arg1)->EncodeData(arg2,arg3,arg4,arg5,arg6,arg7);
3364
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3365
+ if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
3366
+ return vresult;
3367
+ fail:
3368
+ if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
3369
+ return Qnil;
3370
+ }
3371
+
3372
+
3373
+ SWIGINTERN VALUE
3374
+ _wrap_CQR_Encode_EncodeData__SWIG_1(int argc, VALUE *argv, VALUE self) {
3375
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3376
+ int arg2 ;
3377
+ int arg3 ;
3378
+ BOOL arg4 ;
3379
+ int arg5 ;
3380
+ LPCSTR arg6 = (LPCSTR) 0 ;
3381
+ BOOL result;
3382
+ void *argp1 = 0 ;
3383
+ int res1 = 0 ;
3384
+ int val2 ;
3385
+ int ecode2 = 0 ;
3386
+ int val3 ;
3387
+ int ecode3 = 0 ;
3388
+ bool val4 ;
3389
+ int ecode4 = 0 ;
3390
+ int val5 ;
3391
+ int ecode5 = 0 ;
3392
+ int res6 ;
3393
+ char *buf6 = 0 ;
3394
+ int alloc6 = 0 ;
3395
+ VALUE vresult = Qnil;
3396
+
3397
+ if ((argc < 5) || (argc > 5)) {
3398
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
3399
+ }
3400
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3401
+ if (!SWIG_IsOK(res1)) {
3402
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EncodeData" "', argument " "1"" of type '" "CQR_Encode *""'");
3403
+ }
3404
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3405
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
3406
+ if (!SWIG_IsOK(ecode2)) {
3407
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EncodeData" "', argument " "2"" of type '" "int""'");
3408
+ }
3409
+ arg2 = static_cast< int >(val2);
3410
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
3411
+ if (!SWIG_IsOK(ecode3)) {
3412
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "EncodeData" "', argument " "3"" of type '" "int""'");
3413
+ }
3414
+ arg3 = static_cast< int >(val3);
3415
+ ecode4 = SWIG_AsVal_bool(argv[2], &val4);
3416
+ if (!SWIG_IsOK(ecode4)) {
3417
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "EncodeData" "', argument " "4"" of type '" "BOOL""'");
3418
+ }
3419
+ arg4 = static_cast< BOOL >(val4);
3420
+ ecode5 = SWIG_AsVal_int(argv[3], &val5);
3421
+ if (!SWIG_IsOK(ecode5)) {
3422
+ SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "EncodeData" "', argument " "5"" of type '" "int""'");
3423
+ }
3424
+ arg5 = static_cast< int >(val5);
3425
+ res6 = SWIG_AsCharPtrAndSize(argv[4], &buf6, NULL, &alloc6);
3426
+ if (!SWIG_IsOK(res6)) {
3427
+ SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "EncodeData" "', argument " "6"" of type '" "LPCSTR""'");
3428
+ }
3429
+ arg6 = reinterpret_cast< LPCSTR >(buf6);
3430
+ result = (BOOL)(arg1)->EncodeData(arg2,arg3,arg4,arg5,arg6);
3431
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3432
+ if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
3433
+ return vresult;
3434
+ fail:
3435
+ if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
3436
+ return Qnil;
3437
+ }
3438
+
3439
+
3440
+ SWIGINTERN VALUE _wrap_CQR_Encode_EncodeData(int nargs, VALUE *args, VALUE self) {
3441
+ int argc;
3442
+ VALUE argv[8];
3443
+ int ii;
3444
+
3445
+ argc = nargs + 1;
3446
+ argv[0] = self;
3447
+ if (argc > 8) SWIG_fail;
3448
+ for (ii = 1; (ii < argc); ii++) {
3449
+ argv[ii] = args[ii-1];
3450
+ }
3451
+ if (argc == 6) {
3452
+ int _v;
3453
+ void *vptr = 0;
3454
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CQR_Encode, 0);
3455
+ _v = SWIG_CheckState(res);
3456
+ if (_v) {
3457
+ {
3458
+ int res = SWIG_AsVal_int(argv[1], NULL);
3459
+ _v = SWIG_CheckState(res);
3460
+ }
3461
+ if (_v) {
3462
+ {
3463
+ int res = SWIG_AsVal_int(argv[2], NULL);
3464
+ _v = SWIG_CheckState(res);
3465
+ }
3466
+ if (_v) {
3467
+ {
3468
+ int res = SWIG_AsVal_bool(argv[3], NULL);
3469
+ _v = SWIG_CheckState(res);
3470
+ }
3471
+ if (_v) {
3472
+ {
3473
+ int res = SWIG_AsVal_int(argv[4], NULL);
3474
+ _v = SWIG_CheckState(res);
3475
+ }
3476
+ if (_v) {
3477
+ int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0);
3478
+ _v = SWIG_CheckState(res);
3479
+ if (_v) {
3480
+ return _wrap_CQR_Encode_EncodeData__SWIG_1(nargs, args, self);
3481
+ }
3482
+ }
3483
+ }
3484
+ }
3485
+ }
3486
+ }
3487
+ }
3488
+ if (argc == 7) {
3489
+ int _v;
3490
+ void *vptr = 0;
3491
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CQR_Encode, 0);
3492
+ _v = SWIG_CheckState(res);
3493
+ if (_v) {
3494
+ {
3495
+ int res = SWIG_AsVal_int(argv[1], NULL);
3496
+ _v = SWIG_CheckState(res);
3497
+ }
3498
+ if (_v) {
3499
+ {
3500
+ int res = SWIG_AsVal_int(argv[2], NULL);
3501
+ _v = SWIG_CheckState(res);
3502
+ }
3503
+ if (_v) {
3504
+ {
3505
+ int res = SWIG_AsVal_bool(argv[3], NULL);
3506
+ _v = SWIG_CheckState(res);
3507
+ }
3508
+ if (_v) {
3509
+ {
3510
+ int res = SWIG_AsVal_int(argv[4], NULL);
3511
+ _v = SWIG_CheckState(res);
3512
+ }
3513
+ if (_v) {
3514
+ int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0);
3515
+ _v = SWIG_CheckState(res);
3516
+ if (_v) {
3517
+ {
3518
+ int res = SWIG_AsVal_int(argv[6], NULL);
3519
+ _v = SWIG_CheckState(res);
3520
+ }
3521
+ if (_v) {
3522
+ return _wrap_CQR_Encode_EncodeData__SWIG_0(nargs, args, self);
3523
+ }
3524
+ }
3525
+ }
3526
+ }
3527
+ }
3528
+ }
3529
+ }
3530
+ }
3531
+
3532
+ fail:
3533
+ rb_raise(rb_eArgError, "No matching function for overloaded 'CQR_Encode_EncodeData'");
3534
+ return Qnil;
3535
+ }
3536
+
3537
+
3538
+
3539
+ /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
3540
+
3541
+ static void *_p_QRDrawPNGTo_p_QRDraw(void *x) {
3542
+ return (void *)((QRDraw *) ((QRDrawPNG *) x));
3543
+ }
3544
+ static void *_p_QRDrawTIFFTo_p_QRDraw(void *x) {
3545
+ return (void *)((QRDraw *) ((QRDrawTIFF *) x));
3546
+ }
3547
+ static void *_p_QRDrawJPEGTo_p_QRDraw(void *x) {
3548
+ return (void *)((QRDraw *) ((QRDrawJPEG *) x));
3549
+ }
3550
+ static void *_p_QRDrawPSTo_p_QRDraw(void *x) {
3551
+ return (void *)((QRDraw *) ((QRDrawPS *) x));
3552
+ }
3553
+ static swig_type_info _swigt__p_CQR_Encode = {"_p_CQR_Encode", "CQR_Encode *", 0, 0, (void*)0, 0};
3554
+ static swig_type_info _swigt__p_QRDraw = {"_p_QRDraw", "QRDraw *", 0, 0, (void*)0, 0};
3555
+ static swig_type_info _swigt__p_QRDrawJPEG = {"_p_QRDrawJPEG", "QRDrawJPEG *", 0, 0, (void*)0, 0};
3556
+ static swig_type_info _swigt__p_QRDrawPNG = {"_p_QRDrawPNG", "QRDrawPNG *", 0, 0, (void*)0, 0};
3557
+ static swig_type_info _swigt__p_QRDrawPS = {"_p_QRDrawPS", "QRDrawPS *", 0, 0, (void*)0, 0};
3558
+ static swig_type_info _swigt__p_QRDrawTIFF = {"_p_QRDrawTIFF", "QRDrawTIFF *", 0, 0, (void*)0, 0};
3559
+ static swig_type_info _swigt__p_a_177__unsigned_char = {"_p_a_177__unsigned_char", "unsigned char (*)[177]|BYTE (*)[177]", 0, 0, (void*)0, 0};
3560
+ static swig_type_info _swigt__p_bool = {"_p_bool", "bool *|BOOL *", 0, 0, (void*)0, 0};
3561
+ static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
3562
+ static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0};
3563
+ static swig_type_info _swigt__p_tagQR_VERSIONINFO = {"_p_tagQR_VERSIONINFO", "tagQR_VERSIONINFO *|QR_VERSIONINFO *", 0, 0, (void*)0, 0};
3564
+ static swig_type_info _swigt__p_tagRS_BLOCKINFO = {"_p_tagRS_BLOCKINFO", "tagRS_BLOCKINFO *|RS_BLOCKINFO *", 0, 0, (void*)0, 0};
3565
+ static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|BYTE *", 0, 0, (void*)0, 0};
3566
+ static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|WORD *", 0, 0, (void*)0, 0};
3567
+
3568
+ static swig_type_info *swig_type_initial[] = {
3569
+ &_swigt__p_CQR_Encode,
3570
+ &_swigt__p_QRDraw,
3571
+ &_swigt__p_QRDrawJPEG,
3572
+ &_swigt__p_QRDrawPNG,
3573
+ &_swigt__p_QRDrawPS,
3574
+ &_swigt__p_QRDrawTIFF,
3575
+ &_swigt__p_a_177__unsigned_char,
3576
+ &_swigt__p_bool,
3577
+ &_swigt__p_char,
3578
+ &_swigt__p_int,
3579
+ &_swigt__p_tagQR_VERSIONINFO,
3580
+ &_swigt__p_tagRS_BLOCKINFO,
3581
+ &_swigt__p_unsigned_char,
3582
+ &_swigt__p_unsigned_short,
3583
+ };
3584
+
3585
+ static swig_cast_info _swigc__p_CQR_Encode[] = { {&_swigt__p_CQR_Encode, 0, 0, 0},{0, 0, 0, 0}};
3586
+ static swig_cast_info _swigc__p_QRDraw[] = { {&_swigt__p_QRDrawPNG, _p_QRDrawPNGTo_p_QRDraw, 0, 0}, {&_swigt__p_QRDrawTIFF, _p_QRDrawTIFFTo_p_QRDraw, 0, 0}, {&_swigt__p_QRDrawJPEG, _p_QRDrawJPEGTo_p_QRDraw, 0, 0}, {&_swigt__p_QRDraw, 0, 0, 0}, {&_swigt__p_QRDrawPS, _p_QRDrawPSTo_p_QRDraw, 0, 0},{0, 0, 0, 0}};
3587
+ static swig_cast_info _swigc__p_QRDrawJPEG[] = { {&_swigt__p_QRDrawJPEG, 0, 0, 0},{0, 0, 0, 0}};
3588
+ static swig_cast_info _swigc__p_QRDrawPNG[] = { {&_swigt__p_QRDrawPNG, 0, 0, 0},{0, 0, 0, 0}};
3589
+ static swig_cast_info _swigc__p_QRDrawPS[] = { {&_swigt__p_QRDrawPS, 0, 0, 0},{0, 0, 0, 0}};
3590
+ static swig_cast_info _swigc__p_QRDrawTIFF[] = { {&_swigt__p_QRDrawTIFF, 0, 0, 0},{0, 0, 0, 0}};
3591
+ static swig_cast_info _swigc__p_a_177__unsigned_char[] = { {&_swigt__p_a_177__unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
3592
+ static swig_cast_info _swigc__p_bool[] = { {&_swigt__p_bool, 0, 0, 0},{0, 0, 0, 0}};
3593
+ static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
3594
+ static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
3595
+ static swig_cast_info _swigc__p_tagQR_VERSIONINFO[] = { {&_swigt__p_tagQR_VERSIONINFO, 0, 0, 0},{0, 0, 0, 0}};
3596
+ static swig_cast_info _swigc__p_tagRS_BLOCKINFO[] = { {&_swigt__p_tagRS_BLOCKINFO, 0, 0, 0},{0, 0, 0, 0}};
3597
+ static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
3598
+ static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
3599
+
3600
+ static swig_cast_info *swig_cast_initial[] = {
3601
+ _swigc__p_CQR_Encode,
3602
+ _swigc__p_QRDraw,
3603
+ _swigc__p_QRDrawJPEG,
3604
+ _swigc__p_QRDrawPNG,
3605
+ _swigc__p_QRDrawPS,
3606
+ _swigc__p_QRDrawTIFF,
3607
+ _swigc__p_a_177__unsigned_char,
3608
+ _swigc__p_bool,
3609
+ _swigc__p_char,
3610
+ _swigc__p_int,
3611
+ _swigc__p_tagQR_VERSIONINFO,
3612
+ _swigc__p_tagRS_BLOCKINFO,
3613
+ _swigc__p_unsigned_char,
3614
+ _swigc__p_unsigned_short,
3615
+ };
3616
+
3617
+
3618
+ /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
3619
+
3620
+ /* -----------------------------------------------------------------------------
3621
+ * Type initialization:
3622
+ * This problem is tough by the requirement that no dynamic
3623
+ * memory is used. Also, since swig_type_info structures store pointers to
3624
+ * swig_cast_info structures and swig_cast_info structures store pointers back
3625
+ * to swig_type_info structures, we need some lookup code at initialization.
3626
+ * The idea is that swig generates all the structures that are needed.
3627
+ * The runtime then collects these partially filled structures.
3628
+ * The SWIG_InitializeModule function takes these initial arrays out of
3629
+ * swig_module, and does all the lookup, filling in the swig_module.types
3630
+ * array with the correct data and linking the correct swig_cast_info
3631
+ * structures together.
3632
+ *
3633
+ * The generated swig_type_info structures are assigned staticly to an initial
3634
+ * array. We just loop through that array, and handle each type individually.
3635
+ * First we lookup if this type has been already loaded, and if so, use the
3636
+ * loaded structure instead of the generated one. Then we have to fill in the
3637
+ * cast linked list. The cast data is initially stored in something like a
3638
+ * two-dimensional array. Each row corresponds to a type (there are the same
3639
+ * number of rows as there are in the swig_type_initial array). Each entry in
3640
+ * a column is one of the swig_cast_info structures for that type.
3641
+ * The cast_initial array is actually an array of arrays, because each row has
3642
+ * a variable number of columns. So to actually build the cast linked list,
3643
+ * we find the array of casts associated with the type, and loop through it
3644
+ * adding the casts to the list. The one last trick we need to do is making
3645
+ * sure the type pointer in the swig_cast_info struct is correct.
3646
+ *
3647
+ * First off, we lookup the cast->type name to see if it is already loaded.
3648
+ * There are three cases to handle:
3649
+ * 1) If the cast->type has already been loaded AND the type we are adding
3650
+ * casting info to has not been loaded (it is in this module), THEN we
3651
+ * replace the cast->type pointer with the type pointer that has already
3652
+ * been loaded.
3653
+ * 2) If BOTH types (the one we are adding casting info to, and the
3654
+ * cast->type) are loaded, THEN the cast info has already been loaded by
3655
+ * the previous module so we just ignore it.
3656
+ * 3) Finally, if cast->type has not already been loaded, then we add that
3657
+ * swig_cast_info to the linked list (because the cast->type) pointer will
3658
+ * be correct.
3659
+ * ----------------------------------------------------------------------------- */
3660
+
3661
+ #ifdef __cplusplus
3662
+ extern "C" {
3663
+ #if 0
3664
+ } /* c-mode */
3665
+ #endif
3666
+ #endif
3667
+
3668
+ #if 0
3669
+ #define SWIGRUNTIME_DEBUG
3670
+ #endif
3671
+
3672
+
3673
+ SWIGRUNTIME void
3674
+ SWIG_InitializeModule(void *clientdata) {
3675
+ size_t i;
3676
+ swig_module_info *module_head, *iter;
3677
+ int found;
3678
+
3679
+ clientdata = clientdata;
3680
+
3681
+ /* check to see if the circular list has been setup, if not, set it up */
3682
+ if (swig_module.next==0) {
3683
+ /* Initialize the swig_module */
3684
+ swig_module.type_initial = swig_type_initial;
3685
+ swig_module.cast_initial = swig_cast_initial;
3686
+ swig_module.next = &swig_module;
3687
+ }
3688
+
3689
+ /* Try and load any already created modules */
3690
+ module_head = SWIG_GetModule(clientdata);
3691
+ if (!module_head) {
3692
+ /* This is the first module loaded for this interpreter */
3693
+ /* so set the swig module into the interpreter */
3694
+ SWIG_SetModule(clientdata, &swig_module);
3695
+ module_head = &swig_module;
3696
+ } else {
3697
+ /* the interpreter has loaded a SWIG module, but has it loaded this one? */
3698
+ found=0;
3699
+ iter=module_head;
3700
+ do {
3701
+ if (iter==&swig_module) {
3702
+ found=1;
3703
+ break;
3704
+ }
3705
+ iter=iter->next;
3706
+ } while (iter!= module_head);
3707
+
3708
+ /* if the is found in the list, then all is done and we may leave */
3709
+ if (found) return;
3710
+ /* otherwise we must add out module into the list */
3711
+ swig_module.next = module_head->next;
3712
+ module_head->next = &swig_module;
3713
+ }
3714
+
3715
+ /* Now work on filling in swig_module.types */
3716
+ #ifdef SWIGRUNTIME_DEBUG
3717
+ printf("SWIG_InitializeModule: size %d\n", swig_module.size);
3718
+ #endif
3719
+ for (i = 0; i < swig_module.size; ++i) {
3720
+ swig_type_info *type = 0;
3721
+ swig_type_info *ret;
3722
+ swig_cast_info *cast;
3723
+
3724
+ #ifdef SWIGRUNTIME_DEBUG
3725
+ printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
3726
+ #endif
3727
+
3728
+ /* if there is another module already loaded */
3729
+ if (swig_module.next != &swig_module) {
3730
+ type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
3731
+ }
3732
+ if (type) {
3733
+ /* Overwrite clientdata field */
3734
+ #ifdef SWIGRUNTIME_DEBUG
3735
+ printf("SWIG_InitializeModule: found type %s\n", type->name);
3736
+ #endif
3737
+ if (swig_module.type_initial[i]->clientdata) {
3738
+ type->clientdata = swig_module.type_initial[i]->clientdata;
3739
+ #ifdef SWIGRUNTIME_DEBUG
3740
+ printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
3741
+ #endif
3742
+ }
3743
+ } else {
3744
+ type = swig_module.type_initial[i];
3745
+ }
3746
+
3747
+ /* Insert casting types */
3748
+ cast = swig_module.cast_initial[i];
3749
+ while (cast->type) {
3750
+
3751
+ /* Don't need to add information already in the list */
3752
+ ret = 0;
3753
+ #ifdef SWIGRUNTIME_DEBUG
3754
+ printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
3755
+ #endif
3756
+ if (swig_module.next != &swig_module) {
3757
+ ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
3758
+ #ifdef SWIGRUNTIME_DEBUG
3759
+ if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
3760
+ #endif
3761
+ }
3762
+ if (ret) {
3763
+ if (type == swig_module.type_initial[i]) {
3764
+ #ifdef SWIGRUNTIME_DEBUG
3765
+ printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
3766
+ #endif
3767
+ cast->type = ret;
3768
+ ret = 0;
3769
+ } else {
3770
+ /* Check for casting already in the list */
3771
+ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
3772
+ #ifdef SWIGRUNTIME_DEBUG
3773
+ if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
3774
+ #endif
3775
+ if (!ocast) ret = 0;
3776
+ }
3777
+ }
3778
+
3779
+ if (!ret) {
3780
+ #ifdef SWIGRUNTIME_DEBUG
3781
+ printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
3782
+ #endif
3783
+ if (type->cast) {
3784
+ type->cast->prev = cast;
3785
+ cast->next = type->cast;
3786
+ }
3787
+ type->cast = cast;
3788
+ }
3789
+ cast++;
3790
+ }
3791
+ /* Set entry in modules->types array equal to the type */
3792
+ swig_module.types[i] = type;
3793
+ }
3794
+ swig_module.types[i] = 0;
3795
+
3796
+ #ifdef SWIGRUNTIME_DEBUG
3797
+ printf("**** SWIG_InitializeModule: Cast List ******\n");
3798
+ for (i = 0; i < swig_module.size; ++i) {
3799
+ int j = 0;
3800
+ swig_cast_info *cast = swig_module.cast_initial[i];
3801
+ printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
3802
+ while (cast->type) {
3803
+ printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
3804
+ cast++;
3805
+ ++j;
3806
+ }
3807
+ printf("---- Total casts: %d\n",j);
3808
+ }
3809
+ printf("**** SWIG_InitializeModule: Cast List ******\n");
3810
+ #endif
3811
+ }
3812
+
3813
+ /* This function will propagate the clientdata field of type to
3814
+ * any new swig_type_info structures that have been added into the list
3815
+ * of equivalent types. It is like calling
3816
+ * SWIG_TypeClientData(type, clientdata) a second time.
3817
+ */
3818
+ SWIGRUNTIME void
3819
+ SWIG_PropagateClientData(void) {
3820
+ size_t i;
3821
+ swig_cast_info *equiv;
3822
+ static int init_run = 0;
3823
+
3824
+ if (init_run) return;
3825
+ init_run = 1;
3826
+
3827
+ for (i = 0; i < swig_module.size; i++) {
3828
+ if (swig_module.types[i]->clientdata) {
3829
+ equiv = swig_module.types[i]->cast;
3830
+ while (equiv) {
3831
+ if (!equiv->converter) {
3832
+ if (equiv->type && !equiv->type->clientdata)
3833
+ SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
3834
+ }
3835
+ equiv = equiv->next;
3836
+ }
3837
+ }
3838
+ }
3839
+ }
3840
+
3841
+ #ifdef __cplusplus
3842
+ #if 0
3843
+ { /* c-mode */
3844
+ #endif
3845
+ }
3846
+ #endif
3847
+
3848
+
3849
+ #ifdef __cplusplus
3850
+ extern "C"
3851
+ #endif
3852
+ SWIGEXPORT void Init_QR(void) {
3853
+ size_t i;
3854
+
3855
+ SWIG_InitRuntime();
3856
+ mQR = rb_define_module("QR");
3857
+
3858
+ SWIG_InitializeModule(0);
3859
+ for (i = 0; i < swig_module.size; i++) {
3860
+ SWIG_define_class(swig_module.types[i]);
3861
+ }
3862
+
3863
+ SWIG_RubyInitializeTrackings();
3864
+ rb_define_const(mQR, "MARGIN_SIZE", SWIG_From_int(static_cast< int >(4)));
3865
+ rb_define_const(mQR, "MAX_MODULESIZE", SWIG_From_int(static_cast< int >(177)));
3866
+
3867
+ cQRDraw.klass = rb_define_class_under(mQR, "QRDraw", rb_cObject);
3868
+ SWIG_TypeClientData(SWIGTYPE_p_QRDraw, (void *) &cQRDraw);
3869
+ rb_undef_alloc_func(cQRDraw.klass);
3870
+ rb_define_method(cQRDraw.klass, "setup", VALUEFUNC(_wrap_QRDraw_setup), -1);
3871
+ rb_define_method(cQRDraw.klass, "draw", VALUEFUNC(_wrap_QRDraw_draw), -1);
3872
+ cQRDraw.mark = 0;
3873
+ cQRDraw.destroy = (void (*)(void *)) free_QRDraw;
3874
+ cQRDraw.trackObjects = 0;
3875
+
3876
+ cQRDrawJPEG.klass = rb_define_class_under(mQR, "QRDrawJPEG", ((swig_class *) SWIGTYPE_p_QRDraw->clientdata)->klass);
3877
+ SWIG_TypeClientData(SWIGTYPE_p_QRDrawJPEG, (void *) &cQRDrawJPEG);
3878
+ rb_define_alloc_func(cQRDrawJPEG.klass, _wrap_QRDrawJPEG_allocate);
3879
+ rb_define_method(cQRDrawJPEG.klass, "initialize", VALUEFUNC(_wrap_new_QRDrawJPEG), -1);
3880
+ rb_define_method(cQRDrawJPEG.klass, "draw", VALUEFUNC(_wrap_QRDrawJPEG_draw), -1);
3881
+ cQRDrawJPEG.mark = 0;
3882
+ cQRDrawJPEG.destroy = (void (*)(void *)) free_QRDrawJPEG;
3883
+ cQRDrawJPEG.trackObjects = 0;
3884
+
3885
+ cQRDrawPNG.klass = rb_define_class_under(mQR, "QRDrawPNG", ((swig_class *) SWIGTYPE_p_QRDraw->clientdata)->klass);
3886
+ SWIG_TypeClientData(SWIGTYPE_p_QRDrawPNG, (void *) &cQRDrawPNG);
3887
+ rb_define_alloc_func(cQRDrawPNG.klass, _wrap_QRDrawPNG_allocate);
3888
+ rb_define_method(cQRDrawPNG.klass, "initialize", VALUEFUNC(_wrap_new_QRDrawPNG), -1);
3889
+ rb_define_method(cQRDrawPNG.klass, "draw", VALUEFUNC(_wrap_QRDrawPNG_draw), -1);
3890
+ cQRDrawPNG.mark = 0;
3891
+ cQRDrawPNG.destroy = (void (*)(void *)) free_QRDrawPNG;
3892
+ cQRDrawPNG.trackObjects = 0;
3893
+
3894
+ cQRDrawPS.klass = rb_define_class_under(mQR, "QRDrawPS", ((swig_class *) SWIGTYPE_p_QRDraw->clientdata)->klass);
3895
+ SWIG_TypeClientData(SWIGTYPE_p_QRDrawPS, (void *) &cQRDrawPS);
3896
+ rb_define_alloc_func(cQRDrawPS.klass, _wrap_QRDrawPS_allocate);
3897
+ rb_define_method(cQRDrawPS.klass, "initialize", VALUEFUNC(_wrap_new_QRDrawPS), -1);
3898
+ rb_define_method(cQRDrawPS.klass, "draw", VALUEFUNC(_wrap_QRDrawPS_draw), -1);
3899
+ cQRDrawPS.mark = 0;
3900
+ cQRDrawPS.destroy = (void (*)(void *)) free_QRDrawPS;
3901
+ cQRDrawPS.trackObjects = 0;
3902
+
3903
+ cQRDrawTIFF.klass = rb_define_class_under(mQR, "QRDrawTIFF", ((swig_class *) SWIGTYPE_p_QRDraw->clientdata)->klass);
3904
+ SWIG_TypeClientData(SWIGTYPE_p_QRDrawTIFF, (void *) &cQRDrawTIFF);
3905
+ rb_define_alloc_func(cQRDrawTIFF.klass, _wrap_QRDrawTIFF_allocate);
3906
+ rb_define_method(cQRDrawTIFF.klass, "initialize", VALUEFUNC(_wrap_new_QRDrawTIFF), -1);
3907
+ rb_define_method(cQRDrawTIFF.klass, "draw", VALUEFUNC(_wrap_QRDrawTIFF_draw), -1);
3908
+ cQRDrawTIFF.mark = 0;
3909
+ cQRDrawTIFF.destroy = (void (*)(void *)) free_QRDrawTIFF;
3910
+ cQRDrawTIFF.trackObjects = 0;
3911
+ rb_define_const(mQR, "QR_LEVEL_L", SWIG_From_int(static_cast< int >(0)));
3912
+ rb_define_const(mQR, "QR_LEVEL_M", SWIG_From_int(static_cast< int >(1)));
3913
+ rb_define_const(mQR, "QR_LEVEL_Q", SWIG_From_int(static_cast< int >(2)));
3914
+ rb_define_const(mQR, "QR_LEVEL_H", SWIG_From_int(static_cast< int >(3)));
3915
+ rb_define_const(mQR, "QR_MODE_NUMERAL", SWIG_From_int(static_cast< int >(0)));
3916
+ rb_define_const(mQR, "QR_MODE_ALPHABET", SWIG_From_int(static_cast< int >(1)));
3917
+ rb_define_const(mQR, "QR_MODE_8BIT", SWIG_From_int(static_cast< int >(2)));
3918
+ rb_define_const(mQR, "QR_MODE_KANJI", SWIG_From_int(static_cast< int >(3)));
3919
+ rb_define_const(mQR, "QR_VRESION_S", SWIG_From_int(static_cast< int >(0)));
3920
+ rb_define_const(mQR, "QR_VRESION_M", SWIG_From_int(static_cast< int >(1)));
3921
+ rb_define_const(mQR, "QR_VRESION_L", SWIG_From_int(static_cast< int >(2)));
3922
+ rb_define_const(mQR, "MAX_ALLCODEWORD", SWIG_From_int(static_cast< int >(3706)));
3923
+ rb_define_const(mQR, "MAX_DATACODEWORD", SWIG_From_int(static_cast< int >(2956)));
3924
+ rb_define_const(mQR, "MAX_CODEBLOCK", SWIG_From_int(static_cast< int >(153)));
3925
+ rb_define_const(mQR, "QR_MARGIN", SWIG_From_int(static_cast< int >(4)));
3926
+
3927
+ cRS_BLOCKINFO.klass = rb_define_class_under(mQR, "RS_BLOCKINFO", rb_cObject);
3928
+ SWIG_TypeClientData(SWIGTYPE_p_tagRS_BLOCKINFO, (void *) &cRS_BLOCKINFO);
3929
+ rb_define_alloc_func(cRS_BLOCKINFO.klass, _wrap_RS_BLOCKINFO_allocate);
3930
+ rb_define_method(cRS_BLOCKINFO.klass, "initialize", VALUEFUNC(_wrap_new_RS_BLOCKINFO), -1);
3931
+ rb_define_method(cRS_BLOCKINFO.klass, "ncRSBlock=", VALUEFUNC(_wrap_RS_BLOCKINFO_ncRSBlock_set), -1);
3932
+ rb_define_method(cRS_BLOCKINFO.klass, "ncRSBlock", VALUEFUNC(_wrap_RS_BLOCKINFO_ncRSBlock_get), -1);
3933
+ rb_define_method(cRS_BLOCKINFO.klass, "ncAllCodeWord=", VALUEFUNC(_wrap_RS_BLOCKINFO_ncAllCodeWord_set), -1);
3934
+ rb_define_method(cRS_BLOCKINFO.klass, "ncAllCodeWord", VALUEFUNC(_wrap_RS_BLOCKINFO_ncAllCodeWord_get), -1);
3935
+ rb_define_method(cRS_BLOCKINFO.klass, "ncDataCodeWord=", VALUEFUNC(_wrap_RS_BLOCKINFO_ncDataCodeWord_set), -1);
3936
+ rb_define_method(cRS_BLOCKINFO.klass, "ncDataCodeWord", VALUEFUNC(_wrap_RS_BLOCKINFO_ncDataCodeWord_get), -1);
3937
+ cRS_BLOCKINFO.mark = 0;
3938
+ cRS_BLOCKINFO.destroy = (void (*)(void *)) free_RS_BLOCKINFO;
3939
+ cRS_BLOCKINFO.trackObjects = 0;
3940
+
3941
+ cQR_VERSIONINFO.klass = rb_define_class_under(mQR, "QR_VERSIONINFO", rb_cObject);
3942
+ SWIG_TypeClientData(SWIGTYPE_p_tagQR_VERSIONINFO, (void *) &cQR_VERSIONINFO);
3943
+ rb_define_alloc_func(cQR_VERSIONINFO.klass, _wrap_QR_VERSIONINFO_allocate);
3944
+ rb_define_method(cQR_VERSIONINFO.klass, "initialize", VALUEFUNC(_wrap_new_QR_VERSIONINFO), -1);
3945
+ rb_define_method(cQR_VERSIONINFO.klass, "nVersionNo=", VALUEFUNC(_wrap_QR_VERSIONINFO_nVersionNo_set), -1);
3946
+ rb_define_method(cQR_VERSIONINFO.klass, "nVersionNo", VALUEFUNC(_wrap_QR_VERSIONINFO_nVersionNo_get), -1);
3947
+ rb_define_method(cQR_VERSIONINFO.klass, "ncAllCodeWord=", VALUEFUNC(_wrap_QR_VERSIONINFO_ncAllCodeWord_set), -1);
3948
+ rb_define_method(cQR_VERSIONINFO.klass, "ncAllCodeWord", VALUEFUNC(_wrap_QR_VERSIONINFO_ncAllCodeWord_get), -1);
3949
+ rb_define_method(cQR_VERSIONINFO.klass, "ncDataCodeWord=", VALUEFUNC(_wrap_QR_VERSIONINFO_ncDataCodeWord_set), -1);
3950
+ rb_define_method(cQR_VERSIONINFO.klass, "ncDataCodeWord", VALUEFUNC(_wrap_QR_VERSIONINFO_ncDataCodeWord_get), -1);
3951
+ rb_define_method(cQR_VERSIONINFO.klass, "ncAlignPoint=", VALUEFUNC(_wrap_QR_VERSIONINFO_ncAlignPoint_set), -1);
3952
+ rb_define_method(cQR_VERSIONINFO.klass, "ncAlignPoint", VALUEFUNC(_wrap_QR_VERSIONINFO_ncAlignPoint_get), -1);
3953
+ rb_define_method(cQR_VERSIONINFO.klass, "nAlignPoint=", VALUEFUNC(_wrap_QR_VERSIONINFO_nAlignPoint_set), -1);
3954
+ rb_define_method(cQR_VERSIONINFO.klass, "nAlignPoint", VALUEFUNC(_wrap_QR_VERSIONINFO_nAlignPoint_get), -1);
3955
+ rb_define_method(cQR_VERSIONINFO.klass, "RS_BlockInfo1=", VALUEFUNC(_wrap_QR_VERSIONINFO_RS_BlockInfo1_set), -1);
3956
+ rb_define_method(cQR_VERSIONINFO.klass, "RS_BlockInfo1", VALUEFUNC(_wrap_QR_VERSIONINFO_RS_BlockInfo1_get), -1);
3957
+ rb_define_method(cQR_VERSIONINFO.klass, "RS_BlockInfo2=", VALUEFUNC(_wrap_QR_VERSIONINFO_RS_BlockInfo2_set), -1);
3958
+ rb_define_method(cQR_VERSIONINFO.klass, "RS_BlockInfo2", VALUEFUNC(_wrap_QR_VERSIONINFO_RS_BlockInfo2_get), -1);
3959
+ cQR_VERSIONINFO.mark = 0;
3960
+ cQR_VERSIONINFO.destroy = (void (*)(void *)) free_QR_VERSIONINFO;
3961
+ cQR_VERSIONINFO.trackObjects = 0;
3962
+
3963
+ cCQR_Encode.klass = rb_define_class_under(mQR, "CQR_Encode", rb_cObject);
3964
+ SWIG_TypeClientData(SWIGTYPE_p_CQR_Encode, (void *) &cCQR_Encode);
3965
+ rb_define_alloc_func(cCQR_Encode.klass, _wrap_CQR_Encode_allocate);
3966
+ rb_define_method(cCQR_Encode.klass, "initialize", VALUEFUNC(_wrap_new_CQR_Encode), -1);
3967
+ rb_define_method(cCQR_Encode.klass, "m_nLevel=", VALUEFUNC(_wrap_CQR_Encode_m_nLevel_set), -1);
3968
+ rb_define_method(cCQR_Encode.klass, "m_nLevel", VALUEFUNC(_wrap_CQR_Encode_m_nLevel_get), -1);
3969
+ rb_define_method(cCQR_Encode.klass, "m_nVersion=", VALUEFUNC(_wrap_CQR_Encode_m_nVersion_set), -1);
3970
+ rb_define_method(cCQR_Encode.klass, "m_nVersion", VALUEFUNC(_wrap_CQR_Encode_m_nVersion_get), -1);
3971
+ rb_define_method(cCQR_Encode.klass, "m_bAutoExtent=", VALUEFUNC(_wrap_CQR_Encode_m_bAutoExtent_set), -1);
3972
+ rb_define_method(cCQR_Encode.klass, "m_bAutoExtent", VALUEFUNC(_wrap_CQR_Encode_m_bAutoExtent_get), -1);
3973
+ rb_define_method(cCQR_Encode.klass, "m_nMaskingNo=", VALUEFUNC(_wrap_CQR_Encode_m_nMaskingNo_set), -1);
3974
+ rb_define_method(cCQR_Encode.klass, "m_nMaskingNo", VALUEFUNC(_wrap_CQR_Encode_m_nMaskingNo_get), -1);
3975
+ rb_define_method(cCQR_Encode.klass, "m_nSymbleSize=", VALUEFUNC(_wrap_CQR_Encode_m_nSymbleSize_set), -1);
3976
+ rb_define_method(cCQR_Encode.klass, "m_nSymbleSize", VALUEFUNC(_wrap_CQR_Encode_m_nSymbleSize_get), -1);
3977
+ rb_define_method(cCQR_Encode.klass, "m_byModuleData=", VALUEFUNC(_wrap_CQR_Encode_m_byModuleData_set), -1);
3978
+ rb_define_method(cCQR_Encode.klass, "m_byModuleData", VALUEFUNC(_wrap_CQR_Encode_m_byModuleData_get), -1);
3979
+ rb_define_method(cCQR_Encode.klass, "EncodeData", VALUEFUNC(_wrap_CQR_Encode_EncodeData), -1);
3980
+ cCQR_Encode.mark = 0;
3981
+ cCQR_Encode.destroy = (void (*)(void *)) free_CQR_Encode;
3982
+ cCQR_Encode.trackObjects = 0;
3983
+ }
3984
+