rqr 0.2.0-x86-mswin32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,28 @@
1
+ #ifndef _QR_DRAW_PNG_
2
+ #define _QR_DRAW_PNG_
3
+
4
+ #include <stdlib.h>
5
+ #include <math.h>
6
+ #include "qr_draw.h"
7
+
8
+ #ifdef USE_PNG
9
+ #include <png.h>
10
+ #endif
11
+
12
+ //=============================================================================
13
+ // QRDrawPNG �N���X
14
+ //=============================================================================
15
+ class QRDrawPNG : public QRDraw
16
+ {
17
+ private:
18
+ int raster(unsigned char data[MAX_MODULESIZE][MAX_MODULESIZE]);
19
+ int write();
20
+
21
+ public:
22
+ QRDrawPNG(){}
23
+ ~QRDrawPNG(){}
24
+ int draw(char *filename, int modulesize, int symbolsize,
25
+ unsigned char data[MAX_MODULESIZE][MAX_MODULESIZE], void *opt);
26
+ };
27
+
28
+ #endif
@@ -0,0 +1,233 @@
1
+ #include "qr_draw_ps.h"
2
+
3
+ //=============================================================================
4
+ // QRDrawPS::draw
5
+ //=============================================================================
6
+ int QRDrawPS::draw(char *filename, int modulesize, int symbolsize,
7
+ unsigned char data[MAX_MODULESIZE][MAX_MODULESIZE], void *opt)
8
+ {
9
+ if(!filename) return(1);
10
+ setup(filename, modulesize, symbolsize);
11
+
12
+ bool preview;
13
+ if(!opt){
14
+ preview = false;
15
+ }else{
16
+ preview = (bool)opt;
17
+ }
18
+
19
+ if(preview){
20
+ #ifdef USE_TIFF
21
+ return( this->write2(data) );
22
+ #endif
23
+ }else{
24
+ return( this->write(data, "wb") );
25
+ }
26
+
27
+ return(1);
28
+ }
29
+
30
+ //=============================================================================
31
+ // QRDrawPS::write_preview_eps
32
+ //=============================================================================
33
+ int QRDrawPS::write2(unsigned char data[MAX_MODULESIZE][MAX_MODULESIZE])
34
+ {
35
+ #ifdef USE_TIFF
36
+ FILE *stream;
37
+ unsigned char lt[4];
38
+ struct stat st;
39
+
40
+ if((stream=fopen(this->filename, "wb")) == NULL) return(1);
41
+
42
+ /* �_�~�[�w�b�_�[�������� */
43
+ this->write_header(stream);
44
+
45
+ /* TIFF�������� */
46
+ this->write_preview(stream, data);
47
+ fclose(stream);
48
+
49
+ /* EPS�������� */
50
+ this->write(data, "a");
51
+
52
+ /* EPS�T�C�Y�Z�o */
53
+ stat(this->filename, &st);
54
+ unsigned int esize = st.st_size - (this->tsize+30);
55
+
56
+ /* �w�b�_�[�������� */
57
+ if((stream=fopen(this->filename, "rb+")) == NULL) return(1);
58
+
59
+ /* PS�J�n�ʒu */
60
+ fseek(stream, 4, SEEK_SET);
61
+ this->littleEndian(30+this->tsize, lt);
62
+ fprintf(stream, "%c%c%c%c", lt[0], lt[1], lt[2], lt[3]);
63
+
64
+ /* PS�� */
65
+ fseek(stream, 8, SEEK_SET);
66
+ this->littleEndian(esize, lt);
67
+ fprintf(stream, "%c%c%c%c", lt[0], lt[1], lt[2], lt[3]);
68
+
69
+ /* TIFF�v���r���[�� */
70
+ fseek(stream, 24, SEEK_SET);
71
+ this->littleEndian(this->tsize, lt);
72
+ fprintf(stream, "%c%c%c%c", lt[0], lt[1], lt[2], lt[3]);
73
+
74
+ fclose(stream);
75
+
76
+ return(0);
77
+ #else
78
+ return(1);
79
+ #endif
80
+ }
81
+
82
+ //=============================================================================
83
+ // QRDrawPS::write_header
84
+ //=============================================================================
85
+ void QRDrawPS::write_header(FILE *stream)
86
+ {
87
+ unsigned char lt[4];
88
+
89
+ /* �i�~���j */
90
+ fprintf(stream, "%c%c%c%c", 0xC5, 0xD0, 0xD3, 0xC6);
91
+
92
+ /* PostScript�J�n�ʒu */
93
+ fprintf(stream, "%c%c%c%c", 0x00, 0x00, 0x00, 0x00);
94
+
95
+ /* PostScript���� */
96
+ fprintf(stream, "%c%c%c%c", 0x00, 0x00, 0x00, 0x00);
97
+
98
+ /* MetaFile */
99
+ fprintf(stream, "%c%c%c%c", 0x00, 0x00, 0x00, 0x00);
100
+ fprintf(stream, "%c%c%c%c", 0x00, 0x00, 0x00, 0x00);
101
+
102
+ /* TIFF�v���r���[�J�n�ʒu */
103
+ littleEndian(30, lt);
104
+ fprintf(stream, "%c%c%c%c", lt[0], lt[1], lt[2], lt[3]);
105
+
106
+ /* TIFF�v���r���[�� */
107
+ fprintf(stream, "%c%c%c%c", 0x00, 0x00, 0x00, 0x00);
108
+
109
+ /* �`�F�b�N�T�� */
110
+ fprintf(stream, "%c%c", 0xff, 0xff);
111
+ }
112
+
113
+ //=================================================================================
114
+ // littleEndian
115
+ //=================================================================================
116
+ void QRDrawPS::littleEndian(int data, unsigned char *lt)
117
+ {
118
+ lt[0] = data & 0x000000FF;
119
+ lt[1] = (data & 0x0000FF00) >> 8;
120
+ lt[2] = (data & 0x00FF0000) >> 16;
121
+ lt[3] = (data & 0xFF000000) >> 24;
122
+ }
123
+
124
+ //=============================================================================
125
+ // QRDrawPS::write_preview
126
+ //=============================================================================
127
+ int QRDrawPS::write_preview(FILE *stream, unsigned char data[MAX_MODULESIZE][MAX_MODULESIZE])
128
+ {
129
+ #ifdef USE_TIFF
130
+ FILE *t;
131
+ char tmp[L_tmpnam];
132
+ QRDrawTIFF tif;
133
+ unsigned char *p;
134
+
135
+ tmpnam(tmp);
136
+ if( tif.draw(tmp, this->msize, this->ssize, data, NULL) ) return(1);
137
+
138
+ /* TIFF���I�[�v�����ăt�@�C���T�C�Y���擾���� */
139
+ if((t=fopen(tmp, "rb")) == NULL){
140
+ remove(tmp);
141
+ return(1);
142
+ }
143
+ fseek(t, 0, SEEK_END);
144
+ this->tsize = ftell(t);
145
+ fseek(t, 0, SEEK_SET);
146
+
147
+ /* TIFF�{�̂̏������� */
148
+ p = (unsigned char *)malloc(this->tsize);
149
+ fread(p, 1, this->tsize, t);
150
+ fwrite(p, 1, this->tsize, stream);
151
+
152
+ free(p);
153
+ fclose(t);
154
+ remove(tmp);
155
+
156
+ return(0);
157
+ #else
158
+ return(1);
159
+ #endif
160
+ }
161
+
162
+ //=============================================================================
163
+ // QRDrawPS::write_eps
164
+ //=============================================================================
165
+ int QRDrawPS::write(unsigned char data[MAX_MODULESIZE][MAX_MODULESIZE], char *mode)
166
+ {
167
+ FILE *stream;
168
+ int i, j;
169
+ time_t mytime;
170
+ struct tm *lt;
171
+
172
+ if((stream=fopen(this->filename, mode)) == NULL) return(1);
173
+
174
+ fprintf(stream, "%%!PS-Adobe-3.0 EPSF-3.0\n");
175
+ fprintf(stream, "%%%%Creator: kei-soe\n");
176
+ fprintf(stream, "%%%%Title: %s\n", this->filename);
177
+
178
+ time(&mytime);
179
+ lt = localtime(&mytime);
180
+ fprintf(stream, "%%%%CreationDate: %04d:%02d:%02d %02d:%02d:%02d\n",
181
+ lt->tm_year+1900, lt->tm_mon+1, lt->tm_mday,
182
+ lt->tm_hour, lt->tm_min, lt->tm_sec);
183
+ fprintf(stream, "%%%%BoundingBox: 0 0 %d %d\n", this->rsize, this->rsize);
184
+ fprintf(stream, "%%%%HiResBoundingBox: 0 0 %d %d\n", this->rsize, this->rsize);
185
+ fprintf(stream, "%%%%DocumentProcessColors: Cyan Magenta Yellow Black\n");
186
+ fprintf(stream, "%%%%EndComments\n");
187
+ fprintf(stream, "%%%%BeginProlog\n");
188
+ fprintf(stream, "%%%%EndProlog\n");
189
+ fprintf(stream, "%%%%BeginSetup\n");
190
+ fprintf(stream, "%%%%EndSetup\n");
191
+
192
+ fprintf(stream, "/size %d def\n", this->ssize);
193
+ fprintf(stream, "/margin %d def\n", MARGIN_SIZE);
194
+ fprintf(stream, "gsave\n");
195
+ fprintf(stream, "%d %d scale\n", this->msize, this->msize);
196
+ fprintf(stream, "newpath\n");
197
+ fprintf(stream, "0 0 moveto\n");
198
+ fprintf(stream, "0 size margin 2 mul add rlineto\n");
199
+ fprintf(stream, "size margin 2 mul add 0 rlineto\n");
200
+ fprintf(stream, "0 size margin 2 mul add neg rlineto\n");
201
+ fprintf(stream, "closepath\n");
202
+ fprintf(stream, "1 setgray\n");
203
+ fprintf(stream, "fill\n");
204
+
205
+ // �h�b�g�`��
206
+ for(i=0; i<this->ssize; i++){
207
+ for(j=0; j<this->ssize; j++) fprintf(stream, "%d ", data[j][i]);
208
+ fprintf(stream, "\n");
209
+ }
210
+
211
+ fprintf(stream, "margin margin translate\n");
212
+ fprintf(stream, "0 setgray\n");
213
+ fprintf(stream, "1 1 size {\n");
214
+ fprintf(stream, "/ypos exch def\n");
215
+ fprintf(stream, "size -1 1 {\n");
216
+ fprintf(stream, "/xpos exch def\n");
217
+ fprintf(stream, "1 eq {\n");
218
+ fprintf(stream, "newpath\n");
219
+ fprintf(stream, "xpos ypos moveto\n");
220
+ fprintf(stream, "0 -1 rlineto\n");
221
+ fprintf(stream, "-1 0 rlineto\n");
222
+ fprintf(stream, "0 1 rlineto\n");
223
+ fprintf(stream, "closepath\n");
224
+ fprintf(stream, "fill\n");
225
+ fprintf(stream, "} if\n");
226
+ fprintf(stream, "} for\n");
227
+ fprintf(stream, "} for\n");
228
+ fprintf(stream, "grestore\n");
229
+
230
+ fclose(stream);
231
+
232
+ return(0);
233
+ }
@@ -0,0 +1,37 @@
1
+ #ifndef _QR_DRAW_PS_
2
+ #define _QR_DRAW_PS_
3
+
4
+ #include <time.h>
5
+ #include <sys/types.h>
6
+ #include <sys/stat.h>
7
+ #include <stdlib.h>
8
+ #include <stdio.h>
9
+ #include "qr_draw.h"
10
+
11
+ #ifdef USE_TIFF
12
+ #include "qr_draw_tiff.h"
13
+ #endif
14
+
15
+ //=============================================================================
16
+ // QRDrawPS �N���X
17
+ //=============================================================================
18
+ class QRDrawPS : public QRDraw
19
+ {
20
+ private:
21
+ unsigned int tsize;
22
+
23
+ private:
24
+ int write(unsigned char data[MAX_MODULESIZE][MAX_MODULESIZE], char *mode); //normal ps
25
+ int write2(unsigned char data[MAX_MODULESIZE][MAX_MODULESIZE]); //preview ps
26
+ void write_header(FILE *stream);
27
+ int write_preview(FILE *stream, unsigned char data[MAX_MODULESIZE][MAX_MODULESIZE]);
28
+ void littleEndian(int data, unsigned char *lt);
29
+
30
+ public:
31
+ QRDrawPS(){}
32
+ ~QRDrawPS(){}
33
+ int draw(char *filename, int modulesize, int symbolsize,
34
+ unsigned char data[MAX_MODULESIZE][MAX_MODULESIZE], void *opt);
35
+ };
36
+
37
+ #endif
@@ -0,0 +1,108 @@
1
+ #include "qr_draw_tiff.h"
2
+
3
+ //=============================================================================
4
+ // QRDrawPNG::draw
5
+ //=============================================================================
6
+ int QRDrawTIFF::draw(char *filename, int modulesize, int symbolsize,
7
+ unsigned char data[MAX_MODULESIZE][MAX_MODULESIZE], void *opt)
8
+ {
9
+ #ifdef USE_TIFF
10
+ if(!filename) return(1);
11
+ setup(filename, modulesize, symbolsize);
12
+ if( this->raster(data) )return(1);
13
+ if( this->write() ) return(1);
14
+
15
+ return(0);
16
+ #else
17
+ return(1);
18
+ #endif
19
+ }
20
+
21
+ //=================================================================================
22
+ // QRDrawTIFF::raster
23
+ //=================================================================================
24
+ int QRDrawTIFF::raster(unsigned char data[MAX_MODULESIZE][MAX_MODULESIZE])
25
+ {
26
+ #ifdef USE_TIFF
27
+ int bitw = (int)ceil(this->rsize/8) + 1;
28
+
29
+ /* ���ۂɃf�[�^��u���̈���m�� */
30
+ bit_image = (unsigned char **)malloc(sizeof(unsigned char *) * this->rsize);
31
+ for(int i=0; i<this->rsize; i++){
32
+ bit_image[i] = (unsigned char *)malloc(bitw);
33
+ memset(bit_image[i], 0, bitw);
34
+ }
35
+
36
+ for(int i=0; i<this->ssize; i++){
37
+ int dp = MARGIN_SIZE*this->msize / 8; //�������̃o�C�g�ʒu
38
+ int sht =(MARGIN_SIZE*this->msize % 8) ? 3 : 7; //�r�b�g�V�t�g
39
+ unsigned char c = 0; //1�o�C�g�̍\����ۑ�
40
+
41
+ for(int j=0; j<this->ssize; j++){
42
+ /* 1�s������ */
43
+ for(int k=0; k<this->msize; k++){
44
+ c += (data[j][i] << sht);
45
+ sht--;
46
+
47
+ bit_image[(i+MARGIN_SIZE)*this->msize][ dp ] = c;
48
+
49
+ if(sht < 0){
50
+ sht = 7;
51
+ c = 0;
52
+ dp++;
53
+ }
54
+ }
55
+ }
56
+ /* ���W���[���T�C�Y���c�����ɑ��₷ */
57
+ for(int k=1; k<this->msize; k++){
58
+ memcpy(bit_image[(i+MARGIN_SIZE)*this->msize+k], bit_image[(i+MARGIN_SIZE)*this->msize], bitw);
59
+ }
60
+ }
61
+
62
+ return(0);
63
+ #else
64
+ return(1);
65
+ #endif
66
+ }
67
+
68
+ //=================================================================================
69
+ // QRDrawTIFF::write_png
70
+ //=================================================================================
71
+ int QRDrawTIFF::write()
72
+ {
73
+ #ifdef USE_TIFF
74
+ TIFF *tiff;
75
+ int i;
76
+
77
+ /* Open the TIFF file */
78
+ if( (tiff=TIFFOpen(this->filename, "w")) == NULL ) return(1);
79
+
80
+ /* �^�O */
81
+ TIFFSetField(tiff, TIFFTAG_IMAGEWIDTH, this->rsize); /* ��(�s�N�Z����) */
82
+ TIFFSetField(tiff, TIFFTAG_IMAGELENGTH, this->rsize); /* ��(�X�L�������C����) */
83
+ TIFFSetField(tiff, TIFFTAG_COMPRESSION, COMPRESSION_NONE); /* ���k���[�h */
84
+ TIFFSetField(tiff, TIFFTAG_BITSPERSAMPLE, 1); /* �s�N�Z���̐[�� */
85
+ TIFFSetField(tiff, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISWHITE); /* �J���[�^�C�v */
86
+ TIFFSetField(tiff, TIFFTAG_SAMPLESPERPIXEL, 1); /* �J���[�v���[���� */
87
+ TIFFSetField(tiff, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); /* �X�L�������� */
88
+ TIFFSetField(tiff, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); /* ? */
89
+ TIFFSetField(tiff, TIFFTAG_XRESOLUTION, 72.0); /* �𑜓x */
90
+ TIFFSetField(tiff, TIFFTAG_YRESOLUTION, 72.0); /* �𑜓x */
91
+ TIFFSetField(tiff, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH); /* �𑜓x�̒P��(RESUNIT_INCH:�C���`) */
92
+ TIFFSetField(tiff, TIFFTAG_ROWSPERSTRIP, this->rsize); /* 1�X�g���b�v�ɉ��s�i�[����邩 */
93
+
94
+ /* 1�s���������� */
95
+ for(i=0 ; i<this->rsize ; i++){
96
+ if( TIFFWriteScanline(tiff, bit_image[i], i, 0) < 0 ){
97
+ TIFFClose(tiff);
98
+ return(1);
99
+ }
100
+ }
101
+
102
+ TIFFClose(tiff);
103
+
104
+ return(0);
105
+ #else
106
+ return(1);
107
+ #endif
108
+ }
@@ -0,0 +1,29 @@
1
+ #ifndef _QR_DRAW_TIFF_
2
+ #define _QR_DRAW_TIFF_
3
+
4
+ #include <stdlib.h>
5
+ #include <string.h>
6
+ #include <math.h>
7
+ #include "qr_draw.h"
8
+
9
+ #ifdef USE_TIFF
10
+ #include <tiffio.h>
11
+ #endif
12
+
13
+ //=============================================================================
14
+ // QRDrawTIFF �N���X
15
+ //=============================================================================
16
+ class QRDrawTIFF : public QRDraw
17
+ {
18
+ private:
19
+ int raster(unsigned char data[MAX_MODULESIZE][MAX_MODULESIZE]);
20
+ int write();
21
+
22
+ public:
23
+ QRDrawTIFF(){}
24
+ ~QRDrawTIFF(){}
25
+ int draw(char *filename, int modulesize, int symbolsize,
26
+ unsigned char data[MAX_MODULESIZE][MAX_MODULESIZE], void *opt);
27
+ };
28
+
29
+ #endif
@@ -0,0 +1,3973 @@
1
+ /* ----------------------------------------------------------------------------
2
+ * This file was automatically generated by SWIG (http://www.swig.org).
3
+ * Version 1.3.29
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)
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)
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 "2"
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
+ /*
832
+ * Need to be very careful about how these macros are defined, especially
833
+ * when compiling C++ code or C code with an ANSI C compiler.
834
+ *
835
+ * VALUEFUNC(f) is a macro used to typecast a C function that implements
836
+ * a Ruby method so that it can be passed as an argument to API functions
837
+ * like rb_define_method() and rb_define_singleton_method().
838
+ *
839
+ * VOIDFUNC(f) is a macro used to typecast a C function that implements
840
+ * either the "mark" or "free" stuff for a Ruby Data object, so that it
841
+ * can be passed as an argument to API functions like Data_Wrap_Struct()
842
+ * and Data_Make_Struct().
843
+ */
844
+
845
+ #ifdef __cplusplus
846
+ # ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
847
+ # define PROTECTFUNC(f) ((VALUE (*)()) f)
848
+ # define VALUEFUNC(f) ((VALUE (*)()) f)
849
+ # define VOIDFUNC(f) ((void (*)()) f)
850
+ # else
851
+ # ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
852
+ # define PROTECTFUNC(f) ((VALUE (*)()) f)
853
+ # define VALUEFUNC(f) ((VALUE (*)()) f)
854
+ # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
855
+ # else /* These definitions should work for Ruby 1.7+ */
856
+ # define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
857
+ # define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
858
+ # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
859
+ # endif
860
+ # endif
861
+ #else
862
+ # define VALUEFUNC(f) (f)
863
+ # define VOIDFUNC(f) (f)
864
+ #endif
865
+
866
+ /* Don't use for expressions have side effect */
867
+ #ifndef RB_STRING_VALUE
868
+ #define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s)))
869
+ #endif
870
+ #ifndef StringValue
871
+ #define StringValue(s) RB_STRING_VALUE(s)
872
+ #endif
873
+ #ifndef StringValuePtr
874
+ #define StringValuePtr(s) RSTRING(RB_STRING_VALUE(s))->ptr
875
+ #endif
876
+ #ifndef StringValueLen
877
+ #define StringValueLen(s) RSTRING(RB_STRING_VALUE(s))->len
878
+ #endif
879
+ #ifndef SafeStringValue
880
+ #define SafeStringValue(v) do {\
881
+ StringValue(v);\
882
+ rb_check_safe_str(v);\
883
+ } while (0)
884
+ #endif
885
+
886
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
887
+ #define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1)
888
+ #define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
889
+ #endif
890
+
891
+
892
+ /* -----------------------------------------------------------------------------
893
+ * error manipulation
894
+ * ----------------------------------------------------------------------------- */
895
+
896
+
897
+ /* Define some additional error types */
898
+ #define SWIG_ObjectPreviouslyDeletedError -100
899
+
900
+
901
+ /* Define custom exceptions for errors that do not map to existing Ruby
902
+ exceptions. Note this only works for C++ since a global cannot be
903
+ initialized by a funtion in C. For C, fallback to rb_eRuntimeError.*/
904
+
905
+ SWIGINTERN VALUE
906
+ getNullReferenceError(void) {
907
+ static int init = 0;
908
+ static VALUE rb_eNullReferenceError ;
909
+ if (!init) {
910
+ init = 1;
911
+ rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError);
912
+ }
913
+ return rb_eNullReferenceError;
914
+ }
915
+
916
+ SWIGINTERN VALUE
917
+ getObjectPreviouslyDeletedError(void) {
918
+ static int init = 0;
919
+ static VALUE rb_eObjectPreviouslyDeleted ;
920
+ if (!init) {
921
+ init = 1;
922
+ rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError);
923
+ }
924
+ return rb_eObjectPreviouslyDeleted;
925
+ }
926
+
927
+
928
+ SWIGINTERN VALUE
929
+ SWIG_Ruby_ErrorType(int SWIG_code) {
930
+ VALUE type;
931
+ switch (SWIG_code) {
932
+ case SWIG_MemoryError:
933
+ type = rb_eNoMemError;
934
+ break;
935
+ case SWIG_IOError:
936
+ type = rb_eIOError;
937
+ break;
938
+ case SWIG_RuntimeError:
939
+ type = rb_eRuntimeError;
940
+ break;
941
+ case SWIG_IndexError:
942
+ type = rb_eIndexError;
943
+ break;
944
+ case SWIG_TypeError:
945
+ type = rb_eTypeError;
946
+ break;
947
+ case SWIG_DivisionByZero:
948
+ type = rb_eZeroDivError;
949
+ break;
950
+ case SWIG_OverflowError:
951
+ type = rb_eRangeError;
952
+ break;
953
+ case SWIG_SyntaxError:
954
+ type = rb_eSyntaxError;
955
+ break;
956
+ case SWIG_ValueError:
957
+ type = rb_eArgError;
958
+ break;
959
+ case SWIG_SystemError:
960
+ type = rb_eFatal;
961
+ break;
962
+ case SWIG_AttributeError:
963
+ type = rb_eRuntimeError;
964
+ break;
965
+ case SWIG_NullReferenceError:
966
+ type = getNullReferenceError();
967
+ break;
968
+ case SWIG_ObjectPreviouslyDeletedError:
969
+ type = getObjectPreviouslyDeletedError();
970
+ break;
971
+ case SWIG_UnknownError:
972
+ type = rb_eRuntimeError;
973
+ break;
974
+ default:
975
+ type = rb_eRuntimeError;
976
+ }
977
+ return type;
978
+ }
979
+
980
+
981
+
982
+
983
+ /* -----------------------------------------------------------------------------
984
+ * See the LICENSE file for information on copyright, usage and redistribution
985
+ * of SWIG, and the README file for authors - http://www.swig.org/release.html.
986
+ *
987
+ * rubytracking.swg
988
+ *
989
+ * This file contains support for tracking mappings from
990
+ * Ruby objects to C++ objects. This functionality is needed
991
+ * to implement mark functions for Ruby's mark and sweep
992
+ * garbage collector.
993
+ * ----------------------------------------------------------------------------- */
994
+
995
+ #ifdef __cplusplus
996
+ extern "C" {
997
+ #endif
998
+
999
+
1000
+ /* Global Ruby hash table to store Trackings from C/C++
1001
+ structs to Ruby Objects. */
1002
+ static VALUE swig_ruby_trackings;
1003
+
1004
+ /* Global variable that stores a reference to the ruby
1005
+ hash table delete function. */
1006
+ static ID swig_ruby_hash_delete = 0;
1007
+
1008
+ /* Setup a Ruby hash table to store Trackings */
1009
+ SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
1010
+ /* Create a ruby hash table to store Trackings from C++
1011
+ objects to Ruby objects. Also make sure to tell
1012
+ the garabage collector about the hash table. */
1013
+ swig_ruby_trackings = rb_hash_new();
1014
+ rb_gc_register_address(&swig_ruby_trackings);
1015
+
1016
+ /* Now store a reference to the hash table delete function
1017
+ so that we only have to look it up once.*/
1018
+ swig_ruby_hash_delete = rb_intern("delete");
1019
+ }
1020
+
1021
+ /* Get a Ruby number to reference a pointer */
1022
+ SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) {
1023
+ /* We cast the pointer to an unsigned long
1024
+ and then store a reference to it using
1025
+ a Ruby number object. */
1026
+
1027
+ /* Convert the pointer to a Ruby number */
1028
+ unsigned long value = (unsigned long) ptr;
1029
+ return LONG2NUM(value);
1030
+ }
1031
+
1032
+ /* Get a Ruby number to reference an object */
1033
+ SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) {
1034
+ /* We cast the object to an unsigned long
1035
+ and then store a reference to it using
1036
+ a Ruby number object. */
1037
+
1038
+ /* Convert the Object to a Ruby number */
1039
+ unsigned long value = (unsigned long) object;
1040
+ return LONG2NUM(value);
1041
+ }
1042
+
1043
+ /* Get a Ruby object from a previously stored reference */
1044
+ SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) {
1045
+ /* The provided Ruby number object is a reference
1046
+ to the Ruby object we want.*/
1047
+
1048
+ /* First convert the Ruby number to a C number */
1049
+ unsigned long value = NUM2LONG(reference);
1050
+ return (VALUE) value;
1051
+ }
1052
+
1053
+ /* Add a Tracking from a C/C++ struct to a Ruby object */
1054
+ SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) {
1055
+ /* In a Ruby hash table we store the pointer and
1056
+ the associated Ruby object. The trick here is
1057
+ that we cannot store the Ruby object directly - if
1058
+ we do then it cannot be garbage collected. So
1059
+ instead we typecast it as a unsigned long and
1060
+ convert it to a Ruby number object.*/
1061
+
1062
+ /* Get a reference to the pointer as a Ruby number */
1063
+ VALUE key = SWIG_RubyPtrToReference(ptr);
1064
+
1065
+ /* Get a reference to the Ruby object as a Ruby number */
1066
+ VALUE value = SWIG_RubyObjectToReference(object);
1067
+
1068
+ /* Store the mapping to the global hash table. */
1069
+ rb_hash_aset(swig_ruby_trackings, key, value);
1070
+ }
1071
+
1072
+ /* Get the Ruby object that owns the specified C/C++ struct */
1073
+ SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
1074
+ /* Get a reference to the pointer as a Ruby number */
1075
+ VALUE key = SWIG_RubyPtrToReference(ptr);
1076
+
1077
+ /* Now lookup the value stored in the global hash table */
1078
+ VALUE value = rb_hash_aref(swig_ruby_trackings, key);
1079
+
1080
+ if (value == Qnil) {
1081
+ /* No object exists - return nil. */
1082
+ return Qnil;
1083
+ }
1084
+ else {
1085
+ /* Convert this value to Ruby object */
1086
+ return SWIG_RubyReferenceToObject(value);
1087
+ }
1088
+ }
1089
+
1090
+ /* Remove a Tracking from a C/C++ struct to a Ruby object. It
1091
+ is very important to remove objects once they are destroyed
1092
+ since the same memory address may be reused later to create
1093
+ a new object. */
1094
+ SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
1095
+ /* Get a reference to the pointer as a Ruby number */
1096
+ VALUE key = SWIG_RubyPtrToReference(ptr);
1097
+
1098
+ /* Delete the object from the hash table by calling Ruby's
1099
+ do this we need to call the Hash.delete method.*/
1100
+ rb_funcall(swig_ruby_trackings, swig_ruby_hash_delete, 1, key);
1101
+ }
1102
+
1103
+ /* This is a helper method that unlinks a Ruby object from its
1104
+ underlying C++ object. This is needed if the lifetime of the
1105
+ Ruby object is longer than the C++ object */
1106
+ SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
1107
+ VALUE object = SWIG_RubyInstanceFor(ptr);
1108
+
1109
+ if (object != Qnil) {
1110
+ DATA_PTR(object) = 0;
1111
+ }
1112
+ }
1113
+
1114
+
1115
+ #ifdef __cplusplus
1116
+ }
1117
+ #endif
1118
+
1119
+ /* -----------------------------------------------------------------------------
1120
+ * Ruby API portion that goes into the runtime
1121
+ * ----------------------------------------------------------------------------- */
1122
+
1123
+ #ifdef __cplusplus
1124
+ extern "C" {
1125
+ #endif
1126
+
1127
+ SWIGINTERN VALUE
1128
+ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
1129
+ if (NIL_P(target)) {
1130
+ target = o;
1131
+ } else {
1132
+ if (TYPE(target) != T_ARRAY) {
1133
+ VALUE o2 = target;
1134
+ target = rb_ary_new();
1135
+ rb_ary_push(target, o2);
1136
+ }
1137
+ rb_ary_push(target, o);
1138
+ }
1139
+ return target;
1140
+ }
1141
+
1142
+ #ifdef __cplusplus
1143
+ }
1144
+ #endif
1145
+
1146
+
1147
+ /* -----------------------------------------------------------------------------
1148
+ * See the LICENSE file for information on copyright, usage and redistribution
1149
+ * of SWIG, and the README file for authors - http://www.swig.org/release.html.
1150
+ *
1151
+ * rubyrun.swg
1152
+ *
1153
+ * This file contains the runtime support for Ruby modules
1154
+ * and includes code for managing global variables and pointer
1155
+ * type checking.
1156
+ * ----------------------------------------------------------------------------- */
1157
+
1158
+ /* For backward compatibility only */
1159
+ #define SWIG_POINTER_EXCEPTION 0
1160
+
1161
+ /* for raw pointers */
1162
+ #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1163
+ #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1164
+ #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags)
1165
+ #define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own)
1166
+ #define swig_owntype ruby_owntype
1167
+
1168
+ /* for raw packed data */
1169
+ #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
1170
+ #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type)
1171
+
1172
+ /* for class or struct pointers */
1173
+ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1174
+ #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1175
+
1176
+ /* for C or C++ function pointers */
1177
+ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0)
1178
+ #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0)
1179
+
1180
+ /* for C++ member pointers, ie, member methods */
1181
+ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty)
1182
+ #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type)
1183
+
1184
+
1185
+ /* Runtime API */
1186
+
1187
+ #define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule()
1188
+ #define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer)
1189
+
1190
+
1191
+ /* Error manipulation */
1192
+
1193
+ #define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code)
1194
+ #define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), msg)
1195
+ #define SWIG_fail goto fail
1196
+
1197
+
1198
+ /* Ruby-specific SWIG API */
1199
+
1200
+ #define SWIG_InitRuntime() SWIG_Ruby_InitRuntime()
1201
+ #define SWIG_define_class(ty) SWIG_Ruby_define_class(ty)
1202
+ #define SWIG_NewClassInstance(value, ty) SWIG_Ruby_NewClassInstance(value, ty)
1203
+ #define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value)
1204
+ #define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty)
1205
+
1206
+
1207
+ /* -----------------------------------------------------------------------------
1208
+ * pointers/data manipulation
1209
+ * ----------------------------------------------------------------------------- */
1210
+
1211
+ #ifdef __cplusplus
1212
+ extern "C" {
1213
+ #if 0
1214
+ } /* cc-mode */
1215
+ #endif
1216
+ #endif
1217
+
1218
+ typedef struct {
1219
+ VALUE klass;
1220
+ VALUE mImpl;
1221
+ void (*mark)(void *);
1222
+ void (*destroy)(void *);
1223
+ int trackObjects;
1224
+ } swig_class;
1225
+
1226
+
1227
+ static VALUE _mSWIG = Qnil;
1228
+ static VALUE _cSWIG_Pointer = Qnil;
1229
+ static VALUE swig_runtime_data_type_pointer = Qnil;
1230
+
1231
+ SWIGRUNTIME VALUE
1232
+ getExceptionClass(void) {
1233
+ static int init = 0;
1234
+ static VALUE rubyExceptionClass ;
1235
+ if (!init) {
1236
+ init = 1;
1237
+ rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception"));
1238
+ }
1239
+ return rubyExceptionClass;
1240
+ }
1241
+
1242
+ /* This code checks to see if the Ruby object being raised as part
1243
+ of an exception inherits from the Ruby class Exception. If so,
1244
+ the object is simply returned. If not, then a new Ruby exception
1245
+ object is created and that will be returned to Ruby.*/
1246
+ SWIGRUNTIME VALUE
1247
+ SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) {
1248
+ VALUE exceptionClass = getExceptionClass();
1249
+ if (rb_obj_is_kind_of(obj, exceptionClass)) {
1250
+ return obj;
1251
+ } else {
1252
+ return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj));
1253
+ }
1254
+ }
1255
+
1256
+ /* Initialize Ruby runtime support */
1257
+ SWIGRUNTIME void
1258
+ SWIG_Ruby_InitRuntime(void)
1259
+ {
1260
+ if (_mSWIG == Qnil) {
1261
+ _mSWIG = rb_define_module("SWIG");
1262
+ }
1263
+ }
1264
+
1265
+ /* Define Ruby class for C type */
1266
+ SWIGRUNTIME void
1267
+ SWIG_Ruby_define_class(swig_type_info *type)
1268
+ {
1269
+ VALUE klass;
1270
+ char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1271
+ sprintf(klass_name, "TYPE%s", type->name);
1272
+ if (NIL_P(_cSWIG_Pointer)) {
1273
+ _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
1274
+ rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
1275
+ }
1276
+ klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
1277
+ free((void *) klass_name);
1278
+ }
1279
+
1280
+ /* Create a new pointer object */
1281
+ SWIGRUNTIME VALUE
1282
+ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1283
+ {
1284
+ int own = flags & SWIG_POINTER_OWN;
1285
+
1286
+ char *klass_name;
1287
+ swig_class *sklass;
1288
+ VALUE klass;
1289
+ VALUE obj;
1290
+
1291
+ if (!ptr)
1292
+ return Qnil;
1293
+
1294
+ if (type->clientdata) {
1295
+ sklass = (swig_class *) type->clientdata;
1296
+
1297
+ /* Are we tracking this class and have we already returned this Ruby object? */
1298
+ if (sklass->trackObjects) {
1299
+ obj = SWIG_RubyInstanceFor(ptr);
1300
+
1301
+ /* Check the object's type and make sure it has the correct type.
1302
+ It might not in cases where methods do things like
1303
+ downcast methods. */
1304
+ if (obj != Qnil) {
1305
+ VALUE value = rb_iv_get(obj, "__swigtype__");
1306
+ char* type_name = RSTRING(value)->ptr;
1307
+
1308
+ if (strcmp(type->name, type_name) == 0) {
1309
+ return obj;
1310
+ }
1311
+ }
1312
+ }
1313
+
1314
+ /* Create a new Ruby object */
1315
+ obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), (own ? VOIDFUNC(sklass->destroy) : 0), ptr);
1316
+
1317
+ /* If tracking is on for this class then track this object. */
1318
+ if (sklass->trackObjects) {
1319
+ SWIG_RubyAddTracking(ptr, obj);
1320
+ }
1321
+ } else {
1322
+ klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1323
+ sprintf(klass_name, "TYPE%s", type->name);
1324
+ klass = rb_const_get(_mSWIG, rb_intern(klass_name));
1325
+ free((void *) klass_name);
1326
+ obj = Data_Wrap_Struct(klass, 0, 0, ptr);
1327
+ }
1328
+ rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
1329
+
1330
+ return obj;
1331
+ }
1332
+
1333
+ /* Create a new class instance (always owned) */
1334
+ SWIGRUNTIME VALUE
1335
+ SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
1336
+ {
1337
+ VALUE obj;
1338
+ swig_class *sklass = (swig_class *) type->clientdata;
1339
+ obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
1340
+ rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
1341
+ return obj;
1342
+ }
1343
+
1344
+ /* Get type mangle from class name */
1345
+ SWIGRUNTIMEINLINE char *
1346
+ SWIG_Ruby_MangleStr(VALUE obj)
1347
+ {
1348
+ VALUE stype = rb_iv_get(obj, "__swigtype__");
1349
+ return StringValuePtr(stype);
1350
+ }
1351
+
1352
+ /* Acquire a pointer value */
1353
+ typedef void (*ruby_owntype)(void*);
1354
+
1355
+ SWIGRUNTIME ruby_owntype
1356
+ SWIG_Ruby_AcquirePtr(VALUE obj, ruby_owntype own) {
1357
+ if (obj) {
1358
+ ruby_owntype oldown = RDATA(obj)->dfree;
1359
+ RDATA(obj)->dfree = own;
1360
+ return oldown;
1361
+ } else {
1362
+ return 0;
1363
+ }
1364
+ }
1365
+
1366
+ /* Convert a pointer value */
1367
+ SWIGRUNTIME int
1368
+ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, ruby_owntype *own)
1369
+ {
1370
+ char *c;
1371
+ swig_cast_info *tc;
1372
+ void *vptr = 0;
1373
+
1374
+ /* Grab the pointer */
1375
+ if (NIL_P(obj)) {
1376
+ *ptr = 0;
1377
+ return SWIG_OK;
1378
+ } else {
1379
+ if (TYPE(obj) != T_DATA) {
1380
+ return SWIG_ERROR;
1381
+ }
1382
+ Data_Get_Struct(obj, void, vptr);
1383
+ }
1384
+
1385
+ if (own) *own = RDATA(obj)->dfree;
1386
+
1387
+ /* Check to see if the input object is giving up ownership
1388
+ of the underlying C struct or C++ object. If so then we
1389
+ need to reset the destructor since the Ruby object no
1390
+ longer owns the underlying C++ object.*/
1391
+ if (flags & SWIG_POINTER_DISOWN) {
1392
+ /* Is tracking on for this class? */
1393
+ int track = 0;
1394
+ if (ty && ty->clientdata) {
1395
+ swig_class *sklass = (swig_class *) ty->clientdata;
1396
+ track = sklass->trackObjects;
1397
+ }
1398
+
1399
+ if (track) {
1400
+ /* We are tracking objects for this class. Thus we change the destructor
1401
+ * to SWIG_RubyRemoveTracking. This allows us to
1402
+ * remove the mapping from the C++ to Ruby object
1403
+ * when the Ruby object is garbage collected. If we don't
1404
+ * do this, then it is possible we will return a reference
1405
+ * to a Ruby object that no longer exists thereby crashing Ruby. */
1406
+ RDATA(obj)->dfree = SWIG_RubyRemoveTracking;
1407
+ } else {
1408
+ RDATA(obj)->dfree = 0;
1409
+ }
1410
+ }
1411
+
1412
+ /* Do type-checking if type info was provided */
1413
+ if (ty) {
1414
+ if (ty->clientdata) {
1415
+ if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) {
1416
+ if (vptr == 0) {
1417
+ /* The object has already been deleted */
1418
+ return SWIG_ObjectPreviouslyDeletedError;
1419
+ }
1420
+ *ptr = vptr;
1421
+ return SWIG_OK;
1422
+ }
1423
+ }
1424
+ if ((c = SWIG_MangleStr(obj)) == NULL) {
1425
+ return SWIG_ERROR;
1426
+ }
1427
+ tc = SWIG_TypeCheck(c, ty);
1428
+ if (!tc) {
1429
+ return SWIG_ERROR;
1430
+ }
1431
+ *ptr = SWIG_TypeCast(tc, vptr);
1432
+ } else {
1433
+ *ptr = vptr;
1434
+ }
1435
+
1436
+ return SWIG_OK;
1437
+ }
1438
+
1439
+ /* Check convert */
1440
+ SWIGRUNTIMEINLINE int
1441
+ SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
1442
+ {
1443
+ char *c = SWIG_MangleStr(obj);
1444
+ if (!c) return 0;
1445
+ return SWIG_TypeCheck(c,ty) != 0;
1446
+ }
1447
+
1448
+ SWIGRUNTIME VALUE
1449
+ SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
1450
+ char result[1024];
1451
+ char *r = result;
1452
+ if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
1453
+ *(r++) = '_';
1454
+ r = SWIG_PackData(r, ptr, sz);
1455
+ strcpy(r, type->name);
1456
+ return rb_str_new2(result);
1457
+ }
1458
+
1459
+ /* Convert a packed value value */
1460
+ SWIGRUNTIME int
1461
+ SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
1462
+ swig_cast_info *tc;
1463
+ const char *c;
1464
+
1465
+ if (TYPE(obj) != T_STRING) goto type_error;
1466
+ c = StringValuePtr(obj);
1467
+ /* Pointer values must start with leading underscore */
1468
+ if (*c != '_') goto type_error;
1469
+ c++;
1470
+ c = SWIG_UnpackData(c, ptr, sz);
1471
+ if (ty) {
1472
+ tc = SWIG_TypeCheck(c, ty);
1473
+ if (!tc) goto type_error;
1474
+ }
1475
+ return SWIG_OK;
1476
+
1477
+ type_error:
1478
+ return SWIG_ERROR;
1479
+ }
1480
+
1481
+ SWIGRUNTIME swig_module_info *
1482
+ SWIG_Ruby_GetModule(void)
1483
+ {
1484
+ VALUE pointer;
1485
+ swig_module_info *ret = 0;
1486
+ VALUE verbose = rb_gv_get("VERBOSE");
1487
+
1488
+ /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */
1489
+ rb_gv_set("VERBOSE", Qfalse);
1490
+
1491
+ /* first check if pointer already created */
1492
+ pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1493
+ if (pointer != Qnil) {
1494
+ Data_Get_Struct(pointer, swig_module_info, ret);
1495
+ }
1496
+
1497
+ /* reinstate warnings */
1498
+ rb_gv_set("VERBOSE", verbose);
1499
+ return ret;
1500
+ }
1501
+
1502
+ SWIGRUNTIME void
1503
+ SWIG_Ruby_SetModule(swig_module_info *pointer)
1504
+ {
1505
+ /* register a new class */
1506
+ VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
1507
+ /* create and store the structure pointer to a global variable */
1508
+ swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
1509
+ rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
1510
+ }
1511
+
1512
+ #ifdef __cplusplus
1513
+ #if 0
1514
+ { /* cc-mode */
1515
+ #endif
1516
+ }
1517
+ #endif
1518
+
1519
+
1520
+
1521
+ #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1522
+
1523
+ #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1524
+
1525
+
1526
+
1527
+ /* -------- TYPES TABLE (BEGIN) -------- */
1528
+
1529
+ #define SWIGTYPE_p_CQR_Encode swig_types[0]
1530
+ #define SWIGTYPE_p_QRDraw swig_types[1]
1531
+ #define SWIGTYPE_p_QRDrawJPEG swig_types[2]
1532
+ #define SWIGTYPE_p_QRDrawPNG swig_types[3]
1533
+ #define SWIGTYPE_p_QRDrawPS swig_types[4]
1534
+ #define SWIGTYPE_p_QRDrawTIFF swig_types[5]
1535
+ #define SWIGTYPE_p_a_177__unsigned_char swig_types[6]
1536
+ #define SWIGTYPE_p_bool swig_types[7]
1537
+ #define SWIGTYPE_p_char swig_types[8]
1538
+ #define SWIGTYPE_p_int swig_types[9]
1539
+ #define SWIGTYPE_p_tagQR_VERSIONINFO swig_types[10]
1540
+ #define SWIGTYPE_p_tagRS_BLOCKINFO swig_types[11]
1541
+ #define SWIGTYPE_p_unsigned_char swig_types[12]
1542
+ #define SWIGTYPE_p_unsigned_short swig_types[13]
1543
+ static swig_type_info *swig_types[15];
1544
+ static swig_module_info swig_module = {swig_types, 14, 0, 0, 0, 0};
1545
+ #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1546
+ #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1547
+
1548
+ /* -------- TYPES TABLE (END) -------- */
1549
+
1550
+ #define SWIG_init Init_QR
1551
+ #define SWIG_name "QR"
1552
+
1553
+ static VALUE mQR;
1554
+
1555
+ #define SWIGVERSION 0x010329
1556
+
1557
+
1558
+ #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
1559
+ #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
1560
+
1561
+
1562
+ #include <stdexcept>
1563
+
1564
+
1565
+ #include "win2ansi.h"
1566
+ #include "QR_Encode.h"
1567
+ #include "qr_draw.h"
1568
+ #include "qr_draw_jpeg.h"
1569
+ #include "qr_draw_png.h"
1570
+ #include "qr_draw_ps.h"
1571
+ #include "qr_draw_tiff.h"
1572
+
1573
+
1574
+ #include <limits.h>
1575
+ #ifndef LLONG_MIN
1576
+ # define LLONG_MIN LONG_LONG_MIN
1577
+ #endif
1578
+ #ifndef LLONG_MAX
1579
+ # define LLONG_MAX LONG_LONG_MAX
1580
+ #endif
1581
+ #ifndef ULLONG_MAX
1582
+ # define ULLONG_MAX ULONG_LONG_MAX
1583
+ #endif
1584
+
1585
+
1586
+ #define SWIG_From_long LONG2NUM
1587
+
1588
+
1589
+ SWIGINTERNINLINE VALUE
1590
+ SWIG_From_int (int value)
1591
+ {
1592
+ return SWIG_From_long (value);
1593
+ }
1594
+
1595
+
1596
+ SWIGINTERN swig_type_info*
1597
+ SWIG_pchar_descriptor()
1598
+ {
1599
+ static int init = 0;
1600
+ static swig_type_info* info = 0;
1601
+ if (!init) {
1602
+ info = SWIG_TypeQuery("_p_char");
1603
+ init = 1;
1604
+ }
1605
+ return info;
1606
+ }
1607
+
1608
+
1609
+ SWIGINTERN int
1610
+ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
1611
+ {
1612
+ if (TYPE(obj) == T_STRING) {
1613
+
1614
+
1615
+
1616
+ char *cstr = STR2CSTR(obj);
1617
+
1618
+ size_t size = RSTRING(obj)->len + 1;
1619
+ if (cptr) {
1620
+ if (alloc) {
1621
+ if (*alloc == SWIG_NEWOBJ) {
1622
+ *cptr = reinterpret_cast< char* >(memcpy((new char[size]), cstr, sizeof(char)*(size)));
1623
+ } else {
1624
+ *cptr = cstr;
1625
+ *alloc = SWIG_OLDOBJ;
1626
+ }
1627
+ }
1628
+ }
1629
+ if (psize) *psize = size;
1630
+ return SWIG_OK;
1631
+ } else {
1632
+ swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
1633
+ if (pchar_descriptor) {
1634
+ void* vptr = 0;
1635
+ if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
1636
+ if (cptr) *cptr = (char *)vptr;
1637
+ if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0;
1638
+ if (alloc) *alloc = SWIG_OLDOBJ;
1639
+ return SWIG_OK;
1640
+ }
1641
+ }
1642
+ }
1643
+ return SWIG_TypeError;
1644
+ }
1645
+
1646
+
1647
+
1648
+
1649
+
1650
+ SWIGINTERN VALUE
1651
+ SWIG_ruby_failed(void)
1652
+ {
1653
+ return Qnil;
1654
+ }
1655
+
1656
+
1657
+ /*@SWIG:%ruby_aux_method@*/
1658
+ SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
1659
+ {
1660
+ VALUE obj = args[0];
1661
+ VALUE type = TYPE(obj);
1662
+ long *res = (long *)(args[1]);
1663
+ *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj);
1664
+ return obj;
1665
+ }
1666
+ /*@SWIG@*/
1667
+
1668
+ SWIGINTERN int
1669
+ SWIG_AsVal_long (VALUE obj, long* val)
1670
+ {
1671
+ VALUE type = TYPE(obj);
1672
+ if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
1673
+ long v;
1674
+ VALUE a[2];
1675
+ a[0] = obj;
1676
+ a[1] = (VALUE)(&v);
1677
+ if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
1678
+ if (val) *val = v;
1679
+ return SWIG_OK;
1680
+ }
1681
+ }
1682
+ return SWIG_TypeError;
1683
+ }
1684
+
1685
+
1686
+ SWIGINTERN int
1687
+ SWIG_AsVal_int (VALUE obj, int *val)
1688
+ {
1689
+ long v;
1690
+ int res = SWIG_AsVal_long (obj, &v);
1691
+ if (SWIG_IsOK(res)) {
1692
+ if ((v < INT_MIN || v > INT_MAX)) {
1693
+ return SWIG_OverflowError;
1694
+ } else {
1695
+ if (val) *val = static_cast< int >(v);
1696
+ }
1697
+ }
1698
+ return res;
1699
+ }
1700
+
1701
+
1702
+ SWIGINTERN int
1703
+ SWIG_AsVal_bool (VALUE obj, bool *val)
1704
+ {
1705
+ if (obj == Qtrue) {
1706
+ if (val) *val = true;
1707
+ return SWIG_OK;
1708
+ } else if (obj == Qfalse) {
1709
+ if (val) *val = false;
1710
+ return SWIG_OK;
1711
+ } else {
1712
+ int res = 0;
1713
+ if (SWIG_AsVal_int (obj, &res) == SWIG_OK) {
1714
+ if (val) *val = res ? true : false;
1715
+ return SWIG_OK;
1716
+ }
1717
+ }
1718
+ return SWIG_TypeError;
1719
+ }
1720
+
1721
+
1722
+ SWIGINTERNINLINE VALUE
1723
+ SWIG_From_bool (bool value)
1724
+ {
1725
+ return value ? Qtrue : Qfalse;
1726
+ }
1727
+
1728
+ swig_class cQRDraw;
1729
+
1730
+ SWIGINTERN void
1731
+ free_QRDraw(QRDraw *arg1) {
1732
+ delete arg1;
1733
+ }
1734
+
1735
+ SWIGINTERN VALUE
1736
+ _wrap_QRDraw_setup(int argc, VALUE *argv, VALUE self) {
1737
+ QRDraw *arg1 = (QRDraw *) 0 ;
1738
+ char *arg2 = (char *) 0 ;
1739
+ int arg3 ;
1740
+ int arg4 ;
1741
+ void *argp1 = 0 ;
1742
+ int res1 = 0 ;
1743
+ int res2 ;
1744
+ char *buf2 = 0 ;
1745
+ int alloc2 = 0 ;
1746
+ int val3 ;
1747
+ int ecode3 = 0 ;
1748
+ int val4 ;
1749
+ int ecode4 = 0 ;
1750
+
1751
+ if ((argc < 3) || (argc > 3)) {
1752
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
1753
+ }
1754
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_QRDraw, 0 | 0 );
1755
+ if (!SWIG_IsOK(res1)) {
1756
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setup" "', argument " "1"" of type '" "QRDraw *""'");
1757
+ }
1758
+ arg1 = reinterpret_cast< QRDraw * >(argp1);
1759
+ res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
1760
+ if (!SWIG_IsOK(res2)) {
1761
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setup" "', argument " "2"" of type '" "char *""'");
1762
+ }
1763
+ arg2 = buf2;
1764
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
1765
+ if (!SWIG_IsOK(ecode3)) {
1766
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "setup" "', argument " "3"" of type '" "int""'");
1767
+ }
1768
+ arg3 = static_cast< int >(val3);
1769
+ ecode4 = SWIG_AsVal_int(argv[2], &val4);
1770
+ if (!SWIG_IsOK(ecode4)) {
1771
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "setup" "', argument " "4"" of type '" "int""'");
1772
+ }
1773
+ arg4 = static_cast< int >(val4);
1774
+ (arg1)->setup(arg2,arg3,arg4);
1775
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
1776
+ return Qnil;
1777
+ fail:
1778
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
1779
+ return Qnil;
1780
+ }
1781
+
1782
+
1783
+ SWIGINTERN VALUE
1784
+ _wrap_QRDraw_draw(int argc, VALUE *argv, VALUE self) {
1785
+ QRDraw *arg1 = (QRDraw *) 0 ;
1786
+ char *arg2 = (char *) 0 ;
1787
+ int arg3 ;
1788
+ int arg4 ;
1789
+ unsigned char (*arg5)[177] ;
1790
+ void *arg6 = (void *) 0 ;
1791
+ int result;
1792
+ void *argp1 = 0 ;
1793
+ int res1 = 0 ;
1794
+ int res2 ;
1795
+ char *buf2 = 0 ;
1796
+ int alloc2 = 0 ;
1797
+ int val3 ;
1798
+ int ecode3 = 0 ;
1799
+ int val4 ;
1800
+ int ecode4 = 0 ;
1801
+ void *argp5 = 0 ;
1802
+ int res5 = 0 ;
1803
+ int res6 ;
1804
+ VALUE vresult = Qnil;
1805
+
1806
+ if ((argc < 5) || (argc > 5)) {
1807
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
1808
+ }
1809
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_QRDraw, 0 | 0 );
1810
+ if (!SWIG_IsOK(res1)) {
1811
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "draw" "', argument " "1"" of type '" "QRDraw *""'");
1812
+ }
1813
+ arg1 = reinterpret_cast< QRDraw * >(argp1);
1814
+ res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
1815
+ if (!SWIG_IsOK(res2)) {
1816
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "draw" "', argument " "2"" of type '" "char *""'");
1817
+ }
1818
+ arg2 = buf2;
1819
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
1820
+ if (!SWIG_IsOK(ecode3)) {
1821
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "draw" "', argument " "3"" of type '" "int""'");
1822
+ }
1823
+ arg3 = static_cast< int >(val3);
1824
+ ecode4 = SWIG_AsVal_int(argv[2], &val4);
1825
+ if (!SWIG_IsOK(ecode4)) {
1826
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "draw" "', argument " "4"" of type '" "int""'");
1827
+ }
1828
+ arg4 = static_cast< int >(val4);
1829
+ res5 = SWIG_ConvertPtr(argv[3], &argp5,SWIGTYPE_p_a_177__unsigned_char, 0 | 0 );
1830
+ if (!SWIG_IsOK(res5)) {
1831
+ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "draw" "', argument " "5"" of type '" "unsigned char [177][177]""'");
1832
+ }
1833
+ arg5 = reinterpret_cast< unsigned char (*)[177] >(argp5);
1834
+ res6 = SWIG_ConvertPtr(argv[4],SWIG_as_voidptrptr(&arg6), 0, 0);
1835
+ if (!SWIG_IsOK(res6)) {
1836
+ SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "draw" "', argument " "6"" of type '" "void *""'");
1837
+ }
1838
+ result = (int)(arg1)->draw(arg2,arg3,arg4,(unsigned char (*)[177])arg5,arg6);
1839
+ vresult = SWIG_From_int(static_cast< int >(result));
1840
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
1841
+ return vresult;
1842
+ fail:
1843
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
1844
+ return Qnil;
1845
+ }
1846
+
1847
+
1848
+ SWIGINTERN VALUE
1849
+ _wrap_QRDraw_close(int argc, VALUE *argv, VALUE self) {
1850
+ QRDraw *arg1 = (QRDraw *) 0 ;
1851
+ void *argp1 = 0 ;
1852
+ int res1 = 0 ;
1853
+
1854
+ if ((argc < 0) || (argc > 0)) {
1855
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
1856
+ }
1857
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_QRDraw, 0 | 0 );
1858
+ if (!SWIG_IsOK(res1)) {
1859
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "close" "', argument " "1"" of type '" "QRDraw *""'");
1860
+ }
1861
+ arg1 = reinterpret_cast< QRDraw * >(argp1);
1862
+ (arg1)->close();
1863
+ return Qnil;
1864
+ fail:
1865
+ return Qnil;
1866
+ }
1867
+
1868
+
1869
+ swig_class cQRDrawJPEG;
1870
+
1871
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
1872
+ SWIGINTERN VALUE
1873
+ _wrap_QRDrawJPEG_allocate(VALUE self) {
1874
+ #else
1875
+ SWIGINTERN VALUE
1876
+ _wrap_QRDrawJPEG_allocate(int argc, VALUE *argv, VALUE self) {
1877
+ #endif
1878
+
1879
+
1880
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_QRDrawJPEG);
1881
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
1882
+ rb_obj_call_init(vresult, argc, argv);
1883
+ #endif
1884
+ return vresult;
1885
+ }
1886
+
1887
+
1888
+ SWIGINTERN VALUE
1889
+ _wrap_new_QRDrawJPEG(int argc, VALUE *argv, VALUE self) {
1890
+ QRDrawJPEG *result = 0 ;
1891
+
1892
+ if ((argc < 0) || (argc > 0)) {
1893
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
1894
+ }
1895
+ result = (QRDrawJPEG *)new QRDrawJPEG();DATA_PTR(self) = result;
1896
+
1897
+ return self;
1898
+ fail:
1899
+ return Qnil;
1900
+ }
1901
+
1902
+
1903
+ SWIGINTERN void
1904
+ free_QRDrawJPEG(QRDrawJPEG *arg1) {
1905
+ delete arg1;
1906
+ }
1907
+
1908
+ SWIGINTERN VALUE
1909
+ _wrap_QRDrawJPEG_draw(int argc, VALUE *argv, VALUE self) {
1910
+ QRDrawJPEG *arg1 = (QRDrawJPEG *) 0 ;
1911
+ char *arg2 = (char *) 0 ;
1912
+ int arg3 ;
1913
+ int arg4 ;
1914
+ unsigned char (*arg5)[177] ;
1915
+ void *arg6 = (void *) 0 ;
1916
+ int result;
1917
+ void *argp1 = 0 ;
1918
+ int res1 = 0 ;
1919
+ int res2 ;
1920
+ char *buf2 = 0 ;
1921
+ int alloc2 = 0 ;
1922
+ int val3 ;
1923
+ int ecode3 = 0 ;
1924
+ int val4 ;
1925
+ int ecode4 = 0 ;
1926
+ void *argp5 = 0 ;
1927
+ int res5 = 0 ;
1928
+ int res6 ;
1929
+ VALUE vresult = Qnil;
1930
+
1931
+ if ((argc < 5) || (argc > 5)) {
1932
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
1933
+ }
1934
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_QRDrawJPEG, 0 | 0 );
1935
+ if (!SWIG_IsOK(res1)) {
1936
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "draw" "', argument " "1"" of type '" "QRDrawJPEG *""'");
1937
+ }
1938
+ arg1 = reinterpret_cast< QRDrawJPEG * >(argp1);
1939
+ res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
1940
+ if (!SWIG_IsOK(res2)) {
1941
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "draw" "', argument " "2"" of type '" "char *""'");
1942
+ }
1943
+ arg2 = buf2;
1944
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
1945
+ if (!SWIG_IsOK(ecode3)) {
1946
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "draw" "', argument " "3"" of type '" "int""'");
1947
+ }
1948
+ arg3 = static_cast< int >(val3);
1949
+ ecode4 = SWIG_AsVal_int(argv[2], &val4);
1950
+ if (!SWIG_IsOK(ecode4)) {
1951
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "draw" "', argument " "4"" of type '" "int""'");
1952
+ }
1953
+ arg4 = static_cast< int >(val4);
1954
+ res5 = SWIG_ConvertPtr(argv[3], &argp5,SWIGTYPE_p_a_177__unsigned_char, 0 | 0 );
1955
+ if (!SWIG_IsOK(res5)) {
1956
+ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "draw" "', argument " "5"" of type '" "unsigned char [177][177]""'");
1957
+ }
1958
+ arg5 = reinterpret_cast< unsigned char (*)[177] >(argp5);
1959
+ res6 = SWIG_ConvertPtr(argv[4],SWIG_as_voidptrptr(&arg6), 0, 0);
1960
+ if (!SWIG_IsOK(res6)) {
1961
+ SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "draw" "', argument " "6"" of type '" "void *""'");
1962
+ }
1963
+ result = (int)(arg1)->draw(arg2,arg3,arg4,(unsigned char (*)[177])arg5,arg6);
1964
+ vresult = SWIG_From_int(static_cast< int >(result));
1965
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
1966
+ return vresult;
1967
+ fail:
1968
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
1969
+ return Qnil;
1970
+ }
1971
+
1972
+
1973
+ swig_class cQRDrawPNG;
1974
+
1975
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
1976
+ SWIGINTERN VALUE
1977
+ _wrap_QRDrawPNG_allocate(VALUE self) {
1978
+ #else
1979
+ SWIGINTERN VALUE
1980
+ _wrap_QRDrawPNG_allocate(int argc, VALUE *argv, VALUE self) {
1981
+ #endif
1982
+
1983
+
1984
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_QRDrawPNG);
1985
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
1986
+ rb_obj_call_init(vresult, argc, argv);
1987
+ #endif
1988
+ return vresult;
1989
+ }
1990
+
1991
+
1992
+ SWIGINTERN VALUE
1993
+ _wrap_new_QRDrawPNG(int argc, VALUE *argv, VALUE self) {
1994
+ QRDrawPNG *result = 0 ;
1995
+
1996
+ if ((argc < 0) || (argc > 0)) {
1997
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
1998
+ }
1999
+ result = (QRDrawPNG *)new QRDrawPNG();DATA_PTR(self) = result;
2000
+
2001
+ return self;
2002
+ fail:
2003
+ return Qnil;
2004
+ }
2005
+
2006
+
2007
+ SWIGINTERN void
2008
+ free_QRDrawPNG(QRDrawPNG *arg1) {
2009
+ delete arg1;
2010
+ }
2011
+
2012
+ SWIGINTERN VALUE
2013
+ _wrap_QRDrawPNG_draw(int argc, VALUE *argv, VALUE self) {
2014
+ QRDrawPNG *arg1 = (QRDrawPNG *) 0 ;
2015
+ char *arg2 = (char *) 0 ;
2016
+ int arg3 ;
2017
+ int arg4 ;
2018
+ unsigned char (*arg5)[177] ;
2019
+ void *arg6 = (void *) 0 ;
2020
+ int result;
2021
+ void *argp1 = 0 ;
2022
+ int res1 = 0 ;
2023
+ int res2 ;
2024
+ char *buf2 = 0 ;
2025
+ int alloc2 = 0 ;
2026
+ int val3 ;
2027
+ int ecode3 = 0 ;
2028
+ int val4 ;
2029
+ int ecode4 = 0 ;
2030
+ void *argp5 = 0 ;
2031
+ int res5 = 0 ;
2032
+ int res6 ;
2033
+ VALUE vresult = Qnil;
2034
+
2035
+ if ((argc < 5) || (argc > 5)) {
2036
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
2037
+ }
2038
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_QRDrawPNG, 0 | 0 );
2039
+ if (!SWIG_IsOK(res1)) {
2040
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "draw" "', argument " "1"" of type '" "QRDrawPNG *""'");
2041
+ }
2042
+ arg1 = reinterpret_cast< QRDrawPNG * >(argp1);
2043
+ res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
2044
+ if (!SWIG_IsOK(res2)) {
2045
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "draw" "', argument " "2"" of type '" "char *""'");
2046
+ }
2047
+ arg2 = buf2;
2048
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
2049
+ if (!SWIG_IsOK(ecode3)) {
2050
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "draw" "', argument " "3"" of type '" "int""'");
2051
+ }
2052
+ arg3 = static_cast< int >(val3);
2053
+ ecode4 = SWIG_AsVal_int(argv[2], &val4);
2054
+ if (!SWIG_IsOK(ecode4)) {
2055
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "draw" "', argument " "4"" of type '" "int""'");
2056
+ }
2057
+ arg4 = static_cast< int >(val4);
2058
+ res5 = SWIG_ConvertPtr(argv[3], &argp5,SWIGTYPE_p_a_177__unsigned_char, 0 | 0 );
2059
+ if (!SWIG_IsOK(res5)) {
2060
+ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "draw" "', argument " "5"" of type '" "unsigned char [177][177]""'");
2061
+ }
2062
+ arg5 = reinterpret_cast< unsigned char (*)[177] >(argp5);
2063
+ res6 = SWIG_ConvertPtr(argv[4],SWIG_as_voidptrptr(&arg6), 0, 0);
2064
+ if (!SWIG_IsOK(res6)) {
2065
+ SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "draw" "', argument " "6"" of type '" "void *""'");
2066
+ }
2067
+ result = (int)(arg1)->draw(arg2,arg3,arg4,(unsigned char (*)[177])arg5,arg6);
2068
+ vresult = SWIG_From_int(static_cast< int >(result));
2069
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
2070
+ return vresult;
2071
+ fail:
2072
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
2073
+ return Qnil;
2074
+ }
2075
+
2076
+
2077
+ swig_class cQRDrawPS;
2078
+
2079
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2080
+ SWIGINTERN VALUE
2081
+ _wrap_QRDrawPS_allocate(VALUE self) {
2082
+ #else
2083
+ SWIGINTERN VALUE
2084
+ _wrap_QRDrawPS_allocate(int argc, VALUE *argv, VALUE self) {
2085
+ #endif
2086
+
2087
+
2088
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_QRDrawPS);
2089
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2090
+ rb_obj_call_init(vresult, argc, argv);
2091
+ #endif
2092
+ return vresult;
2093
+ }
2094
+
2095
+
2096
+ SWIGINTERN VALUE
2097
+ _wrap_new_QRDrawPS(int argc, VALUE *argv, VALUE self) {
2098
+ QRDrawPS *result = 0 ;
2099
+
2100
+ if ((argc < 0) || (argc > 0)) {
2101
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2102
+ }
2103
+ result = (QRDrawPS *)new QRDrawPS();DATA_PTR(self) = result;
2104
+
2105
+ return self;
2106
+ fail:
2107
+ return Qnil;
2108
+ }
2109
+
2110
+
2111
+ SWIGINTERN void
2112
+ free_QRDrawPS(QRDrawPS *arg1) {
2113
+ delete arg1;
2114
+ }
2115
+
2116
+ SWIGINTERN VALUE
2117
+ _wrap_QRDrawPS_draw(int argc, VALUE *argv, VALUE self) {
2118
+ QRDrawPS *arg1 = (QRDrawPS *) 0 ;
2119
+ char *arg2 = (char *) 0 ;
2120
+ int arg3 ;
2121
+ int arg4 ;
2122
+ unsigned char (*arg5)[177] ;
2123
+ void *arg6 = (void *) 0 ;
2124
+ int result;
2125
+ void *argp1 = 0 ;
2126
+ int res1 = 0 ;
2127
+ int res2 ;
2128
+ char *buf2 = 0 ;
2129
+ int alloc2 = 0 ;
2130
+ int val3 ;
2131
+ int ecode3 = 0 ;
2132
+ int val4 ;
2133
+ int ecode4 = 0 ;
2134
+ void *argp5 = 0 ;
2135
+ int res5 = 0 ;
2136
+ int res6 ;
2137
+ VALUE vresult = Qnil;
2138
+
2139
+ if ((argc < 5) || (argc > 5)) {
2140
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
2141
+ }
2142
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_QRDrawPS, 0 | 0 );
2143
+ if (!SWIG_IsOK(res1)) {
2144
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "draw" "', argument " "1"" of type '" "QRDrawPS *""'");
2145
+ }
2146
+ arg1 = reinterpret_cast< QRDrawPS * >(argp1);
2147
+ res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
2148
+ if (!SWIG_IsOK(res2)) {
2149
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "draw" "', argument " "2"" of type '" "char *""'");
2150
+ }
2151
+ arg2 = buf2;
2152
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
2153
+ if (!SWIG_IsOK(ecode3)) {
2154
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "draw" "', argument " "3"" of type '" "int""'");
2155
+ }
2156
+ arg3 = static_cast< int >(val3);
2157
+ ecode4 = SWIG_AsVal_int(argv[2], &val4);
2158
+ if (!SWIG_IsOK(ecode4)) {
2159
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "draw" "', argument " "4"" of type '" "int""'");
2160
+ }
2161
+ arg4 = static_cast< int >(val4);
2162
+ res5 = SWIG_ConvertPtr(argv[3], &argp5,SWIGTYPE_p_a_177__unsigned_char, 0 | 0 );
2163
+ if (!SWIG_IsOK(res5)) {
2164
+ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "draw" "', argument " "5"" of type '" "unsigned char [177][177]""'");
2165
+ }
2166
+ arg5 = reinterpret_cast< unsigned char (*)[177] >(argp5);
2167
+ res6 = SWIG_ConvertPtr(argv[4],SWIG_as_voidptrptr(&arg6), 0, 0);
2168
+ if (!SWIG_IsOK(res6)) {
2169
+ SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "draw" "', argument " "6"" of type '" "void *""'");
2170
+ }
2171
+ result = (int)(arg1)->draw(arg2,arg3,arg4,(unsigned char (*)[177])arg5,arg6);
2172
+ vresult = SWIG_From_int(static_cast< int >(result));
2173
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
2174
+ return vresult;
2175
+ fail:
2176
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
2177
+ return Qnil;
2178
+ }
2179
+
2180
+
2181
+ swig_class cQRDrawTIFF;
2182
+
2183
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2184
+ SWIGINTERN VALUE
2185
+ _wrap_QRDrawTIFF_allocate(VALUE self) {
2186
+ #else
2187
+ SWIGINTERN VALUE
2188
+ _wrap_QRDrawTIFF_allocate(int argc, VALUE *argv, VALUE self) {
2189
+ #endif
2190
+
2191
+
2192
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_QRDrawTIFF);
2193
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2194
+ rb_obj_call_init(vresult, argc, argv);
2195
+ #endif
2196
+ return vresult;
2197
+ }
2198
+
2199
+
2200
+ SWIGINTERN VALUE
2201
+ _wrap_new_QRDrawTIFF(int argc, VALUE *argv, VALUE self) {
2202
+ QRDrawTIFF *result = 0 ;
2203
+
2204
+ if ((argc < 0) || (argc > 0)) {
2205
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2206
+ }
2207
+ result = (QRDrawTIFF *)new QRDrawTIFF();DATA_PTR(self) = result;
2208
+
2209
+ return self;
2210
+ fail:
2211
+ return Qnil;
2212
+ }
2213
+
2214
+
2215
+ SWIGINTERN void
2216
+ free_QRDrawTIFF(QRDrawTIFF *arg1) {
2217
+ delete arg1;
2218
+ }
2219
+
2220
+ SWIGINTERN VALUE
2221
+ _wrap_QRDrawTIFF_draw(int argc, VALUE *argv, VALUE self) {
2222
+ QRDrawTIFF *arg1 = (QRDrawTIFF *) 0 ;
2223
+ char *arg2 = (char *) 0 ;
2224
+ int arg3 ;
2225
+ int arg4 ;
2226
+ unsigned char (*arg5)[177] ;
2227
+ void *arg6 = (void *) 0 ;
2228
+ int result;
2229
+ void *argp1 = 0 ;
2230
+ int res1 = 0 ;
2231
+ int res2 ;
2232
+ char *buf2 = 0 ;
2233
+ int alloc2 = 0 ;
2234
+ int val3 ;
2235
+ int ecode3 = 0 ;
2236
+ int val4 ;
2237
+ int ecode4 = 0 ;
2238
+ void *argp5 = 0 ;
2239
+ int res5 = 0 ;
2240
+ int res6 ;
2241
+ VALUE vresult = Qnil;
2242
+
2243
+ if ((argc < 5) || (argc > 5)) {
2244
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
2245
+ }
2246
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_QRDrawTIFF, 0 | 0 );
2247
+ if (!SWIG_IsOK(res1)) {
2248
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "draw" "', argument " "1"" of type '" "QRDrawTIFF *""'");
2249
+ }
2250
+ arg1 = reinterpret_cast< QRDrawTIFF * >(argp1);
2251
+ res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
2252
+ if (!SWIG_IsOK(res2)) {
2253
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "draw" "', argument " "2"" of type '" "char *""'");
2254
+ }
2255
+ arg2 = buf2;
2256
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
2257
+ if (!SWIG_IsOK(ecode3)) {
2258
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "draw" "', argument " "3"" of type '" "int""'");
2259
+ }
2260
+ arg3 = static_cast< int >(val3);
2261
+ ecode4 = SWIG_AsVal_int(argv[2], &val4);
2262
+ if (!SWIG_IsOK(ecode4)) {
2263
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "draw" "', argument " "4"" of type '" "int""'");
2264
+ }
2265
+ arg4 = static_cast< int >(val4);
2266
+ res5 = SWIG_ConvertPtr(argv[3], &argp5,SWIGTYPE_p_a_177__unsigned_char, 0 | 0 );
2267
+ if (!SWIG_IsOK(res5)) {
2268
+ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "draw" "', argument " "5"" of type '" "unsigned char [177][177]""'");
2269
+ }
2270
+ arg5 = reinterpret_cast< unsigned char (*)[177] >(argp5);
2271
+ res6 = SWIG_ConvertPtr(argv[4],SWIG_as_voidptrptr(&arg6), 0, 0);
2272
+ if (!SWIG_IsOK(res6)) {
2273
+ SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "draw" "', argument " "6"" of type '" "void *""'");
2274
+ }
2275
+ result = (int)(arg1)->draw(arg2,arg3,arg4,(unsigned char (*)[177])arg5,arg6);
2276
+ vresult = SWIG_From_int(static_cast< int >(result));
2277
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
2278
+ return vresult;
2279
+ fail:
2280
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
2281
+ return Qnil;
2282
+ }
2283
+
2284
+
2285
+ swig_class cRS_BLOCKINFO;
2286
+
2287
+ SWIGINTERN VALUE
2288
+ _wrap_RS_BLOCKINFO_ncRSBlock_set(int argc, VALUE *argv, VALUE self) {
2289
+ RS_BLOCKINFO *arg1 = (RS_BLOCKINFO *) 0 ;
2290
+ int arg2 ;
2291
+ void *argp1 = 0 ;
2292
+ int res1 = 0 ;
2293
+ int val2 ;
2294
+ int ecode2 = 0 ;
2295
+
2296
+ if ((argc < 1) || (argc > 1)) {
2297
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2298
+ }
2299
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagRS_BLOCKINFO, 0 | 0 );
2300
+ if (!SWIG_IsOK(res1)) {
2301
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncRSBlock" "', argument " "1"" of type '" "RS_BLOCKINFO *""'");
2302
+ }
2303
+ arg1 = reinterpret_cast< RS_BLOCKINFO * >(argp1);
2304
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
2305
+ if (!SWIG_IsOK(ecode2)) {
2306
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ncRSBlock" "', argument " "2"" of type '" "int""'");
2307
+ }
2308
+ arg2 = static_cast< int >(val2);
2309
+ if (arg1) (arg1)->ncRSBlock = arg2;
2310
+
2311
+ return Qnil;
2312
+ fail:
2313
+ return Qnil;
2314
+ }
2315
+
2316
+
2317
+ SWIGINTERN VALUE
2318
+ _wrap_RS_BLOCKINFO_ncRSBlock_get(int argc, VALUE *argv, VALUE self) {
2319
+ RS_BLOCKINFO *arg1 = (RS_BLOCKINFO *) 0 ;
2320
+ int result;
2321
+ void *argp1 = 0 ;
2322
+ int res1 = 0 ;
2323
+ VALUE vresult = Qnil;
2324
+
2325
+ if ((argc < 0) || (argc > 0)) {
2326
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2327
+ }
2328
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagRS_BLOCKINFO, 0 | 0 );
2329
+ if (!SWIG_IsOK(res1)) {
2330
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncRSBlock" "', argument " "1"" of type '" "RS_BLOCKINFO *""'");
2331
+ }
2332
+ arg1 = reinterpret_cast< RS_BLOCKINFO * >(argp1);
2333
+ result = (int) ((arg1)->ncRSBlock);
2334
+ vresult = SWIG_From_int(static_cast< int >(result));
2335
+ return vresult;
2336
+ fail:
2337
+ return Qnil;
2338
+ }
2339
+
2340
+
2341
+ SWIGINTERN VALUE
2342
+ _wrap_RS_BLOCKINFO_ncAllCodeWord_set(int argc, VALUE *argv, VALUE self) {
2343
+ RS_BLOCKINFO *arg1 = (RS_BLOCKINFO *) 0 ;
2344
+ int arg2 ;
2345
+ void *argp1 = 0 ;
2346
+ int res1 = 0 ;
2347
+ int val2 ;
2348
+ int ecode2 = 0 ;
2349
+
2350
+ if ((argc < 1) || (argc > 1)) {
2351
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2352
+ }
2353
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagRS_BLOCKINFO, 0 | 0 );
2354
+ if (!SWIG_IsOK(res1)) {
2355
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncAllCodeWord" "', argument " "1"" of type '" "RS_BLOCKINFO *""'");
2356
+ }
2357
+ arg1 = reinterpret_cast< RS_BLOCKINFO * >(argp1);
2358
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
2359
+ if (!SWIG_IsOK(ecode2)) {
2360
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ncAllCodeWord" "', argument " "2"" of type '" "int""'");
2361
+ }
2362
+ arg2 = static_cast< int >(val2);
2363
+ if (arg1) (arg1)->ncAllCodeWord = arg2;
2364
+
2365
+ return Qnil;
2366
+ fail:
2367
+ return Qnil;
2368
+ }
2369
+
2370
+
2371
+ SWIGINTERN VALUE
2372
+ _wrap_RS_BLOCKINFO_ncAllCodeWord_get(int argc, VALUE *argv, VALUE self) {
2373
+ RS_BLOCKINFO *arg1 = (RS_BLOCKINFO *) 0 ;
2374
+ int result;
2375
+ void *argp1 = 0 ;
2376
+ int res1 = 0 ;
2377
+ VALUE vresult = Qnil;
2378
+
2379
+ if ((argc < 0) || (argc > 0)) {
2380
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2381
+ }
2382
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagRS_BLOCKINFO, 0 | 0 );
2383
+ if (!SWIG_IsOK(res1)) {
2384
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncAllCodeWord" "', argument " "1"" of type '" "RS_BLOCKINFO *""'");
2385
+ }
2386
+ arg1 = reinterpret_cast< RS_BLOCKINFO * >(argp1);
2387
+ result = (int) ((arg1)->ncAllCodeWord);
2388
+ vresult = SWIG_From_int(static_cast< int >(result));
2389
+ return vresult;
2390
+ fail:
2391
+ return Qnil;
2392
+ }
2393
+
2394
+
2395
+ SWIGINTERN VALUE
2396
+ _wrap_RS_BLOCKINFO_ncDataCodeWord_set(int argc, VALUE *argv, VALUE self) {
2397
+ RS_BLOCKINFO *arg1 = (RS_BLOCKINFO *) 0 ;
2398
+ int arg2 ;
2399
+ void *argp1 = 0 ;
2400
+ int res1 = 0 ;
2401
+ int val2 ;
2402
+ int ecode2 = 0 ;
2403
+
2404
+ if ((argc < 1) || (argc > 1)) {
2405
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2406
+ }
2407
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagRS_BLOCKINFO, 0 | 0 );
2408
+ if (!SWIG_IsOK(res1)) {
2409
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncDataCodeWord" "', argument " "1"" of type '" "RS_BLOCKINFO *""'");
2410
+ }
2411
+ arg1 = reinterpret_cast< RS_BLOCKINFO * >(argp1);
2412
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
2413
+ if (!SWIG_IsOK(ecode2)) {
2414
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ncDataCodeWord" "', argument " "2"" of type '" "int""'");
2415
+ }
2416
+ arg2 = static_cast< int >(val2);
2417
+ if (arg1) (arg1)->ncDataCodeWord = arg2;
2418
+
2419
+ return Qnil;
2420
+ fail:
2421
+ return Qnil;
2422
+ }
2423
+
2424
+
2425
+ SWIGINTERN VALUE
2426
+ _wrap_RS_BLOCKINFO_ncDataCodeWord_get(int argc, VALUE *argv, VALUE self) {
2427
+ RS_BLOCKINFO *arg1 = (RS_BLOCKINFO *) 0 ;
2428
+ int result;
2429
+ void *argp1 = 0 ;
2430
+ int res1 = 0 ;
2431
+ VALUE vresult = Qnil;
2432
+
2433
+ if ((argc < 0) || (argc > 0)) {
2434
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2435
+ }
2436
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagRS_BLOCKINFO, 0 | 0 );
2437
+ if (!SWIG_IsOK(res1)) {
2438
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncDataCodeWord" "', argument " "1"" of type '" "RS_BLOCKINFO *""'");
2439
+ }
2440
+ arg1 = reinterpret_cast< RS_BLOCKINFO * >(argp1);
2441
+ result = (int) ((arg1)->ncDataCodeWord);
2442
+ vresult = SWIG_From_int(static_cast< int >(result));
2443
+ return vresult;
2444
+ fail:
2445
+ return Qnil;
2446
+ }
2447
+
2448
+
2449
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2450
+ SWIGINTERN VALUE
2451
+ _wrap_RS_BLOCKINFO_allocate(VALUE self) {
2452
+ #else
2453
+ SWIGINTERN VALUE
2454
+ _wrap_RS_BLOCKINFO_allocate(int argc, VALUE *argv, VALUE self) {
2455
+ #endif
2456
+
2457
+
2458
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_tagRS_BLOCKINFO);
2459
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2460
+ rb_obj_call_init(vresult, argc, argv);
2461
+ #endif
2462
+ return vresult;
2463
+ }
2464
+
2465
+
2466
+ SWIGINTERN VALUE
2467
+ _wrap_new_RS_BLOCKINFO(int argc, VALUE *argv, VALUE self) {
2468
+ RS_BLOCKINFO *result = 0 ;
2469
+
2470
+ if ((argc < 0) || (argc > 0)) {
2471
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2472
+ }
2473
+ result = (RS_BLOCKINFO *)new RS_BLOCKINFO();DATA_PTR(self) = result;
2474
+
2475
+ return self;
2476
+ fail:
2477
+ return Qnil;
2478
+ }
2479
+
2480
+
2481
+ SWIGINTERN void
2482
+ free_RS_BLOCKINFO(RS_BLOCKINFO *arg1) {
2483
+ delete arg1;
2484
+ }
2485
+
2486
+ swig_class cQR_VERSIONINFO;
2487
+
2488
+ SWIGINTERN VALUE
2489
+ _wrap_QR_VERSIONINFO_nVersionNo_set(int argc, VALUE *argv, VALUE self) {
2490
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2491
+ int arg2 ;
2492
+ void *argp1 = 0 ;
2493
+ int res1 = 0 ;
2494
+ int val2 ;
2495
+ int ecode2 = 0 ;
2496
+
2497
+ if ((argc < 1) || (argc > 1)) {
2498
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2499
+ }
2500
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2501
+ if (!SWIG_IsOK(res1)) {
2502
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nVersionNo" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2503
+ }
2504
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2505
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
2506
+ if (!SWIG_IsOK(ecode2)) {
2507
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "nVersionNo" "', argument " "2"" of type '" "int""'");
2508
+ }
2509
+ arg2 = static_cast< int >(val2);
2510
+ if (arg1) (arg1)->nVersionNo = arg2;
2511
+
2512
+ return Qnil;
2513
+ fail:
2514
+ return Qnil;
2515
+ }
2516
+
2517
+
2518
+ SWIGINTERN VALUE
2519
+ _wrap_QR_VERSIONINFO_nVersionNo_get(int argc, VALUE *argv, VALUE self) {
2520
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2521
+ int result;
2522
+ void *argp1 = 0 ;
2523
+ int res1 = 0 ;
2524
+ VALUE vresult = Qnil;
2525
+
2526
+ if ((argc < 0) || (argc > 0)) {
2527
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2528
+ }
2529
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2530
+ if (!SWIG_IsOK(res1)) {
2531
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nVersionNo" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2532
+ }
2533
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2534
+ result = (int) ((arg1)->nVersionNo);
2535
+ vresult = SWIG_From_int(static_cast< int >(result));
2536
+ return vresult;
2537
+ fail:
2538
+ return Qnil;
2539
+ }
2540
+
2541
+
2542
+ SWIGINTERN VALUE
2543
+ _wrap_QR_VERSIONINFO_ncAllCodeWord_set(int argc, VALUE *argv, VALUE self) {
2544
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2545
+ int arg2 ;
2546
+ void *argp1 = 0 ;
2547
+ int res1 = 0 ;
2548
+ int val2 ;
2549
+ int ecode2 = 0 ;
2550
+
2551
+ if ((argc < 1) || (argc > 1)) {
2552
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2553
+ }
2554
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2555
+ if (!SWIG_IsOK(res1)) {
2556
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncAllCodeWord" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2557
+ }
2558
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2559
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
2560
+ if (!SWIG_IsOK(ecode2)) {
2561
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ncAllCodeWord" "', argument " "2"" of type '" "int""'");
2562
+ }
2563
+ arg2 = static_cast< int >(val2);
2564
+ if (arg1) (arg1)->ncAllCodeWord = arg2;
2565
+
2566
+ return Qnil;
2567
+ fail:
2568
+ return Qnil;
2569
+ }
2570
+
2571
+
2572
+ SWIGINTERN VALUE
2573
+ _wrap_QR_VERSIONINFO_ncAllCodeWord_get(int argc, VALUE *argv, VALUE self) {
2574
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2575
+ int result;
2576
+ void *argp1 = 0 ;
2577
+ int res1 = 0 ;
2578
+ VALUE vresult = Qnil;
2579
+
2580
+ if ((argc < 0) || (argc > 0)) {
2581
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2582
+ }
2583
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2584
+ if (!SWIG_IsOK(res1)) {
2585
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncAllCodeWord" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2586
+ }
2587
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2588
+ result = (int) ((arg1)->ncAllCodeWord);
2589
+ vresult = SWIG_From_int(static_cast< int >(result));
2590
+ return vresult;
2591
+ fail:
2592
+ return Qnil;
2593
+ }
2594
+
2595
+
2596
+ SWIGINTERN VALUE
2597
+ _wrap_QR_VERSIONINFO_ncDataCodeWord_set(int argc, VALUE *argv, VALUE self) {
2598
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2599
+ int *arg2 ;
2600
+ void *argp1 = 0 ;
2601
+ int res1 = 0 ;
2602
+ void *argp2 = 0 ;
2603
+ int res2 = 0 ;
2604
+
2605
+ if ((argc < 1) || (argc > 1)) {
2606
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2607
+ }
2608
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2609
+ if (!SWIG_IsOK(res1)) {
2610
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncDataCodeWord" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2611
+ }
2612
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2613
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_int, 0 | 0 );
2614
+ if (!SWIG_IsOK(res2)) {
2615
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ncDataCodeWord" "', argument " "2"" of type '" "int [4]""'");
2616
+ }
2617
+ arg2 = reinterpret_cast< int * >(argp2);
2618
+ {
2619
+ if (arg2) {
2620
+ size_t ii = 0;
2621
+ for (; ii < (size_t)4; ++ii) arg1->ncDataCodeWord[ii] = arg2[ii];
2622
+ } else {
2623
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""ncDataCodeWord""' of type '""int [4]""'");
2624
+ }
2625
+ }
2626
+ return Qnil;
2627
+ fail:
2628
+ return Qnil;
2629
+ }
2630
+
2631
+
2632
+ SWIGINTERN VALUE
2633
+ _wrap_QR_VERSIONINFO_ncDataCodeWord_get(int argc, VALUE *argv, VALUE self) {
2634
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2635
+ int *result = 0 ;
2636
+ void *argp1 = 0 ;
2637
+ int res1 = 0 ;
2638
+ VALUE vresult = Qnil;
2639
+
2640
+ if ((argc < 0) || (argc > 0)) {
2641
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2642
+ }
2643
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2644
+ if (!SWIG_IsOK(res1)) {
2645
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncDataCodeWord" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2646
+ }
2647
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2648
+ result = (int *)(int *) ((arg1)->ncDataCodeWord);
2649
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
2650
+ return vresult;
2651
+ fail:
2652
+ return Qnil;
2653
+ }
2654
+
2655
+
2656
+ SWIGINTERN VALUE
2657
+ _wrap_QR_VERSIONINFO_ncAlignPoint_set(int argc, VALUE *argv, VALUE self) {
2658
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2659
+ int arg2 ;
2660
+ void *argp1 = 0 ;
2661
+ int res1 = 0 ;
2662
+ int val2 ;
2663
+ int ecode2 = 0 ;
2664
+
2665
+ if ((argc < 1) || (argc > 1)) {
2666
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2667
+ }
2668
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2669
+ if (!SWIG_IsOK(res1)) {
2670
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncAlignPoint" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2671
+ }
2672
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2673
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
2674
+ if (!SWIG_IsOK(ecode2)) {
2675
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ncAlignPoint" "', argument " "2"" of type '" "int""'");
2676
+ }
2677
+ arg2 = static_cast< int >(val2);
2678
+ if (arg1) (arg1)->ncAlignPoint = arg2;
2679
+
2680
+ return Qnil;
2681
+ fail:
2682
+ return Qnil;
2683
+ }
2684
+
2685
+
2686
+ SWIGINTERN VALUE
2687
+ _wrap_QR_VERSIONINFO_ncAlignPoint_get(int argc, VALUE *argv, VALUE self) {
2688
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2689
+ int result;
2690
+ void *argp1 = 0 ;
2691
+ int res1 = 0 ;
2692
+ VALUE vresult = Qnil;
2693
+
2694
+ if ((argc < 0) || (argc > 0)) {
2695
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2696
+ }
2697
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2698
+ if (!SWIG_IsOK(res1)) {
2699
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ncAlignPoint" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2700
+ }
2701
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2702
+ result = (int) ((arg1)->ncAlignPoint);
2703
+ vresult = SWIG_From_int(static_cast< int >(result));
2704
+ return vresult;
2705
+ fail:
2706
+ return Qnil;
2707
+ }
2708
+
2709
+
2710
+ SWIGINTERN VALUE
2711
+ _wrap_QR_VERSIONINFO_nAlignPoint_set(int argc, VALUE *argv, VALUE self) {
2712
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2713
+ int *arg2 ;
2714
+ void *argp1 = 0 ;
2715
+ int res1 = 0 ;
2716
+ void *argp2 = 0 ;
2717
+ int res2 = 0 ;
2718
+
2719
+ if ((argc < 1) || (argc > 1)) {
2720
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2721
+ }
2722
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2723
+ if (!SWIG_IsOK(res1)) {
2724
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nAlignPoint" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2725
+ }
2726
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2727
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_int, 0 | 0 );
2728
+ if (!SWIG_IsOK(res2)) {
2729
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "nAlignPoint" "', argument " "2"" of type '" "int [6]""'");
2730
+ }
2731
+ arg2 = reinterpret_cast< int * >(argp2);
2732
+ {
2733
+ if (arg2) {
2734
+ size_t ii = 0;
2735
+ for (; ii < (size_t)6; ++ii) arg1->nAlignPoint[ii] = arg2[ii];
2736
+ } else {
2737
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""nAlignPoint""' of type '""int [6]""'");
2738
+ }
2739
+ }
2740
+ return Qnil;
2741
+ fail:
2742
+ return Qnil;
2743
+ }
2744
+
2745
+
2746
+ SWIGINTERN VALUE
2747
+ _wrap_QR_VERSIONINFO_nAlignPoint_get(int argc, VALUE *argv, VALUE self) {
2748
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2749
+ int *result = 0 ;
2750
+ void *argp1 = 0 ;
2751
+ int res1 = 0 ;
2752
+ VALUE vresult = Qnil;
2753
+
2754
+ if ((argc < 0) || (argc > 0)) {
2755
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2756
+ }
2757
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2758
+ if (!SWIG_IsOK(res1)) {
2759
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nAlignPoint" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2760
+ }
2761
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2762
+ result = (int *)(int *) ((arg1)->nAlignPoint);
2763
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
2764
+ return vresult;
2765
+ fail:
2766
+ return Qnil;
2767
+ }
2768
+
2769
+
2770
+ SWIGINTERN VALUE
2771
+ _wrap_QR_VERSIONINFO_RS_BlockInfo1_set(int argc, VALUE *argv, VALUE self) {
2772
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2773
+ RS_BLOCKINFO *arg2 ;
2774
+ void *argp1 = 0 ;
2775
+ int res1 = 0 ;
2776
+ void *argp2 = 0 ;
2777
+ int res2 = 0 ;
2778
+
2779
+ if ((argc < 1) || (argc > 1)) {
2780
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2781
+ }
2782
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2783
+ if (!SWIG_IsOK(res1)) {
2784
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RS_BlockInfo1" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2785
+ }
2786
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2787
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_tagRS_BLOCKINFO, 0 | 0 );
2788
+ if (!SWIG_IsOK(res2)) {
2789
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RS_BlockInfo1" "', argument " "2"" of type '" "RS_BLOCKINFO [4]""'");
2790
+ }
2791
+ arg2 = reinterpret_cast< RS_BLOCKINFO * >(argp2);
2792
+ {
2793
+ if (arg2) {
2794
+ size_t ii = 0;
2795
+ for (; ii < (size_t)4; ++ii) arg1->RS_BlockInfo1[ii] = arg2[ii];
2796
+ } else {
2797
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""RS_BlockInfo1""' of type '""RS_BLOCKINFO [4]""'");
2798
+ }
2799
+ }
2800
+ return Qnil;
2801
+ fail:
2802
+ return Qnil;
2803
+ }
2804
+
2805
+
2806
+ SWIGINTERN VALUE
2807
+ _wrap_QR_VERSIONINFO_RS_BlockInfo1_get(int argc, VALUE *argv, VALUE self) {
2808
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2809
+ RS_BLOCKINFO *result = 0 ;
2810
+ void *argp1 = 0 ;
2811
+ int res1 = 0 ;
2812
+ VALUE vresult = Qnil;
2813
+
2814
+ if ((argc < 0) || (argc > 0)) {
2815
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2816
+ }
2817
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2818
+ if (!SWIG_IsOK(res1)) {
2819
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RS_BlockInfo1" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2820
+ }
2821
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2822
+ result = (RS_BLOCKINFO *)(RS_BLOCKINFO *) ((arg1)->RS_BlockInfo1);
2823
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tagRS_BLOCKINFO, 0 | 0 );
2824
+ return vresult;
2825
+ fail:
2826
+ return Qnil;
2827
+ }
2828
+
2829
+
2830
+ SWIGINTERN VALUE
2831
+ _wrap_QR_VERSIONINFO_RS_BlockInfo2_set(int argc, VALUE *argv, VALUE self) {
2832
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2833
+ RS_BLOCKINFO *arg2 ;
2834
+ void *argp1 = 0 ;
2835
+ int res1 = 0 ;
2836
+ void *argp2 = 0 ;
2837
+ int res2 = 0 ;
2838
+
2839
+ if ((argc < 1) || (argc > 1)) {
2840
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2841
+ }
2842
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2843
+ if (!SWIG_IsOK(res1)) {
2844
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RS_BlockInfo2" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2845
+ }
2846
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2847
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_tagRS_BLOCKINFO, 0 | 0 );
2848
+ if (!SWIG_IsOK(res2)) {
2849
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RS_BlockInfo2" "', argument " "2"" of type '" "RS_BLOCKINFO [4]""'");
2850
+ }
2851
+ arg2 = reinterpret_cast< RS_BLOCKINFO * >(argp2);
2852
+ {
2853
+ if (arg2) {
2854
+ size_t ii = 0;
2855
+ for (; ii < (size_t)4; ++ii) arg1->RS_BlockInfo2[ii] = arg2[ii];
2856
+ } else {
2857
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""RS_BlockInfo2""' of type '""RS_BLOCKINFO [4]""'");
2858
+ }
2859
+ }
2860
+ return Qnil;
2861
+ fail:
2862
+ return Qnil;
2863
+ }
2864
+
2865
+
2866
+ SWIGINTERN VALUE
2867
+ _wrap_QR_VERSIONINFO_RS_BlockInfo2_get(int argc, VALUE *argv, VALUE self) {
2868
+ QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
2869
+ RS_BLOCKINFO *result = 0 ;
2870
+ void *argp1 = 0 ;
2871
+ int res1 = 0 ;
2872
+ VALUE vresult = Qnil;
2873
+
2874
+ if ((argc < 0) || (argc > 0)) {
2875
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2876
+ }
2877
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
2878
+ if (!SWIG_IsOK(res1)) {
2879
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RS_BlockInfo2" "', argument " "1"" of type '" "QR_VERSIONINFO *""'");
2880
+ }
2881
+ arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
2882
+ result = (RS_BLOCKINFO *)(RS_BLOCKINFO *) ((arg1)->RS_BlockInfo2);
2883
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tagRS_BLOCKINFO, 0 | 0 );
2884
+ return vresult;
2885
+ fail:
2886
+ return Qnil;
2887
+ }
2888
+
2889
+
2890
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2891
+ SWIGINTERN VALUE
2892
+ _wrap_QR_VERSIONINFO_allocate(VALUE self) {
2893
+ #else
2894
+ SWIGINTERN VALUE
2895
+ _wrap_QR_VERSIONINFO_allocate(int argc, VALUE *argv, VALUE self) {
2896
+ #endif
2897
+
2898
+
2899
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_tagQR_VERSIONINFO);
2900
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2901
+ rb_obj_call_init(vresult, argc, argv);
2902
+ #endif
2903
+ return vresult;
2904
+ }
2905
+
2906
+
2907
+ SWIGINTERN VALUE
2908
+ _wrap_new_QR_VERSIONINFO(int argc, VALUE *argv, VALUE self) {
2909
+ QR_VERSIONINFO *result = 0 ;
2910
+
2911
+ if ((argc < 0) || (argc > 0)) {
2912
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2913
+ }
2914
+ result = (QR_VERSIONINFO *)new QR_VERSIONINFO();DATA_PTR(self) = result;
2915
+
2916
+ return self;
2917
+ fail:
2918
+ return Qnil;
2919
+ }
2920
+
2921
+
2922
+ SWIGINTERN void
2923
+ free_QR_VERSIONINFO(QR_VERSIONINFO *arg1) {
2924
+ delete arg1;
2925
+ }
2926
+
2927
+ swig_class cCQR_Encode;
2928
+
2929
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2930
+ SWIGINTERN VALUE
2931
+ _wrap_CQR_Encode_allocate(VALUE self) {
2932
+ #else
2933
+ SWIGINTERN VALUE
2934
+ _wrap_CQR_Encode_allocate(int argc, VALUE *argv, VALUE self) {
2935
+ #endif
2936
+
2937
+
2938
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_CQR_Encode);
2939
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2940
+ rb_obj_call_init(vresult, argc, argv);
2941
+ #endif
2942
+ return vresult;
2943
+ }
2944
+
2945
+
2946
+ SWIGINTERN VALUE
2947
+ _wrap_new_CQR_Encode(int argc, VALUE *argv, VALUE self) {
2948
+ CQR_Encode *result = 0 ;
2949
+
2950
+ if ((argc < 0) || (argc > 0)) {
2951
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2952
+ }
2953
+ result = (CQR_Encode *)new CQR_Encode();DATA_PTR(self) = result;
2954
+
2955
+ return self;
2956
+ fail:
2957
+ return Qnil;
2958
+ }
2959
+
2960
+
2961
+ SWIGINTERN void
2962
+ free_CQR_Encode(CQR_Encode *arg1) {
2963
+ delete arg1;
2964
+ }
2965
+
2966
+ SWIGINTERN VALUE
2967
+ _wrap_CQR_Encode_m_nLevel_set(int argc, VALUE *argv, VALUE self) {
2968
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
2969
+ int arg2 ;
2970
+ void *argp1 = 0 ;
2971
+ int res1 = 0 ;
2972
+ int val2 ;
2973
+ int ecode2 = 0 ;
2974
+
2975
+ if ((argc < 1) || (argc > 1)) {
2976
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2977
+ }
2978
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
2979
+ if (!SWIG_IsOK(res1)) {
2980
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_nLevel" "', argument " "1"" of type '" "CQR_Encode *""'");
2981
+ }
2982
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
2983
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
2984
+ if (!SWIG_IsOK(ecode2)) {
2985
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "m_nLevel" "', argument " "2"" of type '" "int""'");
2986
+ }
2987
+ arg2 = static_cast< int >(val2);
2988
+ if (arg1) (arg1)->m_nLevel = arg2;
2989
+
2990
+ return Qnil;
2991
+ fail:
2992
+ return Qnil;
2993
+ }
2994
+
2995
+
2996
+ SWIGINTERN VALUE
2997
+ _wrap_CQR_Encode_m_nLevel_get(int argc, VALUE *argv, VALUE self) {
2998
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
2999
+ int result;
3000
+ void *argp1 = 0 ;
3001
+ int res1 = 0 ;
3002
+ VALUE vresult = Qnil;
3003
+
3004
+ if ((argc < 0) || (argc > 0)) {
3005
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3006
+ }
3007
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3008
+ if (!SWIG_IsOK(res1)) {
3009
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_nLevel" "', argument " "1"" of type '" "CQR_Encode *""'");
3010
+ }
3011
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3012
+ result = (int) ((arg1)->m_nLevel);
3013
+ vresult = SWIG_From_int(static_cast< int >(result));
3014
+ return vresult;
3015
+ fail:
3016
+ return Qnil;
3017
+ }
3018
+
3019
+
3020
+ SWIGINTERN VALUE
3021
+ _wrap_CQR_Encode_m_nVersion_set(int argc, VALUE *argv, VALUE self) {
3022
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3023
+ int arg2 ;
3024
+ void *argp1 = 0 ;
3025
+ int res1 = 0 ;
3026
+ int val2 ;
3027
+ int ecode2 = 0 ;
3028
+
3029
+ if ((argc < 1) || (argc > 1)) {
3030
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3031
+ }
3032
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3033
+ if (!SWIG_IsOK(res1)) {
3034
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_nVersion" "', argument " "1"" of type '" "CQR_Encode *""'");
3035
+ }
3036
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3037
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
3038
+ if (!SWIG_IsOK(ecode2)) {
3039
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "m_nVersion" "', argument " "2"" of type '" "int""'");
3040
+ }
3041
+ arg2 = static_cast< int >(val2);
3042
+ if (arg1) (arg1)->m_nVersion = arg2;
3043
+
3044
+ return Qnil;
3045
+ fail:
3046
+ return Qnil;
3047
+ }
3048
+
3049
+
3050
+ SWIGINTERN VALUE
3051
+ _wrap_CQR_Encode_m_nVersion_get(int argc, VALUE *argv, VALUE self) {
3052
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3053
+ int result;
3054
+ void *argp1 = 0 ;
3055
+ int res1 = 0 ;
3056
+ VALUE vresult = Qnil;
3057
+
3058
+ if ((argc < 0) || (argc > 0)) {
3059
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3060
+ }
3061
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3062
+ if (!SWIG_IsOK(res1)) {
3063
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_nVersion" "', argument " "1"" of type '" "CQR_Encode *""'");
3064
+ }
3065
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3066
+ result = (int) ((arg1)->m_nVersion);
3067
+ vresult = SWIG_From_int(static_cast< int >(result));
3068
+ return vresult;
3069
+ fail:
3070
+ return Qnil;
3071
+ }
3072
+
3073
+
3074
+ SWIGINTERN VALUE
3075
+ _wrap_CQR_Encode_m_bAutoExtent_set(int argc, VALUE *argv, VALUE self) {
3076
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3077
+ BOOL arg2 ;
3078
+ void *argp1 = 0 ;
3079
+ int res1 = 0 ;
3080
+ bool val2 ;
3081
+ int ecode2 = 0 ;
3082
+
3083
+ if ((argc < 1) || (argc > 1)) {
3084
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3085
+ }
3086
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3087
+ if (!SWIG_IsOK(res1)) {
3088
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_bAutoExtent" "', argument " "1"" of type '" "CQR_Encode *""'");
3089
+ }
3090
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3091
+ ecode2 = SWIG_AsVal_bool(argv[0], &val2);
3092
+ if (!SWIG_IsOK(ecode2)) {
3093
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "m_bAutoExtent" "', argument " "2"" of type '" "BOOL""'");
3094
+ }
3095
+ arg2 = static_cast< BOOL >(val2);
3096
+ if (arg1) (arg1)->m_bAutoExtent = arg2;
3097
+
3098
+ return Qnil;
3099
+ fail:
3100
+ return Qnil;
3101
+ }
3102
+
3103
+
3104
+ SWIGINTERN VALUE
3105
+ _wrap_CQR_Encode_m_bAutoExtent_get(int argc, VALUE *argv, VALUE self) {
3106
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3107
+ BOOL result;
3108
+ void *argp1 = 0 ;
3109
+ int res1 = 0 ;
3110
+ VALUE vresult = Qnil;
3111
+
3112
+ if ((argc < 0) || (argc > 0)) {
3113
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3114
+ }
3115
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3116
+ if (!SWIG_IsOK(res1)) {
3117
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_bAutoExtent" "', argument " "1"" of type '" "CQR_Encode *""'");
3118
+ }
3119
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3120
+ result = (BOOL) ((arg1)->m_bAutoExtent);
3121
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3122
+ return vresult;
3123
+ fail:
3124
+ return Qnil;
3125
+ }
3126
+
3127
+
3128
+ SWIGINTERN VALUE
3129
+ _wrap_CQR_Encode_m_nMaskingNo_set(int argc, VALUE *argv, VALUE self) {
3130
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3131
+ int arg2 ;
3132
+ void *argp1 = 0 ;
3133
+ int res1 = 0 ;
3134
+ int val2 ;
3135
+ int ecode2 = 0 ;
3136
+
3137
+ if ((argc < 1) || (argc > 1)) {
3138
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3139
+ }
3140
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3141
+ if (!SWIG_IsOK(res1)) {
3142
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_nMaskingNo" "', argument " "1"" of type '" "CQR_Encode *""'");
3143
+ }
3144
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3145
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
3146
+ if (!SWIG_IsOK(ecode2)) {
3147
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "m_nMaskingNo" "', argument " "2"" of type '" "int""'");
3148
+ }
3149
+ arg2 = static_cast< int >(val2);
3150
+ if (arg1) (arg1)->m_nMaskingNo = arg2;
3151
+
3152
+ return Qnil;
3153
+ fail:
3154
+ return Qnil;
3155
+ }
3156
+
3157
+
3158
+ SWIGINTERN VALUE
3159
+ _wrap_CQR_Encode_m_nMaskingNo_get(int argc, VALUE *argv, VALUE self) {
3160
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3161
+ int result;
3162
+ void *argp1 = 0 ;
3163
+ int res1 = 0 ;
3164
+ VALUE vresult = Qnil;
3165
+
3166
+ if ((argc < 0) || (argc > 0)) {
3167
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3168
+ }
3169
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3170
+ if (!SWIG_IsOK(res1)) {
3171
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_nMaskingNo" "', argument " "1"" of type '" "CQR_Encode *""'");
3172
+ }
3173
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3174
+ result = (int) ((arg1)->m_nMaskingNo);
3175
+ vresult = SWIG_From_int(static_cast< int >(result));
3176
+ return vresult;
3177
+ fail:
3178
+ return Qnil;
3179
+ }
3180
+
3181
+
3182
+ SWIGINTERN VALUE
3183
+ _wrap_CQR_Encode_m_nSymbleSize_set(int argc, VALUE *argv, VALUE self) {
3184
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3185
+ int arg2 ;
3186
+ void *argp1 = 0 ;
3187
+ int res1 = 0 ;
3188
+ int val2 ;
3189
+ int ecode2 = 0 ;
3190
+
3191
+ if ((argc < 1) || (argc > 1)) {
3192
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3193
+ }
3194
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3195
+ if (!SWIG_IsOK(res1)) {
3196
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_nSymbleSize" "', argument " "1"" of type '" "CQR_Encode *""'");
3197
+ }
3198
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3199
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
3200
+ if (!SWIG_IsOK(ecode2)) {
3201
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "m_nSymbleSize" "', argument " "2"" of type '" "int""'");
3202
+ }
3203
+ arg2 = static_cast< int >(val2);
3204
+ if (arg1) (arg1)->m_nSymbleSize = arg2;
3205
+
3206
+ return Qnil;
3207
+ fail:
3208
+ return Qnil;
3209
+ }
3210
+
3211
+
3212
+ SWIGINTERN VALUE
3213
+ _wrap_CQR_Encode_m_nSymbleSize_get(int argc, VALUE *argv, VALUE self) {
3214
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3215
+ int result;
3216
+ void *argp1 = 0 ;
3217
+ int res1 = 0 ;
3218
+ VALUE vresult = Qnil;
3219
+
3220
+ if ((argc < 0) || (argc > 0)) {
3221
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3222
+ }
3223
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3224
+ if (!SWIG_IsOK(res1)) {
3225
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_nSymbleSize" "', argument " "1"" of type '" "CQR_Encode *""'");
3226
+ }
3227
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3228
+ result = (int) ((arg1)->m_nSymbleSize);
3229
+ vresult = SWIG_From_int(static_cast< int >(result));
3230
+ return vresult;
3231
+ fail:
3232
+ return Qnil;
3233
+ }
3234
+
3235
+
3236
+ SWIGINTERN VALUE
3237
+ _wrap_CQR_Encode_m_byModuleData_set(int argc, VALUE *argv, VALUE self) {
3238
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3239
+ BYTE (*arg2)[177] ;
3240
+ void *argp1 = 0 ;
3241
+ int res1 = 0 ;
3242
+ void *argp2 = 0 ;
3243
+ int res2 = 0 ;
3244
+
3245
+ if ((argc < 1) || (argc > 1)) {
3246
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3247
+ }
3248
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3249
+ if (!SWIG_IsOK(res1)) {
3250
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_byModuleData" "', argument " "1"" of type '" "CQR_Encode *""'");
3251
+ }
3252
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3253
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_a_177__unsigned_char, 0 | 0 );
3254
+ if (!SWIG_IsOK(res2)) {
3255
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "m_byModuleData" "', argument " "2"" of type '" "BYTE [177][177]""'");
3256
+ }
3257
+ arg2 = reinterpret_cast< BYTE (*)[177] >(argp2);
3258
+ {
3259
+ if (arg2) {
3260
+ size_t ii = 0;
3261
+ for (; ii < (size_t)177; ++ii) {
3262
+ if (arg2[ii]) {
3263
+ size_t jj = 0;
3264
+ for (; jj < (size_t)177; ++jj) arg1->m_byModuleData[ii][jj] = arg2[ii][jj];
3265
+ } else {
3266
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""m_byModuleData""' of type '""BYTE [177][177]""'");
3267
+ }
3268
+ }
3269
+ } else {
3270
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""m_byModuleData""' of type '""BYTE [177][177]""'");
3271
+ }
3272
+ }
3273
+ return Qnil;
3274
+ fail:
3275
+ return Qnil;
3276
+ }
3277
+
3278
+
3279
+ SWIGINTERN VALUE
3280
+ _wrap_CQR_Encode_m_byModuleData_get(int argc, VALUE *argv, VALUE self) {
3281
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3282
+ BYTE (*result)[177] = 0 ;
3283
+ void *argp1 = 0 ;
3284
+ int res1 = 0 ;
3285
+ VALUE vresult = Qnil;
3286
+
3287
+ if ((argc < 0) || (argc > 0)) {
3288
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3289
+ }
3290
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3291
+ if (!SWIG_IsOK(res1)) {
3292
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "m_byModuleData" "', argument " "1"" of type '" "CQR_Encode *""'");
3293
+ }
3294
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3295
+ result = (BYTE (*)[177])(BYTE (*)[177]) ((arg1)->m_byModuleData);
3296
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_a_177__unsigned_char, 0 | 0 );
3297
+ return vresult;
3298
+ fail:
3299
+ return Qnil;
3300
+ }
3301
+
3302
+
3303
+ SWIGINTERN VALUE
3304
+ _wrap_CQR_Encode_EncodeData__SWIG_0(int argc, VALUE *argv, VALUE self) {
3305
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3306
+ int arg2 ;
3307
+ int arg3 ;
3308
+ BOOL arg4 ;
3309
+ int arg5 ;
3310
+ LPCSTR arg6 = (LPCSTR) 0 ;
3311
+ int arg7 ;
3312
+ BOOL result;
3313
+ void *argp1 = 0 ;
3314
+ int res1 = 0 ;
3315
+ int val2 ;
3316
+ int ecode2 = 0 ;
3317
+ int val3 ;
3318
+ int ecode3 = 0 ;
3319
+ bool val4 ;
3320
+ int ecode4 = 0 ;
3321
+ int val5 ;
3322
+ int ecode5 = 0 ;
3323
+ int res6 ;
3324
+ char *buf6 = 0 ;
3325
+ int alloc6 = 0 ;
3326
+ int val7 ;
3327
+ int ecode7 = 0 ;
3328
+ VALUE vresult = Qnil;
3329
+
3330
+ if ((argc < 6) || (argc > 6)) {
3331
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
3332
+ }
3333
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3334
+ if (!SWIG_IsOK(res1)) {
3335
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EncodeData" "', argument " "1"" of type '" "CQR_Encode *""'");
3336
+ }
3337
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3338
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
3339
+ if (!SWIG_IsOK(ecode2)) {
3340
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EncodeData" "', argument " "2"" of type '" "int""'");
3341
+ }
3342
+ arg2 = static_cast< int >(val2);
3343
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
3344
+ if (!SWIG_IsOK(ecode3)) {
3345
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "EncodeData" "', argument " "3"" of type '" "int""'");
3346
+ }
3347
+ arg3 = static_cast< int >(val3);
3348
+ ecode4 = SWIG_AsVal_bool(argv[2], &val4);
3349
+ if (!SWIG_IsOK(ecode4)) {
3350
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "EncodeData" "', argument " "4"" of type '" "BOOL""'");
3351
+ }
3352
+ arg4 = static_cast< BOOL >(val4);
3353
+ ecode5 = SWIG_AsVal_int(argv[3], &val5);
3354
+ if (!SWIG_IsOK(ecode5)) {
3355
+ SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "EncodeData" "', argument " "5"" of type '" "int""'");
3356
+ }
3357
+ arg5 = static_cast< int >(val5);
3358
+ res6 = SWIG_AsCharPtrAndSize(argv[4], &buf6, NULL, &alloc6);
3359
+ if (!SWIG_IsOK(res6)) {
3360
+ SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "EncodeData" "', argument " "6"" of type '" "LPCSTR""'");
3361
+ }
3362
+ arg6 = buf6;
3363
+ ecode7 = SWIG_AsVal_int(argv[5], &val7);
3364
+ if (!SWIG_IsOK(ecode7)) {
3365
+ SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "EncodeData" "', argument " "7"" of type '" "int""'");
3366
+ }
3367
+ arg7 = static_cast< int >(val7);
3368
+ result = (BOOL)(arg1)->EncodeData(arg2,arg3,arg4,arg5,arg6,arg7);
3369
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3370
+ if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
3371
+ return vresult;
3372
+ fail:
3373
+ if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
3374
+ return Qnil;
3375
+ }
3376
+
3377
+
3378
+ SWIGINTERN VALUE
3379
+ _wrap_CQR_Encode_EncodeData__SWIG_1(int argc, VALUE *argv, VALUE self) {
3380
+ CQR_Encode *arg1 = (CQR_Encode *) 0 ;
3381
+ int arg2 ;
3382
+ int arg3 ;
3383
+ BOOL arg4 ;
3384
+ int arg5 ;
3385
+ LPCSTR arg6 = (LPCSTR) 0 ;
3386
+ BOOL result;
3387
+ void *argp1 = 0 ;
3388
+ int res1 = 0 ;
3389
+ int val2 ;
3390
+ int ecode2 = 0 ;
3391
+ int val3 ;
3392
+ int ecode3 = 0 ;
3393
+ bool val4 ;
3394
+ int ecode4 = 0 ;
3395
+ int val5 ;
3396
+ int ecode5 = 0 ;
3397
+ int res6 ;
3398
+ char *buf6 = 0 ;
3399
+ int alloc6 = 0 ;
3400
+ VALUE vresult = Qnil;
3401
+
3402
+ if ((argc < 5) || (argc > 5)) {
3403
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
3404
+ }
3405
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
3406
+ if (!SWIG_IsOK(res1)) {
3407
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EncodeData" "', argument " "1"" of type '" "CQR_Encode *""'");
3408
+ }
3409
+ arg1 = reinterpret_cast< CQR_Encode * >(argp1);
3410
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
3411
+ if (!SWIG_IsOK(ecode2)) {
3412
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EncodeData" "', argument " "2"" of type '" "int""'");
3413
+ }
3414
+ arg2 = static_cast< int >(val2);
3415
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
3416
+ if (!SWIG_IsOK(ecode3)) {
3417
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "EncodeData" "', argument " "3"" of type '" "int""'");
3418
+ }
3419
+ arg3 = static_cast< int >(val3);
3420
+ ecode4 = SWIG_AsVal_bool(argv[2], &val4);
3421
+ if (!SWIG_IsOK(ecode4)) {
3422
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "EncodeData" "', argument " "4"" of type '" "BOOL""'");
3423
+ }
3424
+ arg4 = static_cast< BOOL >(val4);
3425
+ ecode5 = SWIG_AsVal_int(argv[3], &val5);
3426
+ if (!SWIG_IsOK(ecode5)) {
3427
+ SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "EncodeData" "', argument " "5"" of type '" "int""'");
3428
+ }
3429
+ arg5 = static_cast< int >(val5);
3430
+ res6 = SWIG_AsCharPtrAndSize(argv[4], &buf6, NULL, &alloc6);
3431
+ if (!SWIG_IsOK(res6)) {
3432
+ SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "EncodeData" "', argument " "6"" of type '" "LPCSTR""'");
3433
+ }
3434
+ arg6 = buf6;
3435
+ result = (BOOL)(arg1)->EncodeData(arg2,arg3,arg4,arg5,arg6);
3436
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3437
+ if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
3438
+ return vresult;
3439
+ fail:
3440
+ if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
3441
+ return Qnil;
3442
+ }
3443
+
3444
+
3445
+ SWIGINTERN VALUE _wrap_CQR_Encode_EncodeData(int nargs, VALUE *args, VALUE self) {
3446
+ int argc;
3447
+ VALUE argv[8];
3448
+ int ii;
3449
+
3450
+ argc = nargs + 1;
3451
+ argv[0] = self;
3452
+ if (argc > 8) SWIG_fail;
3453
+ for (ii = 1; (ii < argc); ii++) {
3454
+ argv[ii] = args[ii-1];
3455
+ }
3456
+ if (argc == 6) {
3457
+ int _v;
3458
+ void *vptr = 0;
3459
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CQR_Encode, 0);
3460
+ _v = SWIG_CheckState(res);
3461
+ if (_v) {
3462
+ {
3463
+ int res = SWIG_AsVal_int(argv[1], NULL);
3464
+ _v = SWIG_CheckState(res);
3465
+ }
3466
+ if (_v) {
3467
+ {
3468
+ int res = SWIG_AsVal_int(argv[2], NULL);
3469
+ _v = SWIG_CheckState(res);
3470
+ }
3471
+ if (_v) {
3472
+ {
3473
+ int res = SWIG_AsVal_bool(argv[3], NULL);
3474
+ _v = SWIG_CheckState(res);
3475
+ }
3476
+ if (_v) {
3477
+ {
3478
+ int res = SWIG_AsVal_int(argv[4], NULL);
3479
+ _v = SWIG_CheckState(res);
3480
+ }
3481
+ if (_v) {
3482
+ int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0);
3483
+ _v = SWIG_CheckState(res);
3484
+ if (_v) {
3485
+ return _wrap_CQR_Encode_EncodeData__SWIG_1(nargs, args, self);
3486
+ }
3487
+ }
3488
+ }
3489
+ }
3490
+ }
3491
+ }
3492
+ }
3493
+ if (argc == 7) {
3494
+ int _v;
3495
+ void *vptr = 0;
3496
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CQR_Encode, 0);
3497
+ _v = SWIG_CheckState(res);
3498
+ if (_v) {
3499
+ {
3500
+ int res = SWIG_AsVal_int(argv[1], NULL);
3501
+ _v = SWIG_CheckState(res);
3502
+ }
3503
+ if (_v) {
3504
+ {
3505
+ int res = SWIG_AsVal_int(argv[2], NULL);
3506
+ _v = SWIG_CheckState(res);
3507
+ }
3508
+ if (_v) {
3509
+ {
3510
+ int res = SWIG_AsVal_bool(argv[3], NULL);
3511
+ _v = SWIG_CheckState(res);
3512
+ }
3513
+ if (_v) {
3514
+ {
3515
+ int res = SWIG_AsVal_int(argv[4], NULL);
3516
+ _v = SWIG_CheckState(res);
3517
+ }
3518
+ if (_v) {
3519
+ int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0);
3520
+ _v = SWIG_CheckState(res);
3521
+ if (_v) {
3522
+ {
3523
+ int res = SWIG_AsVal_int(argv[6], NULL);
3524
+ _v = SWIG_CheckState(res);
3525
+ }
3526
+ if (_v) {
3527
+ return _wrap_CQR_Encode_EncodeData__SWIG_0(nargs, args, self);
3528
+ }
3529
+ }
3530
+ }
3531
+ }
3532
+ }
3533
+ }
3534
+ }
3535
+ }
3536
+
3537
+ fail:
3538
+ rb_raise(rb_eArgError, "No matching function for overloaded 'CQR_Encode_EncodeData'");
3539
+ return Qnil;
3540
+ }
3541
+
3542
+
3543
+
3544
+ /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
3545
+
3546
+ static void *_p_QRDrawPNGTo_p_QRDraw(void *x) {
3547
+ return (void *)((QRDraw *) ((QRDrawPNG *) x));
3548
+ }
3549
+ static void *_p_QRDrawTIFFTo_p_QRDraw(void *x) {
3550
+ return (void *)((QRDraw *) ((QRDrawTIFF *) x));
3551
+ }
3552
+ static void *_p_QRDrawJPEGTo_p_QRDraw(void *x) {
3553
+ return (void *)((QRDraw *) ((QRDrawJPEG *) x));
3554
+ }
3555
+ static void *_p_QRDrawPSTo_p_QRDraw(void *x) {
3556
+ return (void *)((QRDraw *) ((QRDrawPS *) x));
3557
+ }
3558
+ static swig_type_info _swigt__p_CQR_Encode = {"_p_CQR_Encode", "CQR_Encode *", 0, 0, (void*)0, 0};
3559
+ static swig_type_info _swigt__p_QRDraw = {"_p_QRDraw", "QRDraw *", 0, 0, (void*)0, 0};
3560
+ static swig_type_info _swigt__p_QRDrawJPEG = {"_p_QRDrawJPEG", "QRDrawJPEG *", 0, 0, (void*)0, 0};
3561
+ static swig_type_info _swigt__p_QRDrawPNG = {"_p_QRDrawPNG", "QRDrawPNG *", 0, 0, (void*)0, 0};
3562
+ static swig_type_info _swigt__p_QRDrawPS = {"_p_QRDrawPS", "QRDrawPS *", 0, 0, (void*)0, 0};
3563
+ static swig_type_info _swigt__p_QRDrawTIFF = {"_p_QRDrawTIFF", "QRDrawTIFF *", 0, 0, (void*)0, 0};
3564
+ 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};
3565
+ static swig_type_info _swigt__p_bool = {"_p_bool", "bool *|BOOL *", 0, 0, (void*)0, 0};
3566
+ static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
3567
+ static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0};
3568
+ static swig_type_info _swigt__p_tagQR_VERSIONINFO = {"_p_tagQR_VERSIONINFO", "tagQR_VERSIONINFO *|QR_VERSIONINFO *", 0, 0, (void*)0, 0};
3569
+ static swig_type_info _swigt__p_tagRS_BLOCKINFO = {"_p_tagRS_BLOCKINFO", "tagRS_BLOCKINFO *|RS_BLOCKINFO *", 0, 0, (void*)0, 0};
3570
+ static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|BYTE *", 0, 0, (void*)0, 0};
3571
+ static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|WORD *", 0, 0, (void*)0, 0};
3572
+
3573
+ static swig_type_info *swig_type_initial[] = {
3574
+ &_swigt__p_CQR_Encode,
3575
+ &_swigt__p_QRDraw,
3576
+ &_swigt__p_QRDrawJPEG,
3577
+ &_swigt__p_QRDrawPNG,
3578
+ &_swigt__p_QRDrawPS,
3579
+ &_swigt__p_QRDrawTIFF,
3580
+ &_swigt__p_a_177__unsigned_char,
3581
+ &_swigt__p_bool,
3582
+ &_swigt__p_char,
3583
+ &_swigt__p_int,
3584
+ &_swigt__p_tagQR_VERSIONINFO,
3585
+ &_swigt__p_tagRS_BLOCKINFO,
3586
+ &_swigt__p_unsigned_char,
3587
+ &_swigt__p_unsigned_short,
3588
+ };
3589
+
3590
+ static swig_cast_info _swigc__p_CQR_Encode[] = { {&_swigt__p_CQR_Encode, 0, 0, 0},{0, 0, 0, 0}};
3591
+ 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}};
3592
+ static swig_cast_info _swigc__p_QRDrawJPEG[] = { {&_swigt__p_QRDrawJPEG, 0, 0, 0},{0, 0, 0, 0}};
3593
+ static swig_cast_info _swigc__p_QRDrawPNG[] = { {&_swigt__p_QRDrawPNG, 0, 0, 0},{0, 0, 0, 0}};
3594
+ static swig_cast_info _swigc__p_QRDrawPS[] = { {&_swigt__p_QRDrawPS, 0, 0, 0},{0, 0, 0, 0}};
3595
+ static swig_cast_info _swigc__p_QRDrawTIFF[] = { {&_swigt__p_QRDrawTIFF, 0, 0, 0},{0, 0, 0, 0}};
3596
+ static swig_cast_info _swigc__p_a_177__unsigned_char[] = { {&_swigt__p_a_177__unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
3597
+ static swig_cast_info _swigc__p_bool[] = { {&_swigt__p_bool, 0, 0, 0},{0, 0, 0, 0}};
3598
+ static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
3599
+ static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
3600
+ static swig_cast_info _swigc__p_tagQR_VERSIONINFO[] = { {&_swigt__p_tagQR_VERSIONINFO, 0, 0, 0},{0, 0, 0, 0}};
3601
+ static swig_cast_info _swigc__p_tagRS_BLOCKINFO[] = { {&_swigt__p_tagRS_BLOCKINFO, 0, 0, 0},{0, 0, 0, 0}};
3602
+ static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
3603
+ static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
3604
+
3605
+ static swig_cast_info *swig_cast_initial[] = {
3606
+ _swigc__p_CQR_Encode,
3607
+ _swigc__p_QRDraw,
3608
+ _swigc__p_QRDrawJPEG,
3609
+ _swigc__p_QRDrawPNG,
3610
+ _swigc__p_QRDrawPS,
3611
+ _swigc__p_QRDrawTIFF,
3612
+ _swigc__p_a_177__unsigned_char,
3613
+ _swigc__p_bool,
3614
+ _swigc__p_char,
3615
+ _swigc__p_int,
3616
+ _swigc__p_tagQR_VERSIONINFO,
3617
+ _swigc__p_tagRS_BLOCKINFO,
3618
+ _swigc__p_unsigned_char,
3619
+ _swigc__p_unsigned_short,
3620
+ };
3621
+
3622
+
3623
+ /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
3624
+
3625
+ /* -----------------------------------------------------------------------------
3626
+ * Type initialization:
3627
+ * This problem is tough by the requirement that no dynamic
3628
+ * memory is used. Also, since swig_type_info structures store pointers to
3629
+ * swig_cast_info structures and swig_cast_info structures store pointers back
3630
+ * to swig_type_info structures, we need some lookup code at initialization.
3631
+ * The idea is that swig generates all the structures that are needed.
3632
+ * The runtime then collects these partially filled structures.
3633
+ * The SWIG_InitializeModule function takes these initial arrays out of
3634
+ * swig_module, and does all the lookup, filling in the swig_module.types
3635
+ * array with the correct data and linking the correct swig_cast_info
3636
+ * structures together.
3637
+ *
3638
+ * The generated swig_type_info structures are assigned staticly to an initial
3639
+ * array. We just loop though that array, and handle each type individually.
3640
+ * First we lookup if this type has been already loaded, and if so, use the
3641
+ * loaded structure instead of the generated one. Then we have to fill in the
3642
+ * cast linked list. The cast data is initially stored in something like a
3643
+ * two-dimensional array. Each row corresponds to a type (there are the same
3644
+ * number of rows as there are in the swig_type_initial array). Each entry in
3645
+ * a column is one of the swig_cast_info structures for that type.
3646
+ * The cast_initial array is actually an array of arrays, because each row has
3647
+ * a variable number of columns. So to actually build the cast linked list,
3648
+ * we find the array of casts associated with the type, and loop through it
3649
+ * adding the casts to the list. The one last trick we need to do is making
3650
+ * sure the type pointer in the swig_cast_info struct is correct.
3651
+ *
3652
+ * First off, we lookup the cast->type name to see if it is already loaded.
3653
+ * There are three cases to handle:
3654
+ * 1) If the cast->type has already been loaded AND the type we are adding
3655
+ * casting info to has not been loaded (it is in this module), THEN we
3656
+ * replace the cast->type pointer with the type pointer that has already
3657
+ * been loaded.
3658
+ * 2) If BOTH types (the one we are adding casting info to, and the
3659
+ * cast->type) are loaded, THEN the cast info has already been loaded by
3660
+ * the previous module so we just ignore it.
3661
+ * 3) Finally, if cast->type has not already been loaded, then we add that
3662
+ * swig_cast_info to the linked list (because the cast->type) pointer will
3663
+ * be correct.
3664
+ * ----------------------------------------------------------------------------- */
3665
+
3666
+ #ifdef __cplusplus
3667
+ extern "C" {
3668
+ #if 0
3669
+ } /* c-mode */
3670
+ #endif
3671
+ #endif
3672
+
3673
+ #if 0
3674
+ #define SWIGRUNTIME_DEBUG
3675
+ #endif
3676
+
3677
+ SWIGRUNTIME void
3678
+ SWIG_InitializeModule(void *clientdata) {
3679
+ size_t i;
3680
+ swig_module_info *module_head;
3681
+ static int init_run = 0;
3682
+
3683
+ clientdata = clientdata;
3684
+
3685
+ if (init_run) return;
3686
+ init_run = 1;
3687
+
3688
+ /* Initialize the swig_module */
3689
+ swig_module.type_initial = swig_type_initial;
3690
+ swig_module.cast_initial = swig_cast_initial;
3691
+
3692
+ /* Try and load any already created modules */
3693
+ module_head = SWIG_GetModule(clientdata);
3694
+ if (module_head) {
3695
+ swig_module.next = module_head->next;
3696
+ module_head->next = &swig_module;
3697
+ } else {
3698
+ /* This is the first module loaded */
3699
+ swig_module.next = &swig_module;
3700
+ SWIG_SetModule(clientdata, &swig_module);
3701
+ }
3702
+
3703
+ /* Now work on filling in swig_module.types */
3704
+ #ifdef SWIGRUNTIME_DEBUG
3705
+ printf("SWIG_InitializeModule: size %d\n", swig_module.size);
3706
+ #endif
3707
+ for (i = 0; i < swig_module.size; ++i) {
3708
+ swig_type_info *type = 0;
3709
+ swig_type_info *ret;
3710
+ swig_cast_info *cast;
3711
+
3712
+ #ifdef SWIGRUNTIME_DEBUG
3713
+ printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
3714
+ #endif
3715
+
3716
+ /* if there is another module already loaded */
3717
+ if (swig_module.next != &swig_module) {
3718
+ type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
3719
+ }
3720
+ if (type) {
3721
+ /* Overwrite clientdata field */
3722
+ #ifdef SWIGRUNTIME_DEBUG
3723
+ printf("SWIG_InitializeModule: found type %s\n", type->name);
3724
+ #endif
3725
+ if (swig_module.type_initial[i]->clientdata) {
3726
+ type->clientdata = swig_module.type_initial[i]->clientdata;
3727
+ #ifdef SWIGRUNTIME_DEBUG
3728
+ printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
3729
+ #endif
3730
+ }
3731
+ } else {
3732
+ type = swig_module.type_initial[i];
3733
+ }
3734
+
3735
+ /* Insert casting types */
3736
+ cast = swig_module.cast_initial[i];
3737
+ while (cast->type) {
3738
+
3739
+ /* Don't need to add information already in the list */
3740
+ ret = 0;
3741
+ #ifdef SWIGRUNTIME_DEBUG
3742
+ printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
3743
+ #endif
3744
+ if (swig_module.next != &swig_module) {
3745
+ ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
3746
+ #ifdef SWIGRUNTIME_DEBUG
3747
+ if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
3748
+ #endif
3749
+ }
3750
+ if (ret) {
3751
+ if (type == swig_module.type_initial[i]) {
3752
+ #ifdef SWIGRUNTIME_DEBUG
3753
+ printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
3754
+ #endif
3755
+ cast->type = ret;
3756
+ ret = 0;
3757
+ } else {
3758
+ /* Check for casting already in the list */
3759
+ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
3760
+ #ifdef SWIGRUNTIME_DEBUG
3761
+ if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
3762
+ #endif
3763
+ if (!ocast) ret = 0;
3764
+ }
3765
+ }
3766
+
3767
+ if (!ret) {
3768
+ #ifdef SWIGRUNTIME_DEBUG
3769
+ printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
3770
+ #endif
3771
+ if (type->cast) {
3772
+ type->cast->prev = cast;
3773
+ cast->next = type->cast;
3774
+ }
3775
+ type->cast = cast;
3776
+ }
3777
+ cast++;
3778
+ }
3779
+ /* Set entry in modules->types array equal to the type */
3780
+ swig_module.types[i] = type;
3781
+ }
3782
+ swig_module.types[i] = 0;
3783
+
3784
+ #ifdef SWIGRUNTIME_DEBUG
3785
+ printf("**** SWIG_InitializeModule: Cast List ******\n");
3786
+ for (i = 0; i < swig_module.size; ++i) {
3787
+ int j = 0;
3788
+ swig_cast_info *cast = swig_module.cast_initial[i];
3789
+ printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
3790
+ while (cast->type) {
3791
+ printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
3792
+ cast++;
3793
+ ++j;
3794
+ }
3795
+ printf("---- Total casts: %d\n",j);
3796
+ }
3797
+ printf("**** SWIG_InitializeModule: Cast List ******\n");
3798
+ #endif
3799
+ }
3800
+
3801
+ /* This function will propagate the clientdata field of type to
3802
+ * any new swig_type_info structures that have been added into the list
3803
+ * of equivalent types. It is like calling
3804
+ * SWIG_TypeClientData(type, clientdata) a second time.
3805
+ */
3806
+ SWIGRUNTIME void
3807
+ SWIG_PropagateClientData(void) {
3808
+ size_t i;
3809
+ swig_cast_info *equiv;
3810
+ static int init_run = 0;
3811
+
3812
+ if (init_run) return;
3813
+ init_run = 1;
3814
+
3815
+ for (i = 0; i < swig_module.size; i++) {
3816
+ if (swig_module.types[i]->clientdata) {
3817
+ equiv = swig_module.types[i]->cast;
3818
+ while (equiv) {
3819
+ if (!equiv->converter) {
3820
+ if (equiv->type && !equiv->type->clientdata)
3821
+ SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
3822
+ }
3823
+ equiv = equiv->next;
3824
+ }
3825
+ }
3826
+ }
3827
+ }
3828
+
3829
+ #ifdef __cplusplus
3830
+ #if 0
3831
+ { /* c-mode */
3832
+ #endif
3833
+ }
3834
+ #endif
3835
+
3836
+
3837
+ #ifdef __cplusplus
3838
+ extern "C"
3839
+ #endif
3840
+ SWIGEXPORT void Init_QR(void) {
3841
+ size_t i;
3842
+
3843
+ SWIG_InitRuntime();
3844
+ mQR = rb_define_module("QR");
3845
+
3846
+ SWIG_InitializeModule(0);
3847
+ for (i = 0; i < swig_module.size; i++) {
3848
+ SWIG_define_class(swig_module.types[i]);
3849
+ }
3850
+
3851
+ SWIG_RubyInitializeTrackings();
3852
+ rb_define_const(mQR, "MARGIN_SIZE", SWIG_From_int(static_cast< int >(4)));
3853
+ rb_define_const(mQR, "MAX_MODULESIZE", SWIG_From_int(static_cast< int >(177)));
3854
+
3855
+ cQRDraw.klass = rb_define_class_under(mQR, "QRDraw", rb_cObject);
3856
+ SWIG_TypeClientData(SWIGTYPE_p_QRDraw, (void *) &cQRDraw);
3857
+ rb_undef_alloc_func(cQRDraw.klass);
3858
+ rb_define_method(cQRDraw.klass, "setup", VALUEFUNC(_wrap_QRDraw_setup), -1);
3859
+ rb_define_method(cQRDraw.klass, "draw", VALUEFUNC(_wrap_QRDraw_draw), -1);
3860
+ rb_define_method(cQRDraw.klass, "close", VALUEFUNC(_wrap_QRDraw_close), -1);
3861
+ cQRDraw.mark = 0;
3862
+ cQRDraw.destroy = (void (*)(void *)) free_QRDraw;
3863
+ cQRDraw.trackObjects = 0;
3864
+
3865
+ cQRDrawJPEG.klass = rb_define_class_under(mQR, "QRDrawJPEG", ((swig_class *) SWIGTYPE_p_QRDraw->clientdata)->klass);
3866
+ SWIG_TypeClientData(SWIGTYPE_p_QRDrawJPEG, (void *) &cQRDrawJPEG);
3867
+ rb_define_alloc_func(cQRDrawJPEG.klass, _wrap_QRDrawJPEG_allocate);
3868
+ rb_define_method(cQRDrawJPEG.klass, "initialize", VALUEFUNC(_wrap_new_QRDrawJPEG), -1);
3869
+ rb_define_method(cQRDrawJPEG.klass, "draw", VALUEFUNC(_wrap_QRDrawJPEG_draw), -1);
3870
+ cQRDrawJPEG.mark = 0;
3871
+ cQRDrawJPEG.destroy = (void (*)(void *)) free_QRDrawJPEG;
3872
+ cQRDrawJPEG.trackObjects = 0;
3873
+
3874
+ cQRDrawPNG.klass = rb_define_class_under(mQR, "QRDrawPNG", ((swig_class *) SWIGTYPE_p_QRDraw->clientdata)->klass);
3875
+ SWIG_TypeClientData(SWIGTYPE_p_QRDrawPNG, (void *) &cQRDrawPNG);
3876
+ rb_define_alloc_func(cQRDrawPNG.klass, _wrap_QRDrawPNG_allocate);
3877
+ rb_define_method(cQRDrawPNG.klass, "initialize", VALUEFUNC(_wrap_new_QRDrawPNG), -1);
3878
+ rb_define_method(cQRDrawPNG.klass, "draw", VALUEFUNC(_wrap_QRDrawPNG_draw), -1);
3879
+ cQRDrawPNG.mark = 0;
3880
+ cQRDrawPNG.destroy = (void (*)(void *)) free_QRDrawPNG;
3881
+ cQRDrawPNG.trackObjects = 0;
3882
+
3883
+ cQRDrawPS.klass = rb_define_class_under(mQR, "QRDrawPS", ((swig_class *) SWIGTYPE_p_QRDraw->clientdata)->klass);
3884
+ SWIG_TypeClientData(SWIGTYPE_p_QRDrawPS, (void *) &cQRDrawPS);
3885
+ rb_define_alloc_func(cQRDrawPS.klass, _wrap_QRDrawPS_allocate);
3886
+ rb_define_method(cQRDrawPS.klass, "initialize", VALUEFUNC(_wrap_new_QRDrawPS), -1);
3887
+ rb_define_method(cQRDrawPS.klass, "draw", VALUEFUNC(_wrap_QRDrawPS_draw), -1);
3888
+ cQRDrawPS.mark = 0;
3889
+ cQRDrawPS.destroy = (void (*)(void *)) free_QRDrawPS;
3890
+ cQRDrawPS.trackObjects = 0;
3891
+
3892
+ cQRDrawTIFF.klass = rb_define_class_under(mQR, "QRDrawTIFF", ((swig_class *) SWIGTYPE_p_QRDraw->clientdata)->klass);
3893
+ SWIG_TypeClientData(SWIGTYPE_p_QRDrawTIFF, (void *) &cQRDrawTIFF);
3894
+ rb_define_alloc_func(cQRDrawTIFF.klass, _wrap_QRDrawTIFF_allocate);
3895
+ rb_define_method(cQRDrawTIFF.klass, "initialize", VALUEFUNC(_wrap_new_QRDrawTIFF), -1);
3896
+ rb_define_method(cQRDrawTIFF.klass, "draw", VALUEFUNC(_wrap_QRDrawTIFF_draw), -1);
3897
+ cQRDrawTIFF.mark = 0;
3898
+ cQRDrawTIFF.destroy = (void (*)(void *)) free_QRDrawTIFF;
3899
+ cQRDrawTIFF.trackObjects = 0;
3900
+ rb_define_const(mQR, "QR_LEVEL_L", SWIG_From_int(static_cast< int >(0)));
3901
+ rb_define_const(mQR, "QR_LEVEL_M", SWIG_From_int(static_cast< int >(1)));
3902
+ rb_define_const(mQR, "QR_LEVEL_Q", SWIG_From_int(static_cast< int >(2)));
3903
+ rb_define_const(mQR, "QR_LEVEL_H", SWIG_From_int(static_cast< int >(3)));
3904
+ rb_define_const(mQR, "QR_MODE_NUMERAL", SWIG_From_int(static_cast< int >(0)));
3905
+ rb_define_const(mQR, "QR_MODE_ALPHABET", SWIG_From_int(static_cast< int >(1)));
3906
+ rb_define_const(mQR, "QR_MODE_8BIT", SWIG_From_int(static_cast< int >(2)));
3907
+ rb_define_const(mQR, "QR_MODE_KANJI", SWIG_From_int(static_cast< int >(3)));
3908
+ rb_define_const(mQR, "QR_VRESION_S", SWIG_From_int(static_cast< int >(0)));
3909
+ rb_define_const(mQR, "QR_VRESION_M", SWIG_From_int(static_cast< int >(1)));
3910
+ rb_define_const(mQR, "QR_VRESION_L", SWIG_From_int(static_cast< int >(2)));
3911
+ rb_define_const(mQR, "MAX_ALLCODEWORD", SWIG_From_int(static_cast< int >(3706)));
3912
+ rb_define_const(mQR, "MAX_DATACODEWORD", SWIG_From_int(static_cast< int >(2956)));
3913
+ rb_define_const(mQR, "MAX_CODEBLOCK", SWIG_From_int(static_cast< int >(153)));
3914
+ rb_define_const(mQR, "QR_MARGIN", SWIG_From_int(static_cast< int >(4)));
3915
+
3916
+ cRS_BLOCKINFO.klass = rb_define_class_under(mQR, "RS_BLOCKINFO", rb_cObject);
3917
+ SWIG_TypeClientData(SWIGTYPE_p_tagRS_BLOCKINFO, (void *) &cRS_BLOCKINFO);
3918
+ rb_define_alloc_func(cRS_BLOCKINFO.klass, _wrap_RS_BLOCKINFO_allocate);
3919
+ rb_define_method(cRS_BLOCKINFO.klass, "initialize", VALUEFUNC(_wrap_new_RS_BLOCKINFO), -1);
3920
+ rb_define_method(cRS_BLOCKINFO.klass, "ncRSBlock=", VALUEFUNC(_wrap_RS_BLOCKINFO_ncRSBlock_set), -1);
3921
+ rb_define_method(cRS_BLOCKINFO.klass, "ncRSBlock", VALUEFUNC(_wrap_RS_BLOCKINFO_ncRSBlock_get), -1);
3922
+ rb_define_method(cRS_BLOCKINFO.klass, "ncAllCodeWord=", VALUEFUNC(_wrap_RS_BLOCKINFO_ncAllCodeWord_set), -1);
3923
+ rb_define_method(cRS_BLOCKINFO.klass, "ncAllCodeWord", VALUEFUNC(_wrap_RS_BLOCKINFO_ncAllCodeWord_get), -1);
3924
+ rb_define_method(cRS_BLOCKINFO.klass, "ncDataCodeWord=", VALUEFUNC(_wrap_RS_BLOCKINFO_ncDataCodeWord_set), -1);
3925
+ rb_define_method(cRS_BLOCKINFO.klass, "ncDataCodeWord", VALUEFUNC(_wrap_RS_BLOCKINFO_ncDataCodeWord_get), -1);
3926
+ cRS_BLOCKINFO.mark = 0;
3927
+ cRS_BLOCKINFO.destroy = (void (*)(void *)) free_RS_BLOCKINFO;
3928
+ cRS_BLOCKINFO.trackObjects = 0;
3929
+
3930
+ cQR_VERSIONINFO.klass = rb_define_class_under(mQR, "QR_VERSIONINFO", rb_cObject);
3931
+ SWIG_TypeClientData(SWIGTYPE_p_tagQR_VERSIONINFO, (void *) &cQR_VERSIONINFO);
3932
+ rb_define_alloc_func(cQR_VERSIONINFO.klass, _wrap_QR_VERSIONINFO_allocate);
3933
+ rb_define_method(cQR_VERSIONINFO.klass, "initialize", VALUEFUNC(_wrap_new_QR_VERSIONINFO), -1);
3934
+ rb_define_method(cQR_VERSIONINFO.klass, "nVersionNo=", VALUEFUNC(_wrap_QR_VERSIONINFO_nVersionNo_set), -1);
3935
+ rb_define_method(cQR_VERSIONINFO.klass, "nVersionNo", VALUEFUNC(_wrap_QR_VERSIONINFO_nVersionNo_get), -1);
3936
+ rb_define_method(cQR_VERSIONINFO.klass, "ncAllCodeWord=", VALUEFUNC(_wrap_QR_VERSIONINFO_ncAllCodeWord_set), -1);
3937
+ rb_define_method(cQR_VERSIONINFO.klass, "ncAllCodeWord", VALUEFUNC(_wrap_QR_VERSIONINFO_ncAllCodeWord_get), -1);
3938
+ rb_define_method(cQR_VERSIONINFO.klass, "ncDataCodeWord=", VALUEFUNC(_wrap_QR_VERSIONINFO_ncDataCodeWord_set), -1);
3939
+ rb_define_method(cQR_VERSIONINFO.klass, "ncDataCodeWord", VALUEFUNC(_wrap_QR_VERSIONINFO_ncDataCodeWord_get), -1);
3940
+ rb_define_method(cQR_VERSIONINFO.klass, "ncAlignPoint=", VALUEFUNC(_wrap_QR_VERSIONINFO_ncAlignPoint_set), -1);
3941
+ rb_define_method(cQR_VERSIONINFO.klass, "ncAlignPoint", VALUEFUNC(_wrap_QR_VERSIONINFO_ncAlignPoint_get), -1);
3942
+ rb_define_method(cQR_VERSIONINFO.klass, "nAlignPoint=", VALUEFUNC(_wrap_QR_VERSIONINFO_nAlignPoint_set), -1);
3943
+ rb_define_method(cQR_VERSIONINFO.klass, "nAlignPoint", VALUEFUNC(_wrap_QR_VERSIONINFO_nAlignPoint_get), -1);
3944
+ rb_define_method(cQR_VERSIONINFO.klass, "RS_BlockInfo1=", VALUEFUNC(_wrap_QR_VERSIONINFO_RS_BlockInfo1_set), -1);
3945
+ rb_define_method(cQR_VERSIONINFO.klass, "RS_BlockInfo1", VALUEFUNC(_wrap_QR_VERSIONINFO_RS_BlockInfo1_get), -1);
3946
+ rb_define_method(cQR_VERSIONINFO.klass, "RS_BlockInfo2=", VALUEFUNC(_wrap_QR_VERSIONINFO_RS_BlockInfo2_set), -1);
3947
+ rb_define_method(cQR_VERSIONINFO.klass, "RS_BlockInfo2", VALUEFUNC(_wrap_QR_VERSIONINFO_RS_BlockInfo2_get), -1);
3948
+ cQR_VERSIONINFO.mark = 0;
3949
+ cQR_VERSIONINFO.destroy = (void (*)(void *)) free_QR_VERSIONINFO;
3950
+ cQR_VERSIONINFO.trackObjects = 0;
3951
+
3952
+ cCQR_Encode.klass = rb_define_class_under(mQR, "CQR_Encode", rb_cObject);
3953
+ SWIG_TypeClientData(SWIGTYPE_p_CQR_Encode, (void *) &cCQR_Encode);
3954
+ rb_define_alloc_func(cCQR_Encode.klass, _wrap_CQR_Encode_allocate);
3955
+ rb_define_method(cCQR_Encode.klass, "initialize", VALUEFUNC(_wrap_new_CQR_Encode), -1);
3956
+ rb_define_method(cCQR_Encode.klass, "m_nLevel=", VALUEFUNC(_wrap_CQR_Encode_m_nLevel_set), -1);
3957
+ rb_define_method(cCQR_Encode.klass, "m_nLevel", VALUEFUNC(_wrap_CQR_Encode_m_nLevel_get), -1);
3958
+ rb_define_method(cCQR_Encode.klass, "m_nVersion=", VALUEFUNC(_wrap_CQR_Encode_m_nVersion_set), -1);
3959
+ rb_define_method(cCQR_Encode.klass, "m_nVersion", VALUEFUNC(_wrap_CQR_Encode_m_nVersion_get), -1);
3960
+ rb_define_method(cCQR_Encode.klass, "m_bAutoExtent=", VALUEFUNC(_wrap_CQR_Encode_m_bAutoExtent_set), -1);
3961
+ rb_define_method(cCQR_Encode.klass, "m_bAutoExtent", VALUEFUNC(_wrap_CQR_Encode_m_bAutoExtent_get), -1);
3962
+ rb_define_method(cCQR_Encode.klass, "m_nMaskingNo=", VALUEFUNC(_wrap_CQR_Encode_m_nMaskingNo_set), -1);
3963
+ rb_define_method(cCQR_Encode.klass, "m_nMaskingNo", VALUEFUNC(_wrap_CQR_Encode_m_nMaskingNo_get), -1);
3964
+ rb_define_method(cCQR_Encode.klass, "m_nSymbleSize=", VALUEFUNC(_wrap_CQR_Encode_m_nSymbleSize_set), -1);
3965
+ rb_define_method(cCQR_Encode.klass, "m_nSymbleSize", VALUEFUNC(_wrap_CQR_Encode_m_nSymbleSize_get), -1);
3966
+ rb_define_method(cCQR_Encode.klass, "m_byModuleData=", VALUEFUNC(_wrap_CQR_Encode_m_byModuleData_set), -1);
3967
+ rb_define_method(cCQR_Encode.klass, "m_byModuleData", VALUEFUNC(_wrap_CQR_Encode_m_byModuleData_get), -1);
3968
+ rb_define_method(cCQR_Encode.klass, "EncodeData", VALUEFUNC(_wrap_CQR_Encode_EncodeData), -1);
3969
+ cCQR_Encode.mark = 0;
3970
+ cCQR_Encode.destroy = (void (*)(void *)) free_CQR_Encode;
3971
+ cCQR_Encode.trackObjects = 0;
3972
+ }
3973
+