1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 3.0.13
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 // The Ruby 2.3 headers contain things which cause warnings with more recent
12 // C++ compilers.  There's nothing we can really do about them, so just
13 // suppress them.
14 #ifdef __clang__
15 # pragma clang diagnostic push
16 # pragma clang diagnostic ignored "-Wdeprecated-register"
17 # pragma clang diagnostic ignored "-Wreserved-user-defined-literal"
18 #elif defined __GNUC__
19 // Warning added in GCC 4.8 and we don't support anything older.
20 # pragma GCC diagnostic push
21 # pragma GCC diagnostic ignored "-Wliteral-suffix"
22 #endif
23 
24 #include <ruby.h>
25 #include <ruby/version.h>
26 
27 #ifdef __clang__
28 # pragma clang diagnostic pop
29 #elif defined __GNUC__
30 # pragma GCC diagnostic pop
31 #endif
32 
33 
34 
35 #ifndef SWIGRUBY
36 #define SWIGRUBY
37 #endif
38 
39 #define SWIG_DIRECTORS
40 
41 
42 #ifdef __cplusplus
43 /* SwigValueWrapper is described in swig.swg */
44 template<typename T> class SwigValueWrapper {
45   struct SwigMovePointer {
46     T *ptr;
SwigMovePointerSwigValueWrapper::SwigMovePointer47     SwigMovePointer(T *p) : ptr(p) { }
~SwigMovePointerSwigValueWrapper::SwigMovePointer48     ~SwigMovePointer() { delete ptr; }
operator =SwigValueWrapper::SwigMovePointer49     SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
50   } pointer;
51   SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
52   SwigValueWrapper(const SwigValueWrapper<T>& rhs);
53 public:
SwigValueWrapper()54   SwigValueWrapper() : pointer(0) { }
operator =(const T & t)55   SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
operator T&() const56   operator T&() const { return *pointer.ptr; }
operator &()57   T *operator&() { return pointer.ptr; }
58 };
59 
SwigValueInit()60 template <typename T> T SwigValueInit() {
61   return T();
62 }
63 #endif
64 
65 /* -----------------------------------------------------------------------------
66  *  This section contains generic SWIG labels for method/variable
67  *  declarations/attributes, and other compiler dependent labels.
68  * ----------------------------------------------------------------------------- */
69 
70 /* template workaround for compilers that cannot correctly implement the C++ standard */
71 #ifndef SWIGTEMPLATEDISAMBIGUATOR
72 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
73 #  define SWIGTEMPLATEDISAMBIGUATOR template
74 # elif defined(__HP_aCC)
75 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
76 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
77 #  define SWIGTEMPLATEDISAMBIGUATOR template
78 # else
79 #  define SWIGTEMPLATEDISAMBIGUATOR
80 # endif
81 #endif
82 
83 /* inline attribute */
84 #ifndef SWIGINLINE
85 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
86 #   define SWIGINLINE inline
87 # else
88 #   define SWIGINLINE
89 # endif
90 #endif
91 
92 /* attribute recognised by some compilers to avoid 'unused' warnings */
93 #ifndef SWIGUNUSED
94 # if defined(__GNUC__)
95 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
96 #     define SWIGUNUSED __attribute__ ((__unused__))
97 #   else
98 #     define SWIGUNUSED
99 #   endif
100 # elif defined(__ICC)
101 #   define SWIGUNUSED __attribute__ ((__unused__))
102 # else
103 #   define SWIGUNUSED
104 # endif
105 #endif
106 
107 #ifndef SWIG_MSC_UNSUPPRESS_4505
108 # if defined(_MSC_VER)
109 #   pragma warning(disable : 4505) /* unreferenced local function has been removed */
110 # endif
111 #endif
112 
113 #ifndef SWIGUNUSEDPARM
114 # ifdef __cplusplus
115 #   define SWIGUNUSEDPARM(p)
116 # else
117 #   define SWIGUNUSEDPARM(p) p SWIGUNUSED
118 # endif
119 #endif
120 
121 /* internal SWIG method */
122 #ifndef SWIGINTERN
123 # define SWIGINTERN static SWIGUNUSED
124 #endif
125 
126 /* internal inline SWIG method */
127 #ifndef SWIGINTERNINLINE
128 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
129 #endif
130 
131 /* exporting methods */
132 #if defined(__GNUC__)
133 #  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
134 #    ifndef GCC_HASCLASSVISIBILITY
135 #      define GCC_HASCLASSVISIBILITY
136 #    endif
137 #  endif
138 #endif
139 
140 #ifndef SWIGEXPORT
141 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
142 #   if defined(STATIC_LINKED)
143 #     define SWIGEXPORT
144 #   else
145 #     define SWIGEXPORT __declspec(dllexport)
146 #   endif
147 # else
148 #   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
149 #     define SWIGEXPORT __attribute__ ((visibility("default")))
150 #   else
151 #     define SWIGEXPORT
152 #   endif
153 # endif
154 #endif
155 
156 /* calling conventions for Windows */
157 #ifndef SWIGSTDCALL
158 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
159 #   define SWIGSTDCALL __stdcall
160 # else
161 #   define SWIGSTDCALL
162 # endif
163 #endif
164 
165 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
166 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
167 # define _CRT_SECURE_NO_DEPRECATE
168 #endif
169 
170 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
171 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
172 # define _SCL_SECURE_NO_DEPRECATE
173 #endif
174 
175 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
176 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
177 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
178 #endif
179 
180 /* Intel's compiler complains if a variable which was never initialised is
181  * cast to void, which is a common idiom which we use to indicate that we
182  * are aware a variable isn't used.  So we just silence that warning.
183  * See: https://github.com/swig/swig/issues/192 for more discussion.
184  */
185 #ifdef __INTEL_COMPILER
186 # pragma warning disable 592
187 #endif
188 
189 /* -----------------------------------------------------------------------------
190  *  This section contains generic SWIG labels for method/variable
191  *  declarations/attributes, and other compiler dependent labels.
192  * ----------------------------------------------------------------------------- */
193 
194 /* template workaround for compilers that cannot correctly implement the C++ standard */
195 #ifndef SWIGTEMPLATEDISAMBIGUATOR
196 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
197 #  define SWIGTEMPLATEDISAMBIGUATOR template
198 # elif defined(__HP_aCC)
199 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
200 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
201 #  define SWIGTEMPLATEDISAMBIGUATOR template
202 # else
203 #  define SWIGTEMPLATEDISAMBIGUATOR
204 # endif
205 #endif
206 
207 /* inline attribute */
208 #ifndef SWIGINLINE
209 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
210 #   define SWIGINLINE inline
211 # else
212 #   define SWIGINLINE
213 # endif
214 #endif
215 
216 /* attribute recognised by some compilers to avoid 'unused' warnings */
217 #ifndef SWIGUNUSED
218 # if defined(__GNUC__)
219 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
220 #     define SWIGUNUSED __attribute__ ((__unused__))
221 #   else
222 #     define SWIGUNUSED
223 #   endif
224 # elif defined(__ICC)
225 #   define SWIGUNUSED __attribute__ ((__unused__))
226 # else
227 #   define SWIGUNUSED
228 # endif
229 #endif
230 
231 #ifndef SWIG_MSC_UNSUPPRESS_4505
232 # if defined(_MSC_VER)
233 #   pragma warning(disable : 4505) /* unreferenced local function has been removed */
234 # endif
235 #endif
236 
237 #ifndef SWIGUNUSEDPARM
238 # ifdef __cplusplus
239 #   define SWIGUNUSEDPARM(p)
240 # else
241 #   define SWIGUNUSEDPARM(p) p SWIGUNUSED
242 # endif
243 #endif
244 
245 /* internal SWIG method */
246 #ifndef SWIGINTERN
247 # define SWIGINTERN static SWIGUNUSED
248 #endif
249 
250 /* internal inline SWIG method */
251 #ifndef SWIGINTERNINLINE
252 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
253 #endif
254 
255 /* exporting methods */
256 #if defined(__GNUC__)
257 #  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
258 #    ifndef GCC_HASCLASSVISIBILITY
259 #      define GCC_HASCLASSVISIBILITY
260 #    endif
261 #  endif
262 #endif
263 
264 #ifndef SWIGEXPORT
265 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
266 #   if defined(STATIC_LINKED)
267 #     define SWIGEXPORT
268 #   else
269 #     define SWIGEXPORT __declspec(dllexport)
270 #   endif
271 # else
272 #   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
273 #     define SWIGEXPORT __attribute__ ((visibility("default")))
274 #   else
275 #     define SWIGEXPORT
276 #   endif
277 # endif
278 #endif
279 
280 /* calling conventions for Windows */
281 #ifndef SWIGSTDCALL
282 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
283 #   define SWIGSTDCALL __stdcall
284 # else
285 #   define SWIGSTDCALL
286 # endif
287 #endif
288 
289 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
290 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
291 # define _CRT_SECURE_NO_DEPRECATE
292 #endif
293 
294 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
295 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
296 # define _SCL_SECURE_NO_DEPRECATE
297 #endif
298 
299 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
300 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
301 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
302 #endif
303 
304 /* Intel's compiler complains if a variable which was never initialised is
305  * cast to void, which is a common idiom which we use to indicate that we
306  * are aware a variable isn't used.  So we just silence that warning.
307  * See: https://github.com/swig/swig/issues/192 for more discussion.
308  */
309 #ifdef __INTEL_COMPILER
310 # pragma warning disable 592
311 #endif
312 
313 /* -----------------------------------------------------------------------------
314  * swigrun.swg
315  *
316  * This file contains generic C API SWIG runtime support for pointer
317  * type checking.
318  * ----------------------------------------------------------------------------- */
319 
320 /* This should only be incremented when either the layout of swig_type_info changes,
321    or for whatever reason, the runtime changes incompatibly */
322 #define SWIG_RUNTIME_VERSION "4"
323 
324 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
325 #ifdef SWIG_TYPE_TABLE
326 # define SWIG_QUOTE_STRING(x) #x
327 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
328 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
329 #else
330 # define SWIG_TYPE_TABLE_NAME
331 #endif
332 
333 /*
334   You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
335   creating a static or dynamic library from the SWIG runtime code.
336   In 99.9% of the cases, SWIG just needs to declare them as 'static'.
337 
338   But only do this if strictly necessary, ie, if you have problems
339   with your compiler or suchlike.
340 */
341 
342 #ifndef SWIGRUNTIME
343 # define SWIGRUNTIME SWIGINTERN
344 #endif
345 
346 #ifndef SWIGRUNTIMEINLINE
347 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
348 #endif
349 
350 /*  Generic buffer size */
351 #ifndef SWIG_BUFFER_SIZE
352 # define SWIG_BUFFER_SIZE 1024
353 #endif
354 
355 /* Flags for pointer conversions */
356 #define SWIG_POINTER_DISOWN        0x1
357 #define SWIG_CAST_NEW_MEMORY       0x2
358 
359 /* Flags for new pointer objects */
360 #define SWIG_POINTER_OWN           0x1
361 
362 
363 /*
364    Flags/methods for returning states.
365 
366    The SWIG conversion methods, as ConvertPtr, return an integer
367    that tells if the conversion was successful or not. And if not,
368    an error code can be returned (see swigerrors.swg for the codes).
369 
370    Use the following macros/flags to set or process the returning
371    states.
372 
373    In old versions of SWIG, code such as the following was usually written:
374 
375      if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
376        // success code
377      } else {
378        //fail code
379      }
380 
381    Now you can be more explicit:
382 
383     int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
384     if (SWIG_IsOK(res)) {
385       // success code
386     } else {
387       // fail code
388     }
389 
390    which is the same really, but now you can also do
391 
392     Type *ptr;
393     int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
394     if (SWIG_IsOK(res)) {
395       // success code
396       if (SWIG_IsNewObj(res) {
397         ...
398 	delete *ptr;
399       } else {
400         ...
401       }
402     } else {
403       // fail code
404     }
405 
406    I.e., now SWIG_ConvertPtr can return new objects and you can
407    identify the case and take care of the deallocation. Of course that
408    also requires SWIG_ConvertPtr to return new result values, such as
409 
410       int SWIG_ConvertPtr(obj, ptr,...) {
411         if (<obj is ok>) {
412           if (<need new object>) {
413             *ptr = <ptr to new allocated object>;
414             return SWIG_NEWOBJ;
415           } else {
416             *ptr = <ptr to old object>;
417             return SWIG_OLDOBJ;
418           }
419         } else {
420           return SWIG_BADOBJ;
421         }
422       }
423 
424    Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
425    more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
426    SWIG errors code.
427 
428    Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
429    allows to return the 'cast rank', for example, if you have this
430 
431        int food(double)
432        int fooi(int);
433 
434    and you call
435 
436       food(1)   // cast rank '1'  (1 -> 1.0)
437       fooi(1)   // cast rank '0'
438 
439    just use the SWIG_AddCast()/SWIG_CheckState()
440 */
441 
442 #define SWIG_OK                    (0)
443 #define SWIG_ERROR                 (-1)
444 #define SWIG_IsOK(r)               (r >= 0)
445 #define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)
446 
447 /* The CastRankLimit says how many bits are used for the cast rank */
448 #define SWIG_CASTRANKLIMIT         (1 << 8)
449 /* The NewMask denotes the object was created (using new/malloc) */
450 #define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
451 /* The TmpMask is for in/out typemaps that use temporal objects */
452 #define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
453 /* Simple returning values */
454 #define SWIG_BADOBJ                (SWIG_ERROR)
455 #define SWIG_OLDOBJ                (SWIG_OK)
456 #define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
457 #define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
458 /* Check, add and del mask methods */
459 #define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
460 #define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
461 #define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
462 #define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
463 #define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
464 #define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
465 
466 /* Cast-Rank Mode */
467 #if defined(SWIG_CASTRANK_MODE)
468 #  ifndef SWIG_TypeRank
469 #    define SWIG_TypeRank             unsigned long
470 #  endif
471 #  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
472 #    define SWIG_MAXCASTRANK          (2)
473 #  endif
474 #  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
475 #  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
SWIG_AddCast(int r)476 SWIGINTERNINLINE int SWIG_AddCast(int r) {
477   return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
478 }
SWIG_CheckState(int r)479 SWIGINTERNINLINE int SWIG_CheckState(int r) {
480   return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
481 }
482 #else /* no cast-rank mode */
483 #  define SWIG_AddCast(r) (r)
484 #  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
485 #endif
486 
487 
488 #include <string.h>
489 
490 #ifdef __cplusplus
491 extern "C" {
492 #endif
493 
494 typedef void *(*swig_converter_func)(void *, int *);
495 typedef struct swig_type_info *(*swig_dycast_func)(void **);
496 
497 /* Structure to store information on one type */
498 typedef struct swig_type_info {
499   const char             *name;			/* mangled name of this type */
500   const char             *str;			/* human readable name of this type */
501   swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
502   struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
503   void                   *clientdata;		/* language specific type data */
504   int                    owndata;		/* flag if the structure owns the clientdata */
505 } swig_type_info;
506 
507 /* Structure to store a type and conversion function used for casting */
508 typedef struct swig_cast_info {
509   swig_type_info         *type;			/* pointer to type that is equivalent to this type */
510   swig_converter_func     converter;		/* function to cast the void pointers */
511   struct swig_cast_info  *next;			/* pointer to next cast in linked list */
512   struct swig_cast_info  *prev;			/* pointer to the previous cast */
513 } swig_cast_info;
514 
515 /* Structure used to store module information
516  * Each module generates one structure like this, and the runtime collects
517  * all of these structures and stores them in a circularly linked list.*/
518 typedef struct swig_module_info {
519   swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
520   size_t                 size;		        /* Number of types in this module */
521   struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
522   swig_type_info         **type_initial;	/* Array of initially generated type structures */
523   swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
524   void                    *clientdata;		/* Language specific module data */
525 } swig_module_info;
526 
527 /*
528   Compare two type names skipping the space characters, therefore
529   "char*" == "char *" and "Class<int>" == "Class<int >", etc.
530 
531   Return 0 when the two name types are equivalent, as in
532   strncmp, but skipping ' '.
533 */
534 SWIGRUNTIME int
SWIG_TypeNameComp(const char * f1,const char * l1,const char * f2,const char * l2)535 SWIG_TypeNameComp(const char *f1, const char *l1,
536 		  const char *f2, const char *l2) {
537   for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
538     while ((*f1 == ' ') && (f1 != l1)) ++f1;
539     while ((*f2 == ' ') && (f2 != l2)) ++f2;
540     if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
541   }
542   return (int)((l1 - f1) - (l2 - f2));
543 }
544 
545 /*
546   Check type equivalence in a name list like <name1>|<name2>|...
547   Return 0 if equal, -1 if nb < tb, 1 if nb > tb
548 */
549 SWIGRUNTIME int
SWIG_TypeCmp(const char * nb,const char * tb)550 SWIG_TypeCmp(const char *nb, const char *tb) {
551   int equiv = 1;
552   const char* te = tb + strlen(tb);
553   const char* ne = nb;
554   while (equiv != 0 && *ne) {
555     for (nb = ne; *ne; ++ne) {
556       if (*ne == '|') break;
557     }
558     equiv = SWIG_TypeNameComp(nb, ne, tb, te);
559     if (*ne) ++ne;
560   }
561   return equiv;
562 }
563 
564 /*
565   Check type equivalence in a name list like <name1>|<name2>|...
566   Return 0 if not equal, 1 if equal
567 */
568 SWIGRUNTIME int
SWIG_TypeEquiv(const char * nb,const char * tb)569 SWIG_TypeEquiv(const char *nb, const char *tb) {
570   return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
571 }
572 
573 /*
574   Check the typename
575 */
576 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char * c,swig_type_info * ty)577 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
578   if (ty) {
579     swig_cast_info *iter = ty->cast;
580     while (iter) {
581       if (strcmp(iter->type->name, c) == 0) {
582         if (iter == ty->cast)
583           return iter;
584         /* Move iter to the top of the linked list */
585         iter->prev->next = iter->next;
586         if (iter->next)
587           iter->next->prev = iter->prev;
588         iter->next = ty->cast;
589         iter->prev = 0;
590         if (ty->cast) ty->cast->prev = iter;
591         ty->cast = iter;
592         return iter;
593       }
594       iter = iter->next;
595     }
596   }
597   return 0;
598 }
599 
600 /*
601   Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
602 */
603 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info * from,swig_type_info * ty)604 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
605   if (ty) {
606     swig_cast_info *iter = ty->cast;
607     while (iter) {
608       if (iter->type == from) {
609         if (iter == ty->cast)
610           return iter;
611         /* Move iter to the top of the linked list */
612         iter->prev->next = iter->next;
613         if (iter->next)
614           iter->next->prev = iter->prev;
615         iter->next = ty->cast;
616         iter->prev = 0;
617         if (ty->cast) ty->cast->prev = iter;
618         ty->cast = iter;
619         return iter;
620       }
621       iter = iter->next;
622     }
623   }
624   return 0;
625 }
626 
627 /*
628   Cast a pointer up an inheritance hierarchy
629 */
630 SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info * ty,void * ptr,int * newmemory)631 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
632   return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
633 }
634 
635 /*
636    Dynamic pointer casting. Down an inheritance hierarchy
637 */
638 SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info * ty,void ** ptr)639 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
640   swig_type_info *lastty = ty;
641   if (!ty || !ty->dcast) return ty;
642   while (ty && (ty->dcast)) {
643     ty = (*ty->dcast)(ptr);
644     if (ty) lastty = ty;
645   }
646   return lastty;
647 }
648 
649 /*
650   Return the name associated with this type
651 */
652 SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info * ty)653 SWIG_TypeName(const swig_type_info *ty) {
654   return ty->name;
655 }
656 
657 /*
658   Return the pretty name associated with this type,
659   that is an unmangled type name in a form presentable to the user.
660 */
661 SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info * type)662 SWIG_TypePrettyName(const swig_type_info *type) {
663   /* The "str" field contains the equivalent pretty names of the
664      type, separated by vertical-bar characters.  We choose
665      to print the last name, as it is often (?) the most
666      specific. */
667   if (!type) return NULL;
668   if (type->str != NULL) {
669     const char *last_name = type->str;
670     const char *s;
671     for (s = type->str; *s; s++)
672       if (*s == '|') last_name = s+1;
673     return last_name;
674   }
675   else
676     return type->name;
677 }
678 
679 /*
680    Set the clientdata field for a type
681 */
682 SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info * ti,void * clientdata)683 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
684   swig_cast_info *cast = ti->cast;
685   /* if (ti->clientdata == clientdata) return; */
686   ti->clientdata = clientdata;
687 
688   while (cast) {
689     if (!cast->converter) {
690       swig_type_info *tc = cast->type;
691       if (!tc->clientdata) {
692 	SWIG_TypeClientData(tc, clientdata);
693       }
694     }
695     cast = cast->next;
696   }
697 }
698 SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info * ti,void * clientdata)699 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
700   SWIG_TypeClientData(ti, clientdata);
701   ti->owndata = 1;
702 }
703 
704 /*
705   Search for a swig_type_info structure only by mangled name
706   Search is a O(log #types)
707 
708   We start searching at module start, and finish searching when start == end.
709   Note: if start == end at the beginning of the function, we go all the way around
710   the circular list.
711 */
712 SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)713 SWIG_MangledTypeQueryModule(swig_module_info *start,
714                             swig_module_info *end,
715 		            const char *name) {
716   swig_module_info *iter = start;
717   do {
718     if (iter->size) {
719       size_t l = 0;
720       size_t r = iter->size - 1;
721       do {
722 	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
723 	size_t i = (l + r) >> 1;
724 	const char *iname = iter->types[i]->name;
725 	if (iname) {
726 	  int compare = strcmp(name, iname);
727 	  if (compare == 0) {
728 	    return iter->types[i];
729 	  } else if (compare < 0) {
730 	    if (i) {
731 	      r = i - 1;
732 	    } else {
733 	      break;
734 	    }
735 	  } else if (compare > 0) {
736 	    l = i + 1;
737 	  }
738 	} else {
739 	  break; /* should never happen */
740 	}
741       } while (l <= r);
742     }
743     iter = iter->next;
744   } while (iter != end);
745   return 0;
746 }
747 
748 /*
749   Search for a swig_type_info structure for either a mangled name or a human readable name.
750   It first searches the mangled names of the types, which is a O(log #types)
751   If a type is not found it then searches the human readable names, which is O(#types).
752 
753   We start searching at module start, and finish searching when start == end.
754   Note: if start == end at the beginning of the function, we go all the way around
755   the circular list.
756 */
757 SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)758 SWIG_TypeQueryModule(swig_module_info *start,
759                      swig_module_info *end,
760 		     const char *name) {
761   /* STEP 1: Search the name field using binary search */
762   swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
763   if (ret) {
764     return ret;
765   } else {
766     /* STEP 2: If the type hasn't been found, do a complete search
767        of the str field (the human readable name) */
768     swig_module_info *iter = start;
769     do {
770       size_t i = 0;
771       for (; i < iter->size; ++i) {
772 	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
773 	  return iter->types[i];
774       }
775       iter = iter->next;
776     } while (iter != end);
777   }
778 
779   /* neither found a match */
780   return 0;
781 }
782 
783 /*
784    Pack binary data into a string
785 */
786 SWIGRUNTIME char *
SWIG_PackData(char * c,void * ptr,size_t sz)787 SWIG_PackData(char *c, void *ptr, size_t sz) {
788   static const char hex[17] = "0123456789abcdef";
789   const unsigned char *u = (unsigned char *) ptr;
790   const unsigned char *eu =  u + sz;
791   for (; u != eu; ++u) {
792     unsigned char uu = *u;
793     *(c++) = hex[(uu & 0xf0) >> 4];
794     *(c++) = hex[uu & 0xf];
795   }
796   return c;
797 }
798 
799 /*
800    Unpack binary data from a string
801 */
802 SWIGRUNTIME const char *
SWIG_UnpackData(const char * c,void * ptr,size_t sz)803 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
804   unsigned char *u = (unsigned char *) ptr;
805   const unsigned char *eu = u + sz;
806   for (; u != eu; ++u) {
807     char d = *(c++);
808     unsigned char uu;
809     if ((d >= '0') && (d <= '9'))
810       uu = (unsigned char)((d - '0') << 4);
811     else if ((d >= 'a') && (d <= 'f'))
812       uu = (unsigned char)((d - ('a'-10)) << 4);
813     else
814       return (char *) 0;
815     d = *(c++);
816     if ((d >= '0') && (d <= '9'))
817       uu |= (unsigned char)(d - '0');
818     else if ((d >= 'a') && (d <= 'f'))
819       uu |= (unsigned char)(d - ('a'-10));
820     else
821       return (char *) 0;
822     *u = uu;
823   }
824   return c;
825 }
826 
827 /*
828    Pack 'void *' into a string buffer.
829 */
830 SWIGRUNTIME char *
SWIG_PackVoidPtr(char * buff,void * ptr,const char * name,size_t bsz)831 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
832   char *r = buff;
833   if ((2*sizeof(void *) + 2) > bsz) return 0;
834   *(r++) = '_';
835   r = SWIG_PackData(r,&ptr,sizeof(void *));
836   if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
837   strcpy(r,name);
838   return buff;
839 }
840 
841 SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char * c,void ** ptr,const char * name)842 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
843   if (*c != '_') {
844     if (strcmp(c,"NULL") == 0) {
845       *ptr = (void *) 0;
846       return name;
847     } else {
848       return 0;
849     }
850   }
851   return SWIG_UnpackData(++c,ptr,sizeof(void *));
852 }
853 
854 SWIGRUNTIME char *
SWIG_PackDataName(char * buff,void * ptr,size_t sz,const char * name,size_t bsz)855 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
856   char *r = buff;
857   size_t lname = (name ? strlen(name) : 0);
858   if ((2*sz + 2 + lname) > bsz) return 0;
859   *(r++) = '_';
860   r = SWIG_PackData(r,ptr,sz);
861   if (lname) {
862     strncpy(r,name,lname+1);
863   } else {
864     *r = 0;
865   }
866   return buff;
867 }
868 
869 SWIGRUNTIME const char *
SWIG_UnpackDataName(const char * c,void * ptr,size_t sz,const char * name)870 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
871   if (*c != '_') {
872     if (strcmp(c,"NULL") == 0) {
873       memset(ptr,0,sz);
874       return name;
875     } else {
876       return 0;
877     }
878   }
879   return SWIG_UnpackData(++c,ptr,sz);
880 }
881 
882 #ifdef __cplusplus
883 }
884 #endif
885 
886 /*  Errors in SWIG */
887 #define  SWIG_UnknownError    	   -1
888 #define  SWIG_IOError        	   -2
889 #define  SWIG_RuntimeError   	   -3
890 #define  SWIG_IndexError     	   -4
891 #define  SWIG_TypeError      	   -5
892 #define  SWIG_DivisionByZero 	   -6
893 #define  SWIG_OverflowError  	   -7
894 #define  SWIG_SyntaxError    	   -8
895 #define  SWIG_ValueError     	   -9
896 #define  SWIG_SystemError    	   -10
897 #define  SWIG_AttributeError 	   -11
898 #define  SWIG_MemoryError    	   -12
899 #define  SWIG_NullReferenceError   -13
900 
901 
902 
903 #include <ruby.h>
904 #include <ruby/version.h>
905 
906 /* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which
907  * breaks using rb_intern as an lvalue, as SWIG does.  We work around this
908  * issue for now by disabling this.
909  * https://sourceforge.net/tracker/?func=detail&aid=2859614&group_id=1645&atid=101645
910  */
911 #ifdef rb_intern
912 # undef rb_intern
913 #endif
914 
915 /* Remove global macros defined in Ruby's win32.h */
916 #ifdef write
917 # undef write
918 #endif
919 #ifdef read
920 # undef read
921 #endif
922 #ifdef bind
923 # undef bind
924 #endif
925 #ifdef close
926 # undef close
927 #endif
928 #ifdef connect
929 # undef connect
930 #endif
931 
932 
933 /* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
934 #ifndef NUM2LL
935 #define NUM2LL(x) NUM2LONG((x))
936 #endif
937 #ifndef LL2NUM
938 #define LL2NUM(x) INT2NUM((long) (x))
939 #endif
940 #ifndef ULL2NUM
941 #define ULL2NUM(x) UINT2NUM((unsigned long) (x))
942 #endif
943 
944 /* Ruby 1.7 doesn't (yet) define NUM2ULL() */
945 #ifndef NUM2ULL
946 #ifdef HAVE_LONG_LONG
947 #define NUM2ULL(x) rb_num2ull((x))
948 #else
949 #define NUM2ULL(x) NUM2ULONG(x)
950 #endif
951 #endif
952 
953 /* RSTRING_LEN, etc are new in Ruby 1.9, but ->ptr and ->len no longer work */
954 /* Define these for older versions so we can just write code the new way */
955 #ifndef RSTRING_LEN
956 # define RSTRING_LEN(x) RSTRING(x)->len
957 #endif
958 #ifndef RSTRING_PTR
959 # define RSTRING_PTR(x) RSTRING(x)->ptr
960 #endif
961 #ifndef RSTRING_END
962 # define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x))
963 #endif
964 #ifndef RARRAY_LEN
965 # define RARRAY_LEN(x) RARRAY(x)->len
966 #endif
967 #ifndef RARRAY_PTR
968 # define RARRAY_PTR(x) RARRAY(x)->ptr
969 #endif
970 #ifndef RFLOAT_VALUE
971 # define RFLOAT_VALUE(x) RFLOAT(x)->value
972 #endif
973 #ifndef DOUBLE2NUM
974 # define DOUBLE2NUM(x) rb_float_new(x)
975 #endif
976 #ifndef RHASH_TBL
977 # define RHASH_TBL(x) (RHASH(x)->tbl)
978 #endif
979 #ifndef RHASH_ITER_LEV
980 # define RHASH_ITER_LEV(x) (RHASH(x)->iter_lev)
981 #endif
982 #ifndef RHASH_IFNONE
983 # define RHASH_IFNONE(x) (RHASH(x)->ifnone)
984 #endif
985 #ifndef RHASH_SIZE
986 # define RHASH_SIZE(x) (RHASH(x)->tbl->num_entries)
987 #endif
988 #ifndef RHASH_EMPTY_P
989 # define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0)
990 #endif
991 #ifndef RSTRUCT_LEN
992 # define RSTRUCT_LEN(x) RSTRUCT(x)->len
993 #endif
994 #ifndef RSTRUCT_PTR
995 # define RSTRUCT_PTR(x) RSTRUCT(x)->ptr
996 #endif
997 
998 
999 
1000 /*
1001  * Need to be very careful about how these macros are defined, especially
1002  * when compiling C++ code or C code with an ANSI C compiler.
1003  *
1004  * VALUEFUNC(f) is a macro used to typecast a C function that implements
1005  * a Ruby method so that it can be passed as an argument to API functions
1006  * like rb_define_method() and rb_define_singleton_method().
1007  *
1008  * VOIDFUNC(f) is a macro used to typecast a C function that implements
1009  * either the "mark" or "free" stuff for a Ruby Data object, so that it
1010  * can be passed as an argument to API functions like Data_Wrap_Struct()
1011  * and Data_Make_Struct().
1012  */
1013 
1014 #ifdef __cplusplus
1015 #  ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
1016 #    define PROTECTFUNC(f) ((VALUE (*)()) f)
1017 #    define VALUEFUNC(f) ((VALUE (*)()) f)
1018 #    define VOIDFUNC(f)  ((void (*)()) f)
1019 #  else
1020 #    ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
1021 #      define PROTECTFUNC(f) ((VALUE (*)()) f)
1022 #      define VALUEFUNC(f) ((VALUE (*)()) f)
1023 #      define VOIDFUNC(f)  ((RUBY_DATA_FUNC) f)
1024 #    else /* These definitions should work for Ruby 1.7+ */
1025 #      define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
1026 #      define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
1027 #      define VOIDFUNC(f)  ((RUBY_DATA_FUNC) f)
1028 #    endif
1029 #  endif
1030 #else
1031 #  define VALUEFUNC(f) (f)
1032 #  define VOIDFUNC(f) (f)
1033 #endif
1034 
1035 /* Don't use for expressions have side effect */
1036 #ifndef RB_STRING_VALUE
1037 #define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s)))
1038 #endif
1039 #ifndef StringValue
1040 #define StringValue(s) RB_STRING_VALUE(s)
1041 #endif
1042 #ifndef StringValuePtr
1043 #define StringValuePtr(s) RSTRING_PTR(RB_STRING_VALUE(s))
1044 #endif
1045 #ifndef StringValueLen
1046 #define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s))
1047 #endif
1048 #ifndef SafeStringValue
1049 #define SafeStringValue(v) do {\
1050     StringValue(v);\
1051     rb_check_safe_str(v);\
1052 } while (0)
1053 #endif
1054 
1055 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
1056 #define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1)
1057 #define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
1058 #endif
1059 
1060 static VALUE _mSWIG = Qnil;
1061 
1062 /* -----------------------------------------------------------------------------
1063  * error manipulation
1064  * ----------------------------------------------------------------------------- */
1065 
1066 
1067 /* Define some additional error types */
1068 #define SWIG_ObjectPreviouslyDeletedError  -100
1069 
1070 
1071 /* Define custom exceptions for errors that do not map to existing Ruby
1072    exceptions.  Note this only works for C++ since a global cannot be
1073    initialized by a function in C.  For C, fallback to rb_eRuntimeError.*/
1074 
1075 SWIGINTERN VALUE
getNullReferenceError(void)1076 getNullReferenceError(void) {
1077   static int init = 0;
1078   static VALUE rb_eNullReferenceError ;
1079   if (!init) {
1080     init = 1;
1081     rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError);
1082   }
1083   return rb_eNullReferenceError;
1084 }
1085 
1086 SWIGINTERN VALUE
getObjectPreviouslyDeletedError(void)1087 getObjectPreviouslyDeletedError(void) {
1088   static int init = 0;
1089   static VALUE rb_eObjectPreviouslyDeleted ;
1090   if (!init) {
1091     init = 1;
1092     rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError);
1093   }
1094   return rb_eObjectPreviouslyDeleted;
1095 }
1096 
1097 
1098 SWIGINTERN VALUE
SWIG_Ruby_ErrorType(int SWIG_code)1099 SWIG_Ruby_ErrorType(int SWIG_code) {
1100   VALUE type;
1101   switch (SWIG_code) {
1102   case SWIG_MemoryError:
1103     type = rb_eNoMemError;
1104     break;
1105   case SWIG_IOError:
1106     type = rb_eIOError;
1107     break;
1108   case SWIG_RuntimeError:
1109     type = rb_eRuntimeError;
1110     break;
1111   case SWIG_IndexError:
1112     type = rb_eIndexError;
1113     break;
1114   case SWIG_TypeError:
1115     type = rb_eTypeError;
1116     break;
1117   case SWIG_DivisionByZero:
1118     type = rb_eZeroDivError;
1119     break;
1120   case SWIG_OverflowError:
1121     type = rb_eRangeError;
1122     break;
1123   case SWIG_SyntaxError:
1124     type = rb_eSyntaxError;
1125     break;
1126   case SWIG_ValueError:
1127     type = rb_eArgError;
1128     break;
1129   case SWIG_SystemError:
1130     type = rb_eFatal;
1131     break;
1132   case SWIG_AttributeError:
1133     type = rb_eRuntimeError;
1134     break;
1135   case SWIG_NullReferenceError:
1136     type = getNullReferenceError();
1137     break;
1138   case SWIG_ObjectPreviouslyDeletedError:
1139     type = getObjectPreviouslyDeletedError();
1140     break;
1141   case SWIG_UnknownError:
1142     type = rb_eRuntimeError;
1143     break;
1144   default:
1145     type = rb_eRuntimeError;
1146   }
1147   return type;
1148 }
1149 
1150 
1151 /* This function is called when a user inputs a wrong argument to
1152    a method.
1153  */
1154 SWIGINTERN
Ruby_Format_TypeError(const char * msg,const char * type,const char * name,const int argn,VALUE input)1155 const char* Ruby_Format_TypeError( const char* msg,
1156 				   const char* type,
1157 				   const char* name,
1158 				   const int argn,
1159 				   VALUE input )
1160 {
1161   char buf[128];
1162   VALUE str;
1163   VALUE asStr;
1164   if ( msg && *msg )
1165     {
1166       str = rb_str_new2(msg);
1167     }
1168   else
1169     {
1170       str = rb_str_new(NULL, 0);
1171     }
1172 
1173   str = rb_str_cat2( str, "Expected argument " );
1174   sprintf( buf, "%d of type ", argn-1 );
1175   str = rb_str_cat2( str, buf );
1176   str = rb_str_cat2( str, type );
1177   str = rb_str_cat2( str, ", but got " );
1178   str = rb_str_cat2( str, rb_obj_classname(input) );
1179   str = rb_str_cat2( str, " " );
1180   asStr = rb_inspect(input);
1181   if ( RSTRING_LEN(asStr) > 30 )
1182     {
1183       str = rb_str_cat( str, StringValuePtr(asStr), 30 );
1184       str = rb_str_cat2( str, "..." );
1185     }
1186   else
1187     {
1188       str = rb_str_append( str, asStr );
1189     }
1190 
1191   if ( name )
1192     {
1193       str = rb_str_cat2( str, "\n\tin SWIG method '" );
1194       str = rb_str_cat2( str, name );
1195       str = rb_str_cat2( str, "'" );
1196     }
1197 
1198   return StringValuePtr( str );
1199 }
1200 
1201 /* This function is called when an overloaded method fails */
1202 SWIGINTERN
Ruby_Format_OverloadedError(const int argc,const int maxargs,const char * method,const char * prototypes)1203 void Ruby_Format_OverloadedError(
1204 				 const int argc,
1205 				 const int maxargs,
1206 				 const char* method,
1207 				 const char* prototypes
1208 				 )
1209 {
1210   const char* msg = "Wrong # of arguments";
1211   if ( argc <= maxargs ) msg = "Wrong arguments";
1212   rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n"
1213 	   "Possible C/C++ prototypes are:\n%s",
1214 	   msg, method, prototypes);
1215 }
1216 
1217 /* -----------------------------------------------------------------------------
1218  * rubytracking.swg
1219  *
1220  * This file contains support for tracking mappings from
1221  * Ruby objects to C++ objects.  This functionality is needed
1222  * to implement mark functions for Ruby's mark and sweep
1223  * garbage collector.
1224  * ----------------------------------------------------------------------------- */
1225 
1226 #ifdef __cplusplus
1227 extern "C" {
1228 #endif
1229 
1230 #if !defined(ST_DATA_T_DEFINED)
1231 /* Needs to be explicitly included for Ruby 1.8 and earlier */
1232 #include <st.h>
1233 #endif
1234 
1235 /* Ruby 1.8 actually assumes the first case. */
1236 #if SIZEOF_VOIDP == SIZEOF_LONG
1237 #  define SWIG2NUM(v) LONG2NUM((unsigned long)v)
1238 #  define NUM2SWIG(x) (unsigned long)NUM2LONG(x)
1239 #elif SIZEOF_VOIDP == SIZEOF_LONG_LONG
1240 #  define SWIG2NUM(v) LL2NUM((unsigned long long)v)
1241 #  define NUM2SWIG(x) (unsigned long long)NUM2LL(x)
1242 #else
1243 #  error sizeof(void*) is not the same as long or long long
1244 #endif
1245 
1246 /* Global hash table to store Trackings from C/C++
1247    structs to Ruby Objects.
1248 */
1249 static st_table* swig_ruby_trackings = NULL;
1250 
swig_ruby_trackings_count(ANYARGS)1251 static VALUE swig_ruby_trackings_count(ANYARGS) {
1252   return SWIG2NUM(swig_ruby_trackings->num_entries);
1253 }
1254 
1255 
1256 /* Setup a hash table to store Trackings */
SWIG_RubyInitializeTrackings(void)1257 SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
1258   /* Create a hash table to store Trackings from C++
1259      objects to Ruby objects. */
1260 
1261   /* Try to see if some other .so has already created a
1262      tracking hash table, which we keep hidden in an instance var
1263      in the SWIG module.
1264      This is done to allow multiple DSOs to share the same
1265      tracking table.
1266   */
1267   VALUE trackings_value = Qnil;
1268   /* change the variable name so that we can mix modules
1269      compiled with older SWIG's - this used to be called "@__trackings__" */
1270   ID trackings_id = rb_intern( "@__safetrackings__" );
1271   VALUE verbose = rb_gv_get("VERBOSE");
1272   rb_gv_set("VERBOSE", Qfalse);
1273   trackings_value = rb_ivar_get( _mSWIG, trackings_id );
1274   rb_gv_set("VERBOSE", verbose);
1275 
1276   /* The trick here is that we have to store the hash table
1277   pointer in a Ruby variable. We do not want Ruby's GC to
1278   treat this pointer as a Ruby object, so we convert it to
1279   a Ruby numeric value. */
1280   if (trackings_value == Qnil) {
1281     /* No, it hasn't.  Create one ourselves */
1282     swig_ruby_trackings = st_init_numtable();
1283     rb_ivar_set( _mSWIG, trackings_id, SWIG2NUM(swig_ruby_trackings) );
1284   } else {
1285     swig_ruby_trackings = (st_table*)NUM2SWIG(trackings_value);
1286   }
1287 
1288 #if RUBY_API_VERSION_CODE >= 20700
1289   rb_define_virtual_variable("SWIG_TRACKINGS_COUNT", swig_ruby_trackings_count, (rb_gvar_setter_t*)NULL);
1290 #else
1291   rb_define_virtual_variable("SWIG_TRACKINGS_COUNT", swig_ruby_trackings_count, NULL);
1292 #endif
1293 }
1294 
1295 /* Add a Tracking from a C/C++ struct to a Ruby object */
SWIG_RubyAddTracking(void * ptr,VALUE object)1296 SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) {
1297   /* Store the mapping to the global hash table. */
1298   st_insert(swig_ruby_trackings, (st_data_t)ptr, object);
1299 }
1300 
1301 /* Get the Ruby object that owns the specified C/C++ struct */
SWIG_RubyInstanceFor(void * ptr)1302 SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
1303   /* Now lookup the value stored in the global hash table */
1304   VALUE value;
1305 
1306   if (st_lookup(swig_ruby_trackings, (st_data_t)ptr, &value)) {
1307     return value;
1308   } else {
1309     return Qnil;
1310   }
1311 }
1312 
1313 /* Remove a Tracking from a C/C++ struct to a Ruby object.  It
1314    is very important to remove objects once they are destroyed
1315    since the same memory address may be reused later to create
1316    a new object. */
SWIG_RubyRemoveTracking(void * ptr)1317 SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
1318   /* Delete the object from the hash table */
1319   st_delete(swig_ruby_trackings, (st_data_t *)&ptr, NULL);
1320 }
1321 
1322 /* This is a helper method that unlinks a Ruby object from its
1323    underlying C++ object.  This is needed if the lifetime of the
1324    Ruby object is longer than the C++ object */
SWIG_RubyUnlinkObjects(void * ptr)1325 SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
1326   VALUE object = SWIG_RubyInstanceFor(ptr);
1327 
1328   if (object != Qnil) {
1329     if (TYPE(object) != T_DATA)
1330       abort();
1331     DATA_PTR(object) = 0;
1332   }
1333 }
1334 
1335 /* This is a helper method that iterates over all the trackings
1336    passing the C++ object pointer and its related Ruby object
1337    to the passed callback function. */
1338 
1339 /* Proxy method to abstract the internal trackings datatype */
swig_ruby_internal_iterate_callback(void * ptr,VALUE obj,void (* meth)(void * ptr,VALUE obj))1340 static int swig_ruby_internal_iterate_callback(void* ptr, VALUE obj, void(*meth)(void* ptr, VALUE obj)) {
1341   (*meth)(ptr, obj);
1342   return ST_CONTINUE;
1343 }
1344 
SWIG_RubyIterateTrackings(void (* meth)(void * ptr,VALUE obj))1345 SWIGRUNTIME void SWIG_RubyIterateTrackings( void(*meth)(void* ptr, VALUE obj) ) {
1346   st_foreach(swig_ruby_trackings, (int (*)(ANYARGS))&swig_ruby_internal_iterate_callback, (st_data_t)meth);
1347 }
1348 
1349 #ifdef __cplusplus
1350 }
1351 #endif
1352 
1353 /* -----------------------------------------------------------------------------
1354  * Ruby API portion that goes into the runtime
1355  * ----------------------------------------------------------------------------- */
1356 
1357 #ifdef __cplusplus
1358 extern "C" {
1359 #endif
1360 
1361 SWIGINTERN VALUE
SWIG_Ruby_AppendOutput(VALUE target,VALUE o)1362 SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
1363   if (NIL_P(target)) {
1364     target = o;
1365   } else {
1366     if (TYPE(target) != T_ARRAY) {
1367       VALUE o2 = target;
1368       target = rb_ary_new();
1369       rb_ary_push(target, o2);
1370     }
1371     rb_ary_push(target, o);
1372   }
1373   return target;
1374 }
1375 
1376 /* For ruby1.8.4 and earlier. */
1377 #ifndef RUBY_INIT_STACK
1378    RUBY_EXTERN void Init_stack(VALUE* addr);
1379 #  define RUBY_INIT_STACK \
1380    VALUE variable_in_this_stack_frame; \
1381    Init_stack(&variable_in_this_stack_frame);
1382 #endif
1383 
1384 
1385 #ifdef __cplusplus
1386 }
1387 #endif
1388 
1389 
1390 /* -----------------------------------------------------------------------------
1391  * rubyrun.swg
1392  *
1393  * This file contains the runtime support for Ruby modules
1394  * and includes code for managing global variables and pointer
1395  * type checking.
1396  * ----------------------------------------------------------------------------- */
1397 
1398 /* For backward compatibility only */
1399 #define SWIG_POINTER_EXCEPTION  0
1400 
1401 /* for raw pointers */
1402 #define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1403 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1404 #define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Ruby_NewPointerObj(ptr, type, flags)
1405 #define SWIG_AcquirePtr(ptr, own)                       SWIG_Ruby_AcquirePtr(ptr, own)
1406 #define swig_owntype                                    swig_ruby_owntype
1407 
1408 /* for raw packed data */
1409 #define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
1410 #define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Ruby_NewPackedObj(ptr, sz, type)
1411 
1412 /* for class or struct pointers */
1413 #define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
1414 #define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
1415 
1416 /* for C or C++ function pointers */
1417 #define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_ConvertPtr(obj, pptr, type, 0)
1418 #define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_NewPointerObj(ptr, type, 0)
1419 
1420 /* for C++ member pointers, ie, member methods */
1421 #define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty)
1422 #define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Ruby_NewPackedObj(ptr, sz, type)
1423 
1424 
1425 /* Runtime API */
1426 
1427 #define SWIG_GetModule(clientdata)                      SWIG_Ruby_GetModule(clientdata)
1428 #define SWIG_SetModule(clientdata, pointer) 		SWIG_Ruby_SetModule(pointer)
1429 
1430 
1431 /* Error manipulation */
1432 
1433 #define SWIG_ErrorType(code)                            SWIG_Ruby_ErrorType(code)
1434 #define SWIG_Error(code, msg)            		rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg)
1435 #define SWIG_fail                        		goto fail
1436 
1437 
1438 /* Ruby-specific SWIG API */
1439 
1440 #define SWIG_InitRuntime()                              SWIG_Ruby_InitRuntime()
1441 #define SWIG_define_class(ty)                        	SWIG_Ruby_define_class(ty)
1442 #define SWIG_NewClassInstance(value, ty)             	SWIG_Ruby_NewClassInstance(value, ty)
1443 #define SWIG_MangleStr(value)                        	SWIG_Ruby_MangleStr(value)
1444 #define SWIG_CheckConvert(value, ty)                 	SWIG_Ruby_CheckConvert(value, ty)
1445 
1446 #include "assert.h"
1447 
1448 /* -----------------------------------------------------------------------------
1449  * pointers/data manipulation
1450  * ----------------------------------------------------------------------------- */
1451 
1452 #ifdef __cplusplus
1453 extern "C" {
1454 #endif
1455 
1456 typedef struct {
1457   VALUE klass;
1458   VALUE mImpl;
1459   void  (*mark)(void *);
1460   void  (*destroy)(void *);
1461   int trackObjects;
1462 } swig_class;
1463 
1464 
1465 /* Global pointer used to keep some internal SWIG stuff */
1466 static VALUE _cSWIG_Pointer = Qnil;
1467 static VALUE swig_runtime_data_type_pointer = Qnil;
1468 
1469 /* Global IDs used to keep some internal SWIG stuff */
1470 static ID swig_arity_id = 0;
1471 static ID swig_call_id  = 0;
1472 
1473 /*
1474   If your swig extension is to be run within an embedded ruby and has
1475   director callbacks, you should set -DRUBY_EMBEDDED during compilation.
1476   This will reset ruby's stack frame on each entry point from the main
1477   program the first time a virtual director function is invoked (in a
1478   non-recursive way).
1479   If this is not done, you run the risk of Ruby trashing the stack.
1480 */
1481 
1482 #ifdef RUBY_EMBEDDED
1483 
1484 #  define SWIG_INIT_STACK                            \
1485       if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \
1486       ++swig_virtual_calls;
1487 #  define SWIG_RELEASE_STACK --swig_virtual_calls;
1488 #  define Ruby_DirectorTypeMismatchException(x) \
1489           rb_raise( rb_eTypeError, "%s", x ); return c_result;
1490 
1491       static unsigned int swig_virtual_calls = 0;
1492 
1493 #else  /* normal non-embedded extension */
1494 
1495 #  define SWIG_INIT_STACK
1496 #  define SWIG_RELEASE_STACK
1497 #  define Ruby_DirectorTypeMismatchException(x) \
1498           throw Swig::DirectorTypeMismatchException( x );
1499 
1500 #endif  /* RUBY_EMBEDDED */
1501 
1502 
1503 SWIGRUNTIME VALUE
getExceptionClass(void)1504 getExceptionClass(void) {
1505   static int init = 0;
1506   static VALUE rubyExceptionClass ;
1507   if (!init) {
1508     init = 1;
1509     rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception"));
1510   }
1511   return rubyExceptionClass;
1512 }
1513 
1514 /* This code checks to see if the Ruby object being raised as part
1515    of an exception inherits from the Ruby class Exception.  If so,
1516    the object is simply returned.  If not, then a new Ruby exception
1517    object is created and that will be returned to Ruby.*/
1518 SWIGRUNTIME VALUE
SWIG_Ruby_ExceptionType(swig_type_info * desc,VALUE obj)1519 SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) {
1520   VALUE exceptionClass = getExceptionClass();
1521   if (rb_obj_is_kind_of(obj, exceptionClass)) {
1522     return obj;
1523   }  else {
1524     return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj));
1525   }
1526 }
1527 
1528 /* Initialize Ruby runtime support */
1529 SWIGRUNTIME void
SWIG_Ruby_InitRuntime(void)1530 SWIG_Ruby_InitRuntime(void)
1531 {
1532   if (_mSWIG == Qnil) {
1533     _mSWIG = rb_define_module("SWIG");
1534     swig_call_id  = rb_intern("call");
1535     swig_arity_id = rb_intern("arity");
1536   }
1537 }
1538 
1539 /* Define Ruby class for C type */
1540 SWIGRUNTIME void
SWIG_Ruby_define_class(swig_type_info * type)1541 SWIG_Ruby_define_class(swig_type_info *type)
1542 {
1543   char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1544   sprintf(klass_name, "TYPE%s", type->name);
1545   if (NIL_P(_cSWIG_Pointer)) {
1546     _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
1547     rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
1548   }
1549   rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
1550   free((void *) klass_name);
1551 }
1552 
1553 /* Create a new pointer object */
1554 SWIGRUNTIME VALUE
SWIG_Ruby_NewPointerObj(void * ptr,swig_type_info * type,int flags)1555 SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1556 {
1557   int own =  flags & SWIG_POINTER_OWN;
1558   int track;
1559   char *klass_name;
1560   swig_class *sklass;
1561   VALUE klass;
1562   VALUE obj;
1563 
1564   if (!ptr)
1565     return Qnil;
1566 
1567   if (type->clientdata) {
1568     sklass = (swig_class *) type->clientdata;
1569 
1570     /* Are we tracking this class and have we already returned this Ruby object? */
1571     track = sklass->trackObjects;
1572     if (track) {
1573       obj = SWIG_RubyInstanceFor(ptr);
1574 
1575       /* Check the object's type and make sure it has the correct type.
1576         It might not in cases where methods do things like
1577         downcast methods. */
1578       if (obj != Qnil) {
1579         VALUE value = rb_iv_get(obj, "@__swigtype__");
1580         const char* type_name = RSTRING_PTR(value);
1581 
1582         if (strcmp(type->name, type_name) == 0) {
1583           return obj;
1584         }
1585       }
1586     }
1587 
1588     /* Create a new Ruby object */
1589     obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark),
1590 			   ( own ? VOIDFUNC(sklass->destroy) :
1591 			     (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )
1592 			     ), ptr);
1593 
1594     /* If tracking is on for this class then track this object. */
1595     if (track) {
1596       SWIG_RubyAddTracking(ptr, obj);
1597     }
1598   } else {
1599     klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1600     sprintf(klass_name, "TYPE%s", type->name);
1601     klass = rb_const_get(_mSWIG, rb_intern(klass_name));
1602     free((void *) klass_name);
1603     obj = Data_Wrap_Struct(klass, 0, 0, ptr);
1604   }
1605   rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
1606 
1607   return obj;
1608 }
1609 
1610 /* Create a new class instance (always owned) */
1611 SWIGRUNTIME VALUE
SWIG_Ruby_NewClassInstance(VALUE klass,swig_type_info * type)1612 SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
1613 {
1614   VALUE obj;
1615   swig_class *sklass = (swig_class *) type->clientdata;
1616   obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
1617   rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
1618   return obj;
1619 }
1620 
1621 /* Get type mangle from class name */
1622 SWIGRUNTIMEINLINE char *
SWIG_Ruby_MangleStr(VALUE obj)1623 SWIG_Ruby_MangleStr(VALUE obj)
1624 {
1625   VALUE stype = rb_iv_get(obj, "@__swigtype__");
1626   return StringValuePtr(stype);
1627 }
1628 
1629 /* Acquire a pointer value */
1630 typedef struct {
1631   void (*datafree)(void *);
1632   int own;
1633 } swig_ruby_owntype;
1634 
1635 SWIGRUNTIME swig_ruby_owntype
SWIG_Ruby_AcquirePtr(VALUE obj,swig_ruby_owntype own)1636 SWIG_Ruby_AcquirePtr(VALUE obj, swig_ruby_owntype own) {
1637   swig_ruby_owntype oldown = {0, 0};
1638   if (obj) {
1639     oldown.datafree = RDATA(obj)->dfree;
1640     RDATA(obj)->dfree = own.datafree;
1641   }
1642   return oldown;
1643 }
1644 
1645 /* Convert a pointer value */
1646 SWIGRUNTIME int
SWIG_Ruby_ConvertPtrAndOwn(VALUE obj,void ** ptr,swig_type_info * ty,int flags,swig_ruby_owntype * own)1647 SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, swig_ruby_owntype *own)
1648 {
1649   char *c;
1650   swig_cast_info *tc;
1651   void *vptr = 0;
1652 
1653   /* Grab the pointer */
1654   if (NIL_P(obj)) {
1655     if (ptr)
1656       *ptr = 0;
1657     return SWIG_OK;
1658   } else {
1659     if (TYPE(obj) != T_DATA) {
1660       return SWIG_ERROR;
1661     }
1662     Data_Get_Struct(obj, void, vptr);
1663   }
1664 
1665   if (own) {
1666     own->datafree = RDATA(obj)->dfree;
1667     own->own = 0;
1668   }
1669 
1670   /* Check to see if the input object is giving up ownership
1671      of the underlying C struct or C++ object.  If so then we
1672      need to reset the destructor since the Ruby object no
1673      longer owns the underlying C++ object.*/
1674   if (flags & SWIG_POINTER_DISOWN) {
1675     /* Is tracking on for this class? */
1676     int track = 0;
1677     if (ty && ty->clientdata) {
1678       swig_class *sklass = (swig_class *) ty->clientdata;
1679       track = sklass->trackObjects;
1680     }
1681 
1682     if (track) {
1683       /* We are tracking objects for this class.  Thus we change the destructor
1684        * to SWIG_RubyRemoveTracking.  This allows us to
1685        * remove the mapping from the C++ to Ruby object
1686        * when the Ruby object is garbage collected.  If we don't
1687        * do this, then it is possible we will return a reference
1688        * to a Ruby object that no longer exists thereby crashing Ruby. */
1689       RDATA(obj)->dfree = SWIG_RubyRemoveTracking;
1690     } else {
1691       RDATA(obj)->dfree = 0;
1692     }
1693   }
1694 
1695   /* Do type-checking if type info was provided */
1696   if (ty) {
1697     if (ty->clientdata) {
1698       if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) {
1699         if (vptr == 0) {
1700           /* The object has already been deleted */
1701           return SWIG_ObjectPreviouslyDeletedError;
1702         }
1703       }
1704     }
1705     if ((c = SWIG_MangleStr(obj)) == NULL) {
1706       return SWIG_ERROR;
1707     }
1708     tc = SWIG_TypeCheck(c, ty);
1709     if (!tc) {
1710       return SWIG_ERROR;
1711     } else {
1712       if (ptr) {
1713         if (tc->type == ty) {
1714           *ptr = vptr;
1715         } else {
1716           int newmemory = 0;
1717           *ptr = SWIG_TypeCast(tc, vptr, &newmemory);
1718           if (newmemory == SWIG_CAST_NEW_MEMORY) {
1719             assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
1720             if (own)
1721               own->own = own->own | SWIG_CAST_NEW_MEMORY;
1722           }
1723         }
1724       }
1725     }
1726   } else {
1727     if (ptr)
1728       *ptr = vptr;
1729   }
1730 
1731   return SWIG_OK;
1732 }
1733 
1734 /* Check convert */
1735 SWIGRUNTIMEINLINE int
SWIG_Ruby_CheckConvert(VALUE obj,swig_type_info * ty)1736 SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
1737 {
1738   char *c = SWIG_MangleStr(obj);
1739   if (!c) return 0;
1740   return SWIG_TypeCheck(c,ty) != 0;
1741 }
1742 
1743 SWIGRUNTIME VALUE
SWIG_Ruby_NewPackedObj(void * ptr,int sz,swig_type_info * type)1744 SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
1745   char result[1024];
1746   char *r = result;
1747   if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
1748   *(r++) = '_';
1749   r = SWIG_PackData(r, ptr, sz);
1750   strcpy(r, type->name);
1751   return rb_str_new2(result);
1752 }
1753 
1754 /* Convert a packed value value */
1755 SWIGRUNTIME int
SWIG_Ruby_ConvertPacked(VALUE obj,void * ptr,int sz,swig_type_info * ty)1756 SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
1757   swig_cast_info *tc;
1758   const char  *c;
1759 
1760   if (TYPE(obj) != T_STRING) goto type_error;
1761   c = StringValuePtr(obj);
1762   /* Pointer values must start with leading underscore */
1763   if (*c != '_') goto type_error;
1764   c++;
1765   c = SWIG_UnpackData(c, ptr, sz);
1766   if (ty) {
1767     tc = SWIG_TypeCheck(c, ty);
1768     if (!tc) goto type_error;
1769   }
1770   return SWIG_OK;
1771 
1772  type_error:
1773   return SWIG_ERROR;
1774 }
1775 
1776 SWIGRUNTIME swig_module_info *
SWIG_Ruby_GetModule(void * SWIGUNUSEDPARM (clientdata))1777 SWIG_Ruby_GetModule(void *SWIGUNUSEDPARM(clientdata))
1778 {
1779   VALUE pointer;
1780   swig_module_info *ret = 0;
1781   VALUE verbose = rb_gv_get("VERBOSE");
1782 
1783  /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */
1784   rb_gv_set("VERBOSE", Qfalse);
1785 
1786   /* first check if pointer already created */
1787   pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1788   if (pointer != Qnil) {
1789     Data_Get_Struct(pointer, swig_module_info, ret);
1790   }
1791 
1792   /* reinstate warnings */
1793   rb_gv_set("VERBOSE", verbose);
1794   return ret;
1795 }
1796 
1797 SWIGRUNTIME void
SWIG_Ruby_SetModule(swig_module_info * pointer)1798 SWIG_Ruby_SetModule(swig_module_info *pointer)
1799 {
1800   /* register a new class */
1801   VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
1802   /* create and store the structure pointer to a global variable */
1803   swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
1804   rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
1805 }
1806 
1807 /* This function can be used to check whether a proc or method or similarly
1808    callable function has been passed.  Usually used in a %typecheck, like:
1809 
1810    %typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) {
1811         $result = SWIG_Ruby_isCallable( $input );
1812    }
1813  */
1814 SWIGINTERN
SWIG_Ruby_isCallable(VALUE proc)1815 int SWIG_Ruby_isCallable( VALUE proc )
1816 {
1817   if ( rb_respond_to( proc, swig_call_id ) )
1818     return 1;
1819   return 0;
1820 }
1821 
1822 /* This function can be used to check the arity (number of arguments)
1823    a proc or method can take.  Usually used in a %typecheck.
1824    Valid arities will be that equal to minimal or those < 0
1825    which indicate a variable number of parameters at the end.
1826  */
1827 SWIGINTERN
SWIG_Ruby_arity(VALUE proc,int minimal)1828 int SWIG_Ruby_arity( VALUE proc, int minimal )
1829 {
1830   if ( rb_respond_to( proc, swig_arity_id ) )
1831     {
1832       VALUE num = rb_funcall( proc, swig_arity_id, 0 );
1833       int arity = NUM2INT(num);
1834       if ( arity < 0 && (arity+1) < -minimal ) return 1;
1835       if ( arity == minimal ) return 1;
1836       return 1;
1837     }
1838   return 0;
1839 }
1840 
1841 
1842 #ifdef __cplusplus
1843 }
1844 #endif
1845 
1846 
1847 
1848 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1849 
1850 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1851 
1852 
1853 
1854   #define SWIG_exception(code, msg) do { SWIG_Error(code, msg);; } while(0)
1855 
1856 /* -----------------------------------------------------------------------------
1857  * director_common.swg
1858  *
1859  * This file contains support for director classes which is common between
1860  * languages.
1861  * ----------------------------------------------------------------------------- */
1862 
1863 /*
1864   Use -DSWIG_DIRECTOR_STATIC if you prefer to avoid the use of the
1865   'Swig' namespace. This could be useful for multi-modules projects.
1866 */
1867 #ifdef SWIG_DIRECTOR_STATIC
1868 /* Force anonymous (static) namespace */
1869 #define Swig
1870 #endif
1871 /* -----------------------------------------------------------------------------
1872  * director.swg
1873  *
1874  * This file contains support for director classes so that Ruby proxy
1875  * methods can be called from C++.
1876  * ----------------------------------------------------------------------------- */
1877 
1878 /*
1879   Use -DSWIG_DIRECTOR_NOUEH if you prefer to avoid the use of the
1880   Undefined Exception Handler provided by swig.
1881 */
1882 #ifndef SWIG_DIRECTOR_NOUEH
1883 #ifndef SWIG_DIRECTOR_UEH
1884 #define SWIG_DIRECTOR_UEH
1885 #endif
1886 #endif
1887 
1888 #include <string>
1889 #include <iostream>
1890 #include <exception>
1891 #include <map>
1892 
1893 # define SWIG_DIRECTOR_CAST(ARG) dynamic_cast<Swig::Director *>(ARG)
1894 
1895 namespace Swig {
1896 
1897   /* memory handler */
1898   struct GCItem {
~GCItemSwig::GCItem1899     virtual ~GCItem() {
1900     }
1901 
get_ownSwig::GCItem1902     virtual swig_ruby_owntype get_own() const {
1903       swig_ruby_owntype own = {0, 0};
1904       return own;
1905     }
1906   };
1907 
1908   struct GCItem_var {
GCItem_varSwig::GCItem_var1909     GCItem_var(GCItem *item = 0) : _item(item) {
1910     }
1911 
operator =Swig::GCItem_var1912     GCItem_var& operator=(GCItem *item) {
1913       GCItem *tmp = _item;
1914       _item = item;
1915       delete tmp;
1916       return *this;
1917     }
1918 
~GCItem_varSwig::GCItem_var1919     ~GCItem_var() {
1920       delete _item;
1921     }
1922 
operator ->Swig::GCItem_var1923     GCItem *operator->() const {
1924       return _item;
1925     }
1926 
1927   private:
1928     GCItem *_item;
1929   };
1930 
1931 
1932   template <typename Type>
1933   struct GCItem_T : GCItem {
GCItem_TSwig::GCItem_T1934     GCItem_T(Type *ptr) : _ptr(ptr) {
1935     }
1936 
~GCItem_TSwig::GCItem_T1937     virtual ~GCItem_T() {
1938       delete _ptr;
1939     }
1940 
1941   private:
1942     Type *_ptr;
1943   };
1944 
1945   struct GCItem_Object : GCItem {
GCItem_ObjectSwig::GCItem_Object1946     GCItem_Object(swig_ruby_owntype own) : _own(own) {
1947     }
1948 
~GCItem_ObjectSwig::GCItem_Object1949     virtual ~GCItem_Object() {
1950     }
1951 
get_ownSwig::GCItem_Object1952     swig_ruby_owntype get_own() const {
1953       return _own;
1954     }
1955 
1956   private:
1957     swig_ruby_owntype _own;
1958   };
1959 
1960   template <typename Type>
1961   struct GCArray_T : GCItem {
GCArray_TSwig::GCArray_T1962     GCArray_T(Type *ptr) : _ptr(ptr) {
1963     }
1964 
~GCArray_TSwig::GCArray_T1965     virtual ~GCArray_T() {
1966       delete[] _ptr;
1967     }
1968 
1969   private:
1970     Type *_ptr;
1971   };
1972 
1973 
1974   /* body args */
1975   struct body_args {
1976     VALUE recv;
1977     ID id;
1978     int argc;
1979     VALUE *argv;
1980   };
1981 
1982   /* Base class for director exceptions */
1983   class DirectorException : public std::exception {
1984   protected:
1985     VALUE swig_error;
1986     std::string swig_msg;
1987   protected:
DirectorException(VALUE error)1988     DirectorException(VALUE error) : swig_error(error) {
1989     }
1990 
DirectorException(VALUE error,const char * hdr,const char * msg="")1991     DirectorException(VALUE error, const char *hdr, const char *msg ="") : swig_error(error), swig_msg(hdr) {
1992       if (msg[0]) {
1993 	swig_msg += " ";
1994 	swig_msg += msg;
1995       }
1996       if (swig_msg.size()) {
1997 	VALUE str = rb_str_new(swig_msg.data(), swig_msg.size());
1998 	swig_error = rb_exc_new3(error, str);
1999       } else {
2000 	swig_error = error;
2001       }
2002     }
2003 
2004   public:
~DirectorException()2005     virtual ~DirectorException() throw() {
2006     }
2007 
getType() const2008     VALUE getType() const {
2009       return CLASS_OF(swig_error);
2010     }
2011 
getError() const2012     VALUE getError() const {
2013       return swig_error;
2014     }
2015 
2016     /* Deprecated, use what() instead */
getMessage() const2017     const std::string& getMessage() const {
2018       return swig_msg;
2019     }
2020 
what() const2021     const char *what() const throw() {
2022       return swig_msg.c_str();
2023     }
2024   };
2025 
2026   /* unknown exception handler  */
2027   class UnknownExceptionHandler {
2028 #ifdef SWIG_DIRECTOR_UEH
handler()2029     static void handler() {
2030       try {
2031 	throw;
2032       } catch (DirectorException& e) {
2033 	std::cerr << "SWIG Director exception caught:" << std::endl
2034 		  << e.what() << std::endl;
2035       } catch (std::exception& e) {
2036 	std::cerr << "std::exception caught: "<< e.what() << std::endl;
2037       } catch (...) {
2038 	std::cerr << "Unknown exception caught." << std::endl;
2039       }
2040       std::cerr << std::endl
2041 		<< "Ruby interpreter traceback:" << std::endl;
2042       std::cerr << std::endl;
2043       std::cerr << "This exception was caught by the SWIG unexpected exception handler." << std::endl
2044 		<< "Try using %feature(\"director:except\") to avoid reaching this point." << std::endl
2045 		<< std::endl
2046 		<< "Exception is being re-thrown, program will like abort/terminate." << std::endl;
2047       throw;
2048     }
2049 
2050   public:
2051     std::unexpected_handler old;
UnknownExceptionHandler(std::unexpected_handler nh=handler)2052     UnknownExceptionHandler(std::unexpected_handler nh = handler) {
2053       old = std::set_unexpected(nh);
2054     }
2055 
~UnknownExceptionHandler()2056     ~UnknownExceptionHandler() {
2057       std::set_unexpected(old);
2058     }
2059 #endif
2060   };
2061 
2062 
2063   /* Type mismatch in the return value from a Ruby method call */
2064   class DirectorTypeMismatchException : public DirectorException {
2065   public:
DirectorTypeMismatchException(VALUE error,const char * msg="")2066     DirectorTypeMismatchException(VALUE error, const char *msg="")
2067       : DirectorException(error, "SWIG director type mismatch", msg) {
2068     }
2069 
DirectorTypeMismatchException(const char * msg="")2070     DirectorTypeMismatchException(const char *msg="")
2071       : DirectorException(rb_eTypeError, "SWIG director type mismatch", msg) {
2072     }
2073 
raise(VALUE error,const char * msg)2074     static void raise(VALUE error, const char *msg) {
2075       throw DirectorTypeMismatchException(error, msg);
2076     }
2077 
raise(const char * msg)2078     static void raise(const char *msg) {
2079       throw DirectorTypeMismatchException(msg);
2080     }
2081   };
2082 
2083   /* Any Ruby exception that occurs during a director method call */
2084   class DirectorMethodException : public DirectorException {
2085   public:
DirectorMethodException(VALUE error)2086     DirectorMethodException(VALUE error)
2087       : DirectorException(error) {
2088     }
2089 
DirectorMethodException(const char * msg="")2090     DirectorMethodException(const char *msg = "")
2091       : DirectorException(rb_eRuntimeError, "SWIG director method error.", msg) {
2092     }
2093 
raise(VALUE error)2094     static void raise(VALUE error) {
2095       throw DirectorMethodException(error);
2096     }
2097   };
2098 
2099   /* Attempted to call a pure virtual method via a director method */
2100   class DirectorPureVirtualException : public DirectorException
2101   {
2102   public:
DirectorPureVirtualException(const char * msg="")2103     DirectorPureVirtualException(const char *msg = "")
2104       : DirectorException(rb_eRuntimeError, "SWIG director pure virtual method called", msg) {
2105     }
2106 
raise(const char * msg)2107     static void raise(const char *msg) {
2108       throw DirectorPureVirtualException(msg);
2109     }
2110   };
2111 
2112   /* Simple thread abstraction for pthreads on win32 */
2113 #ifdef __THREAD__
2114 # define __PTHREAD__
2115 # if defined(_WIN32) || defined(__WIN32__)
2116 #  define pthread_mutex_lock EnterCriticalSection
2117 #  define pthread_mutex_unlock LeaveCriticalSection
2118 #  define pthread_mutex_t CRITICAL_SECTION
2119 #  define SWIG_MUTEX_INIT(var) var
2120 # else
2121 #  include <pthread.h>
2122 #  define SWIG_MUTEX_INIT(var) var = PTHREAD_MUTEX_INITIALIZER
2123 # endif
2124 #endif
2125 
2126 #ifdef  __PTHREAD__
2127   struct Guard {
2128     pthread_mutex_t *_mutex;
2129 
GuardSwig::Guard2130     Guard(pthread_mutex_t &mutex) : _mutex(&mutex) {
2131       pthread_mutex_lock(_mutex);
2132     }
2133 
~GuardSwig::Guard2134     ~Guard() {
2135       pthread_mutex_unlock(_mutex);
2136     }
2137   };
2138 # define SWIG_GUARD(mutex) Guard _guard(mutex)
2139 #else
2140 # define SWIG_GUARD(mutex)
2141 #endif
2142 
2143   /* director base class */
2144   class Director {
2145   private:
2146     /* pointer to the wrapped Ruby object */
2147     VALUE swig_self;
2148     /* flag indicating whether the object is owned by Ruby or c++ */
2149     mutable bool swig_disown_flag;
2150 
2151   public:
2152     /* wrap a Ruby object. */
Director(VALUE self)2153     Director(VALUE self) : swig_self(self), swig_disown_flag(false) {
2154     }
2155 
2156     /* discard our reference at destruction */
~Director()2157     virtual ~Director() {
2158     }
2159 
2160     /* return a pointer to the wrapped Ruby object */
swig_get_self() const2161     VALUE swig_get_self() const {
2162       return swig_self;
2163     }
2164 
2165     /* acquire ownership of the wrapped Ruby object (the sense of "disown" is from Ruby) */
swig_disown() const2166     void swig_disown() const {
2167       if (!swig_disown_flag) {
2168         swig_disown_flag = true;
2169       }
2170     }
2171 
2172   /* ownership management */
2173   private:
2174     typedef std::map<void *, GCItem_var> swig_ownership_map;
2175     mutable swig_ownership_map swig_owner;
2176 #ifdef __PTHREAD__
2177     static pthread_mutex_t swig_mutex_own;
2178 #endif
2179 
2180   public:
2181     template <typename Type>
swig_acquire_ownership_array(Type * vptr) const2182     void swig_acquire_ownership_array(Type *vptr) const {
2183       if (vptr) {
2184 	SWIG_GUARD(swig_mutex_own);
2185 	swig_owner[vptr] = new GCArray_T<Type>(vptr);
2186       }
2187     }
2188 
2189     template <typename Type>
swig_acquire_ownership(Type * vptr) const2190     void swig_acquire_ownership(Type *vptr)  const {
2191       if (vptr) {
2192 	SWIG_GUARD(swig_mutex_own);
2193 	swig_owner[vptr] = new GCItem_T<Type>(vptr);
2194       }
2195     }
2196 
swig_acquire_ownership_obj(void * vptr,swig_ruby_owntype own) const2197     void swig_acquire_ownership_obj(void *vptr, swig_ruby_owntype own) const {
2198       if (vptr && own.datafree) {
2199 	SWIG_GUARD(swig_mutex_own);
2200 	swig_owner[vptr] = new GCItem_Object(own);
2201       }
2202     }
2203 
swig_release_ownership(void * vptr) const2204     swig_ruby_owntype swig_release_ownership(void *vptr) const {
2205       swig_ruby_owntype own = {0, 0};
2206       if (vptr) {
2207 	SWIG_GUARD(swig_mutex_own);
2208 	swig_ownership_map::iterator iter = swig_owner.find(vptr);
2209 	if (iter != swig_owner.end()) {
2210 	  own.datafree = iter->second->get_own().datafree;
2211 	  swig_owner.erase(iter);
2212 	}
2213       }
2214       return own;
2215     }
2216   };
2217 }
2218 
2219 
2220 /* -------- TYPES TABLE (BEGIN) -------- */
2221 
2222 #define SWIGTYPE_p_Xapian__BB2Weight swig_types[0]
2223 #define SWIGTYPE_p_Xapian__BM25PlusWeight swig_types[1]
2224 #define SWIGTYPE_p_Xapian__BM25Weight swig_types[2]
2225 #define SWIGTYPE_p_Xapian__BoolWeight swig_types[3]
2226 #define SWIGTYPE_p_Xapian__Compactor swig_types[4]
2227 #define SWIGTYPE_p_Xapian__CoordWeight swig_types[5]
2228 #define SWIGTYPE_p_Xapian__DLHWeight swig_types[6]
2229 #define SWIGTYPE_p_Xapian__DPHWeight swig_types[7]
2230 #define SWIGTYPE_p_Xapian__Database swig_types[8]
2231 #define SWIGTYPE_p_Xapian__DateRangeProcessor swig_types[9]
2232 #define SWIGTYPE_p_Xapian__DateValueRangeProcessor swig_types[10]
2233 #define SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource swig_types[11]
2234 #define SWIGTYPE_p_Xapian__Document swig_types[12]
2235 #define SWIGTYPE_p_Xapian__ESet swig_types[13]
2236 #define SWIGTYPE_p_Xapian__ESetIterator swig_types[14]
2237 #define SWIGTYPE_p_Xapian__Enquire swig_types[15]
2238 #define SWIGTYPE_p_Xapian__ExpandDecider swig_types[16]
2239 #define SWIGTYPE_p_Xapian__ExpandDeciderAnd swig_types[17]
2240 #define SWIGTYPE_p_Xapian__ExpandDeciderFilterPrefix swig_types[18]
2241 #define SWIGTYPE_p_Xapian__ExpandDeciderFilterTerms swig_types[19]
2242 #define SWIGTYPE_p_Xapian__FieldProcessor swig_types[20]
2243 #define SWIGTYPE_p_Xapian__FixedWeightPostingSource swig_types[21]
2244 #define SWIGTYPE_p_Xapian__GreatCircleMetric swig_types[22]
2245 #define SWIGTYPE_p_Xapian__IfB2Weight swig_types[23]
2246 #define SWIGTYPE_p_Xapian__InL2Weight swig_types[24]
2247 #define SWIGTYPE_p_Xapian__IneB2Weight swig_types[25]
2248 #define SWIGTYPE_p_Xapian__KeyMaker swig_types[26]
2249 #define SWIGTYPE_p_Xapian__LMWeight swig_types[27]
2250 #define SWIGTYPE_p_Xapian__LatLongCoord swig_types[28]
2251 #define SWIGTYPE_p_Xapian__LatLongCoords swig_types[29]
2252 #define SWIGTYPE_p_Xapian__LatLongCoordsIterator swig_types[30]
2253 #define SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker swig_types[31]
2254 #define SWIGTYPE_p_Xapian__LatLongDistancePostingSource swig_types[32]
2255 #define SWIGTYPE_p_Xapian__LatLongMetric swig_types[33]
2256 #define SWIGTYPE_p_Xapian__MSet swig_types[34]
2257 #define SWIGTYPE_p_Xapian__MSetIterator swig_types[35]
2258 #define SWIGTYPE_p_Xapian__MatchDecider swig_types[36]
2259 #define SWIGTYPE_p_Xapian__MatchSpy swig_types[37]
2260 #define SWIGTYPE_p_Xapian__MultiValueKeyMaker swig_types[38]
2261 #define SWIGTYPE_p_Xapian__NumberRangeProcessor swig_types[39]
2262 #define SWIGTYPE_p_Xapian__NumberValueRangeProcessor swig_types[40]
2263 #define SWIGTYPE_p_Xapian__PL2PlusWeight swig_types[41]
2264 #define SWIGTYPE_p_Xapian__PL2Weight swig_types[42]
2265 #define SWIGTYPE_p_Xapian__PositionIterator swig_types[43]
2266 #define SWIGTYPE_p_Xapian__PostingIterator swig_types[44]
2267 #define SWIGTYPE_p_Xapian__PostingSource swig_types[45]
2268 #define SWIGTYPE_p_Xapian__Query swig_types[46]
2269 #define SWIGTYPE_p_Xapian__QueryParser swig_types[47]
2270 #define SWIGTYPE_p_Xapian__RSet swig_types[48]
2271 #define SWIGTYPE_p_Xapian__RangeProcessor swig_types[49]
2272 #define SWIGTYPE_p_Xapian__Registry swig_types[50]
2273 #define SWIGTYPE_p_Xapian__SimpleStopper swig_types[51]
2274 #define SWIGTYPE_p_Xapian__Stem swig_types[52]
2275 #define SWIGTYPE_p_Xapian__StemImplementation swig_types[53]
2276 #define SWIGTYPE_p_Xapian__Stopper swig_types[54]
2277 #define SWIGTYPE_p_Xapian__StringValueRangeProcessor swig_types[55]
2278 #define SWIGTYPE_p_Xapian__TermGenerator swig_types[56]
2279 #define SWIGTYPE_p_Xapian__TermIterator swig_types[57]
2280 #define SWIGTYPE_p_Xapian__TfIdfWeight swig_types[58]
2281 #define SWIGTYPE_p_Xapian__TradWeight swig_types[59]
2282 #define SWIGTYPE_p_Xapian__ValueCountMatchSpy swig_types[60]
2283 #define SWIGTYPE_p_Xapian__ValueIterator swig_types[61]
2284 #define SWIGTYPE_p_Xapian__ValueMapPostingSource swig_types[62]
2285 #define SWIGTYPE_p_Xapian__ValuePostingSource swig_types[63]
2286 #define SWIGTYPE_p_Xapian__ValueRangeProcessor swig_types[64]
2287 #define SWIGTYPE_p_Xapian__ValueSetMatchDecider swig_types[65]
2288 #define SWIGTYPE_p_Xapian__ValueWeightPostingSource swig_types[66]
2289 #define SWIGTYPE_p_Xapian__Weight swig_types[67]
2290 #define SWIGTYPE_p_Xapian__WritableDatabase swig_types[68]
2291 #define SWIGTYPE_p_char swig_types[69]
2292 #define SWIGTYPE_p_compaction_level swig_types[70]
2293 #define SWIGTYPE_p_docid_order swig_types[71]
2294 #define SWIGTYPE_p_double swig_types[72]
2295 #define SWIGTYPE_p_feature_flag swig_types[73]
2296 #define SWIGTYPE_p_flags swig_types[74]
2297 #define SWIGTYPE_p_int swig_types[75]
2298 #define SWIGTYPE_p_std__string swig_types[76]
2299 #define SWIGTYPE_p_stem_strategy swig_types[77]
2300 #define SWIGTYPE_p_stop_strategy swig_types[78]
2301 #define SWIGTYPE_p_swig__ConstIterator swig_types[79]
2302 #define SWIGTYPE_p_swig__GC_VALUE swig_types[80]
2303 #define SWIGTYPE_p_swig__Iterator swig_types[81]
2304 #define SWIGTYPE_p_type_smoothing swig_types[82]
2305 #define SWIGTYPE_p_unsigned_int swig_types[83]
2306 #define SWIGTYPE_p_unsigned_long swig_types[84]
2307 #define SWIGTYPE_p_void swig_types[85]
2308 static swig_type_info *swig_types[87];
2309 static swig_module_info swig_module = {swig_types, 86, 0, 0, 0, 0};
2310 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2311 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2312 
2313 /* -------- TYPES TABLE (END) -------- */
2314 
2315 #define SWIG_init    Init__xapian
2316 #define SWIG_name    "Xapian"
2317 
2318 static VALUE mXapian;
2319 
2320 #define SWIG_RUBY_THREAD_BEGIN_BLOCK
2321 #define SWIG_RUBY_THREAD_END_BLOCK
2322 
2323 
2324 #define SWIGVERSION 0x030013
2325 #define SWIG_VERSION SWIGVERSION
2326 
2327 
2328 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
2329 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
2330 
2331 
2332 #include <stdexcept>
2333 
2334 
2335 /* ruby.i: SWIG interface file for the Ruby bindings
2336  *
2337  * Original version by Paul Legato (plegato@nks.net), 4/17/06.
2338  * Based on the php4 and python util.i files.
2339  *
2340  * Copyright (C) 2006 Networked Knowledge Systems, Inc.
2341  * Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2019 Olly Betts
2342  * Copyright (C) 2010 Richard Boulton
2343  *
2344  * This program is free software; you can redistribute it and/or
2345  * modify it under the terms of the GNU General Public License as
2346  * published by the Free Software Foundation; either version 2 of the
2347  * License, or (at your option) any later version.
2348  *
2349  * This program is distributed in the hope that it will be useful,
2350  * but WITHOUT ANY WARRANTY; without even the implied warranty of
2351  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2352  * GNU General Public License for more details.
2353  *
2354  * You should have received a copy of the GNU General Public License
2355  * along with this program; if not, write to the Free Software
2356  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
2357  * USA
2358  */
2359 
2360 
2361 
2362 /** @file
2363  * @brief Header for SWIG interface file for Xapian.
2364  */
2365 /* Copyright (C) 2005,2006,2007,2008,2009,2011,2012,2013,2014,2015,2016 Olly Betts
2366  *
2367  * This program is free software; you can redistribute it and/or
2368  * modify it under the terms of the GNU General Public License as
2369  * published by the Free Software Foundation; either version 2 of the
2370  * License, or (at your option) any later version.
2371  *
2372  * This program is distributed in the hope that it will be useful,
2373  * but WITHOUT ANY WARRANTY; without even the implied warranty of
2374  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2375  * GNU General Public License for more details.
2376  *
2377  * You should have received a copy of the GNU General Public License
2378  * along with this program; if not, write to the Free Software
2379  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
2380  * USA
2381  */
2382 
2383 // Disable any deprecation warnings for Xapian methods/functions/classes.
2384 #define XAPIAN_DEPRECATED(D) D
2385 
2386 #include <xapian.h>
2387 
2388 #include <fstream>
2389 #include <iostream>
2390 #include <string>
2391 #include <vector>
2392 
2393 using namespace std;
2394 
2395 // If a backend has been disabled in xapian-core (manually or automatically) we
2396 // include a stub definition here so the bindings can still be built.
2397 namespace Xapian {
2398 
2399 
2400 
2401 #ifndef XAPIAN_HAS_CHERT_BACKEND
2402     namespace Chert {
open(const string &)2403 	static Database open(const string &) {
2404 	    throw FeatureUnavailableError("Chert backend not supported");
2405 	}
open(const string &,int,int=0)2406 	static WritableDatabase open(const string &, int, int = 0) {
2407 	    throw FeatureUnavailableError("Chert backend not supported");
2408 	}
2409     }
2410 #endif
2411 
2412 #ifndef XAPIAN_HAS_INMEMORY_BACKEND
2413     namespace InMemory {
open()2414 	static WritableDatabase open() {
2415 	    throw FeatureUnavailableError("InMemory backend not supported");
2416 	}
2417     }
2418 #endif
2419 
2420 
2421 
2422 
2423 #ifndef XAPIAN_HAS_REMOTE_BACKEND
2424     namespace Remote {
open(const string &,unsigned int,useconds_t=0,useconds_t=0)2425 	static Database open(const string &, unsigned int, useconds_t = 0, useconds_t = 0) {
2426 	    throw FeatureUnavailableError("Remote backend not supported");
2427 	}
2428 
open_writable(const string &,unsigned int,useconds_t=0,useconds_t=0,int=0)2429 	static WritableDatabase open_writable(const string &, unsigned int, useconds_t = 0, useconds_t = 0, int = 0) {
2430 	    throw FeatureUnavailableError("Remote backend not supported");
2431 	}
2432 
open(const string &,const string &,useconds_t=0)2433 	static Database open(const string &, const string &, useconds_t = 0) {
2434 	    throw FeatureUnavailableError("Remote backend not supported");
2435 	}
2436 
open_writable(const string &,const string &,useconds_t=0,int=0)2437 	static WritableDatabase open_writable(const string &, const string &, useconds_t = 0, int = 0) {
2438 	    throw FeatureUnavailableError("Remote backend not supported");
2439 	}
2440     }
2441 #endif
2442 
2443 }
2444 
2445 
2446 #include <typeinfo>
2447 #include <stdexcept>
2448 
2449 
2450 namespace swig {
2451   class SwigGCReferences {
2452     VALUE _hash;
2453 
SwigGCReferences()2454     SwigGCReferences() : _hash(Qnil) {
2455     }
~SwigGCReferences()2456     ~SwigGCReferences() {
2457       if (_hash != Qnil)
2458         rb_gc_unregister_address(&_hash);
2459     }
EndProcHandler(VALUE)2460     static void EndProcHandler(VALUE) {
2461       // Ruby interpreter ending - _hash can no longer be accessed.
2462       SwigGCReferences &s_references = instance();
2463       s_references._hash = Qnil;
2464     }
2465   public:
instance()2466     static SwigGCReferences& instance() {
2467       // Hash of all GC_VALUE's currently in use
2468       static SwigGCReferences s_references;
2469 
2470       return s_references;
2471     }
initialize()2472     static void initialize() {
2473       SwigGCReferences &s_references = instance();
2474       if (s_references._hash == Qnil) {
2475         rb_set_end_proc(&EndProcHandler, Qnil);
2476         s_references._hash = rb_hash_new();
2477         rb_gc_register_address(&s_references._hash);
2478       }
2479     }
GC_register(VALUE & obj)2480     void GC_register(VALUE& obj) {
2481       if (FIXNUM_P(obj) || SPECIAL_CONST_P(obj) || SYMBOL_P(obj))
2482         return;
2483       if (_hash != Qnil) {
2484         VALUE val = rb_hash_aref(_hash, obj);
2485         unsigned n = FIXNUM_P(val) ? NUM2UINT(val) : 0;
2486         ++n;
2487         rb_hash_aset(_hash, obj, INT2NUM(n));
2488       }
2489     }
GC_unregister(const VALUE & obj)2490     void GC_unregister(const VALUE& obj) {
2491       if (FIXNUM_P(obj) || SPECIAL_CONST_P(obj) || SYMBOL_P(obj))
2492         return;
2493       // this test should not be needed but I've noticed some very erratic
2494       // behavior of none being unregistered in some very rare situations.
2495       if (BUILTIN_TYPE(obj) == T_NONE)
2496         return;
2497       if (_hash != Qnil) {
2498         VALUE val = rb_hash_aref(_hash, obj);
2499         unsigned n = FIXNUM_P(val) ? NUM2UINT(val) : 1;
2500         --n;
2501         if (n)
2502           rb_hash_aset(_hash, obj, INT2NUM(n));
2503         else
2504           rb_hash_delete(_hash, obj);
2505       }
2506     }
2507   };
2508 
2509   class GC_VALUE {
2510   protected:
2511     VALUE  _obj;
2512 
2513     static ID hash_id;
2514     static ID   lt_id;
2515     static ID   gt_id;
2516     static ID   eq_id;
2517     static ID   le_id;
2518     static ID   ge_id;
2519 
2520     static ID  pos_id;
2521     static ID  neg_id;
2522     static ID  inv_id;
2523 
2524     static ID  add_id;
2525     static ID  sub_id;
2526     static ID  mul_id;
2527     static ID  div_id;
2528     static ID  mod_id;
2529 
2530     static ID  and_id;
2531     static ID   or_id;
2532     static ID  xor_id;
2533 
2534     static ID  lshift_id;
2535     static ID  rshift_id;
2536 
2537     struct OpArgs
2538     {
2539       VALUE src;
2540       ID    id;
2541       int   nargs;
2542       VALUE target;
2543     };
2544 
2545 
2546   public:
GC_VALUE()2547     GC_VALUE() : _obj(Qnil)
2548     {
2549     }
2550 
GC_VALUE(const GC_VALUE & item)2551     GC_VALUE(const GC_VALUE& item) : _obj(item._obj)
2552     {
2553       SwigGCReferences::instance().GC_register(_obj);
2554     }
2555 
GC_VALUE(VALUE obj)2556     GC_VALUE(VALUE obj) :_obj(obj)
2557     {
2558       SwigGCReferences::instance().GC_register(_obj);
2559     }
2560 
~GC_VALUE()2561     ~GC_VALUE()
2562     {
2563       SwigGCReferences::instance().GC_unregister(_obj);
2564     }
2565 
operator =(const GC_VALUE & item)2566     GC_VALUE & operator=(const GC_VALUE& item)
2567     {
2568       SwigGCReferences::instance().GC_unregister(_obj);
2569       _obj = item._obj;
2570       SwigGCReferences::instance().GC_register(_obj);
2571       return *this;
2572     }
2573 
operator VALUE() const2574     operator VALUE() const
2575     {
2576       return _obj;
2577     }
2578 
inspect() const2579     VALUE inspect() const
2580     {
2581       return rb_inspect(_obj);
2582     }
2583 
to_s() const2584     VALUE to_s() const
2585     {
2586       return rb_inspect(_obj);
2587     }
2588 
swig_rescue_swallow(VALUE)2589     static VALUE swig_rescue_swallow(VALUE)
2590     {
2591       /*
2592       VALUE errstr = rb_obj_as_string(rb_errinfo());
2593       printf("Swallowing error: '%s'\n", RSTRING_PTR(StringValue(errstr)));
2594       */
2595       return Qnil; /* Swallow Ruby exception */
2596     }
2597 
swig_rescue_funcall(VALUE p)2598     static VALUE swig_rescue_funcall(VALUE p)
2599     {
2600       OpArgs* args = (OpArgs*) p;
2601       return rb_funcall(args->src, args->id, args->nargs, args->target);
2602     }
2603 
relational_equal_op(const GC_VALUE & other,const ID & op_id,bool (* op_func)(const VALUE & a,const VALUE & b)) const2604     bool relational_equal_op(const GC_VALUE& other, const ID& op_id, bool (*op_func)(const VALUE& a, const VALUE& b)) const
2605     {
2606       if (FIXNUM_P(_obj) && FIXNUM_P(other._obj)) {
2607         return op_func(_obj, other._obj);
2608       }
2609       bool res = false;
2610       VALUE ret = Qnil;
2611       SWIG_RUBY_THREAD_BEGIN_BLOCK;
2612       if (rb_respond_to(_obj, op_id)) {
2613         OpArgs  args;
2614         args.src    = _obj;
2615         args.id     = op_id;
2616         args.nargs  = 1;
2617         args.target = VALUE(other);
2618         ret = rb_rescue(RUBY_METHOD_FUNC(swig_rescue_funcall), VALUE(&args),
2619                        (RUBY_METHOD_FUNC(swig_rescue_swallow)), Qnil);
2620       }
2621       if (ret == Qnil) {
2622         VALUE a = rb_funcall(         _obj, hash_id, 0 );
2623         VALUE b = rb_funcall( VALUE(other), hash_id, 0 );
2624         res = op_func(a, b);
2625       } else {
2626         res = RTEST(ret);
2627       }
2628       SWIG_RUBY_THREAD_END_BLOCK;
2629       return res;
2630     }
2631 
operator_eq(const VALUE & a,const VALUE & b)2632     static bool operator_eq(const VALUE& a, const VALUE& b) { return a == b; }
operator_lt(const VALUE & a,const VALUE & b)2633     static bool operator_lt(const VALUE& a, const VALUE& b) { return a < b; }
operator_le(const VALUE & a,const VALUE & b)2634     static bool operator_le(const VALUE& a, const VALUE& b) { return a <= b; }
operator_gt(const VALUE & a,const VALUE & b)2635     static bool operator_gt(const VALUE& a, const VALUE& b) { return a > b; }
operator_ge(const VALUE & a,const VALUE & b)2636     static bool operator_ge(const VALUE& a, const VALUE& b) { return a >= b; }
2637 
operator ==(const GC_VALUE & other) const2638     bool operator==(const GC_VALUE& other) const { return relational_equal_op(other, eq_id, operator_eq); }
operator <(const GC_VALUE & other) const2639     bool operator<(const GC_VALUE& other) const { return relational_equal_op(other, lt_id, operator_lt); }
operator <=(const GC_VALUE & other) const2640     bool operator<=(const GC_VALUE& other) const { return relational_equal_op(other, le_id, operator_le); }
operator >(const GC_VALUE & other) const2641     bool operator>(const GC_VALUE& other) const { return relational_equal_op(other, gt_id, operator_gt); }
operator >=(const GC_VALUE & other) const2642     bool operator>=(const GC_VALUE& other) const { return relational_equal_op(other, ge_id, operator_ge); }
2643 
operator !=(const GC_VALUE & other) const2644     bool operator!=(const GC_VALUE& other) const
2645     {
2646       return !(this->operator==(other));
2647     }
2648 
unary_op(const ID & op_id) const2649     GC_VALUE unary_op(const ID& op_id) const
2650     {
2651       VALUE ret = Qnil;
2652       SWIG_RUBY_THREAD_BEGIN_BLOCK;
2653       OpArgs  args;
2654       args.src    = _obj;
2655       args.id     = op_id;
2656       args.nargs  = 0;
2657       args.target = Qnil;
2658       ret = rb_rescue(RUBY_METHOD_FUNC(swig_rescue_funcall), VALUE(&args),
2659                      (RUBY_METHOD_FUNC(swig_rescue_swallow)), Qnil);
2660       SWIG_RUBY_THREAD_END_BLOCK;
2661       return ret;
2662     }
2663 
operator +() const2664     GC_VALUE operator+() const { return unary_op(pos_id); }
operator -() const2665     GC_VALUE operator-() const { return unary_op(neg_id); }
operator ~() const2666     GC_VALUE operator~() const { return unary_op(inv_id); }
2667 
binary_op(const GC_VALUE & other,const ID & op_id) const2668     GC_VALUE binary_op(const GC_VALUE& other, const ID& op_id) const
2669     {
2670       VALUE ret = Qnil;
2671       SWIG_RUBY_THREAD_BEGIN_BLOCK;
2672       OpArgs  args;
2673       args.src    = _obj;
2674       args.id     = op_id;
2675       args.nargs  = 1;
2676       args.target = VALUE(other);
2677       ret = rb_rescue(RUBY_METHOD_FUNC(swig_rescue_funcall), VALUE(&args),
2678                      (RUBY_METHOD_FUNC(swig_rescue_swallow)), Qnil);
2679       SWIG_RUBY_THREAD_END_BLOCK;
2680       return GC_VALUE(ret);
2681     }
2682 
operator +(const GC_VALUE & other) const2683     GC_VALUE operator+(const GC_VALUE& other) const { return binary_op(other, add_id); }
operator -(const GC_VALUE & other) const2684     GC_VALUE operator-(const GC_VALUE& other) const { return binary_op(other, sub_id); }
operator *(const GC_VALUE & other) const2685     GC_VALUE operator*(const GC_VALUE& other) const { return binary_op(other, mul_id); }
operator /(const GC_VALUE & other) const2686     GC_VALUE operator/(const GC_VALUE& other) const { return binary_op(other, div_id); }
operator %(const GC_VALUE & other) const2687     GC_VALUE operator%(const GC_VALUE& other) const { return binary_op(other, mod_id); }
operator &(const GC_VALUE & other) const2688     GC_VALUE operator&(const GC_VALUE& other) const { return binary_op(other, and_id); }
operator ^(const GC_VALUE & other) const2689     GC_VALUE operator^(const GC_VALUE& other) const { return binary_op(other, xor_id); }
operator |(const GC_VALUE & other) const2690     GC_VALUE operator|(const GC_VALUE& other) const { return binary_op(other, or_id); }
operator <<(const GC_VALUE & other) const2691     GC_VALUE operator<<(const GC_VALUE& other) const { return binary_op(other, lshift_id); }
operator >>(const GC_VALUE & other) const2692     GC_VALUE operator>>(const GC_VALUE& other) const { return binary_op(other, rshift_id); }
2693   };
2694 
2695   ID  GC_VALUE::hash_id = rb_intern("hash");
2696   ID  GC_VALUE::lt_id = rb_intern("<");
2697   ID  GC_VALUE::gt_id = rb_intern(">");
2698   ID  GC_VALUE::eq_id = rb_intern("==");
2699   ID  GC_VALUE::le_id = rb_intern("<=");
2700   ID  GC_VALUE::ge_id = rb_intern(">=");
2701 
2702   ID  GC_VALUE::pos_id = rb_intern("+@");
2703   ID  GC_VALUE::neg_id = rb_intern("-@");
2704   ID  GC_VALUE::inv_id = rb_intern("~");
2705 
2706   ID  GC_VALUE::add_id = rb_intern("+");
2707   ID  GC_VALUE::sub_id = rb_intern("-");
2708   ID  GC_VALUE::mul_id = rb_intern("*");
2709   ID  GC_VALUE::div_id = rb_intern("/");
2710   ID  GC_VALUE::mod_id = rb_intern("%");
2711 
2712   ID  GC_VALUE::and_id = rb_intern("&");
2713   ID  GC_VALUE::or_id  = rb_intern("|");
2714   ID  GC_VALUE::xor_id = rb_intern("^");
2715 
2716   ID  GC_VALUE::lshift_id = rb_intern("<<");
2717   ID  GC_VALUE::rshift_id = rb_intern(">>");
2718 
2719   typedef GC_VALUE LANGUAGE_OBJ;
2720 
2721 } // namespace swig
2722 
2723 
2724 
2725 #if defined(__GNUC__)
2726 #  if __GNUC__ == 2 && __GNUC_MINOR <= 96
2727 #     define SWIG_STD_NOMODERN_STL
2728 #  endif
2729 #endif
2730 
2731 
2732 #include <string>
2733 
2734 
2735 #include <stddef.h>
2736 
2737 
2738 #include <iostream>
2739 
2740 
2741 namespace swig {
2742   struct stop_iteration {
2743   };
2744 
2745   /**
2746    * Abstract base class used to represent all iterators of STL containers.
2747    */
2748   struct ConstIterator {
2749   public:
2750     typedef ConstIterator self_type;
2751 
2752   protected:
2753     GC_VALUE _seq;
2754 
2755   protected:
ConstIteratorswig::ConstIterator2756     ConstIterator(VALUE seq) : _seq(seq)
2757     {
2758     }
2759 
2760     // Random access iterator methods, but not required in Ruby
distanceswig::ConstIterator2761     virtual ptrdiff_t distance(const ConstIterator &x) const
2762     {
2763       throw std::invalid_argument("distance not supported");
2764     }
2765 
equalswig::ConstIterator2766     virtual bool equal (const ConstIterator &x) const
2767     {
2768       throw std::invalid_argument("equal not supported");
2769     }
2770 
advanceswig::ConstIterator2771     virtual self_type* advance(ptrdiff_t n)
2772     {
2773       throw std::invalid_argument("advance not supported");
2774     }
2775 
2776   public:
~ConstIteratorswig::ConstIterator2777     virtual ~ConstIterator() {}
2778 
2779     // Access iterator method, required by Ruby
valueswig::ConstIterator2780     virtual VALUE value() const {
2781       throw std::invalid_argument("value not supported");
2782       return Qnil;
2783     };
2784 
setValueswig::ConstIterator2785     virtual VALUE setValue( const VALUE& v ) {
2786       throw std::invalid_argument("value= not supported");
2787       return Qnil;
2788     }
2789 
nextswig::ConstIterator2790     virtual self_type* next( size_t n = 1 )
2791     {
2792       return this->advance( n );
2793     }
2794 
previousswig::ConstIterator2795     virtual self_type* previous( size_t n = 1 )
2796     {
2797       ptrdiff_t nn = n;
2798       return this->advance( -nn );
2799     }
2800 
to_sswig::ConstIterator2801     virtual VALUE to_s() const {
2802       throw std::invalid_argument("to_s not supported");
2803       return Qnil;
2804     }
2805 
inspectswig::ConstIterator2806     virtual VALUE inspect() const {
2807       throw std::invalid_argument("inspect not supported");
2808       return Qnil;
2809     }
2810 
dupswig::ConstIterator2811     virtual ConstIterator *dup() const
2812     {
2813       throw std::invalid_argument("dup not supported");
2814       return NULL;
2815     }
2816 
2817     //
2818     // C++ common/needed methods.  We emulate a bidirectional
2819     // operator, to be compatible with all the STL.
2820     // The iterator traits will then tell the STL what type of
2821     // iterator we really are.
2822     //
ConstIteratorswig::ConstIterator2823     ConstIterator() : _seq( Qnil )
2824     {
2825     }
2826 
ConstIteratorswig::ConstIterator2827     ConstIterator( const self_type& b ) : _seq( b._seq )
2828     {
2829     }
2830 
operator =swig::ConstIterator2831     self_type& operator=( const self_type& b )
2832     {
2833       _seq = b._seq;
2834       return *this;
2835     }
2836 
operator ==swig::ConstIterator2837     bool operator == (const ConstIterator& x)  const
2838     {
2839       return equal(x);
2840     }
2841 
operator !=swig::ConstIterator2842     bool operator != (const ConstIterator& x) const
2843     {
2844       return ! operator==(x);
2845     }
2846 
2847     // Pre-decrement operator
operator --swig::ConstIterator2848     self_type& operator--()
2849     {
2850       return *previous();
2851     }
2852 
2853     // Pre-increment operator
operator ++swig::ConstIterator2854     self_type& operator++()
2855     {
2856       return *next();
2857     }
2858 
2859     // Post-decrement operator
operator --swig::ConstIterator2860     self_type operator--(int)
2861     {
2862       self_type r = *this;
2863       previous();
2864       return r;
2865     }
2866 
2867     // Post-increment operator
operator ++swig::ConstIterator2868     self_type operator++(int)
2869     {
2870       self_type r = *this;
2871       next();
2872       return r;
2873     }
2874 
operator +=swig::ConstIterator2875     ConstIterator& operator += (ptrdiff_t n)
2876     {
2877       return *advance(n);
2878     }
2879 
operator -=swig::ConstIterator2880     ConstIterator& operator -= (ptrdiff_t n)
2881     {
2882       return *advance(-n);
2883     }
2884 
operator +swig::ConstIterator2885     ConstIterator* operator + (ptrdiff_t n) const
2886     {
2887       return dup()->advance(n);
2888     }
2889 
operator -swig::ConstIterator2890     ConstIterator* operator - (ptrdiff_t n) const
2891     {
2892       return dup()->advance(-n);
2893     }
2894 
operator -swig::ConstIterator2895     ptrdiff_t operator - (const ConstIterator& x) const
2896     {
2897       return x.distance(*this);
2898     }
2899 
descriptorswig::ConstIterator2900     static swig_type_info* descriptor() {
2901       static int init = 0;
2902       static swig_type_info* desc = 0;
2903       if (!init) {
2904 	desc = SWIG_TypeQuery("swig::ConstIterator *");
2905 	init = 1;
2906       }
2907       return desc;
2908     }
2909   };
2910 
2911 
2912   /**
2913    * Abstract base class used to represent all non-const iterators of STL containers.
2914    *
2915    */
2916   struct Iterator : public ConstIterator {
2917   public:
2918     typedef Iterator self_type;
2919 
2920   protected:
Iteratorswig::Iterator2921     Iterator(VALUE seq) : ConstIterator(seq)
2922     {
2923     }
2924 
advanceswig::Iterator2925     virtual self_type* advance(ptrdiff_t n)
2926     {
2927       throw std::invalid_argument("operation not supported");
2928     }
2929 
2930   public:
descriptorswig::Iterator2931     static swig_type_info* descriptor() {
2932       static int init = 0;
2933       static swig_type_info* desc = 0;
2934       if (!init) {
2935 	desc = SWIG_TypeQuery("swig::Iterator *");
2936 	init = 1;
2937       }
2938       return desc;
2939     }
2940 
dupswig::Iterator2941     virtual Iterator *dup() const
2942     {
2943       throw std::invalid_argument("dup not supported");
2944       return NULL;
2945     }
2946 
nextswig::Iterator2947     virtual self_type* next( size_t n = 1 )
2948     {
2949       return this->advance( n );
2950     }
2951 
previousswig::Iterator2952     virtual self_type* previous( size_t n = 1 )
2953     {
2954       ptrdiff_t nn = n;
2955       return this->advance( -nn );
2956     }
2957 
operator ==swig::Iterator2958     bool operator == (const ConstIterator& x)  const
2959     {
2960       return equal(x);
2961     }
2962 
operator !=swig::Iterator2963     bool operator != (const Iterator& x) const
2964     {
2965       return ! operator==(x);
2966     }
2967 
operator +=swig::Iterator2968     Iterator& operator += (ptrdiff_t n)
2969     {
2970       return *advance(n);
2971     }
2972 
operator -=swig::Iterator2973     Iterator& operator -= (ptrdiff_t n)
2974     {
2975       return *advance(-n);
2976     }
2977 
operator +swig::Iterator2978     Iterator* operator + (ptrdiff_t n) const
2979     {
2980       return dup()->advance(n);
2981     }
2982 
operator -swig::Iterator2983     Iterator* operator - (ptrdiff_t n) const
2984     {
2985       return dup()->advance(-n);
2986     }
2987 
operator -swig::Iterator2988     ptrdiff_t operator - (const Iterator& x) const
2989     {
2990       return x.distance(*this);
2991     }
2992   };
2993 
2994 }
2995 
2996 
2997 SWIGINTERN VALUE
SWIG_ruby_failed(void)2998 SWIG_ruby_failed(void)
2999 {
3000   return Qnil;
3001 }
3002 
3003 
3004 /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FxO5PVAcmo/swig/Lib/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
SWIG_AUX_NUM2ULONG(VALUE * args)3005 SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
3006 {
3007   VALUE obj = args[0];
3008   VALUE type = TYPE(obj);
3009   unsigned long *res = (unsigned long *)(args[1]);
3010   *res = type == T_FIXNUM ? NUM2ULONG(obj) : rb_big2ulong(obj);
3011   return obj;
3012 }
3013 /*@SWIG@*/
3014 
3015 SWIGINTERN int
SWIG_AsVal_unsigned_SS_long(VALUE obj,unsigned long * val)3016 SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val)
3017 {
3018   VALUE type = TYPE(obj);
3019   if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
3020     unsigned long v;
3021     VALUE a[2];
3022     a[0] = obj;
3023     a[1] = (VALUE)(&v);
3024     if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
3025       if (val) *val = v;
3026       return SWIG_OK;
3027     }
3028   }
3029   return SWIG_TypeError;
3030 }
3031 
3032 
3033 #include <limits.h>
3034 #if !defined(SWIG_NO_LLONG_MAX)
3035 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3036 #   define LLONG_MAX __LONG_LONG_MAX__
3037 #   define LLONG_MIN (-LLONG_MAX - 1LL)
3038 #   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3039 # endif
3040 #endif
3041 
3042 
3043 #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
3044 #  define SWIG_LONG_LONG_AVAILABLE
3045 #endif
3046 
3047 
3048 #ifdef SWIG_LONG_LONG_AVAILABLE
3049 /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FxO5PVAcmo/swig/Lib/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
SWIG_AUX_NUM2ULL(VALUE * args)3050 SWIGINTERN VALUE SWIG_AUX_NUM2ULL(VALUE *args)
3051 {
3052   VALUE obj = args[0];
3053   VALUE type = TYPE(obj);
3054   long long *res = (long long *)(args[1]);
3055   *res = type == T_FIXNUM ? NUM2ULL(obj) : rb_big2ull(obj);
3056   return obj;
3057 }
3058 /*@SWIG@*/
3059 
3060 SWIGINTERN int
SWIG_AsVal_unsigned_SS_long_SS_long(VALUE obj,unsigned long long * val)3061 SWIG_AsVal_unsigned_SS_long_SS_long (VALUE obj, unsigned long long *val)
3062 {
3063   VALUE type = TYPE(obj);
3064   if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
3065     unsigned long long v;
3066     VALUE a[2];
3067     a[0] = obj;
3068     a[1] = (VALUE)(&v);
3069     if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
3070       if (val) *val = v;
3071       return SWIG_OK;
3072     }
3073   }
3074   return SWIG_TypeError;
3075 }
3076 #endif
3077 
3078 
3079 SWIGINTERNINLINE int
SWIG_AsVal_size_t(VALUE obj,size_t * val)3080 SWIG_AsVal_size_t (VALUE obj, size_t *val)
3081 {
3082   int res = SWIG_TypeError;
3083 #ifdef SWIG_LONG_LONG_AVAILABLE
3084   if (sizeof(size_t) <= sizeof(unsigned long)) {
3085 #endif
3086     unsigned long v;
3087     res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
3088     if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
3089 #ifdef SWIG_LONG_LONG_AVAILABLE
3090   } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
3091     unsigned long long v;
3092     res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
3093     if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
3094   }
3095 #endif
3096   return res;
3097 }
3098 
3099 
3100 SWIGINTERNINLINE VALUE
SWIG_From_bool(bool value)3101 SWIG_From_bool  (bool value)
3102 {
3103   return value ? Qtrue : Qfalse;
3104 }
3105 
3106 
3107 /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FxO5PVAcmo/swig/Lib/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
SWIG_AUX_NUM2LONG(VALUE * args)3108 SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
3109 {
3110   VALUE obj = args[0];
3111   VALUE type = TYPE(obj);
3112   long *res = (long *)(args[1]);
3113   *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj);
3114   return obj;
3115 }
3116 /*@SWIG@*/
3117 
3118 SWIGINTERN int
SWIG_AsVal_long(VALUE obj,long * val)3119 SWIG_AsVal_long (VALUE obj, long* val)
3120 {
3121   VALUE type = TYPE(obj);
3122   if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
3123     long v;
3124     VALUE a[2];
3125     a[0] = obj;
3126     a[1] = (VALUE)(&v);
3127     if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
3128       if (val) *val = v;
3129       return SWIG_OK;
3130     }
3131   }
3132   return SWIG_TypeError;
3133 }
3134 
3135 
3136 #ifdef SWIG_LONG_LONG_AVAILABLE
3137 /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FxO5PVAcmo/swig/Lib/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
SWIG_AUX_NUM2LL(VALUE * args)3138 SWIGINTERN VALUE SWIG_AUX_NUM2LL(VALUE *args)
3139 {
3140   VALUE obj = args[0];
3141   VALUE type = TYPE(obj);
3142   long long *res = (long long *)(args[1]);
3143   *res = type == T_FIXNUM ? NUM2LL(obj) : rb_big2ll(obj);
3144   return obj;
3145 }
3146 /*@SWIG@*/
3147 
3148 SWIGINTERN int
SWIG_AsVal_long_SS_long(VALUE obj,long long * val)3149 SWIG_AsVal_long_SS_long (VALUE obj, long long *val)
3150 {
3151   VALUE type = TYPE(obj);
3152   if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
3153     long long v;
3154     VALUE a[2];
3155     a[0] = obj;
3156     a[1] = (VALUE)(&v);
3157     if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
3158       if (val) *val = v;
3159       return SWIG_OK;
3160     }
3161   }
3162   return SWIG_TypeError;
3163 }
3164 #endif
3165 
3166 
3167 SWIGINTERNINLINE int
SWIG_AsVal_ptrdiff_t(VALUE obj,ptrdiff_t * val)3168 SWIG_AsVal_ptrdiff_t (VALUE obj, ptrdiff_t *val)
3169 {
3170   int res = SWIG_TypeError;
3171 #ifdef SWIG_LONG_LONG_AVAILABLE
3172   if (sizeof(ptrdiff_t) <= sizeof(long)) {
3173 #endif
3174     long v;
3175     res = SWIG_AsVal_long (obj, val ? &v : 0);
3176     if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v);
3177 #ifdef SWIG_LONG_LONG_AVAILABLE
3178   } else if (sizeof(ptrdiff_t) <= sizeof(long long)) {
3179     long long v;
3180     res = SWIG_AsVal_long_SS_long (obj, val ? &v : 0);
3181     if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v);
3182   }
3183 #endif
3184   return res;
3185 }
3186 
3187 
3188   #define SWIG_From_long   LONG2NUM
3189 
3190 
3191 #ifdef SWIG_LONG_LONG_AVAILABLE
3192 SWIGINTERNINLINE VALUE
SWIG_From_long_SS_long(long long value)3193 SWIG_From_long_SS_long  (long long value)
3194 {
3195   return LL2NUM(value);
3196 }
3197 #endif
3198 
3199 
3200 SWIGINTERNINLINE VALUE
SWIG_From_ptrdiff_t(ptrdiff_t value)3201 SWIG_From_ptrdiff_t  (ptrdiff_t value)
3202 {
3203 #ifdef SWIG_LONG_LONG_AVAILABLE
3204   if (sizeof(ptrdiff_t) <= sizeof(long)) {
3205 #endif
3206     return SWIG_From_long  (static_cast< long >(value));
3207 #ifdef SWIG_LONG_LONG_AVAILABLE
3208   } else {
3209     /* assume sizeof(ptrdiff_t) <= sizeof(long long) */
3210     return SWIG_From_long_SS_long  (static_cast< long long >(value));
3211   }
3212 #endif
3213 }
3214 
3215 
3216 #include <algorithm>
3217 
3218 
3219 #include <vector>
3220 
3221 
3222 #include <utility>
3223 
3224 
3225 #include <map>
3226 
3227 
3228 #include <algorithm>
3229 
3230 
3231 class XapianSWIGQueryItor {
3232     VALUE array;
3233 
3234     int i;
3235 
3236   public:
3237     typedef std::random_access_iterator_tag iterator_category;
3238     typedef Xapian::Query value_type;
3239     typedef Xapian::termcount_diff difference_type;
3240     typedef Xapian::Query * pointer;
3241     typedef Xapian::Query & reference;
3242 
XapianSWIGQueryItor()3243     XapianSWIGQueryItor() { }
3244 
begin(VALUE array_)3245     void begin(VALUE array_) {
3246 	array = array_;
3247 	i = 0;
3248     }
3249 
end(int n)3250     void end(int n) {
3251 	i = n;
3252     }
3253 
operator ++()3254     XapianSWIGQueryItor & operator++() {
3255 	++i;
3256 	return *this;
3257     }
3258 
operator *() const3259     Xapian::Query operator*() const {
3260 	VALUE entry = rb_ary_entry(array, i);
3261 	if (TYPE(entry) == T_STRING) {
3262 	    return Xapian::Query(string(RSTRING_PTR(entry),
3263 					RSTRING_LEN(entry)));
3264 	}
3265 
3266 	// array element may be a Xapian::Query object. Add it if it is,
3267 	// otherwise error out.
3268 	Xapian::Query *subq = 0;
3269 	if (SWIG_ConvertPtr(entry, (void **)&subq,
3270 			    SWIGTYPE_p_Xapian__Query, 0) < 0 || !subq) {
3271 	    SWIG_exception(SWIG_ValueError, "Elements of Arrays passed to Query must be either Strings or other Query objects");
3272 	    return Xapian::Query();
3273 	}
3274 	return *subq;
3275     }
3276 
operator ==(const XapianSWIGQueryItor & o)3277     bool operator==(const XapianSWIGQueryItor & o) {
3278 	return i == o.i;
3279     }
3280 
operator !=(const XapianSWIGQueryItor & o)3281     bool operator!=(const XapianSWIGQueryItor & o) {
3282 	return !(*this == o);
3283     }
3284 
operator -(const XapianSWIGQueryItor & o) const3285     difference_type operator-(const XapianSWIGQueryItor &o) const {
3286 	return i - o.i;
3287     }
3288 };
3289 
3290 
3291 
3292 /** @file
3293  * @brief Language independent exception handling.
3294  */
3295 /* Warning: This file is generated by ./generic/generate-generic-exceptions
3296  * - do not modify directly!
3297  *
3298  * Copyright (C) 2004,2005,2006,2007,2011,2012,2018 Olly Betts
3299  * Copyright (C) 2007 Lemur Consulting Ltd
3300  *
3301  * This program is free software; you can redistribute it and/or
3302  * modify it under the terms of the GNU General Public License as
3303  * published by the Free Software Foundation; either version 2 of the
3304  * License, or (at your option) any later version.
3305  *
3306  * This program is distributed in the hope that it will be useful,
3307  * but WITHOUT ANY WARRANTY; without even the implied warranty of
3308  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3309  * GNU General Public License for more details.
3310  *
3311  * You should have received a copy of the GNU General Public License
3312  * along with this program; if not, write to the Free Software
3313  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
3314  */
3315 
3316 /* This file is included for any languages which don't have language specific
3317  * handling for exceptions.
3318  */
3319 
3320 #include <exception>
3321 
XapianExceptionHandler(string & msg)3322 static int XapianExceptionHandler(string & msg) {
3323     try {
3324 	// Rethrow so we can look at the exception if it was a Xapian::Error.
3325 	throw;
3326     } catch (const Xapian::Error &e) {
3327 	msg = e.get_description();
3328 	try {
3329 	    // Re-rethrow the previous exception so we can handle the type in a
3330 	    // fine-grained way, but only in one place to avoid bloating the
3331 	    // file.
3332 	    throw;
3333 	} catch (const Xapian::InvalidArgumentError &) {
3334 	    return SWIG_ValueError;
3335 	} catch (const Xapian::RangeError &) {
3336 	    return SWIG_IndexError;
3337 	} catch (const Xapian::DatabaseError &) {
3338 	    return SWIG_IOError;
3339 	} catch (const Xapian::NetworkError &) {
3340 	    return SWIG_IOError;
3341 	} catch (const Xapian::InternalError &) {
3342 	    return SWIG_RuntimeError;
3343 	} catch (const Xapian::RuntimeError &) {
3344 	    return SWIG_RuntimeError;
3345 	} catch (...) {
3346 	    return SWIG_UnknownError;
3347 	}
3348     } catch (const std::exception &e) {
3349 	msg = "std::exception: ";
3350         msg += e.what();
3351     } catch (...) {
3352 	msg = "unknown error in Xapian";
3353     }
3354     return SWIG_UnknownError;
3355 }
3356 
3357 
3358 /* xapian-headers.i: Getting SWIG to parse Xapian's C++ headers.
3359  *
3360  * Copyright 2004,2006,2011,2012,2013,2014,2015,2016,2019,2020 Olly Betts
3361  * Copyright 2014 Assem Chelli
3362  *
3363  * This program is free software; you can redistribute it and/or
3364  * modify it under the terms of the GNU General Public License as
3365  * published by the Free Software Foundation; either version 2 of the
3366  * License, or (at your option) any later version.
3367  *
3368  * This program is distributed in the hope that it will be useful,
3369  * but WITHOUT ANY WARRANTY; without even the implied warranty of
3370  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3371  * GNU General Public License for more details.
3372  *
3373  * You should have received a copy of the GNU General Public License
3374  * along with this program; if not, write to the Free Software
3375  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
3376  * USA
3377  */
3378 
3379 
3380 SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)3381 SWIG_pchar_descriptor(void)
3382 {
3383   static int init = 0;
3384   static swig_type_info* info = 0;
3385   if (!init) {
3386     info = SWIG_TypeQuery("_p_char");
3387     init = 1;
3388   }
3389   return info;
3390 }
3391 
3392 
3393 SWIGINTERNINLINE VALUE
SWIG_FromCharPtrAndSize(const char * carray,size_t size)3394 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
3395 {
3396   if (carray) {
3397     if (size > LONG_MAX) {
3398       swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3399       return pchar_descriptor ?
3400 	SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : Qnil;
3401     } else {
3402       return rb_str_new(carray, static_cast< long >(size));
3403     }
3404   } else {
3405     return Qnil;
3406   }
3407 }
3408 
3409 
3410 SWIGINTERNINLINE VALUE
SWIG_FromCharPtr(const char * cptr)3411 SWIG_FromCharPtr(const char *cptr)
3412 {
3413   return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
3414 }
3415 
3416 
3417 SWIGINTERNINLINE VALUE
SWIG_From_int(int value)3418 SWIG_From_int  (int value)
3419 {
3420   return SWIG_From_long  (value);
3421 }
3422 
3423 
3424 SWIGINTERNINLINE VALUE
SWIG_From_unsigned_SS_long(unsigned long value)3425 SWIG_From_unsigned_SS_long  (unsigned long value)
3426 {
3427   return ULONG2NUM(value);
3428 }
3429 
3430 
3431 SWIGINTERNINLINE VALUE
SWIG_From_unsigned_SS_int(unsigned int value)3432 SWIG_From_unsigned_SS_int  (unsigned int value)
3433 {
3434   return SWIG_From_unsigned_SS_long  (value);
3435 }
3436 
3437 
3438 SWIGINTERN int
SWIG_AsVal_unsigned_SS_int(VALUE obj,unsigned int * val)3439 SWIG_AsVal_unsigned_SS_int (VALUE obj, unsigned int *val)
3440 {
3441   unsigned long v;
3442   int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
3443   if (SWIG_IsOK(res)) {
3444     if ((v > UINT_MAX)) {
3445       return SWIG_OverflowError;
3446     } else {
3447       if (val) *val = static_cast< unsigned int >(v);
3448     }
3449   }
3450   return res;
3451 }
3452 
3453 
3454 SWIGINTERNINLINE VALUE
SWIG_From_std_string(const std::string & s)3455 SWIG_From_std_string  (const std::string& s)
3456 {
3457   return SWIG_FromCharPtrAndSize(s.data(), s.size());
3458 }
3459 
Xapian_PositionIterator_equals(Xapian::PositionIterator const * self,Xapian::PositionIterator const & o)3460 SWIGINTERN bool Xapian_PositionIterator_equals(Xapian::PositionIterator const *self,Xapian::PositionIterator const &o){ return *self == o; }
Xapian_PositionIterator_get_termpos(Xapian::PositionIterator const * self)3461 SWIGINTERN Xapian::termpos Xapian_PositionIterator_get_termpos(Xapian::PositionIterator const *self){ return **self; }
Xapian_PositionIterator_next(Xapian::PositionIterator * self)3462 SWIGINTERN void Xapian_PositionIterator_next(Xapian::PositionIterator *self){ ++(*self); }
Xapian_PostingIterator_equals(Xapian::PostingIterator const * self,Xapian::PostingIterator const & o)3463 SWIGINTERN bool Xapian_PostingIterator_equals(Xapian::PostingIterator const *self,Xapian::PostingIterator const &o){ return *self == o; }
Xapian_PostingIterator_get_docid(Xapian::PostingIterator const * self)3464 SWIGINTERN Xapian::docid Xapian_PostingIterator_get_docid(Xapian::PostingIterator const *self){ return **self; }
Xapian_PostingIterator_next(Xapian::PostingIterator * self)3465 SWIGINTERN void Xapian_PostingIterator_next(Xapian::PostingIterator *self){ ++(*self); }
3466 
3467 SWIGINTERN int
SWIG_AsCharPtrAndSize(VALUE obj,char ** cptr,size_t * psize,int * alloc)3468 SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
3469 {
3470   if (TYPE(obj) == T_STRING) {
3471     char *cstr = StringValuePtr(obj);
3472     size_t size = RSTRING_LEN(obj) + 1;
3473     if (cptr)  {
3474       if (alloc) {
3475 	if (*alloc == SWIG_NEWOBJ) {
3476 	  *cptr = reinterpret_cast< char* >(memcpy(new char[size], cstr, sizeof(char)*(size)));
3477 	} else {
3478 	  *cptr = cstr;
3479 	  *alloc = SWIG_OLDOBJ;
3480 	}
3481       }
3482     }
3483     if (psize) *psize = size;
3484     return SWIG_OK;
3485   } else {
3486     swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3487     if (pchar_descriptor) {
3488       void* vptr = 0;
3489       if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3490 	if (cptr) *cptr = (char *)vptr;
3491 	if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0;
3492 	if (alloc) *alloc = SWIG_OLDOBJ;
3493 	return SWIG_OK;
3494       }
3495     }
3496   }
3497   return SWIG_TypeError;
3498 }
3499 
3500 
3501 SWIGINTERN int
SWIG_AsPtr_std_string(VALUE obj,std::string ** val)3502 SWIG_AsPtr_std_string (VALUE obj, std::string **val)
3503 {
3504   char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
3505   if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
3506     if (buf) {
3507       if (val) *val = new std::string(buf, size - 1);
3508       if (alloc == SWIG_NEWOBJ) delete[] buf;
3509       return SWIG_NEWOBJ;
3510     } else {
3511       if (val) *val = 0;
3512       return SWIG_OLDOBJ;
3513     }
3514   } else {
3515     static int init = 0;
3516     static swig_type_info* descriptor = 0;
3517     if (!init) {
3518       descriptor = SWIG_TypeQuery("std::string" " *");
3519       init = 1;
3520     }
3521     if (descriptor) {
3522       std::string *vptr;
3523       int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0);
3524       if (SWIG_IsOK(res) && val) *val = vptr;
3525       return res;
3526     }
3527   }
3528   return SWIG_ERROR;
3529 }
3530 
Xapian_TermIterator_equals(Xapian::TermIterator const * self,Xapian::TermIterator const & o)3531 SWIGINTERN bool Xapian_TermIterator_equals(Xapian::TermIterator const *self,Xapian::TermIterator const &o){ return *self == o; }
Xapian_TermIterator_get_term(Xapian::TermIterator const * self)3532 SWIGINTERN std::string Xapian_TermIterator_get_term(Xapian::TermIterator const *self){ return **self; }
Xapian_TermIterator_next(Xapian::TermIterator * self)3533 SWIGINTERN void Xapian_TermIterator_next(Xapian::TermIterator *self){ ++(*self); }
Xapian_ValueIterator_equals(Xapian::ValueIterator const * self,Xapian::ValueIterator const & o)3534 SWIGINTERN bool Xapian_ValueIterator_equals(Xapian::ValueIterator const *self,Xapian::ValueIterator const &o){ return *self == o; }
Xapian_ValueIterator_get_value(Xapian::ValueIterator const * self)3535 SWIGINTERN std::string Xapian_ValueIterator_get_value(Xapian::ValueIterator const *self){ return **self; }
Xapian_ValueIterator_next(Xapian::ValueIterator * self)3536 SWIGINTERN void Xapian_ValueIterator_next(Xapian::ValueIterator *self){ ++(*self); }
3537 
3538 /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FxO5PVAcmo/swig/Lib/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
SWIG_AUX_NUM2DBL(VALUE * args)3539 SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
3540 {
3541   VALUE obj = args[0];
3542   VALUE type = TYPE(obj);
3543   double *res = (double *)(args[1]);
3544   *res = NUM2DBL(obj); (void)type;
3545   return obj;
3546 }
3547 /*@SWIG@*/
3548 
3549 SWIGINTERN int
SWIG_AsVal_double(VALUE obj,double * val)3550 SWIG_AsVal_double (VALUE obj, double *val)
3551 {
3552   VALUE type = TYPE(obj);
3553   if ((type == T_FLOAT) || (type == T_FIXNUM) || (type == T_BIGNUM)) {
3554     double v;
3555     VALUE a[2];
3556     a[0] = obj;
3557     a[1] = (VALUE)(&v);
3558     if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2DBL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
3559       if (val) *val = v;
3560       return SWIG_OK;
3561     }
3562   }
3563   return SWIG_TypeError;
3564 }
3565 
3566 
3567 SWIGINTERN int
SWIG_AsVal_int(VALUE obj,int * val)3568 SWIG_AsVal_int (VALUE obj, int *val)
3569 {
3570   long v;
3571   int res = SWIG_AsVal_long (obj, &v);
3572   if (SWIG_IsOK(res)) {
3573     if ((v < INT_MIN || v > INT_MAX)) {
3574       return SWIG_OverflowError;
3575     } else {
3576       if (val) *val = static_cast< int >(v);
3577     }
3578   }
3579   return res;
3580 }
3581 
3582 
3583 #ifdef SWIG_LONG_LONG_AVAILABLE
3584 SWIGINTERNINLINE VALUE
SWIG_From_unsigned_SS_long_SS_long(unsigned long long value)3585 SWIG_From_unsigned_SS_long_SS_long  (unsigned long long value)
3586 {
3587   return ULL2NUM(value);
3588 }
3589 #endif
3590 
3591 
3592 SWIGINTERNINLINE VALUE
SWIG_From_size_t(size_t value)3593 SWIG_From_size_t  (size_t value)
3594 {
3595 #ifdef SWIG_LONG_LONG_AVAILABLE
3596   if (sizeof(size_t) <= sizeof(unsigned long)) {
3597 #endif
3598     return SWIG_From_unsigned_SS_long  (static_cast< unsigned long >(value));
3599 #ifdef SWIG_LONG_LONG_AVAILABLE
3600   } else {
3601     /* assume sizeof(size_t) <= sizeof(unsigned long long) */
3602     return SWIG_From_unsigned_SS_long_SS_long  (static_cast< unsigned long long >(value));
3603   }
3604 #endif
3605 }
3606 
3607 
3608 SWIGINTERN int
SWIG_AsVal_bool(VALUE obj,bool * val)3609 SWIG_AsVal_bool (VALUE obj, bool *val)
3610 {
3611   if (obj == Qtrue) {
3612     if (val) *val = true;
3613     return SWIG_OK;
3614   } else if (obj == Qfalse) {
3615     if (val) *val = false;
3616     return SWIG_OK;
3617   } else {
3618     int res = 0;
3619     if (SWIG_AsVal_int (obj, &res) == SWIG_OK) {
3620       if (val) *val = res ? true : false;
3621       return SWIG_OK;
3622     }
3623   }
3624   return SWIG_TypeError;
3625 }
3626 
3627 
3628   #define SWIG_From_double   rb_float_new
3629 
Xapian_MSet_get_docid(Xapian::MSet const * self,Xapian::doccount i)3630 SWIGINTERN Xapian::docid Xapian_MSet_get_docid(Xapian::MSet const *self,Xapian::doccount i){
3631 	return *(*self)[i];
3632     }
Xapian_MSet_get_document(Xapian::MSet const * self,Xapian::doccount i)3633 SWIGINTERN Xapian::Document Xapian_MSet_get_document(Xapian::MSet const *self,Xapian::doccount i){
3634 	return (*self)[i].get_document();
3635     }
Xapian_MSet_get_hit(Xapian::MSet const * self,Xapian::doccount i)3636 SWIGINTERN Xapian::MSetIterator Xapian_MSet_get_hit(Xapian::MSet const *self,Xapian::doccount i){
3637 	return (*self)[i];
3638     }
Xapian_MSet_get_document_percentage(Xapian::MSet const * self,Xapian::doccount i)3639 SWIGINTERN int Xapian_MSet_get_document_percentage(Xapian::MSet const *self,Xapian::doccount i){
3640 	return self->convert_to_percent((*self)[i]);
3641     }
Xapian_MSetIterator_equals(Xapian::MSetIterator const * self,Xapian::MSetIterator const & o)3642 SWIGINTERN bool Xapian_MSetIterator_equals(Xapian::MSetIterator const *self,Xapian::MSetIterator const &o){ return *self == o; }
Xapian_MSetIterator_get_docid(Xapian::MSetIterator const * self)3643 SWIGINTERN Xapian::docid Xapian_MSetIterator_get_docid(Xapian::MSetIterator const *self){ return **self; }
Xapian_MSetIterator_next(Xapian::MSetIterator * self)3644 SWIGINTERN void Xapian_MSetIterator_next(Xapian::MSetIterator *self){ ++(*self); }
Xapian_MSetIterator_prev(Xapian::MSetIterator * self)3645 SWIGINTERN void Xapian_MSetIterator_prev(Xapian::MSetIterator *self){ --(*self); }
Xapian_ESetIterator_equals(Xapian::ESetIterator const * self,Xapian::ESetIterator const & o)3646 SWIGINTERN bool Xapian_ESetIterator_equals(Xapian::ESetIterator const *self,Xapian::ESetIterator const &o){ return *self == o; }
Xapian_ESetIterator_get_term(Xapian::ESetIterator const * self)3647 SWIGINTERN std::string Xapian_ESetIterator_get_term(Xapian::ESetIterator const *self){ return **self; }
Xapian_ESetIterator_next(Xapian::ESetIterator * self)3648 SWIGINTERN void Xapian_ESetIterator_next(Xapian::ESetIterator *self){ ++(*self); }
Xapian_ESetIterator_prev(Xapian::ESetIterator * self)3649 SWIGINTERN void Xapian_ESetIterator_prev(Xapian::ESetIterator *self){ --(*self); }
new_Xapian_SimpleStopper__SWIG_2(std::string const & file)3650 SWIGINTERN Xapian::SimpleStopper *new_Xapian_SimpleStopper__SWIG_2(std::string const &file){
3651 	ifstream in_file(file.c_str());
3652 	if (!in_file.is_open())
3653 	    throw Xapian::InvalidArgumentError("Stopword file not found: " + file);
3654 	istream_iterator<std::string> in_iter(in_file);
3655 	istream_iterator<std::string> eof;
3656 	return new Xapian::SimpleStopper(in_iter, eof);
3657     }
Xapian_LatLongCoordsIterator_equals(Xapian::LatLongCoordsIterator const * self,Xapian::LatLongCoordsIterator const & o)3658 SWIGINTERN bool Xapian_LatLongCoordsIterator_equals(Xapian::LatLongCoordsIterator const *self,Xapian::LatLongCoordsIterator const &o){ return *self == o; }
Xapian_LatLongCoordsIterator_get_coord(Xapian::LatLongCoordsIterator const * self)3659 SWIGINTERN Xapian::LatLongCoord Xapian_LatLongCoordsIterator_get_coord(Xapian::LatLongCoordsIterator const *self){ return **self; }
Xapian_LatLongCoordsIterator_next(Xapian::LatLongCoordsIterator * self)3660 SWIGINTERN void Xapian_LatLongCoordsIterator_next(Xapian::LatLongCoordsIterator *self){ ++(*self); }
3661 
3662 
3663 
3664 
3665 /* ruby/extra.i: custom Ruby SWIG stuff to go after xapian-headers.i
3666  *
3667  * Copyright (C) 2011 Olly Betts
3668  *
3669  * This program is free software; you can redistribute it and/or
3670  * modify it under the terms of the GNU General Public License as
3671  * published by the Free Software Foundation; either version 2 of the
3672  * License, or (at your option) any later version.
3673  *
3674  * This program is distributed in the hope that it will be useful,
3675  * but WITHOUT ANY WARRANTY; without even the implied warranty of
3676  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3677  * GNU General Public License for more details.
3678  *
3679  * You should have received a copy of the GNU General Public License
3680  * along with this program; if not, write to the Free Software
3681  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
3682  * USA
3683  */
3684 
3685 /* ---------------------------------------------------
3686  * C++ director class helpers
3687  * --------------------------------------------------- */
3688 
3689 
3690 
3691 /* ---------------------------------------------------
3692  * C++ director class methods
3693  * --------------------------------------------------- */
3694 
3695 #include "xapian_wrap.h"
3696 
SwigDirector_StemImplementation(VALUE self)3697 SwigDirector_StemImplementation::SwigDirector_StemImplementation(VALUE self): Xapian::StemImplementation(), Swig::Director(self) {
3698 
3699 }
3700 
3701 
3702 
~SwigDirector_StemImplementation()3703 SwigDirector_StemImplementation::~SwigDirector_StemImplementation() {
3704 }
3705 
operator ()(std::string const & word)3706 std::string SwigDirector_StemImplementation::operator ()(std::string const &word) {
3707   std::string c_result ;
3708   VALUE obj0 = Qnil ;
3709   VALUE SWIGUNUSED result;
3710 
3711   obj0 = SWIG_From_std_string(static_cast< std::string >(word));
3712   result = rb_funcall(swig_get_self(), rb_intern("__call__"), 1,obj0);
3713   std::string *swig_optr = 0;
3714   int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr);
3715   if (!SWIG_IsOK(swig_ores) || !swig_optr) {
3716     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
3717   }
3718   c_result = *swig_optr;
3719   if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
3720   return (std::string) c_result;
3721 }
3722 
3723 
get_description() const3724 std::string SwigDirector_StemImplementation::get_description() const {
3725   std::string c_result ;
3726   VALUE SWIGUNUSED result;
3727 
3728   result = rb_funcall(swig_get_self(), rb_intern("description"), 0, Qnil);
3729   std::string *swig_optr = 0;
3730   int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr);
3731   if (!SWIG_IsOK(swig_ores) || !swig_optr) {
3732     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
3733   }
3734   c_result = *swig_optr;
3735   if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
3736   return (std::string) c_result;
3737 }
3738 
3739 
SwigDirector_MatchDecider(VALUE self)3740 SwigDirector_MatchDecider::SwigDirector_MatchDecider(VALUE self): Xapian::MatchDecider(), Swig::Director(self) {
3741 
3742 }
3743 
3744 
3745 
operator ()(Xapian::Document const & doc) const3746 bool SwigDirector_MatchDecider::operator ()(Xapian::Document const &doc) const {
3747   bool c_result ;
3748   VALUE obj0 = Qnil ;
3749   VALUE SWIGUNUSED result;
3750 
3751   obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&doc), SWIGTYPE_p_Xapian__Document,  0 );
3752   result = rb_funcall(swig_get_self(), rb_intern("__call__"), 1,obj0);
3753   bool swig_val;
3754   int swig_res = SWIG_AsVal_bool(result, &swig_val);
3755   if (!SWIG_IsOK(swig_res)) {
3756     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'");
3757   }
3758   c_result = static_cast< bool >(swig_val);
3759   return (bool) c_result;
3760 }
3761 
3762 
~SwigDirector_MatchDecider()3763 SwigDirector_MatchDecider::~SwigDirector_MatchDecider() {
3764 }
3765 
SwigDirector_ExpandDecider(VALUE self)3766 SwigDirector_ExpandDecider::SwigDirector_ExpandDecider(VALUE self): Xapian::ExpandDecider(), Swig::Director(self) {
3767 
3768 }
3769 
3770 
3771 
operator ()(std::string const & term) const3772 bool SwigDirector_ExpandDecider::operator ()(std::string const &term) const {
3773   bool c_result ;
3774   VALUE obj0 = Qnil ;
3775   VALUE SWIGUNUSED result;
3776 
3777   obj0 = SWIG_From_std_string(static_cast< std::string >(term));
3778   result = rb_funcall(swig_get_self(), rb_intern("__call__"), 1,obj0);
3779   bool swig_val;
3780   int swig_res = SWIG_AsVal_bool(result, &swig_val);
3781   if (!SWIG_IsOK(swig_res)) {
3782     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'");
3783   }
3784   c_result = static_cast< bool >(swig_val);
3785   return (bool) c_result;
3786 }
3787 
3788 
~SwigDirector_ExpandDecider()3789 SwigDirector_ExpandDecider::~SwigDirector_ExpandDecider() {
3790 }
3791 
SwigDirector_KeyMaker(VALUE self)3792 SwigDirector_KeyMaker::SwigDirector_KeyMaker(VALUE self): Xapian::KeyMaker(), Swig::Director(self) {
3793 
3794 }
3795 
3796 
3797 
operator ()(Xapian::Document const & doc) const3798 std::string SwigDirector_KeyMaker::operator ()(Xapian::Document const &doc) const {
3799   std::string c_result ;
3800   VALUE obj0 = Qnil ;
3801   VALUE SWIGUNUSED result;
3802 
3803   obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&doc), SWIGTYPE_p_Xapian__Document,  0 );
3804   result = rb_funcall(swig_get_self(), rb_intern("__call__"), 1,obj0);
3805   std::string *swig_optr = 0;
3806   int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr);
3807   if (!SWIG_IsOK(swig_ores) || !swig_optr) {
3808     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
3809   }
3810   c_result = *swig_optr;
3811   if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
3812   return (std::string) c_result;
3813 }
3814 
3815 
~SwigDirector_KeyMaker()3816 SwigDirector_KeyMaker::~SwigDirector_KeyMaker() {
3817 }
3818 
SwigDirector_Stopper(VALUE self)3819 SwigDirector_Stopper::SwigDirector_Stopper(VALUE self): Xapian::Stopper(), Swig::Director(self) {
3820 
3821 }
3822 
3823 
3824 
operator ()(std::string const & term) const3825 bool SwigDirector_Stopper::operator ()(std::string const &term) const {
3826   bool c_result ;
3827   VALUE obj0 = Qnil ;
3828   VALUE SWIGUNUSED result;
3829 
3830   obj0 = SWIG_From_std_string(static_cast< std::string >(term));
3831   result = rb_funcall(swig_get_self(), rb_intern("__call__"), 1,obj0);
3832   bool swig_val;
3833   int swig_res = SWIG_AsVal_bool(result, &swig_val);
3834   if (!SWIG_IsOK(swig_res)) {
3835     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'");
3836   }
3837   c_result = static_cast< bool >(swig_val);
3838   return (bool) c_result;
3839 }
3840 
3841 
~SwigDirector_Stopper()3842 SwigDirector_Stopper::~SwigDirector_Stopper() {
3843 }
3844 
get_description() const3845 std::string SwigDirector_Stopper::get_description() const {
3846   std::string c_result ;
3847   VALUE SWIGUNUSED result;
3848 
3849   result = rb_funcall(swig_get_self(), rb_intern("description"), 0, Qnil);
3850   std::string *swig_optr = 0;
3851   int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr);
3852   if (!SWIG_IsOK(swig_ores) || !swig_optr) {
3853     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
3854   }
3855   c_result = *swig_optr;
3856   if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
3857   return (std::string) c_result;
3858 }
3859 
3860 
SwigDirector_RangeProcessor(VALUE self)3861 SwigDirector_RangeProcessor::SwigDirector_RangeProcessor(VALUE self): Xapian::RangeProcessor(), Swig::Director(self) {
3862 
3863 }
3864 
3865 
3866 
SwigDirector_RangeProcessor(VALUE self,Xapian::valueno slot_,std::string const & str_,unsigned int flags_)3867 SwigDirector_RangeProcessor::SwigDirector_RangeProcessor(VALUE self, Xapian::valueno slot_, std::string const &str_, unsigned int flags_): Xapian::RangeProcessor(slot_, str_, flags_), Swig::Director(self) {
3868 
3869 }
3870 
3871 
3872 
~SwigDirector_RangeProcessor()3873 SwigDirector_RangeProcessor::~SwigDirector_RangeProcessor() {
3874 }
3875 
operator ()(std::string const & begin,std::string const & end)3876 Xapian::Query SwigDirector_RangeProcessor::operator ()(std::string const &begin, std::string const &end) {
3877   Xapian::Query c_result ;
3878   VALUE obj0 = Qnil ;
3879   VALUE obj1 = Qnil ;
3880   VALUE SWIGUNUSED result;
3881   void *swig_argp ;
3882   int swig_res = 0 ;
3883 
3884   obj0 = SWIG_From_std_string(static_cast< std::string >(begin));
3885   obj1 = SWIG_From_std_string(static_cast< std::string >(end));
3886   result = rb_funcall(swig_get_self(), rb_intern("__call__"), 2,obj0,obj1);
3887   swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_Xapian__Query,  0 );
3888   if (!SWIG_IsOK(swig_res)) {
3889     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Xapian::Query""'");
3890   }
3891   c_result = *(reinterpret_cast< Xapian::Query * >(swig_argp));
3892   return (Xapian::Query) c_result;
3893 }
3894 
3895 
SwigDirector_ValueRangeProcessor(VALUE self)3896 SwigDirector_ValueRangeProcessor::SwigDirector_ValueRangeProcessor(VALUE self): Xapian::ValueRangeProcessor(), Swig::Director(self) {
3897 
3898 }
3899 
3900 
3901 
~SwigDirector_ValueRangeProcessor()3902 SwigDirector_ValueRangeProcessor::~SwigDirector_ValueRangeProcessor() {
3903 }
3904 
operator ()(std::string & begin,std::string & end)3905 Xapian::valueno SwigDirector_ValueRangeProcessor::operator ()(std::string &begin, std::string &end) {
3906   Xapian::valueno c_result ;
3907   VALUE obj0 = Qnil ;
3908   VALUE obj1 = Qnil ;
3909   VALUE SWIGUNUSED result;
3910 
3911   obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&begin), SWIGTYPE_p_std__string,  0 );
3912   obj1 = SWIG_NewPointerObj(SWIG_as_voidptr(&end), SWIGTYPE_p_std__string,  0 );
3913   result = rb_funcall(swig_get_self(), rb_intern("__call__"), 2,obj0,obj1);
3914   unsigned int swig_val;
3915   int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val);
3916   if (!SWIG_IsOK(swig_res)) {
3917     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Xapian::valueno""'");
3918   }
3919   c_result = static_cast< Xapian::valueno >(swig_val);
3920   return (Xapian::valueno) c_result;
3921 }
3922 
3923 
SwigDirector_FieldProcessor(VALUE self)3924 SwigDirector_FieldProcessor::SwigDirector_FieldProcessor(VALUE self): Xapian::FieldProcessor(), Swig::Director(self) {
3925 
3926 }
3927 
3928 
3929 
~SwigDirector_FieldProcessor()3930 SwigDirector_FieldProcessor::~SwigDirector_FieldProcessor() {
3931 }
3932 
operator ()(std::string const & str)3933 Xapian::Query SwigDirector_FieldProcessor::operator ()(std::string const &str) {
3934   Xapian::Query c_result ;
3935   VALUE obj0 = Qnil ;
3936   VALUE SWIGUNUSED result;
3937   void *swig_argp ;
3938   int swig_res = 0 ;
3939 
3940   obj0 = SWIG_From_std_string(static_cast< std::string >(str));
3941   result = rb_funcall(swig_get_self(), rb_intern("__call__"), 1,obj0);
3942   swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_Xapian__Query,  0 );
3943   if (!SWIG_IsOK(swig_res)) {
3944     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Xapian::Query""'");
3945   }
3946   c_result = *(reinterpret_cast< Xapian::Query * >(swig_argp));
3947   return (Xapian::Query) c_result;
3948 }
3949 
3950 
SwigDirector_Compactor(VALUE self)3951 SwigDirector_Compactor::SwigDirector_Compactor(VALUE self): Xapian::Compactor(), Swig::Director(self) {
3952 
3953 }
3954 
3955 
3956 
~SwigDirector_Compactor()3957 SwigDirector_Compactor::~SwigDirector_Compactor() {
3958 }
3959 
set_status(std::string const & table,std::string const & status)3960 void SwigDirector_Compactor::set_status(std::string const &table, std::string const &status) {
3961   VALUE obj0 = Qnil ;
3962   VALUE obj1 = Qnil ;
3963   VALUE SWIGUNUSED result;
3964 
3965   obj0 = SWIG_From_std_string(static_cast< std::string >(table));
3966   obj1 = SWIG_From_std_string(static_cast< std::string >(status));
3967   result = rb_funcall(swig_get_self(), rb_intern("set_status"), 2,obj0,obj1);
3968 }
3969 
3970 
resolve_duplicate_metadata(std::string const & key,size_t num_tags,std::string const tags[])3971 std::string SwigDirector_Compactor::resolve_duplicate_metadata(std::string const &key, size_t num_tags, std::string const tags[]) {
3972   std::string c_result ;
3973   VALUE obj0 = Qnil ;
3974   VALUE obj1 = Qnil ;
3975   VALUE SWIGUNUSED result;
3976 
3977   obj0 = SWIG_From_std_string(static_cast< std::string >(key));
3978   {
3979     obj1 = rb_ary_new();
3980     for (size_t i = 0; i != num_tags; ++i) {
3981       VALUE str = rb_str_new(tags[i].data(), tags[i].size());
3982       rb_ary_push(obj1, str);
3983     }
3984   }
3985   result = rb_funcall(swig_get_self(), rb_intern("resolve_duplicate_metadata"), 2,obj0,obj1);
3986   std::string *swig_optr = 0;
3987   int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr);
3988   if (!SWIG_IsOK(swig_ores) || !swig_optr) {
3989     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
3990   }
3991   c_result = *swig_optr;
3992   if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
3993   return (std::string) c_result;
3994 }
3995 
3996 
SwigDirector_PostingSource(VALUE self)3997 SwigDirector_PostingSource::SwigDirector_PostingSource(VALUE self): Xapian::PostingSource(), Swig::Director(self) {
3998 
3999 }
4000 
4001 
4002 
~SwigDirector_PostingSource()4003 SwigDirector_PostingSource::~SwigDirector_PostingSource() {
4004 }
4005 
get_termfreq_min() const4006 Xapian::doccount SwigDirector_PostingSource::get_termfreq_min() const {
4007   Xapian::doccount c_result ;
4008   VALUE SWIGUNUSED result;
4009 
4010   result = rb_funcall(swig_get_self(), rb_intern("get_termfreq_min"), 0, Qnil);
4011   unsigned int swig_val;
4012   int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val);
4013   if (!SWIG_IsOK(swig_res)) {
4014     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Xapian::doccount""'");
4015   }
4016   c_result = static_cast< Xapian::doccount >(swig_val);
4017   return (Xapian::doccount) c_result;
4018 }
4019 
4020 
get_termfreq_est() const4021 Xapian::doccount SwigDirector_PostingSource::get_termfreq_est() const {
4022   Xapian::doccount c_result ;
4023   VALUE SWIGUNUSED result;
4024 
4025   result = rb_funcall(swig_get_self(), rb_intern("get_termfreq_est"), 0, Qnil);
4026   unsigned int swig_val;
4027   int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val);
4028   if (!SWIG_IsOK(swig_res)) {
4029     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Xapian::doccount""'");
4030   }
4031   c_result = static_cast< Xapian::doccount >(swig_val);
4032   return (Xapian::doccount) c_result;
4033 }
4034 
4035 
get_termfreq_max() const4036 Xapian::doccount SwigDirector_PostingSource::get_termfreq_max() const {
4037   Xapian::doccount c_result ;
4038   VALUE SWIGUNUSED result;
4039 
4040   result = rb_funcall(swig_get_self(), rb_intern("get_termfreq_max"), 0, Qnil);
4041   unsigned int swig_val;
4042   int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val);
4043   if (!SWIG_IsOK(swig_res)) {
4044     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Xapian::doccount""'");
4045   }
4046   c_result = static_cast< Xapian::doccount >(swig_val);
4047   return (Xapian::doccount) c_result;
4048 }
4049 
4050 
get_weight() const4051 double SwigDirector_PostingSource::get_weight() const {
4052   double c_result ;
4053   VALUE SWIGUNUSED result;
4054 
4055   result = rb_funcall(swig_get_self(), rb_intern("weight"), 0, Qnil);
4056   double swig_val;
4057   int swig_res = SWIG_AsVal_double(result, &swig_val);
4058   if (!SWIG_IsOK(swig_res)) {
4059     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""double""'");
4060   }
4061   c_result = static_cast< double >(swig_val);
4062   return (double) c_result;
4063 }
4064 
4065 
get_docid() const4066 Xapian::docid SwigDirector_PostingSource::get_docid() const {
4067   Xapian::docid c_result ;
4068   VALUE SWIGUNUSED result;
4069 
4070   result = rb_funcall(swig_get_self(), rb_intern("docid"), 0, Qnil);
4071   unsigned int swig_val;
4072   int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val);
4073   if (!SWIG_IsOK(swig_res)) {
4074     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Xapian::docid""'");
4075   }
4076   c_result = static_cast< Xapian::docid >(swig_val);
4077   return (Xapian::docid) c_result;
4078 }
4079 
4080 
next(double min_wt)4081 void SwigDirector_PostingSource::next(double min_wt) {
4082   VALUE obj0 = Qnil ;
4083   VALUE SWIGUNUSED result;
4084 
4085   obj0 = SWIG_From_double(static_cast< double >(min_wt));
4086   result = rb_funcall(swig_get_self(), rb_intern("next"), 1,obj0);
4087 }
4088 
4089 
skip_to(Xapian::docid did,double min_wt)4090 void SwigDirector_PostingSource::skip_to(Xapian::docid did, double min_wt) {
4091   VALUE obj0 = Qnil ;
4092   VALUE obj1 = Qnil ;
4093   VALUE SWIGUNUSED result;
4094 
4095   obj0 = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(did));
4096   obj1 = SWIG_From_double(static_cast< double >(min_wt));
4097   result = rb_funcall(swig_get_self(), rb_intern("skip_to"), 2,obj0,obj1);
4098 }
4099 
4100 
check(Xapian::docid did,double min_wt)4101 bool SwigDirector_PostingSource::check(Xapian::docid did, double min_wt) {
4102   bool c_result ;
4103   VALUE obj0 = Qnil ;
4104   VALUE obj1 = Qnil ;
4105   VALUE SWIGUNUSED result;
4106 
4107   obj0 = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(did));
4108   obj1 = SWIG_From_double(static_cast< double >(min_wt));
4109   result = rb_funcall(swig_get_self(), rb_intern("check"), 2,obj0,obj1);
4110   bool swig_val;
4111   int swig_res = SWIG_AsVal_bool(result, &swig_val);
4112   if (!SWIG_IsOK(swig_res)) {
4113     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'");
4114   }
4115   c_result = static_cast< bool >(swig_val);
4116   return (bool) c_result;
4117 }
4118 
4119 
at_end() const4120 bool SwigDirector_PostingSource::at_end() const {
4121   bool c_result ;
4122   VALUE SWIGUNUSED result;
4123 
4124   result = rb_funcall(swig_get_self(), rb_intern("at_end"), 0, Qnil);
4125   bool swig_val;
4126   int swig_res = SWIG_AsVal_bool(result, &swig_val);
4127   if (!SWIG_IsOK(swig_res)) {
4128     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'");
4129   }
4130   c_result = static_cast< bool >(swig_val);
4131   return (bool) c_result;
4132 }
4133 
4134 
clone() const4135 Xapian::PostingSource *SwigDirector_PostingSource::clone() const {
4136   return Xapian::PostingSource::clone();
4137 }
4138 
4139 
name() const4140 std::string SwigDirector_PostingSource::name() const {
4141   std::string c_result ;
4142   VALUE SWIGUNUSED result;
4143 
4144   result = rb_funcall(swig_get_self(), rb_intern("name"), 0, Qnil);
4145   std::string *swig_optr = 0;
4146   int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr);
4147   if (!SWIG_IsOK(swig_ores) || !swig_optr) {
4148     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
4149   }
4150   c_result = *swig_optr;
4151   if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
4152   return (std::string) c_result;
4153 }
4154 
4155 
serialise() const4156 std::string SwigDirector_PostingSource::serialise() const {
4157   return Xapian::PostingSource::serialise();
4158 }
4159 
4160 
unserialise(std::string const & serialised) const4161 Xapian::PostingSource *SwigDirector_PostingSource::unserialise(std::string const &serialised) const {
4162   return Xapian::PostingSource::unserialise(serialised);
4163 }
4164 
4165 
unserialise_with_registry(std::string const & serialised,Xapian::Registry const & registry) const4166 Xapian::PostingSource *SwigDirector_PostingSource::unserialise_with_registry(std::string const &serialised, Xapian::Registry const &registry) const {
4167   return Xapian::PostingSource::unserialise_with_registry(serialised,registry);
4168 }
4169 
4170 
init(Xapian::Database const & db)4171 void SwigDirector_PostingSource::init(Xapian::Database const &db) {
4172   VALUE obj0 = Qnil ;
4173   VALUE SWIGUNUSED result;
4174 
4175   obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&db), SWIGTYPE_p_Xapian__Database,  0 );
4176   result = rb_funcall(swig_get_self(), rb_intern("init"), 1,obj0);
4177 }
4178 
4179 
get_description() const4180 std::string SwigDirector_PostingSource::get_description() const {
4181   std::string c_result ;
4182   VALUE SWIGUNUSED result;
4183 
4184   result = rb_funcall(swig_get_self(), rb_intern("description"), 0, Qnil);
4185   std::string *swig_optr = 0;
4186   int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr);
4187   if (!SWIG_IsOK(swig_ores) || !swig_optr) {
4188     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
4189   }
4190   c_result = *swig_optr;
4191   if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
4192   return (std::string) c_result;
4193 }
4194 
4195 
SwigDirector_ValuePostingSource(VALUE self,Xapian::valueno slot_)4196 SwigDirector_ValuePostingSource::SwigDirector_ValuePostingSource(VALUE self, Xapian::valueno slot_): Xapian::ValuePostingSource(slot_), Swig::Director(self) {
4197 
4198 }
4199 
4200 
4201 
~SwigDirector_ValuePostingSource()4202 SwigDirector_ValuePostingSource::~SwigDirector_ValuePostingSource() {
4203 }
4204 
get_termfreq_min() const4205 Xapian::doccount SwigDirector_ValuePostingSource::get_termfreq_min() const {
4206   Xapian::doccount c_result ;
4207   VALUE SWIGUNUSED result;
4208 
4209   result = rb_funcall(swig_get_self(), rb_intern("get_termfreq_min"), 0, Qnil);
4210   unsigned int swig_val;
4211   int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val);
4212   if (!SWIG_IsOK(swig_res)) {
4213     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Xapian::doccount""'");
4214   }
4215   c_result = static_cast< Xapian::doccount >(swig_val);
4216   return (Xapian::doccount) c_result;
4217 }
4218 
4219 
get_termfreq_est() const4220 Xapian::doccount SwigDirector_ValuePostingSource::get_termfreq_est() const {
4221   Xapian::doccount c_result ;
4222   VALUE SWIGUNUSED result;
4223 
4224   result = rb_funcall(swig_get_self(), rb_intern("get_termfreq_est"), 0, Qnil);
4225   unsigned int swig_val;
4226   int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val);
4227   if (!SWIG_IsOK(swig_res)) {
4228     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Xapian::doccount""'");
4229   }
4230   c_result = static_cast< Xapian::doccount >(swig_val);
4231   return (Xapian::doccount) c_result;
4232 }
4233 
4234 
get_termfreq_max() const4235 Xapian::doccount SwigDirector_ValuePostingSource::get_termfreq_max() const {
4236   Xapian::doccount c_result ;
4237   VALUE SWIGUNUSED result;
4238 
4239   result = rb_funcall(swig_get_self(), rb_intern("get_termfreq_max"), 0, Qnil);
4240   unsigned int swig_val;
4241   int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val);
4242   if (!SWIG_IsOK(swig_res)) {
4243     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Xapian::doccount""'");
4244   }
4245   c_result = static_cast< Xapian::doccount >(swig_val);
4246   return (Xapian::doccount) c_result;
4247 }
4248 
4249 
get_weight() const4250 double SwigDirector_ValuePostingSource::get_weight() const {
4251   double c_result ;
4252   VALUE SWIGUNUSED result;
4253 
4254   result = rb_funcall(swig_get_self(), rb_intern("weight"), 0, Qnil);
4255   double swig_val;
4256   int swig_res = SWIG_AsVal_double(result, &swig_val);
4257   if (!SWIG_IsOK(swig_res)) {
4258     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""double""'");
4259   }
4260   c_result = static_cast< double >(swig_val);
4261   return (double) c_result;
4262 }
4263 
4264 
get_docid() const4265 Xapian::docid SwigDirector_ValuePostingSource::get_docid() const {
4266   Xapian::docid c_result ;
4267   VALUE SWIGUNUSED result;
4268 
4269   result = rb_funcall(swig_get_self(), rb_intern("docid"), 0, Qnil);
4270   unsigned int swig_val;
4271   int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val);
4272   if (!SWIG_IsOK(swig_res)) {
4273     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Xapian::docid""'");
4274   }
4275   c_result = static_cast< Xapian::docid >(swig_val);
4276   return (Xapian::docid) c_result;
4277 }
4278 
4279 
next(double min_wt)4280 void SwigDirector_ValuePostingSource::next(double min_wt) {
4281   VALUE obj0 = Qnil ;
4282   VALUE SWIGUNUSED result;
4283 
4284   obj0 = SWIG_From_double(static_cast< double >(min_wt));
4285   result = rb_funcall(swig_get_self(), rb_intern("next"), 1,obj0);
4286 }
4287 
4288 
skip_to(Xapian::docid min_docid,double min_wt)4289 void SwigDirector_ValuePostingSource::skip_to(Xapian::docid min_docid, double min_wt) {
4290   VALUE obj0 = Qnil ;
4291   VALUE obj1 = Qnil ;
4292   VALUE SWIGUNUSED result;
4293 
4294   obj0 = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(min_docid));
4295   obj1 = SWIG_From_double(static_cast< double >(min_wt));
4296   result = rb_funcall(swig_get_self(), rb_intern("skip_to"), 2,obj0,obj1);
4297 }
4298 
4299 
check(Xapian::docid min_docid,double min_wt)4300 bool SwigDirector_ValuePostingSource::check(Xapian::docid min_docid, double min_wt) {
4301   bool c_result ;
4302   VALUE obj0 = Qnil ;
4303   VALUE obj1 = Qnil ;
4304   VALUE SWIGUNUSED result;
4305 
4306   obj0 = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(min_docid));
4307   obj1 = SWIG_From_double(static_cast< double >(min_wt));
4308   result = rb_funcall(swig_get_self(), rb_intern("check"), 2,obj0,obj1);
4309   bool swig_val;
4310   int swig_res = SWIG_AsVal_bool(result, &swig_val);
4311   if (!SWIG_IsOK(swig_res)) {
4312     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'");
4313   }
4314   c_result = static_cast< bool >(swig_val);
4315   return (bool) c_result;
4316 }
4317 
4318 
at_end() const4319 bool SwigDirector_ValuePostingSource::at_end() const {
4320   bool c_result ;
4321   VALUE SWIGUNUSED result;
4322 
4323   result = rb_funcall(swig_get_self(), rb_intern("at_end"), 0, Qnil);
4324   bool swig_val;
4325   int swig_res = SWIG_AsVal_bool(result, &swig_val);
4326   if (!SWIG_IsOK(swig_res)) {
4327     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'");
4328   }
4329   c_result = static_cast< bool >(swig_val);
4330   return (bool) c_result;
4331 }
4332 
4333 
clone() const4334 Xapian::PostingSource *SwigDirector_ValuePostingSource::clone() const {
4335   return Xapian::PostingSource::clone();
4336 }
4337 
4338 
name() const4339 std::string SwigDirector_ValuePostingSource::name() const {
4340   std::string c_result ;
4341   VALUE SWIGUNUSED result;
4342 
4343   result = rb_funcall(swig_get_self(), rb_intern("name"), 0, Qnil);
4344   std::string *swig_optr = 0;
4345   int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr);
4346   if (!SWIG_IsOK(swig_ores) || !swig_optr) {
4347     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
4348   }
4349   c_result = *swig_optr;
4350   if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
4351   return (std::string) c_result;
4352 }
4353 
4354 
serialise() const4355 std::string SwigDirector_ValuePostingSource::serialise() const {
4356   return Xapian::PostingSource::serialise();
4357 }
4358 
4359 
unserialise(std::string const & serialised) const4360 Xapian::PostingSource *SwigDirector_ValuePostingSource::unserialise(std::string const &serialised) const {
4361   return Xapian::PostingSource::unserialise(serialised);
4362 }
4363 
4364 
unserialise_with_registry(std::string const & serialised,Xapian::Registry const & registry) const4365 Xapian::PostingSource *SwigDirector_ValuePostingSource::unserialise_with_registry(std::string const &serialised, Xapian::Registry const &registry) const {
4366   return Xapian::PostingSource::unserialise_with_registry(serialised,registry);
4367 }
4368 
4369 
init(Xapian::Database const & db_)4370 void SwigDirector_ValuePostingSource::init(Xapian::Database const &db_) {
4371   VALUE obj0 = Qnil ;
4372   VALUE SWIGUNUSED result;
4373 
4374   obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&db_), SWIGTYPE_p_Xapian__Database,  0 );
4375   result = rb_funcall(swig_get_self(), rb_intern("init"), 1,obj0);
4376 }
4377 
4378 
get_description() const4379 std::string SwigDirector_ValuePostingSource::get_description() const {
4380   std::string c_result ;
4381   VALUE SWIGUNUSED result;
4382 
4383   result = rb_funcall(swig_get_self(), rb_intern("description"), 0, Qnil);
4384   std::string *swig_optr = 0;
4385   int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr);
4386   if (!SWIG_IsOK(swig_ores) || !swig_optr) {
4387     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
4388   }
4389   c_result = *swig_optr;
4390   if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
4391   return (std::string) c_result;
4392 }
4393 
4394 
SwigDirector_ValueWeightPostingSource(VALUE self,Xapian::valueno slot_)4395 SwigDirector_ValueWeightPostingSource::SwigDirector_ValueWeightPostingSource(VALUE self, Xapian::valueno slot_): Xapian::ValueWeightPostingSource(slot_), Swig::Director(self) {
4396 
4397 }
4398 
4399 
4400 
~SwigDirector_ValueWeightPostingSource()4401 SwigDirector_ValueWeightPostingSource::~SwigDirector_ValueWeightPostingSource() {
4402 }
4403 
get_termfreq_min() const4404 Xapian::doccount SwigDirector_ValueWeightPostingSource::get_termfreq_min() const {
4405   Xapian::doccount c_result ;
4406   VALUE SWIGUNUSED result;
4407 
4408   result = rb_funcall(swig_get_self(), rb_intern("get_termfreq_min"), 0, Qnil);
4409   unsigned int swig_val;
4410   int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val);
4411   if (!SWIG_IsOK(swig_res)) {
4412     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Xapian::doccount""'");
4413   }
4414   c_result = static_cast< Xapian::doccount >(swig_val);
4415   return (Xapian::doccount) c_result;
4416 }
4417 
4418 
get_termfreq_est() const4419 Xapian::doccount SwigDirector_ValueWeightPostingSource::get_termfreq_est() const {
4420   Xapian::doccount c_result ;
4421   VALUE SWIGUNUSED result;
4422 
4423   result = rb_funcall(swig_get_self(), rb_intern("get_termfreq_est"), 0, Qnil);
4424   unsigned int swig_val;
4425   int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val);
4426   if (!SWIG_IsOK(swig_res)) {
4427     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Xapian::doccount""'");
4428   }
4429   c_result = static_cast< Xapian::doccount >(swig_val);
4430   return (Xapian::doccount) c_result;
4431 }
4432 
4433 
get_termfreq_max() const4434 Xapian::doccount SwigDirector_ValueWeightPostingSource::get_termfreq_max() const {
4435   Xapian::doccount c_result ;
4436   VALUE SWIGUNUSED result;
4437 
4438   result = rb_funcall(swig_get_self(), rb_intern("get_termfreq_max"), 0, Qnil);
4439   unsigned int swig_val;
4440   int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val);
4441   if (!SWIG_IsOK(swig_res)) {
4442     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Xapian::doccount""'");
4443   }
4444   c_result = static_cast< Xapian::doccount >(swig_val);
4445   return (Xapian::doccount) c_result;
4446 }
4447 
4448 
get_weight() const4449 double SwigDirector_ValueWeightPostingSource::get_weight() const {
4450   double c_result ;
4451   VALUE SWIGUNUSED result;
4452 
4453   result = rb_funcall(swig_get_self(), rb_intern("weight"), 0, Qnil);
4454   double swig_val;
4455   int swig_res = SWIG_AsVal_double(result, &swig_val);
4456   if (!SWIG_IsOK(swig_res)) {
4457     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""double""'");
4458   }
4459   c_result = static_cast< double >(swig_val);
4460   return (double) c_result;
4461 }
4462 
4463 
get_docid() const4464 Xapian::docid SwigDirector_ValueWeightPostingSource::get_docid() const {
4465   Xapian::docid c_result ;
4466   VALUE SWIGUNUSED result;
4467 
4468   result = rb_funcall(swig_get_self(), rb_intern("docid"), 0, Qnil);
4469   unsigned int swig_val;
4470   int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val);
4471   if (!SWIG_IsOK(swig_res)) {
4472     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Xapian::docid""'");
4473   }
4474   c_result = static_cast< Xapian::docid >(swig_val);
4475   return (Xapian::docid) c_result;
4476 }
4477 
4478 
next(double min_wt)4479 void SwigDirector_ValueWeightPostingSource::next(double min_wt) {
4480   VALUE obj0 = Qnil ;
4481   VALUE SWIGUNUSED result;
4482 
4483   obj0 = SWIG_From_double(static_cast< double >(min_wt));
4484   result = rb_funcall(swig_get_self(), rb_intern("next"), 1,obj0);
4485 }
4486 
4487 
skip_to(Xapian::docid min_docid,double min_wt)4488 void SwigDirector_ValueWeightPostingSource::skip_to(Xapian::docid min_docid, double min_wt) {
4489   VALUE obj0 = Qnil ;
4490   VALUE obj1 = Qnil ;
4491   VALUE SWIGUNUSED result;
4492 
4493   obj0 = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(min_docid));
4494   obj1 = SWIG_From_double(static_cast< double >(min_wt));
4495   result = rb_funcall(swig_get_self(), rb_intern("skip_to"), 2,obj0,obj1);
4496 }
4497 
4498 
check(Xapian::docid min_docid,double min_wt)4499 bool SwigDirector_ValueWeightPostingSource::check(Xapian::docid min_docid, double min_wt) {
4500   bool c_result ;
4501   VALUE obj0 = Qnil ;
4502   VALUE obj1 = Qnil ;
4503   VALUE SWIGUNUSED result;
4504 
4505   obj0 = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(min_docid));
4506   obj1 = SWIG_From_double(static_cast< double >(min_wt));
4507   result = rb_funcall(swig_get_self(), rb_intern("check"), 2,obj0,obj1);
4508   bool swig_val;
4509   int swig_res = SWIG_AsVal_bool(result, &swig_val);
4510   if (!SWIG_IsOK(swig_res)) {
4511     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'");
4512   }
4513   c_result = static_cast< bool >(swig_val);
4514   return (bool) c_result;
4515 }
4516 
4517 
at_end() const4518 bool SwigDirector_ValueWeightPostingSource::at_end() const {
4519   bool c_result ;
4520   VALUE SWIGUNUSED result;
4521 
4522   result = rb_funcall(swig_get_self(), rb_intern("at_end"), 0, Qnil);
4523   bool swig_val;
4524   int swig_res = SWIG_AsVal_bool(result, &swig_val);
4525   if (!SWIG_IsOK(swig_res)) {
4526     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'");
4527   }
4528   c_result = static_cast< bool >(swig_val);
4529   return (bool) c_result;
4530 }
4531 
4532 
clone() const4533 Xapian::ValueWeightPostingSource *SwigDirector_ValueWeightPostingSource::clone() const {
4534   return Xapian::ValueWeightPostingSource::clone();
4535 }
4536 
4537 
name() const4538 std::string SwigDirector_ValueWeightPostingSource::name() const {
4539   std::string c_result ;
4540   VALUE SWIGUNUSED result;
4541 
4542   result = rb_funcall(swig_get_self(), rb_intern("name"), 0, Qnil);
4543   std::string *swig_optr = 0;
4544   int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr);
4545   if (!SWIG_IsOK(swig_ores) || !swig_optr) {
4546     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
4547   }
4548   c_result = *swig_optr;
4549   if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
4550   return (std::string) c_result;
4551 }
4552 
4553 
serialise() const4554 std::string SwigDirector_ValueWeightPostingSource::serialise() const {
4555   return Xapian::ValueWeightPostingSource::serialise();
4556 }
4557 
4558 
unserialise(std::string const & serialised) const4559 Xapian::ValueWeightPostingSource *SwigDirector_ValueWeightPostingSource::unserialise(std::string const &serialised) const {
4560   return Xapian::ValueWeightPostingSource::unserialise(serialised);
4561 }
4562 
4563 
unserialise_with_registry(std::string const & serialised,Xapian::Registry const & registry) const4564 Xapian::PostingSource *SwigDirector_ValueWeightPostingSource::unserialise_with_registry(std::string const &serialised, Xapian::Registry const &registry) const {
4565   return Xapian::PostingSource::unserialise_with_registry(serialised,registry);
4566 }
4567 
4568 
init(Xapian::Database const & db_)4569 void SwigDirector_ValueWeightPostingSource::init(Xapian::Database const &db_) {
4570   VALUE obj0 = Qnil ;
4571   VALUE SWIGUNUSED result;
4572 
4573   obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&db_), SWIGTYPE_p_Xapian__Database,  0 );
4574   result = rb_funcall(swig_get_self(), rb_intern("init"), 1,obj0);
4575 }
4576 
4577 
get_description() const4578 std::string SwigDirector_ValueWeightPostingSource::get_description() const {
4579   std::string c_result ;
4580   VALUE SWIGUNUSED result;
4581 
4582   result = rb_funcall(swig_get_self(), rb_intern("description"), 0, Qnil);
4583   std::string *swig_optr = 0;
4584   int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr);
4585   if (!SWIG_IsOK(swig_ores) || !swig_optr) {
4586     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
4587   }
4588   c_result = *swig_optr;
4589   if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
4590   return (std::string) c_result;
4591 }
4592 
4593 
SwigDirector_MatchSpy(VALUE self)4594 SwigDirector_MatchSpy::SwigDirector_MatchSpy(VALUE self): Xapian::MatchSpy(), Swig::Director(self) {
4595 
4596 }
4597 
4598 
4599 
~SwigDirector_MatchSpy()4600 SwigDirector_MatchSpy::~SwigDirector_MatchSpy() {
4601 }
4602 
operator ()(Xapian::Document const & doc,double wt)4603 void SwigDirector_MatchSpy::operator ()(Xapian::Document const &doc, double wt) {
4604   VALUE obj0 = Qnil ;
4605   VALUE obj1 = Qnil ;
4606   VALUE SWIGUNUSED result;
4607 
4608   obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&doc), SWIGTYPE_p_Xapian__Document,  0 );
4609   obj1 = SWIG_From_double(static_cast< double >(wt));
4610   result = rb_funcall(swig_get_self(), rb_intern("__call__"), 2,obj0,obj1);
4611 }
4612 
4613 
clone() const4614 Xapian::MatchSpy *SwigDirector_MatchSpy::clone() const {
4615   return Xapian::MatchSpy::clone();
4616 }
4617 
4618 
name() const4619 std::string SwigDirector_MatchSpy::name() const {
4620   std::string c_result ;
4621   VALUE SWIGUNUSED result;
4622 
4623   result = rb_funcall(swig_get_self(), rb_intern("name"), 0, Qnil);
4624   std::string *swig_optr = 0;
4625   int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr);
4626   if (!SWIG_IsOK(swig_ores) || !swig_optr) {
4627     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
4628   }
4629   c_result = *swig_optr;
4630   if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
4631   return (std::string) c_result;
4632 }
4633 
4634 
serialise() const4635 std::string SwigDirector_MatchSpy::serialise() const {
4636   return Xapian::MatchSpy::serialise();
4637 }
4638 
4639 
unserialise(std::string const & serialised,Xapian::Registry const & context) const4640 Xapian::MatchSpy *SwigDirector_MatchSpy::unserialise(std::string const &serialised, Xapian::Registry const &context) const {
4641   return Xapian::MatchSpy::unserialise(serialised,context);
4642 }
4643 
4644 
serialise_results() const4645 std::string SwigDirector_MatchSpy::serialise_results() const {
4646   return Xapian::MatchSpy::serialise_results();
4647 }
4648 
4649 
merge_results(std::string const & serialised)4650 void SwigDirector_MatchSpy::merge_results(std::string const &serialised) {
4651   VALUE obj0 = Qnil ;
4652   VALUE SWIGUNUSED result;
4653 
4654   obj0 = SWIG_From_std_string(static_cast< std::string >(serialised));
4655   result = rb_funcall(swig_get_self(), rb_intern("merge_results"), 1,obj0);
4656 }
4657 
4658 
get_description() const4659 std::string SwigDirector_MatchSpy::get_description() const {
4660   std::string c_result ;
4661   VALUE SWIGUNUSED result;
4662 
4663   result = rb_funcall(swig_get_self(), rb_intern("description"), 0, Qnil);
4664   std::string *swig_optr = 0;
4665   int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr);
4666   if (!SWIG_IsOK(swig_ores) || !swig_optr) {
4667     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
4668   }
4669   c_result = *swig_optr;
4670   if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
4671   return (std::string) c_result;
4672 }
4673 
4674 
SwigDirector_LatLongMetric(VALUE self)4675 SwigDirector_LatLongMetric::SwigDirector_LatLongMetric(VALUE self): Xapian::LatLongMetric(), Swig::Director(self) {
4676 
4677 }
4678 
4679 
4680 
~SwigDirector_LatLongMetric()4681 SwigDirector_LatLongMetric::~SwigDirector_LatLongMetric() {
4682 }
4683 
pointwise_distance(Xapian::LatLongCoord const & a,Xapian::LatLongCoord const & b) const4684 double SwigDirector_LatLongMetric::pointwise_distance(Xapian::LatLongCoord const &a, Xapian::LatLongCoord const &b) const {
4685   double c_result ;
4686   VALUE obj0 = Qnil ;
4687   VALUE obj1 = Qnil ;
4688   VALUE SWIGUNUSED result;
4689 
4690   obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&a), SWIGTYPE_p_Xapian__LatLongCoord,  0 );
4691   obj1 = SWIG_NewPointerObj(SWIG_as_voidptr(&b), SWIGTYPE_p_Xapian__LatLongCoord,  0 );
4692   result = rb_funcall(swig_get_self(), rb_intern("pointwise_distance"), 2,obj0,obj1);
4693   double swig_val;
4694   int swig_res = SWIG_AsVal_double(result, &swig_val);
4695   if (!SWIG_IsOK(swig_res)) {
4696     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""double""'");
4697   }
4698   c_result = static_cast< double >(swig_val);
4699   return (double) c_result;
4700 }
4701 
4702 
clone() const4703 Xapian::LatLongMetric *SwigDirector_LatLongMetric::clone() const {
4704   Xapian::LatLongMetric *c_result ;
4705 
4706   Swig::DirectorPureVirtualException::raise("Attempted to invoke pure virtual method Xapian::LatLongMetric::clone");
4707   return (Xapian::LatLongMetric *) c_result;
4708 }
4709 
4710 
name() const4711 std::string SwigDirector_LatLongMetric::name() const {
4712   std::string c_result ;
4713   VALUE SWIGUNUSED result;
4714 
4715   result = rb_funcall(swig_get_self(), rb_intern("name"), 0, Qnil);
4716   std::string *swig_optr = 0;
4717   int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr);
4718   if (!SWIG_IsOK(swig_ores) || !swig_optr) {
4719     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
4720   }
4721   c_result = *swig_optr;
4722   if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
4723   return (std::string) c_result;
4724 }
4725 
4726 
serialise() const4727 std::string SwigDirector_LatLongMetric::serialise() const {
4728   std::string c_result ;
4729 
4730   Swig::DirectorPureVirtualException::raise("Attempted to invoke pure virtual method Xapian::LatLongMetric::serialise");
4731   return (std::string) c_result;
4732 }
4733 
4734 
unserialise(std::string const & serialised) const4735 Xapian::LatLongMetric *SwigDirector_LatLongMetric::unserialise(std::string const &serialised) const {
4736   Xapian::LatLongMetric *c_result ;
4737 
4738   Swig::DirectorPureVirtualException::raise("Attempted to invoke pure virtual method Xapian::LatLongMetric::unserialise");
4739   return (Xapian::LatLongMetric *) c_result;
4740 }
4741 
4742 
4743 static swig_class SwigClassGC_VALUE;
4744 
4745 
4746 /*
4747   Document-method: Xapian::GC_VALUE.inspect
4748 
4749   call-seq:
4750     inspect -> VALUE
4751 
4752 Inspect class and its contents.
4753 */
4754 SWIGINTERN VALUE
_wrap_GC_VALUE_inspect(int argc,VALUE * argv,VALUE self)4755 _wrap_GC_VALUE_inspect(int argc, VALUE *argv, VALUE self) {
4756   swig::GC_VALUE *arg1 = (swig::GC_VALUE *) 0 ;
4757   swig::GC_VALUE r1 ;
4758   VALUE result;
4759   VALUE vresult = Qnil;
4760 
4761   if ((argc < 0) || (argc > 0)) {
4762     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4763   }
4764   r1 = self; arg1 = &r1;
4765   result = (VALUE)((swig::GC_VALUE const *)arg1)->inspect();
4766   vresult = result;
4767   return vresult;
4768 fail:
4769   return Qnil;
4770 }
4771 
4772 
4773 
4774 /*
4775   Document-method: Xapian::GC_VALUE.to_s
4776 
4777   call-seq:
4778     to_s -> VALUE
4779 
4780 Convert class to a String representation.
4781 */
4782 SWIGINTERN VALUE
_wrap_GC_VALUE_to_s(int argc,VALUE * argv,VALUE self)4783 _wrap_GC_VALUE_to_s(int argc, VALUE *argv, VALUE self) {
4784   swig::GC_VALUE *arg1 = (swig::GC_VALUE *) 0 ;
4785   swig::GC_VALUE r1 ;
4786   VALUE result;
4787   VALUE vresult = Qnil;
4788 
4789   if ((argc < 0) || (argc > 0)) {
4790     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4791   }
4792   r1 = self; arg1 = &r1;
4793   result = (VALUE)((swig::GC_VALUE const *)arg1)->to_s();
4794   vresult = result;
4795   return vresult;
4796 fail:
4797   return Qnil;
4798 }
4799 
4800 
4801 static swig_class SwigClassConstIterator;
4802 
4803 SWIGINTERN void
free_swig_ConstIterator(void * self)4804 free_swig_ConstIterator(void *self) {
4805     swig::ConstIterator *arg1 = (swig::ConstIterator *)self;
4806     delete arg1;
4807 }
4808 
4809 SWIGINTERN VALUE
_wrap_ConstIterator_value(int argc,VALUE * argv,VALUE self)4810 _wrap_ConstIterator_value(int argc, VALUE *argv, VALUE self) {
4811   swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
4812   void *argp1 = 0 ;
4813   int res1 = 0 ;
4814   VALUE result;
4815   VALUE vresult = Qnil;
4816 
4817   if ((argc < 0) || (argc > 0)) {
4818     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4819   }
4820   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
4821   if (!SWIG_IsOK(res1)) {
4822     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","value", 1, self ));
4823   }
4824   arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
4825   try {
4826     result = (VALUE)((swig::ConstIterator const *)arg1)->value();
4827   }
4828   catch(swig::stop_iteration &_e) {
4829     {
4830       (void)_e;
4831       SWIG_Ruby_ExceptionType(NULL, Qnil);
4832       SWIG_fail;
4833     }
4834   }
4835 
4836   vresult = result;
4837   return vresult;
4838 fail:
4839   return Qnil;
4840 }
4841 
4842 
4843 
4844 /*
4845   Document-method: Xapian::ConstIterator.dup
4846 
4847   call-seq:
4848     dup -> ConstIterator
4849 
4850 Create a duplicate of the class and unfreeze it if needed.
4851 */
4852 SWIGINTERN VALUE
_wrap_ConstIterator_dup(int argc,VALUE * argv,VALUE self)4853 _wrap_ConstIterator_dup(int argc, VALUE *argv, VALUE self) {
4854   swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
4855   void *argp1 = 0 ;
4856   int res1 = 0 ;
4857   swig::ConstIterator *result = 0 ;
4858   VALUE vresult = Qnil;
4859 
4860   if ((argc < 0) || (argc > 0)) {
4861     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4862   }
4863   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
4864   if (!SWIG_IsOK(res1)) {
4865     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","dup", 1, self ));
4866   }
4867   arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
4868   result = (swig::ConstIterator *)((swig::ConstIterator const *)arg1)->dup();
4869   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN |  0 );
4870   return vresult;
4871 fail:
4872   return Qnil;
4873 }
4874 
4875 
4876 
4877 /*
4878   Document-method: Xapian::ConstIterator.inspect
4879 
4880   call-seq:
4881     inspect -> VALUE
4882 
4883 Inspect class and its contents.
4884 */
4885 SWIGINTERN VALUE
_wrap_ConstIterator_inspect(int argc,VALUE * argv,VALUE self)4886 _wrap_ConstIterator_inspect(int argc, VALUE *argv, VALUE self) {
4887   swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
4888   void *argp1 = 0 ;
4889   int res1 = 0 ;
4890   VALUE result;
4891   VALUE vresult = Qnil;
4892 
4893   if ((argc < 0) || (argc > 0)) {
4894     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4895   }
4896   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
4897   if (!SWIG_IsOK(res1)) {
4898     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","inspect", 1, self ));
4899   }
4900   arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
4901   result = (VALUE)((swig::ConstIterator const *)arg1)->inspect();
4902   vresult = result;
4903   return vresult;
4904 fail:
4905   return Qnil;
4906 }
4907 
4908 
4909 
4910 /*
4911   Document-method: Xapian::ConstIterator.to_s
4912 
4913   call-seq:
4914     to_s -> VALUE
4915 
4916 Convert class to a String representation.
4917 */
4918 SWIGINTERN VALUE
_wrap_ConstIterator_to_s(int argc,VALUE * argv,VALUE self)4919 _wrap_ConstIterator_to_s(int argc, VALUE *argv, VALUE self) {
4920   swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
4921   void *argp1 = 0 ;
4922   int res1 = 0 ;
4923   VALUE result;
4924   VALUE vresult = Qnil;
4925 
4926   if ((argc < 0) || (argc > 0)) {
4927     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4928   }
4929   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
4930   if (!SWIG_IsOK(res1)) {
4931     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","to_s", 1, self ));
4932   }
4933   arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
4934   result = (VALUE)((swig::ConstIterator const *)arg1)->to_s();
4935   vresult = result;
4936   return vresult;
4937 fail:
4938   return Qnil;
4939 }
4940 
4941 
4942 SWIGINTERN VALUE
_wrap_ConstIterator_next__SWIG_0(int argc,VALUE * argv,VALUE self)4943 _wrap_ConstIterator_next__SWIG_0(int argc, VALUE *argv, VALUE self) {
4944   swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
4945   size_t arg2 ;
4946   void *argp1 = 0 ;
4947   int res1 = 0 ;
4948   size_t val2 ;
4949   int ecode2 = 0 ;
4950   swig::ConstIterator *result = 0 ;
4951   VALUE vresult = Qnil;
4952 
4953   if ((argc < 1) || (argc > 1)) {
4954     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4955   }
4956   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
4957   if (!SWIG_IsOK(res1)) {
4958     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator *","next", 1, self ));
4959   }
4960   arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
4961   ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
4962   if (!SWIG_IsOK(ecode2)) {
4963     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","next", 2, argv[0] ));
4964   }
4965   arg2 = static_cast< size_t >(val2);
4966   result = (swig::ConstIterator *)(arg1)->next(arg2);
4967   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
4968   return vresult;
4969 fail:
4970   return Qnil;
4971 }
4972 
4973 
4974 SWIGINTERN VALUE
_wrap_ConstIterator_next__SWIG_1(int argc,VALUE * argv,VALUE self)4975 _wrap_ConstIterator_next__SWIG_1(int argc, VALUE *argv, VALUE self) {
4976   swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
4977   void *argp1 = 0 ;
4978   int res1 = 0 ;
4979   swig::ConstIterator *result = 0 ;
4980   VALUE vresult = Qnil;
4981 
4982   if ((argc < 0) || (argc > 0)) {
4983     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4984   }
4985   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
4986   if (!SWIG_IsOK(res1)) {
4987     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator *","next", 1, self ));
4988   }
4989   arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
4990   try {
4991     result = (swig::ConstIterator *)(arg1)->next();
4992   }
4993   catch(swig::stop_iteration &_e) {
4994     {
4995       (void)_e;
4996       SWIG_Ruby_ExceptionType(NULL, Qnil);
4997       SWIG_fail;
4998     }
4999   }
5000 
5001   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
5002   return vresult;
5003 fail:
5004   return Qnil;
5005 }
5006 
5007 
_wrap_ConstIterator_next(int nargs,VALUE * args,VALUE self)5008 SWIGINTERN VALUE _wrap_ConstIterator_next(int nargs, VALUE *args, VALUE self) {
5009   int argc;
5010   VALUE argv[3];
5011   int ii;
5012 
5013   argc = nargs + 1;
5014   argv[0] = self;
5015   if (argc > 3) SWIG_fail;
5016   for (ii = 1; (ii < argc); ++ii) {
5017     argv[ii] = args[ii-1];
5018   }
5019   if (argc == 1) {
5020     int _v;
5021     void *vptr = 0;
5022     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
5023     _v = SWIG_CheckState(res);
5024     if (_v) {
5025       return _wrap_ConstIterator_next__SWIG_1(nargs, args, self);
5026     }
5027   }
5028   if (argc == 2) {
5029     int _v;
5030     void *vptr = 0;
5031     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
5032     _v = SWIG_CheckState(res);
5033     if (_v) {
5034       {
5035         int res = SWIG_AsVal_size_t(argv[1], NULL);
5036         _v = SWIG_CheckState(res);
5037       }
5038       if (_v) {
5039         return _wrap_ConstIterator_next__SWIG_0(nargs, args, self);
5040       }
5041     }
5042   }
5043 
5044 fail:
5045   Ruby_Format_OverloadedError( argc, 3, "ConstIterator.next",
5046     "    swig::ConstIterator ConstIterator.next(size_t n)\n"
5047     "    swig::ConstIterator * ConstIterator.next()\n");
5048 
5049   return Qnil;
5050 }
5051 
5052 
5053 SWIGINTERN VALUE
_wrap_ConstIterator_previous__SWIG_0(int argc,VALUE * argv,VALUE self)5054 _wrap_ConstIterator_previous__SWIG_0(int argc, VALUE *argv, VALUE self) {
5055   swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
5056   size_t arg2 ;
5057   void *argp1 = 0 ;
5058   int res1 = 0 ;
5059   size_t val2 ;
5060   int ecode2 = 0 ;
5061   swig::ConstIterator *result = 0 ;
5062   VALUE vresult = Qnil;
5063 
5064   if ((argc < 1) || (argc > 1)) {
5065     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5066   }
5067   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
5068   if (!SWIG_IsOK(res1)) {
5069     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator *","previous", 1, self ));
5070   }
5071   arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
5072   ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
5073   if (!SWIG_IsOK(ecode2)) {
5074     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","previous", 2, argv[0] ));
5075   }
5076   arg2 = static_cast< size_t >(val2);
5077   result = (swig::ConstIterator *)(arg1)->previous(arg2);
5078   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
5079   return vresult;
5080 fail:
5081   return Qnil;
5082 }
5083 
5084 
5085 SWIGINTERN VALUE
_wrap_ConstIterator_previous__SWIG_1(int argc,VALUE * argv,VALUE self)5086 _wrap_ConstIterator_previous__SWIG_1(int argc, VALUE *argv, VALUE self) {
5087   swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
5088   void *argp1 = 0 ;
5089   int res1 = 0 ;
5090   swig::ConstIterator *result = 0 ;
5091   VALUE vresult = Qnil;
5092 
5093   if ((argc < 0) || (argc > 0)) {
5094     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5095   }
5096   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
5097   if (!SWIG_IsOK(res1)) {
5098     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator *","previous", 1, self ));
5099   }
5100   arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
5101   try {
5102     result = (swig::ConstIterator *)(arg1)->previous();
5103   }
5104   catch(swig::stop_iteration &_e) {
5105     {
5106       (void)_e;
5107       SWIG_Ruby_ExceptionType(NULL, Qnil);
5108       SWIG_fail;
5109     }
5110   }
5111 
5112   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
5113   return vresult;
5114 fail:
5115   return Qnil;
5116 }
5117 
5118 
_wrap_ConstIterator_previous(int nargs,VALUE * args,VALUE self)5119 SWIGINTERN VALUE _wrap_ConstIterator_previous(int nargs, VALUE *args, VALUE self) {
5120   int argc;
5121   VALUE argv[3];
5122   int ii;
5123 
5124   argc = nargs + 1;
5125   argv[0] = self;
5126   if (argc > 3) SWIG_fail;
5127   for (ii = 1; (ii < argc); ++ii) {
5128     argv[ii] = args[ii-1];
5129   }
5130   if (argc == 1) {
5131     int _v;
5132     void *vptr = 0;
5133     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
5134     _v = SWIG_CheckState(res);
5135     if (_v) {
5136       return _wrap_ConstIterator_previous__SWIG_1(nargs, args, self);
5137     }
5138   }
5139   if (argc == 2) {
5140     int _v;
5141     void *vptr = 0;
5142     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
5143     _v = SWIG_CheckState(res);
5144     if (_v) {
5145       {
5146         int res = SWIG_AsVal_size_t(argv[1], NULL);
5147         _v = SWIG_CheckState(res);
5148       }
5149       if (_v) {
5150         return _wrap_ConstIterator_previous__SWIG_0(nargs, args, self);
5151       }
5152     }
5153   }
5154 
5155 fail:
5156   Ruby_Format_OverloadedError( argc, 3, "ConstIterator.previous",
5157     "    swig::ConstIterator ConstIterator.previous(size_t n)\n"
5158     "    swig::ConstIterator * ConstIterator.previous()\n");
5159 
5160   return Qnil;
5161 }
5162 
5163 
5164 
5165 /*
5166   Document-method: Xapian::ConstIterator.==
5167 
5168   call-seq:
5169     ==(x) -> bool
5170 
5171 Equality comparison operator.
5172 */
5173 SWIGINTERN VALUE
_wrap_ConstIterator___eq__(int argc,VALUE * argv,VALUE self)5174 _wrap_ConstIterator___eq__(int argc, VALUE *argv, VALUE self) {
5175   swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
5176   swig::ConstIterator *arg2 = 0 ;
5177   void *argp1 = 0 ;
5178   int res1 = 0 ;
5179   void *argp2 ;
5180   int res2 = 0 ;
5181   bool result;
5182   VALUE vresult = Qnil;
5183 
5184   if ((argc < 1) || (argc > 1)) {
5185     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5186   }
5187   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
5188   if (!SWIG_IsOK(res1)) {
5189     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","operator ==", 1, self ));
5190   }
5191   arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
5192   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_swig__ConstIterator,  0 );
5193   if (!SWIG_IsOK(res2)) {
5194     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "swig::ConstIterator const &","operator ==", 2, argv[0] ));
5195   }
5196   if (!argp2) {
5197     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "swig::ConstIterator const &","operator ==", 2, argv[0]));
5198   }
5199   arg2 = reinterpret_cast< swig::ConstIterator * >(argp2);
5200   result = (bool)((swig::ConstIterator const *)arg1)->operator ==((swig::ConstIterator const &)*arg2);
5201   vresult = SWIG_From_bool(static_cast< bool >(result));
5202   return vresult;
5203 fail:
5204   return Qnil;
5205 }
5206 
5207 
5208 
5209 /*
5210   Document-method: Xapian::ConstIterator.+
5211 
5212   call-seq:
5213     +(n) -> ConstIterator
5214 
5215 Add operator.
5216 */
5217 SWIGINTERN VALUE
_wrap_ConstIterator___add__(int argc,VALUE * argv,VALUE self)5218 _wrap_ConstIterator___add__(int argc, VALUE *argv, VALUE self) {
5219   swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
5220   ptrdiff_t arg2 ;
5221   void *argp1 = 0 ;
5222   int res1 = 0 ;
5223   ptrdiff_t val2 ;
5224   int ecode2 = 0 ;
5225   swig::ConstIterator *result = 0 ;
5226   VALUE vresult = Qnil;
5227 
5228   if ((argc < 1) || (argc > 1)) {
5229     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5230   }
5231   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
5232   if (!SWIG_IsOK(res1)) {
5233     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","operator +", 1, self ));
5234   }
5235   arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
5236   ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
5237   if (!SWIG_IsOK(ecode2)) {
5238     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ptrdiff_t","operator +", 2, argv[0] ));
5239   }
5240   arg2 = static_cast< ptrdiff_t >(val2);
5241   try {
5242     result = (swig::ConstIterator *)((swig::ConstIterator const *)arg1)->operator +(arg2);
5243   }
5244   catch(swig::stop_iteration &_e) {
5245     {
5246       (void)_e;
5247       SWIG_Ruby_ExceptionType(NULL, Qnil);
5248       SWIG_fail;
5249     }
5250   }
5251 
5252   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN |  0 );
5253   return vresult;
5254 fail:
5255   return Qnil;
5256 }
5257 
5258 
5259 
5260 /*
5261   Document-method: Xapian::ConstIterator.-
5262 
5263   call-seq:
5264     -(n) -> ConstIterator
5265     -(x) -> ptrdiff_t
5266 
5267 Substraction operator.
5268 */
5269 SWIGINTERN VALUE
_wrap_ConstIterator___sub____SWIG_0(int argc,VALUE * argv,VALUE self)5270 _wrap_ConstIterator___sub____SWIG_0(int argc, VALUE *argv, VALUE self) {
5271   swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
5272   ptrdiff_t arg2 ;
5273   void *argp1 = 0 ;
5274   int res1 = 0 ;
5275   ptrdiff_t val2 ;
5276   int ecode2 = 0 ;
5277   swig::ConstIterator *result = 0 ;
5278   VALUE vresult = Qnil;
5279 
5280   if ((argc < 1) || (argc > 1)) {
5281     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5282   }
5283   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
5284   if (!SWIG_IsOK(res1)) {
5285     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","operator -", 1, self ));
5286   }
5287   arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
5288   ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
5289   if (!SWIG_IsOK(ecode2)) {
5290     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ptrdiff_t","operator -", 2, argv[0] ));
5291   }
5292   arg2 = static_cast< ptrdiff_t >(val2);
5293   try {
5294     result = (swig::ConstIterator *)((swig::ConstIterator const *)arg1)->operator -(arg2);
5295   }
5296   catch(swig::stop_iteration &_e) {
5297     {
5298       (void)_e;
5299       SWIG_Ruby_ExceptionType(NULL, Qnil);
5300       SWIG_fail;
5301     }
5302   }
5303 
5304   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN |  0 );
5305   return vresult;
5306 fail:
5307   return Qnil;
5308 }
5309 
5310 
5311 SWIGINTERN VALUE
_wrap_ConstIterator___sub____SWIG_1(int argc,VALUE * argv,VALUE self)5312 _wrap_ConstIterator___sub____SWIG_1(int argc, VALUE *argv, VALUE self) {
5313   swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
5314   swig::ConstIterator *arg2 = 0 ;
5315   void *argp1 = 0 ;
5316   int res1 = 0 ;
5317   void *argp2 ;
5318   int res2 = 0 ;
5319   ptrdiff_t result;
5320   VALUE vresult = Qnil;
5321 
5322   if ((argc < 1) || (argc > 1)) {
5323     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5324   }
5325   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
5326   if (!SWIG_IsOK(res1)) {
5327     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","operator -", 1, self ));
5328   }
5329   arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
5330   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_swig__ConstIterator,  0 );
5331   if (!SWIG_IsOK(res2)) {
5332     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "swig::ConstIterator const &","operator -", 2, argv[0] ));
5333   }
5334   if (!argp2) {
5335     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "swig::ConstIterator const &","operator -", 2, argv[0]));
5336   }
5337   arg2 = reinterpret_cast< swig::ConstIterator * >(argp2);
5338   result = ((swig::ConstIterator const *)arg1)->operator -((swig::ConstIterator const &)*arg2);
5339   vresult = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
5340   return vresult;
5341 fail:
5342   return Qnil;
5343 }
5344 
5345 
_wrap_ConstIterator___sub__(int nargs,VALUE * args,VALUE self)5346 SWIGINTERN VALUE _wrap_ConstIterator___sub__(int nargs, VALUE *args, VALUE self) {
5347   int argc;
5348   VALUE argv[3];
5349   int ii;
5350 
5351   argc = nargs + 1;
5352   argv[0] = self;
5353   if (argc > 3) SWIG_fail;
5354   for (ii = 1; (ii < argc); ++ii) {
5355     argv[ii] = args[ii-1];
5356   }
5357   if (argc == 2) {
5358     int _v;
5359     void *vptr = 0;
5360     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
5361     _v = SWIG_CheckState(res);
5362     if (_v) {
5363       void *vptr = 0;
5364       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
5365       _v = SWIG_CheckState(res);
5366       if (_v) {
5367         return _wrap_ConstIterator___sub____SWIG_1(nargs, args, self);
5368       }
5369     }
5370   }
5371   if (argc == 2) {
5372     int _v;
5373     void *vptr = 0;
5374     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
5375     _v = SWIG_CheckState(res);
5376     if (_v) {
5377       {
5378         int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
5379         _v = SWIG_CheckState(res);
5380       }
5381       if (_v) {
5382         return _wrap_ConstIterator___sub____SWIG_0(nargs, args, self);
5383       }
5384     }
5385   }
5386 
5387 fail:
5388   Ruby_Format_OverloadedError( argc, 3, "ConstIterator.__sub__",
5389     "    swig::ConstIterator ConstIterator.__sub__(ptrdiff_t n)\n"
5390     "    ptrdiff_t ConstIterator.__sub__(swig::ConstIterator const &x)\n");
5391 
5392   return Qnil;
5393 }
5394 
5395 
5396 static swig_class SwigClassIterator;
5397 
5398 SWIGINTERN VALUE
_wrap_Iterator_valuee___(int argc,VALUE * argv,VALUE self)5399 _wrap_Iterator_valuee___(int argc, VALUE *argv, VALUE self) {
5400   swig::Iterator *arg1 = (swig::Iterator *) 0 ;
5401   VALUE *arg2 = 0 ;
5402   void *argp1 = 0 ;
5403   int res1 = 0 ;
5404   VALUE temp2 ;
5405   VALUE result;
5406   VALUE vresult = Qnil;
5407 
5408   if ((argc < 1) || (argc > 1)) {
5409     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5410   }
5411   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
5412   if (!SWIG_IsOK(res1)) {
5413     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","setValue", 1, self ));
5414   }
5415   arg1 = reinterpret_cast< swig::Iterator * >(argp1);
5416   temp2 = static_cast< VALUE >(argv[0]);
5417   arg2 = &temp2;
5418   result = (VALUE)(arg1)->setValue((VALUE const &)*arg2);
5419   vresult = result;
5420   return vresult;
5421 fail:
5422   return Qnil;
5423 }
5424 
5425 
5426 
5427 /*
5428   Document-method: Xapian::Iterator.dup
5429 
5430   call-seq:
5431     dup -> Iterator
5432 
5433 Create a duplicate of the class and unfreeze it if needed.
5434 */
5435 SWIGINTERN VALUE
_wrap_Iterator_dup(int argc,VALUE * argv,VALUE self)5436 _wrap_Iterator_dup(int argc, VALUE *argv, VALUE self) {
5437   swig::Iterator *arg1 = (swig::Iterator *) 0 ;
5438   void *argp1 = 0 ;
5439   int res1 = 0 ;
5440   swig::Iterator *result = 0 ;
5441   VALUE vresult = Qnil;
5442 
5443   if ((argc < 0) || (argc > 0)) {
5444     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5445   }
5446   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
5447   if (!SWIG_IsOK(res1)) {
5448     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","dup", 1, self ));
5449   }
5450   arg1 = reinterpret_cast< swig::Iterator * >(argp1);
5451   result = (swig::Iterator *)((swig::Iterator const *)arg1)->dup();
5452   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, SWIG_POINTER_OWN |  0 );
5453   return vresult;
5454 fail:
5455   return Qnil;
5456 }
5457 
5458 
5459 SWIGINTERN VALUE
_wrap_Iterator_next__SWIG_0(int argc,VALUE * argv,VALUE self)5460 _wrap_Iterator_next__SWIG_0(int argc, VALUE *argv, VALUE self) {
5461   swig::Iterator *arg1 = (swig::Iterator *) 0 ;
5462   size_t arg2 ;
5463   void *argp1 = 0 ;
5464   int res1 = 0 ;
5465   size_t val2 ;
5466   int ecode2 = 0 ;
5467   swig::Iterator *result = 0 ;
5468   VALUE vresult = Qnil;
5469 
5470   if ((argc < 1) || (argc > 1)) {
5471     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5472   }
5473   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
5474   if (!SWIG_IsOK(res1)) {
5475     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","next", 1, self ));
5476   }
5477   arg1 = reinterpret_cast< swig::Iterator * >(argp1);
5478   ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
5479   if (!SWIG_IsOK(ecode2)) {
5480     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","next", 2, argv[0] ));
5481   }
5482   arg2 = static_cast< size_t >(val2);
5483   result = (swig::Iterator *)(arg1)->next(arg2);
5484   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, 0 |  0 );
5485   return vresult;
5486 fail:
5487   return Qnil;
5488 }
5489 
5490 
5491 SWIGINTERN VALUE
_wrap_Iterator_next__SWIG_1(int argc,VALUE * argv,VALUE self)5492 _wrap_Iterator_next__SWIG_1(int argc, VALUE *argv, VALUE self) {
5493   swig::Iterator *arg1 = (swig::Iterator *) 0 ;
5494   void *argp1 = 0 ;
5495   int res1 = 0 ;
5496   swig::Iterator *result = 0 ;
5497   VALUE vresult = Qnil;
5498 
5499   if ((argc < 0) || (argc > 0)) {
5500     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5501   }
5502   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
5503   if (!SWIG_IsOK(res1)) {
5504     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","next", 1, self ));
5505   }
5506   arg1 = reinterpret_cast< swig::Iterator * >(argp1);
5507   try {
5508     result = (swig::Iterator *)(arg1)->next();
5509   }
5510   catch(swig::stop_iteration &_e) {
5511     {
5512       (void)_e;
5513       SWIG_Ruby_ExceptionType(NULL, Qnil);
5514       SWIG_fail;
5515     }
5516   }
5517 
5518   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, 0 |  0 );
5519   return vresult;
5520 fail:
5521   return Qnil;
5522 }
5523 
5524 
_wrap_Iterator_next(int nargs,VALUE * args,VALUE self)5525 SWIGINTERN VALUE _wrap_Iterator_next(int nargs, VALUE *args, VALUE self) {
5526   int argc;
5527   VALUE argv[3];
5528   int ii;
5529 
5530   argc = nargs + 1;
5531   argv[0] = self;
5532   if (argc > 3) SWIG_fail;
5533   for (ii = 1; (ii < argc); ++ii) {
5534     argv[ii] = args[ii-1];
5535   }
5536   if (argc == 1) {
5537     int _v;
5538     void *vptr = 0;
5539     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0);
5540     _v = SWIG_CheckState(res);
5541     if (_v) {
5542       return _wrap_Iterator_next__SWIG_1(nargs, args, self);
5543     }
5544   }
5545   if (argc == 2) {
5546     int _v;
5547     void *vptr = 0;
5548     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0);
5549     _v = SWIG_CheckState(res);
5550     if (_v) {
5551       {
5552         int res = SWIG_AsVal_size_t(argv[1], NULL);
5553         _v = SWIG_CheckState(res);
5554       }
5555       if (_v) {
5556         return _wrap_Iterator_next__SWIG_0(nargs, args, self);
5557       }
5558     }
5559   }
5560 
5561 fail:
5562   Ruby_Format_OverloadedError( argc, 3, "Iterator.next",
5563     "    swig::Iterator Iterator.next(size_t n)\n"
5564     "    swig::Iterator * Iterator.next()\n");
5565 
5566   return Qnil;
5567 }
5568 
5569 
5570 SWIGINTERN VALUE
_wrap_Iterator_previous__SWIG_0(int argc,VALUE * argv,VALUE self)5571 _wrap_Iterator_previous__SWIG_0(int argc, VALUE *argv, VALUE self) {
5572   swig::Iterator *arg1 = (swig::Iterator *) 0 ;
5573   size_t arg2 ;
5574   void *argp1 = 0 ;
5575   int res1 = 0 ;
5576   size_t val2 ;
5577   int ecode2 = 0 ;
5578   swig::Iterator *result = 0 ;
5579   VALUE vresult = Qnil;
5580 
5581   if ((argc < 1) || (argc > 1)) {
5582     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5583   }
5584   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
5585   if (!SWIG_IsOK(res1)) {
5586     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","previous", 1, self ));
5587   }
5588   arg1 = reinterpret_cast< swig::Iterator * >(argp1);
5589   ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
5590   if (!SWIG_IsOK(ecode2)) {
5591     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","previous", 2, argv[0] ));
5592   }
5593   arg2 = static_cast< size_t >(val2);
5594   result = (swig::Iterator *)(arg1)->previous(arg2);
5595   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, 0 |  0 );
5596   return vresult;
5597 fail:
5598   return Qnil;
5599 }
5600 
5601 
5602 SWIGINTERN VALUE
_wrap_Iterator_previous__SWIG_1(int argc,VALUE * argv,VALUE self)5603 _wrap_Iterator_previous__SWIG_1(int argc, VALUE *argv, VALUE self) {
5604   swig::Iterator *arg1 = (swig::Iterator *) 0 ;
5605   void *argp1 = 0 ;
5606   int res1 = 0 ;
5607   swig::Iterator *result = 0 ;
5608   VALUE vresult = Qnil;
5609 
5610   if ((argc < 0) || (argc > 0)) {
5611     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5612   }
5613   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
5614   if (!SWIG_IsOK(res1)) {
5615     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","previous", 1, self ));
5616   }
5617   arg1 = reinterpret_cast< swig::Iterator * >(argp1);
5618   try {
5619     result = (swig::Iterator *)(arg1)->previous();
5620   }
5621   catch(swig::stop_iteration &_e) {
5622     {
5623       (void)_e;
5624       SWIG_Ruby_ExceptionType(NULL, Qnil);
5625       SWIG_fail;
5626     }
5627   }
5628 
5629   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, 0 |  0 );
5630   return vresult;
5631 fail:
5632   return Qnil;
5633 }
5634 
5635 
_wrap_Iterator_previous(int nargs,VALUE * args,VALUE self)5636 SWIGINTERN VALUE _wrap_Iterator_previous(int nargs, VALUE *args, VALUE self) {
5637   int argc;
5638   VALUE argv[3];
5639   int ii;
5640 
5641   argc = nargs + 1;
5642   argv[0] = self;
5643   if (argc > 3) SWIG_fail;
5644   for (ii = 1; (ii < argc); ++ii) {
5645     argv[ii] = args[ii-1];
5646   }
5647   if (argc == 1) {
5648     int _v;
5649     void *vptr = 0;
5650     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0);
5651     _v = SWIG_CheckState(res);
5652     if (_v) {
5653       return _wrap_Iterator_previous__SWIG_1(nargs, args, self);
5654     }
5655   }
5656   if (argc == 2) {
5657     int _v;
5658     void *vptr = 0;
5659     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0);
5660     _v = SWIG_CheckState(res);
5661     if (_v) {
5662       {
5663         int res = SWIG_AsVal_size_t(argv[1], NULL);
5664         _v = SWIG_CheckState(res);
5665       }
5666       if (_v) {
5667         return _wrap_Iterator_previous__SWIG_0(nargs, args, self);
5668       }
5669     }
5670   }
5671 
5672 fail:
5673   Ruby_Format_OverloadedError( argc, 3, "Iterator.previous",
5674     "    swig::Iterator Iterator.previous(size_t n)\n"
5675     "    swig::Iterator * Iterator.previous()\n");
5676 
5677   return Qnil;
5678 }
5679 
5680 
5681 
5682 /*
5683   Document-method: Xapian::Iterator.inspect
5684 
5685   call-seq:
5686     inspect -> VALUE
5687 
5688 Inspect class and its contents.
5689 */
5690 SWIGINTERN VALUE
_wrap_Iterator_inspect(int argc,VALUE * argv,VALUE self)5691 _wrap_Iterator_inspect(int argc, VALUE *argv, VALUE self) {
5692   swig::Iterator *arg1 = (swig::Iterator *) 0 ;
5693   void *argp1 = 0 ;
5694   int res1 = 0 ;
5695   VALUE result;
5696   VALUE vresult = Qnil;
5697 
5698   if ((argc < 0) || (argc > 0)) {
5699     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5700   }
5701   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
5702   if (!SWIG_IsOK(res1)) {
5703     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","inspect", 1, self ));
5704   }
5705   arg1 = reinterpret_cast< swig::Iterator * >(argp1);
5706   result = (VALUE)((swig::Iterator const *)arg1)->inspect();
5707   vresult = result;
5708   return vresult;
5709 fail:
5710   return Qnil;
5711 }
5712 
5713 
5714 
5715 /*
5716   Document-method: Xapian::Iterator.to_s
5717 
5718   call-seq:
5719     to_s -> VALUE
5720 
5721 Convert class to a String representation.
5722 */
5723 SWIGINTERN VALUE
_wrap_Iterator_to_s(int argc,VALUE * argv,VALUE self)5724 _wrap_Iterator_to_s(int argc, VALUE *argv, VALUE self) {
5725   swig::Iterator *arg1 = (swig::Iterator *) 0 ;
5726   void *argp1 = 0 ;
5727   int res1 = 0 ;
5728   VALUE result;
5729   VALUE vresult = Qnil;
5730 
5731   if ((argc < 0) || (argc > 0)) {
5732     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5733   }
5734   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
5735   if (!SWIG_IsOK(res1)) {
5736     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","to_s", 1, self ));
5737   }
5738   arg1 = reinterpret_cast< swig::Iterator * >(argp1);
5739   result = (VALUE)((swig::Iterator const *)arg1)->to_s();
5740   vresult = result;
5741   return vresult;
5742 fail:
5743   return Qnil;
5744 }
5745 
5746 
5747 
5748 /*
5749   Document-method: Xapian::Iterator.==
5750 
5751   call-seq:
5752     ==(x) -> bool
5753 
5754 Equality comparison operator.
5755 */
5756 SWIGINTERN VALUE
_wrap_Iterator___eq__(int argc,VALUE * argv,VALUE self)5757 _wrap_Iterator___eq__(int argc, VALUE *argv, VALUE self) {
5758   swig::Iterator *arg1 = (swig::Iterator *) 0 ;
5759   swig::Iterator *arg2 = 0 ;
5760   void *argp1 = 0 ;
5761   int res1 = 0 ;
5762   void *argp2 ;
5763   int res2 = 0 ;
5764   bool result;
5765   VALUE vresult = Qnil;
5766 
5767   if ((argc < 1) || (argc > 1)) {
5768     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5769   }
5770   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
5771   if (!SWIG_IsOK(res1)) {
5772     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","operator ==", 1, self ));
5773   }
5774   arg1 = reinterpret_cast< swig::Iterator * >(argp1);
5775   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_swig__Iterator,  0 );
5776   if (!SWIG_IsOK(res2)) {
5777     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "swig::Iterator const &","operator ==", 2, argv[0] ));
5778   }
5779   if (!argp2) {
5780     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "swig::Iterator const &","operator ==", 2, argv[0]));
5781   }
5782   arg2 = reinterpret_cast< swig::Iterator * >(argp2);
5783   result = (bool)((swig::Iterator const *)arg1)->operator ==((swig::Iterator const &)*arg2);
5784   vresult = SWIG_From_bool(static_cast< bool >(result));
5785   return vresult;
5786 fail:
5787   return Qnil;
5788 }
5789 
5790 
5791 
5792 /*
5793   Document-method: Xapian::Iterator.+
5794 
5795   call-seq:
5796     +(n) -> Iterator
5797 
5798 Add operator.
5799 */
5800 SWIGINTERN VALUE
_wrap_Iterator___add__(int argc,VALUE * argv,VALUE self)5801 _wrap_Iterator___add__(int argc, VALUE *argv, VALUE self) {
5802   swig::Iterator *arg1 = (swig::Iterator *) 0 ;
5803   ptrdiff_t arg2 ;
5804   void *argp1 = 0 ;
5805   int res1 = 0 ;
5806   ptrdiff_t val2 ;
5807   int ecode2 = 0 ;
5808   swig::Iterator *result = 0 ;
5809   VALUE vresult = Qnil;
5810 
5811   if ((argc < 1) || (argc > 1)) {
5812     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5813   }
5814   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
5815   if (!SWIG_IsOK(res1)) {
5816     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","operator +", 1, self ));
5817   }
5818   arg1 = reinterpret_cast< swig::Iterator * >(argp1);
5819   ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
5820   if (!SWIG_IsOK(ecode2)) {
5821     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ptrdiff_t","operator +", 2, argv[0] ));
5822   }
5823   arg2 = static_cast< ptrdiff_t >(val2);
5824   try {
5825     result = (swig::Iterator *)((swig::Iterator const *)arg1)->operator +(arg2);
5826   }
5827   catch(swig::stop_iteration &_e) {
5828     {
5829       (void)_e;
5830       SWIG_Ruby_ExceptionType(NULL, Qnil);
5831       SWIG_fail;
5832     }
5833   }
5834 
5835   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, SWIG_POINTER_OWN |  0 );
5836   return vresult;
5837 fail:
5838   return Qnil;
5839 }
5840 
5841 
5842 
5843 /*
5844   Document-method: Xapian::Iterator.-
5845 
5846   call-seq:
5847     -(n) -> Iterator
5848     -(x) -> ptrdiff_t
5849 
5850 Substraction operator.
5851 */
5852 SWIGINTERN VALUE
_wrap_Iterator___sub____SWIG_0(int argc,VALUE * argv,VALUE self)5853 _wrap_Iterator___sub____SWIG_0(int argc, VALUE *argv, VALUE self) {
5854   swig::Iterator *arg1 = (swig::Iterator *) 0 ;
5855   ptrdiff_t arg2 ;
5856   void *argp1 = 0 ;
5857   int res1 = 0 ;
5858   ptrdiff_t val2 ;
5859   int ecode2 = 0 ;
5860   swig::Iterator *result = 0 ;
5861   VALUE vresult = Qnil;
5862 
5863   if ((argc < 1) || (argc > 1)) {
5864     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5865   }
5866   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
5867   if (!SWIG_IsOK(res1)) {
5868     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","operator -", 1, self ));
5869   }
5870   arg1 = reinterpret_cast< swig::Iterator * >(argp1);
5871   ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
5872   if (!SWIG_IsOK(ecode2)) {
5873     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ptrdiff_t","operator -", 2, argv[0] ));
5874   }
5875   arg2 = static_cast< ptrdiff_t >(val2);
5876   try {
5877     result = (swig::Iterator *)((swig::Iterator const *)arg1)->operator -(arg2);
5878   }
5879   catch(swig::stop_iteration &_e) {
5880     {
5881       (void)_e;
5882       SWIG_Ruby_ExceptionType(NULL, Qnil);
5883       SWIG_fail;
5884     }
5885   }
5886 
5887   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, SWIG_POINTER_OWN |  0 );
5888   return vresult;
5889 fail:
5890   return Qnil;
5891 }
5892 
5893 
5894 SWIGINTERN VALUE
_wrap_Iterator___sub____SWIG_1(int argc,VALUE * argv,VALUE self)5895 _wrap_Iterator___sub____SWIG_1(int argc, VALUE *argv, VALUE self) {
5896   swig::Iterator *arg1 = (swig::Iterator *) 0 ;
5897   swig::Iterator *arg2 = 0 ;
5898   void *argp1 = 0 ;
5899   int res1 = 0 ;
5900   void *argp2 ;
5901   int res2 = 0 ;
5902   ptrdiff_t result;
5903   VALUE vresult = Qnil;
5904 
5905   if ((argc < 1) || (argc > 1)) {
5906     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5907   }
5908   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
5909   if (!SWIG_IsOK(res1)) {
5910     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","operator -", 1, self ));
5911   }
5912   arg1 = reinterpret_cast< swig::Iterator * >(argp1);
5913   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_swig__Iterator,  0 );
5914   if (!SWIG_IsOK(res2)) {
5915     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "swig::Iterator const &","operator -", 2, argv[0] ));
5916   }
5917   if (!argp2) {
5918     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "swig::Iterator const &","operator -", 2, argv[0]));
5919   }
5920   arg2 = reinterpret_cast< swig::Iterator * >(argp2);
5921   result = ((swig::Iterator const *)arg1)->operator -((swig::Iterator const &)*arg2);
5922   vresult = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
5923   return vresult;
5924 fail:
5925   return Qnil;
5926 }
5927 
5928 
_wrap_Iterator___sub__(int nargs,VALUE * args,VALUE self)5929 SWIGINTERN VALUE _wrap_Iterator___sub__(int nargs, VALUE *args, VALUE self) {
5930   int argc;
5931   VALUE argv[3];
5932   int ii;
5933 
5934   argc = nargs + 1;
5935   argv[0] = self;
5936   if (argc > 3) SWIG_fail;
5937   for (ii = 1; (ii < argc); ++ii) {
5938     argv[ii] = args[ii-1];
5939   }
5940   if (argc == 2) {
5941     int _v;
5942     void *vptr = 0;
5943     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0);
5944     _v = SWIG_CheckState(res);
5945     if (_v) {
5946       void *vptr = 0;
5947       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_swig__Iterator, 0);
5948       _v = SWIG_CheckState(res);
5949       if (_v) {
5950         return _wrap_Iterator___sub____SWIG_1(nargs, args, self);
5951       }
5952     }
5953   }
5954   if (argc == 2) {
5955     int _v;
5956     void *vptr = 0;
5957     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0);
5958     _v = SWIG_CheckState(res);
5959     if (_v) {
5960       {
5961         int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
5962         _v = SWIG_CheckState(res);
5963       }
5964       if (_v) {
5965         return _wrap_Iterator___sub____SWIG_0(nargs, args, self);
5966       }
5967     }
5968   }
5969 
5970 fail:
5971   Ruby_Format_OverloadedError( argc, 3, "Iterator.__sub__",
5972     "    swig::Iterator Iterator.__sub__(ptrdiff_t n)\n"
5973     "    ptrdiff_t Iterator.__sub__(swig::Iterator const &x)\n");
5974 
5975   return Qnil;
5976 }
5977 
5978 
5979 SWIGINTERN void
free_swig_Iterator(void * self)5980 free_swig_Iterator(void *self) {
5981     swig::Iterator *arg1 = (swig::Iterator *)self;
5982     delete arg1;
5983 }
5984 
5985 SWIGINTERN VALUE
_wrap_version_string(int argc,VALUE * argv,VALUE self)5986 _wrap_version_string(int argc, VALUE *argv, VALUE self) {
5987   char *result = 0 ;
5988   VALUE vresult = Qnil;
5989 
5990   if ((argc < 0) || (argc > 0)) {
5991     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5992   }
5993   result = (char *)Xapian::version_string();
5994   vresult = SWIG_FromCharPtr((const char *)result);
5995   return vresult;
5996 fail:
5997   return Qnil;
5998 }
5999 
6000 
6001 SWIGINTERN VALUE
_wrap_major_version(int argc,VALUE * argv,VALUE self)6002 _wrap_major_version(int argc, VALUE *argv, VALUE self) {
6003   int result;
6004   VALUE vresult = Qnil;
6005 
6006   if ((argc < 0) || (argc > 0)) {
6007     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6008   }
6009   result = (int)Xapian::major_version();
6010   vresult = SWIG_From_int(static_cast< int >(result));
6011   return vresult;
6012 fail:
6013   return Qnil;
6014 }
6015 
6016 
6017 SWIGINTERN VALUE
_wrap_minor_version(int argc,VALUE * argv,VALUE self)6018 _wrap_minor_version(int argc, VALUE *argv, VALUE self) {
6019   int result;
6020   VALUE vresult = Qnil;
6021 
6022   if ((argc < 0) || (argc > 0)) {
6023     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6024   }
6025   result = (int)Xapian::minor_version();
6026   vresult = SWIG_From_int(static_cast< int >(result));
6027   return vresult;
6028 fail:
6029   return Qnil;
6030 }
6031 
6032 
6033 SWIGINTERN VALUE
_wrap_revision(int argc,VALUE * argv,VALUE self)6034 _wrap_revision(int argc, VALUE *argv, VALUE self) {
6035   int result;
6036   VALUE vresult = Qnil;
6037 
6038   if ((argc < 0) || (argc > 0)) {
6039     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6040   }
6041   result = (int)Xapian::revision();
6042   vresult = SWIG_From_int(static_cast< int >(result));
6043   return vresult;
6044 fail:
6045   return Qnil;
6046 }
6047 
6048 
6049 static swig_class SwigClassPositionIterator;
6050 
6051 SWIGINTERN VALUE
6052 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_PositionIterator_allocate(VALUE self)6053 _wrap_PositionIterator_allocate(VALUE self)
6054 #else
6055 _wrap_PositionIterator_allocate(int argc, VALUE *argv, VALUE self)
6056 #endif
6057 {
6058   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__PositionIterator);
6059 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
6060   rb_obj_call_init(vresult, argc, argv);
6061 #endif
6062   return vresult;
6063 }
6064 
6065 
6066 SWIGINTERN VALUE
_wrap_new_PositionIterator(int argc,VALUE * argv,VALUE self)6067 _wrap_new_PositionIterator(int argc, VALUE *argv, VALUE self) {
6068   const char *classname SWIGUNUSED = "Xapian::PositionIterator";
6069   Xapian::PositionIterator *result = 0 ;
6070 
6071   if ((argc < 0) || (argc > 0)) {
6072     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6073   }
6074   result = (Xapian::PositionIterator *)new Xapian::PositionIterator();
6075   DATA_PTR(self) = result;
6076   return self;
6077 fail:
6078   return Qnil;
6079 }
6080 
6081 
6082 SWIGINTERN void
free_Xapian_PositionIterator(void * self)6083 free_Xapian_PositionIterator(void *self) {
6084     Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *)self;
6085     delete arg1;
6086 }
6087 
6088 SWIGINTERN VALUE
_wrap_PositionIterator_skip_to(int argc,VALUE * argv,VALUE self)6089 _wrap_PositionIterator_skip_to(int argc, VALUE *argv, VALUE self) {
6090   Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
6091   Xapian::termpos arg2 ;
6092   void *argp1 = 0 ;
6093   int res1 = 0 ;
6094   unsigned int val2 ;
6095   int ecode2 = 0 ;
6096 
6097   if ((argc < 1) || (argc > 1)) {
6098     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6099   }
6100   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
6101   if (!SWIG_IsOK(res1)) {
6102     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PositionIterator *","skip_to", 1, self ));
6103   }
6104   arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
6105   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
6106   if (!SWIG_IsOK(ecode2)) {
6107     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termpos","skip_to", 2, argv[0] ));
6108   }
6109   arg2 = static_cast< Xapian::termpos >(val2);
6110   {
6111     try {
6112       (arg1)->skip_to(arg2);
6113     } catch (...) {
6114       string msg;
6115       int code = XapianExceptionHandler(msg);
6116       SWIG_exception(code, msg.c_str());
6117     }
6118   }
6119   return Qnil;
6120 fail:
6121   return Qnil;
6122 }
6123 
6124 
6125 SWIGINTERN VALUE
_wrap_PositionIterator_description(int argc,VALUE * argv,VALUE self)6126 _wrap_PositionIterator_description(int argc, VALUE *argv, VALUE self) {
6127   Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
6128   void *argp1 = 0 ;
6129   int res1 = 0 ;
6130   std::string result;
6131   VALUE vresult = Qnil;
6132 
6133   if ((argc < 0) || (argc > 0)) {
6134     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6135   }
6136   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
6137   if (!SWIG_IsOK(res1)) {
6138     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PositionIterator const *","get_description", 1, self ));
6139   }
6140   arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
6141   {
6142     try {
6143       result = ((Xapian::PositionIterator const *)arg1)->get_description();
6144     } catch (...) {
6145       string msg;
6146       int code = XapianExceptionHandler(msg);
6147       SWIG_exception(code, msg.c_str());
6148     }
6149   }
6150   vresult = SWIG_From_std_string(static_cast< std::string >(result));
6151   return vresult;
6152 fail:
6153   return Qnil;
6154 }
6155 
6156 
6157 SWIGINTERN VALUE
_wrap_PositionIterator_equals(int argc,VALUE * argv,VALUE self)6158 _wrap_PositionIterator_equals(int argc, VALUE *argv, VALUE self) {
6159   Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
6160   Xapian::PositionIterator *arg2 = 0 ;
6161   void *argp1 = 0 ;
6162   int res1 = 0 ;
6163   void *argp2 ;
6164   int res2 = 0 ;
6165   bool result;
6166   VALUE vresult = Qnil;
6167 
6168   if ((argc < 1) || (argc > 1)) {
6169     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6170   }
6171   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
6172   if (!SWIG_IsOK(res1)) {
6173     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PositionIterator const *","equals", 1, self ));
6174   }
6175   arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
6176   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__PositionIterator,  0 );
6177   if (!SWIG_IsOK(res2)) {
6178     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::PositionIterator const &","equals", 2, argv[0] ));
6179   }
6180   if (!argp2) {
6181     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::PositionIterator const &","equals", 2, argv[0]));
6182   }
6183   arg2 = reinterpret_cast< Xapian::PositionIterator * >(argp2);
6184   {
6185     try {
6186       result = (bool)Xapian_PositionIterator_equals((Xapian::PositionIterator const *)arg1,(Xapian::PositionIterator const &)*arg2);
6187     } catch (...) {
6188       string msg;
6189       int code = XapianExceptionHandler(msg);
6190       SWIG_exception(code, msg.c_str());
6191     }
6192   }
6193   vresult = SWIG_From_bool(static_cast< bool >(result));
6194   return vresult;
6195 fail:
6196   return Qnil;
6197 }
6198 
6199 
6200 SWIGINTERN VALUE
_wrap_PositionIterator_termpos(int argc,VALUE * argv,VALUE self)6201 _wrap_PositionIterator_termpos(int argc, VALUE *argv, VALUE self) {
6202   Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
6203   void *argp1 = 0 ;
6204   int res1 = 0 ;
6205   Xapian::termpos result;
6206   VALUE vresult = Qnil;
6207 
6208   if ((argc < 0) || (argc > 0)) {
6209     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6210   }
6211   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
6212   if (!SWIG_IsOK(res1)) {
6213     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PositionIterator const *","get_termpos", 1, self ));
6214   }
6215   arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
6216   {
6217     try {
6218       result = (Xapian::termpos)Xapian_PositionIterator_get_termpos((Xapian::PositionIterator const *)arg1);
6219     } catch (...) {
6220       string msg;
6221       int code = XapianExceptionHandler(msg);
6222       SWIG_exception(code, msg.c_str());
6223     }
6224   }
6225   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
6226   return vresult;
6227 fail:
6228   return Qnil;
6229 }
6230 
6231 
6232 SWIGINTERN VALUE
_wrap_PositionIterator_next(int argc,VALUE * argv,VALUE self)6233 _wrap_PositionIterator_next(int argc, VALUE *argv, VALUE self) {
6234   Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
6235   void *argp1 = 0 ;
6236   int res1 = 0 ;
6237 
6238   if ((argc < 0) || (argc > 0)) {
6239     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6240   }
6241   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
6242   if (!SWIG_IsOK(res1)) {
6243     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PositionIterator *","next", 1, self ));
6244   }
6245   arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
6246   {
6247     try {
6248       Xapian_PositionIterator_next(arg1);
6249     } catch (...) {
6250       string msg;
6251       int code = XapianExceptionHandler(msg);
6252       SWIG_exception(code, msg.c_str());
6253     }
6254   }
6255   return Qnil;
6256 fail:
6257   return Qnil;
6258 }
6259 
6260 
6261 
6262 /*
6263   Document-method: Xapian::Xapian.==
6264 
6265   call-seq:
6266     ==(a, b) -> bool
6267     ==(a, b) -> bool
6268     ==(a, b) -> bool
6269     ==(a, b) -> bool
6270     ==(a, b) -> bool
6271     ==(a, b) -> bool
6272 
6273 Equality comparison operator.
6274 */
6275 SWIGINTERN VALUE
_wrap___eq____SWIG_0(int argc,VALUE * argv,VALUE self)6276 _wrap___eq____SWIG_0(int argc, VALUE *argv, VALUE self) {
6277   Xapian::PositionIterator *arg1 = 0 ;
6278   Xapian::PositionIterator *arg2 = 0 ;
6279   void *argp1 ;
6280   int res1 = 0 ;
6281   void *argp2 ;
6282   int res2 = 0 ;
6283   bool result;
6284   VALUE vresult = Qnil;
6285 
6286   if ((argc < 2) || (argc > 2)) {
6287     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6288   }
6289   res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Xapian__PositionIterator,  0 );
6290   if (!SWIG_IsOK(res1)) {
6291     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PositionIterator const &","Xapian::operator ==", 1, argv[0] ));
6292   }
6293   if (!argp1) {
6294     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::PositionIterator const &","Xapian::operator ==", 1, argv[0]));
6295   }
6296   arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
6297   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__PositionIterator,  0 );
6298   if (!SWIG_IsOK(res2)) {
6299     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::PositionIterator const &","Xapian::operator ==", 2, argv[1] ));
6300   }
6301   if (!argp2) {
6302     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::PositionIterator const &","Xapian::operator ==", 2, argv[1]));
6303   }
6304   arg2 = reinterpret_cast< Xapian::PositionIterator * >(argp2);
6305   {
6306     try {
6307       result = (bool)Xapian::operator ==((Xapian::PositionIterator const &)*arg1,(Xapian::PositionIterator const &)*arg2);
6308     } catch (...) {
6309       string msg;
6310       int code = XapianExceptionHandler(msg);
6311       SWIG_exception(code, msg.c_str());
6312     }
6313   }
6314   vresult = SWIG_From_bool(static_cast< bool >(result));
6315   return vresult;
6316 fail:
6317   return Qnil;
6318 }
6319 
6320 
6321 static swig_class SwigClassPostingIterator;
6322 
6323 SWIGINTERN VALUE
6324 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_PostingIterator_allocate(VALUE self)6325 _wrap_PostingIterator_allocate(VALUE self)
6326 #else
6327 _wrap_PostingIterator_allocate(int argc, VALUE *argv, VALUE self)
6328 #endif
6329 {
6330   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__PostingIterator);
6331 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
6332   rb_obj_call_init(vresult, argc, argv);
6333 #endif
6334   return vresult;
6335 }
6336 
6337 
6338 SWIGINTERN VALUE
_wrap_new_PostingIterator(int argc,VALUE * argv,VALUE self)6339 _wrap_new_PostingIterator(int argc, VALUE *argv, VALUE self) {
6340   const char *classname SWIGUNUSED = "Xapian::PostingIterator";
6341   Xapian::PostingIterator *result = 0 ;
6342 
6343   if ((argc < 0) || (argc > 0)) {
6344     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6345   }
6346   result = (Xapian::PostingIterator *)new Xapian::PostingIterator();
6347   DATA_PTR(self) = result;
6348   return self;
6349 fail:
6350   return Qnil;
6351 }
6352 
6353 
6354 SWIGINTERN void
free_Xapian_PostingIterator(void * self)6355 free_Xapian_PostingIterator(void *self) {
6356     Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *)self;
6357     delete arg1;
6358 }
6359 
6360 SWIGINTERN VALUE
_wrap_PostingIterator_wdf(int argc,VALUE * argv,VALUE self)6361 _wrap_PostingIterator_wdf(int argc, VALUE *argv, VALUE self) {
6362   Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
6363   void *argp1 = 0 ;
6364   int res1 = 0 ;
6365   Xapian::termcount result;
6366   VALUE vresult = Qnil;
6367 
6368   if ((argc < 0) || (argc > 0)) {
6369     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6370   }
6371   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
6372   if (!SWIG_IsOK(res1)) {
6373     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingIterator const *","get_wdf", 1, self ));
6374   }
6375   arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
6376   {
6377     try {
6378       result = (Xapian::termcount)((Xapian::PostingIterator const *)arg1)->get_wdf();
6379     } catch (...) {
6380       string msg;
6381       int code = XapianExceptionHandler(msg);
6382       SWIG_exception(code, msg.c_str());
6383     }
6384   }
6385   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
6386   return vresult;
6387 fail:
6388   return Qnil;
6389 }
6390 
6391 
6392 SWIGINTERN VALUE
_wrap_PostingIterator_doclength(int argc,VALUE * argv,VALUE self)6393 _wrap_PostingIterator_doclength(int argc, VALUE *argv, VALUE self) {
6394   Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
6395   void *argp1 = 0 ;
6396   int res1 = 0 ;
6397   Xapian::termcount result;
6398   VALUE vresult = Qnil;
6399 
6400   if ((argc < 0) || (argc > 0)) {
6401     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6402   }
6403   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
6404   if (!SWIG_IsOK(res1)) {
6405     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingIterator const *","get_doclength", 1, self ));
6406   }
6407   arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
6408   {
6409     try {
6410       result = (Xapian::termcount)((Xapian::PostingIterator const *)arg1)->get_doclength();
6411     } catch (...) {
6412       string msg;
6413       int code = XapianExceptionHandler(msg);
6414       SWIG_exception(code, msg.c_str());
6415     }
6416   }
6417   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
6418   return vresult;
6419 fail:
6420   return Qnil;
6421 }
6422 
6423 
6424 SWIGINTERN VALUE
_wrap_PostingIterator_get_unique_terms(int argc,VALUE * argv,VALUE self)6425 _wrap_PostingIterator_get_unique_terms(int argc, VALUE *argv, VALUE self) {
6426   Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
6427   void *argp1 = 0 ;
6428   int res1 = 0 ;
6429   Xapian::termcount result;
6430   VALUE vresult = Qnil;
6431 
6432   if ((argc < 0) || (argc > 0)) {
6433     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6434   }
6435   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
6436   if (!SWIG_IsOK(res1)) {
6437     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingIterator const *","get_unique_terms", 1, self ));
6438   }
6439   arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
6440   {
6441     try {
6442       result = (Xapian::termcount)((Xapian::PostingIterator const *)arg1)->get_unique_terms();
6443     } catch (...) {
6444       string msg;
6445       int code = XapianExceptionHandler(msg);
6446       SWIG_exception(code, msg.c_str());
6447     }
6448   }
6449   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
6450   return vresult;
6451 fail:
6452   return Qnil;
6453 }
6454 
6455 
6456 SWIGINTERN VALUE
_wrap_PostingIterator__dangerous_positionlist_begin(int argc,VALUE * argv,VALUE self)6457 _wrap_PostingIterator__dangerous_positionlist_begin(int argc, VALUE *argv, VALUE self) {
6458   Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
6459   void *argp1 = 0 ;
6460   int res1 = 0 ;
6461   Xapian::PositionIterator result;
6462   VALUE vresult = Qnil;
6463 
6464   if ((argc < 0) || (argc > 0)) {
6465     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6466   }
6467   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
6468   if (!SWIG_IsOK(res1)) {
6469     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingIterator const *","positionlist_begin", 1, self ));
6470   }
6471   arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
6472   {
6473     try {
6474       result = ((Xapian::PostingIterator const *)arg1)->positionlist_begin();
6475     } catch (...) {
6476       string msg;
6477       int code = XapianExceptionHandler(msg);
6478       SWIG_exception(code, msg.c_str());
6479     }
6480   }
6481   vresult = SWIG_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN |  0 );
6482   return vresult;
6483 fail:
6484   return Qnil;
6485 }
6486 
6487 
6488 SWIGINTERN VALUE
_wrap_PostingIterator__dangerous_positionlist_end(int argc,VALUE * argv,VALUE self)6489 _wrap_PostingIterator__dangerous_positionlist_end(int argc, VALUE *argv, VALUE self) {
6490   Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
6491   void *argp1 = 0 ;
6492   int res1 = 0 ;
6493   Xapian::PositionIterator result;
6494   VALUE vresult = Qnil;
6495 
6496   if ((argc < 0) || (argc > 0)) {
6497     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6498   }
6499   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
6500   if (!SWIG_IsOK(res1)) {
6501     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingIterator const *","positionlist_end", 1, self ));
6502   }
6503   arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
6504   result = ((Xapian::PostingIterator const *)arg1)->positionlist_end();
6505   vresult = SWIG_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN |  0 );
6506   return vresult;
6507 fail:
6508   return Qnil;
6509 }
6510 
6511 
6512 SWIGINTERN VALUE
_wrap_PostingIterator_skip_to(int argc,VALUE * argv,VALUE self)6513 _wrap_PostingIterator_skip_to(int argc, VALUE *argv, VALUE self) {
6514   Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
6515   Xapian::docid arg2 ;
6516   void *argp1 = 0 ;
6517   int res1 = 0 ;
6518   unsigned int val2 ;
6519   int ecode2 = 0 ;
6520 
6521   if ((argc < 1) || (argc > 1)) {
6522     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6523   }
6524   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
6525   if (!SWIG_IsOK(res1)) {
6526     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingIterator *","skip_to", 1, self ));
6527   }
6528   arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
6529   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
6530   if (!SWIG_IsOK(ecode2)) {
6531     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","skip_to", 2, argv[0] ));
6532   }
6533   arg2 = static_cast< Xapian::docid >(val2);
6534   {
6535     try {
6536       (arg1)->skip_to(arg2);
6537     } catch (...) {
6538       string msg;
6539       int code = XapianExceptionHandler(msg);
6540       SWIG_exception(code, msg.c_str());
6541     }
6542   }
6543   return Qnil;
6544 fail:
6545   return Qnil;
6546 }
6547 
6548 
6549 SWIGINTERN VALUE
_wrap_PostingIterator_description(int argc,VALUE * argv,VALUE self)6550 _wrap_PostingIterator_description(int argc, VALUE *argv, VALUE self) {
6551   Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
6552   void *argp1 = 0 ;
6553   int res1 = 0 ;
6554   std::string result;
6555   VALUE vresult = Qnil;
6556 
6557   if ((argc < 0) || (argc > 0)) {
6558     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6559   }
6560   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
6561   if (!SWIG_IsOK(res1)) {
6562     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingIterator const *","get_description", 1, self ));
6563   }
6564   arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
6565   {
6566     try {
6567       result = ((Xapian::PostingIterator const *)arg1)->get_description();
6568     } catch (...) {
6569       string msg;
6570       int code = XapianExceptionHandler(msg);
6571       SWIG_exception(code, msg.c_str());
6572     }
6573   }
6574   vresult = SWIG_From_std_string(static_cast< std::string >(result));
6575   return vresult;
6576 fail:
6577   return Qnil;
6578 }
6579 
6580 
6581 SWIGINTERN VALUE
_wrap_PostingIterator_equals(int argc,VALUE * argv,VALUE self)6582 _wrap_PostingIterator_equals(int argc, VALUE *argv, VALUE self) {
6583   Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
6584   Xapian::PostingIterator *arg2 = 0 ;
6585   void *argp1 = 0 ;
6586   int res1 = 0 ;
6587   void *argp2 ;
6588   int res2 = 0 ;
6589   bool result;
6590   VALUE vresult = Qnil;
6591 
6592   if ((argc < 1) || (argc > 1)) {
6593     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6594   }
6595   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
6596   if (!SWIG_IsOK(res1)) {
6597     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingIterator const *","equals", 1, self ));
6598   }
6599   arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
6600   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__PostingIterator,  0 );
6601   if (!SWIG_IsOK(res2)) {
6602     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::PostingIterator const &","equals", 2, argv[0] ));
6603   }
6604   if (!argp2) {
6605     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::PostingIterator const &","equals", 2, argv[0]));
6606   }
6607   arg2 = reinterpret_cast< Xapian::PostingIterator * >(argp2);
6608   {
6609     try {
6610       result = (bool)Xapian_PostingIterator_equals((Xapian::PostingIterator const *)arg1,(Xapian::PostingIterator const &)*arg2);
6611     } catch (...) {
6612       string msg;
6613       int code = XapianExceptionHandler(msg);
6614       SWIG_exception(code, msg.c_str());
6615     }
6616   }
6617   vresult = SWIG_From_bool(static_cast< bool >(result));
6618   return vresult;
6619 fail:
6620   return Qnil;
6621 }
6622 
6623 
6624 SWIGINTERN VALUE
_wrap_PostingIterator_docid(int argc,VALUE * argv,VALUE self)6625 _wrap_PostingIterator_docid(int argc, VALUE *argv, VALUE self) {
6626   Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
6627   void *argp1 = 0 ;
6628   int res1 = 0 ;
6629   Xapian::docid result;
6630   VALUE vresult = Qnil;
6631 
6632   if ((argc < 0) || (argc > 0)) {
6633     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6634   }
6635   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
6636   if (!SWIG_IsOK(res1)) {
6637     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingIterator const *","get_docid", 1, self ));
6638   }
6639   arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
6640   {
6641     try {
6642       result = (Xapian::docid)Xapian_PostingIterator_get_docid((Xapian::PostingIterator const *)arg1);
6643     } catch (...) {
6644       string msg;
6645       int code = XapianExceptionHandler(msg);
6646       SWIG_exception(code, msg.c_str());
6647     }
6648   }
6649   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
6650   return vresult;
6651 fail:
6652   return Qnil;
6653 }
6654 
6655 
6656 SWIGINTERN VALUE
_wrap_PostingIterator_next(int argc,VALUE * argv,VALUE self)6657 _wrap_PostingIterator_next(int argc, VALUE *argv, VALUE self) {
6658   Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
6659   void *argp1 = 0 ;
6660   int res1 = 0 ;
6661 
6662   if ((argc < 0) || (argc > 0)) {
6663     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6664   }
6665   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
6666   if (!SWIG_IsOK(res1)) {
6667     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingIterator *","next", 1, self ));
6668   }
6669   arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
6670   {
6671     try {
6672       Xapian_PostingIterator_next(arg1);
6673     } catch (...) {
6674       string msg;
6675       int code = XapianExceptionHandler(msg);
6676       SWIG_exception(code, msg.c_str());
6677     }
6678   }
6679   return Qnil;
6680 fail:
6681   return Qnil;
6682 }
6683 
6684 
6685 SWIGINTERN VALUE
_wrap___eq____SWIG_1(int argc,VALUE * argv,VALUE self)6686 _wrap___eq____SWIG_1(int argc, VALUE *argv, VALUE self) {
6687   Xapian::PostingIterator *arg1 = 0 ;
6688   Xapian::PostingIterator *arg2 = 0 ;
6689   void *argp1 ;
6690   int res1 = 0 ;
6691   void *argp2 ;
6692   int res2 = 0 ;
6693   bool result;
6694   VALUE vresult = Qnil;
6695 
6696   if ((argc < 2) || (argc > 2)) {
6697     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6698   }
6699   res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Xapian__PostingIterator,  0 );
6700   if (!SWIG_IsOK(res1)) {
6701     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingIterator const &","Xapian::operator ==", 1, argv[0] ));
6702   }
6703   if (!argp1) {
6704     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::PostingIterator const &","Xapian::operator ==", 1, argv[0]));
6705   }
6706   arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
6707   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__PostingIterator,  0 );
6708   if (!SWIG_IsOK(res2)) {
6709     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::PostingIterator const &","Xapian::operator ==", 2, argv[1] ));
6710   }
6711   if (!argp2) {
6712     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::PostingIterator const &","Xapian::operator ==", 2, argv[1]));
6713   }
6714   arg2 = reinterpret_cast< Xapian::PostingIterator * >(argp2);
6715   {
6716     try {
6717       result = (bool)Xapian::operator ==((Xapian::PostingIterator const &)*arg1,(Xapian::PostingIterator const &)*arg2);
6718     } catch (...) {
6719       string msg;
6720       int code = XapianExceptionHandler(msg);
6721       SWIG_exception(code, msg.c_str());
6722     }
6723   }
6724   vresult = SWIG_From_bool(static_cast< bool >(result));
6725   return vresult;
6726 fail:
6727   return Qnil;
6728 }
6729 
6730 
6731 static swig_class SwigClassTermIterator;
6732 
6733 SWIGINTERN VALUE
6734 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_TermIterator_allocate(VALUE self)6735 _wrap_TermIterator_allocate(VALUE self)
6736 #else
6737 _wrap_TermIterator_allocate(int argc, VALUE *argv, VALUE self)
6738 #endif
6739 {
6740   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__TermIterator);
6741 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
6742   rb_obj_call_init(vresult, argc, argv);
6743 #endif
6744   return vresult;
6745 }
6746 
6747 
6748 SWIGINTERN VALUE
_wrap_new_TermIterator(int argc,VALUE * argv,VALUE self)6749 _wrap_new_TermIterator(int argc, VALUE *argv, VALUE self) {
6750   const char *classname SWIGUNUSED = "Xapian::TermIterator";
6751   Xapian::TermIterator *result = 0 ;
6752 
6753   if ((argc < 0) || (argc > 0)) {
6754     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6755   }
6756   result = (Xapian::TermIterator *)new Xapian::TermIterator();
6757   DATA_PTR(self) = result;
6758   return self;
6759 fail:
6760   return Qnil;
6761 }
6762 
6763 
6764 SWIGINTERN void
free_Xapian_TermIterator(void * self)6765 free_Xapian_TermIterator(void *self) {
6766     Xapian::TermIterator *arg1 = (Xapian::TermIterator *)self;
6767     delete arg1;
6768 }
6769 
6770 SWIGINTERN VALUE
_wrap_TermIterator_wdf(int argc,VALUE * argv,VALUE self)6771 _wrap_TermIterator_wdf(int argc, VALUE *argv, VALUE self) {
6772   Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
6773   void *argp1 = 0 ;
6774   int res1 = 0 ;
6775   Xapian::termcount result;
6776   VALUE vresult = Qnil;
6777 
6778   if ((argc < 0) || (argc > 0)) {
6779     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6780   }
6781   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
6782   if (!SWIG_IsOK(res1)) {
6783     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermIterator const *","get_wdf", 1, self ));
6784   }
6785   arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
6786   {
6787     try {
6788       result = (Xapian::termcount)((Xapian::TermIterator const *)arg1)->get_wdf();
6789     } catch (...) {
6790       string msg;
6791       int code = XapianExceptionHandler(msg);
6792       SWIG_exception(code, msg.c_str());
6793     }
6794   }
6795   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
6796   return vresult;
6797 fail:
6798   return Qnil;
6799 }
6800 
6801 
6802 SWIGINTERN VALUE
_wrap_TermIterator_termfreq(int argc,VALUE * argv,VALUE self)6803 _wrap_TermIterator_termfreq(int argc, VALUE *argv, VALUE self) {
6804   Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
6805   void *argp1 = 0 ;
6806   int res1 = 0 ;
6807   Xapian::doccount result;
6808   VALUE vresult = Qnil;
6809 
6810   if ((argc < 0) || (argc > 0)) {
6811     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6812   }
6813   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
6814   if (!SWIG_IsOK(res1)) {
6815     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermIterator const *","get_termfreq", 1, self ));
6816   }
6817   arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
6818   {
6819     try {
6820       result = (Xapian::doccount)((Xapian::TermIterator const *)arg1)->get_termfreq();
6821     } catch (...) {
6822       string msg;
6823       int code = XapianExceptionHandler(msg);
6824       SWIG_exception(code, msg.c_str());
6825     }
6826   }
6827   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
6828   return vresult;
6829 fail:
6830   return Qnil;
6831 }
6832 
6833 
6834 SWIGINTERN VALUE
_wrap_TermIterator_positionlist_count(int argc,VALUE * argv,VALUE self)6835 _wrap_TermIterator_positionlist_count(int argc, VALUE *argv, VALUE self) {
6836   Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
6837   void *argp1 = 0 ;
6838   int res1 = 0 ;
6839   Xapian::termcount result;
6840   VALUE vresult = Qnil;
6841 
6842   if ((argc < 0) || (argc > 0)) {
6843     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6844   }
6845   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
6846   if (!SWIG_IsOK(res1)) {
6847     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermIterator const *","positionlist_count", 1, self ));
6848   }
6849   arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
6850   {
6851     try {
6852       result = (Xapian::termcount)((Xapian::TermIterator const *)arg1)->positionlist_count();
6853     } catch (...) {
6854       string msg;
6855       int code = XapianExceptionHandler(msg);
6856       SWIG_exception(code, msg.c_str());
6857     }
6858   }
6859   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
6860   return vresult;
6861 fail:
6862   return Qnil;
6863 }
6864 
6865 
6866 SWIGINTERN VALUE
_wrap_TermIterator__dangerous_positionlist_begin(int argc,VALUE * argv,VALUE self)6867 _wrap_TermIterator__dangerous_positionlist_begin(int argc, VALUE *argv, VALUE self) {
6868   Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
6869   void *argp1 = 0 ;
6870   int res1 = 0 ;
6871   Xapian::PositionIterator result;
6872   VALUE vresult = Qnil;
6873 
6874   if ((argc < 0) || (argc > 0)) {
6875     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6876   }
6877   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
6878   if (!SWIG_IsOK(res1)) {
6879     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermIterator const *","positionlist_begin", 1, self ));
6880   }
6881   arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
6882   {
6883     try {
6884       result = ((Xapian::TermIterator const *)arg1)->positionlist_begin();
6885     } catch (...) {
6886       string msg;
6887       int code = XapianExceptionHandler(msg);
6888       SWIG_exception(code, msg.c_str());
6889     }
6890   }
6891   vresult = SWIG_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN |  0 );
6892   return vresult;
6893 fail:
6894   return Qnil;
6895 }
6896 
6897 
6898 SWIGINTERN VALUE
_wrap_TermIterator__dangerous_positionlist_end(int argc,VALUE * argv,VALUE self)6899 _wrap_TermIterator__dangerous_positionlist_end(int argc, VALUE *argv, VALUE self) {
6900   Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
6901   void *argp1 = 0 ;
6902   int res1 = 0 ;
6903   Xapian::PositionIterator result;
6904   VALUE vresult = Qnil;
6905 
6906   if ((argc < 0) || (argc > 0)) {
6907     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6908   }
6909   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
6910   if (!SWIG_IsOK(res1)) {
6911     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermIterator const *","positionlist_end", 1, self ));
6912   }
6913   arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
6914   result = ((Xapian::TermIterator const *)arg1)->positionlist_end();
6915   vresult = SWIG_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN |  0 );
6916   return vresult;
6917 fail:
6918   return Qnil;
6919 }
6920 
6921 
6922 SWIGINTERN VALUE
_wrap_TermIterator_skip_to(int argc,VALUE * argv,VALUE self)6923 _wrap_TermIterator_skip_to(int argc, VALUE *argv, VALUE self) {
6924   Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
6925   std::string *arg2 = 0 ;
6926   void *argp1 = 0 ;
6927   int res1 = 0 ;
6928   int res2 = SWIG_OLDOBJ ;
6929 
6930   if ((argc < 1) || (argc > 1)) {
6931     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6932   }
6933   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
6934   if (!SWIG_IsOK(res1)) {
6935     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermIterator *","skip_to", 1, self ));
6936   }
6937   arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
6938   {
6939     std::string *ptr = (std::string *)0;
6940     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
6941     if (!SWIG_IsOK(res2)) {
6942       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","skip_to", 2, argv[0] ));
6943     }
6944     if (!ptr) {
6945       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","skip_to", 2, argv[0]));
6946     }
6947     arg2 = ptr;
6948   }
6949   {
6950     try {
6951       (arg1)->skip_to((std::string const &)*arg2);
6952     } catch (...) {
6953       string msg;
6954       int code = XapianExceptionHandler(msg);
6955       SWIG_exception(code, msg.c_str());
6956     }
6957   }
6958   if (SWIG_IsNewObj(res2)) delete arg2;
6959   return Qnil;
6960 fail:
6961   if (SWIG_IsNewObj(res2)) delete arg2;
6962   return Qnil;
6963 }
6964 
6965 
6966 SWIGINTERN VALUE
_wrap_TermIterator_description(int argc,VALUE * argv,VALUE self)6967 _wrap_TermIterator_description(int argc, VALUE *argv, VALUE self) {
6968   Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
6969   void *argp1 = 0 ;
6970   int res1 = 0 ;
6971   std::string result;
6972   VALUE vresult = Qnil;
6973 
6974   if ((argc < 0) || (argc > 0)) {
6975     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6976   }
6977   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
6978   if (!SWIG_IsOK(res1)) {
6979     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermIterator const *","get_description", 1, self ));
6980   }
6981   arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
6982   {
6983     try {
6984       result = ((Xapian::TermIterator const *)arg1)->get_description();
6985     } catch (...) {
6986       string msg;
6987       int code = XapianExceptionHandler(msg);
6988       SWIG_exception(code, msg.c_str());
6989     }
6990   }
6991   vresult = SWIG_From_std_string(static_cast< std::string >(result));
6992   return vresult;
6993 fail:
6994   return Qnil;
6995 }
6996 
6997 
6998 SWIGINTERN VALUE
_wrap_TermIterator_equals(int argc,VALUE * argv,VALUE self)6999 _wrap_TermIterator_equals(int argc, VALUE *argv, VALUE self) {
7000   Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
7001   Xapian::TermIterator *arg2 = 0 ;
7002   void *argp1 = 0 ;
7003   int res1 = 0 ;
7004   void *argp2 ;
7005   int res2 = 0 ;
7006   bool result;
7007   VALUE vresult = Qnil;
7008 
7009   if ((argc < 1) || (argc > 1)) {
7010     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7011   }
7012   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
7013   if (!SWIG_IsOK(res1)) {
7014     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermIterator const *","equals", 1, self ));
7015   }
7016   arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
7017   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__TermIterator,  0 );
7018   if (!SWIG_IsOK(res2)) {
7019     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::TermIterator const &","equals", 2, argv[0] ));
7020   }
7021   if (!argp2) {
7022     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::TermIterator const &","equals", 2, argv[0]));
7023   }
7024   arg2 = reinterpret_cast< Xapian::TermIterator * >(argp2);
7025   {
7026     try {
7027       result = (bool)Xapian_TermIterator_equals((Xapian::TermIterator const *)arg1,(Xapian::TermIterator const &)*arg2);
7028     } catch (...) {
7029       string msg;
7030       int code = XapianExceptionHandler(msg);
7031       SWIG_exception(code, msg.c_str());
7032     }
7033   }
7034   vresult = SWIG_From_bool(static_cast< bool >(result));
7035   return vresult;
7036 fail:
7037   return Qnil;
7038 }
7039 
7040 
7041 SWIGINTERN VALUE
_wrap_TermIterator_term(int argc,VALUE * argv,VALUE self)7042 _wrap_TermIterator_term(int argc, VALUE *argv, VALUE self) {
7043   Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
7044   void *argp1 = 0 ;
7045   int res1 = 0 ;
7046   std::string result;
7047   VALUE vresult = Qnil;
7048 
7049   if ((argc < 0) || (argc > 0)) {
7050     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
7051   }
7052   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
7053   if (!SWIG_IsOK(res1)) {
7054     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermIterator const *","get_term", 1, self ));
7055   }
7056   arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
7057   {
7058     try {
7059       result = Xapian_TermIterator_get_term((Xapian::TermIterator const *)arg1);
7060     } catch (...) {
7061       string msg;
7062       int code = XapianExceptionHandler(msg);
7063       SWIG_exception(code, msg.c_str());
7064     }
7065   }
7066   vresult = SWIG_From_std_string(static_cast< std::string >(result));
7067   return vresult;
7068 fail:
7069   return Qnil;
7070 }
7071 
7072 
7073 SWIGINTERN VALUE
_wrap_TermIterator_next(int argc,VALUE * argv,VALUE self)7074 _wrap_TermIterator_next(int argc, VALUE *argv, VALUE self) {
7075   Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
7076   void *argp1 = 0 ;
7077   int res1 = 0 ;
7078 
7079   if ((argc < 0) || (argc > 0)) {
7080     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
7081   }
7082   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
7083   if (!SWIG_IsOK(res1)) {
7084     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermIterator *","next", 1, self ));
7085   }
7086   arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
7087   {
7088     try {
7089       Xapian_TermIterator_next(arg1);
7090     } catch (...) {
7091       string msg;
7092       int code = XapianExceptionHandler(msg);
7093       SWIG_exception(code, msg.c_str());
7094     }
7095   }
7096   return Qnil;
7097 fail:
7098   return Qnil;
7099 }
7100 
7101 
7102 SWIGINTERN VALUE
_wrap___eq____SWIG_2(int argc,VALUE * argv,VALUE self)7103 _wrap___eq____SWIG_2(int argc, VALUE *argv, VALUE self) {
7104   Xapian::TermIterator *arg1 = 0 ;
7105   Xapian::TermIterator *arg2 = 0 ;
7106   void *argp1 ;
7107   int res1 = 0 ;
7108   void *argp2 ;
7109   int res2 = 0 ;
7110   bool result;
7111   VALUE vresult = Qnil;
7112 
7113   if ((argc < 2) || (argc > 2)) {
7114     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
7115   }
7116   res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Xapian__TermIterator,  0 );
7117   if (!SWIG_IsOK(res1)) {
7118     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermIterator const &","Xapian::operator ==", 1, argv[0] ));
7119   }
7120   if (!argp1) {
7121     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::TermIterator const &","Xapian::operator ==", 1, argv[0]));
7122   }
7123   arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
7124   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__TermIterator,  0 );
7125   if (!SWIG_IsOK(res2)) {
7126     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::TermIterator const &","Xapian::operator ==", 2, argv[1] ));
7127   }
7128   if (!argp2) {
7129     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::TermIterator const &","Xapian::operator ==", 2, argv[1]));
7130   }
7131   arg2 = reinterpret_cast< Xapian::TermIterator * >(argp2);
7132   {
7133     try {
7134       result = (bool)Xapian::operator ==((Xapian::TermIterator const &)*arg1,(Xapian::TermIterator const &)*arg2);
7135     } catch (...) {
7136       string msg;
7137       int code = XapianExceptionHandler(msg);
7138       SWIG_exception(code, msg.c_str());
7139     }
7140   }
7141   vresult = SWIG_From_bool(static_cast< bool >(result));
7142   return vresult;
7143 fail:
7144   return Qnil;
7145 }
7146 
7147 
7148 static swig_class SwigClassValueIterator;
7149 
7150 SWIGINTERN VALUE
7151 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_ValueIterator_allocate(VALUE self)7152 _wrap_ValueIterator_allocate(VALUE self)
7153 #else
7154 _wrap_ValueIterator_allocate(int argc, VALUE *argv, VALUE self)
7155 #endif
7156 {
7157   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__ValueIterator);
7158 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
7159   rb_obj_call_init(vresult, argc, argv);
7160 #endif
7161   return vresult;
7162 }
7163 
7164 
7165 SWIGINTERN VALUE
_wrap_new_ValueIterator(int argc,VALUE * argv,VALUE self)7166 _wrap_new_ValueIterator(int argc, VALUE *argv, VALUE self) {
7167   const char *classname SWIGUNUSED = "Xapian::ValueIterator";
7168   Xapian::ValueIterator *result = 0 ;
7169 
7170   if ((argc < 0) || (argc > 0)) {
7171     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
7172   }
7173   result = (Xapian::ValueIterator *)new Xapian::ValueIterator();
7174   DATA_PTR(self) = result;
7175   return self;
7176 fail:
7177   return Qnil;
7178 }
7179 
7180 
7181 SWIGINTERN void
free_Xapian_ValueIterator(void * self)7182 free_Xapian_ValueIterator(void *self) {
7183     Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *)self;
7184     delete arg1;
7185 }
7186 
7187 SWIGINTERN VALUE
_wrap_ValueIterator_docid(int argc,VALUE * argv,VALUE self)7188 _wrap_ValueIterator_docid(int argc, VALUE *argv, VALUE self) {
7189   Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
7190   void *argp1 = 0 ;
7191   int res1 = 0 ;
7192   Xapian::docid result;
7193   VALUE vresult = Qnil;
7194 
7195   if ((argc < 0) || (argc > 0)) {
7196     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
7197   }
7198   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
7199   if (!SWIG_IsOK(res1)) {
7200     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueIterator const *","get_docid", 1, self ));
7201   }
7202   arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
7203   {
7204     try {
7205       result = (Xapian::docid)((Xapian::ValueIterator const *)arg1)->get_docid();
7206     } catch (...) {
7207       string msg;
7208       int code = XapianExceptionHandler(msg);
7209       SWIG_exception(code, msg.c_str());
7210     }
7211   }
7212   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
7213   return vresult;
7214 fail:
7215   return Qnil;
7216 }
7217 
7218 
7219 SWIGINTERN VALUE
_wrap_ValueIterator_valueno(int argc,VALUE * argv,VALUE self)7220 _wrap_ValueIterator_valueno(int argc, VALUE *argv, VALUE self) {
7221   Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
7222   void *argp1 = 0 ;
7223   int res1 = 0 ;
7224   Xapian::valueno result;
7225   VALUE vresult = Qnil;
7226 
7227   if ((argc < 0) || (argc > 0)) {
7228     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
7229   }
7230   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
7231   if (!SWIG_IsOK(res1)) {
7232     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueIterator const *","get_valueno", 1, self ));
7233   }
7234   arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
7235   {
7236     try {
7237       result = (Xapian::valueno)((Xapian::ValueIterator const *)arg1)->get_valueno();
7238     } catch (...) {
7239       string msg;
7240       int code = XapianExceptionHandler(msg);
7241       SWIG_exception(code, msg.c_str());
7242     }
7243   }
7244   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
7245   return vresult;
7246 fail:
7247   return Qnil;
7248 }
7249 
7250 
7251 SWIGINTERN VALUE
_wrap_ValueIterator_skip_to(int argc,VALUE * argv,VALUE self)7252 _wrap_ValueIterator_skip_to(int argc, VALUE *argv, VALUE self) {
7253   Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
7254   Xapian::docid arg2 ;
7255   void *argp1 = 0 ;
7256   int res1 = 0 ;
7257   unsigned int val2 ;
7258   int ecode2 = 0 ;
7259 
7260   if ((argc < 1) || (argc > 1)) {
7261     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7262   }
7263   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
7264   if (!SWIG_IsOK(res1)) {
7265     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueIterator *","skip_to", 1, self ));
7266   }
7267   arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
7268   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
7269   if (!SWIG_IsOK(ecode2)) {
7270     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","skip_to", 2, argv[0] ));
7271   }
7272   arg2 = static_cast< Xapian::docid >(val2);
7273   {
7274     try {
7275       (arg1)->skip_to(arg2);
7276     } catch (...) {
7277       string msg;
7278       int code = XapianExceptionHandler(msg);
7279       SWIG_exception(code, msg.c_str());
7280     }
7281   }
7282   return Qnil;
7283 fail:
7284   return Qnil;
7285 }
7286 
7287 
7288 SWIGINTERN VALUE
_wrap_ValueIterator_check(int argc,VALUE * argv,VALUE self)7289 _wrap_ValueIterator_check(int argc, VALUE *argv, VALUE self) {
7290   Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
7291   Xapian::docid arg2 ;
7292   void *argp1 = 0 ;
7293   int res1 = 0 ;
7294   unsigned int val2 ;
7295   int ecode2 = 0 ;
7296   bool result;
7297   VALUE vresult = Qnil;
7298 
7299   if ((argc < 1) || (argc > 1)) {
7300     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7301   }
7302   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
7303   if (!SWIG_IsOK(res1)) {
7304     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueIterator *","check", 1, self ));
7305   }
7306   arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
7307   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
7308   if (!SWIG_IsOK(ecode2)) {
7309     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","check", 2, argv[0] ));
7310   }
7311   arg2 = static_cast< Xapian::docid >(val2);
7312   {
7313     try {
7314       result = (bool)(arg1)->check(arg2);
7315     } catch (...) {
7316       string msg;
7317       int code = XapianExceptionHandler(msg);
7318       SWIG_exception(code, msg.c_str());
7319     }
7320   }
7321   vresult = SWIG_From_bool(static_cast< bool >(result));
7322   return vresult;
7323 fail:
7324   return Qnil;
7325 }
7326 
7327 
7328 SWIGINTERN VALUE
_wrap_ValueIterator_description(int argc,VALUE * argv,VALUE self)7329 _wrap_ValueIterator_description(int argc, VALUE *argv, VALUE self) {
7330   Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
7331   void *argp1 = 0 ;
7332   int res1 = 0 ;
7333   std::string result;
7334   VALUE vresult = Qnil;
7335 
7336   if ((argc < 0) || (argc > 0)) {
7337     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
7338   }
7339   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
7340   if (!SWIG_IsOK(res1)) {
7341     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueIterator const *","get_description", 1, self ));
7342   }
7343   arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
7344   {
7345     try {
7346       result = ((Xapian::ValueIterator const *)arg1)->get_description();
7347     } catch (...) {
7348       string msg;
7349       int code = XapianExceptionHandler(msg);
7350       SWIG_exception(code, msg.c_str());
7351     }
7352   }
7353   vresult = SWIG_From_std_string(static_cast< std::string >(result));
7354   return vresult;
7355 fail:
7356   return Qnil;
7357 }
7358 
7359 
7360 SWIGINTERN VALUE
_wrap_ValueIterator_equals(int argc,VALUE * argv,VALUE self)7361 _wrap_ValueIterator_equals(int argc, VALUE *argv, VALUE self) {
7362   Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
7363   Xapian::ValueIterator *arg2 = 0 ;
7364   void *argp1 = 0 ;
7365   int res1 = 0 ;
7366   void *argp2 ;
7367   int res2 = 0 ;
7368   bool result;
7369   VALUE vresult = Qnil;
7370 
7371   if ((argc < 1) || (argc > 1)) {
7372     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7373   }
7374   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
7375   if (!SWIG_IsOK(res1)) {
7376     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueIterator const *","equals", 1, self ));
7377   }
7378   arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
7379   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__ValueIterator,  0 );
7380   if (!SWIG_IsOK(res2)) {
7381     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::ValueIterator const &","equals", 2, argv[0] ));
7382   }
7383   if (!argp2) {
7384     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::ValueIterator const &","equals", 2, argv[0]));
7385   }
7386   arg2 = reinterpret_cast< Xapian::ValueIterator * >(argp2);
7387   {
7388     try {
7389       result = (bool)Xapian_ValueIterator_equals((Xapian::ValueIterator const *)arg1,(Xapian::ValueIterator const &)*arg2);
7390     } catch (...) {
7391       string msg;
7392       int code = XapianExceptionHandler(msg);
7393       SWIG_exception(code, msg.c_str());
7394     }
7395   }
7396   vresult = SWIG_From_bool(static_cast< bool >(result));
7397   return vresult;
7398 fail:
7399   return Qnil;
7400 }
7401 
7402 
7403 SWIGINTERN VALUE
_wrap_ValueIterator_value(int argc,VALUE * argv,VALUE self)7404 _wrap_ValueIterator_value(int argc, VALUE *argv, VALUE self) {
7405   Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
7406   void *argp1 = 0 ;
7407   int res1 = 0 ;
7408   std::string result;
7409   VALUE vresult = Qnil;
7410 
7411   if ((argc < 0) || (argc > 0)) {
7412     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
7413   }
7414   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
7415   if (!SWIG_IsOK(res1)) {
7416     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueIterator const *","get_value", 1, self ));
7417   }
7418   arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
7419   {
7420     try {
7421       result = Xapian_ValueIterator_get_value((Xapian::ValueIterator const *)arg1);
7422     } catch (...) {
7423       string msg;
7424       int code = XapianExceptionHandler(msg);
7425       SWIG_exception(code, msg.c_str());
7426     }
7427   }
7428   vresult = SWIG_From_std_string(static_cast< std::string >(result));
7429   return vresult;
7430 fail:
7431   return Qnil;
7432 }
7433 
7434 
7435 SWIGINTERN VALUE
_wrap_ValueIterator_next(int argc,VALUE * argv,VALUE self)7436 _wrap_ValueIterator_next(int argc, VALUE *argv, VALUE self) {
7437   Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
7438   void *argp1 = 0 ;
7439   int res1 = 0 ;
7440 
7441   if ((argc < 0) || (argc > 0)) {
7442     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
7443   }
7444   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
7445   if (!SWIG_IsOK(res1)) {
7446     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueIterator *","next", 1, self ));
7447   }
7448   arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
7449   {
7450     try {
7451       Xapian_ValueIterator_next(arg1);
7452     } catch (...) {
7453       string msg;
7454       int code = XapianExceptionHandler(msg);
7455       SWIG_exception(code, msg.c_str());
7456     }
7457   }
7458   return Qnil;
7459 fail:
7460   return Qnil;
7461 }
7462 
7463 
7464 SWIGINTERN VALUE
_wrap___eq____SWIG_3(int argc,VALUE * argv,VALUE self)7465 _wrap___eq____SWIG_3(int argc, VALUE *argv, VALUE self) {
7466   Xapian::ValueIterator *arg1 = 0 ;
7467   Xapian::ValueIterator *arg2 = 0 ;
7468   void *argp1 ;
7469   int res1 = 0 ;
7470   void *argp2 ;
7471   int res2 = 0 ;
7472   bool result;
7473   VALUE vresult = Qnil;
7474 
7475   if ((argc < 2) || (argc > 2)) {
7476     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
7477   }
7478   res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Xapian__ValueIterator,  0 );
7479   if (!SWIG_IsOK(res1)) {
7480     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueIterator const &","Xapian::operator ==", 1, argv[0] ));
7481   }
7482   if (!argp1) {
7483     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::ValueIterator const &","Xapian::operator ==", 1, argv[0]));
7484   }
7485   arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
7486   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__ValueIterator,  0 );
7487   if (!SWIG_IsOK(res2)) {
7488     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::ValueIterator const &","Xapian::operator ==", 2, argv[1] ));
7489   }
7490   if (!argp2) {
7491     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::ValueIterator const &","Xapian::operator ==", 2, argv[1]));
7492   }
7493   arg2 = reinterpret_cast< Xapian::ValueIterator * >(argp2);
7494   {
7495     try {
7496       result = (bool)Xapian::operator ==((Xapian::ValueIterator const &)*arg1,(Xapian::ValueIterator const &)*arg2);
7497     } catch (...) {
7498       string msg;
7499       int code = XapianExceptionHandler(msg);
7500       SWIG_exception(code, msg.c_str());
7501     }
7502   }
7503   vresult = SWIG_From_bool(static_cast< bool >(result));
7504   return vresult;
7505 fail:
7506   return Qnil;
7507 }
7508 
7509 
7510 static swig_class SwigClassDocument;
7511 
7512 SWIGINTERN VALUE
7513 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_Document_allocate(VALUE self)7514 _wrap_Document_allocate(VALUE self)
7515 #else
7516 _wrap_Document_allocate(int argc, VALUE *argv, VALUE self)
7517 #endif
7518 {
7519   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__Document);
7520 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
7521   rb_obj_call_init(vresult, argc, argv);
7522 #endif
7523   return vresult;
7524 }
7525 
7526 
7527 SWIGINTERN VALUE
_wrap_new_Document(int argc,VALUE * argv,VALUE self)7528 _wrap_new_Document(int argc, VALUE *argv, VALUE self) {
7529   const char *classname SWIGUNUSED = "Xapian::Document";
7530   Xapian::Document *result = 0 ;
7531 
7532   if ((argc < 0) || (argc > 0)) {
7533     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
7534   }
7535   {
7536     try {
7537       result = (Xapian::Document *)new Xapian::Document();
7538       DATA_PTR(self) = result;
7539     } catch (...) {
7540       string msg;
7541       int code = XapianExceptionHandler(msg);
7542       SWIG_exception(code, msg.c_str());
7543     }
7544   }
7545   return self;
7546 fail:
7547   return Qnil;
7548 }
7549 
7550 
7551 SWIGINTERN void
free_Xapian_Document(void * self)7552 free_Xapian_Document(void *self) {
7553     Xapian::Document *arg1 = (Xapian::Document *)self;
7554     delete arg1;
7555 }
7556 
7557 SWIGINTERN VALUE
_wrap_Document_value(int argc,VALUE * argv,VALUE self)7558 _wrap_Document_value(int argc, VALUE *argv, VALUE self) {
7559   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
7560   Xapian::valueno arg2 ;
7561   void *argp1 = 0 ;
7562   int res1 = 0 ;
7563   unsigned int val2 ;
7564   int ecode2 = 0 ;
7565   std::string result;
7566   VALUE vresult = Qnil;
7567 
7568   if ((argc < 1) || (argc > 1)) {
7569     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7570   }
7571   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
7572   if (!SWIG_IsOK(res1)) {
7573     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document const *","get_value", 1, self ));
7574   }
7575   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
7576   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
7577   if (!SWIG_IsOK(ecode2)) {
7578     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","get_value", 2, argv[0] ));
7579   }
7580   arg2 = static_cast< Xapian::valueno >(val2);
7581   {
7582     try {
7583       result = ((Xapian::Document const *)arg1)->get_value(arg2);
7584     } catch (...) {
7585       string msg;
7586       int code = XapianExceptionHandler(msg);
7587       SWIG_exception(code, msg.c_str());
7588     }
7589   }
7590   vresult = SWIG_From_std_string(static_cast< std::string >(result));
7591   return vresult;
7592 fail:
7593   return Qnil;
7594 }
7595 
7596 
7597 SWIGINTERN VALUE
_wrap_Document_add_value(int argc,VALUE * argv,VALUE self)7598 _wrap_Document_add_value(int argc, VALUE *argv, VALUE self) {
7599   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
7600   Xapian::valueno arg2 ;
7601   std::string *arg3 = 0 ;
7602   void *argp1 = 0 ;
7603   int res1 = 0 ;
7604   unsigned int val2 ;
7605   int ecode2 = 0 ;
7606   int res3 = SWIG_OLDOBJ ;
7607 
7608   if ((argc < 2) || (argc > 2)) {
7609     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
7610   }
7611   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
7612   if (!SWIG_IsOK(res1)) {
7613     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document *","add_value", 1, self ));
7614   }
7615   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
7616   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
7617   if (!SWIG_IsOK(ecode2)) {
7618     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","add_value", 2, argv[0] ));
7619   }
7620   arg2 = static_cast< Xapian::valueno >(val2);
7621   {
7622     std::string *ptr = (std::string *)0;
7623     res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
7624     if (!SWIG_IsOK(res3)) {
7625       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","add_value", 3, argv[1] ));
7626     }
7627     if (!ptr) {
7628       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_value", 3, argv[1]));
7629     }
7630     arg3 = ptr;
7631   }
7632   {
7633     try {
7634       (arg1)->add_value(arg2,(std::string const &)*arg3);
7635     } catch (...) {
7636       string msg;
7637       int code = XapianExceptionHandler(msg);
7638       SWIG_exception(code, msg.c_str());
7639     }
7640   }
7641   if (SWIG_IsNewObj(res3)) delete arg3;
7642   return Qnil;
7643 fail:
7644   if (SWIG_IsNewObj(res3)) delete arg3;
7645   return Qnil;
7646 }
7647 
7648 
7649 SWIGINTERN VALUE
_wrap_Document_remove_value(int argc,VALUE * argv,VALUE self)7650 _wrap_Document_remove_value(int argc, VALUE *argv, VALUE self) {
7651   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
7652   Xapian::valueno arg2 ;
7653   void *argp1 = 0 ;
7654   int res1 = 0 ;
7655   unsigned int val2 ;
7656   int ecode2 = 0 ;
7657 
7658   if ((argc < 1) || (argc > 1)) {
7659     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7660   }
7661   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
7662   if (!SWIG_IsOK(res1)) {
7663     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document *","remove_value", 1, self ));
7664   }
7665   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
7666   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
7667   if (!SWIG_IsOK(ecode2)) {
7668     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","remove_value", 2, argv[0] ));
7669   }
7670   arg2 = static_cast< Xapian::valueno >(val2);
7671   {
7672     try {
7673       (arg1)->remove_value(arg2);
7674     } catch (...) {
7675       string msg;
7676       int code = XapianExceptionHandler(msg);
7677       SWIG_exception(code, msg.c_str());
7678     }
7679   }
7680   return Qnil;
7681 fail:
7682   return Qnil;
7683 }
7684 
7685 
7686 SWIGINTERN VALUE
_wrap_Document_clear_values(int argc,VALUE * argv,VALUE self)7687 _wrap_Document_clear_values(int argc, VALUE *argv, VALUE self) {
7688   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
7689   void *argp1 = 0 ;
7690   int res1 = 0 ;
7691 
7692   if ((argc < 0) || (argc > 0)) {
7693     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
7694   }
7695   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
7696   if (!SWIG_IsOK(res1)) {
7697     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document *","clear_values", 1, self ));
7698   }
7699   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
7700   {
7701     try {
7702       (arg1)->clear_values();
7703     } catch (...) {
7704       string msg;
7705       int code = XapianExceptionHandler(msg);
7706       SWIG_exception(code, msg.c_str());
7707     }
7708   }
7709   return Qnil;
7710 fail:
7711   return Qnil;
7712 }
7713 
7714 
7715 SWIGINTERN VALUE
_wrap_Document_data(int argc,VALUE * argv,VALUE self)7716 _wrap_Document_data(int argc, VALUE *argv, VALUE self) {
7717   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
7718   void *argp1 = 0 ;
7719   int res1 = 0 ;
7720   std::string result;
7721   VALUE vresult = Qnil;
7722 
7723   if ((argc < 0) || (argc > 0)) {
7724     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
7725   }
7726   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
7727   if (!SWIG_IsOK(res1)) {
7728     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document const *","get_data", 1, self ));
7729   }
7730   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
7731   {
7732     try {
7733       result = ((Xapian::Document const *)arg1)->get_data();
7734     } catch (...) {
7735       string msg;
7736       int code = XapianExceptionHandler(msg);
7737       SWIG_exception(code, msg.c_str());
7738     }
7739   }
7740   vresult = SWIG_From_std_string(static_cast< std::string >(result));
7741   return vresult;
7742 fail:
7743   return Qnil;
7744 }
7745 
7746 
7747 SWIGINTERN VALUE
_wrap_Document_datae___(int argc,VALUE * argv,VALUE self)7748 _wrap_Document_datae___(int argc, VALUE *argv, VALUE self) {
7749   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
7750   std::string *arg2 = 0 ;
7751   void *argp1 = 0 ;
7752   int res1 = 0 ;
7753   int res2 = SWIG_OLDOBJ ;
7754 
7755   if ((argc < 1) || (argc > 1)) {
7756     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7757   }
7758   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
7759   if (!SWIG_IsOK(res1)) {
7760     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document *","set_data", 1, self ));
7761   }
7762   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
7763   {
7764     std::string *ptr = (std::string *)0;
7765     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
7766     if (!SWIG_IsOK(res2)) {
7767       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","set_data", 2, argv[0] ));
7768     }
7769     if (!ptr) {
7770       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","set_data", 2, argv[0]));
7771     }
7772     arg2 = ptr;
7773   }
7774   {
7775     try {
7776       (arg1)->set_data((std::string const &)*arg2);
7777     } catch (...) {
7778       string msg;
7779       int code = XapianExceptionHandler(msg);
7780       SWIG_exception(code, msg.c_str());
7781     }
7782   }
7783   if (SWIG_IsNewObj(res2)) delete arg2;
7784   return Qnil;
7785 fail:
7786   if (SWIG_IsNewObj(res2)) delete arg2;
7787   return Qnil;
7788 }
7789 
7790 
7791 SWIGINTERN VALUE
_wrap_Document_add_posting__SWIG_0(int argc,VALUE * argv,VALUE self)7792 _wrap_Document_add_posting__SWIG_0(int argc, VALUE *argv, VALUE self) {
7793   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
7794   std::string *arg2 = 0 ;
7795   Xapian::termpos arg3 ;
7796   Xapian::termcount arg4 ;
7797   void *argp1 = 0 ;
7798   int res1 = 0 ;
7799   int res2 = SWIG_OLDOBJ ;
7800   unsigned int val3 ;
7801   int ecode3 = 0 ;
7802   unsigned int val4 ;
7803   int ecode4 = 0 ;
7804 
7805   if ((argc < 3) || (argc > 3)) {
7806     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
7807   }
7808   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
7809   if (!SWIG_IsOK(res1)) {
7810     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document *","add_posting", 1, self ));
7811   }
7812   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
7813   {
7814     std::string *ptr = (std::string *)0;
7815     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
7816     if (!SWIG_IsOK(res2)) {
7817       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","add_posting", 2, argv[0] ));
7818     }
7819     if (!ptr) {
7820       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_posting", 2, argv[0]));
7821     }
7822     arg2 = ptr;
7823   }
7824   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
7825   if (!SWIG_IsOK(ecode3)) {
7826     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termpos","add_posting", 3, argv[1] ));
7827   }
7828   arg3 = static_cast< Xapian::termpos >(val3);
7829   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
7830   if (!SWIG_IsOK(ecode4)) {
7831     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termcount","add_posting", 4, argv[2] ));
7832   }
7833   arg4 = static_cast< Xapian::termcount >(val4);
7834   {
7835     try {
7836       (arg1)->add_posting((std::string const &)*arg2,arg3,arg4);
7837     } catch (...) {
7838       string msg;
7839       int code = XapianExceptionHandler(msg);
7840       SWIG_exception(code, msg.c_str());
7841     }
7842   }
7843   if (SWIG_IsNewObj(res2)) delete arg2;
7844   return Qnil;
7845 fail:
7846   if (SWIG_IsNewObj(res2)) delete arg2;
7847   return Qnil;
7848 }
7849 
7850 
7851 SWIGINTERN VALUE
_wrap_Document_add_posting__SWIG_1(int argc,VALUE * argv,VALUE self)7852 _wrap_Document_add_posting__SWIG_1(int argc, VALUE *argv, VALUE self) {
7853   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
7854   std::string *arg2 = 0 ;
7855   Xapian::termpos arg3 ;
7856   void *argp1 = 0 ;
7857   int res1 = 0 ;
7858   int res2 = SWIG_OLDOBJ ;
7859   unsigned int val3 ;
7860   int ecode3 = 0 ;
7861 
7862   if ((argc < 2) || (argc > 2)) {
7863     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
7864   }
7865   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
7866   if (!SWIG_IsOK(res1)) {
7867     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document *","add_posting", 1, self ));
7868   }
7869   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
7870   {
7871     std::string *ptr = (std::string *)0;
7872     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
7873     if (!SWIG_IsOK(res2)) {
7874       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","add_posting", 2, argv[0] ));
7875     }
7876     if (!ptr) {
7877       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_posting", 2, argv[0]));
7878     }
7879     arg2 = ptr;
7880   }
7881   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
7882   if (!SWIG_IsOK(ecode3)) {
7883     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termpos","add_posting", 3, argv[1] ));
7884   }
7885   arg3 = static_cast< Xapian::termpos >(val3);
7886   {
7887     try {
7888       (arg1)->add_posting((std::string const &)*arg2,arg3);
7889     } catch (...) {
7890       string msg;
7891       int code = XapianExceptionHandler(msg);
7892       SWIG_exception(code, msg.c_str());
7893     }
7894   }
7895   if (SWIG_IsNewObj(res2)) delete arg2;
7896   return Qnil;
7897 fail:
7898   if (SWIG_IsNewObj(res2)) delete arg2;
7899   return Qnil;
7900 }
7901 
7902 
_wrap_Document_add_posting(int nargs,VALUE * args,VALUE self)7903 SWIGINTERN VALUE _wrap_Document_add_posting(int nargs, VALUE *args, VALUE self) {
7904   int argc;
7905   VALUE argv[5];
7906   int ii;
7907 
7908   argc = nargs + 1;
7909   argv[0] = self;
7910   if (argc > 5) SWIG_fail;
7911   for (ii = 1; (ii < argc); ++ii) {
7912     argv[ii] = args[ii-1];
7913   }
7914   if (argc == 3) {
7915     int _v;
7916     void *vptr = 0;
7917     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Document, 0);
7918     _v = SWIG_CheckState(res);
7919     if (_v) {
7920       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
7921       _v = SWIG_CheckState(res);
7922       if (_v) {
7923         {
7924           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
7925           _v = SWIG_CheckState(res);
7926         }
7927         if (_v) {
7928           return _wrap_Document_add_posting__SWIG_1(nargs, args, self);
7929         }
7930       }
7931     }
7932   }
7933   if (argc == 4) {
7934     int _v;
7935     void *vptr = 0;
7936     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Document, 0);
7937     _v = SWIG_CheckState(res);
7938     if (_v) {
7939       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
7940       _v = SWIG_CheckState(res);
7941       if (_v) {
7942         {
7943           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
7944           _v = SWIG_CheckState(res);
7945         }
7946         if (_v) {
7947           {
7948             int res = SWIG_AsVal_unsigned_SS_int(argv[3], NULL);
7949             _v = SWIG_CheckState(res);
7950           }
7951           if (_v) {
7952             return _wrap_Document_add_posting__SWIG_0(nargs, args, self);
7953           }
7954         }
7955       }
7956     }
7957   }
7958 
7959 fail:
7960   Ruby_Format_OverloadedError( argc, 5, "Document.add_posting",
7961     "    void Document.add_posting(std::string const &tname, Xapian::termpos tpos, Xapian::termcount wdfinc)\n"
7962     "    void Document.add_posting(std::string const &tname, Xapian::termpos tpos)\n");
7963 
7964   return Qnil;
7965 }
7966 
7967 
7968 SWIGINTERN VALUE
_wrap_Document_add_term__SWIG_0(int argc,VALUE * argv,VALUE self)7969 _wrap_Document_add_term__SWIG_0(int argc, VALUE *argv, VALUE self) {
7970   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
7971   std::string *arg2 = 0 ;
7972   Xapian::termcount arg3 ;
7973   void *argp1 = 0 ;
7974   int res1 = 0 ;
7975   int res2 = SWIG_OLDOBJ ;
7976   unsigned int val3 ;
7977   int ecode3 = 0 ;
7978 
7979   if ((argc < 2) || (argc > 2)) {
7980     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
7981   }
7982   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
7983   if (!SWIG_IsOK(res1)) {
7984     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document *","add_term", 1, self ));
7985   }
7986   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
7987   {
7988     std::string *ptr = (std::string *)0;
7989     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
7990     if (!SWIG_IsOK(res2)) {
7991       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","add_term", 2, argv[0] ));
7992     }
7993     if (!ptr) {
7994       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_term", 2, argv[0]));
7995     }
7996     arg2 = ptr;
7997   }
7998   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
7999   if (!SWIG_IsOK(ecode3)) {
8000     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","add_term", 3, argv[1] ));
8001   }
8002   arg3 = static_cast< Xapian::termcount >(val3);
8003   {
8004     try {
8005       (arg1)->add_term((std::string const &)*arg2,arg3);
8006     } catch (...) {
8007       string msg;
8008       int code = XapianExceptionHandler(msg);
8009       SWIG_exception(code, msg.c_str());
8010     }
8011   }
8012   if (SWIG_IsNewObj(res2)) delete arg2;
8013   return Qnil;
8014 fail:
8015   if (SWIG_IsNewObj(res2)) delete arg2;
8016   return Qnil;
8017 }
8018 
8019 
8020 SWIGINTERN VALUE
_wrap_Document_add_term__SWIG_1(int argc,VALUE * argv,VALUE self)8021 _wrap_Document_add_term__SWIG_1(int argc, VALUE *argv, VALUE self) {
8022   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
8023   std::string *arg2 = 0 ;
8024   void *argp1 = 0 ;
8025   int res1 = 0 ;
8026   int res2 = SWIG_OLDOBJ ;
8027 
8028   if ((argc < 1) || (argc > 1)) {
8029     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
8030   }
8031   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
8032   if (!SWIG_IsOK(res1)) {
8033     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document *","add_term", 1, self ));
8034   }
8035   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
8036   {
8037     std::string *ptr = (std::string *)0;
8038     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
8039     if (!SWIG_IsOK(res2)) {
8040       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","add_term", 2, argv[0] ));
8041     }
8042     if (!ptr) {
8043       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_term", 2, argv[0]));
8044     }
8045     arg2 = ptr;
8046   }
8047   {
8048     try {
8049       (arg1)->add_term((std::string const &)*arg2);
8050     } catch (...) {
8051       string msg;
8052       int code = XapianExceptionHandler(msg);
8053       SWIG_exception(code, msg.c_str());
8054     }
8055   }
8056   if (SWIG_IsNewObj(res2)) delete arg2;
8057   return Qnil;
8058 fail:
8059   if (SWIG_IsNewObj(res2)) delete arg2;
8060   return Qnil;
8061 }
8062 
8063 
_wrap_Document_add_term(int nargs,VALUE * args,VALUE self)8064 SWIGINTERN VALUE _wrap_Document_add_term(int nargs, VALUE *args, VALUE self) {
8065   int argc;
8066   VALUE argv[4];
8067   int ii;
8068 
8069   argc = nargs + 1;
8070   argv[0] = self;
8071   if (argc > 4) SWIG_fail;
8072   for (ii = 1; (ii < argc); ++ii) {
8073     argv[ii] = args[ii-1];
8074   }
8075   if (argc == 2) {
8076     int _v;
8077     void *vptr = 0;
8078     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Document, 0);
8079     _v = SWIG_CheckState(res);
8080     if (_v) {
8081       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
8082       _v = SWIG_CheckState(res);
8083       if (_v) {
8084         return _wrap_Document_add_term__SWIG_1(nargs, args, self);
8085       }
8086     }
8087   }
8088   if (argc == 3) {
8089     int _v;
8090     void *vptr = 0;
8091     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Document, 0);
8092     _v = SWIG_CheckState(res);
8093     if (_v) {
8094       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
8095       _v = SWIG_CheckState(res);
8096       if (_v) {
8097         {
8098           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
8099           _v = SWIG_CheckState(res);
8100         }
8101         if (_v) {
8102           return _wrap_Document_add_term__SWIG_0(nargs, args, self);
8103         }
8104       }
8105     }
8106   }
8107 
8108 fail:
8109   Ruby_Format_OverloadedError( argc, 4, "Document.add_term",
8110     "    void Document.add_term(std::string const &tname, Xapian::termcount wdfinc)\n"
8111     "    void Document.add_term(std::string const &tname)\n");
8112 
8113   return Qnil;
8114 }
8115 
8116 
8117 SWIGINTERN VALUE
_wrap_Document_add_boolean_term(int argc,VALUE * argv,VALUE self)8118 _wrap_Document_add_boolean_term(int argc, VALUE *argv, VALUE self) {
8119   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
8120   std::string *arg2 = 0 ;
8121   void *argp1 = 0 ;
8122   int res1 = 0 ;
8123   int res2 = SWIG_OLDOBJ ;
8124 
8125   if ((argc < 1) || (argc > 1)) {
8126     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
8127   }
8128   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
8129   if (!SWIG_IsOK(res1)) {
8130     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document *","add_boolean_term", 1, self ));
8131   }
8132   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
8133   {
8134     std::string *ptr = (std::string *)0;
8135     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
8136     if (!SWIG_IsOK(res2)) {
8137       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","add_boolean_term", 2, argv[0] ));
8138     }
8139     if (!ptr) {
8140       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_boolean_term", 2, argv[0]));
8141     }
8142     arg2 = ptr;
8143   }
8144   {
8145     try {
8146       (arg1)->add_boolean_term((std::string const &)*arg2);
8147     } catch (...) {
8148       string msg;
8149       int code = XapianExceptionHandler(msg);
8150       SWIG_exception(code, msg.c_str());
8151     }
8152   }
8153   if (SWIG_IsNewObj(res2)) delete arg2;
8154   return Qnil;
8155 fail:
8156   if (SWIG_IsNewObj(res2)) delete arg2;
8157   return Qnil;
8158 }
8159 
8160 
8161 SWIGINTERN VALUE
_wrap_Document_remove_posting__SWIG_0(int argc,VALUE * argv,VALUE self)8162 _wrap_Document_remove_posting__SWIG_0(int argc, VALUE *argv, VALUE self) {
8163   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
8164   std::string *arg2 = 0 ;
8165   Xapian::termpos arg3 ;
8166   Xapian::termcount arg4 ;
8167   void *argp1 = 0 ;
8168   int res1 = 0 ;
8169   int res2 = SWIG_OLDOBJ ;
8170   unsigned int val3 ;
8171   int ecode3 = 0 ;
8172   unsigned int val4 ;
8173   int ecode4 = 0 ;
8174 
8175   if ((argc < 3) || (argc > 3)) {
8176     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
8177   }
8178   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
8179   if (!SWIG_IsOK(res1)) {
8180     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document *","remove_posting", 1, self ));
8181   }
8182   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
8183   {
8184     std::string *ptr = (std::string *)0;
8185     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
8186     if (!SWIG_IsOK(res2)) {
8187       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","remove_posting", 2, argv[0] ));
8188     }
8189     if (!ptr) {
8190       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","remove_posting", 2, argv[0]));
8191     }
8192     arg2 = ptr;
8193   }
8194   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
8195   if (!SWIG_IsOK(ecode3)) {
8196     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termpos","remove_posting", 3, argv[1] ));
8197   }
8198   arg3 = static_cast< Xapian::termpos >(val3);
8199   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
8200   if (!SWIG_IsOK(ecode4)) {
8201     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termcount","remove_posting", 4, argv[2] ));
8202   }
8203   arg4 = static_cast< Xapian::termcount >(val4);
8204   {
8205     try {
8206       (arg1)->remove_posting((std::string const &)*arg2,arg3,arg4);
8207     } catch (...) {
8208       string msg;
8209       int code = XapianExceptionHandler(msg);
8210       SWIG_exception(code, msg.c_str());
8211     }
8212   }
8213   if (SWIG_IsNewObj(res2)) delete arg2;
8214   return Qnil;
8215 fail:
8216   if (SWIG_IsNewObj(res2)) delete arg2;
8217   return Qnil;
8218 }
8219 
8220 
8221 SWIGINTERN VALUE
_wrap_Document_remove_posting__SWIG_1(int argc,VALUE * argv,VALUE self)8222 _wrap_Document_remove_posting__SWIG_1(int argc, VALUE *argv, VALUE self) {
8223   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
8224   std::string *arg2 = 0 ;
8225   Xapian::termpos arg3 ;
8226   void *argp1 = 0 ;
8227   int res1 = 0 ;
8228   int res2 = SWIG_OLDOBJ ;
8229   unsigned int val3 ;
8230   int ecode3 = 0 ;
8231 
8232   if ((argc < 2) || (argc > 2)) {
8233     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
8234   }
8235   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
8236   if (!SWIG_IsOK(res1)) {
8237     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document *","remove_posting", 1, self ));
8238   }
8239   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
8240   {
8241     std::string *ptr = (std::string *)0;
8242     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
8243     if (!SWIG_IsOK(res2)) {
8244       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","remove_posting", 2, argv[0] ));
8245     }
8246     if (!ptr) {
8247       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","remove_posting", 2, argv[0]));
8248     }
8249     arg2 = ptr;
8250   }
8251   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
8252   if (!SWIG_IsOK(ecode3)) {
8253     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termpos","remove_posting", 3, argv[1] ));
8254   }
8255   arg3 = static_cast< Xapian::termpos >(val3);
8256   {
8257     try {
8258       (arg1)->remove_posting((std::string const &)*arg2,arg3);
8259     } catch (...) {
8260       string msg;
8261       int code = XapianExceptionHandler(msg);
8262       SWIG_exception(code, msg.c_str());
8263     }
8264   }
8265   if (SWIG_IsNewObj(res2)) delete arg2;
8266   return Qnil;
8267 fail:
8268   if (SWIG_IsNewObj(res2)) delete arg2;
8269   return Qnil;
8270 }
8271 
8272 
_wrap_Document_remove_posting(int nargs,VALUE * args,VALUE self)8273 SWIGINTERN VALUE _wrap_Document_remove_posting(int nargs, VALUE *args, VALUE self) {
8274   int argc;
8275   VALUE argv[5];
8276   int ii;
8277 
8278   argc = nargs + 1;
8279   argv[0] = self;
8280   if (argc > 5) SWIG_fail;
8281   for (ii = 1; (ii < argc); ++ii) {
8282     argv[ii] = args[ii-1];
8283   }
8284   if (argc == 3) {
8285     int _v;
8286     void *vptr = 0;
8287     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Document, 0);
8288     _v = SWIG_CheckState(res);
8289     if (_v) {
8290       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
8291       _v = SWIG_CheckState(res);
8292       if (_v) {
8293         {
8294           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
8295           _v = SWIG_CheckState(res);
8296         }
8297         if (_v) {
8298           return _wrap_Document_remove_posting__SWIG_1(nargs, args, self);
8299         }
8300       }
8301     }
8302   }
8303   if (argc == 4) {
8304     int _v;
8305     void *vptr = 0;
8306     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Document, 0);
8307     _v = SWIG_CheckState(res);
8308     if (_v) {
8309       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
8310       _v = SWIG_CheckState(res);
8311       if (_v) {
8312         {
8313           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
8314           _v = SWIG_CheckState(res);
8315         }
8316         if (_v) {
8317           {
8318             int res = SWIG_AsVal_unsigned_SS_int(argv[3], NULL);
8319             _v = SWIG_CheckState(res);
8320           }
8321           if (_v) {
8322             return _wrap_Document_remove_posting__SWIG_0(nargs, args, self);
8323           }
8324         }
8325       }
8326     }
8327   }
8328 
8329 fail:
8330   Ruby_Format_OverloadedError( argc, 5, "Document.remove_posting",
8331     "    void Document.remove_posting(std::string const &tname, Xapian::termpos tpos, Xapian::termcount wdfdec)\n"
8332     "    void Document.remove_posting(std::string const &tname, Xapian::termpos tpos)\n");
8333 
8334   return Qnil;
8335 }
8336 
8337 
8338 SWIGINTERN VALUE
_wrap_Document_remove_postings__SWIG_0(int argc,VALUE * argv,VALUE self)8339 _wrap_Document_remove_postings__SWIG_0(int argc, VALUE *argv, VALUE self) {
8340   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
8341   std::string *arg2 = 0 ;
8342   Xapian::termpos arg3 ;
8343   Xapian::termpos arg4 ;
8344   Xapian::termcount arg5 ;
8345   void *argp1 = 0 ;
8346   int res1 = 0 ;
8347   int res2 = SWIG_OLDOBJ ;
8348   unsigned int val3 ;
8349   int ecode3 = 0 ;
8350   unsigned int val4 ;
8351   int ecode4 = 0 ;
8352   unsigned int val5 ;
8353   int ecode5 = 0 ;
8354   Xapian::termpos result;
8355   VALUE vresult = Qnil;
8356 
8357   if ((argc < 4) || (argc > 4)) {
8358     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
8359   }
8360   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
8361   if (!SWIG_IsOK(res1)) {
8362     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document *","remove_postings", 1, self ));
8363   }
8364   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
8365   {
8366     std::string *ptr = (std::string *)0;
8367     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
8368     if (!SWIG_IsOK(res2)) {
8369       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","remove_postings", 2, argv[0] ));
8370     }
8371     if (!ptr) {
8372       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","remove_postings", 2, argv[0]));
8373     }
8374     arg2 = ptr;
8375   }
8376   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
8377   if (!SWIG_IsOK(ecode3)) {
8378     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termpos","remove_postings", 3, argv[1] ));
8379   }
8380   arg3 = static_cast< Xapian::termpos >(val3);
8381   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
8382   if (!SWIG_IsOK(ecode4)) {
8383     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termpos","remove_postings", 4, argv[2] ));
8384   }
8385   arg4 = static_cast< Xapian::termpos >(val4);
8386   ecode5 = SWIG_AsVal_unsigned_SS_int(argv[3], &val5);
8387   if (!SWIG_IsOK(ecode5)) {
8388     SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "Xapian::termcount","remove_postings", 5, argv[3] ));
8389   }
8390   arg5 = static_cast< Xapian::termcount >(val5);
8391   {
8392     try {
8393       result = (Xapian::termpos)(arg1)->remove_postings((std::string const &)*arg2,arg3,arg4,arg5);
8394     } catch (...) {
8395       string msg;
8396       int code = XapianExceptionHandler(msg);
8397       SWIG_exception(code, msg.c_str());
8398     }
8399   }
8400   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
8401   if (SWIG_IsNewObj(res2)) delete arg2;
8402   return vresult;
8403 fail:
8404   if (SWIG_IsNewObj(res2)) delete arg2;
8405   return Qnil;
8406 }
8407 
8408 
8409 SWIGINTERN VALUE
_wrap_Document_remove_postings__SWIG_1(int argc,VALUE * argv,VALUE self)8410 _wrap_Document_remove_postings__SWIG_1(int argc, VALUE *argv, VALUE self) {
8411   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
8412   std::string *arg2 = 0 ;
8413   Xapian::termpos arg3 ;
8414   Xapian::termpos arg4 ;
8415   void *argp1 = 0 ;
8416   int res1 = 0 ;
8417   int res2 = SWIG_OLDOBJ ;
8418   unsigned int val3 ;
8419   int ecode3 = 0 ;
8420   unsigned int val4 ;
8421   int ecode4 = 0 ;
8422   Xapian::termpos result;
8423   VALUE vresult = Qnil;
8424 
8425   if ((argc < 3) || (argc > 3)) {
8426     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
8427   }
8428   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
8429   if (!SWIG_IsOK(res1)) {
8430     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document *","remove_postings", 1, self ));
8431   }
8432   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
8433   {
8434     std::string *ptr = (std::string *)0;
8435     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
8436     if (!SWIG_IsOK(res2)) {
8437       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","remove_postings", 2, argv[0] ));
8438     }
8439     if (!ptr) {
8440       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","remove_postings", 2, argv[0]));
8441     }
8442     arg2 = ptr;
8443   }
8444   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
8445   if (!SWIG_IsOK(ecode3)) {
8446     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termpos","remove_postings", 3, argv[1] ));
8447   }
8448   arg3 = static_cast< Xapian::termpos >(val3);
8449   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
8450   if (!SWIG_IsOK(ecode4)) {
8451     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termpos","remove_postings", 4, argv[2] ));
8452   }
8453   arg4 = static_cast< Xapian::termpos >(val4);
8454   {
8455     try {
8456       result = (Xapian::termpos)(arg1)->remove_postings((std::string const &)*arg2,arg3,arg4);
8457     } catch (...) {
8458       string msg;
8459       int code = XapianExceptionHandler(msg);
8460       SWIG_exception(code, msg.c_str());
8461     }
8462   }
8463   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
8464   if (SWIG_IsNewObj(res2)) delete arg2;
8465   return vresult;
8466 fail:
8467   if (SWIG_IsNewObj(res2)) delete arg2;
8468   return Qnil;
8469 }
8470 
8471 
_wrap_Document_remove_postings(int nargs,VALUE * args,VALUE self)8472 SWIGINTERN VALUE _wrap_Document_remove_postings(int nargs, VALUE *args, VALUE self) {
8473   int argc;
8474   VALUE argv[6];
8475   int ii;
8476 
8477   argc = nargs + 1;
8478   argv[0] = self;
8479   if (argc > 6) SWIG_fail;
8480   for (ii = 1; (ii < argc); ++ii) {
8481     argv[ii] = args[ii-1];
8482   }
8483   if (argc == 4) {
8484     int _v;
8485     void *vptr = 0;
8486     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Document, 0);
8487     _v = SWIG_CheckState(res);
8488     if (_v) {
8489       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
8490       _v = SWIG_CheckState(res);
8491       if (_v) {
8492         {
8493           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
8494           _v = SWIG_CheckState(res);
8495         }
8496         if (_v) {
8497           {
8498             int res = SWIG_AsVal_unsigned_SS_int(argv[3], NULL);
8499             _v = SWIG_CheckState(res);
8500           }
8501           if (_v) {
8502             return _wrap_Document_remove_postings__SWIG_1(nargs, args, self);
8503           }
8504         }
8505       }
8506     }
8507   }
8508   if (argc == 5) {
8509     int _v;
8510     void *vptr = 0;
8511     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Document, 0);
8512     _v = SWIG_CheckState(res);
8513     if (_v) {
8514       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
8515       _v = SWIG_CheckState(res);
8516       if (_v) {
8517         {
8518           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
8519           _v = SWIG_CheckState(res);
8520         }
8521         if (_v) {
8522           {
8523             int res = SWIG_AsVal_unsigned_SS_int(argv[3], NULL);
8524             _v = SWIG_CheckState(res);
8525           }
8526           if (_v) {
8527             {
8528               int res = SWIG_AsVal_unsigned_SS_int(argv[4], NULL);
8529               _v = SWIG_CheckState(res);
8530             }
8531             if (_v) {
8532               return _wrap_Document_remove_postings__SWIG_0(nargs, args, self);
8533             }
8534           }
8535         }
8536       }
8537     }
8538   }
8539 
8540 fail:
8541   Ruby_Format_OverloadedError( argc, 6, "Document.remove_postings",
8542     "    Xapian::termpos Document.remove_postings(std::string const &term, Xapian::termpos term_pos_first, Xapian::termpos term_pos_last, Xapian::termcount wdf_dec)\n"
8543     "    Xapian::termpos Document.remove_postings(std::string const &term, Xapian::termpos term_pos_first, Xapian::termpos term_pos_last)\n");
8544 
8545   return Qnil;
8546 }
8547 
8548 
8549 SWIGINTERN VALUE
_wrap_Document_remove_term(int argc,VALUE * argv,VALUE self)8550 _wrap_Document_remove_term(int argc, VALUE *argv, VALUE self) {
8551   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
8552   std::string *arg2 = 0 ;
8553   void *argp1 = 0 ;
8554   int res1 = 0 ;
8555   int res2 = SWIG_OLDOBJ ;
8556 
8557   if ((argc < 1) || (argc > 1)) {
8558     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
8559   }
8560   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
8561   if (!SWIG_IsOK(res1)) {
8562     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document *","remove_term", 1, self ));
8563   }
8564   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
8565   {
8566     std::string *ptr = (std::string *)0;
8567     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
8568     if (!SWIG_IsOK(res2)) {
8569       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","remove_term", 2, argv[0] ));
8570     }
8571     if (!ptr) {
8572       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","remove_term", 2, argv[0]));
8573     }
8574     arg2 = ptr;
8575   }
8576   {
8577     try {
8578       (arg1)->remove_term((std::string const &)*arg2);
8579     } catch (...) {
8580       string msg;
8581       int code = XapianExceptionHandler(msg);
8582       SWIG_exception(code, msg.c_str());
8583     }
8584   }
8585   if (SWIG_IsNewObj(res2)) delete arg2;
8586   return Qnil;
8587 fail:
8588   if (SWIG_IsNewObj(res2)) delete arg2;
8589   return Qnil;
8590 }
8591 
8592 
8593 SWIGINTERN VALUE
_wrap_Document_clear_terms(int argc,VALUE * argv,VALUE self)8594 _wrap_Document_clear_terms(int argc, VALUE *argv, VALUE self) {
8595   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
8596   void *argp1 = 0 ;
8597   int res1 = 0 ;
8598 
8599   if ((argc < 0) || (argc > 0)) {
8600     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
8601   }
8602   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
8603   if (!SWIG_IsOK(res1)) {
8604     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document *","clear_terms", 1, self ));
8605   }
8606   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
8607   {
8608     try {
8609       (arg1)->clear_terms();
8610     } catch (...) {
8611       string msg;
8612       int code = XapianExceptionHandler(msg);
8613       SWIG_exception(code, msg.c_str());
8614     }
8615   }
8616   return Qnil;
8617 fail:
8618   return Qnil;
8619 }
8620 
8621 
8622 SWIGINTERN VALUE
_wrap_Document_termlist_count(int argc,VALUE * argv,VALUE self)8623 _wrap_Document_termlist_count(int argc, VALUE *argv, VALUE self) {
8624   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
8625   void *argp1 = 0 ;
8626   int res1 = 0 ;
8627   Xapian::termcount result;
8628   VALUE vresult = Qnil;
8629 
8630   if ((argc < 0) || (argc > 0)) {
8631     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
8632   }
8633   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
8634   if (!SWIG_IsOK(res1)) {
8635     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document const *","termlist_count", 1, self ));
8636   }
8637   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
8638   {
8639     try {
8640       result = (Xapian::termcount)((Xapian::Document const *)arg1)->termlist_count();
8641     } catch (...) {
8642       string msg;
8643       int code = XapianExceptionHandler(msg);
8644       SWIG_exception(code, msg.c_str());
8645     }
8646   }
8647   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
8648   return vresult;
8649 fail:
8650   return Qnil;
8651 }
8652 
8653 
8654 SWIGINTERN VALUE
_wrap_Document__dangerous_termlist_begin(int argc,VALUE * argv,VALUE self)8655 _wrap_Document__dangerous_termlist_begin(int argc, VALUE *argv, VALUE self) {
8656   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
8657   void *argp1 = 0 ;
8658   int res1 = 0 ;
8659   Xapian::TermIterator result;
8660   VALUE vresult = Qnil;
8661 
8662   if ((argc < 0) || (argc > 0)) {
8663     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
8664   }
8665   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
8666   if (!SWIG_IsOK(res1)) {
8667     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document const *","termlist_begin", 1, self ));
8668   }
8669   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
8670   {
8671     try {
8672       result = ((Xapian::Document const *)arg1)->termlist_begin();
8673     } catch (...) {
8674       string msg;
8675       int code = XapianExceptionHandler(msg);
8676       SWIG_exception(code, msg.c_str());
8677     }
8678   }
8679   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
8680   return vresult;
8681 fail:
8682   return Qnil;
8683 }
8684 
8685 
8686 SWIGINTERN VALUE
_wrap_Document__dangerous_termlist_end(int argc,VALUE * argv,VALUE self)8687 _wrap_Document__dangerous_termlist_end(int argc, VALUE *argv, VALUE self) {
8688   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
8689   void *argp1 = 0 ;
8690   int res1 = 0 ;
8691   Xapian::TermIterator result;
8692   VALUE vresult = Qnil;
8693 
8694   if ((argc < 0) || (argc > 0)) {
8695     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
8696   }
8697   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
8698   if (!SWIG_IsOK(res1)) {
8699     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document const *","termlist_end", 1, self ));
8700   }
8701   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
8702   result = ((Xapian::Document const *)arg1)->termlist_end();
8703   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
8704   return vresult;
8705 fail:
8706   return Qnil;
8707 }
8708 
8709 
8710 SWIGINTERN VALUE
_wrap_Document_values_count(int argc,VALUE * argv,VALUE self)8711 _wrap_Document_values_count(int argc, VALUE *argv, VALUE self) {
8712   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
8713   void *argp1 = 0 ;
8714   int res1 = 0 ;
8715   Xapian::termcount result;
8716   VALUE vresult = Qnil;
8717 
8718   if ((argc < 0) || (argc > 0)) {
8719     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
8720   }
8721   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
8722   if (!SWIG_IsOK(res1)) {
8723     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document const *","values_count", 1, self ));
8724   }
8725   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
8726   {
8727     try {
8728       result = (Xapian::termcount)((Xapian::Document const *)arg1)->values_count();
8729     } catch (...) {
8730       string msg;
8731       int code = XapianExceptionHandler(msg);
8732       SWIG_exception(code, msg.c_str());
8733     }
8734   }
8735   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
8736   return vresult;
8737 fail:
8738   return Qnil;
8739 }
8740 
8741 
8742 SWIGINTERN VALUE
_wrap_Document__dangerous_values_begin(int argc,VALUE * argv,VALUE self)8743 _wrap_Document__dangerous_values_begin(int argc, VALUE *argv, VALUE self) {
8744   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
8745   void *argp1 = 0 ;
8746   int res1 = 0 ;
8747   Xapian::ValueIterator result;
8748   VALUE vresult = Qnil;
8749 
8750   if ((argc < 0) || (argc > 0)) {
8751     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
8752   }
8753   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
8754   if (!SWIG_IsOK(res1)) {
8755     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document const *","values_begin", 1, self ));
8756   }
8757   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
8758   {
8759     try {
8760       result = ((Xapian::Document const *)arg1)->values_begin();
8761     } catch (...) {
8762       string msg;
8763       int code = XapianExceptionHandler(msg);
8764       SWIG_exception(code, msg.c_str());
8765     }
8766   }
8767   vresult = SWIG_NewPointerObj((new Xapian::ValueIterator(static_cast< const Xapian::ValueIterator& >(result))), SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_OWN |  0 );
8768   return vresult;
8769 fail:
8770   return Qnil;
8771 }
8772 
8773 
8774 SWIGINTERN VALUE
_wrap_Document__dangerous_values_end(int argc,VALUE * argv,VALUE self)8775 _wrap_Document__dangerous_values_end(int argc, VALUE *argv, VALUE self) {
8776   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
8777   void *argp1 = 0 ;
8778   int res1 = 0 ;
8779   Xapian::ValueIterator result;
8780   VALUE vresult = Qnil;
8781 
8782   if ((argc < 0) || (argc > 0)) {
8783     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
8784   }
8785   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
8786   if (!SWIG_IsOK(res1)) {
8787     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document const *","values_end", 1, self ));
8788   }
8789   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
8790   result = ((Xapian::Document const *)arg1)->values_end();
8791   vresult = SWIG_NewPointerObj((new Xapian::ValueIterator(static_cast< const Xapian::ValueIterator& >(result))), SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_OWN |  0 );
8792   return vresult;
8793 fail:
8794   return Qnil;
8795 }
8796 
8797 
8798 SWIGINTERN VALUE
_wrap_Document_docid(int argc,VALUE * argv,VALUE self)8799 _wrap_Document_docid(int argc, VALUE *argv, VALUE self) {
8800   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
8801   void *argp1 = 0 ;
8802   int res1 = 0 ;
8803   Xapian::docid result;
8804   VALUE vresult = Qnil;
8805 
8806   if ((argc < 0) || (argc > 0)) {
8807     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
8808   }
8809   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
8810   if (!SWIG_IsOK(res1)) {
8811     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document const *","get_docid", 1, self ));
8812   }
8813   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
8814   {
8815     try {
8816       result = (Xapian::docid)((Xapian::Document const *)arg1)->get_docid();
8817     } catch (...) {
8818       string msg;
8819       int code = XapianExceptionHandler(msg);
8820       SWIG_exception(code, msg.c_str());
8821     }
8822   }
8823   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
8824   return vresult;
8825 fail:
8826   return Qnil;
8827 }
8828 
8829 
8830 SWIGINTERN VALUE
_wrap_Document_serialise(int argc,VALUE * argv,VALUE self)8831 _wrap_Document_serialise(int argc, VALUE *argv, VALUE self) {
8832   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
8833   void *argp1 = 0 ;
8834   int res1 = 0 ;
8835   std::string result;
8836   VALUE vresult = Qnil;
8837 
8838   if ((argc < 0) || (argc > 0)) {
8839     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
8840   }
8841   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
8842   if (!SWIG_IsOK(res1)) {
8843     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document const *","serialise", 1, self ));
8844   }
8845   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
8846   {
8847     try {
8848       result = ((Xapian::Document const *)arg1)->serialise();
8849     } catch (...) {
8850       string msg;
8851       int code = XapianExceptionHandler(msg);
8852       SWIG_exception(code, msg.c_str());
8853     }
8854   }
8855   vresult = SWIG_From_std_string(static_cast< std::string >(result));
8856   return vresult;
8857 fail:
8858   return Qnil;
8859 }
8860 
8861 
8862 SWIGINTERN VALUE
_wrap_Document_unserialise(int argc,VALUE * argv,VALUE self)8863 _wrap_Document_unserialise(int argc, VALUE *argv, VALUE self) {
8864   std::string *arg1 = 0 ;
8865   int res1 = SWIG_OLDOBJ ;
8866   Xapian::Document result;
8867   VALUE vresult = Qnil;
8868 
8869   if ((argc < 1) || (argc > 1)) {
8870     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
8871   }
8872   {
8873     std::string *ptr = (std::string *)0;
8874     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
8875     if (!SWIG_IsOK(res1)) {
8876       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Document::unserialise", 1, argv[0] ));
8877     }
8878     if (!ptr) {
8879       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Document::unserialise", 1, argv[0]));
8880     }
8881     arg1 = ptr;
8882   }
8883   {
8884     try {
8885       result = Xapian::Document::unserialise((std::string const &)*arg1);
8886     } catch (...) {
8887       string msg;
8888       int code = XapianExceptionHandler(msg);
8889       SWIG_exception(code, msg.c_str());
8890     }
8891   }
8892   vresult = SWIG_NewPointerObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_OWN |  0 );
8893   if (SWIG_IsNewObj(res1)) delete arg1;
8894   return vresult;
8895 fail:
8896   if (SWIG_IsNewObj(res1)) delete arg1;
8897   return Qnil;
8898 }
8899 
8900 
8901 SWIGINTERN VALUE
_wrap_Document_description(int argc,VALUE * argv,VALUE self)8902 _wrap_Document_description(int argc, VALUE *argv, VALUE self) {
8903   Xapian::Document *arg1 = (Xapian::Document *) 0 ;
8904   void *argp1 = 0 ;
8905   int res1 = 0 ;
8906   std::string result;
8907   VALUE vresult = Qnil;
8908 
8909   if ((argc < 0) || (argc > 0)) {
8910     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
8911   }
8912   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
8913   if (!SWIG_IsOK(res1)) {
8914     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Document const *","get_description", 1, self ));
8915   }
8916   arg1 = reinterpret_cast< Xapian::Document * >(argp1);
8917   {
8918     try {
8919       result = ((Xapian::Document const *)arg1)->get_description();
8920     } catch (...) {
8921       string msg;
8922       int code = XapianExceptionHandler(msg);
8923       SWIG_exception(code, msg.c_str());
8924     }
8925   }
8926   vresult = SWIG_From_std_string(static_cast< std::string >(result));
8927   return vresult;
8928 fail:
8929   return Qnil;
8930 }
8931 
8932 
8933 static swig_class SwigClassRegistry;
8934 
8935 SWIGINTERN VALUE
8936 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_Registry_allocate(VALUE self)8937 _wrap_Registry_allocate(VALUE self)
8938 #else
8939 _wrap_Registry_allocate(int argc, VALUE *argv, VALUE self)
8940 #endif
8941 {
8942   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__Registry);
8943 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
8944   rb_obj_call_init(vresult, argc, argv);
8945 #endif
8946   return vresult;
8947 }
8948 
8949 
8950 SWIGINTERN VALUE
_wrap_new_Registry(int argc,VALUE * argv,VALUE self)8951 _wrap_new_Registry(int argc, VALUE *argv, VALUE self) {
8952   const char *classname SWIGUNUSED = "Xapian::Registry";
8953   Xapian::Registry *result = 0 ;
8954 
8955   if ((argc < 0) || (argc > 0)) {
8956     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
8957   }
8958   {
8959     try {
8960       result = (Xapian::Registry *)new Xapian::Registry();
8961       DATA_PTR(self) = result;
8962     } catch (...) {
8963       string msg;
8964       int code = XapianExceptionHandler(msg);
8965       SWIG_exception(code, msg.c_str());
8966     }
8967   }
8968   return self;
8969 fail:
8970   return Qnil;
8971 }
8972 
8973 
8974 SWIGINTERN void
free_Xapian_Registry(void * self)8975 free_Xapian_Registry(void *self) {
8976     Xapian::Registry *arg1 = (Xapian::Registry *)self;
8977     delete arg1;
8978 }
8979 
8980 SWIGINTERN VALUE
_wrap_Registry_register_weighting_scheme(int argc,VALUE * argv,VALUE self)8981 _wrap_Registry_register_weighting_scheme(int argc, VALUE *argv, VALUE self) {
8982   Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
8983   Xapian::Weight *arg2 = 0 ;
8984   void *argp1 = 0 ;
8985   int res1 = 0 ;
8986   void *argp2 ;
8987   int res2 = 0 ;
8988 
8989   if ((argc < 1) || (argc > 1)) {
8990     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
8991   }
8992   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Registry, 0 |  0 );
8993   if (!SWIG_IsOK(res1)) {
8994     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Registry *","register_weighting_scheme", 1, self ));
8995   }
8996   arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
8997   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Weight,  0 );
8998   if (!SWIG_IsOK(res2)) {
8999     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Weight const &","register_weighting_scheme", 2, argv[0] ));
9000   }
9001   if (!argp2) {
9002     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Weight const &","register_weighting_scheme", 2, argv[0]));
9003   }
9004   arg2 = reinterpret_cast< Xapian::Weight * >(argp2);
9005   {
9006     try {
9007       (arg1)->register_weighting_scheme((Xapian::Weight const &)*arg2);
9008     } catch (...) {
9009       string msg;
9010       int code = XapianExceptionHandler(msg);
9011       SWIG_exception(code, msg.c_str());
9012     }
9013   }
9014   return Qnil;
9015 fail:
9016   return Qnil;
9017 }
9018 
9019 
9020 SWIGINTERN VALUE
_wrap_Registry_get_weighting_scheme(int argc,VALUE * argv,VALUE self)9021 _wrap_Registry_get_weighting_scheme(int argc, VALUE *argv, VALUE self) {
9022   Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
9023   std::string *arg2 = 0 ;
9024   void *argp1 = 0 ;
9025   int res1 = 0 ;
9026   int res2 = SWIG_OLDOBJ ;
9027   Xapian::Weight *result = 0 ;
9028   VALUE vresult = Qnil;
9029 
9030   if ((argc < 1) || (argc > 1)) {
9031     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
9032   }
9033   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Registry, 0 |  0 );
9034   if (!SWIG_IsOK(res1)) {
9035     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Registry const *","get_weighting_scheme", 1, self ));
9036   }
9037   arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
9038   {
9039     std::string *ptr = (std::string *)0;
9040     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
9041     if (!SWIG_IsOK(res2)) {
9042       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","get_weighting_scheme", 2, argv[0] ));
9043     }
9044     if (!ptr) {
9045       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","get_weighting_scheme", 2, argv[0]));
9046     }
9047     arg2 = ptr;
9048   }
9049   {
9050     try {
9051       result = (Xapian::Weight *)((Xapian::Registry const *)arg1)->get_weighting_scheme((std::string const &)*arg2);
9052     } catch (...) {
9053       string msg;
9054       int code = XapianExceptionHandler(msg);
9055       SWIG_exception(code, msg.c_str());
9056     }
9057   }
9058   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Weight, 0 |  0 );
9059   if (SWIG_IsNewObj(res2)) delete arg2;
9060   return vresult;
9061 fail:
9062   if (SWIG_IsNewObj(res2)) delete arg2;
9063   return Qnil;
9064 }
9065 
9066 
9067 SWIGINTERN VALUE
_wrap_Registry_register_posting_source(int argc,VALUE * argv,VALUE self)9068 _wrap_Registry_register_posting_source(int argc, VALUE *argv, VALUE self) {
9069   Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
9070   Xapian::PostingSource *arg2 = 0 ;
9071   void *argp1 = 0 ;
9072   int res1 = 0 ;
9073   void *argp2 ;
9074   int res2 = 0 ;
9075 
9076   if ((argc < 1) || (argc > 1)) {
9077     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
9078   }
9079   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Registry, 0 |  0 );
9080   if (!SWIG_IsOK(res1)) {
9081     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Registry *","register_posting_source", 1, self ));
9082   }
9083   arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
9084   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__PostingSource,  0 );
9085   if (!SWIG_IsOK(res2)) {
9086     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::PostingSource const &","register_posting_source", 2, argv[0] ));
9087   }
9088   if (!argp2) {
9089     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::PostingSource const &","register_posting_source", 2, argv[0]));
9090   }
9091   arg2 = reinterpret_cast< Xapian::PostingSource * >(argp2);
9092   {
9093     try {
9094       (arg1)->register_posting_source((Xapian::PostingSource const &)*arg2);
9095     } catch (...) {
9096       string msg;
9097       int code = XapianExceptionHandler(msg);
9098       SWIG_exception(code, msg.c_str());
9099     }
9100   }
9101   return Qnil;
9102 fail:
9103   return Qnil;
9104 }
9105 
9106 
9107 SWIGINTERN VALUE
_wrap_Registry_get_posting_source(int argc,VALUE * argv,VALUE self)9108 _wrap_Registry_get_posting_source(int argc, VALUE *argv, VALUE self) {
9109   Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
9110   std::string *arg2 = 0 ;
9111   void *argp1 = 0 ;
9112   int res1 = 0 ;
9113   int res2 = SWIG_OLDOBJ ;
9114   Xapian::PostingSource *result = 0 ;
9115   VALUE vresult = Qnil;
9116 
9117   if ((argc < 1) || (argc > 1)) {
9118     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
9119   }
9120   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Registry, 0 |  0 );
9121   if (!SWIG_IsOK(res1)) {
9122     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Registry const *","get_posting_source", 1, self ));
9123   }
9124   arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
9125   {
9126     std::string *ptr = (std::string *)0;
9127     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
9128     if (!SWIG_IsOK(res2)) {
9129       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","get_posting_source", 2, argv[0] ));
9130     }
9131     if (!ptr) {
9132       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","get_posting_source", 2, argv[0]));
9133     }
9134     arg2 = ptr;
9135   }
9136   {
9137     try {
9138       result = (Xapian::PostingSource *)((Xapian::Registry const *)arg1)->get_posting_source((std::string const &)*arg2);
9139     } catch (...) {
9140       string msg;
9141       int code = XapianExceptionHandler(msg);
9142       SWIG_exception(code, msg.c_str());
9143     }
9144   }
9145   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
9146   if (SWIG_IsNewObj(res2)) delete arg2;
9147   return vresult;
9148 fail:
9149   if (SWIG_IsNewObj(res2)) delete arg2;
9150   return Qnil;
9151 }
9152 
9153 
9154 SWIGINTERN VALUE
_wrap_Registry_register_match_spy(int argc,VALUE * argv,VALUE self)9155 _wrap_Registry_register_match_spy(int argc, VALUE *argv, VALUE self) {
9156   Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
9157   Xapian::MatchSpy *arg2 = 0 ;
9158   void *argp1 = 0 ;
9159   int res1 = 0 ;
9160   void *argp2 ;
9161   int res2 = 0 ;
9162 
9163   if ((argc < 1) || (argc > 1)) {
9164     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
9165   }
9166   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Registry, 0 |  0 );
9167   if (!SWIG_IsOK(res1)) {
9168     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Registry *","register_match_spy", 1, self ));
9169   }
9170   arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
9171   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__MatchSpy,  0 );
9172   if (!SWIG_IsOK(res2)) {
9173     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::MatchSpy const &","register_match_spy", 2, argv[0] ));
9174   }
9175   if (!argp2) {
9176     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MatchSpy const &","register_match_spy", 2, argv[0]));
9177   }
9178   arg2 = reinterpret_cast< Xapian::MatchSpy * >(argp2);
9179   {
9180     try {
9181       (arg1)->register_match_spy((Xapian::MatchSpy const &)*arg2);
9182     } catch (...) {
9183       string msg;
9184       int code = XapianExceptionHandler(msg);
9185       SWIG_exception(code, msg.c_str());
9186     }
9187   }
9188   return Qnil;
9189 fail:
9190   return Qnil;
9191 }
9192 
9193 
9194 SWIGINTERN VALUE
_wrap_Registry_get_match_spy(int argc,VALUE * argv,VALUE self)9195 _wrap_Registry_get_match_spy(int argc, VALUE *argv, VALUE self) {
9196   Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
9197   std::string *arg2 = 0 ;
9198   void *argp1 = 0 ;
9199   int res1 = 0 ;
9200   int res2 = SWIG_OLDOBJ ;
9201   Xapian::MatchSpy *result = 0 ;
9202   VALUE vresult = Qnil;
9203 
9204   if ((argc < 1) || (argc > 1)) {
9205     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
9206   }
9207   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Registry, 0 |  0 );
9208   if (!SWIG_IsOK(res1)) {
9209     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Registry const *","get_match_spy", 1, self ));
9210   }
9211   arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
9212   {
9213     std::string *ptr = (std::string *)0;
9214     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
9215     if (!SWIG_IsOK(res2)) {
9216       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","get_match_spy", 2, argv[0] ));
9217     }
9218     if (!ptr) {
9219       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","get_match_spy", 2, argv[0]));
9220     }
9221     arg2 = ptr;
9222   }
9223   {
9224     try {
9225       result = (Xapian::MatchSpy *)((Xapian::Registry const *)arg1)->get_match_spy((std::string const &)*arg2);
9226     } catch (...) {
9227       string msg;
9228       int code = XapianExceptionHandler(msg);
9229       SWIG_exception(code, msg.c_str());
9230     }
9231   }
9232   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
9233   if (SWIG_IsNewObj(res2)) delete arg2;
9234   return vresult;
9235 fail:
9236   if (SWIG_IsNewObj(res2)) delete arg2;
9237   return Qnil;
9238 }
9239 
9240 
9241 SWIGINTERN VALUE
_wrap_Registry_register_lat_long_metric(int argc,VALUE * argv,VALUE self)9242 _wrap_Registry_register_lat_long_metric(int argc, VALUE *argv, VALUE self) {
9243   Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
9244   Xapian::LatLongMetric *arg2 = 0 ;
9245   void *argp1 = 0 ;
9246   int res1 = 0 ;
9247   void *argp2 ;
9248   int res2 = 0 ;
9249 
9250   if ((argc < 1) || (argc > 1)) {
9251     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
9252   }
9253   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Registry, 0 |  0 );
9254   if (!SWIG_IsOK(res1)) {
9255     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Registry *","register_lat_long_metric", 1, self ));
9256   }
9257   arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
9258   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__LatLongMetric,  0 );
9259   if (!SWIG_IsOK(res2)) {
9260     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongMetric const &","register_lat_long_metric", 2, argv[0] ));
9261   }
9262   if (!argp2) {
9263     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongMetric const &","register_lat_long_metric", 2, argv[0]));
9264   }
9265   arg2 = reinterpret_cast< Xapian::LatLongMetric * >(argp2);
9266   {
9267     try {
9268       (arg1)->register_lat_long_metric((Xapian::LatLongMetric const &)*arg2);
9269     } catch (...) {
9270       string msg;
9271       int code = XapianExceptionHandler(msg);
9272       SWIG_exception(code, msg.c_str());
9273     }
9274   }
9275   return Qnil;
9276 fail:
9277   return Qnil;
9278 }
9279 
9280 
9281 SWIGINTERN VALUE
_wrap_Registry_get_lat_long_metric(int argc,VALUE * argv,VALUE self)9282 _wrap_Registry_get_lat_long_metric(int argc, VALUE *argv, VALUE self) {
9283   Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
9284   std::string *arg2 = 0 ;
9285   void *argp1 = 0 ;
9286   int res1 = 0 ;
9287   int res2 = SWIG_OLDOBJ ;
9288   Xapian::LatLongMetric *result = 0 ;
9289   VALUE vresult = Qnil;
9290 
9291   if ((argc < 1) || (argc > 1)) {
9292     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
9293   }
9294   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Registry, 0 |  0 );
9295   if (!SWIG_IsOK(res1)) {
9296     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Registry const *","get_lat_long_metric", 1, self ));
9297   }
9298   arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
9299   {
9300     std::string *ptr = (std::string *)0;
9301     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
9302     if (!SWIG_IsOK(res2)) {
9303       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","get_lat_long_metric", 2, argv[0] ));
9304     }
9305     if (!ptr) {
9306       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","get_lat_long_metric", 2, argv[0]));
9307     }
9308     arg2 = ptr;
9309   }
9310   {
9311     try {
9312       result = (Xapian::LatLongMetric *)((Xapian::Registry const *)arg1)->get_lat_long_metric((std::string const &)*arg2);
9313     } catch (...) {
9314       string msg;
9315       int code = XapianExceptionHandler(msg);
9316       SWIG_exception(code, msg.c_str());
9317     }
9318   }
9319   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LatLongMetric, 0 |  0 );
9320   if (SWIG_IsNewObj(res2)) delete arg2;
9321   return vresult;
9322 fail:
9323   if (SWIG_IsNewObj(res2)) delete arg2;
9324   return Qnil;
9325 }
9326 
9327 
9328 static swig_class SwigClassQuery;
9329 
9330 SWIGINTERN VALUE
_wrap_new_Query__SWIG_0(int argc,VALUE * argv,VALUE self)9331 _wrap_new_Query__SWIG_0(int argc, VALUE *argv, VALUE self) {
9332   const char *classname SWIGUNUSED = "Xapian::Query";
9333   Xapian::Query *result = 0 ;
9334 
9335   if ((argc < 0) || (argc > 0)) {
9336     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
9337   }
9338   result = (Xapian::Query *)new Xapian::Query();
9339   DATA_PTR(self) = result;
9340   return self;
9341 fail:
9342   return Qnil;
9343 }
9344 
9345 
9346 SWIGINTERN void
free_Xapian_Query(void * self)9347 free_Xapian_Query(void *self) {
9348     Xapian::Query *arg1 = (Xapian::Query *)self;
9349     delete arg1;
9350 }
9351 
9352 SWIGINTERN VALUE
_wrap_new_Query__SWIG_1(int argc,VALUE * argv,VALUE self)9353 _wrap_new_Query__SWIG_1(int argc, VALUE *argv, VALUE self) {
9354   std::string *arg1 = 0 ;
9355   Xapian::termcount arg2 ;
9356   Xapian::termpos arg3 ;
9357   int res1 = SWIG_OLDOBJ ;
9358   unsigned int val2 ;
9359   int ecode2 = 0 ;
9360   unsigned int val3 ;
9361   int ecode3 = 0 ;
9362   const char *classname SWIGUNUSED = "Xapian::Query";
9363   Xapian::Query *result = 0 ;
9364 
9365   if ((argc < 3) || (argc > 3)) {
9366     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
9367   }
9368   {
9369     std::string *ptr = (std::string *)0;
9370     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
9371     if (!SWIG_IsOK(res1)) {
9372       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Query", 1, argv[0] ));
9373     }
9374     if (!ptr) {
9375       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Query", 1, argv[0]));
9376     }
9377     arg1 = ptr;
9378   }
9379   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
9380   if (!SWIG_IsOK(ecode2)) {
9381     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","Query", 2, argv[1] ));
9382   }
9383   arg2 = static_cast< Xapian::termcount >(val2);
9384   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
9385   if (!SWIG_IsOK(ecode3)) {
9386     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termpos","Query", 3, argv[2] ));
9387   }
9388   arg3 = static_cast< Xapian::termpos >(val3);
9389   {
9390     try {
9391       result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1,arg2,arg3);
9392       DATA_PTR(self) = result;
9393     } catch (...) {
9394       string msg;
9395       int code = XapianExceptionHandler(msg);
9396       SWIG_exception(code, msg.c_str());
9397     }
9398   }
9399   if (SWIG_IsNewObj(res1)) delete arg1;
9400   return self;
9401 fail:
9402   if (SWIG_IsNewObj(res1)) delete arg1;
9403   return Qnil;
9404 }
9405 
9406 
9407 SWIGINTERN VALUE
_wrap_new_Query__SWIG_2(int argc,VALUE * argv,VALUE self)9408 _wrap_new_Query__SWIG_2(int argc, VALUE *argv, VALUE self) {
9409   std::string *arg1 = 0 ;
9410   Xapian::termcount arg2 ;
9411   int res1 = SWIG_OLDOBJ ;
9412   unsigned int val2 ;
9413   int ecode2 = 0 ;
9414   const char *classname SWIGUNUSED = "Xapian::Query";
9415   Xapian::Query *result = 0 ;
9416 
9417   if ((argc < 2) || (argc > 2)) {
9418     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
9419   }
9420   {
9421     std::string *ptr = (std::string *)0;
9422     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
9423     if (!SWIG_IsOK(res1)) {
9424       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Query", 1, argv[0] ));
9425     }
9426     if (!ptr) {
9427       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Query", 1, argv[0]));
9428     }
9429     arg1 = ptr;
9430   }
9431   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
9432   if (!SWIG_IsOK(ecode2)) {
9433     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","Query", 2, argv[1] ));
9434   }
9435   arg2 = static_cast< Xapian::termcount >(val2);
9436   {
9437     try {
9438       result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1,arg2);
9439       DATA_PTR(self) = result;
9440     } catch (...) {
9441       string msg;
9442       int code = XapianExceptionHandler(msg);
9443       SWIG_exception(code, msg.c_str());
9444     }
9445   }
9446   if (SWIG_IsNewObj(res1)) delete arg1;
9447   return self;
9448 fail:
9449   if (SWIG_IsNewObj(res1)) delete arg1;
9450   return Qnil;
9451 }
9452 
9453 
9454 SWIGINTERN VALUE
_wrap_new_Query__SWIG_3(int argc,VALUE * argv,VALUE self)9455 _wrap_new_Query__SWIG_3(int argc, VALUE *argv, VALUE self) {
9456   std::string *arg1 = 0 ;
9457   int res1 = SWIG_OLDOBJ ;
9458   const char *classname SWIGUNUSED = "Xapian::Query";
9459   Xapian::Query *result = 0 ;
9460 
9461   if ((argc < 1) || (argc > 1)) {
9462     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
9463   }
9464   {
9465     std::string *ptr = (std::string *)0;
9466     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
9467     if (!SWIG_IsOK(res1)) {
9468       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Query", 1, argv[0] ));
9469     }
9470     if (!ptr) {
9471       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Query", 1, argv[0]));
9472     }
9473     arg1 = ptr;
9474   }
9475   {
9476     try {
9477       result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1);
9478       DATA_PTR(self) = result;
9479     } catch (...) {
9480       string msg;
9481       int code = XapianExceptionHandler(msg);
9482       SWIG_exception(code, msg.c_str());
9483     }
9484   }
9485   if (SWIG_IsNewObj(res1)) delete arg1;
9486   return self;
9487 fail:
9488   if (SWIG_IsNewObj(res1)) delete arg1;
9489   return Qnil;
9490 }
9491 
9492 
9493 SWIGINTERN VALUE
_wrap_new_Query__SWIG_4(int argc,VALUE * argv,VALUE self)9494 _wrap_new_Query__SWIG_4(int argc, VALUE *argv, VALUE self) {
9495   Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
9496   void *argp1 = 0 ;
9497   int res1 = 0 ;
9498   const char *classname SWIGUNUSED = "Xapian::Query";
9499   Xapian::Query *result = 0 ;
9500 
9501   if ((argc < 1) || (argc > 1)) {
9502     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
9503   }
9504   res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
9505   if (!SWIG_IsOK(res1)) {
9506     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingSource *","Query", 1, argv[0] ));
9507   }
9508   arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
9509   {
9510     try {
9511       result = (Xapian::Query *)new Xapian::Query(arg1);
9512       DATA_PTR(self) = result;
9513     } catch (...) {
9514       string msg;
9515       int code = XapianExceptionHandler(msg);
9516       SWIG_exception(code, msg.c_str());
9517     }
9518   }
9519   return self;
9520 fail:
9521   return Qnil;
9522 }
9523 
9524 
9525 SWIGINTERN VALUE
_wrap_new_Query__SWIG_5(int argc,VALUE * argv,VALUE self)9526 _wrap_new_Query__SWIG_5(int argc, VALUE *argv, VALUE self) {
9527   double arg1 ;
9528   Xapian::Query *arg2 = 0 ;
9529   double val1 ;
9530   int ecode1 = 0 ;
9531   void *argp2 ;
9532   int res2 = 0 ;
9533   const char *classname SWIGUNUSED = "Xapian::Query";
9534   Xapian::Query *result = 0 ;
9535 
9536   if ((argc < 2) || (argc > 2)) {
9537     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
9538   }
9539   ecode1 = SWIG_AsVal_double(argv[0], &val1);
9540   if (!SWIG_IsOK(ecode1)) {
9541     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Query", 1, argv[0] ));
9542   }
9543   arg1 = static_cast< double >(val1);
9544   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__Query,  0 );
9545   if (!SWIG_IsOK(res2)) {
9546     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Query const &","Query", 2, argv[1] ));
9547   }
9548   if (!argp2) {
9549     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Query const &","Query", 2, argv[1]));
9550   }
9551   arg2 = reinterpret_cast< Xapian::Query * >(argp2);
9552   {
9553     try {
9554       result = (Xapian::Query *)new Xapian::Query(arg1,(Xapian::Query const &)*arg2);
9555       DATA_PTR(self) = result;
9556     } catch (...) {
9557       string msg;
9558       int code = XapianExceptionHandler(msg);
9559       SWIG_exception(code, msg.c_str());
9560     }
9561   }
9562   return self;
9563 fail:
9564   return Qnil;
9565 }
9566 
9567 
9568 SWIGINTERN VALUE
_wrap_new_Query__SWIG_6(int argc,VALUE * argv,VALUE self)9569 _wrap_new_Query__SWIG_6(int argc, VALUE *argv, VALUE self) {
9570   Xapian::Query::op arg1 ;
9571   Xapian::Query *arg2 = 0 ;
9572   double arg3 ;
9573   int val1 ;
9574   int ecode1 = 0 ;
9575   void *argp2 ;
9576   int res2 = 0 ;
9577   double val3 ;
9578   int ecode3 = 0 ;
9579   const char *classname SWIGUNUSED = "Xapian::Query";
9580   Xapian::Query *result = 0 ;
9581 
9582   if ((argc < 3) || (argc > 3)) {
9583     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
9584   }
9585   ecode1 = SWIG_AsVal_int(argv[0], &val1);
9586   if (!SWIG_IsOK(ecode1)) {
9587     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::Query::op","Query", 1, argv[0] ));
9588   }
9589   arg1 = static_cast< Xapian::Query::op >(val1);
9590   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__Query,  0 );
9591   if (!SWIG_IsOK(res2)) {
9592     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Query const &","Query", 2, argv[1] ));
9593   }
9594   if (!argp2) {
9595     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Query const &","Query", 2, argv[1]));
9596   }
9597   arg2 = reinterpret_cast< Xapian::Query * >(argp2);
9598   ecode3 = SWIG_AsVal_double(argv[2], &val3);
9599   if (!SWIG_IsOK(ecode3)) {
9600     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Query", 3, argv[2] ));
9601   }
9602   arg3 = static_cast< double >(val3);
9603   {
9604     try {
9605       result = (Xapian::Query *)new Xapian::Query(arg1,(Xapian::Query const &)*arg2,arg3);
9606       DATA_PTR(self) = result;
9607     } catch (...) {
9608       string msg;
9609       int code = XapianExceptionHandler(msg);
9610       SWIG_exception(code, msg.c_str());
9611     }
9612   }
9613   return self;
9614 fail:
9615   return Qnil;
9616 }
9617 
9618 
9619 SWIGINTERN VALUE
_wrap_new_Query__SWIG_7(int argc,VALUE * argv,VALUE self)9620 _wrap_new_Query__SWIG_7(int argc, VALUE *argv, VALUE self) {
9621   Xapian::Query::op arg1 ;
9622   Xapian::Query *arg2 = 0 ;
9623   Xapian::Query *arg3 = 0 ;
9624   int val1 ;
9625   int ecode1 = 0 ;
9626   void *argp2 ;
9627   int res2 = 0 ;
9628   void *argp3 ;
9629   int res3 = 0 ;
9630   const char *classname SWIGUNUSED = "Xapian::Query";
9631   Xapian::Query *result = 0 ;
9632 
9633   if ((argc < 3) || (argc > 3)) {
9634     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
9635   }
9636   ecode1 = SWIG_AsVal_int(argv[0], &val1);
9637   if (!SWIG_IsOK(ecode1)) {
9638     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::Query::op","Query", 1, argv[0] ));
9639   }
9640   arg1 = static_cast< Xapian::Query::op >(val1);
9641   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__Query,  0 );
9642   if (!SWIG_IsOK(res2)) {
9643     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Query const &","Query", 2, argv[1] ));
9644   }
9645   if (!argp2) {
9646     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Query const &","Query", 2, argv[1]));
9647   }
9648   arg2 = reinterpret_cast< Xapian::Query * >(argp2);
9649   res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_Xapian__Query,  0 );
9650   if (!SWIG_IsOK(res3)) {
9651     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::Query const &","Query", 3, argv[2] ));
9652   }
9653   if (!argp3) {
9654     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Query const &","Query", 3, argv[2]));
9655   }
9656   arg3 = reinterpret_cast< Xapian::Query * >(argp3);
9657   {
9658     try {
9659       result = (Xapian::Query *)new Xapian::Query(arg1,(Xapian::Query const &)*arg2,(Xapian::Query const &)*arg3);
9660       DATA_PTR(self) = result;
9661     } catch (...) {
9662       string msg;
9663       int code = XapianExceptionHandler(msg);
9664       SWIG_exception(code, msg.c_str());
9665     }
9666   }
9667   return self;
9668 fail:
9669   return Qnil;
9670 }
9671 
9672 
9673 SWIGINTERN VALUE
_wrap_new_Query__SWIG_8(int argc,VALUE * argv,VALUE self)9674 _wrap_new_Query__SWIG_8(int argc, VALUE *argv, VALUE self) {
9675   Xapian::Query::op arg1 ;
9676   std::string *arg2 = 0 ;
9677   std::string *arg3 = 0 ;
9678   int val1 ;
9679   int ecode1 = 0 ;
9680   int res2 = SWIG_OLDOBJ ;
9681   int res3 = SWIG_OLDOBJ ;
9682   const char *classname SWIGUNUSED = "Xapian::Query";
9683   Xapian::Query *result = 0 ;
9684 
9685   if ((argc < 3) || (argc > 3)) {
9686     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
9687   }
9688   ecode1 = SWIG_AsVal_int(argv[0], &val1);
9689   if (!SWIG_IsOK(ecode1)) {
9690     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::Query::op","Query", 1, argv[0] ));
9691   }
9692   arg1 = static_cast< Xapian::Query::op >(val1);
9693   {
9694     std::string *ptr = (std::string *)0;
9695     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
9696     if (!SWIG_IsOK(res2)) {
9697       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","Query", 2, argv[1] ));
9698     }
9699     if (!ptr) {
9700       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Query", 2, argv[1]));
9701     }
9702     arg2 = ptr;
9703   }
9704   {
9705     std::string *ptr = (std::string *)0;
9706     res3 = SWIG_AsPtr_std_string(argv[2], &ptr);
9707     if (!SWIG_IsOK(res3)) {
9708       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","Query", 3, argv[2] ));
9709     }
9710     if (!ptr) {
9711       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Query", 3, argv[2]));
9712     }
9713     arg3 = ptr;
9714   }
9715   {
9716     try {
9717       result = (Xapian::Query *)new Xapian::Query(arg1,(std::string const &)*arg2,(std::string const &)*arg3);
9718       DATA_PTR(self) = result;
9719     } catch (...) {
9720       string msg;
9721       int code = XapianExceptionHandler(msg);
9722       SWIG_exception(code, msg.c_str());
9723     }
9724   }
9725   if (SWIG_IsNewObj(res2)) delete arg2;
9726   if (SWIG_IsNewObj(res3)) delete arg3;
9727   return self;
9728 fail:
9729   if (SWIG_IsNewObj(res2)) delete arg2;
9730   if (SWIG_IsNewObj(res3)) delete arg3;
9731   return Qnil;
9732 }
9733 
9734 
9735 SWIGINTERN VALUE
_wrap_new_Query__SWIG_9(int argc,VALUE * argv,VALUE self)9736 _wrap_new_Query__SWIG_9(int argc, VALUE *argv, VALUE self) {
9737   Xapian::Query::op arg1 ;
9738   Xapian::valueno arg2 ;
9739   std::string *arg3 = 0 ;
9740   int val1 ;
9741   int ecode1 = 0 ;
9742   unsigned int val2 ;
9743   int ecode2 = 0 ;
9744   int res3 = SWIG_OLDOBJ ;
9745   const char *classname SWIGUNUSED = "Xapian::Query";
9746   Xapian::Query *result = 0 ;
9747 
9748   if ((argc < 3) || (argc > 3)) {
9749     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
9750   }
9751   ecode1 = SWIG_AsVal_int(argv[0], &val1);
9752   if (!SWIG_IsOK(ecode1)) {
9753     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::Query::op","Query", 1, argv[0] ));
9754   }
9755   arg1 = static_cast< Xapian::Query::op >(val1);
9756   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
9757   if (!SWIG_IsOK(ecode2)) {
9758     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","Query", 2, argv[1] ));
9759   }
9760   arg2 = static_cast< Xapian::valueno >(val2);
9761   {
9762     std::string *ptr = (std::string *)0;
9763     res3 = SWIG_AsPtr_std_string(argv[2], &ptr);
9764     if (!SWIG_IsOK(res3)) {
9765       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","Query", 3, argv[2] ));
9766     }
9767     if (!ptr) {
9768       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Query", 3, argv[2]));
9769     }
9770     arg3 = ptr;
9771   }
9772   {
9773     try {
9774       result = (Xapian::Query *)new Xapian::Query(arg1,arg2,(std::string const &)*arg3);
9775       DATA_PTR(self) = result;
9776     } catch (...) {
9777       string msg;
9778       int code = XapianExceptionHandler(msg);
9779       SWIG_exception(code, msg.c_str());
9780     }
9781   }
9782   if (SWIG_IsNewObj(res3)) delete arg3;
9783   return self;
9784 fail:
9785   if (SWIG_IsNewObj(res3)) delete arg3;
9786   return Qnil;
9787 }
9788 
9789 
9790 SWIGINTERN VALUE
_wrap_new_Query__SWIG_10(int argc,VALUE * argv,VALUE self)9791 _wrap_new_Query__SWIG_10(int argc, VALUE *argv, VALUE self) {
9792   Xapian::Query::op arg1 ;
9793   Xapian::valueno arg2 ;
9794   std::string *arg3 = 0 ;
9795   std::string *arg4 = 0 ;
9796   int val1 ;
9797   int ecode1 = 0 ;
9798   unsigned int val2 ;
9799   int ecode2 = 0 ;
9800   int res3 = SWIG_OLDOBJ ;
9801   int res4 = SWIG_OLDOBJ ;
9802   const char *classname SWIGUNUSED = "Xapian::Query";
9803   Xapian::Query *result = 0 ;
9804 
9805   if ((argc < 4) || (argc > 4)) {
9806     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
9807   }
9808   ecode1 = SWIG_AsVal_int(argv[0], &val1);
9809   if (!SWIG_IsOK(ecode1)) {
9810     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::Query::op","Query", 1, argv[0] ));
9811   }
9812   arg1 = static_cast< Xapian::Query::op >(val1);
9813   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
9814   if (!SWIG_IsOK(ecode2)) {
9815     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","Query", 2, argv[1] ));
9816   }
9817   arg2 = static_cast< Xapian::valueno >(val2);
9818   {
9819     std::string *ptr = (std::string *)0;
9820     res3 = SWIG_AsPtr_std_string(argv[2], &ptr);
9821     if (!SWIG_IsOK(res3)) {
9822       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","Query", 3, argv[2] ));
9823     }
9824     if (!ptr) {
9825       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Query", 3, argv[2]));
9826     }
9827     arg3 = ptr;
9828   }
9829   {
9830     std::string *ptr = (std::string *)0;
9831     res4 = SWIG_AsPtr_std_string(argv[3], &ptr);
9832     if (!SWIG_IsOK(res4)) {
9833       SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "std::string const &","Query", 4, argv[3] ));
9834     }
9835     if (!ptr) {
9836       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Query", 4, argv[3]));
9837     }
9838     arg4 = ptr;
9839   }
9840   {
9841     try {
9842       result = (Xapian::Query *)new Xapian::Query(arg1,arg2,(std::string const &)*arg3,(std::string const &)*arg4);
9843       DATA_PTR(self) = result;
9844     } catch (...) {
9845       string msg;
9846       int code = XapianExceptionHandler(msg);
9847       SWIG_exception(code, msg.c_str());
9848     }
9849   }
9850   if (SWIG_IsNewObj(res3)) delete arg3;
9851   if (SWIG_IsNewObj(res4)) delete arg4;
9852   return self;
9853 fail:
9854   if (SWIG_IsNewObj(res3)) delete arg3;
9855   if (SWIG_IsNewObj(res4)) delete arg4;
9856   return Qnil;
9857 }
9858 
9859 
9860 SWIGINTERN VALUE
_wrap_new_Query__SWIG_11(int argc,VALUE * argv,VALUE self)9861 _wrap_new_Query__SWIG_11(int argc, VALUE *argv, VALUE self) {
9862   Xapian::Query::op arg1 ;
9863   std::string *arg2 = 0 ;
9864   Xapian::termcount arg3 ;
9865   int arg4 ;
9866   Xapian::Query::op arg5 ;
9867   int val1 ;
9868   int ecode1 = 0 ;
9869   int res2 = SWIG_OLDOBJ ;
9870   unsigned int val3 ;
9871   int ecode3 = 0 ;
9872   int val4 ;
9873   int ecode4 = 0 ;
9874   int val5 ;
9875   int ecode5 = 0 ;
9876   const char *classname SWIGUNUSED = "Xapian::Query";
9877   Xapian::Query *result = 0 ;
9878 
9879   if ((argc < 5) || (argc > 5)) {
9880     rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
9881   }
9882   ecode1 = SWIG_AsVal_int(argv[0], &val1);
9883   if (!SWIG_IsOK(ecode1)) {
9884     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::Query::op","Query", 1, argv[0] ));
9885   }
9886   arg1 = static_cast< Xapian::Query::op >(val1);
9887   {
9888     std::string *ptr = (std::string *)0;
9889     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
9890     if (!SWIG_IsOK(res2)) {
9891       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","Query", 2, argv[1] ));
9892     }
9893     if (!ptr) {
9894       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Query", 2, argv[1]));
9895     }
9896     arg2 = ptr;
9897   }
9898   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
9899   if (!SWIG_IsOK(ecode3)) {
9900     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","Query", 3, argv[2] ));
9901   }
9902   arg3 = static_cast< Xapian::termcount >(val3);
9903   ecode4 = SWIG_AsVal_int(argv[3], &val4);
9904   if (!SWIG_IsOK(ecode4)) {
9905     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","Query", 4, argv[3] ));
9906   }
9907   arg4 = static_cast< int >(val4);
9908   ecode5 = SWIG_AsVal_int(argv[4], &val5);
9909   if (!SWIG_IsOK(ecode5)) {
9910     SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "Xapian::Query::op","Query", 5, argv[4] ));
9911   }
9912   arg5 = static_cast< Xapian::Query::op >(val5);
9913   {
9914     try {
9915       result = (Xapian::Query *)new Xapian::Query(arg1,(std::string const &)*arg2,arg3,arg4,arg5);
9916       DATA_PTR(self) = result;
9917     } catch (...) {
9918       string msg;
9919       int code = XapianExceptionHandler(msg);
9920       SWIG_exception(code, msg.c_str());
9921     }
9922   }
9923   if (SWIG_IsNewObj(res2)) delete arg2;
9924   return self;
9925 fail:
9926   if (SWIG_IsNewObj(res2)) delete arg2;
9927   return Qnil;
9928 }
9929 
9930 
9931 SWIGINTERN VALUE
_wrap_new_Query__SWIG_12(int argc,VALUE * argv,VALUE self)9932 _wrap_new_Query__SWIG_12(int argc, VALUE *argv, VALUE self) {
9933   Xapian::Query::op arg1 ;
9934   std::string *arg2 = 0 ;
9935   Xapian::termcount arg3 ;
9936   int arg4 ;
9937   int val1 ;
9938   int ecode1 = 0 ;
9939   int res2 = SWIG_OLDOBJ ;
9940   unsigned int val3 ;
9941   int ecode3 = 0 ;
9942   int val4 ;
9943   int ecode4 = 0 ;
9944   const char *classname SWIGUNUSED = "Xapian::Query";
9945   Xapian::Query *result = 0 ;
9946 
9947   if ((argc < 4) || (argc > 4)) {
9948     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
9949   }
9950   ecode1 = SWIG_AsVal_int(argv[0], &val1);
9951   if (!SWIG_IsOK(ecode1)) {
9952     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::Query::op","Query", 1, argv[0] ));
9953   }
9954   arg1 = static_cast< Xapian::Query::op >(val1);
9955   {
9956     std::string *ptr = (std::string *)0;
9957     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
9958     if (!SWIG_IsOK(res2)) {
9959       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","Query", 2, argv[1] ));
9960     }
9961     if (!ptr) {
9962       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Query", 2, argv[1]));
9963     }
9964     arg2 = ptr;
9965   }
9966   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
9967   if (!SWIG_IsOK(ecode3)) {
9968     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","Query", 3, argv[2] ));
9969   }
9970   arg3 = static_cast< Xapian::termcount >(val3);
9971   ecode4 = SWIG_AsVal_int(argv[3], &val4);
9972   if (!SWIG_IsOK(ecode4)) {
9973     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","Query", 4, argv[3] ));
9974   }
9975   arg4 = static_cast< int >(val4);
9976   {
9977     try {
9978       result = (Xapian::Query *)new Xapian::Query(arg1,(std::string const &)*arg2,arg3,arg4);
9979       DATA_PTR(self) = result;
9980     } catch (...) {
9981       string msg;
9982       int code = XapianExceptionHandler(msg);
9983       SWIG_exception(code, msg.c_str());
9984     }
9985   }
9986   if (SWIG_IsNewObj(res2)) delete arg2;
9987   return self;
9988 fail:
9989   if (SWIG_IsNewObj(res2)) delete arg2;
9990   return Qnil;
9991 }
9992 
9993 
9994 SWIGINTERN VALUE
_wrap_new_Query__SWIG_13(int argc,VALUE * argv,VALUE self)9995 _wrap_new_Query__SWIG_13(int argc, VALUE *argv, VALUE self) {
9996   Xapian::Query::op arg1 ;
9997   std::string *arg2 = 0 ;
9998   Xapian::termcount arg3 ;
9999   int val1 ;
10000   int ecode1 = 0 ;
10001   int res2 = SWIG_OLDOBJ ;
10002   unsigned int val3 ;
10003   int ecode3 = 0 ;
10004   const char *classname SWIGUNUSED = "Xapian::Query";
10005   Xapian::Query *result = 0 ;
10006 
10007   if ((argc < 3) || (argc > 3)) {
10008     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
10009   }
10010   ecode1 = SWIG_AsVal_int(argv[0], &val1);
10011   if (!SWIG_IsOK(ecode1)) {
10012     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::Query::op","Query", 1, argv[0] ));
10013   }
10014   arg1 = static_cast< Xapian::Query::op >(val1);
10015   {
10016     std::string *ptr = (std::string *)0;
10017     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
10018     if (!SWIG_IsOK(res2)) {
10019       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","Query", 2, argv[1] ));
10020     }
10021     if (!ptr) {
10022       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Query", 2, argv[1]));
10023     }
10024     arg2 = ptr;
10025   }
10026   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
10027   if (!SWIG_IsOK(ecode3)) {
10028     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","Query", 3, argv[2] ));
10029   }
10030   arg3 = static_cast< Xapian::termcount >(val3);
10031   {
10032     try {
10033       result = (Xapian::Query *)new Xapian::Query(arg1,(std::string const &)*arg2,arg3);
10034       DATA_PTR(self) = result;
10035     } catch (...) {
10036       string msg;
10037       int code = XapianExceptionHandler(msg);
10038       SWIG_exception(code, msg.c_str());
10039     }
10040   }
10041   if (SWIG_IsNewObj(res2)) delete arg2;
10042   return self;
10043 fail:
10044   if (SWIG_IsNewObj(res2)) delete arg2;
10045   return Qnil;
10046 }
10047 
10048 
10049 SWIGINTERN VALUE
_wrap_new_Query__SWIG_14(int argc,VALUE * argv,VALUE self)10050 _wrap_new_Query__SWIG_14(int argc, VALUE *argv, VALUE self) {
10051   Xapian::Query::op arg1 ;
10052   std::string *arg2 = 0 ;
10053   int val1 ;
10054   int ecode1 = 0 ;
10055   int res2 = SWIG_OLDOBJ ;
10056   const char *classname SWIGUNUSED = "Xapian::Query";
10057   Xapian::Query *result = 0 ;
10058 
10059   if ((argc < 2) || (argc > 2)) {
10060     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
10061   }
10062   ecode1 = SWIG_AsVal_int(argv[0], &val1);
10063   if (!SWIG_IsOK(ecode1)) {
10064     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::Query::op","Query", 1, argv[0] ));
10065   }
10066   arg1 = static_cast< Xapian::Query::op >(val1);
10067   {
10068     std::string *ptr = (std::string *)0;
10069     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
10070     if (!SWIG_IsOK(res2)) {
10071       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","Query", 2, argv[1] ));
10072     }
10073     if (!ptr) {
10074       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Query", 2, argv[1]));
10075     }
10076     arg2 = ptr;
10077   }
10078   {
10079     try {
10080       result = (Xapian::Query *)new Xapian::Query(arg1,(std::string const &)*arg2);
10081       DATA_PTR(self) = result;
10082     } catch (...) {
10083       string msg;
10084       int code = XapianExceptionHandler(msg);
10085       SWIG_exception(code, msg.c_str());
10086     }
10087   }
10088   if (SWIG_IsNewObj(res2)) delete arg2;
10089   return self;
10090 fail:
10091   if (SWIG_IsNewObj(res2)) delete arg2;
10092   return Qnil;
10093 }
10094 
10095 
10096 SWIGINTERN VALUE
_wrap_new_Query__SWIG_17(int argc,VALUE * argv,VALUE self)10097 _wrap_new_Query__SWIG_17(int argc, VALUE *argv, VALUE self) {
10098   Xapian::Query::op arg1 ;
10099   XapianSWIGQueryItor arg2 ;
10100   XapianSWIGQueryItor arg3 ;
10101   Xapian::termcount arg4 ;
10102   int val1 ;
10103   int ecode1 = 0 ;
10104   unsigned int val4 ;
10105   int ecode4 = 0 ;
10106   const char *classname SWIGUNUSED = "Xapian::Query";
10107   Xapian::Query *result = 0 ;
10108 
10109   if ((argc < 3) || (argc > 3)) {
10110     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
10111   }
10112   ecode1 = SWIG_AsVal_int(argv[0], &val1);
10113   if (!SWIG_IsOK(ecode1)) {
10114     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::Query::op","Query", 1, argv[0] ));
10115   }
10116   arg1 = static_cast< Xapian::Query::op >(val1);
10117   {
10118     if (TYPE(argv[1]) == T_ARRAY) {
10119       // The typecheck typemap should have ensured this is an array.
10120       (&arg2)->begin(argv[1]);
10121       (&arg3)->end(RARRAY_LEN(argv[1]));
10122     } else {
10123       (&arg2)->end(0);
10124       (&arg3)->end(0);
10125     }
10126   }
10127   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
10128   if (!SWIG_IsOK(ecode4)) {
10129     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termcount","Query", 4, argv[2] ));
10130   }
10131   arg4 = static_cast< Xapian::termcount >(val4);
10132   {
10133     try {
10134       result = (Xapian::Query *)new Xapian::Query(arg1,arg2,arg3,arg4);
10135       DATA_PTR(self) = result;
10136     } catch (...) {
10137       string msg;
10138       int code = XapianExceptionHandler(msg);
10139       SWIG_exception(code, msg.c_str());
10140     }
10141   }
10142   return self;
10143 fail:
10144   return Qnil;
10145 }
10146 
10147 
10148 SWIGINTERN VALUE
_wrap_new_Query__SWIG_18(int argc,VALUE * argv,VALUE self)10149 _wrap_new_Query__SWIG_18(int argc, VALUE *argv, VALUE self) {
10150   Xapian::Query::op arg1 ;
10151   XapianSWIGQueryItor arg2 ;
10152   XapianSWIGQueryItor arg3 ;
10153   int val1 ;
10154   int ecode1 = 0 ;
10155   const char *classname SWIGUNUSED = "Xapian::Query";
10156   Xapian::Query *result = 0 ;
10157 
10158   if ((argc < 2) || (argc > 2)) {
10159     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
10160   }
10161   ecode1 = SWIG_AsVal_int(argv[0], &val1);
10162   if (!SWIG_IsOK(ecode1)) {
10163     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::Query::op","Query", 1, argv[0] ));
10164   }
10165   arg1 = static_cast< Xapian::Query::op >(val1);
10166   {
10167     if (TYPE(argv[1]) == T_ARRAY) {
10168       // The typecheck typemap should have ensured this is an array.
10169       (&arg2)->begin(argv[1]);
10170       (&arg3)->end(RARRAY_LEN(argv[1]));
10171     } else {
10172       (&arg2)->end(0);
10173       (&arg3)->end(0);
10174     }
10175   }
10176   {
10177     try {
10178       result = (Xapian::Query *)new Xapian::Query(arg1,arg2,arg3);
10179       DATA_PTR(self) = result;
10180     } catch (...) {
10181       string msg;
10182       int code = XapianExceptionHandler(msg);
10183       SWIG_exception(code, msg.c_str());
10184     }
10185   }
10186   return self;
10187 fail:
10188   return Qnil;
10189 }
10190 
10191 
10192 SWIGINTERN VALUE
_wrap_Query__dangerous_terms_begin(int argc,VALUE * argv,VALUE self)10193 _wrap_Query__dangerous_terms_begin(int argc, VALUE *argv, VALUE self) {
10194   Xapian::Query *arg1 = (Xapian::Query *) 0 ;
10195   void *argp1 = 0 ;
10196   int res1 = 0 ;
10197   Xapian::TermIterator result;
10198   VALUE vresult = Qnil;
10199 
10200   if ((argc < 0) || (argc > 0)) {
10201     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
10202   }
10203   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
10204   if (!SWIG_IsOK(res1)) {
10205     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Query const *","get_terms_begin", 1, self ));
10206   }
10207   arg1 = reinterpret_cast< Xapian::Query * >(argp1);
10208   {
10209     try {
10210       result = ((Xapian::Query const *)arg1)->get_terms_begin();
10211     } catch (...) {
10212       string msg;
10213       int code = XapianExceptionHandler(msg);
10214       SWIG_exception(code, msg.c_str());
10215     }
10216   }
10217   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
10218   return vresult;
10219 fail:
10220   return Qnil;
10221 }
10222 
10223 
10224 SWIGINTERN VALUE
_wrap_Query__dangerous_terms_end(int argc,VALUE * argv,VALUE self)10225 _wrap_Query__dangerous_terms_end(int argc, VALUE *argv, VALUE self) {
10226   Xapian::Query *arg1 = (Xapian::Query *) 0 ;
10227   void *argp1 = 0 ;
10228   int res1 = 0 ;
10229   Xapian::TermIterator result;
10230   VALUE vresult = Qnil;
10231 
10232   if ((argc < 0) || (argc > 0)) {
10233     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
10234   }
10235   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
10236   if (!SWIG_IsOK(res1)) {
10237     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Query const *","get_terms_end", 1, self ));
10238   }
10239   arg1 = reinterpret_cast< Xapian::Query * >(argp1);
10240   result = ((Xapian::Query const *)arg1)->get_terms_end();
10241   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
10242   return vresult;
10243 fail:
10244   return Qnil;
10245 }
10246 
10247 
10248 SWIGINTERN VALUE
_wrap_Query__dangerous_unique_terms_begin(int argc,VALUE * argv,VALUE self)10249 _wrap_Query__dangerous_unique_terms_begin(int argc, VALUE *argv, VALUE self) {
10250   Xapian::Query *arg1 = (Xapian::Query *) 0 ;
10251   void *argp1 = 0 ;
10252   int res1 = 0 ;
10253   Xapian::TermIterator result;
10254   VALUE vresult = Qnil;
10255 
10256   if ((argc < 0) || (argc > 0)) {
10257     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
10258   }
10259   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
10260   if (!SWIG_IsOK(res1)) {
10261     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Query const *","get_unique_terms_begin", 1, self ));
10262   }
10263   arg1 = reinterpret_cast< Xapian::Query * >(argp1);
10264   {
10265     try {
10266       result = ((Xapian::Query const *)arg1)->get_unique_terms_begin();
10267     } catch (...) {
10268       string msg;
10269       int code = XapianExceptionHandler(msg);
10270       SWIG_exception(code, msg.c_str());
10271     }
10272   }
10273   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
10274   return vresult;
10275 fail:
10276   return Qnil;
10277 }
10278 
10279 
10280 SWIGINTERN VALUE
_wrap_Query__dangerous_unique_terms_end(int argc,VALUE * argv,VALUE self)10281 _wrap_Query__dangerous_unique_terms_end(int argc, VALUE *argv, VALUE self) {
10282   Xapian::Query *arg1 = (Xapian::Query *) 0 ;
10283   void *argp1 = 0 ;
10284   int res1 = 0 ;
10285   Xapian::TermIterator result;
10286   VALUE vresult = Qnil;
10287 
10288   if ((argc < 0) || (argc > 0)) {
10289     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
10290   }
10291   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
10292   if (!SWIG_IsOK(res1)) {
10293     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Query const *","get_unique_terms_end", 1, self ));
10294   }
10295   arg1 = reinterpret_cast< Xapian::Query * >(argp1);
10296   result = ((Xapian::Query const *)arg1)->get_unique_terms_end();
10297   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
10298   return vresult;
10299 fail:
10300   return Qnil;
10301 }
10302 
10303 
10304 SWIGINTERN VALUE
_wrap_Query_length(int argc,VALUE * argv,VALUE self)10305 _wrap_Query_length(int argc, VALUE *argv, VALUE self) {
10306   Xapian::Query *arg1 = (Xapian::Query *) 0 ;
10307   void *argp1 = 0 ;
10308   int res1 = 0 ;
10309   Xapian::termcount result;
10310   VALUE vresult = Qnil;
10311 
10312   if ((argc < 0) || (argc > 0)) {
10313     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
10314   }
10315   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
10316   if (!SWIG_IsOK(res1)) {
10317     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Query const *","get_length", 1, self ));
10318   }
10319   arg1 = reinterpret_cast< Xapian::Query * >(argp1);
10320   result = (Xapian::termcount)((Xapian::Query const *)arg1)->get_length();
10321   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
10322   return vresult;
10323 fail:
10324   return Qnil;
10325 }
10326 
10327 
10328 
10329 /*
10330   Document-method: Xapian::Query.empty
10331 
10332   call-seq:
10333     empty -> bool
10334 
10335 Check if the Query is empty or not.
10336 */
10337 SWIGINTERN VALUE
_wrap_Query_emptyq___(int argc,VALUE * argv,VALUE self)10338 _wrap_Query_emptyq___(int argc, VALUE *argv, VALUE self) {
10339   Xapian::Query *arg1 = (Xapian::Query *) 0 ;
10340   void *argp1 = 0 ;
10341   int res1 = 0 ;
10342   bool result;
10343   VALUE vresult = Qnil;
10344 
10345   if ((argc < 0) || (argc > 0)) {
10346     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
10347   }
10348   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
10349   if (!SWIG_IsOK(res1)) {
10350     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Query const *","empty", 1, self ));
10351   }
10352   arg1 = reinterpret_cast< Xapian::Query * >(argp1);
10353   result = (bool)((Xapian::Query const *)arg1)->empty();
10354   vresult = (result ? Qtrue : Qfalse);
10355   return vresult;
10356 fail:
10357   return Qnil;
10358 }
10359 
10360 
10361 SWIGINTERN VALUE
_wrap_Query_serialise(int argc,VALUE * argv,VALUE self)10362 _wrap_Query_serialise(int argc, VALUE *argv, VALUE self) {
10363   Xapian::Query *arg1 = (Xapian::Query *) 0 ;
10364   void *argp1 = 0 ;
10365   int res1 = 0 ;
10366   std::string result;
10367   VALUE vresult = Qnil;
10368 
10369   if ((argc < 0) || (argc > 0)) {
10370     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
10371   }
10372   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
10373   if (!SWIG_IsOK(res1)) {
10374     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Query const *","serialise", 1, self ));
10375   }
10376   arg1 = reinterpret_cast< Xapian::Query * >(argp1);
10377   {
10378     try {
10379       result = ((Xapian::Query const *)arg1)->serialise();
10380     } catch (...) {
10381       string msg;
10382       int code = XapianExceptionHandler(msg);
10383       SWIG_exception(code, msg.c_str());
10384     }
10385   }
10386   vresult = SWIG_From_std_string(static_cast< std::string >(result));
10387   return vresult;
10388 fail:
10389   return Qnil;
10390 }
10391 
10392 
10393 SWIGINTERN VALUE
_wrap_Query_unserialise__SWIG_0(int argc,VALUE * argv,VALUE self)10394 _wrap_Query_unserialise__SWIG_0(int argc, VALUE *argv, VALUE self) {
10395   std::string *arg1 = 0 ;
10396   Xapian::Registry *arg2 = 0 ;
10397   int res1 = SWIG_OLDOBJ ;
10398   void *argp2 ;
10399   int res2 = 0 ;
10400   Xapian::Query result;
10401   VALUE vresult = Qnil;
10402 
10403   if ((argc < 2) || (argc > 2)) {
10404     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
10405   }
10406   {
10407     std::string *ptr = (std::string *)0;
10408     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
10409     if (!SWIG_IsOK(res1)) {
10410       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Query::unserialise", 1, argv[0] ));
10411     }
10412     if (!ptr) {
10413       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Query::unserialise", 1, argv[0]));
10414     }
10415     arg1 = ptr;
10416   }
10417   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__Registry,  0 );
10418   if (!SWIG_IsOK(res2)) {
10419     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Registry const &","Xapian::Query::unserialise", 2, argv[1] ));
10420   }
10421   if (!argp2) {
10422     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Registry const &","Xapian::Query::unserialise", 2, argv[1]));
10423   }
10424   arg2 = reinterpret_cast< Xapian::Registry * >(argp2);
10425   {
10426     try {
10427       result = Xapian::Query::unserialise((std::string const &)*arg1,(Xapian::Registry const &)*arg2);
10428     } catch (...) {
10429       string msg;
10430       int code = XapianExceptionHandler(msg);
10431       SWIG_exception(code, msg.c_str());
10432     }
10433   }
10434   vresult = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN |  0 );
10435   if (SWIG_IsNewObj(res1)) delete arg1;
10436   return vresult;
10437 fail:
10438   if (SWIG_IsNewObj(res1)) delete arg1;
10439   return Qnil;
10440 }
10441 
10442 
10443 SWIGINTERN VALUE
_wrap_Query_unserialise__SWIG_1(int argc,VALUE * argv,VALUE self)10444 _wrap_Query_unserialise__SWIG_1(int argc, VALUE *argv, VALUE self) {
10445   std::string *arg1 = 0 ;
10446   int res1 = SWIG_OLDOBJ ;
10447   Xapian::Query result;
10448   VALUE vresult = Qnil;
10449 
10450   if ((argc < 1) || (argc > 1)) {
10451     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
10452   }
10453   {
10454     std::string *ptr = (std::string *)0;
10455     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
10456     if (!SWIG_IsOK(res1)) {
10457       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Query::unserialise", 1, argv[0] ));
10458     }
10459     if (!ptr) {
10460       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Query::unserialise", 1, argv[0]));
10461     }
10462     arg1 = ptr;
10463   }
10464   {
10465     try {
10466       result = Xapian::Query::unserialise((std::string const &)*arg1);
10467     } catch (...) {
10468       string msg;
10469       int code = XapianExceptionHandler(msg);
10470       SWIG_exception(code, msg.c_str());
10471     }
10472   }
10473   vresult = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN |  0 );
10474   if (SWIG_IsNewObj(res1)) delete arg1;
10475   return vresult;
10476 fail:
10477   if (SWIG_IsNewObj(res1)) delete arg1;
10478   return Qnil;
10479 }
10480 
10481 
_wrap_Query_unserialise(int nargs,VALUE * args,VALUE self)10482 SWIGINTERN VALUE _wrap_Query_unserialise(int nargs, VALUE *args, VALUE self) {
10483   int argc;
10484   VALUE argv[2];
10485   int ii;
10486 
10487   argc = nargs;
10488   if (argc > 2) SWIG_fail;
10489   for (ii = 0; (ii < argc); ++ii) {
10490     argv[ii] = args[ii];
10491   }
10492   if (argc == 1) {
10493     int _v;
10494     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
10495     _v = SWIG_CheckState(res);
10496     if (_v) {
10497       return _wrap_Query_unserialise__SWIG_1(nargs, args, self);
10498     }
10499   }
10500   if (argc == 2) {
10501     int _v;
10502     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
10503     _v = SWIG_CheckState(res);
10504     if (_v) {
10505       void *vptr = 0;
10506       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__Registry, 0);
10507       _v = SWIG_CheckState(res);
10508       if (_v) {
10509         return _wrap_Query_unserialise__SWIG_0(nargs, args, self);
10510       }
10511     }
10512   }
10513 
10514 fail:
10515   Ruby_Format_OverloadedError( argc, 2, "Query.unserialise",
10516     "    Xapian::Query const Query.unserialise(std::string const &serialised, Xapian::Registry const &reg)\n"
10517     "    Xapian::Query const Query.unserialise(std::string const &serialised)\n");
10518 
10519   return Qnil;
10520 }
10521 
10522 
10523 SWIGINTERN VALUE
_wrap_Query_type(int argc,VALUE * argv,VALUE self)10524 _wrap_Query_type(int argc, VALUE *argv, VALUE self) {
10525   Xapian::Query *arg1 = (Xapian::Query *) 0 ;
10526   void *argp1 = 0 ;
10527   int res1 = 0 ;
10528   Xapian::Query::op result;
10529   VALUE vresult = Qnil;
10530 
10531   if ((argc < 0) || (argc > 0)) {
10532     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
10533   }
10534   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
10535   if (!SWIG_IsOK(res1)) {
10536     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Query const *","get_type", 1, self ));
10537   }
10538   arg1 = reinterpret_cast< Xapian::Query * >(argp1);
10539   result = (Xapian::Query::op)((Xapian::Query const *)arg1)->get_type();
10540   vresult = SWIG_From_int(static_cast< int >(result));
10541   return vresult;
10542 fail:
10543   return Qnil;
10544 }
10545 
10546 
10547 SWIGINTERN VALUE
_wrap_Query_get_num_subqueries(int argc,VALUE * argv,VALUE self)10548 _wrap_Query_get_num_subqueries(int argc, VALUE *argv, VALUE self) {
10549   Xapian::Query *arg1 = (Xapian::Query *) 0 ;
10550   void *argp1 = 0 ;
10551   int res1 = 0 ;
10552   size_t result;
10553   VALUE vresult = Qnil;
10554 
10555   if ((argc < 0) || (argc > 0)) {
10556     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
10557   }
10558   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
10559   if (!SWIG_IsOK(res1)) {
10560     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Query const *","get_num_subqueries", 1, self ));
10561   }
10562   arg1 = reinterpret_cast< Xapian::Query * >(argp1);
10563   result = ((Xapian::Query const *)arg1)->get_num_subqueries();
10564   vresult = SWIG_From_size_t(static_cast< size_t >(result));
10565   return vresult;
10566 fail:
10567   return Qnil;
10568 }
10569 
10570 
10571 SWIGINTERN VALUE
_wrap_Query_get_subquery(int argc,VALUE * argv,VALUE self)10572 _wrap_Query_get_subquery(int argc, VALUE *argv, VALUE self) {
10573   Xapian::Query *arg1 = (Xapian::Query *) 0 ;
10574   size_t arg2 ;
10575   void *argp1 = 0 ;
10576   int res1 = 0 ;
10577   size_t val2 ;
10578   int ecode2 = 0 ;
10579   Xapian::Query result;
10580   VALUE vresult = Qnil;
10581 
10582   if ((argc < 1) || (argc > 1)) {
10583     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
10584   }
10585   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
10586   if (!SWIG_IsOK(res1)) {
10587     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Query const *","get_subquery", 1, self ));
10588   }
10589   arg1 = reinterpret_cast< Xapian::Query * >(argp1);
10590   ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
10591   if (!SWIG_IsOK(ecode2)) {
10592     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","get_subquery", 2, argv[0] ));
10593   }
10594   arg2 = static_cast< size_t >(val2);
10595   {
10596     try {
10597       result = ((Xapian::Query const *)arg1)->get_subquery(arg2);
10598     } catch (...) {
10599       string msg;
10600       int code = XapianExceptionHandler(msg);
10601       SWIG_exception(code, msg.c_str());
10602     }
10603   }
10604   vresult = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN |  0 );
10605   return vresult;
10606 fail:
10607   return Qnil;
10608 }
10609 
10610 
10611 SWIGINTERN VALUE
_wrap_Query_description(int argc,VALUE * argv,VALUE self)10612 _wrap_Query_description(int argc, VALUE *argv, VALUE self) {
10613   Xapian::Query *arg1 = (Xapian::Query *) 0 ;
10614   void *argp1 = 0 ;
10615   int res1 = 0 ;
10616   std::string result;
10617   VALUE vresult = Qnil;
10618 
10619   if ((argc < 0) || (argc > 0)) {
10620     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
10621   }
10622   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
10623   if (!SWIG_IsOK(res1)) {
10624     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Query const *","get_description", 1, self ));
10625   }
10626   arg1 = reinterpret_cast< Xapian::Query * >(argp1);
10627   {
10628     try {
10629       result = ((Xapian::Query const *)arg1)->get_description();
10630     } catch (...) {
10631       string msg;
10632       int code = XapianExceptionHandler(msg);
10633       SWIG_exception(code, msg.c_str());
10634     }
10635   }
10636   vresult = SWIG_From_std_string(static_cast< std::string >(result));
10637   return vresult;
10638 fail:
10639   return Qnil;
10640 }
10641 
10642 
10643 SWIGINTERN VALUE
10644 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_Query_allocate(VALUE self)10645 _wrap_Query_allocate(VALUE self)
10646 #else
10647 _wrap_Query_allocate(int argc, VALUE *argv, VALUE self)
10648 #endif
10649 {
10650   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__Query);
10651 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
10652   rb_obj_call_init(vresult, argc, argv);
10653 #endif
10654   return vresult;
10655 }
10656 
10657 
10658 SWIGINTERN VALUE
_wrap_new_Query__SWIG_19(int argc,VALUE * argv,VALUE self)10659 _wrap_new_Query__SWIG_19(int argc, VALUE *argv, VALUE self) {
10660   Xapian::Query::op arg1 ;
10661   int val1 ;
10662   int ecode1 = 0 ;
10663   const char *classname SWIGUNUSED = "Xapian::Query";
10664   Xapian::Query *result = 0 ;
10665 
10666   if ((argc < 1) || (argc > 1)) {
10667     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
10668   }
10669   ecode1 = SWIG_AsVal_int(argv[0], &val1);
10670   if (!SWIG_IsOK(ecode1)) {
10671     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::Query::op","Query", 1, argv[0] ));
10672   }
10673   arg1 = static_cast< Xapian::Query::op >(val1);
10674   {
10675     try {
10676       result = (Xapian::Query *)new Xapian::Query(arg1);
10677       DATA_PTR(self) = result;
10678     } catch (...) {
10679       string msg;
10680       int code = XapianExceptionHandler(msg);
10681       SWIG_exception(code, msg.c_str());
10682     }
10683   }
10684   return self;
10685 fail:
10686   return Qnil;
10687 }
10688 
10689 
_wrap_new_Query(int nargs,VALUE * args,VALUE self)10690 SWIGINTERN VALUE _wrap_new_Query(int nargs, VALUE *args, VALUE self) {
10691   int argc;
10692   VALUE argv[5];
10693   int ii;
10694 
10695   argc = nargs;
10696   if (argc > 5) SWIG_fail;
10697   for (ii = 0; (ii < argc); ++ii) {
10698     argv[ii] = args[ii];
10699   }
10700   if (argc == 0) {
10701     return _wrap_new_Query__SWIG_0(nargs, args, self);
10702   }
10703   if (argc == 1) {
10704     int _v;
10705     void *vptr = 0;
10706     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__PostingSource, 0);
10707     _v = SWIG_CheckState(res);
10708     if (_v) {
10709       return _wrap_new_Query__SWIG_4(nargs, args, self);
10710     }
10711   }
10712   if (argc == 1) {
10713     int _v;
10714     {
10715       int res = SWIG_AsVal_int(argv[0], NULL);
10716       _v = SWIG_CheckState(res);
10717     }
10718     if (_v) {
10719       return _wrap_new_Query__SWIG_19(nargs, args, self);
10720     }
10721   }
10722   if (argc == 1) {
10723     int _v;
10724     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
10725     _v = SWIG_CheckState(res);
10726     if (_v) {
10727       return _wrap_new_Query__SWIG_3(nargs, args, self);
10728     }
10729   }
10730   if (argc == 2) {
10731     int _v;
10732     {
10733       int res = SWIG_AsVal_int(argv[0], NULL);
10734       _v = SWIG_CheckState(res);
10735     }
10736     if (_v) {
10737       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
10738       _v = SWIG_CheckState(res);
10739       if (_v) {
10740         return _wrap_new_Query__SWIG_14(nargs, args, self);
10741       }
10742     }
10743   }
10744   if (argc == 2) {
10745     int _v;
10746     {
10747       int res = SWIG_AsVal_int(argv[0], NULL);
10748       _v = SWIG_CheckState(res);
10749     }
10750     if (_v) {
10751       {
10752         _v = (TYPE(argv[1]) == T_ARRAY);
10753         /* Currently, the only wrapped method which takes a Ruby array is the
10754              * "extra" constructor Query(OP, ARRAY), where ARRAY can contain any mix of
10755              * strings and Query objects.
10756              *
10757              * If we ever had a method (or function) which had two overloaded forms
10758              * only differentiated by what type of array can be passed we'd need to
10759              * look at the type of the array elements in the typecheck typemaps.
10760              */
10761       }
10762       if (_v) {
10763         if (argc <= 2) {
10764           return _wrap_new_Query__SWIG_18(nargs, args, self);
10765         }
10766         return _wrap_new_Query__SWIG_18(nargs, args, self);
10767       }
10768     }
10769   }
10770   if (argc == 2) {
10771     int _v;
10772     {
10773       int res = SWIG_AsVal_double(argv[0], NULL);
10774       _v = SWIG_CheckState(res);
10775     }
10776     if (_v) {
10777       void *vptr = 0;
10778       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__Query, 0);
10779       _v = SWIG_CheckState(res);
10780       if (_v) {
10781         return _wrap_new_Query__SWIG_5(nargs, args, self);
10782       }
10783     }
10784   }
10785   if (argc == 2) {
10786     int _v;
10787     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
10788     _v = SWIG_CheckState(res);
10789     if (_v) {
10790       {
10791         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
10792         _v = SWIG_CheckState(res);
10793       }
10794       if (_v) {
10795         return _wrap_new_Query__SWIG_2(nargs, args, self);
10796       }
10797     }
10798   }
10799   if (argc == 3) {
10800     int _v;
10801     {
10802       int res = SWIG_AsVal_int(argv[0], NULL);
10803       _v = SWIG_CheckState(res);
10804     }
10805     if (_v) {
10806       void *vptr = 0;
10807       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__Query, 0);
10808       _v = SWIG_CheckState(res);
10809       if (_v) {
10810         void *vptr = 0;
10811         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__Query, 0);
10812         _v = SWIG_CheckState(res);
10813         if (_v) {
10814           return _wrap_new_Query__SWIG_7(nargs, args, self);
10815         }
10816       }
10817     }
10818   }
10819   if (argc == 3) {
10820     int _v;
10821     {
10822       int res = SWIG_AsVal_int(argv[0], NULL);
10823       _v = SWIG_CheckState(res);
10824     }
10825     if (_v) {
10826       void *vptr = 0;
10827       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__Query, 0);
10828       _v = SWIG_CheckState(res);
10829       if (_v) {
10830         {
10831           int res = SWIG_AsVal_double(argv[2], NULL);
10832           _v = SWIG_CheckState(res);
10833         }
10834         if (_v) {
10835           return _wrap_new_Query__SWIG_6(nargs, args, self);
10836         }
10837       }
10838     }
10839   }
10840   if (argc == 3) {
10841     int _v;
10842     {
10843       int res = SWIG_AsVal_int(argv[0], NULL);
10844       _v = SWIG_CheckState(res);
10845     }
10846     if (_v) {
10847       {
10848         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
10849         _v = SWIG_CheckState(res);
10850       }
10851       if (_v) {
10852         int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
10853         _v = SWIG_CheckState(res);
10854         if (_v) {
10855           return _wrap_new_Query__SWIG_9(nargs, args, self);
10856         }
10857       }
10858     }
10859   }
10860   if (argc == 3) {
10861     int _v;
10862     {
10863       int res = SWIG_AsVal_int(argv[0], NULL);
10864       _v = SWIG_CheckState(res);
10865     }
10866     if (_v) {
10867       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
10868       _v = SWIG_CheckState(res);
10869       if (_v) {
10870         {
10871           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
10872           _v = SWIG_CheckState(res);
10873         }
10874         if (_v) {
10875           return _wrap_new_Query__SWIG_13(nargs, args, self);
10876         }
10877       }
10878     }
10879   }
10880   if (argc == 3) {
10881     int _v;
10882     {
10883       int res = SWIG_AsVal_int(argv[0], NULL);
10884       _v = SWIG_CheckState(res);
10885     }
10886     if (_v) {
10887       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
10888       _v = SWIG_CheckState(res);
10889       if (_v) {
10890         int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
10891         _v = SWIG_CheckState(res);
10892         if (_v) {
10893           return _wrap_new_Query__SWIG_8(nargs, args, self);
10894         }
10895       }
10896     }
10897   }
10898   if (argc == 3) {
10899     int _v;
10900     {
10901       int res = SWIG_AsVal_int(argv[0], NULL);
10902       _v = SWIG_CheckState(res);
10903     }
10904     if (_v) {
10905       {
10906         _v = (TYPE(argv[1]) == T_ARRAY);
10907         /* Currently, the only wrapped method which takes a Ruby array is the
10908              * "extra" constructor Query(OP, ARRAY), where ARRAY can contain any mix of
10909              * strings and Query objects.
10910              *
10911              * If we ever had a method (or function) which had two overloaded forms
10912              * only differentiated by what type of array can be passed we'd need to
10913              * look at the type of the array elements in the typecheck typemaps.
10914              */
10915       }
10916       if (_v) {
10917         {
10918           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
10919           _v = SWIG_CheckState(res);
10920         }
10921         if (_v) {
10922           return _wrap_new_Query__SWIG_17(nargs, args, self);
10923         }
10924       }
10925     }
10926   }
10927   if (argc == 3) {
10928     int _v;
10929     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
10930     _v = SWIG_CheckState(res);
10931     if (_v) {
10932       {
10933         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
10934         _v = SWIG_CheckState(res);
10935       }
10936       if (_v) {
10937         {
10938           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
10939           _v = SWIG_CheckState(res);
10940         }
10941         if (_v) {
10942           return _wrap_new_Query__SWIG_1(nargs, args, self);
10943         }
10944       }
10945     }
10946   }
10947   if (argc == 4) {
10948     int _v;
10949     {
10950       int res = SWIG_AsVal_int(argv[0], NULL);
10951       _v = SWIG_CheckState(res);
10952     }
10953     if (_v) {
10954       {
10955         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
10956         _v = SWIG_CheckState(res);
10957       }
10958       if (_v) {
10959         int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
10960         _v = SWIG_CheckState(res);
10961         if (_v) {
10962           int res = SWIG_AsPtr_std_string(argv[3], (std::string**)(0));
10963           _v = SWIG_CheckState(res);
10964           if (_v) {
10965             return _wrap_new_Query__SWIG_10(nargs, args, self);
10966           }
10967         }
10968       }
10969     }
10970   }
10971   if (argc == 4) {
10972     int _v;
10973     {
10974       int res = SWIG_AsVal_int(argv[0], NULL);
10975       _v = SWIG_CheckState(res);
10976     }
10977     if (_v) {
10978       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
10979       _v = SWIG_CheckState(res);
10980       if (_v) {
10981         {
10982           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
10983           _v = SWIG_CheckState(res);
10984         }
10985         if (_v) {
10986           {
10987             int res = SWIG_AsVal_int(argv[3], NULL);
10988             _v = SWIG_CheckState(res);
10989           }
10990           if (_v) {
10991             return _wrap_new_Query__SWIG_12(nargs, args, self);
10992           }
10993         }
10994       }
10995     }
10996   }
10997   if (argc == 5) {
10998     int _v;
10999     {
11000       int res = SWIG_AsVal_int(argv[0], NULL);
11001       _v = SWIG_CheckState(res);
11002     }
11003     if (_v) {
11004       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
11005       _v = SWIG_CheckState(res);
11006       if (_v) {
11007         {
11008           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
11009           _v = SWIG_CheckState(res);
11010         }
11011         if (_v) {
11012           {
11013             int res = SWIG_AsVal_int(argv[3], NULL);
11014             _v = SWIG_CheckState(res);
11015           }
11016           if (_v) {
11017             {
11018               int res = SWIG_AsVal_int(argv[4], NULL);
11019               _v = SWIG_CheckState(res);
11020             }
11021             if (_v) {
11022               return _wrap_new_Query__SWIG_11(nargs, args, self);
11023             }
11024           }
11025         }
11026       }
11027     }
11028   }
11029 
11030 fail:
11031   Ruby_Format_OverloadedError( argc, 5, "Query.new",
11032     "    Query.new()\n"
11033     "    Query.new(std::string const &term, Xapian::termcount wqf, Xapian::termpos pos)\n"
11034     "    Query.new(std::string const &term, Xapian::termcount wqf)\n"
11035     "    Query.new(std::string const &term)\n"
11036     "    Query.new(Xapian::PostingSource *source)\n"
11037     "    Query.new(double factor, Xapian::Query const &subquery)\n"
11038     "    Query.new(Xapian::Query::op op_, Xapian::Query const &subquery, double factor)\n"
11039     "    Query.new(Xapian::Query::op op_, Xapian::Query const &a, Xapian::Query const &b)\n"
11040     "    Query.new(Xapian::Query::op op_, std::string const &a, std::string const &b)\n"
11041     "    Query.new(Xapian::Query::op op_, Xapian::valueno slot, std::string const &range_limit)\n"
11042     "    Query.new(Xapian::Query::op op_, Xapian::valueno slot, std::string const &range_lower, std::string const &range_upper)\n"
11043     "    Query.new(Xapian::Query::op op_, std::string const &pattern, Xapian::termcount max_expansion, int max_type, Xapian::Query::op combiner)\n"
11044     "    Query.new(Xapian::Query::op op_, std::string const &pattern, Xapian::termcount max_expansion, int max_type)\n"
11045     "    Query.new(Xapian::Query::op op_, std::string const &pattern, Xapian::termcount max_expansion)\n"
11046     "    Query.new(Xapian::Query::op op_, std::string const &pattern)\n"
11047     "    Query.new(Xapian::Query::op op_, XapianSWIGQueryItor qbegin, XapianSWIGQueryItor qend, Xapian::termcount parameter)\n"
11048     "    Query.new(Xapian::Query::op op_, XapianSWIGQueryItor qbegin, XapianSWIGQueryItor qend)\n"
11049     "    Query.new(Xapian::Query::op op_)\n");
11050 
11051   return Qnil;
11052 }
11053 
11054 
11055 static swig_class SwigClassStemImplementation;
11056 
11057 SWIGINTERN VALUE
11058 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_StemImplementation_allocate(VALUE self)11059 _wrap_StemImplementation_allocate(VALUE self)
11060 #else
11061 _wrap_StemImplementation_allocate(int argc, VALUE *argv, VALUE self)
11062 #endif
11063 {
11064   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__StemImplementation);
11065 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
11066   rb_obj_call_init(vresult, argc, argv);
11067 #endif
11068   return vresult;
11069 }
11070 
11071 
11072 SWIGINTERN VALUE
_wrap_new_StemImplementation(int argc,VALUE * argv,VALUE self)11073 _wrap_new_StemImplementation(int argc, VALUE *argv, VALUE self) {
11074   VALUE arg1 = (VALUE) 0 ;
11075   const char *classname SWIGUNUSED = "Xapian::StemImplementation";
11076   Xapian::StemImplementation *result = 0 ;
11077 
11078   if ((argc < 0) || (argc > 0)) {
11079     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
11080   }
11081   arg1 = self;
11082   {
11083     try {
11084       if ( strcmp(rb_obj_classname(self), classname) != 0 ) {
11085         /* subclassed */
11086         result = (Xapian::StemImplementation *)new SwigDirector_StemImplementation(arg1);
11087       } else {
11088         rb_raise(rb_eNameError,"accessing abstract class or protected constructor");
11089         return Qnil;
11090       }
11091 
11092       DATA_PTR(self) = result;
11093     } catch (...) {
11094       string msg;
11095       int code = XapianExceptionHandler(msg);
11096       SWIG_exception(code, msg.c_str());
11097     }
11098   }
11099   return self;
11100 fail:
11101   return Qnil;
11102 }
11103 
11104 
11105 SWIGINTERN void
free_Xapian_StemImplementation(void * self)11106 free_Xapian_StemImplementation(void *self) {
11107     Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *)self;
11108     delete arg1;
11109 }
11110 
11111 SWIGINTERN VALUE
_wrap_StemImplementation___call__(int argc,VALUE * argv,VALUE self)11112 _wrap_StemImplementation___call__(int argc, VALUE *argv, VALUE self) {
11113   Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
11114   std::string *arg2 = 0 ;
11115   void *argp1 = 0 ;
11116   int res1 = 0 ;
11117   int res2 = SWIG_OLDOBJ ;
11118   Swig::Director *director = 0;
11119   bool upcall = false;
11120   std::string result;
11121   VALUE vresult = Qnil;
11122 
11123   if ((argc < 1) || (argc > 1)) {
11124     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
11125   }
11126   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__StemImplementation, 0 |  0 );
11127   if (!SWIG_IsOK(res1)) {
11128     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::StemImplementation *","operator ()", 1, self ));
11129   }
11130   arg1 = reinterpret_cast< Xapian::StemImplementation * >(argp1);
11131   {
11132     std::string *ptr = (std::string *)0;
11133     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
11134     if (!SWIG_IsOK(res2)) {
11135       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","operator ()", 2, argv[0] ));
11136     }
11137     if (!ptr) {
11138       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","operator ()", 2, argv[0]));
11139     }
11140     arg2 = ptr;
11141   }
11142   director = dynamic_cast<Swig::Director *>(arg1);
11143   upcall = (director && (director->swig_get_self() == self));
11144   try {
11145     {
11146       try {
11147         if (upcall) {
11148           Swig::DirectorPureVirtualException::raise("Xapian::StemImplementation::operator ()");
11149         } else {
11150           result = (arg1)->operator ()((std::string const &)*arg2);
11151         }
11152       } catch (...) {
11153         string msg;
11154         int code = XapianExceptionHandler(msg);
11155         SWIG_exception(code, msg.c_str());
11156       }
11157     }
11158   } catch (Swig::DirectorException& e) {
11159     rb_exc_raise(e.getError());
11160     SWIG_fail;
11161   }
11162   vresult = SWIG_From_std_string(static_cast< std::string >(result));
11163   if (SWIG_IsNewObj(res2)) delete arg2;
11164   return vresult;
11165 fail:
11166   if (SWIG_IsNewObj(res2)) delete arg2;
11167   return Qnil;
11168 }
11169 
11170 
11171 SWIGINTERN VALUE
_wrap_StemImplementation_description(int argc,VALUE * argv,VALUE self)11172 _wrap_StemImplementation_description(int argc, VALUE *argv, VALUE self) {
11173   Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
11174   void *argp1 = 0 ;
11175   int res1 = 0 ;
11176   Swig::Director *director = 0;
11177   bool upcall = false;
11178   std::string result;
11179   VALUE vresult = Qnil;
11180 
11181   if ((argc < 0) || (argc > 0)) {
11182     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
11183   }
11184   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__StemImplementation, 0 |  0 );
11185   if (!SWIG_IsOK(res1)) {
11186     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::StemImplementation const *","get_description", 1, self ));
11187   }
11188   arg1 = reinterpret_cast< Xapian::StemImplementation * >(argp1);
11189   director = dynamic_cast<Swig::Director *>(arg1);
11190   upcall = (director && (director->swig_get_self() == self));
11191   try {
11192     {
11193       try {
11194         if (upcall) {
11195           Swig::DirectorPureVirtualException::raise("Xapian::StemImplementation::get_description");
11196         } else {
11197           result = ((Xapian::StemImplementation const *)arg1)->get_description();
11198         }
11199       } catch (...) {
11200         string msg;
11201         int code = XapianExceptionHandler(msg);
11202         SWIG_exception(code, msg.c_str());
11203       }
11204     }
11205   } catch (Swig::DirectorException& e) {
11206     rb_exc_raise(e.getError());
11207     SWIG_fail;
11208   }
11209   vresult = SWIG_From_std_string(static_cast< std::string >(result));
11210   return vresult;
11211 fail:
11212   return Qnil;
11213 }
11214 
11215 
11216 SWIGINTERN VALUE
_wrap_disown_StemImplementation(int argc,VALUE * argv,VALUE self)11217 _wrap_disown_StemImplementation(int argc, VALUE *argv, VALUE self) {
11218   Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
11219   void *argp1 = 0 ;
11220   int res1 = 0 ;
11221 
11222   if ((argc < 1) || (argc > 1)) {
11223     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
11224   }
11225   res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Xapian__StemImplementation, 0 |  0 );
11226   if (!SWIG_IsOK(res1)) {
11227     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::StemImplementation *","disown_StemImplementation", 1, argv[0] ));
11228   }
11229   arg1 = reinterpret_cast< Xapian::StemImplementation * >(argp1);
11230   {
11231     Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
11232     if (director) director->swig_disown();
11233   }
11234 
11235   return Qnil;
11236 fail:
11237   return Qnil;
11238 }
11239 
11240 
11241 static swig_class SwigClassStem;
11242 
11243 SWIGINTERN VALUE
_wrap_new_Stem__SWIG_0(int argc,VALUE * argv,VALUE self)11244 _wrap_new_Stem__SWIG_0(int argc, VALUE *argv, VALUE self) {
11245   std::string *arg1 = 0 ;
11246   int res1 = SWIG_OLDOBJ ;
11247   const char *classname SWIGUNUSED = "Xapian::Stem";
11248   Xapian::Stem *result = 0 ;
11249 
11250   if ((argc < 1) || (argc > 1)) {
11251     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
11252   }
11253   {
11254     std::string *ptr = (std::string *)0;
11255     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
11256     if (!SWIG_IsOK(res1)) {
11257       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Stem", 1, argv[0] ));
11258     }
11259     if (!ptr) {
11260       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Stem", 1, argv[0]));
11261     }
11262     arg1 = ptr;
11263   }
11264   {
11265     try {
11266       result = (Xapian::Stem *)new Xapian::Stem((std::string const &)*arg1);
11267       DATA_PTR(self) = result;
11268     } catch (...) {
11269       string msg;
11270       int code = XapianExceptionHandler(msg);
11271       SWIG_exception(code, msg.c_str());
11272     }
11273   }
11274   if (SWIG_IsNewObj(res1)) delete arg1;
11275   return self;
11276 fail:
11277   if (SWIG_IsNewObj(res1)) delete arg1;
11278   return Qnil;
11279 }
11280 
11281 
11282 SWIGINTERN VALUE
_wrap_new_Stem__SWIG_1(int argc,VALUE * argv,VALUE self)11283 _wrap_new_Stem__SWIG_1(int argc, VALUE *argv, VALUE self) {
11284   std::string *arg1 = 0 ;
11285   bool arg2 ;
11286   int res1 = SWIG_OLDOBJ ;
11287   bool val2 ;
11288   int ecode2 = 0 ;
11289   const char *classname SWIGUNUSED = "Xapian::Stem";
11290   Xapian::Stem *result = 0 ;
11291 
11292   if ((argc < 2) || (argc > 2)) {
11293     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
11294   }
11295   {
11296     std::string *ptr = (std::string *)0;
11297     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
11298     if (!SWIG_IsOK(res1)) {
11299       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Stem", 1, argv[0] ));
11300     }
11301     if (!ptr) {
11302       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Stem", 1, argv[0]));
11303     }
11304     arg1 = ptr;
11305   }
11306   ecode2 = SWIG_AsVal_bool(argv[1], &val2);
11307   if (!SWIG_IsOK(ecode2)) {
11308     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","Stem", 2, argv[1] ));
11309   }
11310   arg2 = static_cast< bool >(val2);
11311   {
11312     try {
11313       result = (Xapian::Stem *)new Xapian::Stem((std::string const &)*arg1,arg2);
11314       DATA_PTR(self) = result;
11315     } catch (...) {
11316       string msg;
11317       int code = XapianExceptionHandler(msg);
11318       SWIG_exception(code, msg.c_str());
11319     }
11320   }
11321   if (SWIG_IsNewObj(res1)) delete arg1;
11322   return self;
11323 fail:
11324   if (SWIG_IsNewObj(res1)) delete arg1;
11325   return Qnil;
11326 }
11327 
11328 
11329 SWIGINTERN VALUE
11330 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_Stem_allocate(VALUE self)11331 _wrap_Stem_allocate(VALUE self)
11332 #else
11333 _wrap_Stem_allocate(int argc, VALUE *argv, VALUE self)
11334 #endif
11335 {
11336   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__Stem);
11337 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
11338   rb_obj_call_init(vresult, argc, argv);
11339 #endif
11340   return vresult;
11341 }
11342 
11343 
11344 SWIGINTERN VALUE
_wrap_new_Stem__SWIG_2(int argc,VALUE * argv,VALUE self)11345 _wrap_new_Stem__SWIG_2(int argc, VALUE *argv, VALUE self) {
11346   Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
11347   void *argp1 = 0 ;
11348   int res1 = 0 ;
11349   const char *classname SWIGUNUSED = "Xapian::Stem";
11350   Xapian::Stem *result = 0 ;
11351 
11352   if ((argc < 1) || (argc > 1)) {
11353     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
11354   }
11355   res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Xapian__StemImplementation, 0 |  0 );
11356   if (!SWIG_IsOK(res1)) {
11357     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::StemImplementation *","Stem", 1, argv[0] ));
11358   }
11359   arg1 = reinterpret_cast< Xapian::StemImplementation * >(argp1);
11360   {
11361     try {
11362       result = (Xapian::Stem *)new Xapian::Stem(arg1);
11363       DATA_PTR(self) = result;
11364     } catch (...) {
11365       string msg;
11366       int code = XapianExceptionHandler(msg);
11367       SWIG_exception(code, msg.c_str());
11368     }
11369   }
11370   return self;
11371 fail:
11372   return Qnil;
11373 }
11374 
11375 
_wrap_new_Stem(int nargs,VALUE * args,VALUE self)11376 SWIGINTERN VALUE _wrap_new_Stem(int nargs, VALUE *args, VALUE self) {
11377   int argc;
11378   VALUE argv[2];
11379   int ii;
11380 
11381   argc = nargs;
11382   if (argc > 2) SWIG_fail;
11383   for (ii = 0; (ii < argc); ++ii) {
11384     argv[ii] = args[ii];
11385   }
11386   if (argc == 1) {
11387     int _v;
11388     void *vptr = 0;
11389     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__StemImplementation, 0);
11390     _v = SWIG_CheckState(res);
11391     if (_v) {
11392       return _wrap_new_Stem__SWIG_2(nargs, args, self);
11393     }
11394   }
11395   if (argc == 1) {
11396     int _v;
11397     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
11398     _v = SWIG_CheckState(res);
11399     if (_v) {
11400       return _wrap_new_Stem__SWIG_0(nargs, args, self);
11401     }
11402   }
11403   if (argc == 2) {
11404     int _v;
11405     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
11406     _v = SWIG_CheckState(res);
11407     if (_v) {
11408       {
11409         int res = SWIG_AsVal_bool(argv[1], NULL);
11410         _v = SWIG_CheckState(res);
11411       }
11412       if (_v) {
11413         return _wrap_new_Stem__SWIG_1(nargs, args, self);
11414       }
11415     }
11416   }
11417 
11418 fail:
11419   Ruby_Format_OverloadedError( argc, 2, "Stem.new",
11420     "    Stem.new(std::string const &language)\n"
11421     "    Stem.new(std::string const &language, bool fallback)\n"
11422     "    Stem.new(Xapian::StemImplementation *p)\n");
11423 
11424   return Qnil;
11425 }
11426 
11427 
11428 SWIGINTERN void
free_Xapian_Stem(void * self)11429 free_Xapian_Stem(void *self) {
11430     Xapian::Stem *arg1 = (Xapian::Stem *)self;
11431     delete arg1;
11432 }
11433 
11434 SWIGINTERN VALUE
_wrap_Stem___call__(int argc,VALUE * argv,VALUE self)11435 _wrap_Stem___call__(int argc, VALUE *argv, VALUE self) {
11436   Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
11437   std::string *arg2 = 0 ;
11438   void *argp1 = 0 ;
11439   int res1 = 0 ;
11440   int res2 = SWIG_OLDOBJ ;
11441   std::string result;
11442   VALUE vresult = Qnil;
11443 
11444   if ((argc < 1) || (argc > 1)) {
11445     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
11446   }
11447   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Stem, 0 |  0 );
11448   if (!SWIG_IsOK(res1)) {
11449     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Stem const *","operator ()", 1, self ));
11450   }
11451   arg1 = reinterpret_cast< Xapian::Stem * >(argp1);
11452   {
11453     std::string *ptr = (std::string *)0;
11454     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
11455     if (!SWIG_IsOK(res2)) {
11456       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","operator ()", 2, argv[0] ));
11457     }
11458     if (!ptr) {
11459       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","operator ()", 2, argv[0]));
11460     }
11461     arg2 = ptr;
11462   }
11463   {
11464     try {
11465       result = ((Xapian::Stem const *)arg1)->operator ()((std::string const &)*arg2);
11466     } catch (...) {
11467       string msg;
11468       int code = XapianExceptionHandler(msg);
11469       SWIG_exception(code, msg.c_str());
11470     }
11471   }
11472   vresult = SWIG_From_std_string(static_cast< std::string >(result));
11473   if (SWIG_IsNewObj(res2)) delete arg2;
11474   return vresult;
11475 fail:
11476   if (SWIG_IsNewObj(res2)) delete arg2;
11477   return Qnil;
11478 }
11479 
11480 
11481 SWIGINTERN VALUE
_wrap_Stem_is_none(int argc,VALUE * argv,VALUE self)11482 _wrap_Stem_is_none(int argc, VALUE *argv, VALUE self) {
11483   Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
11484   void *argp1 = 0 ;
11485   int res1 = 0 ;
11486   bool result;
11487   VALUE vresult = Qnil;
11488 
11489   if ((argc < 0) || (argc > 0)) {
11490     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
11491   }
11492   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Stem, 0 |  0 );
11493   if (!SWIG_IsOK(res1)) {
11494     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Stem const *","is_none", 1, self ));
11495   }
11496   arg1 = reinterpret_cast< Xapian::Stem * >(argp1);
11497   {
11498     try {
11499       result = (bool)((Xapian::Stem const *)arg1)->is_none();
11500     } catch (...) {
11501       string msg;
11502       int code = XapianExceptionHandler(msg);
11503       SWIG_exception(code, msg.c_str());
11504     }
11505   }
11506   vresult = SWIG_From_bool(static_cast< bool >(result));
11507   return vresult;
11508 fail:
11509   return Qnil;
11510 }
11511 
11512 
11513 SWIGINTERN VALUE
_wrap_Stem_description(int argc,VALUE * argv,VALUE self)11514 _wrap_Stem_description(int argc, VALUE *argv, VALUE self) {
11515   Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
11516   void *argp1 = 0 ;
11517   int res1 = 0 ;
11518   std::string result;
11519   VALUE vresult = Qnil;
11520 
11521   if ((argc < 0) || (argc > 0)) {
11522     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
11523   }
11524   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Stem, 0 |  0 );
11525   if (!SWIG_IsOK(res1)) {
11526     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Stem const *","get_description", 1, self ));
11527   }
11528   arg1 = reinterpret_cast< Xapian::Stem * >(argp1);
11529   {
11530     try {
11531       result = ((Xapian::Stem const *)arg1)->get_description();
11532     } catch (...) {
11533       string msg;
11534       int code = XapianExceptionHandler(msg);
11535       SWIG_exception(code, msg.c_str());
11536     }
11537   }
11538   vresult = SWIG_From_std_string(static_cast< std::string >(result));
11539   return vresult;
11540 fail:
11541   return Qnil;
11542 }
11543 
11544 
11545 SWIGINTERN VALUE
_wrap_Stem_available_languages(int argc,VALUE * argv,VALUE self)11546 _wrap_Stem_available_languages(int argc, VALUE *argv, VALUE self) {
11547   std::string result;
11548   VALUE vresult = Qnil;
11549 
11550   if ((argc < 0) || (argc > 0)) {
11551     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
11552   }
11553   {
11554     try {
11555       result = Xapian::Stem::get_available_languages();
11556     } catch (...) {
11557       string msg;
11558       int code = XapianExceptionHandler(msg);
11559       SWIG_exception(code, msg.c_str());
11560     }
11561   }
11562   vresult = SWIG_From_std_string(static_cast< std::string >(result));
11563   return vresult;
11564 fail:
11565   return Qnil;
11566 }
11567 
11568 
11569 static swig_class SwigClassTermGenerator;
11570 
11571 SWIGINTERN VALUE
11572 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_TermGenerator_allocate(VALUE self)11573 _wrap_TermGenerator_allocate(VALUE self)
11574 #else
11575 _wrap_TermGenerator_allocate(int argc, VALUE *argv, VALUE self)
11576 #endif
11577 {
11578   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__TermGenerator);
11579 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
11580   rb_obj_call_init(vresult, argc, argv);
11581 #endif
11582   return vresult;
11583 }
11584 
11585 
11586 SWIGINTERN VALUE
_wrap_new_TermGenerator(int argc,VALUE * argv,VALUE self)11587 _wrap_new_TermGenerator(int argc, VALUE *argv, VALUE self) {
11588   const char *classname SWIGUNUSED = "Xapian::TermGenerator";
11589   Xapian::TermGenerator *result = 0 ;
11590 
11591   if ((argc < 0) || (argc > 0)) {
11592     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
11593   }
11594   {
11595     try {
11596       result = (Xapian::TermGenerator *)new Xapian::TermGenerator();
11597       DATA_PTR(self) = result;
11598     } catch (...) {
11599       string msg;
11600       int code = XapianExceptionHandler(msg);
11601       SWIG_exception(code, msg.c_str());
11602     }
11603   }
11604   return self;
11605 fail:
11606   return Qnil;
11607 }
11608 
11609 
11610 SWIGINTERN void
free_Xapian_TermGenerator(void * self)11611 free_Xapian_TermGenerator(void *self) {
11612     Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *)self;
11613     delete arg1;
11614 }
11615 
11616 SWIGINTERN VALUE
_wrap_TermGenerator_stemmere___(int argc,VALUE * argv,VALUE self)11617 _wrap_TermGenerator_stemmere___(int argc, VALUE *argv, VALUE self) {
11618   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
11619   Xapian::Stem *arg2 = 0 ;
11620   void *argp1 = 0 ;
11621   int res1 = 0 ;
11622   void *argp2 ;
11623   int res2 = 0 ;
11624 
11625   if ((argc < 1) || (argc > 1)) {
11626     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
11627   }
11628   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
11629   if (!SWIG_IsOK(res1)) {
11630     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator *","set_stemmer", 1, self ));
11631   }
11632   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
11633   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Stem,  0 );
11634   if (!SWIG_IsOK(res2)) {
11635     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Stem const &","set_stemmer", 2, argv[0] ));
11636   }
11637   if (!argp2) {
11638     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Stem const &","set_stemmer", 2, argv[0]));
11639   }
11640   arg2 = reinterpret_cast< Xapian::Stem * >(argp2);
11641   {
11642     try {
11643       (arg1)->set_stemmer((Xapian::Stem const &)*arg2);
11644     } catch (...) {
11645       string msg;
11646       int code = XapianExceptionHandler(msg);
11647       SWIG_exception(code, msg.c_str());
11648     }
11649   }
11650   return Qnil;
11651 fail:
11652   return Qnil;
11653 }
11654 
11655 
11656 SWIGINTERN VALUE
_wrap_TermGenerator_stoppere_____SWIG_0(int argc,VALUE * argv,VALUE self)11657 _wrap_TermGenerator_stoppere_____SWIG_0(int argc, VALUE *argv, VALUE self) {
11658   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
11659   Xapian::Stopper *arg2 = (Xapian::Stopper *) 0 ;
11660   void *argp1 = 0 ;
11661   int res1 = 0 ;
11662   void *argp2 = 0 ;
11663   int res2 = 0 ;
11664 
11665   if ((argc < 1) || (argc > 1)) {
11666     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
11667   }
11668   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
11669   if (!SWIG_IsOK(res1)) {
11670     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator *","set_stopper", 1, self ));
11671   }
11672   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
11673   res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Xapian__Stopper, 0 |  0 );
11674   if (!SWIG_IsOK(res2)) {
11675     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Stopper const *","set_stopper", 2, argv[0] ));
11676   }
11677   arg2 = reinterpret_cast< Xapian::Stopper * >(argp2);
11678   {
11679     try {
11680       (arg1)->set_stopper((Xapian::Stopper const *)arg2);
11681     } catch (...) {
11682       string msg;
11683       int code = XapianExceptionHandler(msg);
11684       SWIG_exception(code, msg.c_str());
11685     }
11686   }
11687   return Qnil;
11688 fail:
11689   return Qnil;
11690 }
11691 
11692 
11693 SWIGINTERN VALUE
_wrap_TermGenerator_stoppere_____SWIG_1(int argc,VALUE * argv,VALUE self)11694 _wrap_TermGenerator_stoppere_____SWIG_1(int argc, VALUE *argv, VALUE self) {
11695   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
11696   void *argp1 = 0 ;
11697   int res1 = 0 ;
11698 
11699   if ((argc < 0) || (argc > 0)) {
11700     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
11701   }
11702   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
11703   if (!SWIG_IsOK(res1)) {
11704     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator *","set_stopper", 1, self ));
11705   }
11706   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
11707   {
11708     try {
11709       (arg1)->set_stopper();
11710     } catch (...) {
11711       string msg;
11712       int code = XapianExceptionHandler(msg);
11713       SWIG_exception(code, msg.c_str());
11714     }
11715   }
11716   return Qnil;
11717 fail:
11718   return Qnil;
11719 }
11720 
11721 
_wrap_TermGenerator_stoppere___(int nargs,VALUE * args,VALUE self)11722 SWIGINTERN VALUE _wrap_TermGenerator_stoppere___(int nargs, VALUE *args, VALUE self) {
11723   int argc;
11724   VALUE argv[3];
11725   int ii;
11726 
11727   argc = nargs + 1;
11728   argv[0] = self;
11729   if (argc > 3) SWIG_fail;
11730   for (ii = 1; (ii < argc); ++ii) {
11731     argv[ii] = args[ii-1];
11732   }
11733   if (argc == 1) {
11734     int _v;
11735     void *vptr = 0;
11736     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
11737     _v = SWIG_CheckState(res);
11738     if (_v) {
11739       return _wrap_TermGenerator_stoppere_____SWIG_1(nargs, args, self);
11740     }
11741   }
11742   if (argc == 2) {
11743     int _v;
11744     void *vptr = 0;
11745     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
11746     _v = SWIG_CheckState(res);
11747     if (_v) {
11748       void *vptr = 0;
11749       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__Stopper, 0);
11750       _v = SWIG_CheckState(res);
11751       if (_v) {
11752         return _wrap_TermGenerator_stoppere_____SWIG_0(nargs, args, self);
11753       }
11754     }
11755   }
11756 
11757 fail:
11758   Ruby_Format_OverloadedError( argc, 3, "TermGenerator.stopper=",
11759     "    void TermGenerator.stopper=(Xapian::Stopper const *stop)\n"
11760     "    void TermGenerator.stopper=()\n");
11761 
11762   return Qnil;
11763 }
11764 
11765 
11766 SWIGINTERN VALUE
_wrap_TermGenerator_documente___(int argc,VALUE * argv,VALUE self)11767 _wrap_TermGenerator_documente___(int argc, VALUE *argv, VALUE self) {
11768   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
11769   Xapian::Document *arg2 = 0 ;
11770   void *argp1 = 0 ;
11771   int res1 = 0 ;
11772   void *argp2 ;
11773   int res2 = 0 ;
11774 
11775   if ((argc < 1) || (argc > 1)) {
11776     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
11777   }
11778   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
11779   if (!SWIG_IsOK(res1)) {
11780     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator *","set_document", 1, self ));
11781   }
11782   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
11783   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Document,  0 );
11784   if (!SWIG_IsOK(res2)) {
11785     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Document const &","set_document", 2, argv[0] ));
11786   }
11787   if (!argp2) {
11788     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Document const &","set_document", 2, argv[0]));
11789   }
11790   arg2 = reinterpret_cast< Xapian::Document * >(argp2);
11791   {
11792     try {
11793       (arg1)->set_document((Xapian::Document const &)*arg2);
11794     } catch (...) {
11795       string msg;
11796       int code = XapianExceptionHandler(msg);
11797       SWIG_exception(code, msg.c_str());
11798     }
11799   }
11800   return Qnil;
11801 fail:
11802   return Qnil;
11803 }
11804 
11805 
11806 SWIGINTERN VALUE
_wrap_TermGenerator_document(int argc,VALUE * argv,VALUE self)11807 _wrap_TermGenerator_document(int argc, VALUE *argv, VALUE self) {
11808   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
11809   void *argp1 = 0 ;
11810   int res1 = 0 ;
11811   Xapian::Document *result = 0 ;
11812   VALUE vresult = Qnil;
11813 
11814   if ((argc < 0) || (argc > 0)) {
11815     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
11816   }
11817   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
11818   if (!SWIG_IsOK(res1)) {
11819     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator const *","get_document", 1, self ));
11820   }
11821   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
11822   {
11823     try {
11824       result = (Xapian::Document *) &((Xapian::TermGenerator const *)arg1)->get_document();
11825     } catch (...) {
11826       string msg;
11827       int code = XapianExceptionHandler(msg);
11828       SWIG_exception(code, msg.c_str());
11829     }
11830   }
11831   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Document, 0 |  0 );
11832   return vresult;
11833 fail:
11834   return Qnil;
11835 }
11836 
11837 
11838 SWIGINTERN VALUE
_wrap_TermGenerator_databasee___(int argc,VALUE * argv,VALUE self)11839 _wrap_TermGenerator_databasee___(int argc, VALUE *argv, VALUE self) {
11840   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
11841   Xapian::WritableDatabase *arg2 = 0 ;
11842   void *argp1 = 0 ;
11843   int res1 = 0 ;
11844   void *argp2 ;
11845   int res2 = 0 ;
11846 
11847   if ((argc < 1) || (argc > 1)) {
11848     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
11849   }
11850   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
11851   if (!SWIG_IsOK(res1)) {
11852     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator *","set_database", 1, self ));
11853   }
11854   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
11855   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__WritableDatabase,  0 );
11856   if (!SWIG_IsOK(res2)) {
11857     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::WritableDatabase const &","set_database", 2, argv[0] ));
11858   }
11859   if (!argp2) {
11860     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::WritableDatabase const &","set_database", 2, argv[0]));
11861   }
11862   arg2 = reinterpret_cast< Xapian::WritableDatabase * >(argp2);
11863   {
11864     try {
11865       (arg1)->set_database((Xapian::WritableDatabase const &)*arg2);
11866     } catch (...) {
11867       string msg;
11868       int code = XapianExceptionHandler(msg);
11869       SWIG_exception(code, msg.c_str());
11870     }
11871   }
11872   return Qnil;
11873 fail:
11874   return Qnil;
11875 }
11876 
11877 
11878 SWIGINTERN VALUE
_wrap_TermGenerator_set_flags__SWIG_0(int argc,VALUE * argv,VALUE self)11879 _wrap_TermGenerator_set_flags__SWIG_0(int argc, VALUE *argv, VALUE self) {
11880   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
11881   Xapian::TermGenerator::flags arg2 ;
11882   Xapian::TermGenerator::flags arg3 ;
11883   void *argp1 = 0 ;
11884   int res1 = 0 ;
11885   int val2 ;
11886   int ecode2 = 0 ;
11887   int val3 ;
11888   int ecode3 = 0 ;
11889   Xapian::TermGenerator::flags result;
11890   VALUE vresult = Qnil;
11891 
11892   if ((argc < 2) || (argc > 2)) {
11893     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
11894   }
11895   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
11896   if (!SWIG_IsOK(res1)) {
11897     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator *","set_flags", 1, self ));
11898   }
11899   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
11900   ecode2 = SWIG_AsVal_int(argv[0], &val2);
11901   if (!SWIG_IsOK(ecode2)) {
11902     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::TermGenerator::flags","set_flags", 2, argv[0] ));
11903   }
11904   arg2 = static_cast< Xapian::TermGenerator::flags >(val2);
11905   ecode3 = SWIG_AsVal_int(argv[1], &val3);
11906   if (!SWIG_IsOK(ecode3)) {
11907     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::TermGenerator::flags","set_flags", 3, argv[1] ));
11908   }
11909   arg3 = static_cast< Xapian::TermGenerator::flags >(val3);
11910   {
11911     try {
11912       result = (Xapian::TermGenerator::flags)(arg1)->set_flags(arg2,arg3);
11913     } catch (...) {
11914       string msg;
11915       int code = XapianExceptionHandler(msg);
11916       SWIG_exception(code, msg.c_str());
11917     }
11918   }
11919   vresult = SWIG_From_int(static_cast< int >(result));
11920   return vresult;
11921 fail:
11922   return Qnil;
11923 }
11924 
11925 
11926 SWIGINTERN VALUE
_wrap_TermGenerator_set_flags__SWIG_1(int argc,VALUE * argv,VALUE self)11927 _wrap_TermGenerator_set_flags__SWIG_1(int argc, VALUE *argv, VALUE self) {
11928   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
11929   Xapian::TermGenerator::flags arg2 ;
11930   void *argp1 = 0 ;
11931   int res1 = 0 ;
11932   int val2 ;
11933   int ecode2 = 0 ;
11934   Xapian::TermGenerator::flags result;
11935   VALUE vresult = Qnil;
11936 
11937   if ((argc < 1) || (argc > 1)) {
11938     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
11939   }
11940   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
11941   if (!SWIG_IsOK(res1)) {
11942     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator *","set_flags", 1, self ));
11943   }
11944   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
11945   ecode2 = SWIG_AsVal_int(argv[0], &val2);
11946   if (!SWIG_IsOK(ecode2)) {
11947     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::TermGenerator::flags","set_flags", 2, argv[0] ));
11948   }
11949   arg2 = static_cast< Xapian::TermGenerator::flags >(val2);
11950   {
11951     try {
11952       result = (Xapian::TermGenerator::flags)(arg1)->set_flags(arg2);
11953     } catch (...) {
11954       string msg;
11955       int code = XapianExceptionHandler(msg);
11956       SWIG_exception(code, msg.c_str());
11957     }
11958   }
11959   vresult = SWIG_From_int(static_cast< int >(result));
11960   return vresult;
11961 fail:
11962   return Qnil;
11963 }
11964 
11965 
_wrap_TermGenerator_set_flags(int nargs,VALUE * args,VALUE self)11966 SWIGINTERN VALUE _wrap_TermGenerator_set_flags(int nargs, VALUE *args, VALUE self) {
11967   int argc;
11968   VALUE argv[4];
11969   int ii;
11970 
11971   argc = nargs + 1;
11972   argv[0] = self;
11973   if (argc > 4) SWIG_fail;
11974   for (ii = 1; (ii < argc); ++ii) {
11975     argv[ii] = args[ii-1];
11976   }
11977   if (argc == 2) {
11978     int _v;
11979     void *vptr = 0;
11980     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
11981     _v = SWIG_CheckState(res);
11982     if (_v) {
11983       {
11984         int res = SWIG_AsVal_int(argv[1], NULL);
11985         _v = SWIG_CheckState(res);
11986       }
11987       if (_v) {
11988         return _wrap_TermGenerator_set_flags__SWIG_1(nargs, args, self);
11989       }
11990     }
11991   }
11992   if (argc == 3) {
11993     int _v;
11994     void *vptr = 0;
11995     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
11996     _v = SWIG_CheckState(res);
11997     if (_v) {
11998       {
11999         int res = SWIG_AsVal_int(argv[1], NULL);
12000         _v = SWIG_CheckState(res);
12001       }
12002       if (_v) {
12003         {
12004           int res = SWIG_AsVal_int(argv[2], NULL);
12005           _v = SWIG_CheckState(res);
12006         }
12007         if (_v) {
12008           return _wrap_TermGenerator_set_flags__SWIG_0(nargs, args, self);
12009         }
12010       }
12011     }
12012   }
12013 
12014 fail:
12015   Ruby_Format_OverloadedError( argc, 4, "TermGenerator.set_flags",
12016     "    Xapian::TermGenerator::flags TermGenerator.set_flags(Xapian::TermGenerator::flags toggle, Xapian::TermGenerator::flags mask)\n"
12017     "    Xapian::TermGenerator::flags TermGenerator.set_flags(Xapian::TermGenerator::flags toggle)\n");
12018 
12019   return Qnil;
12020 }
12021 
12022 
12023 SWIGINTERN VALUE
_wrap_TermGenerator_stemming_strategye___(int argc,VALUE * argv,VALUE self)12024 _wrap_TermGenerator_stemming_strategye___(int argc, VALUE *argv, VALUE self) {
12025   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
12026   Xapian::TermGenerator::stem_strategy arg2 ;
12027   void *argp1 = 0 ;
12028   int res1 = 0 ;
12029   int val2 ;
12030   int ecode2 = 0 ;
12031 
12032   if ((argc < 1) || (argc > 1)) {
12033     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
12034   }
12035   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
12036   if (!SWIG_IsOK(res1)) {
12037     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator *","set_stemming_strategy", 1, self ));
12038   }
12039   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
12040   ecode2 = SWIG_AsVal_int(argv[0], &val2);
12041   if (!SWIG_IsOK(ecode2)) {
12042     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::TermGenerator::stem_strategy","set_stemming_strategy", 2, argv[0] ));
12043   }
12044   arg2 = static_cast< Xapian::TermGenerator::stem_strategy >(val2);
12045   {
12046     try {
12047       (arg1)->set_stemming_strategy(arg2);
12048     } catch (...) {
12049       string msg;
12050       int code = XapianExceptionHandler(msg);
12051       SWIG_exception(code, msg.c_str());
12052     }
12053   }
12054   return Qnil;
12055 fail:
12056   return Qnil;
12057 }
12058 
12059 
12060 SWIGINTERN VALUE
_wrap_TermGenerator_set_stopper_strategy(int argc,VALUE * argv,VALUE self)12061 _wrap_TermGenerator_set_stopper_strategy(int argc, VALUE *argv, VALUE self) {
12062   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
12063   Xapian::TermGenerator::stop_strategy arg2 ;
12064   void *argp1 = 0 ;
12065   int res1 = 0 ;
12066   int val2 ;
12067   int ecode2 = 0 ;
12068 
12069   if ((argc < 1) || (argc > 1)) {
12070     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
12071   }
12072   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
12073   if (!SWIG_IsOK(res1)) {
12074     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator *","set_stopper_strategy", 1, self ));
12075   }
12076   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
12077   ecode2 = SWIG_AsVal_int(argv[0], &val2);
12078   if (!SWIG_IsOK(ecode2)) {
12079     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::TermGenerator::stop_strategy","set_stopper_strategy", 2, argv[0] ));
12080   }
12081   arg2 = static_cast< Xapian::TermGenerator::stop_strategy >(val2);
12082   {
12083     try {
12084       (arg1)->set_stopper_strategy(arg2);
12085     } catch (...) {
12086       string msg;
12087       int code = XapianExceptionHandler(msg);
12088       SWIG_exception(code, msg.c_str());
12089     }
12090   }
12091   return Qnil;
12092 fail:
12093   return Qnil;
12094 }
12095 
12096 
12097 SWIGINTERN VALUE
_wrap_TermGenerator_set_max_word_length(int argc,VALUE * argv,VALUE self)12098 _wrap_TermGenerator_set_max_word_length(int argc, VALUE *argv, VALUE self) {
12099   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
12100   unsigned int arg2 ;
12101   void *argp1 = 0 ;
12102   int res1 = 0 ;
12103   unsigned int val2 ;
12104   int ecode2 = 0 ;
12105 
12106   if ((argc < 1) || (argc > 1)) {
12107     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
12108   }
12109   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
12110   if (!SWIG_IsOK(res1)) {
12111     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator *","set_max_word_length", 1, self ));
12112   }
12113   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
12114   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
12115   if (!SWIG_IsOK(ecode2)) {
12116     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","set_max_word_length", 2, argv[0] ));
12117   }
12118   arg2 = static_cast< unsigned int >(val2);
12119   {
12120     try {
12121       (arg1)->set_max_word_length(arg2);
12122     } catch (...) {
12123       string msg;
12124       int code = XapianExceptionHandler(msg);
12125       SWIG_exception(code, msg.c_str());
12126     }
12127   }
12128   return Qnil;
12129 fail:
12130   return Qnil;
12131 }
12132 
12133 
12134 SWIGINTERN VALUE
_wrap_TermGenerator_index_text__SWIG_0(int argc,VALUE * argv,VALUE self)12135 _wrap_TermGenerator_index_text__SWIG_0(int argc, VALUE *argv, VALUE self) {
12136   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
12137   std::string *arg2 = 0 ;
12138   Xapian::termcount arg3 ;
12139   std::string *arg4 = 0 ;
12140   void *argp1 = 0 ;
12141   int res1 = 0 ;
12142   int res2 = SWIG_OLDOBJ ;
12143   unsigned int val3 ;
12144   int ecode3 = 0 ;
12145   int res4 = SWIG_OLDOBJ ;
12146 
12147   if ((argc < 3) || (argc > 3)) {
12148     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
12149   }
12150   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
12151   if (!SWIG_IsOK(res1)) {
12152     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator *","index_text", 1, self ));
12153   }
12154   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
12155   {
12156     std::string *ptr = (std::string *)0;
12157     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
12158     if (!SWIG_IsOK(res2)) {
12159       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","index_text", 2, argv[0] ));
12160     }
12161     if (!ptr) {
12162       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","index_text", 2, argv[0]));
12163     }
12164     arg2 = ptr;
12165   }
12166   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
12167   if (!SWIG_IsOK(ecode3)) {
12168     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","index_text", 3, argv[1] ));
12169   }
12170   arg3 = static_cast< Xapian::termcount >(val3);
12171   {
12172     std::string *ptr = (std::string *)0;
12173     res4 = SWIG_AsPtr_std_string(argv[2], &ptr);
12174     if (!SWIG_IsOK(res4)) {
12175       SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "std::string const &","index_text", 4, argv[2] ));
12176     }
12177     if (!ptr) {
12178       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","index_text", 4, argv[2]));
12179     }
12180     arg4 = ptr;
12181   }
12182   {
12183     try {
12184       (arg1)->index_text((std::string const &)*arg2,arg3,(std::string const &)*arg4);
12185     } catch (...) {
12186       string msg;
12187       int code = XapianExceptionHandler(msg);
12188       SWIG_exception(code, msg.c_str());
12189     }
12190   }
12191   if (SWIG_IsNewObj(res2)) delete arg2;
12192   if (SWIG_IsNewObj(res4)) delete arg4;
12193   return Qnil;
12194 fail:
12195   if (SWIG_IsNewObj(res2)) delete arg2;
12196   if (SWIG_IsNewObj(res4)) delete arg4;
12197   return Qnil;
12198 }
12199 
12200 
12201 SWIGINTERN VALUE
_wrap_TermGenerator_index_text__SWIG_1(int argc,VALUE * argv,VALUE self)12202 _wrap_TermGenerator_index_text__SWIG_1(int argc, VALUE *argv, VALUE self) {
12203   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
12204   std::string *arg2 = 0 ;
12205   Xapian::termcount arg3 ;
12206   void *argp1 = 0 ;
12207   int res1 = 0 ;
12208   int res2 = SWIG_OLDOBJ ;
12209   unsigned int val3 ;
12210   int ecode3 = 0 ;
12211 
12212   if ((argc < 2) || (argc > 2)) {
12213     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
12214   }
12215   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
12216   if (!SWIG_IsOK(res1)) {
12217     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator *","index_text", 1, self ));
12218   }
12219   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
12220   {
12221     std::string *ptr = (std::string *)0;
12222     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
12223     if (!SWIG_IsOK(res2)) {
12224       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","index_text", 2, argv[0] ));
12225     }
12226     if (!ptr) {
12227       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","index_text", 2, argv[0]));
12228     }
12229     arg2 = ptr;
12230   }
12231   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
12232   if (!SWIG_IsOK(ecode3)) {
12233     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","index_text", 3, argv[1] ));
12234   }
12235   arg3 = static_cast< Xapian::termcount >(val3);
12236   {
12237     try {
12238       (arg1)->index_text((std::string const &)*arg2,arg3);
12239     } catch (...) {
12240       string msg;
12241       int code = XapianExceptionHandler(msg);
12242       SWIG_exception(code, msg.c_str());
12243     }
12244   }
12245   if (SWIG_IsNewObj(res2)) delete arg2;
12246   return Qnil;
12247 fail:
12248   if (SWIG_IsNewObj(res2)) delete arg2;
12249   return Qnil;
12250 }
12251 
12252 
12253 SWIGINTERN VALUE
_wrap_TermGenerator_index_text__SWIG_2(int argc,VALUE * argv,VALUE self)12254 _wrap_TermGenerator_index_text__SWIG_2(int argc, VALUE *argv, VALUE self) {
12255   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
12256   std::string *arg2 = 0 ;
12257   void *argp1 = 0 ;
12258   int res1 = 0 ;
12259   int res2 = SWIG_OLDOBJ ;
12260 
12261   if ((argc < 1) || (argc > 1)) {
12262     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
12263   }
12264   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
12265   if (!SWIG_IsOK(res1)) {
12266     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator *","index_text", 1, self ));
12267   }
12268   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
12269   {
12270     std::string *ptr = (std::string *)0;
12271     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
12272     if (!SWIG_IsOK(res2)) {
12273       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","index_text", 2, argv[0] ));
12274     }
12275     if (!ptr) {
12276       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","index_text", 2, argv[0]));
12277     }
12278     arg2 = ptr;
12279   }
12280   {
12281     try {
12282       (arg1)->index_text((std::string const &)*arg2);
12283     } catch (...) {
12284       string msg;
12285       int code = XapianExceptionHandler(msg);
12286       SWIG_exception(code, msg.c_str());
12287     }
12288   }
12289   if (SWIG_IsNewObj(res2)) delete arg2;
12290   return Qnil;
12291 fail:
12292   if (SWIG_IsNewObj(res2)) delete arg2;
12293   return Qnil;
12294 }
12295 
12296 
_wrap_TermGenerator_index_text(int nargs,VALUE * args,VALUE self)12297 SWIGINTERN VALUE _wrap_TermGenerator_index_text(int nargs, VALUE *args, VALUE self) {
12298   int argc;
12299   VALUE argv[5];
12300   int ii;
12301 
12302   argc = nargs + 1;
12303   argv[0] = self;
12304   if (argc > 5) SWIG_fail;
12305   for (ii = 1; (ii < argc); ++ii) {
12306     argv[ii] = args[ii-1];
12307   }
12308   if (argc == 2) {
12309     int _v;
12310     void *vptr = 0;
12311     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
12312     _v = SWIG_CheckState(res);
12313     if (_v) {
12314       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
12315       _v = SWIG_CheckState(res);
12316       if (_v) {
12317         return _wrap_TermGenerator_index_text__SWIG_2(nargs, args, self);
12318       }
12319     }
12320   }
12321   if (argc == 3) {
12322     int _v;
12323     void *vptr = 0;
12324     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
12325     _v = SWIG_CheckState(res);
12326     if (_v) {
12327       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
12328       _v = SWIG_CheckState(res);
12329       if (_v) {
12330         {
12331           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
12332           _v = SWIG_CheckState(res);
12333         }
12334         if (_v) {
12335           return _wrap_TermGenerator_index_text__SWIG_1(nargs, args, self);
12336         }
12337       }
12338     }
12339   }
12340   if (argc == 4) {
12341     int _v;
12342     void *vptr = 0;
12343     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
12344     _v = SWIG_CheckState(res);
12345     if (_v) {
12346       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
12347       _v = SWIG_CheckState(res);
12348       if (_v) {
12349         {
12350           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
12351           _v = SWIG_CheckState(res);
12352         }
12353         if (_v) {
12354           int res = SWIG_AsPtr_std_string(argv[3], (std::string**)(0));
12355           _v = SWIG_CheckState(res);
12356           if (_v) {
12357             return _wrap_TermGenerator_index_text__SWIG_0(nargs, args, self);
12358           }
12359         }
12360       }
12361     }
12362   }
12363 
12364 fail:
12365   Ruby_Format_OverloadedError( argc, 5, "TermGenerator.index_text",
12366     "    void TermGenerator.index_text(std::string const &text, Xapian::termcount wdf_inc, std::string const &prefix)\n"
12367     "    void TermGenerator.index_text(std::string const &text, Xapian::termcount wdf_inc)\n"
12368     "    void TermGenerator.index_text(std::string const &text)\n");
12369 
12370   return Qnil;
12371 }
12372 
12373 
12374 SWIGINTERN VALUE
_wrap_TermGenerator_index_text_without_positions__SWIG_0(int argc,VALUE * argv,VALUE self)12375 _wrap_TermGenerator_index_text_without_positions__SWIG_0(int argc, VALUE *argv, VALUE self) {
12376   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
12377   std::string *arg2 = 0 ;
12378   Xapian::termcount arg3 ;
12379   std::string *arg4 = 0 ;
12380   void *argp1 = 0 ;
12381   int res1 = 0 ;
12382   int res2 = SWIG_OLDOBJ ;
12383   unsigned int val3 ;
12384   int ecode3 = 0 ;
12385   int res4 = SWIG_OLDOBJ ;
12386 
12387   if ((argc < 3) || (argc > 3)) {
12388     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
12389   }
12390   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
12391   if (!SWIG_IsOK(res1)) {
12392     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator *","index_text_without_positions", 1, self ));
12393   }
12394   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
12395   {
12396     std::string *ptr = (std::string *)0;
12397     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
12398     if (!SWIG_IsOK(res2)) {
12399       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","index_text_without_positions", 2, argv[0] ));
12400     }
12401     if (!ptr) {
12402       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","index_text_without_positions", 2, argv[0]));
12403     }
12404     arg2 = ptr;
12405   }
12406   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
12407   if (!SWIG_IsOK(ecode3)) {
12408     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","index_text_without_positions", 3, argv[1] ));
12409   }
12410   arg3 = static_cast< Xapian::termcount >(val3);
12411   {
12412     std::string *ptr = (std::string *)0;
12413     res4 = SWIG_AsPtr_std_string(argv[2], &ptr);
12414     if (!SWIG_IsOK(res4)) {
12415       SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "std::string const &","index_text_without_positions", 4, argv[2] ));
12416     }
12417     if (!ptr) {
12418       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","index_text_without_positions", 4, argv[2]));
12419     }
12420     arg4 = ptr;
12421   }
12422   {
12423     try {
12424       (arg1)->index_text_without_positions((std::string const &)*arg2,arg3,(std::string const &)*arg4);
12425     } catch (...) {
12426       string msg;
12427       int code = XapianExceptionHandler(msg);
12428       SWIG_exception(code, msg.c_str());
12429     }
12430   }
12431   if (SWIG_IsNewObj(res2)) delete arg2;
12432   if (SWIG_IsNewObj(res4)) delete arg4;
12433   return Qnil;
12434 fail:
12435   if (SWIG_IsNewObj(res2)) delete arg2;
12436   if (SWIG_IsNewObj(res4)) delete arg4;
12437   return Qnil;
12438 }
12439 
12440 
12441 SWIGINTERN VALUE
_wrap_TermGenerator_index_text_without_positions__SWIG_1(int argc,VALUE * argv,VALUE self)12442 _wrap_TermGenerator_index_text_without_positions__SWIG_1(int argc, VALUE *argv, VALUE self) {
12443   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
12444   std::string *arg2 = 0 ;
12445   Xapian::termcount arg3 ;
12446   void *argp1 = 0 ;
12447   int res1 = 0 ;
12448   int res2 = SWIG_OLDOBJ ;
12449   unsigned int val3 ;
12450   int ecode3 = 0 ;
12451 
12452   if ((argc < 2) || (argc > 2)) {
12453     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
12454   }
12455   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
12456   if (!SWIG_IsOK(res1)) {
12457     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator *","index_text_without_positions", 1, self ));
12458   }
12459   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
12460   {
12461     std::string *ptr = (std::string *)0;
12462     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
12463     if (!SWIG_IsOK(res2)) {
12464       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","index_text_without_positions", 2, argv[0] ));
12465     }
12466     if (!ptr) {
12467       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","index_text_without_positions", 2, argv[0]));
12468     }
12469     arg2 = ptr;
12470   }
12471   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
12472   if (!SWIG_IsOK(ecode3)) {
12473     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","index_text_without_positions", 3, argv[1] ));
12474   }
12475   arg3 = static_cast< Xapian::termcount >(val3);
12476   {
12477     try {
12478       (arg1)->index_text_without_positions((std::string const &)*arg2,arg3);
12479     } catch (...) {
12480       string msg;
12481       int code = XapianExceptionHandler(msg);
12482       SWIG_exception(code, msg.c_str());
12483     }
12484   }
12485   if (SWIG_IsNewObj(res2)) delete arg2;
12486   return Qnil;
12487 fail:
12488   if (SWIG_IsNewObj(res2)) delete arg2;
12489   return Qnil;
12490 }
12491 
12492 
12493 SWIGINTERN VALUE
_wrap_TermGenerator_index_text_without_positions__SWIG_2(int argc,VALUE * argv,VALUE self)12494 _wrap_TermGenerator_index_text_without_positions__SWIG_2(int argc, VALUE *argv, VALUE self) {
12495   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
12496   std::string *arg2 = 0 ;
12497   void *argp1 = 0 ;
12498   int res1 = 0 ;
12499   int res2 = SWIG_OLDOBJ ;
12500 
12501   if ((argc < 1) || (argc > 1)) {
12502     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
12503   }
12504   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
12505   if (!SWIG_IsOK(res1)) {
12506     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator *","index_text_without_positions", 1, self ));
12507   }
12508   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
12509   {
12510     std::string *ptr = (std::string *)0;
12511     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
12512     if (!SWIG_IsOK(res2)) {
12513       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","index_text_without_positions", 2, argv[0] ));
12514     }
12515     if (!ptr) {
12516       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","index_text_without_positions", 2, argv[0]));
12517     }
12518     arg2 = ptr;
12519   }
12520   {
12521     try {
12522       (arg1)->index_text_without_positions((std::string const &)*arg2);
12523     } catch (...) {
12524       string msg;
12525       int code = XapianExceptionHandler(msg);
12526       SWIG_exception(code, msg.c_str());
12527     }
12528   }
12529   if (SWIG_IsNewObj(res2)) delete arg2;
12530   return Qnil;
12531 fail:
12532   if (SWIG_IsNewObj(res2)) delete arg2;
12533   return Qnil;
12534 }
12535 
12536 
_wrap_TermGenerator_index_text_without_positions(int nargs,VALUE * args,VALUE self)12537 SWIGINTERN VALUE _wrap_TermGenerator_index_text_without_positions(int nargs, VALUE *args, VALUE self) {
12538   int argc;
12539   VALUE argv[5];
12540   int ii;
12541 
12542   argc = nargs + 1;
12543   argv[0] = self;
12544   if (argc > 5) SWIG_fail;
12545   for (ii = 1; (ii < argc); ++ii) {
12546     argv[ii] = args[ii-1];
12547   }
12548   if (argc == 2) {
12549     int _v;
12550     void *vptr = 0;
12551     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
12552     _v = SWIG_CheckState(res);
12553     if (_v) {
12554       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
12555       _v = SWIG_CheckState(res);
12556       if (_v) {
12557         return _wrap_TermGenerator_index_text_without_positions__SWIG_2(nargs, args, self);
12558       }
12559     }
12560   }
12561   if (argc == 3) {
12562     int _v;
12563     void *vptr = 0;
12564     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
12565     _v = SWIG_CheckState(res);
12566     if (_v) {
12567       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
12568       _v = SWIG_CheckState(res);
12569       if (_v) {
12570         {
12571           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
12572           _v = SWIG_CheckState(res);
12573         }
12574         if (_v) {
12575           return _wrap_TermGenerator_index_text_without_positions__SWIG_1(nargs, args, self);
12576         }
12577       }
12578     }
12579   }
12580   if (argc == 4) {
12581     int _v;
12582     void *vptr = 0;
12583     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
12584     _v = SWIG_CheckState(res);
12585     if (_v) {
12586       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
12587       _v = SWIG_CheckState(res);
12588       if (_v) {
12589         {
12590           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
12591           _v = SWIG_CheckState(res);
12592         }
12593         if (_v) {
12594           int res = SWIG_AsPtr_std_string(argv[3], (std::string**)(0));
12595           _v = SWIG_CheckState(res);
12596           if (_v) {
12597             return _wrap_TermGenerator_index_text_without_positions__SWIG_0(nargs, args, self);
12598           }
12599         }
12600       }
12601     }
12602   }
12603 
12604 fail:
12605   Ruby_Format_OverloadedError( argc, 5, "TermGenerator.index_text_without_positions",
12606     "    void TermGenerator.index_text_without_positions(std::string const &text, Xapian::termcount wdf_inc, std::string const &prefix)\n"
12607     "    void TermGenerator.index_text_without_positions(std::string const &text, Xapian::termcount wdf_inc)\n"
12608     "    void TermGenerator.index_text_without_positions(std::string const &text)\n");
12609 
12610   return Qnil;
12611 }
12612 
12613 
12614 SWIGINTERN VALUE
_wrap_TermGenerator_increase_termpos__SWIG_0(int argc,VALUE * argv,VALUE self)12615 _wrap_TermGenerator_increase_termpos__SWIG_0(int argc, VALUE *argv, VALUE self) {
12616   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
12617   Xapian::termpos arg2 ;
12618   void *argp1 = 0 ;
12619   int res1 = 0 ;
12620   unsigned int val2 ;
12621   int ecode2 = 0 ;
12622 
12623   if ((argc < 1) || (argc > 1)) {
12624     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
12625   }
12626   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
12627   if (!SWIG_IsOK(res1)) {
12628     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator *","increase_termpos", 1, self ));
12629   }
12630   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
12631   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
12632   if (!SWIG_IsOK(ecode2)) {
12633     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termpos","increase_termpos", 2, argv[0] ));
12634   }
12635   arg2 = static_cast< Xapian::termpos >(val2);
12636   {
12637     try {
12638       (arg1)->increase_termpos(arg2);
12639     } catch (...) {
12640       string msg;
12641       int code = XapianExceptionHandler(msg);
12642       SWIG_exception(code, msg.c_str());
12643     }
12644   }
12645   return Qnil;
12646 fail:
12647   return Qnil;
12648 }
12649 
12650 
12651 SWIGINTERN VALUE
_wrap_TermGenerator_increase_termpos__SWIG_1(int argc,VALUE * argv,VALUE self)12652 _wrap_TermGenerator_increase_termpos__SWIG_1(int argc, VALUE *argv, VALUE self) {
12653   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
12654   void *argp1 = 0 ;
12655   int res1 = 0 ;
12656 
12657   if ((argc < 0) || (argc > 0)) {
12658     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
12659   }
12660   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
12661   if (!SWIG_IsOK(res1)) {
12662     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator *","increase_termpos", 1, self ));
12663   }
12664   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
12665   {
12666     try {
12667       (arg1)->increase_termpos();
12668     } catch (...) {
12669       string msg;
12670       int code = XapianExceptionHandler(msg);
12671       SWIG_exception(code, msg.c_str());
12672     }
12673   }
12674   return Qnil;
12675 fail:
12676   return Qnil;
12677 }
12678 
12679 
_wrap_TermGenerator_increase_termpos(int nargs,VALUE * args,VALUE self)12680 SWIGINTERN VALUE _wrap_TermGenerator_increase_termpos(int nargs, VALUE *args, VALUE self) {
12681   int argc;
12682   VALUE argv[3];
12683   int ii;
12684 
12685   argc = nargs + 1;
12686   argv[0] = self;
12687   if (argc > 3) SWIG_fail;
12688   for (ii = 1; (ii < argc); ++ii) {
12689     argv[ii] = args[ii-1];
12690   }
12691   if (argc == 1) {
12692     int _v;
12693     void *vptr = 0;
12694     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
12695     _v = SWIG_CheckState(res);
12696     if (_v) {
12697       return _wrap_TermGenerator_increase_termpos__SWIG_1(nargs, args, self);
12698     }
12699   }
12700   if (argc == 2) {
12701     int _v;
12702     void *vptr = 0;
12703     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
12704     _v = SWIG_CheckState(res);
12705     if (_v) {
12706       {
12707         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
12708         _v = SWIG_CheckState(res);
12709       }
12710       if (_v) {
12711         return _wrap_TermGenerator_increase_termpos__SWIG_0(nargs, args, self);
12712       }
12713     }
12714   }
12715 
12716 fail:
12717   Ruby_Format_OverloadedError( argc, 3, "TermGenerator.increase_termpos",
12718     "    void TermGenerator.increase_termpos(Xapian::termpos delta)\n"
12719     "    void TermGenerator.increase_termpos()\n");
12720 
12721   return Qnil;
12722 }
12723 
12724 
12725 SWIGINTERN VALUE
_wrap_TermGenerator_termpos(int argc,VALUE * argv,VALUE self)12726 _wrap_TermGenerator_termpos(int argc, VALUE *argv, VALUE self) {
12727   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
12728   void *argp1 = 0 ;
12729   int res1 = 0 ;
12730   Xapian::termpos result;
12731   VALUE vresult = Qnil;
12732 
12733   if ((argc < 0) || (argc > 0)) {
12734     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
12735   }
12736   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
12737   if (!SWIG_IsOK(res1)) {
12738     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator const *","get_termpos", 1, self ));
12739   }
12740   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
12741   {
12742     try {
12743       result = (Xapian::termpos)((Xapian::TermGenerator const *)arg1)->get_termpos();
12744     } catch (...) {
12745       string msg;
12746       int code = XapianExceptionHandler(msg);
12747       SWIG_exception(code, msg.c_str());
12748     }
12749   }
12750   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
12751   return vresult;
12752 fail:
12753   return Qnil;
12754 }
12755 
12756 
12757 SWIGINTERN VALUE
_wrap_TermGenerator_set_termpos(int argc,VALUE * argv,VALUE self)12758 _wrap_TermGenerator_set_termpos(int argc, VALUE *argv, VALUE self) {
12759   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
12760   Xapian::termpos arg2 ;
12761   void *argp1 = 0 ;
12762   int res1 = 0 ;
12763   unsigned int val2 ;
12764   int ecode2 = 0 ;
12765 
12766   if ((argc < 1) || (argc > 1)) {
12767     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
12768   }
12769   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
12770   if (!SWIG_IsOK(res1)) {
12771     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator *","set_termpos", 1, self ));
12772   }
12773   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
12774   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
12775   if (!SWIG_IsOK(ecode2)) {
12776     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termpos","set_termpos", 2, argv[0] ));
12777   }
12778   arg2 = static_cast< Xapian::termpos >(val2);
12779   {
12780     try {
12781       (arg1)->set_termpos(arg2);
12782     } catch (...) {
12783       string msg;
12784       int code = XapianExceptionHandler(msg);
12785       SWIG_exception(code, msg.c_str());
12786     }
12787   }
12788   return Qnil;
12789 fail:
12790   return Qnil;
12791 }
12792 
12793 
12794 SWIGINTERN VALUE
_wrap_TermGenerator_description(int argc,VALUE * argv,VALUE self)12795 _wrap_TermGenerator_description(int argc, VALUE *argv, VALUE self) {
12796   Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
12797   void *argp1 = 0 ;
12798   int res1 = 0 ;
12799   std::string result;
12800   VALUE vresult = Qnil;
12801 
12802   if ((argc < 0) || (argc > 0)) {
12803     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
12804   }
12805   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
12806   if (!SWIG_IsOK(res1)) {
12807     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TermGenerator const *","get_description", 1, self ));
12808   }
12809   arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
12810   {
12811     try {
12812       result = ((Xapian::TermGenerator const *)arg1)->get_description();
12813     } catch (...) {
12814       string msg;
12815       int code = XapianExceptionHandler(msg);
12816       SWIG_exception(code, msg.c_str());
12817     }
12818   }
12819   vresult = SWIG_From_std_string(static_cast< std::string >(result));
12820   return vresult;
12821 fail:
12822   return Qnil;
12823 }
12824 
12825 
12826 static swig_class SwigClassMSet;
12827 
12828 SWIGINTERN VALUE
12829 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_MSet_allocate(VALUE self)12830 _wrap_MSet_allocate(VALUE self)
12831 #else
12832 _wrap_MSet_allocate(int argc, VALUE *argv, VALUE self)
12833 #endif
12834 {
12835   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__MSet);
12836 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
12837   rb_obj_call_init(vresult, argc, argv);
12838 #endif
12839   return vresult;
12840 }
12841 
12842 
12843 SWIGINTERN VALUE
_wrap_new_MSet(int argc,VALUE * argv,VALUE self)12844 _wrap_new_MSet(int argc, VALUE *argv, VALUE self) {
12845   const char *classname SWIGUNUSED = "Xapian::MSet";
12846   Xapian::MSet *result = 0 ;
12847 
12848   if ((argc < 0) || (argc > 0)) {
12849     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
12850   }
12851   {
12852     try {
12853       result = (Xapian::MSet *)new Xapian::MSet();
12854       DATA_PTR(self) = result;
12855     } catch (...) {
12856       string msg;
12857       int code = XapianExceptionHandler(msg);
12858       SWIG_exception(code, msg.c_str());
12859     }
12860   }
12861   return self;
12862 fail:
12863   return Qnil;
12864 }
12865 
12866 
12867 SWIGINTERN void
free_Xapian_MSet(void * self)12868 free_Xapian_MSet(void *self) {
12869     Xapian::MSet *arg1 = (Xapian::MSet *)self;
12870     delete arg1;
12871 }
12872 
12873 SWIGINTERN VALUE
_wrap_MSet_convert_to_percent__SWIG_0(int argc,VALUE * argv,VALUE self)12874 _wrap_MSet_convert_to_percent__SWIG_0(int argc, VALUE *argv, VALUE self) {
12875   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
12876   double arg2 ;
12877   void *argp1 = 0 ;
12878   int res1 = 0 ;
12879   double val2 ;
12880   int ecode2 = 0 ;
12881   int result;
12882   VALUE vresult = Qnil;
12883 
12884   if ((argc < 1) || (argc > 1)) {
12885     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
12886   }
12887   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
12888   if (!SWIG_IsOK(res1)) {
12889     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","convert_to_percent", 1, self ));
12890   }
12891   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
12892   ecode2 = SWIG_AsVal_double(argv[0], &val2);
12893   if (!SWIG_IsOK(ecode2)) {
12894     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","convert_to_percent", 2, argv[0] ));
12895   }
12896   arg2 = static_cast< double >(val2);
12897   {
12898     try {
12899       result = (int)((Xapian::MSet const *)arg1)->convert_to_percent(arg2);
12900     } catch (...) {
12901       string msg;
12902       int code = XapianExceptionHandler(msg);
12903       SWIG_exception(code, msg.c_str());
12904     }
12905   }
12906   vresult = SWIG_From_int(static_cast< int >(result));
12907   return vresult;
12908 fail:
12909   return Qnil;
12910 }
12911 
12912 
12913 SWIGINTERN VALUE
_wrap_MSet_convert_to_percent__SWIG_1(int argc,VALUE * argv,VALUE self)12914 _wrap_MSet_convert_to_percent__SWIG_1(int argc, VALUE *argv, VALUE self) {
12915   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
12916   Xapian::MSetIterator *arg2 = 0 ;
12917   void *argp1 = 0 ;
12918   int res1 = 0 ;
12919   void *argp2 ;
12920   int res2 = 0 ;
12921   int result;
12922   VALUE vresult = Qnil;
12923 
12924   if ((argc < 1) || (argc > 1)) {
12925     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
12926   }
12927   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
12928   if (!SWIG_IsOK(res1)) {
12929     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","convert_to_percent", 1, self ));
12930   }
12931   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
12932   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
12933   if (!SWIG_IsOK(res2)) {
12934     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","convert_to_percent", 2, argv[0] ));
12935   }
12936   if (!argp2) {
12937     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","convert_to_percent", 2, argv[0]));
12938   }
12939   arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
12940   {
12941     try {
12942       result = (int)((Xapian::MSet const *)arg1)->convert_to_percent((Xapian::MSetIterator const &)*arg2);
12943     } catch (...) {
12944       string msg;
12945       int code = XapianExceptionHandler(msg);
12946       SWIG_exception(code, msg.c_str());
12947     }
12948   }
12949   vresult = SWIG_From_int(static_cast< int >(result));
12950   return vresult;
12951 fail:
12952   return Qnil;
12953 }
12954 
12955 
_wrap_MSet_convert_to_percent(int nargs,VALUE * args,VALUE self)12956 SWIGINTERN VALUE _wrap_MSet_convert_to_percent(int nargs, VALUE *args, VALUE self) {
12957   int argc;
12958   VALUE argv[3];
12959   int ii;
12960 
12961   argc = nargs + 1;
12962   argv[0] = self;
12963   if (argc > 3) SWIG_fail;
12964   for (ii = 1; (ii < argc); ++ii) {
12965     argv[ii] = args[ii-1];
12966   }
12967   if (argc == 2) {
12968     int _v;
12969     void *vptr = 0;
12970     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSet, 0);
12971     _v = SWIG_CheckState(res);
12972     if (_v) {
12973       void *vptr = 0;
12974       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
12975       _v = SWIG_CheckState(res);
12976       if (_v) {
12977         return _wrap_MSet_convert_to_percent__SWIG_1(nargs, args, self);
12978       }
12979     }
12980   }
12981   if (argc == 2) {
12982     int _v;
12983     void *vptr = 0;
12984     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSet, 0);
12985     _v = SWIG_CheckState(res);
12986     if (_v) {
12987       {
12988         int res = SWIG_AsVal_double(argv[1], NULL);
12989         _v = SWIG_CheckState(res);
12990       }
12991       if (_v) {
12992         return _wrap_MSet_convert_to_percent__SWIG_0(nargs, args, self);
12993       }
12994     }
12995   }
12996 
12997 fail:
12998   Ruby_Format_OverloadedError( argc, 3, "MSet.convert_to_percent",
12999     "    int MSet.convert_to_percent(double weight)\n"
13000     "    int MSet.convert_to_percent(Xapian::MSetIterator const &it)\n");
13001 
13002   return Qnil;
13003 }
13004 
13005 
13006 SWIGINTERN VALUE
_wrap_MSet_termfreq(int argc,VALUE * argv,VALUE self)13007 _wrap_MSet_termfreq(int argc, VALUE *argv, VALUE self) {
13008   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
13009   std::string *arg2 = 0 ;
13010   void *argp1 = 0 ;
13011   int res1 = 0 ;
13012   int res2 = SWIG_OLDOBJ ;
13013   Xapian::doccount result;
13014   VALUE vresult = Qnil;
13015 
13016   if ((argc < 1) || (argc > 1)) {
13017     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
13018   }
13019   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
13020   if (!SWIG_IsOK(res1)) {
13021     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","get_termfreq", 1, self ));
13022   }
13023   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
13024   {
13025     std::string *ptr = (std::string *)0;
13026     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
13027     if (!SWIG_IsOK(res2)) {
13028       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","get_termfreq", 2, argv[0] ));
13029     }
13030     if (!ptr) {
13031       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","get_termfreq", 2, argv[0]));
13032     }
13033     arg2 = ptr;
13034   }
13035   {
13036     try {
13037       result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_termfreq((std::string const &)*arg2);
13038     } catch (...) {
13039       string msg;
13040       int code = XapianExceptionHandler(msg);
13041       SWIG_exception(code, msg.c_str());
13042     }
13043   }
13044   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
13045   if (SWIG_IsNewObj(res2)) delete arg2;
13046   return vresult;
13047 fail:
13048   if (SWIG_IsNewObj(res2)) delete arg2;
13049   return Qnil;
13050 }
13051 
13052 
13053 SWIGINTERN VALUE
_wrap_MSet_termweight(int argc,VALUE * argv,VALUE self)13054 _wrap_MSet_termweight(int argc, VALUE *argv, VALUE self) {
13055   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
13056   std::string *arg2 = 0 ;
13057   void *argp1 = 0 ;
13058   int res1 = 0 ;
13059   int res2 = SWIG_OLDOBJ ;
13060   double result;
13061   VALUE vresult = Qnil;
13062 
13063   if ((argc < 1) || (argc > 1)) {
13064     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
13065   }
13066   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
13067   if (!SWIG_IsOK(res1)) {
13068     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","get_termweight", 1, self ));
13069   }
13070   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
13071   {
13072     std::string *ptr = (std::string *)0;
13073     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
13074     if (!SWIG_IsOK(res2)) {
13075       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","get_termweight", 2, argv[0] ));
13076     }
13077     if (!ptr) {
13078       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","get_termweight", 2, argv[0]));
13079     }
13080     arg2 = ptr;
13081   }
13082   {
13083     try {
13084       result = (double)((Xapian::MSet const *)arg1)->get_termweight((std::string const &)*arg2);
13085     } catch (...) {
13086       string msg;
13087       int code = XapianExceptionHandler(msg);
13088       SWIG_exception(code, msg.c_str());
13089     }
13090   }
13091   vresult = SWIG_From_double(static_cast< double >(result));
13092   if (SWIG_IsNewObj(res2)) delete arg2;
13093   return vresult;
13094 fail:
13095   if (SWIG_IsNewObj(res2)) delete arg2;
13096   return Qnil;
13097 }
13098 
13099 
13100 SWIGINTERN VALUE
_wrap_MSet_firstitem(int argc,VALUE * argv,VALUE self)13101 _wrap_MSet_firstitem(int argc, VALUE *argv, VALUE self) {
13102   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
13103   void *argp1 = 0 ;
13104   int res1 = 0 ;
13105   Xapian::doccount result;
13106   VALUE vresult = Qnil;
13107 
13108   if ((argc < 0) || (argc > 0)) {
13109     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
13110   }
13111   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
13112   if (!SWIG_IsOK(res1)) {
13113     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","get_firstitem", 1, self ));
13114   }
13115   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
13116   {
13117     try {
13118       result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_firstitem();
13119     } catch (...) {
13120       string msg;
13121       int code = XapianExceptionHandler(msg);
13122       SWIG_exception(code, msg.c_str());
13123     }
13124   }
13125   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
13126   return vresult;
13127 fail:
13128   return Qnil;
13129 }
13130 
13131 
13132 SWIGINTERN VALUE
_wrap_MSet_matches_lower_bound(int argc,VALUE * argv,VALUE self)13133 _wrap_MSet_matches_lower_bound(int argc, VALUE *argv, VALUE self) {
13134   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
13135   void *argp1 = 0 ;
13136   int res1 = 0 ;
13137   Xapian::doccount result;
13138   VALUE vresult = Qnil;
13139 
13140   if ((argc < 0) || (argc > 0)) {
13141     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
13142   }
13143   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
13144   if (!SWIG_IsOK(res1)) {
13145     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","get_matches_lower_bound", 1, self ));
13146   }
13147   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
13148   {
13149     try {
13150       result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_lower_bound();
13151     } catch (...) {
13152       string msg;
13153       int code = XapianExceptionHandler(msg);
13154       SWIG_exception(code, msg.c_str());
13155     }
13156   }
13157   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
13158   return vresult;
13159 fail:
13160   return Qnil;
13161 }
13162 
13163 
13164 SWIGINTERN VALUE
_wrap_MSet_matches_estimated(int argc,VALUE * argv,VALUE self)13165 _wrap_MSet_matches_estimated(int argc, VALUE *argv, VALUE self) {
13166   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
13167   void *argp1 = 0 ;
13168   int res1 = 0 ;
13169   Xapian::doccount result;
13170   VALUE vresult = Qnil;
13171 
13172   if ((argc < 0) || (argc > 0)) {
13173     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
13174   }
13175   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
13176   if (!SWIG_IsOK(res1)) {
13177     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","get_matches_estimated", 1, self ));
13178   }
13179   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
13180   {
13181     try {
13182       result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_estimated();
13183     } catch (...) {
13184       string msg;
13185       int code = XapianExceptionHandler(msg);
13186       SWIG_exception(code, msg.c_str());
13187     }
13188   }
13189   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
13190   return vresult;
13191 fail:
13192   return Qnil;
13193 }
13194 
13195 
13196 SWIGINTERN VALUE
_wrap_MSet_matches_upper_bound(int argc,VALUE * argv,VALUE self)13197 _wrap_MSet_matches_upper_bound(int argc, VALUE *argv, VALUE self) {
13198   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
13199   void *argp1 = 0 ;
13200   int res1 = 0 ;
13201   Xapian::doccount result;
13202   VALUE vresult = Qnil;
13203 
13204   if ((argc < 0) || (argc > 0)) {
13205     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
13206   }
13207   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
13208   if (!SWIG_IsOK(res1)) {
13209     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","get_matches_upper_bound", 1, self ));
13210   }
13211   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
13212   {
13213     try {
13214       result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_upper_bound();
13215     } catch (...) {
13216       string msg;
13217       int code = XapianExceptionHandler(msg);
13218       SWIG_exception(code, msg.c_str());
13219     }
13220   }
13221   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
13222   return vresult;
13223 fail:
13224   return Qnil;
13225 }
13226 
13227 
13228 SWIGINTERN VALUE
_wrap_MSet_get_uncollapsed_matches_lower_bound(int argc,VALUE * argv,VALUE self)13229 _wrap_MSet_get_uncollapsed_matches_lower_bound(int argc, VALUE *argv, VALUE self) {
13230   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
13231   void *argp1 = 0 ;
13232   int res1 = 0 ;
13233   Xapian::doccount result;
13234   VALUE vresult = Qnil;
13235 
13236   if ((argc < 0) || (argc > 0)) {
13237     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
13238   }
13239   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
13240   if (!SWIG_IsOK(res1)) {
13241     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","get_uncollapsed_matches_lower_bound", 1, self ));
13242   }
13243   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
13244   {
13245     try {
13246       result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_lower_bound();
13247     } catch (...) {
13248       string msg;
13249       int code = XapianExceptionHandler(msg);
13250       SWIG_exception(code, msg.c_str());
13251     }
13252   }
13253   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
13254   return vresult;
13255 fail:
13256   return Qnil;
13257 }
13258 
13259 
13260 SWIGINTERN VALUE
_wrap_MSet_get_uncollapsed_matches_estimated(int argc,VALUE * argv,VALUE self)13261 _wrap_MSet_get_uncollapsed_matches_estimated(int argc, VALUE *argv, VALUE self) {
13262   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
13263   void *argp1 = 0 ;
13264   int res1 = 0 ;
13265   Xapian::doccount result;
13266   VALUE vresult = Qnil;
13267 
13268   if ((argc < 0) || (argc > 0)) {
13269     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
13270   }
13271   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
13272   if (!SWIG_IsOK(res1)) {
13273     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","get_uncollapsed_matches_estimated", 1, self ));
13274   }
13275   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
13276   {
13277     try {
13278       result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_estimated();
13279     } catch (...) {
13280       string msg;
13281       int code = XapianExceptionHandler(msg);
13282       SWIG_exception(code, msg.c_str());
13283     }
13284   }
13285   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
13286   return vresult;
13287 fail:
13288   return Qnil;
13289 }
13290 
13291 
13292 SWIGINTERN VALUE
_wrap_MSet_get_uncollapsed_matches_upper_bound(int argc,VALUE * argv,VALUE self)13293 _wrap_MSet_get_uncollapsed_matches_upper_bound(int argc, VALUE *argv, VALUE self) {
13294   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
13295   void *argp1 = 0 ;
13296   int res1 = 0 ;
13297   Xapian::doccount result;
13298   VALUE vresult = Qnil;
13299 
13300   if ((argc < 0) || (argc > 0)) {
13301     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
13302   }
13303   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
13304   if (!SWIG_IsOK(res1)) {
13305     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","get_uncollapsed_matches_upper_bound", 1, self ));
13306   }
13307   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
13308   {
13309     try {
13310       result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_upper_bound();
13311     } catch (...) {
13312       string msg;
13313       int code = XapianExceptionHandler(msg);
13314       SWIG_exception(code, msg.c_str());
13315     }
13316   }
13317   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
13318   return vresult;
13319 fail:
13320   return Qnil;
13321 }
13322 
13323 
13324 SWIGINTERN VALUE
_wrap_MSet_max_attained(int argc,VALUE * argv,VALUE self)13325 _wrap_MSet_max_attained(int argc, VALUE *argv, VALUE self) {
13326   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
13327   void *argp1 = 0 ;
13328   int res1 = 0 ;
13329   double result;
13330   VALUE vresult = Qnil;
13331 
13332   if ((argc < 0) || (argc > 0)) {
13333     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
13334   }
13335   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
13336   if (!SWIG_IsOK(res1)) {
13337     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","get_max_attained", 1, self ));
13338   }
13339   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
13340   {
13341     try {
13342       result = (double)((Xapian::MSet const *)arg1)->get_max_attained();
13343     } catch (...) {
13344       string msg;
13345       int code = XapianExceptionHandler(msg);
13346       SWIG_exception(code, msg.c_str());
13347     }
13348   }
13349   vresult = SWIG_From_double(static_cast< double >(result));
13350   return vresult;
13351 fail:
13352   return Qnil;
13353 }
13354 
13355 
13356 SWIGINTERN VALUE
_wrap_MSet_max_possible(int argc,VALUE * argv,VALUE self)13357 _wrap_MSet_max_possible(int argc, VALUE *argv, VALUE self) {
13358   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
13359   void *argp1 = 0 ;
13360   int res1 = 0 ;
13361   double result;
13362   VALUE vresult = Qnil;
13363 
13364   if ((argc < 0) || (argc > 0)) {
13365     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
13366   }
13367   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
13368   if (!SWIG_IsOK(res1)) {
13369     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","get_max_possible", 1, self ));
13370   }
13371   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
13372   {
13373     try {
13374       result = (double)((Xapian::MSet const *)arg1)->get_max_possible();
13375     } catch (...) {
13376       string msg;
13377       int code = XapianExceptionHandler(msg);
13378       SWIG_exception(code, msg.c_str());
13379     }
13380   }
13381   vresult = SWIG_From_double(static_cast< double >(result));
13382   return vresult;
13383 fail:
13384   return Qnil;
13385 }
13386 
13387 
13388 SWIGINTERN VALUE
_wrap_MSet_snippet__SWIG_0(int argc,VALUE * argv,VALUE self)13389 _wrap_MSet_snippet__SWIG_0(int argc, VALUE *argv, VALUE self) {
13390   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
13391   std::string *arg2 = 0 ;
13392   size_t arg3 ;
13393   Xapian::Stem *arg4 = 0 ;
13394   unsigned int arg5 ;
13395   std::string *arg6 = 0 ;
13396   std::string *arg7 = 0 ;
13397   std::string *arg8 = 0 ;
13398   void *argp1 = 0 ;
13399   int res1 = 0 ;
13400   int res2 = SWIG_OLDOBJ ;
13401   size_t val3 ;
13402   int ecode3 = 0 ;
13403   void *argp4 ;
13404   int res4 = 0 ;
13405   unsigned int val5 ;
13406   int ecode5 = 0 ;
13407   int res6 = SWIG_OLDOBJ ;
13408   int res7 = SWIG_OLDOBJ ;
13409   int res8 = SWIG_OLDOBJ ;
13410   std::string result;
13411   VALUE vresult = Qnil;
13412 
13413   if ((argc < 7) || (argc > 7)) {
13414     rb_raise(rb_eArgError, "wrong # of arguments(%d for 7)",argc); SWIG_fail;
13415   }
13416   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
13417   if (!SWIG_IsOK(res1)) {
13418     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","snippet", 1, self ));
13419   }
13420   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
13421   {
13422     std::string *ptr = (std::string *)0;
13423     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
13424     if (!SWIG_IsOK(res2)) {
13425       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","snippet", 2, argv[0] ));
13426     }
13427     if (!ptr) {
13428       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","snippet", 2, argv[0]));
13429     }
13430     arg2 = ptr;
13431   }
13432   ecode3 = SWIG_AsVal_size_t(argv[1], &val3);
13433   if (!SWIG_IsOK(ecode3)) {
13434     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","snippet", 3, argv[1] ));
13435   }
13436   arg3 = static_cast< size_t >(val3);
13437   res4 = SWIG_ConvertPtr(argv[2], &argp4, SWIGTYPE_p_Xapian__Stem,  0 );
13438   if (!SWIG_IsOK(res4)) {
13439     SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "Xapian::Stem const &","snippet", 4, argv[2] ));
13440   }
13441   if (!argp4) {
13442     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Stem const &","snippet", 4, argv[2]));
13443   }
13444   arg4 = reinterpret_cast< Xapian::Stem * >(argp4);
13445   ecode5 = SWIG_AsVal_unsigned_SS_int(argv[3], &val5);
13446   if (!SWIG_IsOK(ecode5)) {
13447     SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "unsigned int","snippet", 5, argv[3] ));
13448   }
13449   arg5 = static_cast< unsigned int >(val5);
13450   {
13451     std::string *ptr = (std::string *)0;
13452     res6 = SWIG_AsPtr_std_string(argv[4], &ptr);
13453     if (!SWIG_IsOK(res6)) {
13454       SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "std::string const &","snippet", 6, argv[4] ));
13455     }
13456     if (!ptr) {
13457       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","snippet", 6, argv[4]));
13458     }
13459     arg6 = ptr;
13460   }
13461   {
13462     std::string *ptr = (std::string *)0;
13463     res7 = SWIG_AsPtr_std_string(argv[5], &ptr);
13464     if (!SWIG_IsOK(res7)) {
13465       SWIG_exception_fail(SWIG_ArgError(res7), Ruby_Format_TypeError( "", "std::string const &","snippet", 7, argv[5] ));
13466     }
13467     if (!ptr) {
13468       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","snippet", 7, argv[5]));
13469     }
13470     arg7 = ptr;
13471   }
13472   {
13473     std::string *ptr = (std::string *)0;
13474     res8 = SWIG_AsPtr_std_string(argv[6], &ptr);
13475     if (!SWIG_IsOK(res8)) {
13476       SWIG_exception_fail(SWIG_ArgError(res8), Ruby_Format_TypeError( "", "std::string const &","snippet", 8, argv[6] ));
13477     }
13478     if (!ptr) {
13479       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","snippet", 8, argv[6]));
13480     }
13481     arg8 = ptr;
13482   }
13483   {
13484     try {
13485       result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,arg3,(Xapian::Stem const &)*arg4,arg5,(std::string const &)*arg6,(std::string const &)*arg7,(std::string const &)*arg8);
13486     } catch (...) {
13487       string msg;
13488       int code = XapianExceptionHandler(msg);
13489       SWIG_exception(code, msg.c_str());
13490     }
13491   }
13492   vresult = SWIG_From_std_string(static_cast< std::string >(result));
13493   if (SWIG_IsNewObj(res2)) delete arg2;
13494   if (SWIG_IsNewObj(res6)) delete arg6;
13495   if (SWIG_IsNewObj(res7)) delete arg7;
13496   if (SWIG_IsNewObj(res8)) delete arg8;
13497   return vresult;
13498 fail:
13499   if (SWIG_IsNewObj(res2)) delete arg2;
13500   if (SWIG_IsNewObj(res6)) delete arg6;
13501   if (SWIG_IsNewObj(res7)) delete arg7;
13502   if (SWIG_IsNewObj(res8)) delete arg8;
13503   return Qnil;
13504 }
13505 
13506 
13507 SWIGINTERN VALUE
_wrap_MSet_snippet__SWIG_1(int argc,VALUE * argv,VALUE self)13508 _wrap_MSet_snippet__SWIG_1(int argc, VALUE *argv, VALUE self) {
13509   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
13510   std::string *arg2 = 0 ;
13511   size_t arg3 ;
13512   Xapian::Stem *arg4 = 0 ;
13513   unsigned int arg5 ;
13514   std::string *arg6 = 0 ;
13515   std::string *arg7 = 0 ;
13516   void *argp1 = 0 ;
13517   int res1 = 0 ;
13518   int res2 = SWIG_OLDOBJ ;
13519   size_t val3 ;
13520   int ecode3 = 0 ;
13521   void *argp4 ;
13522   int res4 = 0 ;
13523   unsigned int val5 ;
13524   int ecode5 = 0 ;
13525   int res6 = SWIG_OLDOBJ ;
13526   int res7 = SWIG_OLDOBJ ;
13527   std::string result;
13528   VALUE vresult = Qnil;
13529 
13530   if ((argc < 6) || (argc > 6)) {
13531     rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
13532   }
13533   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
13534   if (!SWIG_IsOK(res1)) {
13535     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","snippet", 1, self ));
13536   }
13537   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
13538   {
13539     std::string *ptr = (std::string *)0;
13540     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
13541     if (!SWIG_IsOK(res2)) {
13542       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","snippet", 2, argv[0] ));
13543     }
13544     if (!ptr) {
13545       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","snippet", 2, argv[0]));
13546     }
13547     arg2 = ptr;
13548   }
13549   ecode3 = SWIG_AsVal_size_t(argv[1], &val3);
13550   if (!SWIG_IsOK(ecode3)) {
13551     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","snippet", 3, argv[1] ));
13552   }
13553   arg3 = static_cast< size_t >(val3);
13554   res4 = SWIG_ConvertPtr(argv[2], &argp4, SWIGTYPE_p_Xapian__Stem,  0 );
13555   if (!SWIG_IsOK(res4)) {
13556     SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "Xapian::Stem const &","snippet", 4, argv[2] ));
13557   }
13558   if (!argp4) {
13559     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Stem const &","snippet", 4, argv[2]));
13560   }
13561   arg4 = reinterpret_cast< Xapian::Stem * >(argp4);
13562   ecode5 = SWIG_AsVal_unsigned_SS_int(argv[3], &val5);
13563   if (!SWIG_IsOK(ecode5)) {
13564     SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "unsigned int","snippet", 5, argv[3] ));
13565   }
13566   arg5 = static_cast< unsigned int >(val5);
13567   {
13568     std::string *ptr = (std::string *)0;
13569     res6 = SWIG_AsPtr_std_string(argv[4], &ptr);
13570     if (!SWIG_IsOK(res6)) {
13571       SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "std::string const &","snippet", 6, argv[4] ));
13572     }
13573     if (!ptr) {
13574       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","snippet", 6, argv[4]));
13575     }
13576     arg6 = ptr;
13577   }
13578   {
13579     std::string *ptr = (std::string *)0;
13580     res7 = SWIG_AsPtr_std_string(argv[5], &ptr);
13581     if (!SWIG_IsOK(res7)) {
13582       SWIG_exception_fail(SWIG_ArgError(res7), Ruby_Format_TypeError( "", "std::string const &","snippet", 7, argv[5] ));
13583     }
13584     if (!ptr) {
13585       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","snippet", 7, argv[5]));
13586     }
13587     arg7 = ptr;
13588   }
13589   {
13590     try {
13591       result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,arg3,(Xapian::Stem const &)*arg4,arg5,(std::string const &)*arg6,(std::string const &)*arg7);
13592     } catch (...) {
13593       string msg;
13594       int code = XapianExceptionHandler(msg);
13595       SWIG_exception(code, msg.c_str());
13596     }
13597   }
13598   vresult = SWIG_From_std_string(static_cast< std::string >(result));
13599   if (SWIG_IsNewObj(res2)) delete arg2;
13600   if (SWIG_IsNewObj(res6)) delete arg6;
13601   if (SWIG_IsNewObj(res7)) delete arg7;
13602   return vresult;
13603 fail:
13604   if (SWIG_IsNewObj(res2)) delete arg2;
13605   if (SWIG_IsNewObj(res6)) delete arg6;
13606   if (SWIG_IsNewObj(res7)) delete arg7;
13607   return Qnil;
13608 }
13609 
13610 
13611 SWIGINTERN VALUE
_wrap_MSet_snippet__SWIG_2(int argc,VALUE * argv,VALUE self)13612 _wrap_MSet_snippet__SWIG_2(int argc, VALUE *argv, VALUE self) {
13613   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
13614   std::string *arg2 = 0 ;
13615   size_t arg3 ;
13616   Xapian::Stem *arg4 = 0 ;
13617   unsigned int arg5 ;
13618   std::string *arg6 = 0 ;
13619   void *argp1 = 0 ;
13620   int res1 = 0 ;
13621   int res2 = SWIG_OLDOBJ ;
13622   size_t val3 ;
13623   int ecode3 = 0 ;
13624   void *argp4 ;
13625   int res4 = 0 ;
13626   unsigned int val5 ;
13627   int ecode5 = 0 ;
13628   int res6 = SWIG_OLDOBJ ;
13629   std::string result;
13630   VALUE vresult = Qnil;
13631 
13632   if ((argc < 5) || (argc > 5)) {
13633     rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
13634   }
13635   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
13636   if (!SWIG_IsOK(res1)) {
13637     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","snippet", 1, self ));
13638   }
13639   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
13640   {
13641     std::string *ptr = (std::string *)0;
13642     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
13643     if (!SWIG_IsOK(res2)) {
13644       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","snippet", 2, argv[0] ));
13645     }
13646     if (!ptr) {
13647       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","snippet", 2, argv[0]));
13648     }
13649     arg2 = ptr;
13650   }
13651   ecode3 = SWIG_AsVal_size_t(argv[1], &val3);
13652   if (!SWIG_IsOK(ecode3)) {
13653     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","snippet", 3, argv[1] ));
13654   }
13655   arg3 = static_cast< size_t >(val3);
13656   res4 = SWIG_ConvertPtr(argv[2], &argp4, SWIGTYPE_p_Xapian__Stem,  0 );
13657   if (!SWIG_IsOK(res4)) {
13658     SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "Xapian::Stem const &","snippet", 4, argv[2] ));
13659   }
13660   if (!argp4) {
13661     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Stem const &","snippet", 4, argv[2]));
13662   }
13663   arg4 = reinterpret_cast< Xapian::Stem * >(argp4);
13664   ecode5 = SWIG_AsVal_unsigned_SS_int(argv[3], &val5);
13665   if (!SWIG_IsOK(ecode5)) {
13666     SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "unsigned int","snippet", 5, argv[3] ));
13667   }
13668   arg5 = static_cast< unsigned int >(val5);
13669   {
13670     std::string *ptr = (std::string *)0;
13671     res6 = SWIG_AsPtr_std_string(argv[4], &ptr);
13672     if (!SWIG_IsOK(res6)) {
13673       SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "std::string const &","snippet", 6, argv[4] ));
13674     }
13675     if (!ptr) {
13676       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","snippet", 6, argv[4]));
13677     }
13678     arg6 = ptr;
13679   }
13680   {
13681     try {
13682       result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,arg3,(Xapian::Stem const &)*arg4,arg5,(std::string const &)*arg6);
13683     } catch (...) {
13684       string msg;
13685       int code = XapianExceptionHandler(msg);
13686       SWIG_exception(code, msg.c_str());
13687     }
13688   }
13689   vresult = SWIG_From_std_string(static_cast< std::string >(result));
13690   if (SWIG_IsNewObj(res2)) delete arg2;
13691   if (SWIG_IsNewObj(res6)) delete arg6;
13692   return vresult;
13693 fail:
13694   if (SWIG_IsNewObj(res2)) delete arg2;
13695   if (SWIG_IsNewObj(res6)) delete arg6;
13696   return Qnil;
13697 }
13698 
13699 
13700 SWIGINTERN VALUE
_wrap_MSet_snippet__SWIG_3(int argc,VALUE * argv,VALUE self)13701 _wrap_MSet_snippet__SWIG_3(int argc, VALUE *argv, VALUE self) {
13702   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
13703   std::string *arg2 = 0 ;
13704   size_t arg3 ;
13705   Xapian::Stem *arg4 = 0 ;
13706   unsigned int arg5 ;
13707   void *argp1 = 0 ;
13708   int res1 = 0 ;
13709   int res2 = SWIG_OLDOBJ ;
13710   size_t val3 ;
13711   int ecode3 = 0 ;
13712   void *argp4 ;
13713   int res4 = 0 ;
13714   unsigned int val5 ;
13715   int ecode5 = 0 ;
13716   std::string result;
13717   VALUE vresult = Qnil;
13718 
13719   if ((argc < 4) || (argc > 4)) {
13720     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
13721   }
13722   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
13723   if (!SWIG_IsOK(res1)) {
13724     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","snippet", 1, self ));
13725   }
13726   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
13727   {
13728     std::string *ptr = (std::string *)0;
13729     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
13730     if (!SWIG_IsOK(res2)) {
13731       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","snippet", 2, argv[0] ));
13732     }
13733     if (!ptr) {
13734       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","snippet", 2, argv[0]));
13735     }
13736     arg2 = ptr;
13737   }
13738   ecode3 = SWIG_AsVal_size_t(argv[1], &val3);
13739   if (!SWIG_IsOK(ecode3)) {
13740     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","snippet", 3, argv[1] ));
13741   }
13742   arg3 = static_cast< size_t >(val3);
13743   res4 = SWIG_ConvertPtr(argv[2], &argp4, SWIGTYPE_p_Xapian__Stem,  0 );
13744   if (!SWIG_IsOK(res4)) {
13745     SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "Xapian::Stem const &","snippet", 4, argv[2] ));
13746   }
13747   if (!argp4) {
13748     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Stem const &","snippet", 4, argv[2]));
13749   }
13750   arg4 = reinterpret_cast< Xapian::Stem * >(argp4);
13751   ecode5 = SWIG_AsVal_unsigned_SS_int(argv[3], &val5);
13752   if (!SWIG_IsOK(ecode5)) {
13753     SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "unsigned int","snippet", 5, argv[3] ));
13754   }
13755   arg5 = static_cast< unsigned int >(val5);
13756   {
13757     try {
13758       result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,arg3,(Xapian::Stem const &)*arg4,arg5);
13759     } catch (...) {
13760       string msg;
13761       int code = XapianExceptionHandler(msg);
13762       SWIG_exception(code, msg.c_str());
13763     }
13764   }
13765   vresult = SWIG_From_std_string(static_cast< std::string >(result));
13766   if (SWIG_IsNewObj(res2)) delete arg2;
13767   return vresult;
13768 fail:
13769   if (SWIG_IsNewObj(res2)) delete arg2;
13770   return Qnil;
13771 }
13772 
13773 
13774 SWIGINTERN VALUE
_wrap_MSet_snippet__SWIG_4(int argc,VALUE * argv,VALUE self)13775 _wrap_MSet_snippet__SWIG_4(int argc, VALUE *argv, VALUE self) {
13776   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
13777   std::string *arg2 = 0 ;
13778   size_t arg3 ;
13779   Xapian::Stem *arg4 = 0 ;
13780   void *argp1 = 0 ;
13781   int res1 = 0 ;
13782   int res2 = SWIG_OLDOBJ ;
13783   size_t val3 ;
13784   int ecode3 = 0 ;
13785   void *argp4 ;
13786   int res4 = 0 ;
13787   std::string result;
13788   VALUE vresult = Qnil;
13789 
13790   if ((argc < 3) || (argc > 3)) {
13791     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
13792   }
13793   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
13794   if (!SWIG_IsOK(res1)) {
13795     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","snippet", 1, self ));
13796   }
13797   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
13798   {
13799     std::string *ptr = (std::string *)0;
13800     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
13801     if (!SWIG_IsOK(res2)) {
13802       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","snippet", 2, argv[0] ));
13803     }
13804     if (!ptr) {
13805       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","snippet", 2, argv[0]));
13806     }
13807     arg2 = ptr;
13808   }
13809   ecode3 = SWIG_AsVal_size_t(argv[1], &val3);
13810   if (!SWIG_IsOK(ecode3)) {
13811     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","snippet", 3, argv[1] ));
13812   }
13813   arg3 = static_cast< size_t >(val3);
13814   res4 = SWIG_ConvertPtr(argv[2], &argp4, SWIGTYPE_p_Xapian__Stem,  0 );
13815   if (!SWIG_IsOK(res4)) {
13816     SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "Xapian::Stem const &","snippet", 4, argv[2] ));
13817   }
13818   if (!argp4) {
13819     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Stem const &","snippet", 4, argv[2]));
13820   }
13821   arg4 = reinterpret_cast< Xapian::Stem * >(argp4);
13822   {
13823     try {
13824       result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,arg3,(Xapian::Stem const &)*arg4);
13825     } catch (...) {
13826       string msg;
13827       int code = XapianExceptionHandler(msg);
13828       SWIG_exception(code, msg.c_str());
13829     }
13830   }
13831   vresult = SWIG_From_std_string(static_cast< std::string >(result));
13832   if (SWIG_IsNewObj(res2)) delete arg2;
13833   return vresult;
13834 fail:
13835   if (SWIG_IsNewObj(res2)) delete arg2;
13836   return Qnil;
13837 }
13838 
13839 
13840 SWIGINTERN VALUE
_wrap_MSet_snippet__SWIG_5(int argc,VALUE * argv,VALUE self)13841 _wrap_MSet_snippet__SWIG_5(int argc, VALUE *argv, VALUE self) {
13842   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
13843   std::string *arg2 = 0 ;
13844   size_t arg3 ;
13845   void *argp1 = 0 ;
13846   int res1 = 0 ;
13847   int res2 = SWIG_OLDOBJ ;
13848   size_t val3 ;
13849   int ecode3 = 0 ;
13850   std::string result;
13851   VALUE vresult = Qnil;
13852 
13853   if ((argc < 2) || (argc > 2)) {
13854     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
13855   }
13856   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
13857   if (!SWIG_IsOK(res1)) {
13858     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","snippet", 1, self ));
13859   }
13860   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
13861   {
13862     std::string *ptr = (std::string *)0;
13863     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
13864     if (!SWIG_IsOK(res2)) {
13865       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","snippet", 2, argv[0] ));
13866     }
13867     if (!ptr) {
13868       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","snippet", 2, argv[0]));
13869     }
13870     arg2 = ptr;
13871   }
13872   ecode3 = SWIG_AsVal_size_t(argv[1], &val3);
13873   if (!SWIG_IsOK(ecode3)) {
13874     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","snippet", 3, argv[1] ));
13875   }
13876   arg3 = static_cast< size_t >(val3);
13877   {
13878     try {
13879       result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,arg3);
13880     } catch (...) {
13881       string msg;
13882       int code = XapianExceptionHandler(msg);
13883       SWIG_exception(code, msg.c_str());
13884     }
13885   }
13886   vresult = SWIG_From_std_string(static_cast< std::string >(result));
13887   if (SWIG_IsNewObj(res2)) delete arg2;
13888   return vresult;
13889 fail:
13890   if (SWIG_IsNewObj(res2)) delete arg2;
13891   return Qnil;
13892 }
13893 
13894 
13895 SWIGINTERN VALUE
_wrap_MSet_snippet__SWIG_6(int argc,VALUE * argv,VALUE self)13896 _wrap_MSet_snippet__SWIG_6(int argc, VALUE *argv, VALUE self) {
13897   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
13898   std::string *arg2 = 0 ;
13899   void *argp1 = 0 ;
13900   int res1 = 0 ;
13901   int res2 = SWIG_OLDOBJ ;
13902   std::string result;
13903   VALUE vresult = Qnil;
13904 
13905   if ((argc < 1) || (argc > 1)) {
13906     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
13907   }
13908   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
13909   if (!SWIG_IsOK(res1)) {
13910     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","snippet", 1, self ));
13911   }
13912   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
13913   {
13914     std::string *ptr = (std::string *)0;
13915     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
13916     if (!SWIG_IsOK(res2)) {
13917       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","snippet", 2, argv[0] ));
13918     }
13919     if (!ptr) {
13920       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","snippet", 2, argv[0]));
13921     }
13922     arg2 = ptr;
13923   }
13924   {
13925     try {
13926       result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2);
13927     } catch (...) {
13928       string msg;
13929       int code = XapianExceptionHandler(msg);
13930       SWIG_exception(code, msg.c_str());
13931     }
13932   }
13933   vresult = SWIG_From_std_string(static_cast< std::string >(result));
13934   if (SWIG_IsNewObj(res2)) delete arg2;
13935   return vresult;
13936 fail:
13937   if (SWIG_IsNewObj(res2)) delete arg2;
13938   return Qnil;
13939 }
13940 
13941 
_wrap_MSet_snippet(int nargs,VALUE * args,VALUE self)13942 SWIGINTERN VALUE _wrap_MSet_snippet(int nargs, VALUE *args, VALUE self) {
13943   int argc;
13944   VALUE argv[9];
13945   int ii;
13946 
13947   argc = nargs + 1;
13948   argv[0] = self;
13949   if (argc > 9) SWIG_fail;
13950   for (ii = 1; (ii < argc); ++ii) {
13951     argv[ii] = args[ii-1];
13952   }
13953   if (argc == 2) {
13954     int _v;
13955     void *vptr = 0;
13956     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSet, 0);
13957     _v = SWIG_CheckState(res);
13958     if (_v) {
13959       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
13960       _v = SWIG_CheckState(res);
13961       if (_v) {
13962         return _wrap_MSet_snippet__SWIG_6(nargs, args, self);
13963       }
13964     }
13965   }
13966   if (argc == 3) {
13967     int _v;
13968     void *vptr = 0;
13969     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSet, 0);
13970     _v = SWIG_CheckState(res);
13971     if (_v) {
13972       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
13973       _v = SWIG_CheckState(res);
13974       if (_v) {
13975         {
13976           int res = SWIG_AsVal_size_t(argv[2], NULL);
13977           _v = SWIG_CheckState(res);
13978         }
13979         if (_v) {
13980           return _wrap_MSet_snippet__SWIG_5(nargs, args, self);
13981         }
13982       }
13983     }
13984   }
13985   if (argc == 4) {
13986     int _v;
13987     void *vptr = 0;
13988     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSet, 0);
13989     _v = SWIG_CheckState(res);
13990     if (_v) {
13991       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
13992       _v = SWIG_CheckState(res);
13993       if (_v) {
13994         {
13995           int res = SWIG_AsVal_size_t(argv[2], NULL);
13996           _v = SWIG_CheckState(res);
13997         }
13998         if (_v) {
13999           void *vptr = 0;
14000           int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_Xapian__Stem, 0);
14001           _v = SWIG_CheckState(res);
14002           if (_v) {
14003             return _wrap_MSet_snippet__SWIG_4(nargs, args, self);
14004           }
14005         }
14006       }
14007     }
14008   }
14009   if (argc == 5) {
14010     int _v;
14011     void *vptr = 0;
14012     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSet, 0);
14013     _v = SWIG_CheckState(res);
14014     if (_v) {
14015       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
14016       _v = SWIG_CheckState(res);
14017       if (_v) {
14018         {
14019           int res = SWIG_AsVal_size_t(argv[2], NULL);
14020           _v = SWIG_CheckState(res);
14021         }
14022         if (_v) {
14023           void *vptr = 0;
14024           int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_Xapian__Stem, 0);
14025           _v = SWIG_CheckState(res);
14026           if (_v) {
14027             {
14028               int res = SWIG_AsVal_unsigned_SS_int(argv[4], NULL);
14029               _v = SWIG_CheckState(res);
14030             }
14031             if (_v) {
14032               return _wrap_MSet_snippet__SWIG_3(nargs, args, self);
14033             }
14034           }
14035         }
14036       }
14037     }
14038   }
14039   if (argc == 6) {
14040     int _v;
14041     void *vptr = 0;
14042     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSet, 0);
14043     _v = SWIG_CheckState(res);
14044     if (_v) {
14045       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
14046       _v = SWIG_CheckState(res);
14047       if (_v) {
14048         {
14049           int res = SWIG_AsVal_size_t(argv[2], NULL);
14050           _v = SWIG_CheckState(res);
14051         }
14052         if (_v) {
14053           void *vptr = 0;
14054           int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_Xapian__Stem, 0);
14055           _v = SWIG_CheckState(res);
14056           if (_v) {
14057             {
14058               int res = SWIG_AsVal_unsigned_SS_int(argv[4], NULL);
14059               _v = SWIG_CheckState(res);
14060             }
14061             if (_v) {
14062               int res = SWIG_AsPtr_std_string(argv[5], (std::string**)(0));
14063               _v = SWIG_CheckState(res);
14064               if (_v) {
14065                 return _wrap_MSet_snippet__SWIG_2(nargs, args, self);
14066               }
14067             }
14068           }
14069         }
14070       }
14071     }
14072   }
14073   if (argc == 7) {
14074     int _v;
14075     void *vptr = 0;
14076     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSet, 0);
14077     _v = SWIG_CheckState(res);
14078     if (_v) {
14079       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
14080       _v = SWIG_CheckState(res);
14081       if (_v) {
14082         {
14083           int res = SWIG_AsVal_size_t(argv[2], NULL);
14084           _v = SWIG_CheckState(res);
14085         }
14086         if (_v) {
14087           void *vptr = 0;
14088           int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_Xapian__Stem, 0);
14089           _v = SWIG_CheckState(res);
14090           if (_v) {
14091             {
14092               int res = SWIG_AsVal_unsigned_SS_int(argv[4], NULL);
14093               _v = SWIG_CheckState(res);
14094             }
14095             if (_v) {
14096               int res = SWIG_AsPtr_std_string(argv[5], (std::string**)(0));
14097               _v = SWIG_CheckState(res);
14098               if (_v) {
14099                 int res = SWIG_AsPtr_std_string(argv[6], (std::string**)(0));
14100                 _v = SWIG_CheckState(res);
14101                 if (_v) {
14102                   return _wrap_MSet_snippet__SWIG_1(nargs, args, self);
14103                 }
14104               }
14105             }
14106           }
14107         }
14108       }
14109     }
14110   }
14111   if (argc == 8) {
14112     int _v;
14113     void *vptr = 0;
14114     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSet, 0);
14115     _v = SWIG_CheckState(res);
14116     if (_v) {
14117       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
14118       _v = SWIG_CheckState(res);
14119       if (_v) {
14120         {
14121           int res = SWIG_AsVal_size_t(argv[2], NULL);
14122           _v = SWIG_CheckState(res);
14123         }
14124         if (_v) {
14125           void *vptr = 0;
14126           int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_Xapian__Stem, 0);
14127           _v = SWIG_CheckState(res);
14128           if (_v) {
14129             {
14130               int res = SWIG_AsVal_unsigned_SS_int(argv[4], NULL);
14131               _v = SWIG_CheckState(res);
14132             }
14133             if (_v) {
14134               int res = SWIG_AsPtr_std_string(argv[5], (std::string**)(0));
14135               _v = SWIG_CheckState(res);
14136               if (_v) {
14137                 int res = SWIG_AsPtr_std_string(argv[6], (std::string**)(0));
14138                 _v = SWIG_CheckState(res);
14139                 if (_v) {
14140                   int res = SWIG_AsPtr_std_string(argv[7], (std::string**)(0));
14141                   _v = SWIG_CheckState(res);
14142                   if (_v) {
14143                     return _wrap_MSet_snippet__SWIG_0(nargs, args, self);
14144                   }
14145                 }
14146               }
14147             }
14148           }
14149         }
14150       }
14151     }
14152   }
14153 
14154 fail:
14155   Ruby_Format_OverloadedError( argc, 9, "MSet.snippet",
14156     "    std::string MSet.snippet(std::string const &text, size_t length, Xapian::Stem const &stemmer, unsigned int flags, std::string const &hi_start, std::string const &hi_end, std::string const &omit)\n"
14157     "    std::string MSet.snippet(std::string const &text, size_t length, Xapian::Stem const &stemmer, unsigned int flags, std::string const &hi_start, std::string const &hi_end)\n"
14158     "    std::string MSet.snippet(std::string const &text, size_t length, Xapian::Stem const &stemmer, unsigned int flags, std::string const &hi_start)\n"
14159     "    std::string MSet.snippet(std::string const &text, size_t length, Xapian::Stem const &stemmer, unsigned int flags)\n"
14160     "    std::string MSet.snippet(std::string const &text, size_t length, Xapian::Stem const &stemmer)\n"
14161     "    std::string MSet.snippet(std::string const &text, size_t length)\n"
14162     "    std::string MSet.snippet(std::string const &text)\n");
14163 
14164   return Qnil;
14165 }
14166 
14167 
14168 SWIGINTERN VALUE
_wrap_MSet_fetch__SWIG_0(int argc,VALUE * argv,VALUE self)14169 _wrap_MSet_fetch__SWIG_0(int argc, VALUE *argv, VALUE self) {
14170   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
14171   Xapian::MSetIterator *arg2 = 0 ;
14172   Xapian::MSetIterator *arg3 = 0 ;
14173   void *argp1 = 0 ;
14174   int res1 = 0 ;
14175   void *argp2 ;
14176   int res2 = 0 ;
14177   void *argp3 ;
14178   int res3 = 0 ;
14179 
14180   if ((argc < 2) || (argc > 2)) {
14181     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
14182   }
14183   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
14184   if (!SWIG_IsOK(res1)) {
14185     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","fetch", 1, self ));
14186   }
14187   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
14188   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
14189   if (!SWIG_IsOK(res2)) {
14190     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","fetch", 2, argv[0] ));
14191   }
14192   if (!argp2) {
14193     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","fetch", 2, argv[0]));
14194   }
14195   arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
14196   res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_Xapian__MSetIterator,  0 );
14197   if (!SWIG_IsOK(res3)) {
14198     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","fetch", 3, argv[1] ));
14199   }
14200   if (!argp3) {
14201     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","fetch", 3, argv[1]));
14202   }
14203   arg3 = reinterpret_cast< Xapian::MSetIterator * >(argp3);
14204   {
14205     try {
14206       ((Xapian::MSet const *)arg1)->fetch((Xapian::MSetIterator const &)*arg2,(Xapian::MSetIterator const &)*arg3);
14207     } catch (...) {
14208       string msg;
14209       int code = XapianExceptionHandler(msg);
14210       SWIG_exception(code, msg.c_str());
14211     }
14212   }
14213   return Qnil;
14214 fail:
14215   return Qnil;
14216 }
14217 
14218 
14219 SWIGINTERN VALUE
_wrap_MSet_fetch__SWIG_1(int argc,VALUE * argv,VALUE self)14220 _wrap_MSet_fetch__SWIG_1(int argc, VALUE *argv, VALUE self) {
14221   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
14222   Xapian::MSetIterator *arg2 = 0 ;
14223   void *argp1 = 0 ;
14224   int res1 = 0 ;
14225   void *argp2 ;
14226   int res2 = 0 ;
14227 
14228   if ((argc < 1) || (argc > 1)) {
14229     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
14230   }
14231   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
14232   if (!SWIG_IsOK(res1)) {
14233     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","fetch", 1, self ));
14234   }
14235   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
14236   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
14237   if (!SWIG_IsOK(res2)) {
14238     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","fetch", 2, argv[0] ));
14239   }
14240   if (!argp2) {
14241     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","fetch", 2, argv[0]));
14242   }
14243   arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
14244   {
14245     try {
14246       ((Xapian::MSet const *)arg1)->fetch((Xapian::MSetIterator const &)*arg2);
14247     } catch (...) {
14248       string msg;
14249       int code = XapianExceptionHandler(msg);
14250       SWIG_exception(code, msg.c_str());
14251     }
14252   }
14253   return Qnil;
14254 fail:
14255   return Qnil;
14256 }
14257 
14258 
14259 SWIGINTERN VALUE
_wrap_MSet_fetch__SWIG_2(int argc,VALUE * argv,VALUE self)14260 _wrap_MSet_fetch__SWIG_2(int argc, VALUE *argv, VALUE self) {
14261   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
14262   void *argp1 = 0 ;
14263   int res1 = 0 ;
14264 
14265   if ((argc < 0) || (argc > 0)) {
14266     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
14267   }
14268   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
14269   if (!SWIG_IsOK(res1)) {
14270     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","fetch", 1, self ));
14271   }
14272   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
14273   {
14274     try {
14275       ((Xapian::MSet const *)arg1)->fetch();
14276     } catch (...) {
14277       string msg;
14278       int code = XapianExceptionHandler(msg);
14279       SWIG_exception(code, msg.c_str());
14280     }
14281   }
14282   return Qnil;
14283 fail:
14284   return Qnil;
14285 }
14286 
14287 
_wrap_MSet_fetch(int nargs,VALUE * args,VALUE self)14288 SWIGINTERN VALUE _wrap_MSet_fetch(int nargs, VALUE *args, VALUE self) {
14289   int argc;
14290   VALUE argv[4];
14291   int ii;
14292 
14293   argc = nargs + 1;
14294   argv[0] = self;
14295   if (argc > 4) SWIG_fail;
14296   for (ii = 1; (ii < argc); ++ii) {
14297     argv[ii] = args[ii-1];
14298   }
14299   if (argc == 1) {
14300     int _v;
14301     void *vptr = 0;
14302     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSet, 0);
14303     _v = SWIG_CheckState(res);
14304     if (_v) {
14305       return _wrap_MSet_fetch__SWIG_2(nargs, args, self);
14306     }
14307   }
14308   if (argc == 2) {
14309     int _v;
14310     void *vptr = 0;
14311     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSet, 0);
14312     _v = SWIG_CheckState(res);
14313     if (_v) {
14314       void *vptr = 0;
14315       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
14316       _v = SWIG_CheckState(res);
14317       if (_v) {
14318         return _wrap_MSet_fetch__SWIG_1(nargs, args, self);
14319       }
14320     }
14321   }
14322   if (argc == 3) {
14323     int _v;
14324     void *vptr = 0;
14325     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSet, 0);
14326     _v = SWIG_CheckState(res);
14327     if (_v) {
14328       void *vptr = 0;
14329       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
14330       _v = SWIG_CheckState(res);
14331       if (_v) {
14332         void *vptr = 0;
14333         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
14334         _v = SWIG_CheckState(res);
14335         if (_v) {
14336           return _wrap_MSet_fetch__SWIG_0(nargs, args, self);
14337         }
14338       }
14339     }
14340   }
14341 
14342 fail:
14343   Ruby_Format_OverloadedError( argc, 4, "MSet.fetch",
14344     "    void MSet.fetch(Xapian::MSetIterator const &begin, Xapian::MSetIterator const &end)\n"
14345     "    void MSet.fetch(Xapian::MSetIterator const &item)\n"
14346     "    void MSet.fetch()\n");
14347 
14348   return Qnil;
14349 }
14350 
14351 
14352 
14353 /*
14354   Document-method: Xapian::MSet.size
14355 
14356   call-seq:
14357     size -> Xapian::doccount
14358 
14359 Size or Length of the MSet.
14360 */
14361 SWIGINTERN VALUE
_wrap_MSet_size(int argc,VALUE * argv,VALUE self)14362 _wrap_MSet_size(int argc, VALUE *argv, VALUE self) {
14363   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
14364   void *argp1 = 0 ;
14365   int res1 = 0 ;
14366   Xapian::doccount result;
14367   VALUE vresult = Qnil;
14368 
14369   if ((argc < 0) || (argc > 0)) {
14370     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
14371   }
14372   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
14373   if (!SWIG_IsOK(res1)) {
14374     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","size", 1, self ));
14375   }
14376   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
14377   {
14378     try {
14379       result = (Xapian::doccount)((Xapian::MSet const *)arg1)->size();
14380     } catch (...) {
14381       string msg;
14382       int code = XapianExceptionHandler(msg);
14383       SWIG_exception(code, msg.c_str());
14384     }
14385   }
14386   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
14387   return vresult;
14388 fail:
14389   return Qnil;
14390 }
14391 
14392 
14393 
14394 /*
14395   Document-method: Xapian::MSet.empty
14396 
14397   call-seq:
14398     empty -> bool
14399 
14400 Check if the MSet is empty or not.
14401 */
14402 SWIGINTERN VALUE
_wrap_MSet_emptyq___(int argc,VALUE * argv,VALUE self)14403 _wrap_MSet_emptyq___(int argc, VALUE *argv, VALUE self) {
14404   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
14405   void *argp1 = 0 ;
14406   int res1 = 0 ;
14407   bool result;
14408   VALUE vresult = Qnil;
14409 
14410   if ((argc < 0) || (argc > 0)) {
14411     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
14412   }
14413   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
14414   if (!SWIG_IsOK(res1)) {
14415     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","empty", 1, self ));
14416   }
14417   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
14418   {
14419     try {
14420       result = (bool)((Xapian::MSet const *)arg1)->empty();
14421     } catch (...) {
14422       string msg;
14423       int code = XapianExceptionHandler(msg);
14424       SWIG_exception(code, msg.c_str());
14425     }
14426   }
14427   vresult = (result ? Qtrue : Qfalse);
14428   return vresult;
14429 fail:
14430   return Qnil;
14431 }
14432 
14433 
14434 
14435 /*
14436   Document-method: Xapian::MSet._begin
14437 
14438   call-seq:
14439     _begin -> MSetIterator
14440 
14441 Return an iterator to the beginning of the MSet.
14442 */
14443 SWIGINTERN VALUE
_wrap_MSet__begin(int argc,VALUE * argv,VALUE self)14444 _wrap_MSet__begin(int argc, VALUE *argv, VALUE self) {
14445   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
14446   void *argp1 = 0 ;
14447   int res1 = 0 ;
14448   Xapian::MSetIterator result;
14449   VALUE vresult = Qnil;
14450 
14451   if ((argc < 0) || (argc > 0)) {
14452     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
14453   }
14454   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
14455   if (!SWIG_IsOK(res1)) {
14456     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","begin", 1, self ));
14457   }
14458   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
14459   {
14460     try {
14461       result = ((Xapian::MSet const *)arg1)->begin();
14462     } catch (...) {
14463       string msg;
14464       int code = XapianExceptionHandler(msg);
14465       SWIG_exception(code, msg.c_str());
14466     }
14467   }
14468   vresult = SWIG_NewPointerObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_OWN |  0 );
14469   return vresult;
14470 fail:
14471   return Qnil;
14472 }
14473 
14474 
14475 
14476 /*
14477   Document-method: Xapian::MSet._end
14478 
14479   call-seq:
14480     _end -> MSetIterator
14481 
14482 Return an iterator to past the end of the MSet.
14483 */
14484 SWIGINTERN VALUE
_wrap_MSet__end(int argc,VALUE * argv,VALUE self)14485 _wrap_MSet__end(int argc, VALUE *argv, VALUE self) {
14486   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
14487   void *argp1 = 0 ;
14488   int res1 = 0 ;
14489   Xapian::MSetIterator result;
14490   VALUE vresult = Qnil;
14491 
14492   if ((argc < 0) || (argc > 0)) {
14493     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
14494   }
14495   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
14496   if (!SWIG_IsOK(res1)) {
14497     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","end", 1, self ));
14498   }
14499   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
14500   {
14501     try {
14502       result = ((Xapian::MSet const *)arg1)->end();
14503     } catch (...) {
14504       string msg;
14505       int code = XapianExceptionHandler(msg);
14506       SWIG_exception(code, msg.c_str());
14507     }
14508   }
14509   vresult = SWIG_NewPointerObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_OWN |  0 );
14510   return vresult;
14511 fail:
14512   return Qnil;
14513 }
14514 
14515 
14516 
14517 /*
14518   Document-method: Xapian::MSet._back
14519 
14520   call-seq:
14521     _back -> MSetIterator
14522 
14523 Return the last element in MSet.
14524 */
14525 SWIGINTERN VALUE
_wrap_MSet__back(int argc,VALUE * argv,VALUE self)14526 _wrap_MSet__back(int argc, VALUE *argv, VALUE self) {
14527   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
14528   void *argp1 = 0 ;
14529   int res1 = 0 ;
14530   Xapian::MSetIterator result;
14531   VALUE vresult = Qnil;
14532 
14533   if ((argc < 0) || (argc > 0)) {
14534     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
14535   }
14536   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
14537   if (!SWIG_IsOK(res1)) {
14538     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","back", 1, self ));
14539   }
14540   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
14541   {
14542     try {
14543       result = ((Xapian::MSet const *)arg1)->back();
14544     } catch (...) {
14545       string msg;
14546       int code = XapianExceptionHandler(msg);
14547       SWIG_exception(code, msg.c_str());
14548     }
14549   }
14550   vresult = SWIG_NewPointerObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_OWN |  0 );
14551   return vresult;
14552 fail:
14553   return Qnil;
14554 }
14555 
14556 
14557 SWIGINTERN VALUE
_wrap_MSet_description(int argc,VALUE * argv,VALUE self)14558 _wrap_MSet_description(int argc, VALUE *argv, VALUE self) {
14559   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
14560   void *argp1 = 0 ;
14561   int res1 = 0 ;
14562   std::string result;
14563   VALUE vresult = Qnil;
14564 
14565   if ((argc < 0) || (argc > 0)) {
14566     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
14567   }
14568   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
14569   if (!SWIG_IsOK(res1)) {
14570     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","get_description", 1, self ));
14571   }
14572   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
14573   {
14574     try {
14575       result = ((Xapian::MSet const *)arg1)->get_description();
14576     } catch (...) {
14577       string msg;
14578       int code = XapianExceptionHandler(msg);
14579       SWIG_exception(code, msg.c_str());
14580     }
14581   }
14582   vresult = SWIG_From_std_string(static_cast< std::string >(result));
14583   return vresult;
14584 fail:
14585   return Qnil;
14586 }
14587 
14588 
14589 SWIGINTERN VALUE
_wrap_MSet_docid(int argc,VALUE * argv,VALUE self)14590 _wrap_MSet_docid(int argc, VALUE *argv, VALUE self) {
14591   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
14592   Xapian::doccount arg2 ;
14593   void *argp1 = 0 ;
14594   int res1 = 0 ;
14595   unsigned int val2 ;
14596   int ecode2 = 0 ;
14597   Xapian::docid result;
14598   VALUE vresult = Qnil;
14599 
14600   if ((argc < 1) || (argc > 1)) {
14601     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
14602   }
14603   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
14604   if (!SWIG_IsOK(res1)) {
14605     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","get_docid", 1, self ));
14606   }
14607   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
14608   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
14609   if (!SWIG_IsOK(ecode2)) {
14610     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::doccount","get_docid", 2, argv[0] ));
14611   }
14612   arg2 = static_cast< Xapian::doccount >(val2);
14613   {
14614     try {
14615       result = (Xapian::docid)Xapian_MSet_get_docid((Xapian::MSet const *)arg1,arg2);
14616     } catch (...) {
14617       string msg;
14618       int code = XapianExceptionHandler(msg);
14619       SWIG_exception(code, msg.c_str());
14620     }
14621   }
14622   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
14623   return vresult;
14624 fail:
14625   return Qnil;
14626 }
14627 
14628 
14629 SWIGINTERN VALUE
_wrap_MSet_document(int argc,VALUE * argv,VALUE self)14630 _wrap_MSet_document(int argc, VALUE *argv, VALUE self) {
14631   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
14632   Xapian::doccount arg2 ;
14633   void *argp1 = 0 ;
14634   int res1 = 0 ;
14635   unsigned int val2 ;
14636   int ecode2 = 0 ;
14637   Xapian::Document result;
14638   VALUE vresult = Qnil;
14639 
14640   if ((argc < 1) || (argc > 1)) {
14641     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
14642   }
14643   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
14644   if (!SWIG_IsOK(res1)) {
14645     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","get_document", 1, self ));
14646   }
14647   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
14648   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
14649   if (!SWIG_IsOK(ecode2)) {
14650     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::doccount","get_document", 2, argv[0] ));
14651   }
14652   arg2 = static_cast< Xapian::doccount >(val2);
14653   {
14654     try {
14655       result = Xapian_MSet_get_document((Xapian::MSet const *)arg1,arg2);
14656     } catch (...) {
14657       string msg;
14658       int code = XapianExceptionHandler(msg);
14659       SWIG_exception(code, msg.c_str());
14660     }
14661   }
14662   vresult = SWIG_NewPointerObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_OWN |  0 );
14663   return vresult;
14664 fail:
14665   return Qnil;
14666 }
14667 
14668 
14669 SWIGINTERN VALUE
_wrap_MSet_hit(int argc,VALUE * argv,VALUE self)14670 _wrap_MSet_hit(int argc, VALUE *argv, VALUE self) {
14671   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
14672   Xapian::doccount arg2 ;
14673   void *argp1 = 0 ;
14674   int res1 = 0 ;
14675   unsigned int val2 ;
14676   int ecode2 = 0 ;
14677   Xapian::MSetIterator result;
14678   VALUE vresult = Qnil;
14679 
14680   if ((argc < 1) || (argc > 1)) {
14681     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
14682   }
14683   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
14684   if (!SWIG_IsOK(res1)) {
14685     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","get_hit", 1, self ));
14686   }
14687   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
14688   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
14689   if (!SWIG_IsOK(ecode2)) {
14690     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::doccount","get_hit", 2, argv[0] ));
14691   }
14692   arg2 = static_cast< Xapian::doccount >(val2);
14693   {
14694     try {
14695       result = Xapian_MSet_get_hit((Xapian::MSet const *)arg1,arg2);
14696     } catch (...) {
14697       string msg;
14698       int code = XapianExceptionHandler(msg);
14699       SWIG_exception(code, msg.c_str());
14700     }
14701   }
14702   vresult = SWIG_NewPointerObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_OWN |  0 );
14703   return vresult;
14704 fail:
14705   return Qnil;
14706 }
14707 
14708 
14709 SWIGINTERN VALUE
_wrap_MSet_document_percentage(int argc,VALUE * argv,VALUE self)14710 _wrap_MSet_document_percentage(int argc, VALUE *argv, VALUE self) {
14711   Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
14712   Xapian::doccount arg2 ;
14713   void *argp1 = 0 ;
14714   int res1 = 0 ;
14715   unsigned int val2 ;
14716   int ecode2 = 0 ;
14717   int result;
14718   VALUE vresult = Qnil;
14719 
14720   if ((argc < 1) || (argc > 1)) {
14721     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
14722   }
14723   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
14724   if (!SWIG_IsOK(res1)) {
14725     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSet const *","get_document_percentage", 1, self ));
14726   }
14727   arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
14728   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
14729   if (!SWIG_IsOK(ecode2)) {
14730     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::doccount","get_document_percentage", 2, argv[0] ));
14731   }
14732   arg2 = static_cast< Xapian::doccount >(val2);
14733   {
14734     try {
14735       result = (int)Xapian_MSet_get_document_percentage((Xapian::MSet const *)arg1,arg2);
14736     } catch (...) {
14737       string msg;
14738       int code = XapianExceptionHandler(msg);
14739       SWIG_exception(code, msg.c_str());
14740     }
14741   }
14742   vresult = SWIG_From_int(static_cast< int >(result));
14743   return vresult;
14744 fail:
14745   return Qnil;
14746 }
14747 
14748 
14749 static swig_class SwigClassMSetIterator;
14750 
14751 SWIGINTERN VALUE
_wrap_MSetIterator_mset_set(int argc,VALUE * argv,VALUE self)14752 _wrap_MSetIterator_mset_set(int argc, VALUE *argv, VALUE self) {
14753   Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
14754   Xapian::MSet *arg2 = (Xapian::MSet *) 0 ;
14755   void *argp1 = 0 ;
14756   int res1 = 0 ;
14757   void *argp2 = 0 ;
14758   int res2 = 0 ;
14759 
14760   if ((argc < 1) || (argc > 1)) {
14761     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
14762   }
14763   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
14764   if (!SWIG_IsOK(res1)) {
14765     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator *","mset", 1, self ));
14766   }
14767   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
14768   res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
14769   if (!SWIG_IsOK(res2)) {
14770     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::MSet *","mset", 2, argv[0] ));
14771   }
14772   arg2 = reinterpret_cast< Xapian::MSet * >(argp2);
14773   if (arg1) (arg1)->mset = *arg2;
14774   return Qnil;
14775 fail:
14776   return Qnil;
14777 }
14778 
14779 
14780 SWIGINTERN VALUE
_wrap_MSetIterator_mset_get(int argc,VALUE * argv,VALUE self)14781 _wrap_MSetIterator_mset_get(int argc, VALUE *argv, VALUE self) {
14782   Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
14783   void *argp1 = 0 ;
14784   int res1 = 0 ;
14785   Xapian::MSet *result = 0 ;
14786   VALUE vresult = Qnil;
14787 
14788   if ((argc < 0) || (argc > 0)) {
14789     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
14790   }
14791   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
14792   if (!SWIG_IsOK(res1)) {
14793     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator *","mset", 1, self ));
14794   }
14795   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
14796   result = (Xapian::MSet *)& ((arg1)->mset);
14797   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MSet, 0 |  0 );
14798   return vresult;
14799 fail:
14800   return Qnil;
14801 }
14802 
14803 
14804 SWIGINTERN VALUE
_wrap_MSetIterator_off_from_end_set(int argc,VALUE * argv,VALUE self)14805 _wrap_MSetIterator_off_from_end_set(int argc, VALUE *argv, VALUE self) {
14806   Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
14807   Xapian::MSet::size_type arg2 ;
14808   void *argp1 = 0 ;
14809   int res1 = 0 ;
14810   unsigned int val2 ;
14811   int ecode2 = 0 ;
14812 
14813   if ((argc < 1) || (argc > 1)) {
14814     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
14815   }
14816   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
14817   if (!SWIG_IsOK(res1)) {
14818     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator *","off_from_end", 1, self ));
14819   }
14820   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
14821   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
14822   if (!SWIG_IsOK(ecode2)) {
14823     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::MSet::size_type","off_from_end", 2, argv[0] ));
14824   }
14825   arg2 = static_cast< Xapian::MSet::size_type >(val2);
14826   if (arg1) (arg1)->off_from_end = arg2;
14827   return Qnil;
14828 fail:
14829   return Qnil;
14830 }
14831 
14832 
14833 SWIGINTERN VALUE
_wrap_MSetIterator_off_from_end_get(int argc,VALUE * argv,VALUE self)14834 _wrap_MSetIterator_off_from_end_get(int argc, VALUE *argv, VALUE self) {
14835   Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
14836   void *argp1 = 0 ;
14837   int res1 = 0 ;
14838   Xapian::MSet::size_type result;
14839   VALUE vresult = Qnil;
14840 
14841   if ((argc < 0) || (argc > 0)) {
14842     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
14843   }
14844   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
14845   if (!SWIG_IsOK(res1)) {
14846     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator *","off_from_end", 1, self ));
14847   }
14848   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
14849   result = (Xapian::MSet::size_type) ((arg1)->off_from_end);
14850   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
14851   return vresult;
14852 fail:
14853   return Qnil;
14854 }
14855 
14856 
14857 SWIGINTERN VALUE
14858 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_MSetIterator_allocate(VALUE self)14859 _wrap_MSetIterator_allocate(VALUE self)
14860 #else
14861 _wrap_MSetIterator_allocate(int argc, VALUE *argv, VALUE self)
14862 #endif
14863 {
14864   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__MSetIterator);
14865 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
14866   rb_obj_call_init(vresult, argc, argv);
14867 #endif
14868   return vresult;
14869 }
14870 
14871 
14872 SWIGINTERN VALUE
_wrap_new_MSetIterator(int argc,VALUE * argv,VALUE self)14873 _wrap_new_MSetIterator(int argc, VALUE *argv, VALUE self) {
14874   const char *classname SWIGUNUSED = "Xapian::MSetIterator";
14875   Xapian::MSetIterator *result = 0 ;
14876 
14877   if ((argc < 0) || (argc > 0)) {
14878     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
14879   }
14880   {
14881     try {
14882       result = (Xapian::MSetIterator *)new Xapian::MSetIterator();
14883       DATA_PTR(self) = result;
14884     } catch (...) {
14885       string msg;
14886       int code = XapianExceptionHandler(msg);
14887       SWIG_exception(code, msg.c_str());
14888     }
14889   }
14890   return self;
14891 fail:
14892   return Qnil;
14893 }
14894 
14895 
14896 SWIGINTERN VALUE
_wrap_MSetIterator_rank(int argc,VALUE * argv,VALUE self)14897 _wrap_MSetIterator_rank(int argc, VALUE *argv, VALUE self) {
14898   Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
14899   void *argp1 = 0 ;
14900   int res1 = 0 ;
14901   Xapian::doccount result;
14902   VALUE vresult = Qnil;
14903 
14904   if ((argc < 0) || (argc > 0)) {
14905     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
14906   }
14907   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
14908   if (!SWIG_IsOK(res1)) {
14909     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator const *","get_rank", 1, self ));
14910   }
14911   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
14912   {
14913     try {
14914       result = (Xapian::doccount)((Xapian::MSetIterator const *)arg1)->get_rank();
14915     } catch (...) {
14916       string msg;
14917       int code = XapianExceptionHandler(msg);
14918       SWIG_exception(code, msg.c_str());
14919     }
14920   }
14921   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
14922   return vresult;
14923 fail:
14924   return Qnil;
14925 }
14926 
14927 
14928 SWIGINTERN VALUE
_wrap_MSetIterator_document(int argc,VALUE * argv,VALUE self)14929 _wrap_MSetIterator_document(int argc, VALUE *argv, VALUE self) {
14930   Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
14931   void *argp1 = 0 ;
14932   int res1 = 0 ;
14933   Xapian::Document result;
14934   VALUE vresult = Qnil;
14935 
14936   if ((argc < 0) || (argc > 0)) {
14937     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
14938   }
14939   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
14940   if (!SWIG_IsOK(res1)) {
14941     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator const *","get_document", 1, self ));
14942   }
14943   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
14944   {
14945     try {
14946       result = ((Xapian::MSetIterator const *)arg1)->get_document();
14947     } catch (...) {
14948       string msg;
14949       int code = XapianExceptionHandler(msg);
14950       SWIG_exception(code, msg.c_str());
14951     }
14952   }
14953   vresult = SWIG_NewPointerObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_OWN |  0 );
14954   return vresult;
14955 fail:
14956   return Qnil;
14957 }
14958 
14959 
14960 SWIGINTERN VALUE
_wrap_MSetIterator_weight(int argc,VALUE * argv,VALUE self)14961 _wrap_MSetIterator_weight(int argc, VALUE *argv, VALUE self) {
14962   Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
14963   void *argp1 = 0 ;
14964   int res1 = 0 ;
14965   double result;
14966   VALUE vresult = Qnil;
14967 
14968   if ((argc < 0) || (argc > 0)) {
14969     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
14970   }
14971   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
14972   if (!SWIG_IsOK(res1)) {
14973     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator const *","get_weight", 1, self ));
14974   }
14975   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
14976   {
14977     try {
14978       result = (double)((Xapian::MSetIterator const *)arg1)->get_weight();
14979     } catch (...) {
14980       string msg;
14981       int code = XapianExceptionHandler(msg);
14982       SWIG_exception(code, msg.c_str());
14983     }
14984   }
14985   vresult = SWIG_From_double(static_cast< double >(result));
14986   return vresult;
14987 fail:
14988   return Qnil;
14989 }
14990 
14991 
14992 SWIGINTERN VALUE
_wrap_MSetIterator_get_collapse_key(int argc,VALUE * argv,VALUE self)14993 _wrap_MSetIterator_get_collapse_key(int argc, VALUE *argv, VALUE self) {
14994   Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
14995   void *argp1 = 0 ;
14996   int res1 = 0 ;
14997   std::string result;
14998   VALUE vresult = Qnil;
14999 
15000   if ((argc < 0) || (argc > 0)) {
15001     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
15002   }
15003   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
15004   if (!SWIG_IsOK(res1)) {
15005     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator const *","get_collapse_key", 1, self ));
15006   }
15007   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
15008   {
15009     try {
15010       result = ((Xapian::MSetIterator const *)arg1)->get_collapse_key();
15011     } catch (...) {
15012       string msg;
15013       int code = XapianExceptionHandler(msg);
15014       SWIG_exception(code, msg.c_str());
15015     }
15016   }
15017   vresult = SWIG_From_std_string(static_cast< std::string >(result));
15018   return vresult;
15019 fail:
15020   return Qnil;
15021 }
15022 
15023 
15024 SWIGINTERN VALUE
_wrap_MSetIterator_collapse_count(int argc,VALUE * argv,VALUE self)15025 _wrap_MSetIterator_collapse_count(int argc, VALUE *argv, VALUE self) {
15026   Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
15027   void *argp1 = 0 ;
15028   int res1 = 0 ;
15029   Xapian::doccount result;
15030   VALUE vresult = Qnil;
15031 
15032   if ((argc < 0) || (argc > 0)) {
15033     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
15034   }
15035   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
15036   if (!SWIG_IsOK(res1)) {
15037     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator const *","get_collapse_count", 1, self ));
15038   }
15039   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
15040   {
15041     try {
15042       result = (Xapian::doccount)((Xapian::MSetIterator const *)arg1)->get_collapse_count();
15043     } catch (...) {
15044       string msg;
15045       int code = XapianExceptionHandler(msg);
15046       SWIG_exception(code, msg.c_str());
15047     }
15048   }
15049   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
15050   return vresult;
15051 fail:
15052   return Qnil;
15053 }
15054 
15055 
15056 SWIGINTERN VALUE
_wrap_MSetIterator_get_sort_key(int argc,VALUE * argv,VALUE self)15057 _wrap_MSetIterator_get_sort_key(int argc, VALUE *argv, VALUE self) {
15058   Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
15059   void *argp1 = 0 ;
15060   int res1 = 0 ;
15061   std::string result;
15062   VALUE vresult = Qnil;
15063 
15064   if ((argc < 0) || (argc > 0)) {
15065     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
15066   }
15067   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
15068   if (!SWIG_IsOK(res1)) {
15069     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator const *","get_sort_key", 1, self ));
15070   }
15071   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
15072   {
15073     try {
15074       result = ((Xapian::MSetIterator const *)arg1)->get_sort_key();
15075     } catch (...) {
15076       string msg;
15077       int code = XapianExceptionHandler(msg);
15078       SWIG_exception(code, msg.c_str());
15079     }
15080   }
15081   vresult = SWIG_From_std_string(static_cast< std::string >(result));
15082   return vresult;
15083 fail:
15084   return Qnil;
15085 }
15086 
15087 
15088 SWIGINTERN VALUE
_wrap_MSetIterator_percent(int argc,VALUE * argv,VALUE self)15089 _wrap_MSetIterator_percent(int argc, VALUE *argv, VALUE self) {
15090   Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
15091   void *argp1 = 0 ;
15092   int res1 = 0 ;
15093   int result;
15094   VALUE vresult = Qnil;
15095 
15096   if ((argc < 0) || (argc > 0)) {
15097     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
15098   }
15099   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
15100   if (!SWIG_IsOK(res1)) {
15101     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator const *","get_percent", 1, self ));
15102   }
15103   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
15104   {
15105     try {
15106       result = (int)((Xapian::MSetIterator const *)arg1)->get_percent();
15107     } catch (...) {
15108       string msg;
15109       int code = XapianExceptionHandler(msg);
15110       SWIG_exception(code, msg.c_str());
15111     }
15112   }
15113   vresult = SWIG_From_int(static_cast< int >(result));
15114   return vresult;
15115 fail:
15116   return Qnil;
15117 }
15118 
15119 
15120 SWIGINTERN VALUE
_wrap_MSetIterator_description(int argc,VALUE * argv,VALUE self)15121 _wrap_MSetIterator_description(int argc, VALUE *argv, VALUE self) {
15122   Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
15123   void *argp1 = 0 ;
15124   int res1 = 0 ;
15125   std::string result;
15126   VALUE vresult = Qnil;
15127 
15128   if ((argc < 0) || (argc > 0)) {
15129     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
15130   }
15131   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
15132   if (!SWIG_IsOK(res1)) {
15133     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator const *","get_description", 1, self ));
15134   }
15135   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
15136   {
15137     try {
15138       result = ((Xapian::MSetIterator const *)arg1)->get_description();
15139     } catch (...) {
15140       string msg;
15141       int code = XapianExceptionHandler(msg);
15142       SWIG_exception(code, msg.c_str());
15143     }
15144   }
15145   vresult = SWIG_From_std_string(static_cast< std::string >(result));
15146   return vresult;
15147 fail:
15148   return Qnil;
15149 }
15150 
15151 
15152 SWIGINTERN VALUE
_wrap_MSetIterator_equals(int argc,VALUE * argv,VALUE self)15153 _wrap_MSetIterator_equals(int argc, VALUE *argv, VALUE self) {
15154   Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
15155   Xapian::MSetIterator *arg2 = 0 ;
15156   void *argp1 = 0 ;
15157   int res1 = 0 ;
15158   void *argp2 ;
15159   int res2 = 0 ;
15160   bool result;
15161   VALUE vresult = Qnil;
15162 
15163   if ((argc < 1) || (argc > 1)) {
15164     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
15165   }
15166   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
15167   if (!SWIG_IsOK(res1)) {
15168     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator const *","equals", 1, self ));
15169   }
15170   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
15171   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
15172   if (!SWIG_IsOK(res2)) {
15173     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","equals", 2, argv[0] ));
15174   }
15175   if (!argp2) {
15176     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","equals", 2, argv[0]));
15177   }
15178   arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
15179   {
15180     try {
15181       result = (bool)Xapian_MSetIterator_equals((Xapian::MSetIterator const *)arg1,(Xapian::MSetIterator const &)*arg2);
15182     } catch (...) {
15183       string msg;
15184       int code = XapianExceptionHandler(msg);
15185       SWIG_exception(code, msg.c_str());
15186     }
15187   }
15188   vresult = SWIG_From_bool(static_cast< bool >(result));
15189   return vresult;
15190 fail:
15191   return Qnil;
15192 }
15193 
15194 
15195 SWIGINTERN VALUE
_wrap_MSetIterator_docid(int argc,VALUE * argv,VALUE self)15196 _wrap_MSetIterator_docid(int argc, VALUE *argv, VALUE self) {
15197   Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
15198   void *argp1 = 0 ;
15199   int res1 = 0 ;
15200   Xapian::docid result;
15201   VALUE vresult = Qnil;
15202 
15203   if ((argc < 0) || (argc > 0)) {
15204     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
15205   }
15206   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
15207   if (!SWIG_IsOK(res1)) {
15208     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator const *","get_docid", 1, self ));
15209   }
15210   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
15211   {
15212     try {
15213       result = (Xapian::docid)Xapian_MSetIterator_get_docid((Xapian::MSetIterator const *)arg1);
15214     } catch (...) {
15215       string msg;
15216       int code = XapianExceptionHandler(msg);
15217       SWIG_exception(code, msg.c_str());
15218     }
15219   }
15220   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
15221   return vresult;
15222 fail:
15223   return Qnil;
15224 }
15225 
15226 
15227 SWIGINTERN VALUE
_wrap_MSetIterator_next(int argc,VALUE * argv,VALUE self)15228 _wrap_MSetIterator_next(int argc, VALUE *argv, VALUE self) {
15229   Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
15230   void *argp1 = 0 ;
15231   int res1 = 0 ;
15232 
15233   if ((argc < 0) || (argc > 0)) {
15234     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
15235   }
15236   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
15237   if (!SWIG_IsOK(res1)) {
15238     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator *","next", 1, self ));
15239   }
15240   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
15241   {
15242     try {
15243       Xapian_MSetIterator_next(arg1);
15244     } catch (...) {
15245       string msg;
15246       int code = XapianExceptionHandler(msg);
15247       SWIG_exception(code, msg.c_str());
15248     }
15249   }
15250   return Qnil;
15251 fail:
15252   return Qnil;
15253 }
15254 
15255 
15256 SWIGINTERN VALUE
_wrap_MSetIterator_prev(int argc,VALUE * argv,VALUE self)15257 _wrap_MSetIterator_prev(int argc, VALUE *argv, VALUE self) {
15258   Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
15259   void *argp1 = 0 ;
15260   int res1 = 0 ;
15261 
15262   if ((argc < 0) || (argc > 0)) {
15263     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
15264   }
15265   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
15266   if (!SWIG_IsOK(res1)) {
15267     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator *","prev", 1, self ));
15268   }
15269   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
15270   {
15271     try {
15272       Xapian_MSetIterator_prev(arg1);
15273     } catch (...) {
15274       string msg;
15275       int code = XapianExceptionHandler(msg);
15276       SWIG_exception(code, msg.c_str());
15277     }
15278   }
15279   return Qnil;
15280 fail:
15281   return Qnil;
15282 }
15283 
15284 
15285 SWIGINTERN void
free_Xapian_MSetIterator(void * self)15286 free_Xapian_MSetIterator(void *self) {
15287     Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *)self;
15288     delete arg1;
15289 }
15290 
15291 
15292 /*
15293   Document-method: Xapian::Xapian.==
15294 
15295   call-seq:
15296     ==(a, b) -> bool
15297     ==(a, b) -> bool
15298     ==(a, b) -> bool
15299     ==(a, b) -> bool
15300     ==(a, b) -> bool
15301     ==(a, b) -> bool
15302 
15303 Equality comparison operator.
15304 */
15305 SWIGINTERN VALUE
_wrap___eq____SWIG_4(int argc,VALUE * argv,VALUE self)15306 _wrap___eq____SWIG_4(int argc, VALUE *argv, VALUE self) {
15307   Xapian::MSetIterator *arg1 = 0 ;
15308   Xapian::MSetIterator *arg2 = 0 ;
15309   void *argp1 ;
15310   int res1 = 0 ;
15311   void *argp2 ;
15312   int res2 = 0 ;
15313   bool result;
15314   VALUE vresult = Qnil;
15315 
15316   if ((argc < 2) || (argc > 2)) {
15317     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
15318   }
15319   res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Xapian__MSetIterator,  0 );
15320   if (!SWIG_IsOK(res1)) {
15321     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","Xapian::operator ==", 1, argv[0] ));
15322   }
15323   if (!argp1) {
15324     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","Xapian::operator ==", 1, argv[0]));
15325   }
15326   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
15327   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
15328   if (!SWIG_IsOK(res2)) {
15329     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","Xapian::operator ==", 2, argv[1] ));
15330   }
15331   if (!argp2) {
15332     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","Xapian::operator ==", 2, argv[1]));
15333   }
15334   arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
15335   {
15336     try {
15337       result = (bool)Xapian::operator ==((Xapian::MSetIterator const &)*arg1,(Xapian::MSetIterator const &)*arg2);
15338     } catch (...) {
15339       string msg;
15340       int code = XapianExceptionHandler(msg);
15341       SWIG_exception(code, msg.c_str());
15342     }
15343   }
15344   vresult = SWIG_From_bool(static_cast< bool >(result));
15345   return vresult;
15346 fail:
15347   return Qnil;
15348 }
15349 
15350 
15351 
15352 /*
15353   Document-method: Xapian::Xapian.<
15354 
15355   call-seq:
15356     <(a, b) -> bool
15357     <(a, b) -> bool
15358 
15359 Lower than comparison operator.
15360 */
15361 SWIGINTERN VALUE
_wrap___lt____SWIG_0(int argc,VALUE * argv,VALUE self)15362 _wrap___lt____SWIG_0(int argc, VALUE *argv, VALUE self) {
15363   Xapian::MSetIterator *arg1 = 0 ;
15364   Xapian::MSetIterator *arg2 = 0 ;
15365   void *argp1 ;
15366   int res1 = 0 ;
15367   void *argp2 ;
15368   int res2 = 0 ;
15369   bool result;
15370   VALUE vresult = Qnil;
15371 
15372   if ((argc < 2) || (argc > 2)) {
15373     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
15374   }
15375   res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Xapian__MSetIterator,  0 );
15376   if (!SWIG_IsOK(res1)) {
15377     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","Xapian::operator <", 1, argv[0] ));
15378   }
15379   if (!argp1) {
15380     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","Xapian::operator <", 1, argv[0]));
15381   }
15382   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
15383   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
15384   if (!SWIG_IsOK(res2)) {
15385     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","Xapian::operator <", 2, argv[1] ));
15386   }
15387   if (!argp2) {
15388     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","Xapian::operator <", 2, argv[1]));
15389   }
15390   arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
15391   {
15392     try {
15393       result = (bool)Xapian::operator <((Xapian::MSetIterator const &)*arg1,(Xapian::MSetIterator const &)*arg2);
15394     } catch (...) {
15395       string msg;
15396       int code = XapianExceptionHandler(msg);
15397       SWIG_exception(code, msg.c_str());
15398     }
15399   }
15400   vresult = SWIG_From_bool(static_cast< bool >(result));
15401   return vresult;
15402 fail:
15403   return Qnil;
15404 }
15405 
15406 
15407 
15408 /*
15409   Document-method: Xapian::Xapian.>
15410 
15411   call-seq:
15412     >(a, b) -> bool
15413     >(a, b) -> bool
15414 
15415 Higher than comparison operator.
15416 */
15417 SWIGINTERN VALUE
_wrap___gt____SWIG_0(int argc,VALUE * argv,VALUE self)15418 _wrap___gt____SWIG_0(int argc, VALUE *argv, VALUE self) {
15419   Xapian::MSetIterator *arg1 = 0 ;
15420   Xapian::MSetIterator *arg2 = 0 ;
15421   void *argp1 ;
15422   int res1 = 0 ;
15423   void *argp2 ;
15424   int res2 = 0 ;
15425   bool result;
15426   VALUE vresult = Qnil;
15427 
15428   if ((argc < 2) || (argc > 2)) {
15429     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
15430   }
15431   res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Xapian__MSetIterator,  0 );
15432   if (!SWIG_IsOK(res1)) {
15433     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","Xapian::operator >", 1, argv[0] ));
15434   }
15435   if (!argp1) {
15436     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","Xapian::operator >", 1, argv[0]));
15437   }
15438   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
15439   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
15440   if (!SWIG_IsOK(res2)) {
15441     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","Xapian::operator >", 2, argv[1] ));
15442   }
15443   if (!argp2) {
15444     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","Xapian::operator >", 2, argv[1]));
15445   }
15446   arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
15447   {
15448     try {
15449       result = (bool)Xapian::operator >((Xapian::MSetIterator const &)*arg1,(Xapian::MSetIterator const &)*arg2);
15450     } catch (...) {
15451       string msg;
15452       int code = XapianExceptionHandler(msg);
15453       SWIG_exception(code, msg.c_str());
15454     }
15455   }
15456   vresult = SWIG_From_bool(static_cast< bool >(result));
15457   return vresult;
15458 fail:
15459   return Qnil;
15460 }
15461 
15462 
15463 
15464 /*
15465   Document-method: Xapian::Xapian.>=
15466 
15467   call-seq:
15468     >=(a, b) -> bool
15469     >=(a, b) -> bool
15470 
15471 Higher or equal comparison operator.
15472 */
15473 SWIGINTERN VALUE
_wrap___ge____SWIG_0(int argc,VALUE * argv,VALUE self)15474 _wrap___ge____SWIG_0(int argc, VALUE *argv, VALUE self) {
15475   Xapian::MSetIterator *arg1 = 0 ;
15476   Xapian::MSetIterator *arg2 = 0 ;
15477   void *argp1 ;
15478   int res1 = 0 ;
15479   void *argp2 ;
15480   int res2 = 0 ;
15481   bool result;
15482   VALUE vresult = Qnil;
15483 
15484   if ((argc < 2) || (argc > 2)) {
15485     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
15486   }
15487   res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Xapian__MSetIterator,  0 );
15488   if (!SWIG_IsOK(res1)) {
15489     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","Xapian::operator >=", 1, argv[0] ));
15490   }
15491   if (!argp1) {
15492     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","Xapian::operator >=", 1, argv[0]));
15493   }
15494   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
15495   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
15496   if (!SWIG_IsOK(res2)) {
15497     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","Xapian::operator >=", 2, argv[1] ));
15498   }
15499   if (!argp2) {
15500     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","Xapian::operator >=", 2, argv[1]));
15501   }
15502   arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
15503   {
15504     try {
15505       result = (bool)Xapian::operator >=((Xapian::MSetIterator const &)*arg1,(Xapian::MSetIterator const &)*arg2);
15506     } catch (...) {
15507       string msg;
15508       int code = XapianExceptionHandler(msg);
15509       SWIG_exception(code, msg.c_str());
15510     }
15511   }
15512   vresult = SWIG_From_bool(static_cast< bool >(result));
15513   return vresult;
15514 fail:
15515   return Qnil;
15516 }
15517 
15518 
15519 
15520 /*
15521   Document-method: Xapian::Xapian.<=
15522 
15523   call-seq:
15524     <=(a, b) -> bool
15525     <=(a, b) -> bool
15526 
15527 Lower or equal comparison operator.
15528 */
15529 SWIGINTERN VALUE
_wrap___le____SWIG_0(int argc,VALUE * argv,VALUE self)15530 _wrap___le____SWIG_0(int argc, VALUE *argv, VALUE self) {
15531   Xapian::MSetIterator *arg1 = 0 ;
15532   Xapian::MSetIterator *arg2 = 0 ;
15533   void *argp1 ;
15534   int res1 = 0 ;
15535   void *argp2 ;
15536   int res2 = 0 ;
15537   bool result;
15538   VALUE vresult = Qnil;
15539 
15540   if ((argc < 2) || (argc > 2)) {
15541     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
15542   }
15543   res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Xapian__MSetIterator,  0 );
15544   if (!SWIG_IsOK(res1)) {
15545     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","Xapian::operator <=", 1, argv[0] ));
15546   }
15547   if (!argp1) {
15548     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","Xapian::operator <=", 1, argv[0]));
15549   }
15550   arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
15551   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
15552   if (!SWIG_IsOK(res2)) {
15553     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","Xapian::operator <=", 2, argv[1] ));
15554   }
15555   if (!argp2) {
15556     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","Xapian::operator <=", 2, argv[1]));
15557   }
15558   arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
15559   {
15560     try {
15561       result = (bool)Xapian::operator <=((Xapian::MSetIterator const &)*arg1,(Xapian::MSetIterator const &)*arg2);
15562     } catch (...) {
15563       string msg;
15564       int code = XapianExceptionHandler(msg);
15565       SWIG_exception(code, msg.c_str());
15566     }
15567   }
15568   vresult = SWIG_From_bool(static_cast< bool >(result));
15569   return vresult;
15570 fail:
15571   return Qnil;
15572 }
15573 
15574 
15575 
15576 /*
15577   Document-method: Xapian::Xapian.+
15578 
15579   call-seq:
15580     +(n, it) -> MSetIterator
15581     +(n, it) -> ESetIterator
15582 
15583 Add operator.
15584 */
15585 SWIGINTERN VALUE
_wrap___add____SWIG_0(int argc,VALUE * argv,VALUE self)15586 _wrap___add____SWIG_0(int argc, VALUE *argv, VALUE self) {
15587   Xapian::MSetIterator::difference_type arg1 ;
15588   Xapian::MSetIterator *arg2 = 0 ;
15589   int val1 ;
15590   int ecode1 = 0 ;
15591   void *argp2 ;
15592   int res2 = 0 ;
15593   Xapian::MSetIterator result;
15594   VALUE vresult = Qnil;
15595 
15596   if ((argc < 2) || (argc > 2)) {
15597     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
15598   }
15599   ecode1 = SWIG_AsVal_int(argv[0], &val1);
15600   if (!SWIG_IsOK(ecode1)) {
15601     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::MSetIterator::difference_type","Xapian::operator +", 1, argv[0] ));
15602   }
15603   arg1 = static_cast< Xapian::MSetIterator::difference_type >(val1);
15604   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
15605   if (!SWIG_IsOK(res2)) {
15606     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","Xapian::operator +", 2, argv[1] ));
15607   }
15608   if (!argp2) {
15609     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","Xapian::operator +", 2, argv[1]));
15610   }
15611   arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
15612   {
15613     try {
15614       result = Xapian::operator +(arg1,(Xapian::MSetIterator const &)*arg2);
15615     } catch (...) {
15616       string msg;
15617       int code = XapianExceptionHandler(msg);
15618       SWIG_exception(code, msg.c_str());
15619     }
15620   }
15621   vresult = SWIG_NewPointerObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_OWN |  0 );
15622   return vresult;
15623 fail:
15624   return Qnil;
15625 }
15626 
15627 
15628 static swig_class SwigClassESet;
15629 
15630 SWIGINTERN VALUE
15631 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_ESet_allocate(VALUE self)15632 _wrap_ESet_allocate(VALUE self)
15633 #else
15634 _wrap_ESet_allocate(int argc, VALUE *argv, VALUE self)
15635 #endif
15636 {
15637   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__ESet);
15638 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
15639   rb_obj_call_init(vresult, argc, argv);
15640 #endif
15641   return vresult;
15642 }
15643 
15644 
15645 SWIGINTERN VALUE
_wrap_new_ESet(int argc,VALUE * argv,VALUE self)15646 _wrap_new_ESet(int argc, VALUE *argv, VALUE self) {
15647   const char *classname SWIGUNUSED = "Xapian::ESet";
15648   Xapian::ESet *result = 0 ;
15649 
15650   if ((argc < 0) || (argc > 0)) {
15651     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
15652   }
15653   {
15654     try {
15655       result = (Xapian::ESet *)new Xapian::ESet();
15656       DATA_PTR(self) = result;
15657     } catch (...) {
15658       string msg;
15659       int code = XapianExceptionHandler(msg);
15660       SWIG_exception(code, msg.c_str());
15661     }
15662   }
15663   return self;
15664 fail:
15665   return Qnil;
15666 }
15667 
15668 
15669 SWIGINTERN void
free_Xapian_ESet(void * self)15670 free_Xapian_ESet(void *self) {
15671     Xapian::ESet *arg1 = (Xapian::ESet *)self;
15672     delete arg1;
15673 }
15674 
15675 
15676 /*
15677   Document-method: Xapian::ESet.size
15678 
15679   call-seq:
15680     size -> Xapian::doccount
15681 
15682 Size or Length of the ESet.
15683 */
15684 SWIGINTERN VALUE
_wrap_ESet_size(int argc,VALUE * argv,VALUE self)15685 _wrap_ESet_size(int argc, VALUE *argv, VALUE self) {
15686   Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
15687   void *argp1 = 0 ;
15688   int res1 = 0 ;
15689   Xapian::doccount result;
15690   VALUE vresult = Qnil;
15691 
15692   if ((argc < 0) || (argc > 0)) {
15693     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
15694   }
15695   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
15696   if (!SWIG_IsOK(res1)) {
15697     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESet const *","size", 1, self ));
15698   }
15699   arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
15700   {
15701     try {
15702       result = (Xapian::doccount)((Xapian::ESet const *)arg1)->size();
15703     } catch (...) {
15704       string msg;
15705       int code = XapianExceptionHandler(msg);
15706       SWIG_exception(code, msg.c_str());
15707     }
15708   }
15709   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
15710   return vresult;
15711 fail:
15712   return Qnil;
15713 }
15714 
15715 
15716 
15717 /*
15718   Document-method: Xapian::ESet.empty
15719 
15720   call-seq:
15721     empty -> bool
15722 
15723 Check if the ESet is empty or not.
15724 */
15725 SWIGINTERN VALUE
_wrap_ESet_emptyq___(int argc,VALUE * argv,VALUE self)15726 _wrap_ESet_emptyq___(int argc, VALUE *argv, VALUE self) {
15727   Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
15728   void *argp1 = 0 ;
15729   int res1 = 0 ;
15730   bool result;
15731   VALUE vresult = Qnil;
15732 
15733   if ((argc < 0) || (argc > 0)) {
15734     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
15735   }
15736   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
15737   if (!SWIG_IsOK(res1)) {
15738     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESet const *","empty", 1, self ));
15739   }
15740   arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
15741   {
15742     try {
15743       result = (bool)((Xapian::ESet const *)arg1)->empty();
15744     } catch (...) {
15745       string msg;
15746       int code = XapianExceptionHandler(msg);
15747       SWIG_exception(code, msg.c_str());
15748     }
15749   }
15750   vresult = (result ? Qtrue : Qfalse);
15751   return vresult;
15752 fail:
15753   return Qnil;
15754 }
15755 
15756 
15757 SWIGINTERN VALUE
_wrap_ESet_ebound(int argc,VALUE * argv,VALUE self)15758 _wrap_ESet_ebound(int argc, VALUE *argv, VALUE self) {
15759   Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
15760   void *argp1 = 0 ;
15761   int res1 = 0 ;
15762   Xapian::termcount result;
15763   VALUE vresult = Qnil;
15764 
15765   if ((argc < 0) || (argc > 0)) {
15766     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
15767   }
15768   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
15769   if (!SWIG_IsOK(res1)) {
15770     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESet const *","get_ebound", 1, self ));
15771   }
15772   arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
15773   {
15774     try {
15775       result = (Xapian::termcount)((Xapian::ESet const *)arg1)->get_ebound();
15776     } catch (...) {
15777       string msg;
15778       int code = XapianExceptionHandler(msg);
15779       SWIG_exception(code, msg.c_str());
15780     }
15781   }
15782   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
15783   return vresult;
15784 fail:
15785   return Qnil;
15786 }
15787 
15788 
15789 
15790 /*
15791   Document-method: Xapian::ESet._begin
15792 
15793   call-seq:
15794     _begin -> ESetIterator
15795 
15796 Return an iterator to the beginning of the ESet.
15797 */
15798 SWIGINTERN VALUE
_wrap_ESet__begin(int argc,VALUE * argv,VALUE self)15799 _wrap_ESet__begin(int argc, VALUE *argv, VALUE self) {
15800   Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
15801   void *argp1 = 0 ;
15802   int res1 = 0 ;
15803   Xapian::ESetIterator result;
15804   VALUE vresult = Qnil;
15805 
15806   if ((argc < 0) || (argc > 0)) {
15807     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
15808   }
15809   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
15810   if (!SWIG_IsOK(res1)) {
15811     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESet const *","begin", 1, self ));
15812   }
15813   arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
15814   {
15815     try {
15816       result = ((Xapian::ESet const *)arg1)->begin();
15817     } catch (...) {
15818       string msg;
15819       int code = XapianExceptionHandler(msg);
15820       SWIG_exception(code, msg.c_str());
15821     }
15822   }
15823   vresult = SWIG_NewPointerObj((new Xapian::ESetIterator(static_cast< const Xapian::ESetIterator& >(result))), SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_OWN |  0 );
15824   return vresult;
15825 fail:
15826   return Qnil;
15827 }
15828 
15829 
15830 
15831 /*
15832   Document-method: Xapian::ESet._end
15833 
15834   call-seq:
15835     _end -> ESetIterator
15836 
15837 Return an iterator to past the end of the ESet.
15838 */
15839 SWIGINTERN VALUE
_wrap_ESet__end(int argc,VALUE * argv,VALUE self)15840 _wrap_ESet__end(int argc, VALUE *argv, VALUE self) {
15841   Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
15842   void *argp1 = 0 ;
15843   int res1 = 0 ;
15844   Xapian::ESetIterator result;
15845   VALUE vresult = Qnil;
15846 
15847   if ((argc < 0) || (argc > 0)) {
15848     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
15849   }
15850   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
15851   if (!SWIG_IsOK(res1)) {
15852     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESet const *","end", 1, self ));
15853   }
15854   arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
15855   {
15856     try {
15857       result = ((Xapian::ESet const *)arg1)->end();
15858     } catch (...) {
15859       string msg;
15860       int code = XapianExceptionHandler(msg);
15861       SWIG_exception(code, msg.c_str());
15862     }
15863   }
15864   vresult = SWIG_NewPointerObj((new Xapian::ESetIterator(static_cast< const Xapian::ESetIterator& >(result))), SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_OWN |  0 );
15865   return vresult;
15866 fail:
15867   return Qnil;
15868 }
15869 
15870 
15871 
15872 /*
15873   Document-method: Xapian::ESet._back
15874 
15875   call-seq:
15876     _back -> ESetIterator
15877 
15878 Return the last element in ESet.
15879 */
15880 SWIGINTERN VALUE
_wrap_ESet__back(int argc,VALUE * argv,VALUE self)15881 _wrap_ESet__back(int argc, VALUE *argv, VALUE self) {
15882   Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
15883   void *argp1 = 0 ;
15884   int res1 = 0 ;
15885   Xapian::ESetIterator result;
15886   VALUE vresult = Qnil;
15887 
15888   if ((argc < 0) || (argc > 0)) {
15889     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
15890   }
15891   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
15892   if (!SWIG_IsOK(res1)) {
15893     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESet const *","back", 1, self ));
15894   }
15895   arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
15896   {
15897     try {
15898       result = ((Xapian::ESet const *)arg1)->back();
15899     } catch (...) {
15900       string msg;
15901       int code = XapianExceptionHandler(msg);
15902       SWIG_exception(code, msg.c_str());
15903     }
15904   }
15905   vresult = SWIG_NewPointerObj((new Xapian::ESetIterator(static_cast< const Xapian::ESetIterator& >(result))), SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_OWN |  0 );
15906   return vresult;
15907 fail:
15908   return Qnil;
15909 }
15910 
15911 
15912 SWIGINTERN VALUE
_wrap_ESet_description(int argc,VALUE * argv,VALUE self)15913 _wrap_ESet_description(int argc, VALUE *argv, VALUE self) {
15914   Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
15915   void *argp1 = 0 ;
15916   int res1 = 0 ;
15917   std::string result;
15918   VALUE vresult = Qnil;
15919 
15920   if ((argc < 0) || (argc > 0)) {
15921     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
15922   }
15923   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
15924   if (!SWIG_IsOK(res1)) {
15925     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESet const *","get_description", 1, self ));
15926   }
15927   arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
15928   {
15929     try {
15930       result = ((Xapian::ESet const *)arg1)->get_description();
15931     } catch (...) {
15932       string msg;
15933       int code = XapianExceptionHandler(msg);
15934       SWIG_exception(code, msg.c_str());
15935     }
15936   }
15937   vresult = SWIG_From_std_string(static_cast< std::string >(result));
15938   return vresult;
15939 fail:
15940   return Qnil;
15941 }
15942 
15943 
15944 static swig_class SwigClassESetIterator;
15945 
15946 SWIGINTERN VALUE
_wrap_ESetIterator_eset_set(int argc,VALUE * argv,VALUE self)15947 _wrap_ESetIterator_eset_set(int argc, VALUE *argv, VALUE self) {
15948   Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
15949   Xapian::ESet *arg2 = (Xapian::ESet *) 0 ;
15950   void *argp1 = 0 ;
15951   int res1 = 0 ;
15952   void *argp2 = 0 ;
15953   int res2 = 0 ;
15954 
15955   if ((argc < 1) || (argc > 1)) {
15956     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
15957   }
15958   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
15959   if (!SWIG_IsOK(res1)) {
15960     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESetIterator *","eset", 1, self ));
15961   }
15962   arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
15963   res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
15964   if (!SWIG_IsOK(res2)) {
15965     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::ESet *","eset", 2, argv[0] ));
15966   }
15967   arg2 = reinterpret_cast< Xapian::ESet * >(argp2);
15968   if (arg1) (arg1)->eset = *arg2;
15969   return Qnil;
15970 fail:
15971   return Qnil;
15972 }
15973 
15974 
15975 SWIGINTERN VALUE
_wrap_ESetIterator_eset_get(int argc,VALUE * argv,VALUE self)15976 _wrap_ESetIterator_eset_get(int argc, VALUE *argv, VALUE self) {
15977   Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
15978   void *argp1 = 0 ;
15979   int res1 = 0 ;
15980   Xapian::ESet *result = 0 ;
15981   VALUE vresult = Qnil;
15982 
15983   if ((argc < 0) || (argc > 0)) {
15984     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
15985   }
15986   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
15987   if (!SWIG_IsOK(res1)) {
15988     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESetIterator *","eset", 1, self ));
15989   }
15990   arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
15991   result = (Xapian::ESet *)& ((arg1)->eset);
15992   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ESet, 0 |  0 );
15993   return vresult;
15994 fail:
15995   return Qnil;
15996 }
15997 
15998 
15999 SWIGINTERN VALUE
_wrap_ESetIterator_off_from_end_set(int argc,VALUE * argv,VALUE self)16000 _wrap_ESetIterator_off_from_end_set(int argc, VALUE *argv, VALUE self) {
16001   Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
16002   Xapian::ESet::size_type arg2 ;
16003   void *argp1 = 0 ;
16004   int res1 = 0 ;
16005   unsigned int val2 ;
16006   int ecode2 = 0 ;
16007 
16008   if ((argc < 1) || (argc > 1)) {
16009     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
16010   }
16011   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
16012   if (!SWIG_IsOK(res1)) {
16013     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESetIterator *","off_from_end", 1, self ));
16014   }
16015   arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
16016   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
16017   if (!SWIG_IsOK(ecode2)) {
16018     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::ESet::size_type","off_from_end", 2, argv[0] ));
16019   }
16020   arg2 = static_cast< Xapian::ESet::size_type >(val2);
16021   if (arg1) (arg1)->off_from_end = arg2;
16022   return Qnil;
16023 fail:
16024   return Qnil;
16025 }
16026 
16027 
16028 SWIGINTERN VALUE
_wrap_ESetIterator_off_from_end_get(int argc,VALUE * argv,VALUE self)16029 _wrap_ESetIterator_off_from_end_get(int argc, VALUE *argv, VALUE self) {
16030   Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
16031   void *argp1 = 0 ;
16032   int res1 = 0 ;
16033   Xapian::ESet::size_type result;
16034   VALUE vresult = Qnil;
16035 
16036   if ((argc < 0) || (argc > 0)) {
16037     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
16038   }
16039   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
16040   if (!SWIG_IsOK(res1)) {
16041     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESetIterator *","off_from_end", 1, self ));
16042   }
16043   arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
16044   result = (Xapian::ESet::size_type) ((arg1)->off_from_end);
16045   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
16046   return vresult;
16047 fail:
16048   return Qnil;
16049 }
16050 
16051 
16052 SWIGINTERN VALUE
16053 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_ESetIterator_allocate(VALUE self)16054 _wrap_ESetIterator_allocate(VALUE self)
16055 #else
16056 _wrap_ESetIterator_allocate(int argc, VALUE *argv, VALUE self)
16057 #endif
16058 {
16059   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__ESetIterator);
16060 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
16061   rb_obj_call_init(vresult, argc, argv);
16062 #endif
16063   return vresult;
16064 }
16065 
16066 
16067 SWIGINTERN VALUE
_wrap_new_ESetIterator(int argc,VALUE * argv,VALUE self)16068 _wrap_new_ESetIterator(int argc, VALUE *argv, VALUE self) {
16069   const char *classname SWIGUNUSED = "Xapian::ESetIterator";
16070   Xapian::ESetIterator *result = 0 ;
16071 
16072   if ((argc < 0) || (argc > 0)) {
16073     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
16074   }
16075   {
16076     try {
16077       result = (Xapian::ESetIterator *)new Xapian::ESetIterator();
16078       DATA_PTR(self) = result;
16079     } catch (...) {
16080       string msg;
16081       int code = XapianExceptionHandler(msg);
16082       SWIG_exception(code, msg.c_str());
16083     }
16084   }
16085   return self;
16086 fail:
16087   return Qnil;
16088 }
16089 
16090 
16091 SWIGINTERN VALUE
_wrap_ESetIterator_weight(int argc,VALUE * argv,VALUE self)16092 _wrap_ESetIterator_weight(int argc, VALUE *argv, VALUE self) {
16093   Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
16094   void *argp1 = 0 ;
16095   int res1 = 0 ;
16096   double result;
16097   VALUE vresult = Qnil;
16098 
16099   if ((argc < 0) || (argc > 0)) {
16100     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
16101   }
16102   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
16103   if (!SWIG_IsOK(res1)) {
16104     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESetIterator const *","get_weight", 1, self ));
16105   }
16106   arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
16107   {
16108     try {
16109       result = (double)((Xapian::ESetIterator const *)arg1)->get_weight();
16110     } catch (...) {
16111       string msg;
16112       int code = XapianExceptionHandler(msg);
16113       SWIG_exception(code, msg.c_str());
16114     }
16115   }
16116   vresult = SWIG_From_double(static_cast< double >(result));
16117   return vresult;
16118 fail:
16119   return Qnil;
16120 }
16121 
16122 
16123 SWIGINTERN VALUE
_wrap_ESetIterator_description(int argc,VALUE * argv,VALUE self)16124 _wrap_ESetIterator_description(int argc, VALUE *argv, VALUE self) {
16125   Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
16126   void *argp1 = 0 ;
16127   int res1 = 0 ;
16128   std::string result;
16129   VALUE vresult = Qnil;
16130 
16131   if ((argc < 0) || (argc > 0)) {
16132     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
16133   }
16134   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
16135   if (!SWIG_IsOK(res1)) {
16136     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESetIterator const *","get_description", 1, self ));
16137   }
16138   arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
16139   {
16140     try {
16141       result = ((Xapian::ESetIterator const *)arg1)->get_description();
16142     } catch (...) {
16143       string msg;
16144       int code = XapianExceptionHandler(msg);
16145       SWIG_exception(code, msg.c_str());
16146     }
16147   }
16148   vresult = SWIG_From_std_string(static_cast< std::string >(result));
16149   return vresult;
16150 fail:
16151   return Qnil;
16152 }
16153 
16154 
16155 SWIGINTERN VALUE
_wrap_ESetIterator_equals(int argc,VALUE * argv,VALUE self)16156 _wrap_ESetIterator_equals(int argc, VALUE *argv, VALUE self) {
16157   Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
16158   Xapian::ESetIterator *arg2 = 0 ;
16159   void *argp1 = 0 ;
16160   int res1 = 0 ;
16161   void *argp2 ;
16162   int res2 = 0 ;
16163   bool result;
16164   VALUE vresult = Qnil;
16165 
16166   if ((argc < 1) || (argc > 1)) {
16167     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
16168   }
16169   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
16170   if (!SWIG_IsOK(res1)) {
16171     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESetIterator const *","equals", 1, self ));
16172   }
16173   arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
16174   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__ESetIterator,  0 );
16175   if (!SWIG_IsOK(res2)) {
16176     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::ESetIterator const &","equals", 2, argv[0] ));
16177   }
16178   if (!argp2) {
16179     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::ESetIterator const &","equals", 2, argv[0]));
16180   }
16181   arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
16182   {
16183     try {
16184       result = (bool)Xapian_ESetIterator_equals((Xapian::ESetIterator const *)arg1,(Xapian::ESetIterator const &)*arg2);
16185     } catch (...) {
16186       string msg;
16187       int code = XapianExceptionHandler(msg);
16188       SWIG_exception(code, msg.c_str());
16189     }
16190   }
16191   vresult = SWIG_From_bool(static_cast< bool >(result));
16192   return vresult;
16193 fail:
16194   return Qnil;
16195 }
16196 
16197 
16198 SWIGINTERN VALUE
_wrap_ESetIterator_term(int argc,VALUE * argv,VALUE self)16199 _wrap_ESetIterator_term(int argc, VALUE *argv, VALUE self) {
16200   Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
16201   void *argp1 = 0 ;
16202   int res1 = 0 ;
16203   std::string result;
16204   VALUE vresult = Qnil;
16205 
16206   if ((argc < 0) || (argc > 0)) {
16207     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
16208   }
16209   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
16210   if (!SWIG_IsOK(res1)) {
16211     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESetIterator const *","get_term", 1, self ));
16212   }
16213   arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
16214   {
16215     try {
16216       result = Xapian_ESetIterator_get_term((Xapian::ESetIterator const *)arg1);
16217     } catch (...) {
16218       string msg;
16219       int code = XapianExceptionHandler(msg);
16220       SWIG_exception(code, msg.c_str());
16221     }
16222   }
16223   vresult = SWIG_From_std_string(static_cast< std::string >(result));
16224   return vresult;
16225 fail:
16226   return Qnil;
16227 }
16228 
16229 
16230 SWIGINTERN VALUE
_wrap_ESetIterator_next(int argc,VALUE * argv,VALUE self)16231 _wrap_ESetIterator_next(int argc, VALUE *argv, VALUE self) {
16232   Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
16233   void *argp1 = 0 ;
16234   int res1 = 0 ;
16235 
16236   if ((argc < 0) || (argc > 0)) {
16237     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
16238   }
16239   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
16240   if (!SWIG_IsOK(res1)) {
16241     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESetIterator *","next", 1, self ));
16242   }
16243   arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
16244   {
16245     try {
16246       Xapian_ESetIterator_next(arg1);
16247     } catch (...) {
16248       string msg;
16249       int code = XapianExceptionHandler(msg);
16250       SWIG_exception(code, msg.c_str());
16251     }
16252   }
16253   return Qnil;
16254 fail:
16255   return Qnil;
16256 }
16257 
16258 
16259 SWIGINTERN VALUE
_wrap_ESetIterator_prev(int argc,VALUE * argv,VALUE self)16260 _wrap_ESetIterator_prev(int argc, VALUE *argv, VALUE self) {
16261   Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
16262   void *argp1 = 0 ;
16263   int res1 = 0 ;
16264 
16265   if ((argc < 0) || (argc > 0)) {
16266     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
16267   }
16268   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
16269   if (!SWIG_IsOK(res1)) {
16270     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESetIterator *","prev", 1, self ));
16271   }
16272   arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
16273   {
16274     try {
16275       Xapian_ESetIterator_prev(arg1);
16276     } catch (...) {
16277       string msg;
16278       int code = XapianExceptionHandler(msg);
16279       SWIG_exception(code, msg.c_str());
16280     }
16281   }
16282   return Qnil;
16283 fail:
16284   return Qnil;
16285 }
16286 
16287 
16288 SWIGINTERN void
free_Xapian_ESetIterator(void * self)16289 free_Xapian_ESetIterator(void *self) {
16290     Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *)self;
16291     delete arg1;
16292 }
16293 
16294 
16295 /*
16296   Document-method: Xapian::Xapian.==
16297 
16298   call-seq:
16299     ==(a, b) -> bool
16300     ==(a, b) -> bool
16301     ==(a, b) -> bool
16302     ==(a, b) -> bool
16303     ==(a, b) -> bool
16304     ==(a, b) -> bool
16305 
16306 Equality comparison operator.
16307 */
16308 SWIGINTERN VALUE
_wrap___eq____SWIG_5(int argc,VALUE * argv,VALUE self)16309 _wrap___eq____SWIG_5(int argc, VALUE *argv, VALUE self) {
16310   Xapian::ESetIterator *arg1 = 0 ;
16311   Xapian::ESetIterator *arg2 = 0 ;
16312   void *argp1 ;
16313   int res1 = 0 ;
16314   void *argp2 ;
16315   int res2 = 0 ;
16316   bool result;
16317   VALUE vresult = Qnil;
16318 
16319   if ((argc < 2) || (argc > 2)) {
16320     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
16321   }
16322   res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Xapian__ESetIterator,  0 );
16323   if (!SWIG_IsOK(res1)) {
16324     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESetIterator const &","Xapian::operator ==", 1, argv[0] ));
16325   }
16326   if (!argp1) {
16327     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::ESetIterator const &","Xapian::operator ==", 1, argv[0]));
16328   }
16329   arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
16330   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__ESetIterator,  0 );
16331   if (!SWIG_IsOK(res2)) {
16332     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::ESetIterator const &","Xapian::operator ==", 2, argv[1] ));
16333   }
16334   if (!argp2) {
16335     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::ESetIterator const &","Xapian::operator ==", 2, argv[1]));
16336   }
16337   arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
16338   {
16339     try {
16340       result = (bool)Xapian::operator ==((Xapian::ESetIterator const &)*arg1,(Xapian::ESetIterator const &)*arg2);
16341     } catch (...) {
16342       string msg;
16343       int code = XapianExceptionHandler(msg);
16344       SWIG_exception(code, msg.c_str());
16345     }
16346   }
16347   vresult = SWIG_From_bool(static_cast< bool >(result));
16348   return vresult;
16349 fail:
16350   return Qnil;
16351 }
16352 
16353 
_wrap___eq__(int nargs,VALUE * args,VALUE self)16354 SWIGINTERN VALUE _wrap___eq__(int nargs, VALUE *args, VALUE self) {
16355   int argc;
16356   VALUE argv[2];
16357   int ii;
16358 
16359   argc = nargs;
16360   if (argc > 2) SWIG_fail;
16361   for (ii = 0; (ii < argc); ++ii) {
16362     argv[ii] = args[ii];
16363   }
16364   if (argc == 2) {
16365     int _v;
16366     void *vptr = 0;
16367     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__PositionIterator, 0);
16368     _v = SWIG_CheckState(res);
16369     if (_v) {
16370       void *vptr = 0;
16371       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__PositionIterator, 0);
16372       _v = SWIG_CheckState(res);
16373       if (_v) {
16374         return _wrap___eq____SWIG_0(nargs, args, self);
16375       }
16376     }
16377   }
16378   if (argc == 2) {
16379     int _v;
16380     void *vptr = 0;
16381     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__PostingIterator, 0);
16382     _v = SWIG_CheckState(res);
16383     if (_v) {
16384       void *vptr = 0;
16385       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__PostingIterator, 0);
16386       _v = SWIG_CheckState(res);
16387       if (_v) {
16388         return _wrap___eq____SWIG_1(nargs, args, self);
16389       }
16390     }
16391   }
16392   if (argc == 2) {
16393     int _v;
16394     void *vptr = 0;
16395     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermIterator, 0);
16396     _v = SWIG_CheckState(res);
16397     if (_v) {
16398       void *vptr = 0;
16399       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__TermIterator, 0);
16400       _v = SWIG_CheckState(res);
16401       if (_v) {
16402         return _wrap___eq____SWIG_2(nargs, args, self);
16403       }
16404     }
16405   }
16406   if (argc == 2) {
16407     int _v;
16408     void *vptr = 0;
16409     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__ValueIterator, 0);
16410     _v = SWIG_CheckState(res);
16411     if (_v) {
16412       void *vptr = 0;
16413       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__ValueIterator, 0);
16414       _v = SWIG_CheckState(res);
16415       if (_v) {
16416         return _wrap___eq____SWIG_3(nargs, args, self);
16417       }
16418     }
16419   }
16420   if (argc == 2) {
16421     int _v;
16422     void *vptr = 0;
16423     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
16424     _v = SWIG_CheckState(res);
16425     if (_v) {
16426       void *vptr = 0;
16427       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
16428       _v = SWIG_CheckState(res);
16429       if (_v) {
16430         return _wrap___eq____SWIG_4(nargs, args, self);
16431       }
16432     }
16433   }
16434   if (argc == 2) {
16435     int _v;
16436     void *vptr = 0;
16437     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__ESetIterator, 0);
16438     _v = SWIG_CheckState(res);
16439     if (_v) {
16440       void *vptr = 0;
16441       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__ESetIterator, 0);
16442       _v = SWIG_CheckState(res);
16443       if (_v) {
16444         return _wrap___eq____SWIG_5(nargs, args, self);
16445       }
16446     }
16447   }
16448 
16449 fail:
16450   Ruby_Format_OverloadedError( argc, 2, "__eq__",
16451     "    bool __eq__(Xapian::PositionIterator const &a, Xapian::PositionIterator const &b)\n"
16452     "    bool __eq__(Xapian::PostingIterator const &a, Xapian::PostingIterator const &b)\n"
16453     "    bool __eq__(Xapian::TermIterator const &a, Xapian::TermIterator const &b)\n"
16454     "    bool __eq__(Xapian::ValueIterator const &a, Xapian::ValueIterator const &b)\n"
16455     "    bool __eq__(Xapian::MSetIterator const &a, Xapian::MSetIterator const &b)\n"
16456     "    bool __eq__(Xapian::ESetIterator const &a, Xapian::ESetIterator const &b)\n");
16457 
16458   return Qnil;
16459 }
16460 
16461 
16462 
16463 /*
16464   Document-method: Xapian::Xapian.<
16465 
16466   call-seq:
16467     <(a, b) -> bool
16468     <(a, b) -> bool
16469 
16470 Lower than comparison operator.
16471 */
16472 SWIGINTERN VALUE
_wrap___lt____SWIG_1(int argc,VALUE * argv,VALUE self)16473 _wrap___lt____SWIG_1(int argc, VALUE *argv, VALUE self) {
16474   Xapian::ESetIterator *arg1 = 0 ;
16475   Xapian::ESetIterator *arg2 = 0 ;
16476   void *argp1 ;
16477   int res1 = 0 ;
16478   void *argp2 ;
16479   int res2 = 0 ;
16480   bool result;
16481   VALUE vresult = Qnil;
16482 
16483   if ((argc < 2) || (argc > 2)) {
16484     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
16485   }
16486   res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Xapian__ESetIterator,  0 );
16487   if (!SWIG_IsOK(res1)) {
16488     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESetIterator const &","Xapian::operator <", 1, argv[0] ));
16489   }
16490   if (!argp1) {
16491     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::ESetIterator const &","Xapian::operator <", 1, argv[0]));
16492   }
16493   arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
16494   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__ESetIterator,  0 );
16495   if (!SWIG_IsOK(res2)) {
16496     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::ESetIterator const &","Xapian::operator <", 2, argv[1] ));
16497   }
16498   if (!argp2) {
16499     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::ESetIterator const &","Xapian::operator <", 2, argv[1]));
16500   }
16501   arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
16502   {
16503     try {
16504       result = (bool)Xapian::operator <((Xapian::ESetIterator const &)*arg1,(Xapian::ESetIterator const &)*arg2);
16505     } catch (...) {
16506       string msg;
16507       int code = XapianExceptionHandler(msg);
16508       SWIG_exception(code, msg.c_str());
16509     }
16510   }
16511   vresult = SWIG_From_bool(static_cast< bool >(result));
16512   return vresult;
16513 fail:
16514   return Qnil;
16515 }
16516 
16517 
_wrap___lt__(int nargs,VALUE * args,VALUE self)16518 SWIGINTERN VALUE _wrap___lt__(int nargs, VALUE *args, VALUE self) {
16519   int argc;
16520   VALUE argv[2];
16521   int ii;
16522 
16523   argc = nargs;
16524   if (argc > 2) SWIG_fail;
16525   for (ii = 0; (ii < argc); ++ii) {
16526     argv[ii] = args[ii];
16527   }
16528   if (argc == 2) {
16529     int _v;
16530     void *vptr = 0;
16531     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
16532     _v = SWIG_CheckState(res);
16533     if (_v) {
16534       void *vptr = 0;
16535       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
16536       _v = SWIG_CheckState(res);
16537       if (_v) {
16538         return _wrap___lt____SWIG_0(nargs, args, self);
16539       }
16540     }
16541   }
16542   if (argc == 2) {
16543     int _v;
16544     void *vptr = 0;
16545     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__ESetIterator, 0);
16546     _v = SWIG_CheckState(res);
16547     if (_v) {
16548       void *vptr = 0;
16549       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__ESetIterator, 0);
16550       _v = SWIG_CheckState(res);
16551       if (_v) {
16552         return _wrap___lt____SWIG_1(nargs, args, self);
16553       }
16554     }
16555   }
16556 
16557 fail:
16558   Ruby_Format_OverloadedError( argc, 2, "__lt__",
16559     "    bool __lt__(Xapian::MSetIterator const &a, Xapian::MSetIterator const &b)\n"
16560     "    bool __lt__(Xapian::ESetIterator const &a, Xapian::ESetIterator const &b)\n");
16561 
16562   return Qnil;
16563 }
16564 
16565 
16566 
16567 /*
16568   Document-method: Xapian::Xapian.>
16569 
16570   call-seq:
16571     >(a, b) -> bool
16572     >(a, b) -> bool
16573 
16574 Higher than comparison operator.
16575 */
16576 SWIGINTERN VALUE
_wrap___gt____SWIG_1(int argc,VALUE * argv,VALUE self)16577 _wrap___gt____SWIG_1(int argc, VALUE *argv, VALUE self) {
16578   Xapian::ESetIterator *arg1 = 0 ;
16579   Xapian::ESetIterator *arg2 = 0 ;
16580   void *argp1 ;
16581   int res1 = 0 ;
16582   void *argp2 ;
16583   int res2 = 0 ;
16584   bool result;
16585   VALUE vresult = Qnil;
16586 
16587   if ((argc < 2) || (argc > 2)) {
16588     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
16589   }
16590   res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Xapian__ESetIterator,  0 );
16591   if (!SWIG_IsOK(res1)) {
16592     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESetIterator const &","Xapian::operator >", 1, argv[0] ));
16593   }
16594   if (!argp1) {
16595     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::ESetIterator const &","Xapian::operator >", 1, argv[0]));
16596   }
16597   arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
16598   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__ESetIterator,  0 );
16599   if (!SWIG_IsOK(res2)) {
16600     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::ESetIterator const &","Xapian::operator >", 2, argv[1] ));
16601   }
16602   if (!argp2) {
16603     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::ESetIterator const &","Xapian::operator >", 2, argv[1]));
16604   }
16605   arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
16606   {
16607     try {
16608       result = (bool)Xapian::operator >((Xapian::ESetIterator const &)*arg1,(Xapian::ESetIterator const &)*arg2);
16609     } catch (...) {
16610       string msg;
16611       int code = XapianExceptionHandler(msg);
16612       SWIG_exception(code, msg.c_str());
16613     }
16614   }
16615   vresult = SWIG_From_bool(static_cast< bool >(result));
16616   return vresult;
16617 fail:
16618   return Qnil;
16619 }
16620 
16621 
_wrap___gt__(int nargs,VALUE * args,VALUE self)16622 SWIGINTERN VALUE _wrap___gt__(int nargs, VALUE *args, VALUE self) {
16623   int argc;
16624   VALUE argv[2];
16625   int ii;
16626 
16627   argc = nargs;
16628   if (argc > 2) SWIG_fail;
16629   for (ii = 0; (ii < argc); ++ii) {
16630     argv[ii] = args[ii];
16631   }
16632   if (argc == 2) {
16633     int _v;
16634     void *vptr = 0;
16635     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
16636     _v = SWIG_CheckState(res);
16637     if (_v) {
16638       void *vptr = 0;
16639       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
16640       _v = SWIG_CheckState(res);
16641       if (_v) {
16642         return _wrap___gt____SWIG_0(nargs, args, self);
16643       }
16644     }
16645   }
16646   if (argc == 2) {
16647     int _v;
16648     void *vptr = 0;
16649     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__ESetIterator, 0);
16650     _v = SWIG_CheckState(res);
16651     if (_v) {
16652       void *vptr = 0;
16653       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__ESetIterator, 0);
16654       _v = SWIG_CheckState(res);
16655       if (_v) {
16656         return _wrap___gt____SWIG_1(nargs, args, self);
16657       }
16658     }
16659   }
16660 
16661 fail:
16662   Ruby_Format_OverloadedError( argc, 2, "__gt__",
16663     "    bool __gt__(Xapian::MSetIterator const &a, Xapian::MSetIterator const &b)\n"
16664     "    bool __gt__(Xapian::ESetIterator const &a, Xapian::ESetIterator const &b)\n");
16665 
16666   return Qnil;
16667 }
16668 
16669 
16670 
16671 /*
16672   Document-method: Xapian::Xapian.>=
16673 
16674   call-seq:
16675     >=(a, b) -> bool
16676     >=(a, b) -> bool
16677 
16678 Higher or equal comparison operator.
16679 */
16680 SWIGINTERN VALUE
_wrap___ge____SWIG_1(int argc,VALUE * argv,VALUE self)16681 _wrap___ge____SWIG_1(int argc, VALUE *argv, VALUE self) {
16682   Xapian::ESetIterator *arg1 = 0 ;
16683   Xapian::ESetIterator *arg2 = 0 ;
16684   void *argp1 ;
16685   int res1 = 0 ;
16686   void *argp2 ;
16687   int res2 = 0 ;
16688   bool result;
16689   VALUE vresult = Qnil;
16690 
16691   if ((argc < 2) || (argc > 2)) {
16692     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
16693   }
16694   res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Xapian__ESetIterator,  0 );
16695   if (!SWIG_IsOK(res1)) {
16696     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESetIterator const &","Xapian::operator >=", 1, argv[0] ));
16697   }
16698   if (!argp1) {
16699     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::ESetIterator const &","Xapian::operator >=", 1, argv[0]));
16700   }
16701   arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
16702   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__ESetIterator,  0 );
16703   if (!SWIG_IsOK(res2)) {
16704     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::ESetIterator const &","Xapian::operator >=", 2, argv[1] ));
16705   }
16706   if (!argp2) {
16707     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::ESetIterator const &","Xapian::operator >=", 2, argv[1]));
16708   }
16709   arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
16710   {
16711     try {
16712       result = (bool)Xapian::operator >=((Xapian::ESetIterator const &)*arg1,(Xapian::ESetIterator const &)*arg2);
16713     } catch (...) {
16714       string msg;
16715       int code = XapianExceptionHandler(msg);
16716       SWIG_exception(code, msg.c_str());
16717     }
16718   }
16719   vresult = SWIG_From_bool(static_cast< bool >(result));
16720   return vresult;
16721 fail:
16722   return Qnil;
16723 }
16724 
16725 
_wrap___ge__(int nargs,VALUE * args,VALUE self)16726 SWIGINTERN VALUE _wrap___ge__(int nargs, VALUE *args, VALUE self) {
16727   int argc;
16728   VALUE argv[2];
16729   int ii;
16730 
16731   argc = nargs;
16732   if (argc > 2) SWIG_fail;
16733   for (ii = 0; (ii < argc); ++ii) {
16734     argv[ii] = args[ii];
16735   }
16736   if (argc == 2) {
16737     int _v;
16738     void *vptr = 0;
16739     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
16740     _v = SWIG_CheckState(res);
16741     if (_v) {
16742       void *vptr = 0;
16743       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
16744       _v = SWIG_CheckState(res);
16745       if (_v) {
16746         return _wrap___ge____SWIG_0(nargs, args, self);
16747       }
16748     }
16749   }
16750   if (argc == 2) {
16751     int _v;
16752     void *vptr = 0;
16753     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__ESetIterator, 0);
16754     _v = SWIG_CheckState(res);
16755     if (_v) {
16756       void *vptr = 0;
16757       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__ESetIterator, 0);
16758       _v = SWIG_CheckState(res);
16759       if (_v) {
16760         return _wrap___ge____SWIG_1(nargs, args, self);
16761       }
16762     }
16763   }
16764 
16765 fail:
16766   Ruby_Format_OverloadedError( argc, 2, "__ge__",
16767     "    bool __ge__(Xapian::MSetIterator const &a, Xapian::MSetIterator const &b)\n"
16768     "    bool __ge__(Xapian::ESetIterator const &a, Xapian::ESetIterator const &b)\n");
16769 
16770   return Qnil;
16771 }
16772 
16773 
16774 
16775 /*
16776   Document-method: Xapian::Xapian.<=
16777 
16778   call-seq:
16779     <=(a, b) -> bool
16780     <=(a, b) -> bool
16781 
16782 Lower or equal comparison operator.
16783 */
16784 SWIGINTERN VALUE
_wrap___le____SWIG_1(int argc,VALUE * argv,VALUE self)16785 _wrap___le____SWIG_1(int argc, VALUE *argv, VALUE self) {
16786   Xapian::ESetIterator *arg1 = 0 ;
16787   Xapian::ESetIterator *arg2 = 0 ;
16788   void *argp1 ;
16789   int res1 = 0 ;
16790   void *argp2 ;
16791   int res2 = 0 ;
16792   bool result;
16793   VALUE vresult = Qnil;
16794 
16795   if ((argc < 2) || (argc > 2)) {
16796     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
16797   }
16798   res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Xapian__ESetIterator,  0 );
16799   if (!SWIG_IsOK(res1)) {
16800     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ESetIterator const &","Xapian::operator <=", 1, argv[0] ));
16801   }
16802   if (!argp1) {
16803     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::ESetIterator const &","Xapian::operator <=", 1, argv[0]));
16804   }
16805   arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
16806   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__ESetIterator,  0 );
16807   if (!SWIG_IsOK(res2)) {
16808     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::ESetIterator const &","Xapian::operator <=", 2, argv[1] ));
16809   }
16810   if (!argp2) {
16811     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::ESetIterator const &","Xapian::operator <=", 2, argv[1]));
16812   }
16813   arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
16814   {
16815     try {
16816       result = (bool)Xapian::operator <=((Xapian::ESetIterator const &)*arg1,(Xapian::ESetIterator const &)*arg2);
16817     } catch (...) {
16818       string msg;
16819       int code = XapianExceptionHandler(msg);
16820       SWIG_exception(code, msg.c_str());
16821     }
16822   }
16823   vresult = SWIG_From_bool(static_cast< bool >(result));
16824   return vresult;
16825 fail:
16826   return Qnil;
16827 }
16828 
16829 
_wrap___le__(int nargs,VALUE * args,VALUE self)16830 SWIGINTERN VALUE _wrap___le__(int nargs, VALUE *args, VALUE self) {
16831   int argc;
16832   VALUE argv[2];
16833   int ii;
16834 
16835   argc = nargs;
16836   if (argc > 2) SWIG_fail;
16837   for (ii = 0; (ii < argc); ++ii) {
16838     argv[ii] = args[ii];
16839   }
16840   if (argc == 2) {
16841     int _v;
16842     void *vptr = 0;
16843     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
16844     _v = SWIG_CheckState(res);
16845     if (_v) {
16846       void *vptr = 0;
16847       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
16848       _v = SWIG_CheckState(res);
16849       if (_v) {
16850         return _wrap___le____SWIG_0(nargs, args, self);
16851       }
16852     }
16853   }
16854   if (argc == 2) {
16855     int _v;
16856     void *vptr = 0;
16857     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__ESetIterator, 0);
16858     _v = SWIG_CheckState(res);
16859     if (_v) {
16860       void *vptr = 0;
16861       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__ESetIterator, 0);
16862       _v = SWIG_CheckState(res);
16863       if (_v) {
16864         return _wrap___le____SWIG_1(nargs, args, self);
16865       }
16866     }
16867   }
16868 
16869 fail:
16870   Ruby_Format_OverloadedError( argc, 2, "__le__",
16871     "    bool __le__(Xapian::MSetIterator const &a, Xapian::MSetIterator const &b)\n"
16872     "    bool __le__(Xapian::ESetIterator const &a, Xapian::ESetIterator const &b)\n");
16873 
16874   return Qnil;
16875 }
16876 
16877 
16878 
16879 /*
16880   Document-method: Xapian::Xapian.+
16881 
16882   call-seq:
16883     +(n, it) -> MSetIterator
16884     +(n, it) -> ESetIterator
16885 
16886 Add operator.
16887 */
16888 SWIGINTERN VALUE
_wrap___add____SWIG_1(int argc,VALUE * argv,VALUE self)16889 _wrap___add____SWIG_1(int argc, VALUE *argv, VALUE self) {
16890   Xapian::ESetIterator::difference_type arg1 ;
16891   Xapian::ESetIterator *arg2 = 0 ;
16892   int val1 ;
16893   int ecode1 = 0 ;
16894   void *argp2 ;
16895   int res2 = 0 ;
16896   Xapian::ESetIterator result;
16897   VALUE vresult = Qnil;
16898 
16899   if ((argc < 2) || (argc > 2)) {
16900     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
16901   }
16902   ecode1 = SWIG_AsVal_int(argv[0], &val1);
16903   if (!SWIG_IsOK(ecode1)) {
16904     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::ESetIterator::difference_type","Xapian::operator +", 1, argv[0] ));
16905   }
16906   arg1 = static_cast< Xapian::ESetIterator::difference_type >(val1);
16907   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__ESetIterator,  0 );
16908   if (!SWIG_IsOK(res2)) {
16909     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::ESetIterator const &","Xapian::operator +", 2, argv[1] ));
16910   }
16911   if (!argp2) {
16912     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::ESetIterator const &","Xapian::operator +", 2, argv[1]));
16913   }
16914   arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
16915   {
16916     try {
16917       result = Xapian::operator +(arg1,(Xapian::ESetIterator const &)*arg2);
16918     } catch (...) {
16919       string msg;
16920       int code = XapianExceptionHandler(msg);
16921       SWIG_exception(code, msg.c_str());
16922     }
16923   }
16924   vresult = SWIG_NewPointerObj((new Xapian::ESetIterator(static_cast< const Xapian::ESetIterator& >(result))), SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_OWN |  0 );
16925   return vresult;
16926 fail:
16927   return Qnil;
16928 }
16929 
16930 
_wrap___add__(int nargs,VALUE * args,VALUE self)16931 SWIGINTERN VALUE _wrap___add__(int nargs, VALUE *args, VALUE self) {
16932   int argc;
16933   VALUE argv[2];
16934   int ii;
16935 
16936   argc = nargs;
16937   if (argc > 2) SWIG_fail;
16938   for (ii = 0; (ii < argc); ++ii) {
16939     argv[ii] = args[ii];
16940   }
16941   if (argc == 2) {
16942     int _v;
16943     {
16944       int res = SWIG_AsVal_int(argv[0], NULL);
16945       _v = SWIG_CheckState(res);
16946     }
16947     if (_v) {
16948       void *vptr = 0;
16949       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
16950       _v = SWIG_CheckState(res);
16951       if (_v) {
16952         return _wrap___add____SWIG_0(nargs, args, self);
16953       }
16954     }
16955   }
16956   if (argc == 2) {
16957     int _v;
16958     {
16959       int res = SWIG_AsVal_int(argv[0], NULL);
16960       _v = SWIG_CheckState(res);
16961     }
16962     if (_v) {
16963       void *vptr = 0;
16964       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__ESetIterator, 0);
16965       _v = SWIG_CheckState(res);
16966       if (_v) {
16967         return _wrap___add____SWIG_1(nargs, args, self);
16968       }
16969     }
16970   }
16971 
16972 fail:
16973   Ruby_Format_OverloadedError( argc, 2, "__add__",
16974     "    Xapian::MSetIterator __add__(Xapian::MSetIterator::difference_type n, Xapian::MSetIterator const &it)\n"
16975     "    Xapian::ESetIterator __add__(Xapian::ESetIterator::difference_type n, Xapian::ESetIterator const &it)\n");
16976 
16977   return Qnil;
16978 }
16979 
16980 
16981 static swig_class SwigClassRSet;
16982 
16983 SWIGINTERN VALUE
16984 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_RSet_allocate(VALUE self)16985 _wrap_RSet_allocate(VALUE self)
16986 #else
16987 _wrap_RSet_allocate(int argc, VALUE *argv, VALUE self)
16988 #endif
16989 {
16990   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__RSet);
16991 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
16992   rb_obj_call_init(vresult, argc, argv);
16993 #endif
16994   return vresult;
16995 }
16996 
16997 
16998 SWIGINTERN VALUE
_wrap_new_RSet(int argc,VALUE * argv,VALUE self)16999 _wrap_new_RSet(int argc, VALUE *argv, VALUE self) {
17000   const char *classname SWIGUNUSED = "Xapian::RSet";
17001   Xapian::RSet *result = 0 ;
17002 
17003   if ((argc < 0) || (argc > 0)) {
17004     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
17005   }
17006   {
17007     try {
17008       result = (Xapian::RSet *)new Xapian::RSet();
17009       DATA_PTR(self) = result;
17010     } catch (...) {
17011       string msg;
17012       int code = XapianExceptionHandler(msg);
17013       SWIG_exception(code, msg.c_str());
17014     }
17015   }
17016   return self;
17017 fail:
17018   return Qnil;
17019 }
17020 
17021 
17022 SWIGINTERN void
free_Xapian_RSet(void * self)17023 free_Xapian_RSet(void *self) {
17024     Xapian::RSet *arg1 = (Xapian::RSet *)self;
17025     delete arg1;
17026 }
17027 
17028 
17029 /*
17030   Document-method: Xapian::RSet.size
17031 
17032   call-seq:
17033     size -> Xapian::doccount
17034 
17035 Size or Length of the RSet.
17036 */
17037 SWIGINTERN VALUE
_wrap_RSet_size(int argc,VALUE * argv,VALUE self)17038 _wrap_RSet_size(int argc, VALUE *argv, VALUE self) {
17039   Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
17040   void *argp1 = 0 ;
17041   int res1 = 0 ;
17042   Xapian::doccount result;
17043   VALUE vresult = Qnil;
17044 
17045   if ((argc < 0) || (argc > 0)) {
17046     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
17047   }
17048   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
17049   if (!SWIG_IsOK(res1)) {
17050     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::RSet const *","size", 1, self ));
17051   }
17052   arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
17053   {
17054     try {
17055       result = (Xapian::doccount)((Xapian::RSet const *)arg1)->size();
17056     } catch (...) {
17057       string msg;
17058       int code = XapianExceptionHandler(msg);
17059       SWIG_exception(code, msg.c_str());
17060     }
17061   }
17062   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
17063   return vresult;
17064 fail:
17065   return Qnil;
17066 }
17067 
17068 
17069 
17070 /*
17071   Document-method: Xapian::RSet.empty
17072 
17073   call-seq:
17074     empty -> bool
17075 
17076 Check if the RSet is empty or not.
17077 */
17078 SWIGINTERN VALUE
_wrap_RSet_emptyq___(int argc,VALUE * argv,VALUE self)17079 _wrap_RSet_emptyq___(int argc, VALUE *argv, VALUE self) {
17080   Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
17081   void *argp1 = 0 ;
17082   int res1 = 0 ;
17083   bool result;
17084   VALUE vresult = Qnil;
17085 
17086   if ((argc < 0) || (argc > 0)) {
17087     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
17088   }
17089   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
17090   if (!SWIG_IsOK(res1)) {
17091     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::RSet const *","empty", 1, self ));
17092   }
17093   arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
17094   {
17095     try {
17096       result = (bool)((Xapian::RSet const *)arg1)->empty();
17097     } catch (...) {
17098       string msg;
17099       int code = XapianExceptionHandler(msg);
17100       SWIG_exception(code, msg.c_str());
17101     }
17102   }
17103   vresult = (result ? Qtrue : Qfalse);
17104   return vresult;
17105 fail:
17106   return Qnil;
17107 }
17108 
17109 
17110 SWIGINTERN VALUE
_wrap_RSet_add_document__SWIG_0(int argc,VALUE * argv,VALUE self)17111 _wrap_RSet_add_document__SWIG_0(int argc, VALUE *argv, VALUE self) {
17112   Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
17113   Xapian::docid arg2 ;
17114   void *argp1 = 0 ;
17115   int res1 = 0 ;
17116   unsigned int val2 ;
17117   int ecode2 = 0 ;
17118 
17119   if ((argc < 1) || (argc > 1)) {
17120     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
17121   }
17122   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
17123   if (!SWIG_IsOK(res1)) {
17124     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::RSet *","add_document", 1, self ));
17125   }
17126   arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
17127   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
17128   if (!SWIG_IsOK(ecode2)) {
17129     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","add_document", 2, argv[0] ));
17130   }
17131   arg2 = static_cast< Xapian::docid >(val2);
17132   {
17133     try {
17134       (arg1)->add_document(arg2);
17135     } catch (...) {
17136       string msg;
17137       int code = XapianExceptionHandler(msg);
17138       SWIG_exception(code, msg.c_str());
17139     }
17140   }
17141   return Qnil;
17142 fail:
17143   return Qnil;
17144 }
17145 
17146 
17147 SWIGINTERN VALUE
_wrap_RSet_add_document__SWIG_1(int argc,VALUE * argv,VALUE self)17148 _wrap_RSet_add_document__SWIG_1(int argc, VALUE *argv, VALUE self) {
17149   Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
17150   Xapian::MSetIterator *arg2 = 0 ;
17151   void *argp1 = 0 ;
17152   int res1 = 0 ;
17153   void *argp2 ;
17154   int res2 = 0 ;
17155 
17156   if ((argc < 1) || (argc > 1)) {
17157     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
17158   }
17159   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
17160   if (!SWIG_IsOK(res1)) {
17161     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::RSet *","add_document", 1, self ));
17162   }
17163   arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
17164   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
17165   if (!SWIG_IsOK(res2)) {
17166     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","add_document", 2, argv[0] ));
17167   }
17168   if (!argp2) {
17169     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","add_document", 2, argv[0]));
17170   }
17171   arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
17172   {
17173     try {
17174       (arg1)->add_document((Xapian::MSetIterator const &)*arg2);
17175     } catch (...) {
17176       string msg;
17177       int code = XapianExceptionHandler(msg);
17178       SWIG_exception(code, msg.c_str());
17179     }
17180   }
17181   return Qnil;
17182 fail:
17183   return Qnil;
17184 }
17185 
17186 
_wrap_RSet_add_document(int nargs,VALUE * args,VALUE self)17187 SWIGINTERN VALUE _wrap_RSet_add_document(int nargs, VALUE *args, VALUE self) {
17188   int argc;
17189   VALUE argv[3];
17190   int ii;
17191 
17192   argc = nargs + 1;
17193   argv[0] = self;
17194   if (argc > 3) SWIG_fail;
17195   for (ii = 1; (ii < argc); ++ii) {
17196     argv[ii] = args[ii-1];
17197   }
17198   if (argc == 2) {
17199     int _v;
17200     void *vptr = 0;
17201     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
17202     _v = SWIG_CheckState(res);
17203     if (_v) {
17204       void *vptr = 0;
17205       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
17206       _v = SWIG_CheckState(res);
17207       if (_v) {
17208         return _wrap_RSet_add_document__SWIG_1(nargs, args, self);
17209       }
17210     }
17211   }
17212   if (argc == 2) {
17213     int _v;
17214     void *vptr = 0;
17215     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
17216     _v = SWIG_CheckState(res);
17217     if (_v) {
17218       {
17219         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
17220         _v = SWIG_CheckState(res);
17221       }
17222       if (_v) {
17223         return _wrap_RSet_add_document__SWIG_0(nargs, args, self);
17224       }
17225     }
17226   }
17227 
17228 fail:
17229   Ruby_Format_OverloadedError( argc, 3, "RSet.add_document",
17230     "    void RSet.add_document(Xapian::docid did)\n"
17231     "    void RSet.add_document(Xapian::MSetIterator const &i)\n");
17232 
17233   return Qnil;
17234 }
17235 
17236 
17237 SWIGINTERN VALUE
_wrap_RSet_remove_document__SWIG_0(int argc,VALUE * argv,VALUE self)17238 _wrap_RSet_remove_document__SWIG_0(int argc, VALUE *argv, VALUE self) {
17239   Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
17240   Xapian::docid arg2 ;
17241   void *argp1 = 0 ;
17242   int res1 = 0 ;
17243   unsigned int val2 ;
17244   int ecode2 = 0 ;
17245 
17246   if ((argc < 1) || (argc > 1)) {
17247     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
17248   }
17249   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
17250   if (!SWIG_IsOK(res1)) {
17251     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::RSet *","remove_document", 1, self ));
17252   }
17253   arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
17254   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
17255   if (!SWIG_IsOK(ecode2)) {
17256     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","remove_document", 2, argv[0] ));
17257   }
17258   arg2 = static_cast< Xapian::docid >(val2);
17259   {
17260     try {
17261       (arg1)->remove_document(arg2);
17262     } catch (...) {
17263       string msg;
17264       int code = XapianExceptionHandler(msg);
17265       SWIG_exception(code, msg.c_str());
17266     }
17267   }
17268   return Qnil;
17269 fail:
17270   return Qnil;
17271 }
17272 
17273 
17274 SWIGINTERN VALUE
_wrap_RSet_remove_document__SWIG_1(int argc,VALUE * argv,VALUE self)17275 _wrap_RSet_remove_document__SWIG_1(int argc, VALUE *argv, VALUE self) {
17276   Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
17277   Xapian::MSetIterator *arg2 = 0 ;
17278   void *argp1 = 0 ;
17279   int res1 = 0 ;
17280   void *argp2 ;
17281   int res2 = 0 ;
17282 
17283   if ((argc < 1) || (argc > 1)) {
17284     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
17285   }
17286   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
17287   if (!SWIG_IsOK(res1)) {
17288     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::RSet *","remove_document", 1, self ));
17289   }
17290   arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
17291   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
17292   if (!SWIG_IsOK(res2)) {
17293     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","remove_document", 2, argv[0] ));
17294   }
17295   if (!argp2) {
17296     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","remove_document", 2, argv[0]));
17297   }
17298   arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
17299   {
17300     try {
17301       (arg1)->remove_document((Xapian::MSetIterator const &)*arg2);
17302     } catch (...) {
17303       string msg;
17304       int code = XapianExceptionHandler(msg);
17305       SWIG_exception(code, msg.c_str());
17306     }
17307   }
17308   return Qnil;
17309 fail:
17310   return Qnil;
17311 }
17312 
17313 
_wrap_RSet_remove_document(int nargs,VALUE * args,VALUE self)17314 SWIGINTERN VALUE _wrap_RSet_remove_document(int nargs, VALUE *args, VALUE self) {
17315   int argc;
17316   VALUE argv[3];
17317   int ii;
17318 
17319   argc = nargs + 1;
17320   argv[0] = self;
17321   if (argc > 3) SWIG_fail;
17322   for (ii = 1; (ii < argc); ++ii) {
17323     argv[ii] = args[ii-1];
17324   }
17325   if (argc == 2) {
17326     int _v;
17327     void *vptr = 0;
17328     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
17329     _v = SWIG_CheckState(res);
17330     if (_v) {
17331       void *vptr = 0;
17332       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
17333       _v = SWIG_CheckState(res);
17334       if (_v) {
17335         return _wrap_RSet_remove_document__SWIG_1(nargs, args, self);
17336       }
17337     }
17338   }
17339   if (argc == 2) {
17340     int _v;
17341     void *vptr = 0;
17342     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
17343     _v = SWIG_CheckState(res);
17344     if (_v) {
17345       {
17346         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
17347         _v = SWIG_CheckState(res);
17348       }
17349       if (_v) {
17350         return _wrap_RSet_remove_document__SWIG_0(nargs, args, self);
17351       }
17352     }
17353   }
17354 
17355 fail:
17356   Ruby_Format_OverloadedError( argc, 3, "RSet.remove_document",
17357     "    void RSet.remove_document(Xapian::docid did)\n"
17358     "    void RSet.remove_document(Xapian::MSetIterator const &i)\n");
17359 
17360   return Qnil;
17361 }
17362 
17363 
17364 SWIGINTERN VALUE
_wrap_RSet_contains__SWIG_0(int argc,VALUE * argv,VALUE self)17365 _wrap_RSet_contains__SWIG_0(int argc, VALUE *argv, VALUE self) {
17366   Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
17367   Xapian::docid arg2 ;
17368   void *argp1 = 0 ;
17369   int res1 = 0 ;
17370   unsigned int val2 ;
17371   int ecode2 = 0 ;
17372   bool result;
17373   VALUE vresult = Qnil;
17374 
17375   if ((argc < 1) || (argc > 1)) {
17376     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
17377   }
17378   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
17379   if (!SWIG_IsOK(res1)) {
17380     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::RSet const *","contains", 1, self ));
17381   }
17382   arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
17383   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
17384   if (!SWIG_IsOK(ecode2)) {
17385     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","contains", 2, argv[0] ));
17386   }
17387   arg2 = static_cast< Xapian::docid >(val2);
17388   {
17389     try {
17390       result = (bool)((Xapian::RSet const *)arg1)->contains(arg2);
17391     } catch (...) {
17392       string msg;
17393       int code = XapianExceptionHandler(msg);
17394       SWIG_exception(code, msg.c_str());
17395     }
17396   }
17397   vresult = SWIG_From_bool(static_cast< bool >(result));
17398   return vresult;
17399 fail:
17400   return Qnil;
17401 }
17402 
17403 
17404 SWIGINTERN VALUE
_wrap_RSet_contains__SWIG_1(int argc,VALUE * argv,VALUE self)17405 _wrap_RSet_contains__SWIG_1(int argc, VALUE *argv, VALUE self) {
17406   Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
17407   Xapian::MSetIterator *arg2 = 0 ;
17408   void *argp1 = 0 ;
17409   int res1 = 0 ;
17410   void *argp2 ;
17411   int res2 = 0 ;
17412   bool result;
17413   VALUE vresult = Qnil;
17414 
17415   if ((argc < 1) || (argc > 1)) {
17416     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
17417   }
17418   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
17419   if (!SWIG_IsOK(res1)) {
17420     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::RSet const *","contains", 1, self ));
17421   }
17422   arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
17423   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
17424   if (!SWIG_IsOK(res2)) {
17425     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","contains", 2, argv[0] ));
17426   }
17427   if (!argp2) {
17428     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","contains", 2, argv[0]));
17429   }
17430   arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
17431   {
17432     try {
17433       result = (bool)((Xapian::RSet const *)arg1)->contains((Xapian::MSetIterator const &)*arg2);
17434     } catch (...) {
17435       string msg;
17436       int code = XapianExceptionHandler(msg);
17437       SWIG_exception(code, msg.c_str());
17438     }
17439   }
17440   vresult = SWIG_From_bool(static_cast< bool >(result));
17441   return vresult;
17442 fail:
17443   return Qnil;
17444 }
17445 
17446 
_wrap_RSet_contains(int nargs,VALUE * args,VALUE self)17447 SWIGINTERN VALUE _wrap_RSet_contains(int nargs, VALUE *args, VALUE self) {
17448   int argc;
17449   VALUE argv[3];
17450   int ii;
17451 
17452   argc = nargs + 1;
17453   argv[0] = self;
17454   if (argc > 3) SWIG_fail;
17455   for (ii = 1; (ii < argc); ++ii) {
17456     argv[ii] = args[ii-1];
17457   }
17458   if (argc == 2) {
17459     int _v;
17460     void *vptr = 0;
17461     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
17462     _v = SWIG_CheckState(res);
17463     if (_v) {
17464       void *vptr = 0;
17465       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
17466       _v = SWIG_CheckState(res);
17467       if (_v) {
17468         return _wrap_RSet_contains__SWIG_1(nargs, args, self);
17469       }
17470     }
17471   }
17472   if (argc == 2) {
17473     int _v;
17474     void *vptr = 0;
17475     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
17476     _v = SWIG_CheckState(res);
17477     if (_v) {
17478       {
17479         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
17480         _v = SWIG_CheckState(res);
17481       }
17482       if (_v) {
17483         return _wrap_RSet_contains__SWIG_0(nargs, args, self);
17484       }
17485     }
17486   }
17487 
17488 fail:
17489   Ruby_Format_OverloadedError( argc, 3, "RSet.contains",
17490     "    bool RSet.contains(Xapian::docid did)\n"
17491     "    bool RSet.contains(Xapian::MSetIterator const &i)\n");
17492 
17493   return Qnil;
17494 }
17495 
17496 
17497 SWIGINTERN VALUE
_wrap_RSet_description(int argc,VALUE * argv,VALUE self)17498 _wrap_RSet_description(int argc, VALUE *argv, VALUE self) {
17499   Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
17500   void *argp1 = 0 ;
17501   int res1 = 0 ;
17502   std::string result;
17503   VALUE vresult = Qnil;
17504 
17505   if ((argc < 0) || (argc > 0)) {
17506     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
17507   }
17508   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
17509   if (!SWIG_IsOK(res1)) {
17510     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::RSet const *","get_description", 1, self ));
17511   }
17512   arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
17513   {
17514     try {
17515       result = ((Xapian::RSet const *)arg1)->get_description();
17516     } catch (...) {
17517       string msg;
17518       int code = XapianExceptionHandler(msg);
17519       SWIG_exception(code, msg.c_str());
17520     }
17521   }
17522   vresult = SWIG_From_std_string(static_cast< std::string >(result));
17523   return vresult;
17524 fail:
17525   return Qnil;
17526 }
17527 
17528 
17529 static swig_class SwigClassMatchDecider;
17530 
17531 SWIGINTERN VALUE
17532 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_MatchDecider_allocate(VALUE self)17533 _wrap_MatchDecider_allocate(VALUE self)
17534 #else
17535 _wrap_MatchDecider_allocate(int argc, VALUE *argv, VALUE self)
17536 #endif
17537 {
17538   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__MatchDecider);
17539 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
17540   rb_obj_call_init(vresult, argc, argv);
17541 #endif
17542   return vresult;
17543 }
17544 
17545 
17546 SWIGINTERN VALUE
_wrap_new_MatchDecider(int argc,VALUE * argv,VALUE self)17547 _wrap_new_MatchDecider(int argc, VALUE *argv, VALUE self) {
17548   VALUE arg1 = (VALUE) 0 ;
17549   const char *classname SWIGUNUSED = "Xapian::MatchDecider";
17550   Xapian::MatchDecider *result = 0 ;
17551 
17552   if ((argc < 0) || (argc > 0)) {
17553     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
17554   }
17555   arg1 = self;
17556   {
17557     try {
17558       if ( strcmp(rb_obj_classname(self), classname) != 0 ) {
17559         /* subclassed */
17560         result = (Xapian::MatchDecider *)new SwigDirector_MatchDecider(arg1);
17561       } else {
17562         rb_raise(rb_eNameError,"accessing abstract class or protected constructor");
17563         return Qnil;
17564       }
17565 
17566       DATA_PTR(self) = result;
17567     } catch (...) {
17568       string msg;
17569       int code = XapianExceptionHandler(msg);
17570       SWIG_exception(code, msg.c_str());
17571     }
17572   }
17573   return self;
17574 fail:
17575   return Qnil;
17576 }
17577 
17578 
17579 SWIGINTERN VALUE
_wrap_MatchDecider___call__(int argc,VALUE * argv,VALUE self)17580 _wrap_MatchDecider___call__(int argc, VALUE *argv, VALUE self) {
17581   Xapian::MatchDecider *arg1 = (Xapian::MatchDecider *) 0 ;
17582   Xapian::Document *arg2 = 0 ;
17583   void *argp1 = 0 ;
17584   int res1 = 0 ;
17585   void *argp2 ;
17586   int res2 = 0 ;
17587   Swig::Director *director = 0;
17588   bool upcall = false;
17589   bool result;
17590   VALUE vresult = Qnil;
17591 
17592   if ((argc < 1) || (argc > 1)) {
17593     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
17594   }
17595   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MatchDecider, 0 |  0 );
17596   if (!SWIG_IsOK(res1)) {
17597     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MatchDecider const *","operator ()", 1, self ));
17598   }
17599   arg1 = reinterpret_cast< Xapian::MatchDecider * >(argp1);
17600   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Document,  0 );
17601   if (!SWIG_IsOK(res2)) {
17602     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Document const &","operator ()", 2, argv[0] ));
17603   }
17604   if (!argp2) {
17605     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Document const &","operator ()", 2, argv[0]));
17606   }
17607   arg2 = reinterpret_cast< Xapian::Document * >(argp2);
17608   director = dynamic_cast<Swig::Director *>(arg1);
17609   upcall = (director && (director->swig_get_self() == self));
17610   try {
17611     {
17612       try {
17613         if (upcall) {
17614           Swig::DirectorPureVirtualException::raise("Xapian::MatchDecider::operator ()");
17615         } else {
17616           result = (bool)((Xapian::MatchDecider const *)arg1)->operator ()((Xapian::Document const &)*arg2);
17617         }
17618       } catch (...) {
17619         string msg;
17620         int code = XapianExceptionHandler(msg);
17621         SWIG_exception(code, msg.c_str());
17622       }
17623     }
17624   } catch (Swig::DirectorException& e) {
17625     rb_exc_raise(e.getError());
17626     SWIG_fail;
17627   }
17628   vresult = SWIG_From_bool(static_cast< bool >(result));
17629   return vresult;
17630 fail:
17631   return Qnil;
17632 }
17633 
17634 
17635 SWIGINTERN void
free_Xapian_MatchDecider(void * self)17636 free_Xapian_MatchDecider(void *self) {
17637     Xapian::MatchDecider *arg1 = (Xapian::MatchDecider *)self;
17638     delete arg1;
17639 }
17640 
17641 SWIGINTERN VALUE
_wrap_disown_MatchDecider(int argc,VALUE * argv,VALUE self)17642 _wrap_disown_MatchDecider(int argc, VALUE *argv, VALUE self) {
17643   Xapian::MatchDecider *arg1 = (Xapian::MatchDecider *) 0 ;
17644   void *argp1 = 0 ;
17645   int res1 = 0 ;
17646 
17647   if ((argc < 1) || (argc > 1)) {
17648     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
17649   }
17650   res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Xapian__MatchDecider, 0 |  0 );
17651   if (!SWIG_IsOK(res1)) {
17652     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MatchDecider *","disown_MatchDecider", 1, argv[0] ));
17653   }
17654   arg1 = reinterpret_cast< Xapian::MatchDecider * >(argp1);
17655   {
17656     Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
17657     if (director) director->swig_disown();
17658   }
17659 
17660   return Qnil;
17661 fail:
17662   return Qnil;
17663 }
17664 
17665 
17666 static swig_class SwigClassEnquire;
17667 
17668 SWIGINTERN VALUE
17669 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_Enquire_allocate(VALUE self)17670 _wrap_Enquire_allocate(VALUE self)
17671 #else
17672 _wrap_Enquire_allocate(int argc, VALUE *argv, VALUE self)
17673 #endif
17674 {
17675   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__Enquire);
17676 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
17677   rb_obj_call_init(vresult, argc, argv);
17678 #endif
17679   return vresult;
17680 }
17681 
17682 
17683 SWIGINTERN VALUE
_wrap_new_Enquire(int argc,VALUE * argv,VALUE self)17684 _wrap_new_Enquire(int argc, VALUE *argv, VALUE self) {
17685   Xapian::Database *arg1 = 0 ;
17686   void *argp1 ;
17687   int res1 = 0 ;
17688   const char *classname SWIGUNUSED = "Xapian::Enquire";
17689   Xapian::Enquire *result = 0 ;
17690 
17691   if ((argc < 1) || (argc > 1)) {
17692     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
17693   }
17694   res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Xapian__Database,  0 );
17695   if (!SWIG_IsOK(res1)) {
17696     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const &","Enquire", 1, argv[0] ));
17697   }
17698   if (!argp1) {
17699     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Database const &","Enquire", 1, argv[0]));
17700   }
17701   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
17702   {
17703     try {
17704       result = (Xapian::Enquire *)new Xapian::Enquire((Xapian::Database const &)*arg1);
17705       DATA_PTR(self) = result;
17706     } catch (...) {
17707       string msg;
17708       int code = XapianExceptionHandler(msg);
17709       SWIG_exception(code, msg.c_str());
17710     }
17711   }
17712   return self;
17713 fail:
17714   return Qnil;
17715 }
17716 
17717 
17718 SWIGINTERN void
free_Xapian_Enquire(void * self)17719 free_Xapian_Enquire(void *self) {
17720     Xapian::Enquire *arg1 = (Xapian::Enquire *)self;
17721     delete arg1;
17722 }
17723 
17724 SWIGINTERN VALUE
_wrap_Enquire_queryN___(int argc,VALUE * argv,VALUE self)17725 _wrap_Enquire_queryN___(int argc, VALUE *argv, VALUE self) {
17726   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
17727   Xapian::Query *arg2 = 0 ;
17728   Xapian::termcount arg3 ;
17729   void *argp1 = 0 ;
17730   int res1 = 0 ;
17731   void *argp2 ;
17732   int res2 = 0 ;
17733   unsigned int val3 ;
17734   int ecode3 = 0 ;
17735 
17736   if ((argc < 2) || (argc > 2)) {
17737     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
17738   }
17739   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
17740   if (!SWIG_IsOK(res1)) {
17741     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire *","set_query", 1, self ));
17742   }
17743   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
17744   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Query,  0 );
17745   if (!SWIG_IsOK(res2)) {
17746     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Query const &","set_query", 2, argv[0] ));
17747   }
17748   if (!argp2) {
17749     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Query const &","set_query", 2, argv[0]));
17750   }
17751   arg2 = reinterpret_cast< Xapian::Query * >(argp2);
17752   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
17753   if (!SWIG_IsOK(ecode3)) {
17754     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","set_query", 3, argv[1] ));
17755   }
17756   arg3 = static_cast< Xapian::termcount >(val3);
17757   {
17758     try {
17759       (arg1)->set_query((Xapian::Query const &)*arg2,arg3);
17760     } catch (...) {
17761       string msg;
17762       int code = XapianExceptionHandler(msg);
17763       SWIG_exception(code, msg.c_str());
17764     }
17765   }
17766   return Qnil;
17767 fail:
17768   return Qnil;
17769 }
17770 
17771 
17772 SWIGINTERN VALUE
_wrap_Enquire_querye___(int argc,VALUE * argv,VALUE self)17773 _wrap_Enquire_querye___(int argc, VALUE *argv, VALUE self) {
17774   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
17775   Xapian::Query *arg2 = 0 ;
17776   void *argp1 = 0 ;
17777   int res1 = 0 ;
17778   void *argp2 ;
17779   int res2 = 0 ;
17780 
17781   if ((argc < 1) || (argc > 1)) {
17782     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
17783   }
17784   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
17785   if (!SWIG_IsOK(res1)) {
17786     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire *","set_query", 1, self ));
17787   }
17788   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
17789   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Query,  0 );
17790   if (!SWIG_IsOK(res2)) {
17791     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Query const &","set_query", 2, argv[0] ));
17792   }
17793   if (!argp2) {
17794     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Query const &","set_query", 2, argv[0]));
17795   }
17796   arg2 = reinterpret_cast< Xapian::Query * >(argp2);
17797   {
17798     try {
17799       (arg1)->set_query((Xapian::Query const &)*arg2);
17800     } catch (...) {
17801       string msg;
17802       int code = XapianExceptionHandler(msg);
17803       SWIG_exception(code, msg.c_str());
17804     }
17805   }
17806   return Qnil;
17807 fail:
17808   return Qnil;
17809 }
17810 
17811 
17812 SWIGINTERN VALUE
_wrap_Enquire_query(int argc,VALUE * argv,VALUE self)17813 _wrap_Enquire_query(int argc, VALUE *argv, VALUE self) {
17814   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
17815   void *argp1 = 0 ;
17816   int res1 = 0 ;
17817   Xapian::Query *result = 0 ;
17818   VALUE vresult = Qnil;
17819 
17820   if ((argc < 0) || (argc > 0)) {
17821     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
17822   }
17823   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
17824   if (!SWIG_IsOK(res1)) {
17825     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","get_query", 1, self ));
17826   }
17827   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
17828   {
17829     try {
17830       result = (Xapian::Query *) &((Xapian::Enquire const *)arg1)->get_query();
17831     } catch (...) {
17832       string msg;
17833       int code = XapianExceptionHandler(msg);
17834       SWIG_exception(code, msg.c_str());
17835     }
17836   }
17837   vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, 0 |  0 );
17838   return vresult;
17839 fail:
17840   return Qnil;
17841 }
17842 
17843 
17844 SWIGINTERN VALUE
_wrap_Enquire_add_matchspy(int argc,VALUE * argv,VALUE self)17845 _wrap_Enquire_add_matchspy(int argc, VALUE *argv, VALUE self) {
17846   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
17847   Xapian::MatchSpy *arg2 = (Xapian::MatchSpy *) 0 ;
17848   void *argp1 = 0 ;
17849   int res1 = 0 ;
17850   void *argp2 = 0 ;
17851   int res2 = 0 ;
17852 
17853   if ((argc < 1) || (argc > 1)) {
17854     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
17855   }
17856   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
17857   if (!SWIG_IsOK(res1)) {
17858     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire *","add_matchspy", 1, self ));
17859   }
17860   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
17861   res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
17862   if (!SWIG_IsOK(res2)) {
17863     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::MatchSpy *","add_matchspy", 2, argv[0] ));
17864   }
17865   arg2 = reinterpret_cast< Xapian::MatchSpy * >(argp2);
17866   {
17867     try {
17868       (arg1)->add_matchspy(arg2);
17869     } catch (...) {
17870       string msg;
17871       int code = XapianExceptionHandler(msg);
17872       SWIG_exception(code, msg.c_str());
17873     }
17874   }
17875   return Qnil;
17876 fail:
17877   return Qnil;
17878 }
17879 
17880 
17881 SWIGINTERN VALUE
_wrap_Enquire_clear_matchspies(int argc,VALUE * argv,VALUE self)17882 _wrap_Enquire_clear_matchspies(int argc, VALUE *argv, VALUE self) {
17883   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
17884   void *argp1 = 0 ;
17885   int res1 = 0 ;
17886 
17887   if ((argc < 0) || (argc > 0)) {
17888     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
17889   }
17890   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
17891   if (!SWIG_IsOK(res1)) {
17892     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire *","clear_matchspies", 1, self ));
17893   }
17894   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
17895   {
17896     try {
17897       (arg1)->clear_matchspies();
17898     } catch (...) {
17899       string msg;
17900       int code = XapianExceptionHandler(msg);
17901       SWIG_exception(code, msg.c_str());
17902     }
17903   }
17904   return Qnil;
17905 fail:
17906   return Qnil;
17907 }
17908 
17909 
17910 SWIGINTERN VALUE
_wrap_Enquire_weighting_schemee___(int argc,VALUE * argv,VALUE self)17911 _wrap_Enquire_weighting_schemee___(int argc, VALUE *argv, VALUE self) {
17912   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
17913   Xapian::Weight *arg2 = 0 ;
17914   void *argp1 = 0 ;
17915   int res1 = 0 ;
17916   void *argp2 ;
17917   int res2 = 0 ;
17918 
17919   if ((argc < 1) || (argc > 1)) {
17920     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
17921   }
17922   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
17923   if (!SWIG_IsOK(res1)) {
17924     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire *","set_weighting_scheme", 1, self ));
17925   }
17926   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
17927   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Weight,  0 );
17928   if (!SWIG_IsOK(res2)) {
17929     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Weight const &","set_weighting_scheme", 2, argv[0] ));
17930   }
17931   if (!argp2) {
17932     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Weight const &","set_weighting_scheme", 2, argv[0]));
17933   }
17934   arg2 = reinterpret_cast< Xapian::Weight * >(argp2);
17935   {
17936     try {
17937       (arg1)->set_weighting_scheme((Xapian::Weight const &)*arg2);
17938     } catch (...) {
17939       string msg;
17940       int code = XapianExceptionHandler(msg);
17941       SWIG_exception(code, msg.c_str());
17942     }
17943   }
17944   return Qnil;
17945 fail:
17946   return Qnil;
17947 }
17948 
17949 
17950 SWIGINTERN VALUE
_wrap_Enquire_set_expansion_scheme__SWIG_0(int argc,VALUE * argv,VALUE self)17951 _wrap_Enquire_set_expansion_scheme__SWIG_0(int argc, VALUE *argv, VALUE self) {
17952   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
17953   std::string *arg2 = 0 ;
17954   double arg3 ;
17955   void *argp1 = 0 ;
17956   int res1 = 0 ;
17957   int res2 = SWIG_OLDOBJ ;
17958   double val3 ;
17959   int ecode3 = 0 ;
17960 
17961   if ((argc < 2) || (argc > 2)) {
17962     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
17963   }
17964   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
17965   if (!SWIG_IsOK(res1)) {
17966     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","set_expansion_scheme", 1, self ));
17967   }
17968   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
17969   {
17970     std::string *ptr = (std::string *)0;
17971     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
17972     if (!SWIG_IsOK(res2)) {
17973       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","set_expansion_scheme", 2, argv[0] ));
17974     }
17975     if (!ptr) {
17976       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","set_expansion_scheme", 2, argv[0]));
17977     }
17978     arg2 = ptr;
17979   }
17980   ecode3 = SWIG_AsVal_double(argv[1], &val3);
17981   if (!SWIG_IsOK(ecode3)) {
17982     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","set_expansion_scheme", 3, argv[1] ));
17983   }
17984   arg3 = static_cast< double >(val3);
17985   {
17986     try {
17987       ((Xapian::Enquire const *)arg1)->set_expansion_scheme((std::string const &)*arg2,arg3);
17988     } catch (...) {
17989       string msg;
17990       int code = XapianExceptionHandler(msg);
17991       SWIG_exception(code, msg.c_str());
17992     }
17993   }
17994   if (SWIG_IsNewObj(res2)) delete arg2;
17995   return Qnil;
17996 fail:
17997   if (SWIG_IsNewObj(res2)) delete arg2;
17998   return Qnil;
17999 }
18000 
18001 
18002 SWIGINTERN VALUE
_wrap_Enquire_set_expansion_scheme__SWIG_1(int argc,VALUE * argv,VALUE self)18003 _wrap_Enquire_set_expansion_scheme__SWIG_1(int argc, VALUE *argv, VALUE self) {
18004   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
18005   std::string *arg2 = 0 ;
18006   void *argp1 = 0 ;
18007   int res1 = 0 ;
18008   int res2 = SWIG_OLDOBJ ;
18009 
18010   if ((argc < 1) || (argc > 1)) {
18011     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
18012   }
18013   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
18014   if (!SWIG_IsOK(res1)) {
18015     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","set_expansion_scheme", 1, self ));
18016   }
18017   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
18018   {
18019     std::string *ptr = (std::string *)0;
18020     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
18021     if (!SWIG_IsOK(res2)) {
18022       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","set_expansion_scheme", 2, argv[0] ));
18023     }
18024     if (!ptr) {
18025       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","set_expansion_scheme", 2, argv[0]));
18026     }
18027     arg2 = ptr;
18028   }
18029   {
18030     try {
18031       ((Xapian::Enquire const *)arg1)->set_expansion_scheme((std::string const &)*arg2);
18032     } catch (...) {
18033       string msg;
18034       int code = XapianExceptionHandler(msg);
18035       SWIG_exception(code, msg.c_str());
18036     }
18037   }
18038   if (SWIG_IsNewObj(res2)) delete arg2;
18039   return Qnil;
18040 fail:
18041   if (SWIG_IsNewObj(res2)) delete arg2;
18042   return Qnil;
18043 }
18044 
18045 
_wrap_Enquire_set_expansion_scheme(int nargs,VALUE * args,VALUE self)18046 SWIGINTERN VALUE _wrap_Enquire_set_expansion_scheme(int nargs, VALUE *args, VALUE self) {
18047   int argc;
18048   VALUE argv[4];
18049   int ii;
18050 
18051   argc = nargs + 1;
18052   argv[0] = self;
18053   if (argc > 4) SWIG_fail;
18054   for (ii = 1; (ii < argc); ++ii) {
18055     argv[ii] = args[ii-1];
18056   }
18057   if (argc == 2) {
18058     int _v;
18059     void *vptr = 0;
18060     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
18061     _v = SWIG_CheckState(res);
18062     if (_v) {
18063       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
18064       _v = SWIG_CheckState(res);
18065       if (_v) {
18066         return _wrap_Enquire_set_expansion_scheme__SWIG_1(nargs, args, self);
18067       }
18068     }
18069   }
18070   if (argc == 3) {
18071     int _v;
18072     void *vptr = 0;
18073     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
18074     _v = SWIG_CheckState(res);
18075     if (_v) {
18076       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
18077       _v = SWIG_CheckState(res);
18078       if (_v) {
18079         {
18080           int res = SWIG_AsVal_double(argv[2], NULL);
18081           _v = SWIG_CheckState(res);
18082         }
18083         if (_v) {
18084           return _wrap_Enquire_set_expansion_scheme__SWIG_0(nargs, args, self);
18085         }
18086       }
18087     }
18088   }
18089 
18090 fail:
18091   Ruby_Format_OverloadedError( argc, 4, "Enquire.set_expansion_scheme",
18092     "    void Enquire.set_expansion_scheme(std::string const &eweightname_, double expand_k_)\n"
18093     "    void Enquire.set_expansion_scheme(std::string const &eweightname_)\n");
18094 
18095   return Qnil;
18096 }
18097 
18098 
18099 SWIGINTERN VALUE
_wrap_Enquire_collapse_keye_____SWIG_0(int argc,VALUE * argv,VALUE self)18100 _wrap_Enquire_collapse_keye_____SWIG_0(int argc, VALUE *argv, VALUE self) {
18101   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
18102   Xapian::valueno arg2 ;
18103   Xapian::doccount arg3 ;
18104   void *argp1 = 0 ;
18105   int res1 = 0 ;
18106   unsigned int val2 ;
18107   int ecode2 = 0 ;
18108   unsigned int val3 ;
18109   int ecode3 = 0 ;
18110 
18111   if ((argc < 2) || (argc > 2)) {
18112     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
18113   }
18114   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
18115   if (!SWIG_IsOK(res1)) {
18116     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire *","set_collapse_key", 1, self ));
18117   }
18118   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
18119   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
18120   if (!SWIG_IsOK(ecode2)) {
18121     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","set_collapse_key", 2, argv[0] ));
18122   }
18123   arg2 = static_cast< Xapian::valueno >(val2);
18124   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
18125   if (!SWIG_IsOK(ecode3)) {
18126     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::doccount","set_collapse_key", 3, argv[1] ));
18127   }
18128   arg3 = static_cast< Xapian::doccount >(val3);
18129   {
18130     try {
18131       (arg1)->set_collapse_key(arg2,arg3);
18132     } catch (...) {
18133       string msg;
18134       int code = XapianExceptionHandler(msg);
18135       SWIG_exception(code, msg.c_str());
18136     }
18137   }
18138   return Qnil;
18139 fail:
18140   return Qnil;
18141 }
18142 
18143 
18144 SWIGINTERN VALUE
_wrap_Enquire_collapse_keye_____SWIG_1(int argc,VALUE * argv,VALUE self)18145 _wrap_Enquire_collapse_keye_____SWIG_1(int argc, VALUE *argv, VALUE self) {
18146   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
18147   Xapian::valueno arg2 ;
18148   void *argp1 = 0 ;
18149   int res1 = 0 ;
18150   unsigned int val2 ;
18151   int ecode2 = 0 ;
18152 
18153   if ((argc < 1) || (argc > 1)) {
18154     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
18155   }
18156   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
18157   if (!SWIG_IsOK(res1)) {
18158     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire *","set_collapse_key", 1, self ));
18159   }
18160   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
18161   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
18162   if (!SWIG_IsOK(ecode2)) {
18163     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","set_collapse_key", 2, argv[0] ));
18164   }
18165   arg2 = static_cast< Xapian::valueno >(val2);
18166   {
18167     try {
18168       (arg1)->set_collapse_key(arg2);
18169     } catch (...) {
18170       string msg;
18171       int code = XapianExceptionHandler(msg);
18172       SWIG_exception(code, msg.c_str());
18173     }
18174   }
18175   return Qnil;
18176 fail:
18177   return Qnil;
18178 }
18179 
18180 
_wrap_Enquire_collapse_keye___(int nargs,VALUE * args,VALUE self)18181 SWIGINTERN VALUE _wrap_Enquire_collapse_keye___(int nargs, VALUE *args, VALUE self) {
18182   int argc;
18183   VALUE argv[4];
18184   int ii;
18185 
18186   argc = nargs + 1;
18187   argv[0] = self;
18188   if (argc > 4) SWIG_fail;
18189   for (ii = 1; (ii < argc); ++ii) {
18190     argv[ii] = args[ii-1];
18191   }
18192   if (argc == 2) {
18193     int _v;
18194     void *vptr = 0;
18195     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
18196     _v = SWIG_CheckState(res);
18197     if (_v) {
18198       {
18199         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
18200         _v = SWIG_CheckState(res);
18201       }
18202       if (_v) {
18203         return _wrap_Enquire_collapse_keye_____SWIG_1(nargs, args, self);
18204       }
18205     }
18206   }
18207   if (argc == 3) {
18208     int _v;
18209     void *vptr = 0;
18210     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
18211     _v = SWIG_CheckState(res);
18212     if (_v) {
18213       {
18214         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
18215         _v = SWIG_CheckState(res);
18216       }
18217       if (_v) {
18218         {
18219           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
18220           _v = SWIG_CheckState(res);
18221         }
18222         if (_v) {
18223           return _wrap_Enquire_collapse_keye_____SWIG_0(nargs, args, self);
18224         }
18225       }
18226     }
18227   }
18228 
18229 fail:
18230   Ruby_Format_OverloadedError( argc, 4, "Enquire.collapse_key=",
18231     "    void Enquire.collapse_key=(Xapian::valueno collapse_key, Xapian::doccount collapse_max)\n"
18232     "    void Enquire.collapse_key=(Xapian::valueno collapse_key)\n");
18233 
18234   return Qnil;
18235 }
18236 
18237 
18238 SWIGINTERN VALUE
_wrap_Enquire_docid_ordere___(int argc,VALUE * argv,VALUE self)18239 _wrap_Enquire_docid_ordere___(int argc, VALUE *argv, VALUE self) {
18240   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
18241   Xapian::Enquire::docid_order arg2 ;
18242   void *argp1 = 0 ;
18243   int res1 = 0 ;
18244   int val2 ;
18245   int ecode2 = 0 ;
18246 
18247   if ((argc < 1) || (argc > 1)) {
18248     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
18249   }
18250   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
18251   if (!SWIG_IsOK(res1)) {
18252     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire *","set_docid_order", 1, self ));
18253   }
18254   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
18255   ecode2 = SWIG_AsVal_int(argv[0], &val2);
18256   if (!SWIG_IsOK(ecode2)) {
18257     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::Enquire::docid_order","set_docid_order", 2, argv[0] ));
18258   }
18259   arg2 = static_cast< Xapian::Enquire::docid_order >(val2);
18260   {
18261     try {
18262       (arg1)->set_docid_order(arg2);
18263     } catch (...) {
18264       string msg;
18265       int code = XapianExceptionHandler(msg);
18266       SWIG_exception(code, msg.c_str());
18267     }
18268   }
18269   return Qnil;
18270 fail:
18271   return Qnil;
18272 }
18273 
18274 
18275 SWIGINTERN VALUE
_wrap_Enquire_cutoffN_____SWIG_0(int argc,VALUE * argv,VALUE self)18276 _wrap_Enquire_cutoffN_____SWIG_0(int argc, VALUE *argv, VALUE self) {
18277   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
18278   int arg2 ;
18279   double arg3 ;
18280   void *argp1 = 0 ;
18281   int res1 = 0 ;
18282   int val2 ;
18283   int ecode2 = 0 ;
18284   double val3 ;
18285   int ecode3 = 0 ;
18286 
18287   if ((argc < 2) || (argc > 2)) {
18288     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
18289   }
18290   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
18291   if (!SWIG_IsOK(res1)) {
18292     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire *","set_cutoff", 1, self ));
18293   }
18294   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
18295   ecode2 = SWIG_AsVal_int(argv[0], &val2);
18296   if (!SWIG_IsOK(ecode2)) {
18297     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","set_cutoff", 2, argv[0] ));
18298   }
18299   arg2 = static_cast< int >(val2);
18300   ecode3 = SWIG_AsVal_double(argv[1], &val3);
18301   if (!SWIG_IsOK(ecode3)) {
18302     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","set_cutoff", 3, argv[1] ));
18303   }
18304   arg3 = static_cast< double >(val3);
18305   {
18306     try {
18307       (arg1)->set_cutoff(arg2,arg3);
18308     } catch (...) {
18309       string msg;
18310       int code = XapianExceptionHandler(msg);
18311       SWIG_exception(code, msg.c_str());
18312     }
18313   }
18314   return Qnil;
18315 fail:
18316   return Qnil;
18317 }
18318 
18319 
18320 SWIGINTERN VALUE
_wrap_Enquire_cutoffN_____SWIG_1(int argc,VALUE * argv,VALUE self)18321 _wrap_Enquire_cutoffN_____SWIG_1(int argc, VALUE *argv, VALUE self) {
18322   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
18323   int arg2 ;
18324   void *argp1 = 0 ;
18325   int res1 = 0 ;
18326   int val2 ;
18327   int ecode2 = 0 ;
18328 
18329   if ((argc < 1) || (argc > 1)) {
18330     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
18331   }
18332   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
18333   if (!SWIG_IsOK(res1)) {
18334     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire *","set_cutoff", 1, self ));
18335   }
18336   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
18337   ecode2 = SWIG_AsVal_int(argv[0], &val2);
18338   if (!SWIG_IsOK(ecode2)) {
18339     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","set_cutoff", 2, argv[0] ));
18340   }
18341   arg2 = static_cast< int >(val2);
18342   {
18343     try {
18344       (arg1)->set_cutoff(arg2);
18345     } catch (...) {
18346       string msg;
18347       int code = XapianExceptionHandler(msg);
18348       SWIG_exception(code, msg.c_str());
18349     }
18350   }
18351   return Qnil;
18352 fail:
18353   return Qnil;
18354 }
18355 
18356 
_wrap_Enquire_cutoffN___(int nargs,VALUE * args,VALUE self)18357 SWIGINTERN VALUE _wrap_Enquire_cutoffN___(int nargs, VALUE *args, VALUE self) {
18358   int argc;
18359   VALUE argv[4];
18360   int ii;
18361 
18362   argc = nargs + 1;
18363   argv[0] = self;
18364   if (argc > 4) SWIG_fail;
18365   for (ii = 1; (ii < argc); ++ii) {
18366     argv[ii] = args[ii-1];
18367   }
18368   if (argc == 2) {
18369     int _v;
18370     void *vptr = 0;
18371     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
18372     _v = SWIG_CheckState(res);
18373     if (_v) {
18374       {
18375         int res = SWIG_AsVal_int(argv[1], NULL);
18376         _v = SWIG_CheckState(res);
18377       }
18378       if (_v) {
18379         return _wrap_Enquire_cutoffN_____SWIG_1(nargs, args, self);
18380       }
18381     }
18382   }
18383   if (argc == 3) {
18384     int _v;
18385     void *vptr = 0;
18386     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
18387     _v = SWIG_CheckState(res);
18388     if (_v) {
18389       {
18390         int res = SWIG_AsVal_int(argv[1], NULL);
18391         _v = SWIG_CheckState(res);
18392       }
18393       if (_v) {
18394         {
18395           int res = SWIG_AsVal_double(argv[2], NULL);
18396           _v = SWIG_CheckState(res);
18397         }
18398         if (_v) {
18399           return _wrap_Enquire_cutoffN_____SWIG_0(nargs, args, self);
18400         }
18401       }
18402     }
18403   }
18404 
18405 fail:
18406   Ruby_Format_OverloadedError( argc, 4, "Enquire.cutoff!",
18407     "    void Enquire.cutoff!(int percent_cutoff, double weight_cutoff)\n"
18408     "    void Enquire.cutoff!(int percent_cutoff)\n");
18409 
18410   return Qnil;
18411 }
18412 
18413 
18414 SWIGINTERN VALUE
_wrap_Enquire_sort_by_relevanceN___(int argc,VALUE * argv,VALUE self)18415 _wrap_Enquire_sort_by_relevanceN___(int argc, VALUE *argv, VALUE self) {
18416   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
18417   void *argp1 = 0 ;
18418   int res1 = 0 ;
18419 
18420   if ((argc < 0) || (argc > 0)) {
18421     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
18422   }
18423   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
18424   if (!SWIG_IsOK(res1)) {
18425     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire *","set_sort_by_relevance", 1, self ));
18426   }
18427   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
18428   {
18429     try {
18430       (arg1)->set_sort_by_relevance();
18431     } catch (...) {
18432       string msg;
18433       int code = XapianExceptionHandler(msg);
18434       SWIG_exception(code, msg.c_str());
18435     }
18436   }
18437   return Qnil;
18438 fail:
18439   return Qnil;
18440 }
18441 
18442 
18443 SWIGINTERN VALUE
_wrap_Enquire_sort_by_valueN___(int argc,VALUE * argv,VALUE self)18444 _wrap_Enquire_sort_by_valueN___(int argc, VALUE *argv, VALUE self) {
18445   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
18446   Xapian::valueno arg2 ;
18447   bool arg3 ;
18448   void *argp1 = 0 ;
18449   int res1 = 0 ;
18450   unsigned int val2 ;
18451   int ecode2 = 0 ;
18452   bool val3 ;
18453   int ecode3 = 0 ;
18454 
18455   if ((argc < 2) || (argc > 2)) {
18456     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
18457   }
18458   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
18459   if (!SWIG_IsOK(res1)) {
18460     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire *","set_sort_by_value", 1, self ));
18461   }
18462   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
18463   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
18464   if (!SWIG_IsOK(ecode2)) {
18465     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","set_sort_by_value", 2, argv[0] ));
18466   }
18467   arg2 = static_cast< Xapian::valueno >(val2);
18468   ecode3 = SWIG_AsVal_bool(argv[1], &val3);
18469   if (!SWIG_IsOK(ecode3)) {
18470     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","set_sort_by_value", 3, argv[1] ));
18471   }
18472   arg3 = static_cast< bool >(val3);
18473   {
18474     try {
18475       (arg1)->set_sort_by_value(arg2,arg3);
18476     } catch (...) {
18477       string msg;
18478       int code = XapianExceptionHandler(msg);
18479       SWIG_exception(code, msg.c_str());
18480     }
18481   }
18482   return Qnil;
18483 fail:
18484   return Qnil;
18485 }
18486 
18487 
18488 SWIGINTERN VALUE
_wrap_Enquire_set_sort_by_key(int argc,VALUE * argv,VALUE self)18489 _wrap_Enquire_set_sort_by_key(int argc, VALUE *argv, VALUE self) {
18490   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
18491   Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
18492   bool arg3 ;
18493   void *argp1 = 0 ;
18494   int res1 = 0 ;
18495   void *argp2 = 0 ;
18496   int res2 = 0 ;
18497   bool val3 ;
18498   int ecode3 = 0 ;
18499 
18500   if ((argc < 2) || (argc > 2)) {
18501     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
18502   }
18503   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
18504   if (!SWIG_IsOK(res1)) {
18505     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire *","set_sort_by_key", 1, self ));
18506   }
18507   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
18508   res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Xapian__KeyMaker, 0 |  0 );
18509   if (!SWIG_IsOK(res2)) {
18510     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::KeyMaker *","set_sort_by_key", 2, argv[0] ));
18511   }
18512   arg2 = reinterpret_cast< Xapian::KeyMaker * >(argp2);
18513   ecode3 = SWIG_AsVal_bool(argv[1], &val3);
18514   if (!SWIG_IsOK(ecode3)) {
18515     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","set_sort_by_key", 3, argv[1] ));
18516   }
18517   arg3 = static_cast< bool >(val3);
18518   {
18519     try {
18520       (arg1)->set_sort_by_key(arg2,arg3);
18521     } catch (...) {
18522       string msg;
18523       int code = XapianExceptionHandler(msg);
18524       SWIG_exception(code, msg.c_str());
18525     }
18526   }
18527   return Qnil;
18528 fail:
18529   return Qnil;
18530 }
18531 
18532 
18533 SWIGINTERN VALUE
_wrap_Enquire_sort_by_value_then_relevanceN___(int argc,VALUE * argv,VALUE self)18534 _wrap_Enquire_sort_by_value_then_relevanceN___(int argc, VALUE *argv, VALUE self) {
18535   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
18536   Xapian::valueno arg2 ;
18537   bool arg3 ;
18538   void *argp1 = 0 ;
18539   int res1 = 0 ;
18540   unsigned int val2 ;
18541   int ecode2 = 0 ;
18542   bool val3 ;
18543   int ecode3 = 0 ;
18544 
18545   if ((argc < 2) || (argc > 2)) {
18546     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
18547   }
18548   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
18549   if (!SWIG_IsOK(res1)) {
18550     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire *","set_sort_by_value_then_relevance", 1, self ));
18551   }
18552   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
18553   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
18554   if (!SWIG_IsOK(ecode2)) {
18555     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","set_sort_by_value_then_relevance", 2, argv[0] ));
18556   }
18557   arg2 = static_cast< Xapian::valueno >(val2);
18558   ecode3 = SWIG_AsVal_bool(argv[1], &val3);
18559   if (!SWIG_IsOK(ecode3)) {
18560     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","set_sort_by_value_then_relevance", 3, argv[1] ));
18561   }
18562   arg3 = static_cast< bool >(val3);
18563   {
18564     try {
18565       (arg1)->set_sort_by_value_then_relevance(arg2,arg3);
18566     } catch (...) {
18567       string msg;
18568       int code = XapianExceptionHandler(msg);
18569       SWIG_exception(code, msg.c_str());
18570     }
18571   }
18572   return Qnil;
18573 fail:
18574   return Qnil;
18575 }
18576 
18577 
18578 SWIGINTERN VALUE
_wrap_Enquire_set_sort_by_key_then_relevance(int argc,VALUE * argv,VALUE self)18579 _wrap_Enquire_set_sort_by_key_then_relevance(int argc, VALUE *argv, VALUE self) {
18580   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
18581   Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
18582   bool arg3 ;
18583   void *argp1 = 0 ;
18584   int res1 = 0 ;
18585   void *argp2 = 0 ;
18586   int res2 = 0 ;
18587   bool val3 ;
18588   int ecode3 = 0 ;
18589 
18590   if ((argc < 2) || (argc > 2)) {
18591     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
18592   }
18593   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
18594   if (!SWIG_IsOK(res1)) {
18595     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire *","set_sort_by_key_then_relevance", 1, self ));
18596   }
18597   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
18598   res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Xapian__KeyMaker, 0 |  0 );
18599   if (!SWIG_IsOK(res2)) {
18600     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::KeyMaker *","set_sort_by_key_then_relevance", 2, argv[0] ));
18601   }
18602   arg2 = reinterpret_cast< Xapian::KeyMaker * >(argp2);
18603   ecode3 = SWIG_AsVal_bool(argv[1], &val3);
18604   if (!SWIG_IsOK(ecode3)) {
18605     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","set_sort_by_key_then_relevance", 3, argv[1] ));
18606   }
18607   arg3 = static_cast< bool >(val3);
18608   {
18609     try {
18610       (arg1)->set_sort_by_key_then_relevance(arg2,arg3);
18611     } catch (...) {
18612       string msg;
18613       int code = XapianExceptionHandler(msg);
18614       SWIG_exception(code, msg.c_str());
18615     }
18616   }
18617   return Qnil;
18618 fail:
18619   return Qnil;
18620 }
18621 
18622 
18623 SWIGINTERN VALUE
_wrap_Enquire_sort_by_relevance_then_valueN___(int argc,VALUE * argv,VALUE self)18624 _wrap_Enquire_sort_by_relevance_then_valueN___(int argc, VALUE *argv, VALUE self) {
18625   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
18626   Xapian::valueno arg2 ;
18627   bool arg3 ;
18628   void *argp1 = 0 ;
18629   int res1 = 0 ;
18630   unsigned int val2 ;
18631   int ecode2 = 0 ;
18632   bool val3 ;
18633   int ecode3 = 0 ;
18634 
18635   if ((argc < 2) || (argc > 2)) {
18636     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
18637   }
18638   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
18639   if (!SWIG_IsOK(res1)) {
18640     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire *","set_sort_by_relevance_then_value", 1, self ));
18641   }
18642   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
18643   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
18644   if (!SWIG_IsOK(ecode2)) {
18645     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","set_sort_by_relevance_then_value", 2, argv[0] ));
18646   }
18647   arg2 = static_cast< Xapian::valueno >(val2);
18648   ecode3 = SWIG_AsVal_bool(argv[1], &val3);
18649   if (!SWIG_IsOK(ecode3)) {
18650     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","set_sort_by_relevance_then_value", 3, argv[1] ));
18651   }
18652   arg3 = static_cast< bool >(val3);
18653   {
18654     try {
18655       (arg1)->set_sort_by_relevance_then_value(arg2,arg3);
18656     } catch (...) {
18657       string msg;
18658       int code = XapianExceptionHandler(msg);
18659       SWIG_exception(code, msg.c_str());
18660     }
18661   }
18662   return Qnil;
18663 fail:
18664   return Qnil;
18665 }
18666 
18667 
18668 SWIGINTERN VALUE
_wrap_Enquire_set_sort_by_relevance_then_key(int argc,VALUE * argv,VALUE self)18669 _wrap_Enquire_set_sort_by_relevance_then_key(int argc, VALUE *argv, VALUE self) {
18670   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
18671   Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
18672   bool arg3 ;
18673   void *argp1 = 0 ;
18674   int res1 = 0 ;
18675   void *argp2 = 0 ;
18676   int res2 = 0 ;
18677   bool val3 ;
18678   int ecode3 = 0 ;
18679 
18680   if ((argc < 2) || (argc > 2)) {
18681     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
18682   }
18683   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
18684   if (!SWIG_IsOK(res1)) {
18685     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire *","set_sort_by_relevance_then_key", 1, self ));
18686   }
18687   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
18688   res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Xapian__KeyMaker, 0 |  0 );
18689   if (!SWIG_IsOK(res2)) {
18690     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::KeyMaker *","set_sort_by_relevance_then_key", 2, argv[0] ));
18691   }
18692   arg2 = reinterpret_cast< Xapian::KeyMaker * >(argp2);
18693   ecode3 = SWIG_AsVal_bool(argv[1], &val3);
18694   if (!SWIG_IsOK(ecode3)) {
18695     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","set_sort_by_relevance_then_key", 3, argv[1] ));
18696   }
18697   arg3 = static_cast< bool >(val3);
18698   {
18699     try {
18700       (arg1)->set_sort_by_relevance_then_key(arg2,arg3);
18701     } catch (...) {
18702       string msg;
18703       int code = XapianExceptionHandler(msg);
18704       SWIG_exception(code, msg.c_str());
18705     }
18706   }
18707   return Qnil;
18708 fail:
18709   return Qnil;
18710 }
18711 
18712 
18713 SWIGINTERN VALUE
_wrap_Enquire_set_time_limit(int argc,VALUE * argv,VALUE self)18714 _wrap_Enquire_set_time_limit(int argc, VALUE *argv, VALUE self) {
18715   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
18716   double arg2 ;
18717   void *argp1 = 0 ;
18718   int res1 = 0 ;
18719   double val2 ;
18720   int ecode2 = 0 ;
18721 
18722   if ((argc < 1) || (argc > 1)) {
18723     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
18724   }
18725   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
18726   if (!SWIG_IsOK(res1)) {
18727     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire *","set_time_limit", 1, self ));
18728   }
18729   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
18730   ecode2 = SWIG_AsVal_double(argv[0], &val2);
18731   if (!SWIG_IsOK(ecode2)) {
18732     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","set_time_limit", 2, argv[0] ));
18733   }
18734   arg2 = static_cast< double >(val2);
18735   {
18736     try {
18737       (arg1)->set_time_limit(arg2);
18738     } catch (...) {
18739       string msg;
18740       int code = XapianExceptionHandler(msg);
18741       SWIG_exception(code, msg.c_str());
18742     }
18743   }
18744   return Qnil;
18745 fail:
18746   return Qnil;
18747 }
18748 
18749 
18750 SWIGINTERN VALUE
_wrap_Enquire_mset__SWIG_0(int argc,VALUE * argv,VALUE self)18751 _wrap_Enquire_mset__SWIG_0(int argc, VALUE *argv, VALUE self) {
18752   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
18753   Xapian::doccount arg2 ;
18754   Xapian::doccount arg3 ;
18755   Xapian::doccount arg4 ;
18756   Xapian::RSet *arg5 = (Xapian::RSet *) 0 ;
18757   Xapian::MatchDecider *arg6 = (Xapian::MatchDecider *) 0 ;
18758   void *argp1 = 0 ;
18759   int res1 = 0 ;
18760   unsigned int val2 ;
18761   int ecode2 = 0 ;
18762   unsigned int val3 ;
18763   int ecode3 = 0 ;
18764   unsigned int val4 ;
18765   int ecode4 = 0 ;
18766   void *argp5 = 0 ;
18767   int res5 = 0 ;
18768   void *argp6 = 0 ;
18769   int res6 = 0 ;
18770   Xapian::MSet result;
18771   VALUE vresult = Qnil;
18772 
18773   if ((argc < 5) || (argc > 5)) {
18774     rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
18775   }
18776   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
18777   if (!SWIG_IsOK(res1)) {
18778     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","get_mset", 1, self ));
18779   }
18780   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
18781   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
18782   if (!SWIG_IsOK(ecode2)) {
18783     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::doccount","get_mset", 2, argv[0] ));
18784   }
18785   arg2 = static_cast< Xapian::doccount >(val2);
18786   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
18787   if (!SWIG_IsOK(ecode3)) {
18788     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::doccount","get_mset", 3, argv[1] ));
18789   }
18790   arg3 = static_cast< Xapian::doccount >(val3);
18791   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
18792   if (!SWIG_IsOK(ecode4)) {
18793     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::doccount","get_mset", 4, argv[2] ));
18794   }
18795   arg4 = static_cast< Xapian::doccount >(val4);
18796   res5 = SWIG_ConvertPtr(argv[3], &argp5,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
18797   if (!SWIG_IsOK(res5)) {
18798     SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "Xapian::RSet const *","get_mset", 5, argv[3] ));
18799   }
18800   arg5 = reinterpret_cast< Xapian::RSet * >(argp5);
18801   res6 = SWIG_ConvertPtr(argv[4], &argp6,SWIGTYPE_p_Xapian__MatchDecider, 0 |  0 );
18802   if (!SWIG_IsOK(res6)) {
18803     SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "Xapian::MatchDecider const *","get_mset", 6, argv[4] ));
18804   }
18805   arg6 = reinterpret_cast< Xapian::MatchDecider * >(argp6);
18806   {
18807     try {
18808       result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4,(Xapian::RSet const *)arg5,(Xapian::MatchDecider const *)arg6);
18809     } catch (...) {
18810       string msg;
18811       int code = XapianExceptionHandler(msg);
18812       SWIG_exception(code, msg.c_str());
18813     }
18814   }
18815   vresult = SWIG_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN |  0 );
18816   return vresult;
18817 fail:
18818   return Qnil;
18819 }
18820 
18821 
18822 SWIGINTERN VALUE
_wrap_Enquire_mset__SWIG_1(int argc,VALUE * argv,VALUE self)18823 _wrap_Enquire_mset__SWIG_1(int argc, VALUE *argv, VALUE self) {
18824   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
18825   Xapian::doccount arg2 ;
18826   Xapian::doccount arg3 ;
18827   Xapian::doccount arg4 ;
18828   Xapian::RSet *arg5 = (Xapian::RSet *) 0 ;
18829   void *argp1 = 0 ;
18830   int res1 = 0 ;
18831   unsigned int val2 ;
18832   int ecode2 = 0 ;
18833   unsigned int val3 ;
18834   int ecode3 = 0 ;
18835   unsigned int val4 ;
18836   int ecode4 = 0 ;
18837   void *argp5 = 0 ;
18838   int res5 = 0 ;
18839   Xapian::MSet result;
18840   VALUE vresult = Qnil;
18841 
18842   if ((argc < 4) || (argc > 4)) {
18843     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
18844   }
18845   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
18846   if (!SWIG_IsOK(res1)) {
18847     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","get_mset", 1, self ));
18848   }
18849   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
18850   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
18851   if (!SWIG_IsOK(ecode2)) {
18852     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::doccount","get_mset", 2, argv[0] ));
18853   }
18854   arg2 = static_cast< Xapian::doccount >(val2);
18855   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
18856   if (!SWIG_IsOK(ecode3)) {
18857     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::doccount","get_mset", 3, argv[1] ));
18858   }
18859   arg3 = static_cast< Xapian::doccount >(val3);
18860   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
18861   if (!SWIG_IsOK(ecode4)) {
18862     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::doccount","get_mset", 4, argv[2] ));
18863   }
18864   arg4 = static_cast< Xapian::doccount >(val4);
18865   res5 = SWIG_ConvertPtr(argv[3], &argp5,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
18866   if (!SWIG_IsOK(res5)) {
18867     SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "Xapian::RSet const *","get_mset", 5, argv[3] ));
18868   }
18869   arg5 = reinterpret_cast< Xapian::RSet * >(argp5);
18870   {
18871     try {
18872       result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4,(Xapian::RSet const *)arg5);
18873     } catch (...) {
18874       string msg;
18875       int code = XapianExceptionHandler(msg);
18876       SWIG_exception(code, msg.c_str());
18877     }
18878   }
18879   vresult = SWIG_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN |  0 );
18880   return vresult;
18881 fail:
18882   return Qnil;
18883 }
18884 
18885 
18886 SWIGINTERN VALUE
_wrap_Enquire_mset__SWIG_2(int argc,VALUE * argv,VALUE self)18887 _wrap_Enquire_mset__SWIG_2(int argc, VALUE *argv, VALUE self) {
18888   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
18889   Xapian::doccount arg2 ;
18890   Xapian::doccount arg3 ;
18891   Xapian::doccount arg4 ;
18892   void *argp1 = 0 ;
18893   int res1 = 0 ;
18894   unsigned int val2 ;
18895   int ecode2 = 0 ;
18896   unsigned int val3 ;
18897   int ecode3 = 0 ;
18898   unsigned int val4 ;
18899   int ecode4 = 0 ;
18900   Xapian::MSet result;
18901   VALUE vresult = Qnil;
18902 
18903   if ((argc < 3) || (argc > 3)) {
18904     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
18905   }
18906   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
18907   if (!SWIG_IsOK(res1)) {
18908     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","get_mset", 1, self ));
18909   }
18910   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
18911   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
18912   if (!SWIG_IsOK(ecode2)) {
18913     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::doccount","get_mset", 2, argv[0] ));
18914   }
18915   arg2 = static_cast< Xapian::doccount >(val2);
18916   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
18917   if (!SWIG_IsOK(ecode3)) {
18918     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::doccount","get_mset", 3, argv[1] ));
18919   }
18920   arg3 = static_cast< Xapian::doccount >(val3);
18921   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
18922   if (!SWIG_IsOK(ecode4)) {
18923     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::doccount","get_mset", 4, argv[2] ));
18924   }
18925   arg4 = static_cast< Xapian::doccount >(val4);
18926   {
18927     try {
18928       result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4);
18929     } catch (...) {
18930       string msg;
18931       int code = XapianExceptionHandler(msg);
18932       SWIG_exception(code, msg.c_str());
18933     }
18934   }
18935   vresult = SWIG_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN |  0 );
18936   return vresult;
18937 fail:
18938   return Qnil;
18939 }
18940 
18941 
18942 SWIGINTERN VALUE
_wrap_Enquire_mset__SWIG_3(int argc,VALUE * argv,VALUE self)18943 _wrap_Enquire_mset__SWIG_3(int argc, VALUE *argv, VALUE self) {
18944   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
18945   Xapian::doccount arg2 ;
18946   Xapian::doccount arg3 ;
18947   void *argp1 = 0 ;
18948   int res1 = 0 ;
18949   unsigned int val2 ;
18950   int ecode2 = 0 ;
18951   unsigned int val3 ;
18952   int ecode3 = 0 ;
18953   Xapian::MSet result;
18954   VALUE vresult = Qnil;
18955 
18956   if ((argc < 2) || (argc > 2)) {
18957     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
18958   }
18959   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
18960   if (!SWIG_IsOK(res1)) {
18961     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","get_mset", 1, self ));
18962   }
18963   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
18964   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
18965   if (!SWIG_IsOK(ecode2)) {
18966     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::doccount","get_mset", 2, argv[0] ));
18967   }
18968   arg2 = static_cast< Xapian::doccount >(val2);
18969   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
18970   if (!SWIG_IsOK(ecode3)) {
18971     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::doccount","get_mset", 3, argv[1] ));
18972   }
18973   arg3 = static_cast< Xapian::doccount >(val3);
18974   {
18975     try {
18976       result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3);
18977     } catch (...) {
18978       string msg;
18979       int code = XapianExceptionHandler(msg);
18980       SWIG_exception(code, msg.c_str());
18981     }
18982   }
18983   vresult = SWIG_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN |  0 );
18984   return vresult;
18985 fail:
18986   return Qnil;
18987 }
18988 
18989 
18990 SWIGINTERN VALUE
_wrap_Enquire_mset__SWIG_4(int argc,VALUE * argv,VALUE self)18991 _wrap_Enquire_mset__SWIG_4(int argc, VALUE *argv, VALUE self) {
18992   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
18993   Xapian::doccount arg2 ;
18994   Xapian::doccount arg3 ;
18995   Xapian::RSet *arg4 = (Xapian::RSet *) 0 ;
18996   Xapian::MatchDecider *arg5 = (Xapian::MatchDecider *) 0 ;
18997   void *argp1 = 0 ;
18998   int res1 = 0 ;
18999   unsigned int val2 ;
19000   int ecode2 = 0 ;
19001   unsigned int val3 ;
19002   int ecode3 = 0 ;
19003   void *argp4 = 0 ;
19004   int res4 = 0 ;
19005   void *argp5 = 0 ;
19006   int res5 = 0 ;
19007   Xapian::MSet result;
19008   VALUE vresult = Qnil;
19009 
19010   if ((argc < 4) || (argc > 4)) {
19011     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
19012   }
19013   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
19014   if (!SWIG_IsOK(res1)) {
19015     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","get_mset", 1, self ));
19016   }
19017   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
19018   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
19019   if (!SWIG_IsOK(ecode2)) {
19020     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::doccount","get_mset", 2, argv[0] ));
19021   }
19022   arg2 = static_cast< Xapian::doccount >(val2);
19023   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
19024   if (!SWIG_IsOK(ecode3)) {
19025     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::doccount","get_mset", 3, argv[1] ));
19026   }
19027   arg3 = static_cast< Xapian::doccount >(val3);
19028   res4 = SWIG_ConvertPtr(argv[2], &argp4,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
19029   if (!SWIG_IsOK(res4)) {
19030     SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "Xapian::RSet const *","get_mset", 4, argv[2] ));
19031   }
19032   arg4 = reinterpret_cast< Xapian::RSet * >(argp4);
19033   res5 = SWIG_ConvertPtr(argv[3], &argp5,SWIGTYPE_p_Xapian__MatchDecider, 0 |  0 );
19034   if (!SWIG_IsOK(res5)) {
19035     SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "Xapian::MatchDecider const *","get_mset", 5, argv[3] ));
19036   }
19037   arg5 = reinterpret_cast< Xapian::MatchDecider * >(argp5);
19038   {
19039     try {
19040       result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,(Xapian::RSet const *)arg4,(Xapian::MatchDecider const *)arg5);
19041     } catch (...) {
19042       string msg;
19043       int code = XapianExceptionHandler(msg);
19044       SWIG_exception(code, msg.c_str());
19045     }
19046   }
19047   vresult = SWIG_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN |  0 );
19048   return vresult;
19049 fail:
19050   return Qnil;
19051 }
19052 
19053 
19054 SWIGINTERN VALUE
_wrap_Enquire_mset__SWIG_5(int argc,VALUE * argv,VALUE self)19055 _wrap_Enquire_mset__SWIG_5(int argc, VALUE *argv, VALUE self) {
19056   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
19057   Xapian::doccount arg2 ;
19058   Xapian::doccount arg3 ;
19059   Xapian::RSet *arg4 = (Xapian::RSet *) 0 ;
19060   void *argp1 = 0 ;
19061   int res1 = 0 ;
19062   unsigned int val2 ;
19063   int ecode2 = 0 ;
19064   unsigned int val3 ;
19065   int ecode3 = 0 ;
19066   void *argp4 = 0 ;
19067   int res4 = 0 ;
19068   Xapian::MSet result;
19069   VALUE vresult = Qnil;
19070 
19071   if ((argc < 3) || (argc > 3)) {
19072     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
19073   }
19074   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
19075   if (!SWIG_IsOK(res1)) {
19076     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","get_mset", 1, self ));
19077   }
19078   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
19079   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
19080   if (!SWIG_IsOK(ecode2)) {
19081     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::doccount","get_mset", 2, argv[0] ));
19082   }
19083   arg2 = static_cast< Xapian::doccount >(val2);
19084   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
19085   if (!SWIG_IsOK(ecode3)) {
19086     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::doccount","get_mset", 3, argv[1] ));
19087   }
19088   arg3 = static_cast< Xapian::doccount >(val3);
19089   res4 = SWIG_ConvertPtr(argv[2], &argp4,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
19090   if (!SWIG_IsOK(res4)) {
19091     SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "Xapian::RSet const *","get_mset", 4, argv[2] ));
19092   }
19093   arg4 = reinterpret_cast< Xapian::RSet * >(argp4);
19094   {
19095     try {
19096       result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,(Xapian::RSet const *)arg4);
19097     } catch (...) {
19098       string msg;
19099       int code = XapianExceptionHandler(msg);
19100       SWIG_exception(code, msg.c_str());
19101     }
19102   }
19103   vresult = SWIG_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN |  0 );
19104   return vresult;
19105 fail:
19106   return Qnil;
19107 }
19108 
19109 
_wrap_Enquire_mset(int nargs,VALUE * args,VALUE self)19110 SWIGINTERN VALUE _wrap_Enquire_mset(int nargs, VALUE *args, VALUE self) {
19111   int argc;
19112   VALUE argv[7];
19113   int ii;
19114 
19115   argc = nargs + 1;
19116   argv[0] = self;
19117   if (argc > 7) SWIG_fail;
19118   for (ii = 1; (ii < argc); ++ii) {
19119     argv[ii] = args[ii-1];
19120   }
19121   if (argc == 3) {
19122     int _v;
19123     void *vptr = 0;
19124     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
19125     _v = SWIG_CheckState(res);
19126     if (_v) {
19127       {
19128         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
19129         _v = SWIG_CheckState(res);
19130       }
19131       if (_v) {
19132         {
19133           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
19134           _v = SWIG_CheckState(res);
19135         }
19136         if (_v) {
19137           return _wrap_Enquire_mset__SWIG_3(nargs, args, self);
19138         }
19139       }
19140     }
19141   }
19142   if (argc == 4) {
19143     int _v;
19144     void *vptr = 0;
19145     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
19146     _v = SWIG_CheckState(res);
19147     if (_v) {
19148       {
19149         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
19150         _v = SWIG_CheckState(res);
19151       }
19152       if (_v) {
19153         {
19154           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
19155           _v = SWIG_CheckState(res);
19156         }
19157         if (_v) {
19158           void *vptr = 0;
19159           int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
19160           _v = SWIG_CheckState(res);
19161           if (_v) {
19162             return _wrap_Enquire_mset__SWIG_5(nargs, args, self);
19163           }
19164         }
19165       }
19166     }
19167   }
19168   if (argc == 4) {
19169     int _v;
19170     void *vptr = 0;
19171     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
19172     _v = SWIG_CheckState(res);
19173     if (_v) {
19174       {
19175         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
19176         _v = SWIG_CheckState(res);
19177       }
19178       if (_v) {
19179         {
19180           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
19181           _v = SWIG_CheckState(res);
19182         }
19183         if (_v) {
19184           {
19185             int res = SWIG_AsVal_unsigned_SS_int(argv[3], NULL);
19186             _v = SWIG_CheckState(res);
19187           }
19188           if (_v) {
19189             return _wrap_Enquire_mset__SWIG_2(nargs, args, self);
19190           }
19191         }
19192       }
19193     }
19194   }
19195   if (argc == 5) {
19196     int _v;
19197     void *vptr = 0;
19198     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
19199     _v = SWIG_CheckState(res);
19200     if (_v) {
19201       {
19202         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
19203         _v = SWIG_CheckState(res);
19204       }
19205       if (_v) {
19206         {
19207           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
19208           _v = SWIG_CheckState(res);
19209         }
19210         if (_v) {
19211           void *vptr = 0;
19212           int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
19213           _v = SWIG_CheckState(res);
19214           if (_v) {
19215             void *vptr = 0;
19216             int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_Xapian__MatchDecider, 0);
19217             _v = SWIG_CheckState(res);
19218             if (_v) {
19219               return _wrap_Enquire_mset__SWIG_4(nargs, args, self);
19220             }
19221           }
19222         }
19223       }
19224     }
19225   }
19226   if (argc == 5) {
19227     int _v;
19228     void *vptr = 0;
19229     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
19230     _v = SWIG_CheckState(res);
19231     if (_v) {
19232       {
19233         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
19234         _v = SWIG_CheckState(res);
19235       }
19236       if (_v) {
19237         {
19238           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
19239           _v = SWIG_CheckState(res);
19240         }
19241         if (_v) {
19242           {
19243             int res = SWIG_AsVal_unsigned_SS_int(argv[3], NULL);
19244             _v = SWIG_CheckState(res);
19245           }
19246           if (_v) {
19247             void *vptr = 0;
19248             int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
19249             _v = SWIG_CheckState(res);
19250             if (_v) {
19251               return _wrap_Enquire_mset__SWIG_1(nargs, args, self);
19252             }
19253           }
19254         }
19255       }
19256     }
19257   }
19258   if (argc == 6) {
19259     int _v;
19260     void *vptr = 0;
19261     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
19262     _v = SWIG_CheckState(res);
19263     if (_v) {
19264       {
19265         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
19266         _v = SWIG_CheckState(res);
19267       }
19268       if (_v) {
19269         {
19270           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
19271           _v = SWIG_CheckState(res);
19272         }
19273         if (_v) {
19274           {
19275             int res = SWIG_AsVal_unsigned_SS_int(argv[3], NULL);
19276             _v = SWIG_CheckState(res);
19277           }
19278           if (_v) {
19279             void *vptr = 0;
19280             int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
19281             _v = SWIG_CheckState(res);
19282             if (_v) {
19283               void *vptr = 0;
19284               int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_Xapian__MatchDecider, 0);
19285               _v = SWIG_CheckState(res);
19286               if (_v) {
19287                 return _wrap_Enquire_mset__SWIG_0(nargs, args, self);
19288               }
19289             }
19290           }
19291         }
19292       }
19293     }
19294   }
19295 
19296 fail:
19297   Ruby_Format_OverloadedError( argc, 7, "Enquire.mset",
19298     "    Xapian::MSet Enquire.mset(Xapian::doccount first, Xapian::doccount maxitems, Xapian::doccount checkatleast, Xapian::RSet const *omrset, Xapian::MatchDecider const *mdecider)\n"
19299     "    Xapian::MSet Enquire.mset(Xapian::doccount first, Xapian::doccount maxitems, Xapian::doccount checkatleast, Xapian::RSet const *omrset)\n"
19300     "    Xapian::MSet Enquire.mset(Xapian::doccount first, Xapian::doccount maxitems, Xapian::doccount checkatleast)\n"
19301     "    Xapian::MSet Enquire.mset(Xapian::doccount first, Xapian::doccount maxitems)\n"
19302     "    Xapian::MSet Enquire.mset(Xapian::doccount first, Xapian::doccount maxitems, Xapian::RSet const *omrset, Xapian::MatchDecider const *mdecider)\n"
19303     "    Xapian::MSet Enquire.mset(Xapian::doccount first, Xapian::doccount maxitems, Xapian::RSet const *omrset)\n");
19304 
19305   return Qnil;
19306 }
19307 
19308 
19309 SWIGINTERN VALUE
_wrap_Enquire_eset__SWIG_0(int argc,VALUE * argv,VALUE self)19310 _wrap_Enquire_eset__SWIG_0(int argc, VALUE *argv, VALUE self) {
19311   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
19312   Xapian::termcount arg2 ;
19313   Xapian::RSet *arg3 = 0 ;
19314   int arg4 ;
19315   Xapian::ExpandDecider *arg5 = (Xapian::ExpandDecider *) 0 ;
19316   double arg6 ;
19317   void *argp1 = 0 ;
19318   int res1 = 0 ;
19319   unsigned int val2 ;
19320   int ecode2 = 0 ;
19321   void *argp3 ;
19322   int res3 = 0 ;
19323   int val4 ;
19324   int ecode4 = 0 ;
19325   void *argp5 = 0 ;
19326   int res5 = 0 ;
19327   double val6 ;
19328   int ecode6 = 0 ;
19329   Xapian::ESet result;
19330   VALUE vresult = Qnil;
19331 
19332   if ((argc < 5) || (argc > 5)) {
19333     rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
19334   }
19335   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
19336   if (!SWIG_IsOK(res1)) {
19337     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","get_eset", 1, self ));
19338   }
19339   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
19340   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
19341   if (!SWIG_IsOK(ecode2)) {
19342     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_eset", 2, argv[0] ));
19343   }
19344   arg2 = static_cast< Xapian::termcount >(val2);
19345   res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_Xapian__RSet,  0 );
19346   if (!SWIG_IsOK(res3)) {
19347     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::RSet const &","get_eset", 3, argv[1] ));
19348   }
19349   if (!argp3) {
19350     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::RSet const &","get_eset", 3, argv[1]));
19351   }
19352   arg3 = reinterpret_cast< Xapian::RSet * >(argp3);
19353   ecode4 = SWIG_AsVal_int(argv[2], &val4);
19354   if (!SWIG_IsOK(ecode4)) {
19355     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","get_eset", 4, argv[2] ));
19356   }
19357   arg4 = static_cast< int >(val4);
19358   res5 = SWIG_ConvertPtr(argv[3], &argp5,SWIGTYPE_p_Xapian__ExpandDecider, 0 |  0 );
19359   if (!SWIG_IsOK(res5)) {
19360     SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "Xapian::ExpandDecider const *","get_eset", 5, argv[3] ));
19361   }
19362   arg5 = reinterpret_cast< Xapian::ExpandDecider * >(argp5);
19363   ecode6 = SWIG_AsVal_double(argv[4], &val6);
19364   if (!SWIG_IsOK(ecode6)) {
19365     SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","get_eset", 6, argv[4] ));
19366   }
19367   arg6 = static_cast< double >(val6);
19368   {
19369     try {
19370       result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,(Xapian::ExpandDecider const *)arg5,arg6);
19371     } catch (...) {
19372       string msg;
19373       int code = XapianExceptionHandler(msg);
19374       SWIG_exception(code, msg.c_str());
19375     }
19376   }
19377   vresult = SWIG_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN |  0 );
19378   return vresult;
19379 fail:
19380   return Qnil;
19381 }
19382 
19383 
19384 SWIGINTERN VALUE
_wrap_Enquire_eset__SWIG_1(int argc,VALUE * argv,VALUE self)19385 _wrap_Enquire_eset__SWIG_1(int argc, VALUE *argv, VALUE self) {
19386   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
19387   Xapian::termcount arg2 ;
19388   Xapian::RSet *arg3 = 0 ;
19389   int arg4 ;
19390   Xapian::ExpandDecider *arg5 = (Xapian::ExpandDecider *) 0 ;
19391   void *argp1 = 0 ;
19392   int res1 = 0 ;
19393   unsigned int val2 ;
19394   int ecode2 = 0 ;
19395   void *argp3 ;
19396   int res3 = 0 ;
19397   int val4 ;
19398   int ecode4 = 0 ;
19399   void *argp5 = 0 ;
19400   int res5 = 0 ;
19401   Xapian::ESet result;
19402   VALUE vresult = Qnil;
19403 
19404   if ((argc < 4) || (argc > 4)) {
19405     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
19406   }
19407   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
19408   if (!SWIG_IsOK(res1)) {
19409     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","get_eset", 1, self ));
19410   }
19411   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
19412   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
19413   if (!SWIG_IsOK(ecode2)) {
19414     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_eset", 2, argv[0] ));
19415   }
19416   arg2 = static_cast< Xapian::termcount >(val2);
19417   res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_Xapian__RSet,  0 );
19418   if (!SWIG_IsOK(res3)) {
19419     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::RSet const &","get_eset", 3, argv[1] ));
19420   }
19421   if (!argp3) {
19422     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::RSet const &","get_eset", 3, argv[1]));
19423   }
19424   arg3 = reinterpret_cast< Xapian::RSet * >(argp3);
19425   ecode4 = SWIG_AsVal_int(argv[2], &val4);
19426   if (!SWIG_IsOK(ecode4)) {
19427     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","get_eset", 4, argv[2] ));
19428   }
19429   arg4 = static_cast< int >(val4);
19430   res5 = SWIG_ConvertPtr(argv[3], &argp5,SWIGTYPE_p_Xapian__ExpandDecider, 0 |  0 );
19431   if (!SWIG_IsOK(res5)) {
19432     SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "Xapian::ExpandDecider const *","get_eset", 5, argv[3] ));
19433   }
19434   arg5 = reinterpret_cast< Xapian::ExpandDecider * >(argp5);
19435   {
19436     try {
19437       result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,(Xapian::ExpandDecider const *)arg5);
19438     } catch (...) {
19439       string msg;
19440       int code = XapianExceptionHandler(msg);
19441       SWIG_exception(code, msg.c_str());
19442     }
19443   }
19444   vresult = SWIG_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN |  0 );
19445   return vresult;
19446 fail:
19447   return Qnil;
19448 }
19449 
19450 
19451 SWIGINTERN VALUE
_wrap_Enquire_eset__SWIG_2(int argc,VALUE * argv,VALUE self)19452 _wrap_Enquire_eset__SWIG_2(int argc, VALUE *argv, VALUE self) {
19453   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
19454   Xapian::termcount arg2 ;
19455   Xapian::RSet *arg3 = 0 ;
19456   int arg4 ;
19457   void *argp1 = 0 ;
19458   int res1 = 0 ;
19459   unsigned int val2 ;
19460   int ecode2 = 0 ;
19461   void *argp3 ;
19462   int res3 = 0 ;
19463   int val4 ;
19464   int ecode4 = 0 ;
19465   Xapian::ESet result;
19466   VALUE vresult = Qnil;
19467 
19468   if ((argc < 3) || (argc > 3)) {
19469     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
19470   }
19471   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
19472   if (!SWIG_IsOK(res1)) {
19473     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","get_eset", 1, self ));
19474   }
19475   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
19476   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
19477   if (!SWIG_IsOK(ecode2)) {
19478     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_eset", 2, argv[0] ));
19479   }
19480   arg2 = static_cast< Xapian::termcount >(val2);
19481   res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_Xapian__RSet,  0 );
19482   if (!SWIG_IsOK(res3)) {
19483     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::RSet const &","get_eset", 3, argv[1] ));
19484   }
19485   if (!argp3) {
19486     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::RSet const &","get_eset", 3, argv[1]));
19487   }
19488   arg3 = reinterpret_cast< Xapian::RSet * >(argp3);
19489   ecode4 = SWIG_AsVal_int(argv[2], &val4);
19490   if (!SWIG_IsOK(ecode4)) {
19491     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","get_eset", 4, argv[2] ));
19492   }
19493   arg4 = static_cast< int >(val4);
19494   {
19495     try {
19496       result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4);
19497     } catch (...) {
19498       string msg;
19499       int code = XapianExceptionHandler(msg);
19500       SWIG_exception(code, msg.c_str());
19501     }
19502   }
19503   vresult = SWIG_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN |  0 );
19504   return vresult;
19505 fail:
19506   return Qnil;
19507 }
19508 
19509 
19510 SWIGINTERN VALUE
_wrap_Enquire_eset__SWIG_3(int argc,VALUE * argv,VALUE self)19511 _wrap_Enquire_eset__SWIG_3(int argc, VALUE *argv, VALUE self) {
19512   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
19513   Xapian::termcount arg2 ;
19514   Xapian::RSet *arg3 = 0 ;
19515   void *argp1 = 0 ;
19516   int res1 = 0 ;
19517   unsigned int val2 ;
19518   int ecode2 = 0 ;
19519   void *argp3 ;
19520   int res3 = 0 ;
19521   Xapian::ESet result;
19522   VALUE vresult = Qnil;
19523 
19524   if ((argc < 2) || (argc > 2)) {
19525     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
19526   }
19527   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
19528   if (!SWIG_IsOK(res1)) {
19529     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","get_eset", 1, self ));
19530   }
19531   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
19532   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
19533   if (!SWIG_IsOK(ecode2)) {
19534     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_eset", 2, argv[0] ));
19535   }
19536   arg2 = static_cast< Xapian::termcount >(val2);
19537   res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_Xapian__RSet,  0 );
19538   if (!SWIG_IsOK(res3)) {
19539     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::RSet const &","get_eset", 3, argv[1] ));
19540   }
19541   if (!argp3) {
19542     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::RSet const &","get_eset", 3, argv[1]));
19543   }
19544   arg3 = reinterpret_cast< Xapian::RSet * >(argp3);
19545   {
19546     try {
19547       result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3);
19548     } catch (...) {
19549       string msg;
19550       int code = XapianExceptionHandler(msg);
19551       SWIG_exception(code, msg.c_str());
19552     }
19553   }
19554   vresult = SWIG_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN |  0 );
19555   return vresult;
19556 fail:
19557   return Qnil;
19558 }
19559 
19560 
19561 SWIGINTERN VALUE
_wrap_Enquire_eset__SWIG_4(int argc,VALUE * argv,VALUE self)19562 _wrap_Enquire_eset__SWIG_4(int argc, VALUE *argv, VALUE self) {
19563   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
19564   Xapian::termcount arg2 ;
19565   Xapian::RSet *arg3 = 0 ;
19566   Xapian::ExpandDecider *arg4 = (Xapian::ExpandDecider *) 0 ;
19567   void *argp1 = 0 ;
19568   int res1 = 0 ;
19569   unsigned int val2 ;
19570   int ecode2 = 0 ;
19571   void *argp3 ;
19572   int res3 = 0 ;
19573   void *argp4 = 0 ;
19574   int res4 = 0 ;
19575   Xapian::ESet result;
19576   VALUE vresult = Qnil;
19577 
19578   if ((argc < 3) || (argc > 3)) {
19579     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
19580   }
19581   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
19582   if (!SWIG_IsOK(res1)) {
19583     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","get_eset", 1, self ));
19584   }
19585   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
19586   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
19587   if (!SWIG_IsOK(ecode2)) {
19588     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_eset", 2, argv[0] ));
19589   }
19590   arg2 = static_cast< Xapian::termcount >(val2);
19591   res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_Xapian__RSet,  0 );
19592   if (!SWIG_IsOK(res3)) {
19593     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::RSet const &","get_eset", 3, argv[1] ));
19594   }
19595   if (!argp3) {
19596     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::RSet const &","get_eset", 3, argv[1]));
19597   }
19598   arg3 = reinterpret_cast< Xapian::RSet * >(argp3);
19599   res4 = SWIG_ConvertPtr(argv[2], &argp4,SWIGTYPE_p_Xapian__ExpandDecider, 0 |  0 );
19600   if (!SWIG_IsOK(res4)) {
19601     SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "Xapian::ExpandDecider const *","get_eset", 4, argv[2] ));
19602   }
19603   arg4 = reinterpret_cast< Xapian::ExpandDecider * >(argp4);
19604   {
19605     try {
19606       result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,(Xapian::ExpandDecider const *)arg4);
19607     } catch (...) {
19608       string msg;
19609       int code = XapianExceptionHandler(msg);
19610       SWIG_exception(code, msg.c_str());
19611     }
19612   }
19613   vresult = SWIG_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN |  0 );
19614   return vresult;
19615 fail:
19616   return Qnil;
19617 }
19618 
19619 
19620 SWIGINTERN VALUE
_wrap_Enquire_eset__SWIG_5(int argc,VALUE * argv,VALUE self)19621 _wrap_Enquire_eset__SWIG_5(int argc, VALUE *argv, VALUE self) {
19622   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
19623   Xapian::termcount arg2 ;
19624   Xapian::RSet *arg3 = 0 ;
19625   int arg4 ;
19626   double arg5 ;
19627   Xapian::ExpandDecider *arg6 = (Xapian::ExpandDecider *) 0 ;
19628   double arg7 ;
19629   void *argp1 = 0 ;
19630   int res1 = 0 ;
19631   unsigned int val2 ;
19632   int ecode2 = 0 ;
19633   void *argp3 ;
19634   int res3 = 0 ;
19635   int val4 ;
19636   int ecode4 = 0 ;
19637   double val5 ;
19638   int ecode5 = 0 ;
19639   void *argp6 = 0 ;
19640   int res6 = 0 ;
19641   double val7 ;
19642   int ecode7 = 0 ;
19643   Xapian::ESet result;
19644   VALUE vresult = Qnil;
19645 
19646   if ((argc < 6) || (argc > 6)) {
19647     rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
19648   }
19649   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
19650   if (!SWIG_IsOK(res1)) {
19651     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","get_eset", 1, self ));
19652   }
19653   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
19654   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
19655   if (!SWIG_IsOK(ecode2)) {
19656     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_eset", 2, argv[0] ));
19657   }
19658   arg2 = static_cast< Xapian::termcount >(val2);
19659   res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_Xapian__RSet,  0 );
19660   if (!SWIG_IsOK(res3)) {
19661     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::RSet const &","get_eset", 3, argv[1] ));
19662   }
19663   if (!argp3) {
19664     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::RSet const &","get_eset", 3, argv[1]));
19665   }
19666   arg3 = reinterpret_cast< Xapian::RSet * >(argp3);
19667   ecode4 = SWIG_AsVal_int(argv[2], &val4);
19668   if (!SWIG_IsOK(ecode4)) {
19669     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","get_eset", 4, argv[2] ));
19670   }
19671   arg4 = static_cast< int >(val4);
19672   ecode5 = SWIG_AsVal_double(argv[3], &val5);
19673   if (!SWIG_IsOK(ecode5)) {
19674     SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","get_eset", 5, argv[3] ));
19675   }
19676   arg5 = static_cast< double >(val5);
19677   res6 = SWIG_ConvertPtr(argv[4], &argp6,SWIGTYPE_p_Xapian__ExpandDecider, 0 |  0 );
19678   if (!SWIG_IsOK(res6)) {
19679     SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "Xapian::ExpandDecider const *","get_eset", 6, argv[4] ));
19680   }
19681   arg6 = reinterpret_cast< Xapian::ExpandDecider * >(argp6);
19682   ecode7 = SWIG_AsVal_double(argv[5], &val7);
19683   if (!SWIG_IsOK(ecode7)) {
19684     SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","get_eset", 7, argv[5] ));
19685   }
19686   arg7 = static_cast< double >(val7);
19687   {
19688     try {
19689       result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,arg5,(Xapian::ExpandDecider const *)arg6,arg7);
19690     } catch (...) {
19691       string msg;
19692       int code = XapianExceptionHandler(msg);
19693       SWIG_exception(code, msg.c_str());
19694     }
19695   }
19696   vresult = SWIG_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN |  0 );
19697   return vresult;
19698 fail:
19699   return Qnil;
19700 }
19701 
19702 
19703 SWIGINTERN VALUE
_wrap_Enquire_eset__SWIG_6(int argc,VALUE * argv,VALUE self)19704 _wrap_Enquire_eset__SWIG_6(int argc, VALUE *argv, VALUE self) {
19705   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
19706   Xapian::termcount arg2 ;
19707   Xapian::RSet *arg3 = 0 ;
19708   int arg4 ;
19709   double arg5 ;
19710   Xapian::ExpandDecider *arg6 = (Xapian::ExpandDecider *) 0 ;
19711   void *argp1 = 0 ;
19712   int res1 = 0 ;
19713   unsigned int val2 ;
19714   int ecode2 = 0 ;
19715   void *argp3 ;
19716   int res3 = 0 ;
19717   int val4 ;
19718   int ecode4 = 0 ;
19719   double val5 ;
19720   int ecode5 = 0 ;
19721   void *argp6 = 0 ;
19722   int res6 = 0 ;
19723   Xapian::ESet result;
19724   VALUE vresult = Qnil;
19725 
19726   if ((argc < 5) || (argc > 5)) {
19727     rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
19728   }
19729   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
19730   if (!SWIG_IsOK(res1)) {
19731     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","get_eset", 1, self ));
19732   }
19733   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
19734   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
19735   if (!SWIG_IsOK(ecode2)) {
19736     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_eset", 2, argv[0] ));
19737   }
19738   arg2 = static_cast< Xapian::termcount >(val2);
19739   res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_Xapian__RSet,  0 );
19740   if (!SWIG_IsOK(res3)) {
19741     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::RSet const &","get_eset", 3, argv[1] ));
19742   }
19743   if (!argp3) {
19744     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::RSet const &","get_eset", 3, argv[1]));
19745   }
19746   arg3 = reinterpret_cast< Xapian::RSet * >(argp3);
19747   ecode4 = SWIG_AsVal_int(argv[2], &val4);
19748   if (!SWIG_IsOK(ecode4)) {
19749     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","get_eset", 4, argv[2] ));
19750   }
19751   arg4 = static_cast< int >(val4);
19752   ecode5 = SWIG_AsVal_double(argv[3], &val5);
19753   if (!SWIG_IsOK(ecode5)) {
19754     SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","get_eset", 5, argv[3] ));
19755   }
19756   arg5 = static_cast< double >(val5);
19757   res6 = SWIG_ConvertPtr(argv[4], &argp6,SWIGTYPE_p_Xapian__ExpandDecider, 0 |  0 );
19758   if (!SWIG_IsOK(res6)) {
19759     SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "Xapian::ExpandDecider const *","get_eset", 6, argv[4] ));
19760   }
19761   arg6 = reinterpret_cast< Xapian::ExpandDecider * >(argp6);
19762   {
19763     try {
19764       result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,arg5,(Xapian::ExpandDecider const *)arg6);
19765     } catch (...) {
19766       string msg;
19767       int code = XapianExceptionHandler(msg);
19768       SWIG_exception(code, msg.c_str());
19769     }
19770   }
19771   vresult = SWIG_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN |  0 );
19772   return vresult;
19773 fail:
19774   return Qnil;
19775 }
19776 
19777 
19778 SWIGINTERN VALUE
_wrap_Enquire_eset__SWIG_7(int argc,VALUE * argv,VALUE self)19779 _wrap_Enquire_eset__SWIG_7(int argc, VALUE *argv, VALUE self) {
19780   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
19781   Xapian::termcount arg2 ;
19782   Xapian::RSet *arg3 = 0 ;
19783   int arg4 ;
19784   double arg5 ;
19785   void *argp1 = 0 ;
19786   int res1 = 0 ;
19787   unsigned int val2 ;
19788   int ecode2 = 0 ;
19789   void *argp3 ;
19790   int res3 = 0 ;
19791   int val4 ;
19792   int ecode4 = 0 ;
19793   double val5 ;
19794   int ecode5 = 0 ;
19795   Xapian::ESet result;
19796   VALUE vresult = Qnil;
19797 
19798   if ((argc < 4) || (argc > 4)) {
19799     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
19800   }
19801   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
19802   if (!SWIG_IsOK(res1)) {
19803     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","get_eset", 1, self ));
19804   }
19805   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
19806   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
19807   if (!SWIG_IsOK(ecode2)) {
19808     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_eset", 2, argv[0] ));
19809   }
19810   arg2 = static_cast< Xapian::termcount >(val2);
19811   res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_Xapian__RSet,  0 );
19812   if (!SWIG_IsOK(res3)) {
19813     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::RSet const &","get_eset", 3, argv[1] ));
19814   }
19815   if (!argp3) {
19816     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::RSet const &","get_eset", 3, argv[1]));
19817   }
19818   arg3 = reinterpret_cast< Xapian::RSet * >(argp3);
19819   ecode4 = SWIG_AsVal_int(argv[2], &val4);
19820   if (!SWIG_IsOK(ecode4)) {
19821     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","get_eset", 4, argv[2] ));
19822   }
19823   arg4 = static_cast< int >(val4);
19824   ecode5 = SWIG_AsVal_double(argv[3], &val5);
19825   if (!SWIG_IsOK(ecode5)) {
19826     SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","get_eset", 5, argv[3] ));
19827   }
19828   arg5 = static_cast< double >(val5);
19829   {
19830     try {
19831       result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,arg5);
19832     } catch (...) {
19833       string msg;
19834       int code = XapianExceptionHandler(msg);
19835       SWIG_exception(code, msg.c_str());
19836     }
19837   }
19838   vresult = SWIG_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN |  0 );
19839   return vresult;
19840 fail:
19841   return Qnil;
19842 }
19843 
19844 
_wrap_Enquire_eset(int nargs,VALUE * args,VALUE self)19845 SWIGINTERN VALUE _wrap_Enquire_eset(int nargs, VALUE *args, VALUE self) {
19846   int argc;
19847   VALUE argv[8];
19848   int ii;
19849 
19850   argc = nargs + 1;
19851   argv[0] = self;
19852   if (argc > 8) SWIG_fail;
19853   for (ii = 1; (ii < argc); ++ii) {
19854     argv[ii] = args[ii-1];
19855   }
19856   if (argc == 3) {
19857     int _v;
19858     void *vptr = 0;
19859     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
19860     _v = SWIG_CheckState(res);
19861     if (_v) {
19862       {
19863         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
19864         _v = SWIG_CheckState(res);
19865       }
19866       if (_v) {
19867         void *vptr = 0;
19868         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
19869         _v = SWIG_CheckState(res);
19870         if (_v) {
19871           return _wrap_Enquire_eset__SWIG_3(nargs, args, self);
19872         }
19873       }
19874     }
19875   }
19876   if (argc == 4) {
19877     int _v;
19878     void *vptr = 0;
19879     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
19880     _v = SWIG_CheckState(res);
19881     if (_v) {
19882       {
19883         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
19884         _v = SWIG_CheckState(res);
19885       }
19886       if (_v) {
19887         void *vptr = 0;
19888         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
19889         _v = SWIG_CheckState(res);
19890         if (_v) {
19891           void *vptr = 0;
19892           int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_Xapian__ExpandDecider, 0);
19893           _v = SWIG_CheckState(res);
19894           if (_v) {
19895             return _wrap_Enquire_eset__SWIG_4(nargs, args, self);
19896           }
19897         }
19898       }
19899     }
19900   }
19901   if (argc == 4) {
19902     int _v;
19903     void *vptr = 0;
19904     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
19905     _v = SWIG_CheckState(res);
19906     if (_v) {
19907       {
19908         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
19909         _v = SWIG_CheckState(res);
19910       }
19911       if (_v) {
19912         void *vptr = 0;
19913         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
19914         _v = SWIG_CheckState(res);
19915         if (_v) {
19916           {
19917             int res = SWIG_AsVal_int(argv[3], NULL);
19918             _v = SWIG_CheckState(res);
19919           }
19920           if (_v) {
19921             return _wrap_Enquire_eset__SWIG_2(nargs, args, self);
19922           }
19923         }
19924       }
19925     }
19926   }
19927   if (argc == 5) {
19928     int _v;
19929     void *vptr = 0;
19930     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
19931     _v = SWIG_CheckState(res);
19932     if (_v) {
19933       {
19934         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
19935         _v = SWIG_CheckState(res);
19936       }
19937       if (_v) {
19938         void *vptr = 0;
19939         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
19940         _v = SWIG_CheckState(res);
19941         if (_v) {
19942           {
19943             int res = SWIG_AsVal_int(argv[3], NULL);
19944             _v = SWIG_CheckState(res);
19945           }
19946           if (_v) {
19947             void *vptr = 0;
19948             int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_Xapian__ExpandDecider, 0);
19949             _v = SWIG_CheckState(res);
19950             if (_v) {
19951               return _wrap_Enquire_eset__SWIG_1(nargs, args, self);
19952             }
19953           }
19954         }
19955       }
19956     }
19957   }
19958   if (argc == 5) {
19959     int _v;
19960     void *vptr = 0;
19961     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
19962     _v = SWIG_CheckState(res);
19963     if (_v) {
19964       {
19965         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
19966         _v = SWIG_CheckState(res);
19967       }
19968       if (_v) {
19969         void *vptr = 0;
19970         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
19971         _v = SWIG_CheckState(res);
19972         if (_v) {
19973           {
19974             int res = SWIG_AsVal_int(argv[3], NULL);
19975             _v = SWIG_CheckState(res);
19976           }
19977           if (_v) {
19978             {
19979               int res = SWIG_AsVal_double(argv[4], NULL);
19980               _v = SWIG_CheckState(res);
19981             }
19982             if (_v) {
19983               return _wrap_Enquire_eset__SWIG_7(nargs, args, self);
19984             }
19985           }
19986         }
19987       }
19988     }
19989   }
19990   if (argc == 6) {
19991     int _v;
19992     void *vptr = 0;
19993     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
19994     _v = SWIG_CheckState(res);
19995     if (_v) {
19996       {
19997         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
19998         _v = SWIG_CheckState(res);
19999       }
20000       if (_v) {
20001         void *vptr = 0;
20002         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
20003         _v = SWIG_CheckState(res);
20004         if (_v) {
20005           {
20006             int res = SWIG_AsVal_int(argv[3], NULL);
20007             _v = SWIG_CheckState(res);
20008           }
20009           if (_v) {
20010             void *vptr = 0;
20011             int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_Xapian__ExpandDecider, 0);
20012             _v = SWIG_CheckState(res);
20013             if (_v) {
20014               {
20015                 int res = SWIG_AsVal_double(argv[5], NULL);
20016                 _v = SWIG_CheckState(res);
20017               }
20018               if (_v) {
20019                 return _wrap_Enquire_eset__SWIG_0(nargs, args, self);
20020               }
20021             }
20022           }
20023         }
20024       }
20025     }
20026   }
20027   if (argc == 6) {
20028     int _v;
20029     void *vptr = 0;
20030     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
20031     _v = SWIG_CheckState(res);
20032     if (_v) {
20033       {
20034         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
20035         _v = SWIG_CheckState(res);
20036       }
20037       if (_v) {
20038         void *vptr = 0;
20039         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
20040         _v = SWIG_CheckState(res);
20041         if (_v) {
20042           {
20043             int res = SWIG_AsVal_int(argv[3], NULL);
20044             _v = SWIG_CheckState(res);
20045           }
20046           if (_v) {
20047             {
20048               int res = SWIG_AsVal_double(argv[4], NULL);
20049               _v = SWIG_CheckState(res);
20050             }
20051             if (_v) {
20052               void *vptr = 0;
20053               int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_Xapian__ExpandDecider, 0);
20054               _v = SWIG_CheckState(res);
20055               if (_v) {
20056                 return _wrap_Enquire_eset__SWIG_6(nargs, args, self);
20057               }
20058             }
20059           }
20060         }
20061       }
20062     }
20063   }
20064   if (argc == 7) {
20065     int _v;
20066     void *vptr = 0;
20067     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
20068     _v = SWIG_CheckState(res);
20069     if (_v) {
20070       {
20071         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
20072         _v = SWIG_CheckState(res);
20073       }
20074       if (_v) {
20075         void *vptr = 0;
20076         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
20077         _v = SWIG_CheckState(res);
20078         if (_v) {
20079           {
20080             int res = SWIG_AsVal_int(argv[3], NULL);
20081             _v = SWIG_CheckState(res);
20082           }
20083           if (_v) {
20084             {
20085               int res = SWIG_AsVal_double(argv[4], NULL);
20086               _v = SWIG_CheckState(res);
20087             }
20088             if (_v) {
20089               void *vptr = 0;
20090               int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_Xapian__ExpandDecider, 0);
20091               _v = SWIG_CheckState(res);
20092               if (_v) {
20093                 {
20094                   int res = SWIG_AsVal_double(argv[6], NULL);
20095                   _v = SWIG_CheckState(res);
20096                 }
20097                 if (_v) {
20098                   return _wrap_Enquire_eset__SWIG_5(nargs, args, self);
20099                 }
20100               }
20101             }
20102           }
20103         }
20104       }
20105     }
20106   }
20107 
20108 fail:
20109   Ruby_Format_OverloadedError( argc, 8, "Enquire.eset",
20110     "    Xapian::ESet Enquire.eset(Xapian::termcount maxitems, Xapian::RSet const &omrset, int flags, Xapian::ExpandDecider const *edecider, double min_wt)\n"
20111     "    Xapian::ESet Enquire.eset(Xapian::termcount maxitems, Xapian::RSet const &omrset, int flags, Xapian::ExpandDecider const *edecider)\n"
20112     "    Xapian::ESet Enquire.eset(Xapian::termcount maxitems, Xapian::RSet const &omrset, int flags)\n"
20113     "    Xapian::ESet Enquire.eset(Xapian::termcount maxitems, Xapian::RSet const &omrset)\n"
20114     "    Xapian::ESet Enquire.eset(Xapian::termcount maxitems, Xapian::RSet const &omrset, Xapian::ExpandDecider const *edecider)\n"
20115     "    Xapian::ESet Enquire.eset(Xapian::termcount maxitems, Xapian::RSet const &rset, int flags, double k, Xapian::ExpandDecider const *edecider, double min_wt)\n"
20116     "    Xapian::ESet Enquire.eset(Xapian::termcount maxitems, Xapian::RSet const &rset, int flags, double k, Xapian::ExpandDecider const *edecider)\n"
20117     "    Xapian::ESet Enquire.eset(Xapian::termcount maxitems, Xapian::RSet const &rset, int flags, double k)\n");
20118 
20119   return Qnil;
20120 }
20121 
20122 
20123 SWIGINTERN VALUE
_wrap_Enquire__dangerous_matching_terms_begin__SWIG_0(int argc,VALUE * argv,VALUE self)20124 _wrap_Enquire__dangerous_matching_terms_begin__SWIG_0(int argc, VALUE *argv, VALUE self) {
20125   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
20126   Xapian::docid arg2 ;
20127   void *argp1 = 0 ;
20128   int res1 = 0 ;
20129   unsigned int val2 ;
20130   int ecode2 = 0 ;
20131   Xapian::TermIterator result;
20132   VALUE vresult = Qnil;
20133 
20134   if ((argc < 1) || (argc > 1)) {
20135     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
20136   }
20137   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
20138   if (!SWIG_IsOK(res1)) {
20139     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","get_matching_terms_begin", 1, self ));
20140   }
20141   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
20142   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
20143   if (!SWIG_IsOK(ecode2)) {
20144     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","get_matching_terms_begin", 2, argv[0] ));
20145   }
20146   arg2 = static_cast< Xapian::docid >(val2);
20147   {
20148     try {
20149       result = ((Xapian::Enquire const *)arg1)->get_matching_terms_begin(arg2);
20150     } catch (...) {
20151       string msg;
20152       int code = XapianExceptionHandler(msg);
20153       SWIG_exception(code, msg.c_str());
20154     }
20155   }
20156   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
20157   return vresult;
20158 fail:
20159   return Qnil;
20160 }
20161 
20162 
20163 SWIGINTERN VALUE
_wrap_Enquire__dangerous_matching_terms_end__SWIG_0(int argc,VALUE * argv,VALUE self)20164 _wrap_Enquire__dangerous_matching_terms_end__SWIG_0(int argc, VALUE *argv, VALUE self) {
20165   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
20166   Xapian::docid arg2 ;
20167   void *argp1 = 0 ;
20168   int res1 = 0 ;
20169   unsigned int val2 ;
20170   int ecode2 = 0 ;
20171   Xapian::TermIterator result;
20172   VALUE vresult = Qnil;
20173 
20174   if ((argc < 1) || (argc > 1)) {
20175     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
20176   }
20177   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
20178   if (!SWIG_IsOK(res1)) {
20179     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","get_matching_terms_end", 1, self ));
20180   }
20181   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
20182   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
20183   if (!SWIG_IsOK(ecode2)) {
20184     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","get_matching_terms_end", 2, argv[0] ));
20185   }
20186   arg2 = static_cast< Xapian::docid >(val2);
20187   result = ((Xapian::Enquire const *)arg1)->get_matching_terms_end(arg2);
20188   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
20189   return vresult;
20190 fail:
20191   return Qnil;
20192 }
20193 
20194 
20195 SWIGINTERN VALUE
_wrap_Enquire__dangerous_matching_terms_begin__SWIG_1(int argc,VALUE * argv,VALUE self)20196 _wrap_Enquire__dangerous_matching_terms_begin__SWIG_1(int argc, VALUE *argv, VALUE self) {
20197   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
20198   Xapian::MSetIterator *arg2 = 0 ;
20199   void *argp1 = 0 ;
20200   int res1 = 0 ;
20201   void *argp2 ;
20202   int res2 = 0 ;
20203   Xapian::TermIterator result;
20204   VALUE vresult = Qnil;
20205 
20206   if ((argc < 1) || (argc > 1)) {
20207     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
20208   }
20209   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
20210   if (!SWIG_IsOK(res1)) {
20211     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","get_matching_terms_begin", 1, self ));
20212   }
20213   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
20214   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
20215   if (!SWIG_IsOK(res2)) {
20216     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","get_matching_terms_begin", 2, argv[0] ));
20217   }
20218   if (!argp2) {
20219     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","get_matching_terms_begin", 2, argv[0]));
20220   }
20221   arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
20222   {
20223     try {
20224       result = ((Xapian::Enquire const *)arg1)->get_matching_terms_begin((Xapian::MSetIterator const &)*arg2);
20225     } catch (...) {
20226       string msg;
20227       int code = XapianExceptionHandler(msg);
20228       SWIG_exception(code, msg.c_str());
20229     }
20230   }
20231   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
20232   return vresult;
20233 fail:
20234   return Qnil;
20235 }
20236 
20237 
_wrap_Enquire__dangerous_matching_terms_begin(int nargs,VALUE * args,VALUE self)20238 SWIGINTERN VALUE _wrap_Enquire__dangerous_matching_terms_begin(int nargs, VALUE *args, VALUE self) {
20239   int argc;
20240   VALUE argv[3];
20241   int ii;
20242 
20243   argc = nargs + 1;
20244   argv[0] = self;
20245   if (argc > 3) SWIG_fail;
20246   for (ii = 1; (ii < argc); ++ii) {
20247     argv[ii] = args[ii-1];
20248   }
20249   if (argc == 2) {
20250     int _v;
20251     void *vptr = 0;
20252     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
20253     _v = SWIG_CheckState(res);
20254     if (_v) {
20255       void *vptr = 0;
20256       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
20257       _v = SWIG_CheckState(res);
20258       if (_v) {
20259         return _wrap_Enquire__dangerous_matching_terms_begin__SWIG_1(nargs, args, self);
20260       }
20261     }
20262   }
20263   if (argc == 2) {
20264     int _v;
20265     void *vptr = 0;
20266     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
20267     _v = SWIG_CheckState(res);
20268     if (_v) {
20269       {
20270         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
20271         _v = SWIG_CheckState(res);
20272       }
20273       if (_v) {
20274         return _wrap_Enquire__dangerous_matching_terms_begin__SWIG_0(nargs, args, self);
20275       }
20276     }
20277   }
20278 
20279 fail:
20280   Ruby_Format_OverloadedError( argc, 3, "Enquire._dangerous_matching_terms_begin",
20281     "    Xapian::TermIterator Enquire._dangerous_matching_terms_begin(Xapian::docid did)\n"
20282     "    Xapian::TermIterator Enquire._dangerous_matching_terms_begin(Xapian::MSetIterator const &it)\n");
20283 
20284   return Qnil;
20285 }
20286 
20287 
20288 SWIGINTERN VALUE
_wrap_Enquire__dangerous_matching_terms_end__SWIG_1(int argc,VALUE * argv,VALUE self)20289 _wrap_Enquire__dangerous_matching_terms_end__SWIG_1(int argc, VALUE *argv, VALUE self) {
20290   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
20291   Xapian::MSetIterator *arg2 = 0 ;
20292   void *argp1 = 0 ;
20293   int res1 = 0 ;
20294   void *argp2 ;
20295   int res2 = 0 ;
20296   Xapian::TermIterator result;
20297   VALUE vresult = Qnil;
20298 
20299   if ((argc < 1) || (argc > 1)) {
20300     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
20301   }
20302   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
20303   if (!SWIG_IsOK(res1)) {
20304     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","get_matching_terms_end", 1, self ));
20305   }
20306   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
20307   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
20308   if (!SWIG_IsOK(res2)) {
20309     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::MSetIterator const &","get_matching_terms_end", 2, argv[0] ));
20310   }
20311   if (!argp2) {
20312     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::MSetIterator const &","get_matching_terms_end", 2, argv[0]));
20313   }
20314   arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
20315   result = ((Xapian::Enquire const *)arg1)->get_matching_terms_end((Xapian::MSetIterator const &)*arg2);
20316   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
20317   return vresult;
20318 fail:
20319   return Qnil;
20320 }
20321 
20322 
_wrap_Enquire__dangerous_matching_terms_end(int nargs,VALUE * args,VALUE self)20323 SWIGINTERN VALUE _wrap_Enquire__dangerous_matching_terms_end(int nargs, VALUE *args, VALUE self) {
20324   int argc;
20325   VALUE argv[3];
20326   int ii;
20327 
20328   argc = nargs + 1;
20329   argv[0] = self;
20330   if (argc > 3) SWIG_fail;
20331   for (ii = 1; (ii < argc); ++ii) {
20332     argv[ii] = args[ii-1];
20333   }
20334   if (argc == 2) {
20335     int _v;
20336     void *vptr = 0;
20337     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
20338     _v = SWIG_CheckState(res);
20339     if (_v) {
20340       void *vptr = 0;
20341       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
20342       _v = SWIG_CheckState(res);
20343       if (_v) {
20344         return _wrap_Enquire__dangerous_matching_terms_end__SWIG_1(nargs, args, self);
20345       }
20346     }
20347   }
20348   if (argc == 2) {
20349     int _v;
20350     void *vptr = 0;
20351     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
20352     _v = SWIG_CheckState(res);
20353     if (_v) {
20354       {
20355         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
20356         _v = SWIG_CheckState(res);
20357       }
20358       if (_v) {
20359         return _wrap_Enquire__dangerous_matching_terms_end__SWIG_0(nargs, args, self);
20360       }
20361     }
20362   }
20363 
20364 fail:
20365   Ruby_Format_OverloadedError( argc, 3, "Enquire._dangerous_matching_terms_end",
20366     "    Xapian::TermIterator Enquire._dangerous_matching_terms_end(Xapian::docid)\n"
20367     "    Xapian::TermIterator Enquire._dangerous_matching_terms_end(Xapian::MSetIterator const &)\n");
20368 
20369   return Qnil;
20370 }
20371 
20372 
20373 SWIGINTERN VALUE
_wrap_Enquire_description(int argc,VALUE * argv,VALUE self)20374 _wrap_Enquire_description(int argc, VALUE *argv, VALUE self) {
20375   Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
20376   void *argp1 = 0 ;
20377   int res1 = 0 ;
20378   std::string result;
20379   VALUE vresult = Qnil;
20380 
20381   if ((argc < 0) || (argc > 0)) {
20382     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
20383   }
20384   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
20385   if (!SWIG_IsOK(res1)) {
20386     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Enquire const *","get_description", 1, self ));
20387   }
20388   arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
20389   {
20390     try {
20391       result = ((Xapian::Enquire const *)arg1)->get_description();
20392     } catch (...) {
20393       string msg;
20394       int code = XapianExceptionHandler(msg);
20395       SWIG_exception(code, msg.c_str());
20396     }
20397   }
20398   vresult = SWIG_From_std_string(static_cast< std::string >(result));
20399   return vresult;
20400 fail:
20401   return Qnil;
20402 }
20403 
20404 
20405 static swig_class SwigClassExpandDecider;
20406 
20407 SWIGINTERN VALUE
20408 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_ExpandDecider_allocate(VALUE self)20409 _wrap_ExpandDecider_allocate(VALUE self)
20410 #else
20411 _wrap_ExpandDecider_allocate(int argc, VALUE *argv, VALUE self)
20412 #endif
20413 {
20414   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__ExpandDecider);
20415 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
20416   rb_obj_call_init(vresult, argc, argv);
20417 #endif
20418   return vresult;
20419 }
20420 
20421 
20422 SWIGINTERN VALUE
_wrap_new_ExpandDecider(int argc,VALUE * argv,VALUE self)20423 _wrap_new_ExpandDecider(int argc, VALUE *argv, VALUE self) {
20424   VALUE arg1 = (VALUE) 0 ;
20425   const char *classname SWIGUNUSED = "Xapian::ExpandDecider";
20426   Xapian::ExpandDecider *result = 0 ;
20427 
20428   if ((argc < 0) || (argc > 0)) {
20429     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
20430   }
20431   arg1 = self;
20432   {
20433     try {
20434       if ( strcmp(rb_obj_classname(self), classname) != 0 ) {
20435         /* subclassed */
20436         result = (Xapian::ExpandDecider *)new SwigDirector_ExpandDecider(arg1);
20437       } else {
20438         rb_raise(rb_eNameError,"accessing abstract class or protected constructor");
20439         return Qnil;
20440       }
20441 
20442       DATA_PTR(self) = result;
20443     } catch (...) {
20444       string msg;
20445       int code = XapianExceptionHandler(msg);
20446       SWIG_exception(code, msg.c_str());
20447     }
20448   }
20449   return self;
20450 fail:
20451   return Qnil;
20452 }
20453 
20454 
20455 SWIGINTERN VALUE
_wrap_ExpandDecider___call__(int argc,VALUE * argv,VALUE self)20456 _wrap_ExpandDecider___call__(int argc, VALUE *argv, VALUE self) {
20457   Xapian::ExpandDecider *arg1 = (Xapian::ExpandDecider *) 0 ;
20458   std::string *arg2 = 0 ;
20459   void *argp1 = 0 ;
20460   int res1 = 0 ;
20461   int res2 = SWIG_OLDOBJ ;
20462   Swig::Director *director = 0;
20463   bool upcall = false;
20464   bool result;
20465   VALUE vresult = Qnil;
20466 
20467   if ((argc < 1) || (argc > 1)) {
20468     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
20469   }
20470   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ExpandDecider, 0 |  0 );
20471   if (!SWIG_IsOK(res1)) {
20472     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ExpandDecider const *","operator ()", 1, self ));
20473   }
20474   arg1 = reinterpret_cast< Xapian::ExpandDecider * >(argp1);
20475   {
20476     std::string *ptr = (std::string *)0;
20477     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
20478     if (!SWIG_IsOK(res2)) {
20479       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","operator ()", 2, argv[0] ));
20480     }
20481     if (!ptr) {
20482       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","operator ()", 2, argv[0]));
20483     }
20484     arg2 = ptr;
20485   }
20486   director = dynamic_cast<Swig::Director *>(arg1);
20487   upcall = (director && (director->swig_get_self() == self));
20488   try {
20489     {
20490       try {
20491         if (upcall) {
20492           Swig::DirectorPureVirtualException::raise("Xapian::ExpandDecider::operator ()");
20493         } else {
20494           result = (bool)((Xapian::ExpandDecider const *)arg1)->operator ()((std::string const &)*arg2);
20495         }
20496       } catch (...) {
20497         string msg;
20498         int code = XapianExceptionHandler(msg);
20499         SWIG_exception(code, msg.c_str());
20500       }
20501     }
20502   } catch (Swig::DirectorException& e) {
20503     rb_exc_raise(e.getError());
20504     SWIG_fail;
20505   }
20506   vresult = SWIG_From_bool(static_cast< bool >(result));
20507   if (SWIG_IsNewObj(res2)) delete arg2;
20508   return vresult;
20509 fail:
20510   if (SWIG_IsNewObj(res2)) delete arg2;
20511   return Qnil;
20512 }
20513 
20514 
20515 SWIGINTERN void
free_Xapian_ExpandDecider(void * self)20516 free_Xapian_ExpandDecider(void *self) {
20517     Xapian::ExpandDecider *arg1 = (Xapian::ExpandDecider *)self;
20518     delete arg1;
20519 }
20520 
20521 SWIGINTERN VALUE
_wrap_ExpandDecider_release(int argc,VALUE * argv,VALUE self)20522 _wrap_ExpandDecider_release(int argc, VALUE *argv, VALUE self) {
20523   Xapian::ExpandDecider *arg1 = (Xapian::ExpandDecider *) 0 ;
20524   void *argp1 = 0 ;
20525   int res1 = 0 ;
20526   Swig::Director *director = 0;
20527   Xapian::ExpandDecider *result = 0 ;
20528   VALUE vresult = Qnil;
20529 
20530   if ((argc < 0) || (argc > 0)) {
20531     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
20532   }
20533   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ExpandDecider, 0 |  0 );
20534   if (!SWIG_IsOK(res1)) {
20535     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ExpandDecider const *","release", 1, self ));
20536   }
20537   arg1 = reinterpret_cast< Xapian::ExpandDecider * >(argp1);
20538   {
20539     try {
20540       result = (Xapian::ExpandDecider *)((Xapian::ExpandDecider const *)arg1)->release();
20541     } catch (...) {
20542       string msg;
20543       int code = XapianExceptionHandler(msg);
20544       SWIG_exception(code, msg.c_str());
20545     }
20546   }
20547   director = dynamic_cast<Swig::Director *>(result);
20548   if (director) {
20549     vresult = director->swig_get_self();
20550   } else {
20551     vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ExpandDecider, 0 |  0 );
20552   }
20553   return vresult;
20554 fail:
20555   return Qnil;
20556 }
20557 
20558 
20559 SWIGINTERN VALUE
_wrap_disown_ExpandDecider(int argc,VALUE * argv,VALUE self)20560 _wrap_disown_ExpandDecider(int argc, VALUE *argv, VALUE self) {
20561   Xapian::ExpandDecider *arg1 = (Xapian::ExpandDecider *) 0 ;
20562   void *argp1 = 0 ;
20563   int res1 = 0 ;
20564 
20565   if ((argc < 1) || (argc > 1)) {
20566     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
20567   }
20568   res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Xapian__ExpandDecider, 0 |  0 );
20569   if (!SWIG_IsOK(res1)) {
20570     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ExpandDecider *","disown_ExpandDecider", 1, argv[0] ));
20571   }
20572   arg1 = reinterpret_cast< Xapian::ExpandDecider * >(argp1);
20573   {
20574     Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
20575     if (director) director->swig_disown();
20576   }
20577 
20578   return Qnil;
20579 fail:
20580   return Qnil;
20581 }
20582 
20583 
20584 static swig_class SwigClassExpandDeciderAnd;
20585 
20586 SWIGINTERN VALUE
20587 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_ExpandDeciderAnd_allocate(VALUE self)20588 _wrap_ExpandDeciderAnd_allocate(VALUE self)
20589 #else
20590 _wrap_ExpandDeciderAnd_allocate(int argc, VALUE *argv, VALUE self)
20591 #endif
20592 {
20593   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__ExpandDeciderAnd);
20594 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
20595   rb_obj_call_init(vresult, argc, argv);
20596 #endif
20597   return vresult;
20598 }
20599 
20600 
20601 SWIGINTERN VALUE
_wrap_new_ExpandDeciderAnd(int argc,VALUE * argv,VALUE self)20602 _wrap_new_ExpandDeciderAnd(int argc, VALUE *argv, VALUE self) {
20603   Xapian::ExpandDecider *arg1 = 0 ;
20604   Xapian::ExpandDecider *arg2 = 0 ;
20605   void *argp1 ;
20606   int res1 = 0 ;
20607   void *argp2 ;
20608   int res2 = 0 ;
20609   const char *classname SWIGUNUSED = "Xapian::ExpandDeciderAnd";
20610   Xapian::ExpandDeciderAnd *result = 0 ;
20611 
20612   if ((argc < 2) || (argc > 2)) {
20613     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
20614   }
20615   res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Xapian__ExpandDecider,  0 );
20616   if (!SWIG_IsOK(res1)) {
20617     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ExpandDecider const &","ExpandDeciderAnd", 1, argv[0] ));
20618   }
20619   if (!argp1) {
20620     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::ExpandDecider const &","ExpandDeciderAnd", 1, argv[0]));
20621   }
20622   arg1 = reinterpret_cast< Xapian::ExpandDecider * >(argp1);
20623   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__ExpandDecider,  0 );
20624   if (!SWIG_IsOK(res2)) {
20625     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::ExpandDecider const &","ExpandDeciderAnd", 2, argv[1] ));
20626   }
20627   if (!argp2) {
20628     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::ExpandDecider const &","ExpandDeciderAnd", 2, argv[1]));
20629   }
20630   arg2 = reinterpret_cast< Xapian::ExpandDecider * >(argp2);
20631   {
20632     try {
20633       result = (Xapian::ExpandDeciderAnd *)new Xapian::ExpandDeciderAnd((Xapian::ExpandDecider const &)*arg1,(Xapian::ExpandDecider const &)*arg2);
20634       DATA_PTR(self) = result;
20635     } catch (...) {
20636       string msg;
20637       int code = XapianExceptionHandler(msg);
20638       SWIG_exception(code, msg.c_str());
20639     }
20640   }
20641   return self;
20642 fail:
20643   return Qnil;
20644 }
20645 
20646 
20647 SWIGINTERN VALUE
_wrap_ExpandDeciderAnd___call__(int argc,VALUE * argv,VALUE self)20648 _wrap_ExpandDeciderAnd___call__(int argc, VALUE *argv, VALUE self) {
20649   Xapian::ExpandDeciderAnd *arg1 = (Xapian::ExpandDeciderAnd *) 0 ;
20650   std::string *arg2 = 0 ;
20651   void *argp1 = 0 ;
20652   int res1 = 0 ;
20653   int res2 = SWIG_OLDOBJ ;
20654   bool result;
20655   VALUE vresult = Qnil;
20656 
20657   if ((argc < 1) || (argc > 1)) {
20658     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
20659   }
20660   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ExpandDeciderAnd, 0 |  0 );
20661   if (!SWIG_IsOK(res1)) {
20662     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ExpandDeciderAnd const *","operator ()", 1, self ));
20663   }
20664   arg1 = reinterpret_cast< Xapian::ExpandDeciderAnd * >(argp1);
20665   {
20666     std::string *ptr = (std::string *)0;
20667     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
20668     if (!SWIG_IsOK(res2)) {
20669       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","operator ()", 2, argv[0] ));
20670     }
20671     if (!ptr) {
20672       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","operator ()", 2, argv[0]));
20673     }
20674     arg2 = ptr;
20675   }
20676   {
20677     try {
20678       result = (bool)((Xapian::ExpandDeciderAnd const *)arg1)->operator ()((std::string const &)*arg2);
20679     } catch (...) {
20680       string msg;
20681       int code = XapianExceptionHandler(msg);
20682       SWIG_exception(code, msg.c_str());
20683     }
20684   }
20685   vresult = SWIG_From_bool(static_cast< bool >(result));
20686   if (SWIG_IsNewObj(res2)) delete arg2;
20687   return vresult;
20688 fail:
20689   if (SWIG_IsNewObj(res2)) delete arg2;
20690   return Qnil;
20691 }
20692 
20693 
20694 SWIGINTERN void
free_Xapian_ExpandDeciderAnd(void * self)20695 free_Xapian_ExpandDeciderAnd(void *self) {
20696     Xapian::ExpandDeciderAnd *arg1 = (Xapian::ExpandDeciderAnd *)self;
20697     delete arg1;
20698 }
20699 
20700 static swig_class SwigClassExpandDeciderFilterPrefix;
20701 
20702 SWIGINTERN VALUE
20703 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_ExpandDeciderFilterPrefix_allocate(VALUE self)20704 _wrap_ExpandDeciderFilterPrefix_allocate(VALUE self)
20705 #else
20706 _wrap_ExpandDeciderFilterPrefix_allocate(int argc, VALUE *argv, VALUE self)
20707 #endif
20708 {
20709   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__ExpandDeciderFilterPrefix);
20710 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
20711   rb_obj_call_init(vresult, argc, argv);
20712 #endif
20713   return vresult;
20714 }
20715 
20716 
20717 SWIGINTERN VALUE
_wrap_new_ExpandDeciderFilterPrefix(int argc,VALUE * argv,VALUE self)20718 _wrap_new_ExpandDeciderFilterPrefix(int argc, VALUE *argv, VALUE self) {
20719   std::string *arg1 = 0 ;
20720   int res1 = SWIG_OLDOBJ ;
20721   const char *classname SWIGUNUSED = "Xapian::ExpandDeciderFilterPrefix";
20722   Xapian::ExpandDeciderFilterPrefix *result = 0 ;
20723 
20724   if ((argc < 1) || (argc > 1)) {
20725     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
20726   }
20727   {
20728     std::string *ptr = (std::string *)0;
20729     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
20730     if (!SWIG_IsOK(res1)) {
20731       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","ExpandDeciderFilterPrefix", 1, argv[0] ));
20732     }
20733     if (!ptr) {
20734       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","ExpandDeciderFilterPrefix", 1, argv[0]));
20735     }
20736     arg1 = ptr;
20737   }
20738   {
20739     try {
20740       result = (Xapian::ExpandDeciderFilterPrefix *)new Xapian::ExpandDeciderFilterPrefix((std::string const &)*arg1);
20741       DATA_PTR(self) = result;
20742     } catch (...) {
20743       string msg;
20744       int code = XapianExceptionHandler(msg);
20745       SWIG_exception(code, msg.c_str());
20746     }
20747   }
20748   if (SWIG_IsNewObj(res1)) delete arg1;
20749   return self;
20750 fail:
20751   if (SWIG_IsNewObj(res1)) delete arg1;
20752   return Qnil;
20753 }
20754 
20755 
20756 SWIGINTERN VALUE
_wrap_ExpandDeciderFilterPrefix___call__(int argc,VALUE * argv,VALUE self)20757 _wrap_ExpandDeciderFilterPrefix___call__(int argc, VALUE *argv, VALUE self) {
20758   Xapian::ExpandDeciderFilterPrefix *arg1 = (Xapian::ExpandDeciderFilterPrefix *) 0 ;
20759   std::string *arg2 = 0 ;
20760   void *argp1 = 0 ;
20761   int res1 = 0 ;
20762   int res2 = SWIG_OLDOBJ ;
20763   bool result;
20764   VALUE vresult = Qnil;
20765 
20766   if ((argc < 1) || (argc > 1)) {
20767     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
20768   }
20769   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ExpandDeciderFilterPrefix, 0 |  0 );
20770   if (!SWIG_IsOK(res1)) {
20771     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ExpandDeciderFilterPrefix const *","operator ()", 1, self ));
20772   }
20773   arg1 = reinterpret_cast< Xapian::ExpandDeciderFilterPrefix * >(argp1);
20774   {
20775     std::string *ptr = (std::string *)0;
20776     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
20777     if (!SWIG_IsOK(res2)) {
20778       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","operator ()", 2, argv[0] ));
20779     }
20780     if (!ptr) {
20781       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","operator ()", 2, argv[0]));
20782     }
20783     arg2 = ptr;
20784   }
20785   {
20786     try {
20787       result = (bool)((Xapian::ExpandDeciderFilterPrefix const *)arg1)->operator ()((std::string const &)*arg2);
20788     } catch (...) {
20789       string msg;
20790       int code = XapianExceptionHandler(msg);
20791       SWIG_exception(code, msg.c_str());
20792     }
20793   }
20794   vresult = SWIG_From_bool(static_cast< bool >(result));
20795   if (SWIG_IsNewObj(res2)) delete arg2;
20796   return vresult;
20797 fail:
20798   if (SWIG_IsNewObj(res2)) delete arg2;
20799   return Qnil;
20800 }
20801 
20802 
20803 SWIGINTERN void
free_Xapian_ExpandDeciderFilterPrefix(void * self)20804 free_Xapian_ExpandDeciderFilterPrefix(void *self) {
20805     Xapian::ExpandDeciderFilterPrefix *arg1 = (Xapian::ExpandDeciderFilterPrefix *)self;
20806     delete arg1;
20807 }
20808 
20809 static swig_class SwigClassKeyMaker;
20810 
20811 SWIGINTERN VALUE
20812 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_KeyMaker_allocate(VALUE self)20813 _wrap_KeyMaker_allocate(VALUE self)
20814 #else
20815 _wrap_KeyMaker_allocate(int argc, VALUE *argv, VALUE self)
20816 #endif
20817 {
20818   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__KeyMaker);
20819 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
20820   rb_obj_call_init(vresult, argc, argv);
20821 #endif
20822   return vresult;
20823 }
20824 
20825 
20826 SWIGINTERN VALUE
_wrap_new_KeyMaker(int argc,VALUE * argv,VALUE self)20827 _wrap_new_KeyMaker(int argc, VALUE *argv, VALUE self) {
20828   VALUE arg1 = (VALUE) 0 ;
20829   const char *classname SWIGUNUSED = "Xapian::KeyMaker";
20830   Xapian::KeyMaker *result = 0 ;
20831 
20832   if ((argc < 0) || (argc > 0)) {
20833     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
20834   }
20835   arg1 = self;
20836   {
20837     try {
20838       if ( strcmp(rb_obj_classname(self), classname) != 0 ) {
20839         /* subclassed */
20840         result = (Xapian::KeyMaker *)new SwigDirector_KeyMaker(arg1);
20841       } else {
20842         rb_raise(rb_eNameError,"accessing abstract class or protected constructor");
20843         return Qnil;
20844       }
20845 
20846       DATA_PTR(self) = result;
20847     } catch (...) {
20848       string msg;
20849       int code = XapianExceptionHandler(msg);
20850       SWIG_exception(code, msg.c_str());
20851     }
20852   }
20853   return self;
20854 fail:
20855   return Qnil;
20856 }
20857 
20858 
20859 SWIGINTERN VALUE
_wrap_KeyMaker___call__(int argc,VALUE * argv,VALUE self)20860 _wrap_KeyMaker___call__(int argc, VALUE *argv, VALUE self) {
20861   Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ;
20862   Xapian::Document *arg2 = 0 ;
20863   void *argp1 = 0 ;
20864   int res1 = 0 ;
20865   void *argp2 ;
20866   int res2 = 0 ;
20867   Swig::Director *director = 0;
20868   bool upcall = false;
20869   std::string result;
20870   VALUE vresult = Qnil;
20871 
20872   if ((argc < 1) || (argc > 1)) {
20873     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
20874   }
20875   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__KeyMaker, 0 |  0 );
20876   if (!SWIG_IsOK(res1)) {
20877     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::KeyMaker const *","operator ()", 1, self ));
20878   }
20879   arg1 = reinterpret_cast< Xapian::KeyMaker * >(argp1);
20880   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Document,  0 );
20881   if (!SWIG_IsOK(res2)) {
20882     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Document const &","operator ()", 2, argv[0] ));
20883   }
20884   if (!argp2) {
20885     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Document const &","operator ()", 2, argv[0]));
20886   }
20887   arg2 = reinterpret_cast< Xapian::Document * >(argp2);
20888   director = dynamic_cast<Swig::Director *>(arg1);
20889   upcall = (director && (director->swig_get_self() == self));
20890   try {
20891     {
20892       try {
20893         if (upcall) {
20894           Swig::DirectorPureVirtualException::raise("Xapian::KeyMaker::operator ()");
20895         } else {
20896           result = ((Xapian::KeyMaker const *)arg1)->operator ()((Xapian::Document const &)*arg2);
20897         }
20898       } catch (...) {
20899         string msg;
20900         int code = XapianExceptionHandler(msg);
20901         SWIG_exception(code, msg.c_str());
20902       }
20903     }
20904   } catch (Swig::DirectorException& e) {
20905     rb_exc_raise(e.getError());
20906     SWIG_fail;
20907   }
20908   vresult = SWIG_From_std_string(static_cast< std::string >(result));
20909   return vresult;
20910 fail:
20911   return Qnil;
20912 }
20913 
20914 
20915 SWIGINTERN void
free_Xapian_KeyMaker(void * self)20916 free_Xapian_KeyMaker(void *self) {
20917     Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *)self;
20918     delete arg1;
20919 }
20920 
20921 SWIGINTERN VALUE
_wrap_KeyMaker_release(int argc,VALUE * argv,VALUE self)20922 _wrap_KeyMaker_release(int argc, VALUE *argv, VALUE self) {
20923   Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ;
20924   void *argp1 = 0 ;
20925   int res1 = 0 ;
20926   Swig::Director *director = 0;
20927   Xapian::KeyMaker *result = 0 ;
20928   VALUE vresult = Qnil;
20929 
20930   if ((argc < 0) || (argc > 0)) {
20931     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
20932   }
20933   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__KeyMaker, 0 |  0 );
20934   if (!SWIG_IsOK(res1)) {
20935     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::KeyMaker const *","release", 1, self ));
20936   }
20937   arg1 = reinterpret_cast< Xapian::KeyMaker * >(argp1);
20938   {
20939     try {
20940       result = (Xapian::KeyMaker *)((Xapian::KeyMaker const *)arg1)->release();
20941     } catch (...) {
20942       string msg;
20943       int code = XapianExceptionHandler(msg);
20944       SWIG_exception(code, msg.c_str());
20945     }
20946   }
20947   director = dynamic_cast<Swig::Director *>(result);
20948   if (director) {
20949     vresult = director->swig_get_self();
20950   } else {
20951     vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__KeyMaker, 0 |  0 );
20952   }
20953   return vresult;
20954 fail:
20955   return Qnil;
20956 }
20957 
20958 
20959 SWIGINTERN VALUE
_wrap_disown_KeyMaker(int argc,VALUE * argv,VALUE self)20960 _wrap_disown_KeyMaker(int argc, VALUE *argv, VALUE self) {
20961   Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ;
20962   void *argp1 = 0 ;
20963   int res1 = 0 ;
20964 
20965   if ((argc < 1) || (argc > 1)) {
20966     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
20967   }
20968   res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Xapian__KeyMaker, 0 |  0 );
20969   if (!SWIG_IsOK(res1)) {
20970     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::KeyMaker *","disown_KeyMaker", 1, argv[0] ));
20971   }
20972   arg1 = reinterpret_cast< Xapian::KeyMaker * >(argp1);
20973   {
20974     Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
20975     if (director) director->swig_disown();
20976   }
20977 
20978   return Qnil;
20979 fail:
20980   return Qnil;
20981 }
20982 
20983 
20984 static swig_class SwigClassMultiValueKeyMaker;
20985 
20986 SWIGINTERN VALUE
20987 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_MultiValueKeyMaker_allocate(VALUE self)20988 _wrap_MultiValueKeyMaker_allocate(VALUE self)
20989 #else
20990 _wrap_MultiValueKeyMaker_allocate(int argc, VALUE *argv, VALUE self)
20991 #endif
20992 {
20993   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__MultiValueKeyMaker);
20994 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
20995   rb_obj_call_init(vresult, argc, argv);
20996 #endif
20997   return vresult;
20998 }
20999 
21000 
21001 SWIGINTERN VALUE
_wrap_new_MultiValueKeyMaker(int argc,VALUE * argv,VALUE self)21002 _wrap_new_MultiValueKeyMaker(int argc, VALUE *argv, VALUE self) {
21003   const char *classname SWIGUNUSED = "Xapian::MultiValueKeyMaker";
21004   Xapian::MultiValueKeyMaker *result = 0 ;
21005 
21006   if ((argc < 0) || (argc > 0)) {
21007     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
21008   }
21009   {
21010     try {
21011       result = (Xapian::MultiValueKeyMaker *)new Xapian::MultiValueKeyMaker();
21012       DATA_PTR(self) = result;
21013     } catch (...) {
21014       string msg;
21015       int code = XapianExceptionHandler(msg);
21016       SWIG_exception(code, msg.c_str());
21017     }
21018   }
21019   return self;
21020 fail:
21021   return Qnil;
21022 }
21023 
21024 
21025 SWIGINTERN VALUE
_wrap_MultiValueKeyMaker___call__(int argc,VALUE * argv,VALUE self)21026 _wrap_MultiValueKeyMaker___call__(int argc, VALUE *argv, VALUE self) {
21027   Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
21028   Xapian::Document *arg2 = 0 ;
21029   void *argp1 = 0 ;
21030   int res1 = 0 ;
21031   void *argp2 ;
21032   int res2 = 0 ;
21033   std::string result;
21034   VALUE vresult = Qnil;
21035 
21036   if ((argc < 1) || (argc > 1)) {
21037     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
21038   }
21039   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0 |  0 );
21040   if (!SWIG_IsOK(res1)) {
21041     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MultiValueKeyMaker const *","operator ()", 1, self ));
21042   }
21043   arg1 = reinterpret_cast< Xapian::MultiValueKeyMaker * >(argp1);
21044   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Document,  0 );
21045   if (!SWIG_IsOK(res2)) {
21046     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Document const &","operator ()", 2, argv[0] ));
21047   }
21048   if (!argp2) {
21049     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Document const &","operator ()", 2, argv[0]));
21050   }
21051   arg2 = reinterpret_cast< Xapian::Document * >(argp2);
21052   {
21053     try {
21054       result = ((Xapian::MultiValueKeyMaker const *)arg1)->operator ()((Xapian::Document const &)*arg2);
21055     } catch (...) {
21056       string msg;
21057       int code = XapianExceptionHandler(msg);
21058       SWIG_exception(code, msg.c_str());
21059     }
21060   }
21061   vresult = SWIG_From_std_string(static_cast< std::string >(result));
21062   return vresult;
21063 fail:
21064   return Qnil;
21065 }
21066 
21067 
21068 SWIGINTERN VALUE
_wrap_MultiValueKeyMaker_add_value__SWIG_0(int argc,VALUE * argv,VALUE self)21069 _wrap_MultiValueKeyMaker_add_value__SWIG_0(int argc, VALUE *argv, VALUE self) {
21070   Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
21071   Xapian::valueno arg2 ;
21072   bool arg3 ;
21073   std::string *arg4 = 0 ;
21074   void *argp1 = 0 ;
21075   int res1 = 0 ;
21076   unsigned int val2 ;
21077   int ecode2 = 0 ;
21078   bool val3 ;
21079   int ecode3 = 0 ;
21080   int res4 = SWIG_OLDOBJ ;
21081 
21082   if ((argc < 3) || (argc > 3)) {
21083     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
21084   }
21085   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0 |  0 );
21086   if (!SWIG_IsOK(res1)) {
21087     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MultiValueKeyMaker *","add_value", 1, self ));
21088   }
21089   arg1 = reinterpret_cast< Xapian::MultiValueKeyMaker * >(argp1);
21090   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
21091   if (!SWIG_IsOK(ecode2)) {
21092     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","add_value", 2, argv[0] ));
21093   }
21094   arg2 = static_cast< Xapian::valueno >(val2);
21095   ecode3 = SWIG_AsVal_bool(argv[1], &val3);
21096   if (!SWIG_IsOK(ecode3)) {
21097     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","add_value", 3, argv[1] ));
21098   }
21099   arg3 = static_cast< bool >(val3);
21100   {
21101     std::string *ptr = (std::string *)0;
21102     res4 = SWIG_AsPtr_std_string(argv[2], &ptr);
21103     if (!SWIG_IsOK(res4)) {
21104       SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "std::string const &","add_value", 4, argv[2] ));
21105     }
21106     if (!ptr) {
21107       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_value", 4, argv[2]));
21108     }
21109     arg4 = ptr;
21110   }
21111   {
21112     try {
21113       (arg1)->add_value(arg2,arg3,(std::string const &)*arg4);
21114     } catch (...) {
21115       string msg;
21116       int code = XapianExceptionHandler(msg);
21117       SWIG_exception(code, msg.c_str());
21118     }
21119   }
21120   if (SWIG_IsNewObj(res4)) delete arg4;
21121   return Qnil;
21122 fail:
21123   if (SWIG_IsNewObj(res4)) delete arg4;
21124   return Qnil;
21125 }
21126 
21127 
21128 SWIGINTERN VALUE
_wrap_MultiValueKeyMaker_add_value__SWIG_1(int argc,VALUE * argv,VALUE self)21129 _wrap_MultiValueKeyMaker_add_value__SWIG_1(int argc, VALUE *argv, VALUE self) {
21130   Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
21131   Xapian::valueno arg2 ;
21132   bool arg3 ;
21133   void *argp1 = 0 ;
21134   int res1 = 0 ;
21135   unsigned int val2 ;
21136   int ecode2 = 0 ;
21137   bool val3 ;
21138   int ecode3 = 0 ;
21139 
21140   if ((argc < 2) || (argc > 2)) {
21141     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
21142   }
21143   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0 |  0 );
21144   if (!SWIG_IsOK(res1)) {
21145     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MultiValueKeyMaker *","add_value", 1, self ));
21146   }
21147   arg1 = reinterpret_cast< Xapian::MultiValueKeyMaker * >(argp1);
21148   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
21149   if (!SWIG_IsOK(ecode2)) {
21150     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","add_value", 2, argv[0] ));
21151   }
21152   arg2 = static_cast< Xapian::valueno >(val2);
21153   ecode3 = SWIG_AsVal_bool(argv[1], &val3);
21154   if (!SWIG_IsOK(ecode3)) {
21155     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","add_value", 3, argv[1] ));
21156   }
21157   arg3 = static_cast< bool >(val3);
21158   {
21159     try {
21160       (arg1)->add_value(arg2,arg3);
21161     } catch (...) {
21162       string msg;
21163       int code = XapianExceptionHandler(msg);
21164       SWIG_exception(code, msg.c_str());
21165     }
21166   }
21167   return Qnil;
21168 fail:
21169   return Qnil;
21170 }
21171 
21172 
21173 SWIGINTERN VALUE
_wrap_MultiValueKeyMaker_add_value__SWIG_2(int argc,VALUE * argv,VALUE self)21174 _wrap_MultiValueKeyMaker_add_value__SWIG_2(int argc, VALUE *argv, VALUE self) {
21175   Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
21176   Xapian::valueno arg2 ;
21177   void *argp1 = 0 ;
21178   int res1 = 0 ;
21179   unsigned int val2 ;
21180   int ecode2 = 0 ;
21181 
21182   if ((argc < 1) || (argc > 1)) {
21183     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
21184   }
21185   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0 |  0 );
21186   if (!SWIG_IsOK(res1)) {
21187     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MultiValueKeyMaker *","add_value", 1, self ));
21188   }
21189   arg1 = reinterpret_cast< Xapian::MultiValueKeyMaker * >(argp1);
21190   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
21191   if (!SWIG_IsOK(ecode2)) {
21192     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","add_value", 2, argv[0] ));
21193   }
21194   arg2 = static_cast< Xapian::valueno >(val2);
21195   {
21196     try {
21197       (arg1)->add_value(arg2);
21198     } catch (...) {
21199       string msg;
21200       int code = XapianExceptionHandler(msg);
21201       SWIG_exception(code, msg.c_str());
21202     }
21203   }
21204   return Qnil;
21205 fail:
21206   return Qnil;
21207 }
21208 
21209 
_wrap_MultiValueKeyMaker_add_value(int nargs,VALUE * args,VALUE self)21210 SWIGINTERN VALUE _wrap_MultiValueKeyMaker_add_value(int nargs, VALUE *args, VALUE self) {
21211   int argc;
21212   VALUE argv[5];
21213   int ii;
21214 
21215   argc = nargs + 1;
21216   argv[0] = self;
21217   if (argc > 5) SWIG_fail;
21218   for (ii = 1; (ii < argc); ++ii) {
21219     argv[ii] = args[ii-1];
21220   }
21221   if (argc == 2) {
21222     int _v;
21223     void *vptr = 0;
21224     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0);
21225     _v = SWIG_CheckState(res);
21226     if (_v) {
21227       {
21228         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
21229         _v = SWIG_CheckState(res);
21230       }
21231       if (_v) {
21232         return _wrap_MultiValueKeyMaker_add_value__SWIG_2(nargs, args, self);
21233       }
21234     }
21235   }
21236   if (argc == 3) {
21237     int _v;
21238     void *vptr = 0;
21239     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0);
21240     _v = SWIG_CheckState(res);
21241     if (_v) {
21242       {
21243         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
21244         _v = SWIG_CheckState(res);
21245       }
21246       if (_v) {
21247         {
21248           int res = SWIG_AsVal_bool(argv[2], NULL);
21249           _v = SWIG_CheckState(res);
21250         }
21251         if (_v) {
21252           return _wrap_MultiValueKeyMaker_add_value__SWIG_1(nargs, args, self);
21253         }
21254       }
21255     }
21256   }
21257   if (argc == 4) {
21258     int _v;
21259     void *vptr = 0;
21260     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0);
21261     _v = SWIG_CheckState(res);
21262     if (_v) {
21263       {
21264         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
21265         _v = SWIG_CheckState(res);
21266       }
21267       if (_v) {
21268         {
21269           int res = SWIG_AsVal_bool(argv[2], NULL);
21270           _v = SWIG_CheckState(res);
21271         }
21272         if (_v) {
21273           int res = SWIG_AsPtr_std_string(argv[3], (std::string**)(0));
21274           _v = SWIG_CheckState(res);
21275           if (_v) {
21276             return _wrap_MultiValueKeyMaker_add_value__SWIG_0(nargs, args, self);
21277           }
21278         }
21279       }
21280     }
21281   }
21282 
21283 fail:
21284   Ruby_Format_OverloadedError( argc, 5, "MultiValueKeyMaker.add_value",
21285     "    void MultiValueKeyMaker.add_value(Xapian::valueno slot, bool reverse, std::string const &defvalue)\n"
21286     "    void MultiValueKeyMaker.add_value(Xapian::valueno slot, bool reverse)\n"
21287     "    void MultiValueKeyMaker.add_value(Xapian::valueno slot)\n");
21288 
21289   return Qnil;
21290 }
21291 
21292 
21293 SWIGINTERN void
free_Xapian_MultiValueKeyMaker(void * self)21294 free_Xapian_MultiValueKeyMaker(void *self) {
21295     Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *)self;
21296     delete arg1;
21297 }
21298 
21299 static swig_class SwigClassStopper;
21300 
21301 SWIGINTERN VALUE
21302 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_Stopper_allocate(VALUE self)21303 _wrap_Stopper_allocate(VALUE self)
21304 #else
21305 _wrap_Stopper_allocate(int argc, VALUE *argv, VALUE self)
21306 #endif
21307 {
21308   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__Stopper);
21309 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
21310   rb_obj_call_init(vresult, argc, argv);
21311 #endif
21312   return vresult;
21313 }
21314 
21315 
21316 SWIGINTERN VALUE
_wrap_new_Stopper(int argc,VALUE * argv,VALUE self)21317 _wrap_new_Stopper(int argc, VALUE *argv, VALUE self) {
21318   VALUE arg1 = (VALUE) 0 ;
21319   const char *classname SWIGUNUSED = "Xapian::Stopper";
21320   Xapian::Stopper *result = 0 ;
21321 
21322   if ((argc < 0) || (argc > 0)) {
21323     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
21324   }
21325   arg1 = self;
21326   {
21327     try {
21328       if ( strcmp(rb_obj_classname(self), classname) != 0 ) {
21329         /* subclassed */
21330         result = (Xapian::Stopper *)new SwigDirector_Stopper(arg1);
21331       } else {
21332         rb_raise(rb_eNameError,"accessing abstract class or protected constructor");
21333         return Qnil;
21334       }
21335 
21336       DATA_PTR(self) = result;
21337     } catch (...) {
21338       string msg;
21339       int code = XapianExceptionHandler(msg);
21340       SWIG_exception(code, msg.c_str());
21341     }
21342   }
21343   return self;
21344 fail:
21345   return Qnil;
21346 }
21347 
21348 
21349 SWIGINTERN VALUE
_wrap_Stopper___call__(int argc,VALUE * argv,VALUE self)21350 _wrap_Stopper___call__(int argc, VALUE *argv, VALUE self) {
21351   Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
21352   std::string *arg2 = 0 ;
21353   void *argp1 = 0 ;
21354   int res1 = 0 ;
21355   int res2 = SWIG_OLDOBJ ;
21356   Swig::Director *director = 0;
21357   bool upcall = false;
21358   bool result;
21359   VALUE vresult = Qnil;
21360 
21361   if ((argc < 1) || (argc > 1)) {
21362     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
21363   }
21364   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Stopper, 0 |  0 );
21365   if (!SWIG_IsOK(res1)) {
21366     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Stopper const *","operator ()", 1, self ));
21367   }
21368   arg1 = reinterpret_cast< Xapian::Stopper * >(argp1);
21369   {
21370     std::string *ptr = (std::string *)0;
21371     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
21372     if (!SWIG_IsOK(res2)) {
21373       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","operator ()", 2, argv[0] ));
21374     }
21375     if (!ptr) {
21376       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","operator ()", 2, argv[0]));
21377     }
21378     arg2 = ptr;
21379   }
21380   director = dynamic_cast<Swig::Director *>(arg1);
21381   upcall = (director && (director->swig_get_self() == self));
21382   try {
21383     {
21384       try {
21385         if (upcall) {
21386           Swig::DirectorPureVirtualException::raise("Xapian::Stopper::operator ()");
21387         } else {
21388           result = (bool)((Xapian::Stopper const *)arg1)->operator ()((std::string const &)*arg2);
21389         }
21390       } catch (...) {
21391         string msg;
21392         int code = XapianExceptionHandler(msg);
21393         SWIG_exception(code, msg.c_str());
21394       }
21395     }
21396   } catch (Swig::DirectorException& e) {
21397     rb_exc_raise(e.getError());
21398     SWIG_fail;
21399   }
21400   vresult = SWIG_From_bool(static_cast< bool >(result));
21401   if (SWIG_IsNewObj(res2)) delete arg2;
21402   return vresult;
21403 fail:
21404   if (SWIG_IsNewObj(res2)) delete arg2;
21405   return Qnil;
21406 }
21407 
21408 
21409 SWIGINTERN void
free_Xapian_Stopper(void * self)21410 free_Xapian_Stopper(void *self) {
21411     Xapian::Stopper *arg1 = (Xapian::Stopper *)self;
21412     delete arg1;
21413 }
21414 
21415 SWIGINTERN VALUE
_wrap_Stopper_description(int argc,VALUE * argv,VALUE self)21416 _wrap_Stopper_description(int argc, VALUE *argv, VALUE self) {
21417   Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
21418   void *argp1 = 0 ;
21419   int res1 = 0 ;
21420   Swig::Director *director = 0;
21421   bool upcall = false;
21422   std::string result;
21423   VALUE vresult = Qnil;
21424 
21425   if ((argc < 0) || (argc > 0)) {
21426     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
21427   }
21428   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Stopper, 0 |  0 );
21429   if (!SWIG_IsOK(res1)) {
21430     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Stopper const *","get_description", 1, self ));
21431   }
21432   arg1 = reinterpret_cast< Xapian::Stopper * >(argp1);
21433   director = dynamic_cast<Swig::Director *>(arg1);
21434   upcall = (director && (director->swig_get_self() == self));
21435   try {
21436     {
21437       try {
21438         if (upcall) {
21439           result = ((Xapian::Stopper const *)arg1)->Xapian::Stopper::get_description();
21440         } else {
21441           result = ((Xapian::Stopper const *)arg1)->get_description();
21442         }
21443       } catch (...) {
21444         string msg;
21445         int code = XapianExceptionHandler(msg);
21446         SWIG_exception(code, msg.c_str());
21447       }
21448     }
21449   } catch (Swig::DirectorException& e) {
21450     rb_exc_raise(e.getError());
21451     SWIG_fail;
21452   }
21453   vresult = SWIG_From_std_string(static_cast< std::string >(result));
21454   return vresult;
21455 fail:
21456   return Qnil;
21457 }
21458 
21459 
21460 SWIGINTERN VALUE
_wrap_Stopper_release(int argc,VALUE * argv,VALUE self)21461 _wrap_Stopper_release(int argc, VALUE *argv, VALUE self) {
21462   Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
21463   void *argp1 = 0 ;
21464   int res1 = 0 ;
21465   Swig::Director *director = 0;
21466   Xapian::Stopper *result = 0 ;
21467   VALUE vresult = Qnil;
21468 
21469   if ((argc < 0) || (argc > 0)) {
21470     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
21471   }
21472   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Stopper, 0 |  0 );
21473   if (!SWIG_IsOK(res1)) {
21474     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Stopper const *","release", 1, self ));
21475   }
21476   arg1 = reinterpret_cast< Xapian::Stopper * >(argp1);
21477   {
21478     try {
21479       result = (Xapian::Stopper *)((Xapian::Stopper const *)arg1)->release();
21480     } catch (...) {
21481       string msg;
21482       int code = XapianExceptionHandler(msg);
21483       SWIG_exception(code, msg.c_str());
21484     }
21485   }
21486   director = dynamic_cast<Swig::Director *>(result);
21487   if (director) {
21488     vresult = director->swig_get_self();
21489   } else {
21490     vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Stopper, 0 |  0 );
21491   }
21492   return vresult;
21493 fail:
21494   return Qnil;
21495 }
21496 
21497 
21498 SWIGINTERN VALUE
_wrap_disown_Stopper(int argc,VALUE * argv,VALUE self)21499 _wrap_disown_Stopper(int argc, VALUE *argv, VALUE self) {
21500   Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
21501   void *argp1 = 0 ;
21502   int res1 = 0 ;
21503 
21504   if ((argc < 1) || (argc > 1)) {
21505     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
21506   }
21507   res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Xapian__Stopper, 0 |  0 );
21508   if (!SWIG_IsOK(res1)) {
21509     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Stopper *","disown_Stopper", 1, argv[0] ));
21510   }
21511   arg1 = reinterpret_cast< Xapian::Stopper * >(argp1);
21512   {
21513     Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
21514     if (director) director->swig_disown();
21515   }
21516 
21517   return Qnil;
21518 fail:
21519   return Qnil;
21520 }
21521 
21522 
21523 static swig_class SwigClassSimpleStopper;
21524 
21525 SWIGINTERN VALUE
_wrap_new_SimpleStopper__SWIG_0(int argc,VALUE * argv,VALUE self)21526 _wrap_new_SimpleStopper__SWIG_0(int argc, VALUE *argv, VALUE self) {
21527   const char *classname SWIGUNUSED = "Xapian::SimpleStopper";
21528   Xapian::SimpleStopper *result = 0 ;
21529 
21530   if ((argc < 0) || (argc > 0)) {
21531     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
21532   }
21533   {
21534     try {
21535       result = (Xapian::SimpleStopper *)new Xapian::SimpleStopper();
21536       DATA_PTR(self) = result;
21537     } catch (...) {
21538       string msg;
21539       int code = XapianExceptionHandler(msg);
21540       SWIG_exception(code, msg.c_str());
21541     }
21542   }
21543   return self;
21544 fail:
21545   return Qnil;
21546 }
21547 
21548 
21549 SWIGINTERN VALUE
_wrap_SimpleStopper_add(int argc,VALUE * argv,VALUE self)21550 _wrap_SimpleStopper_add(int argc, VALUE *argv, VALUE self) {
21551   Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
21552   std::string *arg2 = 0 ;
21553   void *argp1 = 0 ;
21554   int res1 = 0 ;
21555   int res2 = SWIG_OLDOBJ ;
21556 
21557   if ((argc < 1) || (argc > 1)) {
21558     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
21559   }
21560   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__SimpleStopper, 0 |  0 );
21561   if (!SWIG_IsOK(res1)) {
21562     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::SimpleStopper *","add", 1, self ));
21563   }
21564   arg1 = reinterpret_cast< Xapian::SimpleStopper * >(argp1);
21565   {
21566     std::string *ptr = (std::string *)0;
21567     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
21568     if (!SWIG_IsOK(res2)) {
21569       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","add", 2, argv[0] ));
21570     }
21571     if (!ptr) {
21572       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add", 2, argv[0]));
21573     }
21574     arg2 = ptr;
21575   }
21576   {
21577     try {
21578       (arg1)->add((std::string const &)*arg2);
21579     } catch (...) {
21580       string msg;
21581       int code = XapianExceptionHandler(msg);
21582       SWIG_exception(code, msg.c_str());
21583     }
21584   }
21585   if (SWIG_IsNewObj(res2)) delete arg2;
21586   return Qnil;
21587 fail:
21588   if (SWIG_IsNewObj(res2)) delete arg2;
21589   return Qnil;
21590 }
21591 
21592 
21593 SWIGINTERN VALUE
_wrap_SimpleStopper___call__(int argc,VALUE * argv,VALUE self)21594 _wrap_SimpleStopper___call__(int argc, VALUE *argv, VALUE self) {
21595   Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
21596   std::string *arg2 = 0 ;
21597   void *argp1 = 0 ;
21598   int res1 = 0 ;
21599   int res2 = SWIG_OLDOBJ ;
21600   bool result;
21601   VALUE vresult = Qnil;
21602 
21603   if ((argc < 1) || (argc > 1)) {
21604     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
21605   }
21606   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__SimpleStopper, 0 |  0 );
21607   if (!SWIG_IsOK(res1)) {
21608     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::SimpleStopper const *","operator ()", 1, self ));
21609   }
21610   arg1 = reinterpret_cast< Xapian::SimpleStopper * >(argp1);
21611   {
21612     std::string *ptr = (std::string *)0;
21613     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
21614     if (!SWIG_IsOK(res2)) {
21615       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","operator ()", 2, argv[0] ));
21616     }
21617     if (!ptr) {
21618       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","operator ()", 2, argv[0]));
21619     }
21620     arg2 = ptr;
21621   }
21622   {
21623     try {
21624       result = (bool)((Xapian::SimpleStopper const *)arg1)->operator ()((std::string const &)*arg2);
21625     } catch (...) {
21626       string msg;
21627       int code = XapianExceptionHandler(msg);
21628       SWIG_exception(code, msg.c_str());
21629     }
21630   }
21631   vresult = SWIG_From_bool(static_cast< bool >(result));
21632   if (SWIG_IsNewObj(res2)) delete arg2;
21633   return vresult;
21634 fail:
21635   if (SWIG_IsNewObj(res2)) delete arg2;
21636   return Qnil;
21637 }
21638 
21639 
21640 SWIGINTERN VALUE
_wrap_SimpleStopper_description(int argc,VALUE * argv,VALUE self)21641 _wrap_SimpleStopper_description(int argc, VALUE *argv, VALUE self) {
21642   Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
21643   void *argp1 = 0 ;
21644   int res1 = 0 ;
21645   std::string result;
21646   VALUE vresult = Qnil;
21647 
21648   if ((argc < 0) || (argc > 0)) {
21649     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
21650   }
21651   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__SimpleStopper, 0 |  0 );
21652   if (!SWIG_IsOK(res1)) {
21653     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::SimpleStopper const *","get_description", 1, self ));
21654   }
21655   arg1 = reinterpret_cast< Xapian::SimpleStopper * >(argp1);
21656   {
21657     try {
21658       result = ((Xapian::SimpleStopper const *)arg1)->get_description();
21659     } catch (...) {
21660       string msg;
21661       int code = XapianExceptionHandler(msg);
21662       SWIG_exception(code, msg.c_str());
21663     }
21664   }
21665   vresult = SWIG_From_std_string(static_cast< std::string >(result));
21666   return vresult;
21667 fail:
21668   return Qnil;
21669 }
21670 
21671 
21672 SWIGINTERN VALUE
21673 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_SimpleStopper_allocate(VALUE self)21674 _wrap_SimpleStopper_allocate(VALUE self)
21675 #else
21676 _wrap_SimpleStopper_allocate(int argc, VALUE *argv, VALUE self)
21677 #endif
21678 {
21679   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__SimpleStopper);
21680 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
21681   rb_obj_call_init(vresult, argc, argv);
21682 #endif
21683   return vresult;
21684 }
21685 
21686 
21687 SWIGINTERN VALUE
_wrap_new_SimpleStopper__SWIG_2(int argc,VALUE * argv,VALUE self)21688 _wrap_new_SimpleStopper__SWIG_2(int argc, VALUE *argv, VALUE self) {
21689   std::string *arg1 = 0 ;
21690   int res1 = SWIG_OLDOBJ ;
21691   const char *classname SWIGUNUSED = "Xapian::SimpleStopper";
21692   Xapian::SimpleStopper *result = 0 ;
21693 
21694   if ((argc < 1) || (argc > 1)) {
21695     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
21696   }
21697   {
21698     std::string *ptr = (std::string *)0;
21699     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
21700     if (!SWIG_IsOK(res1)) {
21701       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","SimpleStopper", 1, argv[0] ));
21702     }
21703     if (!ptr) {
21704       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","SimpleStopper", 1, argv[0]));
21705     }
21706     arg1 = ptr;
21707   }
21708   {
21709     try {
21710       result = (Xapian::SimpleStopper *)new_Xapian_SimpleStopper__SWIG_2((std::string const &)*arg1);
21711       DATA_PTR(self) = result;
21712     } catch (...) {
21713       string msg;
21714       int code = XapianExceptionHandler(msg);
21715       SWIG_exception(code, msg.c_str());
21716     }
21717   }
21718   if (SWIG_IsNewObj(res1)) delete arg1;
21719   return self;
21720 fail:
21721   if (SWIG_IsNewObj(res1)) delete arg1;
21722   return Qnil;
21723 }
21724 
21725 
_wrap_new_SimpleStopper(int nargs,VALUE * args,VALUE self)21726 SWIGINTERN VALUE _wrap_new_SimpleStopper(int nargs, VALUE *args, VALUE self) {
21727   int argc;
21728   VALUE argv[1];
21729   int ii;
21730 
21731   argc = nargs;
21732   if (argc > 1) SWIG_fail;
21733   for (ii = 0; (ii < argc); ++ii) {
21734     argv[ii] = args[ii];
21735   }
21736   if (argc == 0) {
21737     return _wrap_new_SimpleStopper__SWIG_0(nargs, args, self);
21738   }
21739   if (argc == 1) {
21740     int _v;
21741     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
21742     _v = SWIG_CheckState(res);
21743     if (_v) {
21744       return _wrap_new_SimpleStopper__SWIG_2(nargs, args, self);
21745     }
21746   }
21747 
21748 fail:
21749   Ruby_Format_OverloadedError( argc, 1, "SimpleStopper.new",
21750     "    SimpleStopper.new()\n"
21751     "    SimpleStopper.new(std::string const &file)\n");
21752 
21753   return Qnil;
21754 }
21755 
21756 
21757 SWIGINTERN void
free_Xapian_SimpleStopper(void * self)21758 free_Xapian_SimpleStopper(void *self) {
21759     Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *)self;
21760     delete arg1;
21761 }
21762 
21763 static swig_class SwigClassRangeProcessor;
21764 
21765 SWIGINTERN VALUE
_wrap_new_RangeProcessor__SWIG_0(int argc,VALUE * argv,VALUE self)21766 _wrap_new_RangeProcessor__SWIG_0(int argc, VALUE *argv, VALUE self) {
21767   VALUE arg1 = (VALUE) 0 ;
21768   const char *classname SWIGUNUSED = "Xapian::RangeProcessor";
21769   Xapian::RangeProcessor *result = 0 ;
21770 
21771   if ((argc < 0) || (argc > 0)) {
21772     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
21773   }
21774   arg1 = self;
21775   {
21776     try {
21777       if ( strcmp(rb_obj_classname(self), classname) != 0 ) {
21778         /* subclassed */
21779         result = (Xapian::RangeProcessor *)new SwigDirector_RangeProcessor(arg1);
21780       } else {
21781         result = (Xapian::RangeProcessor *)new Xapian::RangeProcessor();
21782       }
21783 
21784       DATA_PTR(self) = result;
21785     } catch (...) {
21786       string msg;
21787       int code = XapianExceptionHandler(msg);
21788       SWIG_exception(code, msg.c_str());
21789     }
21790   }
21791   return self;
21792 fail:
21793   return Qnil;
21794 }
21795 
21796 
21797 SWIGINTERN VALUE
_wrap_new_RangeProcessor__SWIG_1(int argc,VALUE * argv,VALUE self)21798 _wrap_new_RangeProcessor__SWIG_1(int argc, VALUE *argv, VALUE self) {
21799   VALUE arg1 = (VALUE) 0 ;
21800   Xapian::valueno arg2 ;
21801   std::string *arg3 = 0 ;
21802   unsigned int arg4 ;
21803   unsigned int val2 ;
21804   int ecode2 = 0 ;
21805   int res3 = SWIG_OLDOBJ ;
21806   unsigned int val4 ;
21807   int ecode4 = 0 ;
21808   const char *classname SWIGUNUSED = "Xapian::RangeProcessor";
21809   Xapian::RangeProcessor *result = 0 ;
21810 
21811   if ((argc < 3) || (argc > 3)) {
21812     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
21813   }
21814   arg1 = self;
21815   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
21816   if (!SWIG_IsOK(ecode2)) {
21817     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","RangeProcessor", 2, argv[0] ));
21818   }
21819   arg2 = static_cast< Xapian::valueno >(val2);
21820   {
21821     std::string *ptr = (std::string *)0;
21822     res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
21823     if (!SWIG_IsOK(res3)) {
21824       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","RangeProcessor", 3, argv[1] ));
21825     }
21826     if (!ptr) {
21827       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","RangeProcessor", 3, argv[1]));
21828     }
21829     arg3 = ptr;
21830   }
21831   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
21832   if (!SWIG_IsOK(ecode4)) {
21833     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "unsigned int","RangeProcessor", 4, argv[2] ));
21834   }
21835   arg4 = static_cast< unsigned int >(val4);
21836   {
21837     try {
21838       if ( strcmp(rb_obj_classname(self), classname) != 0 ) {
21839         /* subclassed */
21840         result = (Xapian::RangeProcessor *)new SwigDirector_RangeProcessor(arg1,arg2,(std::string const &)*arg3,arg4);
21841       } else {
21842         result = (Xapian::RangeProcessor *)new Xapian::RangeProcessor(arg2,(std::string const &)*arg3,arg4);
21843       }
21844 
21845       DATA_PTR(self) = result;
21846     } catch (...) {
21847       string msg;
21848       int code = XapianExceptionHandler(msg);
21849       SWIG_exception(code, msg.c_str());
21850     }
21851   }
21852   if (SWIG_IsNewObj(res3)) delete arg3;
21853   return self;
21854 fail:
21855   if (SWIG_IsNewObj(res3)) delete arg3;
21856   return Qnil;
21857 }
21858 
21859 
21860 SWIGINTERN VALUE
_wrap_new_RangeProcessor__SWIG_2(int argc,VALUE * argv,VALUE self)21861 _wrap_new_RangeProcessor__SWIG_2(int argc, VALUE *argv, VALUE self) {
21862   VALUE arg1 = (VALUE) 0 ;
21863   Xapian::valueno arg2 ;
21864   std::string *arg3 = 0 ;
21865   unsigned int val2 ;
21866   int ecode2 = 0 ;
21867   int res3 = SWIG_OLDOBJ ;
21868   const char *classname SWIGUNUSED = "Xapian::RangeProcessor";
21869   Xapian::RangeProcessor *result = 0 ;
21870 
21871   if ((argc < 2) || (argc > 2)) {
21872     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
21873   }
21874   arg1 = self;
21875   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
21876   if (!SWIG_IsOK(ecode2)) {
21877     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","RangeProcessor", 2, argv[0] ));
21878   }
21879   arg2 = static_cast< Xapian::valueno >(val2);
21880   {
21881     std::string *ptr = (std::string *)0;
21882     res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
21883     if (!SWIG_IsOK(res3)) {
21884       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","RangeProcessor", 3, argv[1] ));
21885     }
21886     if (!ptr) {
21887       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","RangeProcessor", 3, argv[1]));
21888     }
21889     arg3 = ptr;
21890   }
21891   {
21892     try {
21893       if ( strcmp(rb_obj_classname(self), classname) != 0 ) {
21894         /* subclassed */
21895         result = (Xapian::RangeProcessor *)new SwigDirector_RangeProcessor(arg1,arg2,(std::string const &)*arg3);
21896       } else {
21897         result = (Xapian::RangeProcessor *)new Xapian::RangeProcessor(arg2,(std::string const &)*arg3);
21898       }
21899 
21900       DATA_PTR(self) = result;
21901     } catch (...) {
21902       string msg;
21903       int code = XapianExceptionHandler(msg);
21904       SWIG_exception(code, msg.c_str());
21905     }
21906   }
21907   if (SWIG_IsNewObj(res3)) delete arg3;
21908   return self;
21909 fail:
21910   if (SWIG_IsNewObj(res3)) delete arg3;
21911   return Qnil;
21912 }
21913 
21914 
21915 SWIGINTERN VALUE
21916 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_RangeProcessor_allocate(VALUE self)21917 _wrap_RangeProcessor_allocate(VALUE self)
21918 #else
21919 _wrap_RangeProcessor_allocate(int argc, VALUE *argv, VALUE self)
21920 #endif
21921 {
21922   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__RangeProcessor);
21923 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
21924   rb_obj_call_init(vresult, argc, argv);
21925 #endif
21926   return vresult;
21927 }
21928 
21929 
21930 SWIGINTERN VALUE
_wrap_new_RangeProcessor__SWIG_3(int argc,VALUE * argv,VALUE self)21931 _wrap_new_RangeProcessor__SWIG_3(int argc, VALUE *argv, VALUE self) {
21932   VALUE arg1 = (VALUE) 0 ;
21933   Xapian::valueno arg2 ;
21934   unsigned int val2 ;
21935   int ecode2 = 0 ;
21936   const char *classname SWIGUNUSED = "Xapian::RangeProcessor";
21937   Xapian::RangeProcessor *result = 0 ;
21938 
21939   if ((argc < 1) || (argc > 1)) {
21940     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
21941   }
21942   arg1 = self;
21943   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
21944   if (!SWIG_IsOK(ecode2)) {
21945     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","RangeProcessor", 2, argv[0] ));
21946   }
21947   arg2 = static_cast< Xapian::valueno >(val2);
21948   {
21949     try {
21950       if ( strcmp(rb_obj_classname(self), classname) != 0 ) {
21951         /* subclassed */
21952         result = (Xapian::RangeProcessor *)new SwigDirector_RangeProcessor(arg1,arg2);
21953       } else {
21954         result = (Xapian::RangeProcessor *)new Xapian::RangeProcessor(arg2);
21955       }
21956 
21957       DATA_PTR(self) = result;
21958     } catch (...) {
21959       string msg;
21960       int code = XapianExceptionHandler(msg);
21961       SWIG_exception(code, msg.c_str());
21962     }
21963   }
21964   return self;
21965 fail:
21966   return Qnil;
21967 }
21968 
21969 
_wrap_new_RangeProcessor(int nargs,VALUE * args,VALUE self)21970 SWIGINTERN VALUE _wrap_new_RangeProcessor(int nargs, VALUE *args, VALUE self) {
21971   int argc;
21972   VALUE argv[5];
21973   int ii;
21974 
21975   argc = nargs + 1;
21976   argv[0] = self;
21977   if (argc > 5) SWIG_fail;
21978   for (ii = 1; (ii < argc); ++ii) {
21979     argv[ii] = args[ii-1];
21980   }
21981   if (argc == 1) {
21982     int _v;
21983     _v = (argv[0] != 0);
21984     if (_v) {
21985       return _wrap_new_RangeProcessor__SWIG_0(nargs, args, self);
21986     }
21987   }
21988   if (argc == 2) {
21989     int _v;
21990     _v = (argv[0] != 0);
21991     if (_v) {
21992       {
21993         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
21994         _v = SWIG_CheckState(res);
21995       }
21996       if (_v) {
21997         return _wrap_new_RangeProcessor__SWIG_3(nargs, args, self);
21998       }
21999     }
22000   }
22001   if (argc == 3) {
22002     int _v;
22003     _v = (argv[0] != 0);
22004     if (_v) {
22005       {
22006         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
22007         _v = SWIG_CheckState(res);
22008       }
22009       if (_v) {
22010         int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
22011         _v = SWIG_CheckState(res);
22012         if (_v) {
22013           return _wrap_new_RangeProcessor__SWIG_2(nargs, args, self);
22014         }
22015       }
22016     }
22017   }
22018   if (argc == 4) {
22019     int _v;
22020     _v = (argv[0] != 0);
22021     if (_v) {
22022       {
22023         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
22024         _v = SWIG_CheckState(res);
22025       }
22026       if (_v) {
22027         int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
22028         _v = SWIG_CheckState(res);
22029         if (_v) {
22030           {
22031             int res = SWIG_AsVal_unsigned_SS_int(argv[3], NULL);
22032             _v = SWIG_CheckState(res);
22033           }
22034           if (_v) {
22035             return _wrap_new_RangeProcessor__SWIG_1(nargs, args, self);
22036           }
22037         }
22038       }
22039     }
22040   }
22041 
22042 fail:
22043   Ruby_Format_OverloadedError( argc, 5, "RangeProcessor.new",
22044     "    RangeProcessor.new()\n"
22045     "    RangeProcessor.new(Xapian::valueno slot_, std::string const &str_, unsigned int flags_)\n"
22046     "    RangeProcessor.new(Xapian::valueno slot_, std::string const &str_)\n"
22047     "    RangeProcessor.new(Xapian::valueno slot_)\n");
22048 
22049   return Qnil;
22050 }
22051 
22052 
22053 SWIGINTERN void
free_Xapian_RangeProcessor(void * self)22054 free_Xapian_RangeProcessor(void *self) {
22055     Xapian::RangeProcessor *arg1 = (Xapian::RangeProcessor *)self;
22056     delete arg1;
22057 }
22058 
22059 SWIGINTERN VALUE
_wrap_RangeProcessor_check_range(int argc,VALUE * argv,VALUE self)22060 _wrap_RangeProcessor_check_range(int argc, VALUE *argv, VALUE self) {
22061   Xapian::RangeProcessor *arg1 = (Xapian::RangeProcessor *) 0 ;
22062   std::string *arg2 = 0 ;
22063   std::string *arg3 = 0 ;
22064   void *argp1 = 0 ;
22065   int res1 = 0 ;
22066   int res2 = SWIG_OLDOBJ ;
22067   int res3 = SWIG_OLDOBJ ;
22068   Xapian::Query result;
22069   VALUE vresult = Qnil;
22070 
22071   if ((argc < 2) || (argc > 2)) {
22072     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
22073   }
22074   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__RangeProcessor, 0 |  0 );
22075   if (!SWIG_IsOK(res1)) {
22076     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::RangeProcessor *","check_range", 1, self ));
22077   }
22078   arg1 = reinterpret_cast< Xapian::RangeProcessor * >(argp1);
22079   {
22080     std::string *ptr = (std::string *)0;
22081     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
22082     if (!SWIG_IsOK(res2)) {
22083       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","check_range", 2, argv[0] ));
22084     }
22085     if (!ptr) {
22086       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","check_range", 2, argv[0]));
22087     }
22088     arg2 = ptr;
22089   }
22090   {
22091     std::string *ptr = (std::string *)0;
22092     res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
22093     if (!SWIG_IsOK(res3)) {
22094       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","check_range", 3, argv[1] ));
22095     }
22096     if (!ptr) {
22097       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","check_range", 3, argv[1]));
22098     }
22099     arg3 = ptr;
22100   }
22101   {
22102     try {
22103       result = (arg1)->check_range((std::string const &)*arg2,(std::string const &)*arg3);
22104     } catch (...) {
22105       string msg;
22106       int code = XapianExceptionHandler(msg);
22107       SWIG_exception(code, msg.c_str());
22108     }
22109   }
22110   vresult = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN |  0 );
22111   if (SWIG_IsNewObj(res2)) delete arg2;
22112   if (SWIG_IsNewObj(res3)) delete arg3;
22113   return vresult;
22114 fail:
22115   if (SWIG_IsNewObj(res2)) delete arg2;
22116   if (SWIG_IsNewObj(res3)) delete arg3;
22117   return Qnil;
22118 }
22119 
22120 
22121 SWIGINTERN VALUE
_wrap_RangeProcessor___call__(int argc,VALUE * argv,VALUE self)22122 _wrap_RangeProcessor___call__(int argc, VALUE *argv, VALUE self) {
22123   Xapian::RangeProcessor *arg1 = (Xapian::RangeProcessor *) 0 ;
22124   std::string *arg2 = 0 ;
22125   std::string *arg3 = 0 ;
22126   void *argp1 = 0 ;
22127   int res1 = 0 ;
22128   int res2 = SWIG_OLDOBJ ;
22129   int res3 = SWIG_OLDOBJ ;
22130   Swig::Director *director = 0;
22131   bool upcall = false;
22132   Xapian::Query result;
22133   VALUE vresult = Qnil;
22134 
22135   if ((argc < 2) || (argc > 2)) {
22136     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
22137   }
22138   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__RangeProcessor, 0 |  0 );
22139   if (!SWIG_IsOK(res1)) {
22140     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::RangeProcessor *","operator ()", 1, self ));
22141   }
22142   arg1 = reinterpret_cast< Xapian::RangeProcessor * >(argp1);
22143   {
22144     std::string *ptr = (std::string *)0;
22145     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
22146     if (!SWIG_IsOK(res2)) {
22147       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","operator ()", 2, argv[0] ));
22148     }
22149     if (!ptr) {
22150       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","operator ()", 2, argv[0]));
22151     }
22152     arg2 = ptr;
22153   }
22154   {
22155     std::string *ptr = (std::string *)0;
22156     res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
22157     if (!SWIG_IsOK(res3)) {
22158       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","operator ()", 3, argv[1] ));
22159     }
22160     if (!ptr) {
22161       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","operator ()", 3, argv[1]));
22162     }
22163     arg3 = ptr;
22164   }
22165   director = dynamic_cast<Swig::Director *>(arg1);
22166   upcall = (director && (director->swig_get_self() == self));
22167   try {
22168     {
22169       try {
22170         if (upcall) {
22171           result = (arg1)->Xapian::RangeProcessor::operator ()((std::string const &)*arg2,(std::string const &)*arg3);
22172         } else {
22173           result = (arg1)->operator ()((std::string const &)*arg2,(std::string const &)*arg3);
22174         }
22175       } catch (...) {
22176         string msg;
22177         int code = XapianExceptionHandler(msg);
22178         SWIG_exception(code, msg.c_str());
22179       }
22180     }
22181   } catch (Swig::DirectorException& e) {
22182     rb_exc_raise(e.getError());
22183     SWIG_fail;
22184   }
22185   vresult = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN |  0 );
22186   if (SWIG_IsNewObj(res2)) delete arg2;
22187   if (SWIG_IsNewObj(res3)) delete arg3;
22188   return vresult;
22189 fail:
22190   if (SWIG_IsNewObj(res2)) delete arg2;
22191   if (SWIG_IsNewObj(res3)) delete arg3;
22192   return Qnil;
22193 }
22194 
22195 
22196 SWIGINTERN VALUE
_wrap_RangeProcessor_release(int argc,VALUE * argv,VALUE self)22197 _wrap_RangeProcessor_release(int argc, VALUE *argv, VALUE self) {
22198   Xapian::RangeProcessor *arg1 = (Xapian::RangeProcessor *) 0 ;
22199   void *argp1 = 0 ;
22200   int res1 = 0 ;
22201   Swig::Director *director = 0;
22202   Xapian::RangeProcessor *result = 0 ;
22203   VALUE vresult = Qnil;
22204 
22205   if ((argc < 0) || (argc > 0)) {
22206     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
22207   }
22208   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__RangeProcessor, 0 |  0 );
22209   if (!SWIG_IsOK(res1)) {
22210     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::RangeProcessor const *","release", 1, self ));
22211   }
22212   arg1 = reinterpret_cast< Xapian::RangeProcessor * >(argp1);
22213   {
22214     try {
22215       result = (Xapian::RangeProcessor *)((Xapian::RangeProcessor const *)arg1)->release();
22216     } catch (...) {
22217       string msg;
22218       int code = XapianExceptionHandler(msg);
22219       SWIG_exception(code, msg.c_str());
22220     }
22221   }
22222   director = dynamic_cast<Swig::Director *>(result);
22223   if (director) {
22224     vresult = director->swig_get_self();
22225   } else {
22226     vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RangeProcessor, 0 |  0 );
22227   }
22228   return vresult;
22229 fail:
22230   return Qnil;
22231 }
22232 
22233 
22234 SWIGINTERN VALUE
_wrap_disown_RangeProcessor(int argc,VALUE * argv,VALUE self)22235 _wrap_disown_RangeProcessor(int argc, VALUE *argv, VALUE self) {
22236   Xapian::RangeProcessor *arg1 = (Xapian::RangeProcessor *) 0 ;
22237   void *argp1 = 0 ;
22238   int res1 = 0 ;
22239 
22240   if ((argc < 1) || (argc > 1)) {
22241     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
22242   }
22243   res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Xapian__RangeProcessor, 0 |  0 );
22244   if (!SWIG_IsOK(res1)) {
22245     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::RangeProcessor *","disown_RangeProcessor", 1, argv[0] ));
22246   }
22247   arg1 = reinterpret_cast< Xapian::RangeProcessor * >(argp1);
22248   {
22249     Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
22250     if (director) director->swig_disown();
22251   }
22252 
22253   return Qnil;
22254 fail:
22255   return Qnil;
22256 }
22257 
22258 
22259 static swig_class SwigClassDateRangeProcessor;
22260 
22261 SWIGINTERN VALUE
_wrap_new_DateRangeProcessor__SWIG_0(int argc,VALUE * argv,VALUE self)22262 _wrap_new_DateRangeProcessor__SWIG_0(int argc, VALUE *argv, VALUE self) {
22263   Xapian::valueno arg1 ;
22264   unsigned int arg2 ;
22265   int arg3 ;
22266   unsigned int val1 ;
22267   int ecode1 = 0 ;
22268   unsigned int val2 ;
22269   int ecode2 = 0 ;
22270   int val3 ;
22271   int ecode3 = 0 ;
22272   const char *classname SWIGUNUSED = "Xapian::DateRangeProcessor";
22273   Xapian::DateRangeProcessor *result = 0 ;
22274 
22275   if ((argc < 3) || (argc > 3)) {
22276     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
22277   }
22278   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
22279   if (!SWIG_IsOK(ecode1)) {
22280     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","DateRangeProcessor", 1, argv[0] ));
22281   }
22282   arg1 = static_cast< Xapian::valueno >(val1);
22283   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
22284   if (!SWIG_IsOK(ecode2)) {
22285     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","DateRangeProcessor", 2, argv[1] ));
22286   }
22287   arg2 = static_cast< unsigned int >(val2);
22288   ecode3 = SWIG_AsVal_int(argv[2], &val3);
22289   if (!SWIG_IsOK(ecode3)) {
22290     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","DateRangeProcessor", 3, argv[2] ));
22291   }
22292   arg3 = static_cast< int >(val3);
22293   {
22294     try {
22295       result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1,arg2,arg3);
22296       DATA_PTR(self) = result;
22297     } catch (...) {
22298       string msg;
22299       int code = XapianExceptionHandler(msg);
22300       SWIG_exception(code, msg.c_str());
22301     }
22302   }
22303   return self;
22304 fail:
22305   return Qnil;
22306 }
22307 
22308 
22309 SWIGINTERN VALUE
_wrap_new_DateRangeProcessor__SWIG_1(int argc,VALUE * argv,VALUE self)22310 _wrap_new_DateRangeProcessor__SWIG_1(int argc, VALUE *argv, VALUE self) {
22311   Xapian::valueno arg1 ;
22312   unsigned int arg2 ;
22313   unsigned int val1 ;
22314   int ecode1 = 0 ;
22315   unsigned int val2 ;
22316   int ecode2 = 0 ;
22317   const char *classname SWIGUNUSED = "Xapian::DateRangeProcessor";
22318   Xapian::DateRangeProcessor *result = 0 ;
22319 
22320   if ((argc < 2) || (argc > 2)) {
22321     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
22322   }
22323   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
22324   if (!SWIG_IsOK(ecode1)) {
22325     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","DateRangeProcessor", 1, argv[0] ));
22326   }
22327   arg1 = static_cast< Xapian::valueno >(val1);
22328   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
22329   if (!SWIG_IsOK(ecode2)) {
22330     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","DateRangeProcessor", 2, argv[1] ));
22331   }
22332   arg2 = static_cast< unsigned int >(val2);
22333   {
22334     try {
22335       result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1,arg2);
22336       DATA_PTR(self) = result;
22337     } catch (...) {
22338       string msg;
22339       int code = XapianExceptionHandler(msg);
22340       SWIG_exception(code, msg.c_str());
22341     }
22342   }
22343   return self;
22344 fail:
22345   return Qnil;
22346 }
22347 
22348 
22349 SWIGINTERN VALUE
_wrap_new_DateRangeProcessor__SWIG_2(int argc,VALUE * argv,VALUE self)22350 _wrap_new_DateRangeProcessor__SWIG_2(int argc, VALUE *argv, VALUE self) {
22351   Xapian::valueno arg1 ;
22352   unsigned int val1 ;
22353   int ecode1 = 0 ;
22354   const char *classname SWIGUNUSED = "Xapian::DateRangeProcessor";
22355   Xapian::DateRangeProcessor *result = 0 ;
22356 
22357   if ((argc < 1) || (argc > 1)) {
22358     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
22359   }
22360   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
22361   if (!SWIG_IsOK(ecode1)) {
22362     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","DateRangeProcessor", 1, argv[0] ));
22363   }
22364   arg1 = static_cast< Xapian::valueno >(val1);
22365   {
22366     try {
22367       result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1);
22368       DATA_PTR(self) = result;
22369     } catch (...) {
22370       string msg;
22371       int code = XapianExceptionHandler(msg);
22372       SWIG_exception(code, msg.c_str());
22373     }
22374   }
22375   return self;
22376 fail:
22377   return Qnil;
22378 }
22379 
22380 
22381 SWIGINTERN VALUE
_wrap_new_DateRangeProcessor__SWIG_3(int argc,VALUE * argv,VALUE self)22382 _wrap_new_DateRangeProcessor__SWIG_3(int argc, VALUE *argv, VALUE self) {
22383   Xapian::valueno arg1 ;
22384   std::string *arg2 = 0 ;
22385   unsigned int arg3 ;
22386   int arg4 ;
22387   unsigned int val1 ;
22388   int ecode1 = 0 ;
22389   int res2 = SWIG_OLDOBJ ;
22390   unsigned int val3 ;
22391   int ecode3 = 0 ;
22392   int val4 ;
22393   int ecode4 = 0 ;
22394   const char *classname SWIGUNUSED = "Xapian::DateRangeProcessor";
22395   Xapian::DateRangeProcessor *result = 0 ;
22396 
22397   if ((argc < 4) || (argc > 4)) {
22398     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
22399   }
22400   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
22401   if (!SWIG_IsOK(ecode1)) {
22402     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","DateRangeProcessor", 1, argv[0] ));
22403   }
22404   arg1 = static_cast< Xapian::valueno >(val1);
22405   {
22406     std::string *ptr = (std::string *)0;
22407     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
22408     if (!SWIG_IsOK(res2)) {
22409       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","DateRangeProcessor", 2, argv[1] ));
22410     }
22411     if (!ptr) {
22412       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","DateRangeProcessor", 2, argv[1]));
22413     }
22414     arg2 = ptr;
22415   }
22416   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
22417   if (!SWIG_IsOK(ecode3)) {
22418     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","DateRangeProcessor", 3, argv[2] ));
22419   }
22420   arg3 = static_cast< unsigned int >(val3);
22421   ecode4 = SWIG_AsVal_int(argv[3], &val4);
22422   if (!SWIG_IsOK(ecode4)) {
22423     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","DateRangeProcessor", 4, argv[3] ));
22424   }
22425   arg4 = static_cast< int >(val4);
22426   {
22427     try {
22428       result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1,(std::string const &)*arg2,arg3,arg4);
22429       DATA_PTR(self) = result;
22430     } catch (...) {
22431       string msg;
22432       int code = XapianExceptionHandler(msg);
22433       SWIG_exception(code, msg.c_str());
22434     }
22435   }
22436   if (SWIG_IsNewObj(res2)) delete arg2;
22437   return self;
22438 fail:
22439   if (SWIG_IsNewObj(res2)) delete arg2;
22440   return Qnil;
22441 }
22442 
22443 
22444 SWIGINTERN VALUE
_wrap_new_DateRangeProcessor__SWIG_4(int argc,VALUE * argv,VALUE self)22445 _wrap_new_DateRangeProcessor__SWIG_4(int argc, VALUE *argv, VALUE self) {
22446   Xapian::valueno arg1 ;
22447   std::string *arg2 = 0 ;
22448   unsigned int arg3 ;
22449   unsigned int val1 ;
22450   int ecode1 = 0 ;
22451   int res2 = SWIG_OLDOBJ ;
22452   unsigned int val3 ;
22453   int ecode3 = 0 ;
22454   const char *classname SWIGUNUSED = "Xapian::DateRangeProcessor";
22455   Xapian::DateRangeProcessor *result = 0 ;
22456 
22457   if ((argc < 3) || (argc > 3)) {
22458     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
22459   }
22460   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
22461   if (!SWIG_IsOK(ecode1)) {
22462     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","DateRangeProcessor", 1, argv[0] ));
22463   }
22464   arg1 = static_cast< Xapian::valueno >(val1);
22465   {
22466     std::string *ptr = (std::string *)0;
22467     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
22468     if (!SWIG_IsOK(res2)) {
22469       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","DateRangeProcessor", 2, argv[1] ));
22470     }
22471     if (!ptr) {
22472       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","DateRangeProcessor", 2, argv[1]));
22473     }
22474     arg2 = ptr;
22475   }
22476   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
22477   if (!SWIG_IsOK(ecode3)) {
22478     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","DateRangeProcessor", 3, argv[2] ));
22479   }
22480   arg3 = static_cast< unsigned int >(val3);
22481   {
22482     try {
22483       result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1,(std::string const &)*arg2,arg3);
22484       DATA_PTR(self) = result;
22485     } catch (...) {
22486       string msg;
22487       int code = XapianExceptionHandler(msg);
22488       SWIG_exception(code, msg.c_str());
22489     }
22490   }
22491   if (SWIG_IsNewObj(res2)) delete arg2;
22492   return self;
22493 fail:
22494   if (SWIG_IsNewObj(res2)) delete arg2;
22495   return Qnil;
22496 }
22497 
22498 
22499 SWIGINTERN VALUE
22500 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_DateRangeProcessor_allocate(VALUE self)22501 _wrap_DateRangeProcessor_allocate(VALUE self)
22502 #else
22503 _wrap_DateRangeProcessor_allocate(int argc, VALUE *argv, VALUE self)
22504 #endif
22505 {
22506   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__DateRangeProcessor);
22507 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
22508   rb_obj_call_init(vresult, argc, argv);
22509 #endif
22510   return vresult;
22511 }
22512 
22513 
22514 SWIGINTERN VALUE
_wrap_new_DateRangeProcessor__SWIG_5(int argc,VALUE * argv,VALUE self)22515 _wrap_new_DateRangeProcessor__SWIG_5(int argc, VALUE *argv, VALUE self) {
22516   Xapian::valueno arg1 ;
22517   std::string *arg2 = 0 ;
22518   unsigned int val1 ;
22519   int ecode1 = 0 ;
22520   int res2 = SWIG_OLDOBJ ;
22521   const char *classname SWIGUNUSED = "Xapian::DateRangeProcessor";
22522   Xapian::DateRangeProcessor *result = 0 ;
22523 
22524   if ((argc < 2) || (argc > 2)) {
22525     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
22526   }
22527   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
22528   if (!SWIG_IsOK(ecode1)) {
22529     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","DateRangeProcessor", 1, argv[0] ));
22530   }
22531   arg1 = static_cast< Xapian::valueno >(val1);
22532   {
22533     std::string *ptr = (std::string *)0;
22534     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
22535     if (!SWIG_IsOK(res2)) {
22536       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","DateRangeProcessor", 2, argv[1] ));
22537     }
22538     if (!ptr) {
22539       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","DateRangeProcessor", 2, argv[1]));
22540     }
22541     arg2 = ptr;
22542   }
22543   {
22544     try {
22545       result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1,(std::string const &)*arg2);
22546       DATA_PTR(self) = result;
22547     } catch (...) {
22548       string msg;
22549       int code = XapianExceptionHandler(msg);
22550       SWIG_exception(code, msg.c_str());
22551     }
22552   }
22553   if (SWIG_IsNewObj(res2)) delete arg2;
22554   return self;
22555 fail:
22556   if (SWIG_IsNewObj(res2)) delete arg2;
22557   return Qnil;
22558 }
22559 
22560 
_wrap_new_DateRangeProcessor(int nargs,VALUE * args,VALUE self)22561 SWIGINTERN VALUE _wrap_new_DateRangeProcessor(int nargs, VALUE *args, VALUE self) {
22562   int argc;
22563   VALUE argv[4];
22564   int ii;
22565 
22566   argc = nargs;
22567   if (argc > 4) SWIG_fail;
22568   for (ii = 0; (ii < argc); ++ii) {
22569     argv[ii] = args[ii];
22570   }
22571   if (argc == 1) {
22572     int _v;
22573     {
22574       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
22575       _v = SWIG_CheckState(res);
22576     }
22577     if (_v) {
22578       return _wrap_new_DateRangeProcessor__SWIG_2(nargs, args, self);
22579     }
22580   }
22581   if (argc == 2) {
22582     int _v;
22583     {
22584       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
22585       _v = SWIG_CheckState(res);
22586     }
22587     if (_v) {
22588       {
22589         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
22590         _v = SWIG_CheckState(res);
22591       }
22592       if (_v) {
22593         return _wrap_new_DateRangeProcessor__SWIG_1(nargs, args, self);
22594       }
22595     }
22596   }
22597   if (argc == 2) {
22598     int _v;
22599     {
22600       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
22601       _v = SWIG_CheckState(res);
22602     }
22603     if (_v) {
22604       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
22605       _v = SWIG_CheckState(res);
22606       if (_v) {
22607         return _wrap_new_DateRangeProcessor__SWIG_5(nargs, args, self);
22608       }
22609     }
22610   }
22611   if (argc == 3) {
22612     int _v;
22613     {
22614       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
22615       _v = SWIG_CheckState(res);
22616     }
22617     if (_v) {
22618       {
22619         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
22620         _v = SWIG_CheckState(res);
22621       }
22622       if (_v) {
22623         {
22624           int res = SWIG_AsVal_int(argv[2], NULL);
22625           _v = SWIG_CheckState(res);
22626         }
22627         if (_v) {
22628           return _wrap_new_DateRangeProcessor__SWIG_0(nargs, args, self);
22629         }
22630       }
22631     }
22632   }
22633   if (argc == 3) {
22634     int _v;
22635     {
22636       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
22637       _v = SWIG_CheckState(res);
22638     }
22639     if (_v) {
22640       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
22641       _v = SWIG_CheckState(res);
22642       if (_v) {
22643         {
22644           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
22645           _v = SWIG_CheckState(res);
22646         }
22647         if (_v) {
22648           return _wrap_new_DateRangeProcessor__SWIG_4(nargs, args, self);
22649         }
22650       }
22651     }
22652   }
22653   if (argc == 4) {
22654     int _v;
22655     {
22656       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
22657       _v = SWIG_CheckState(res);
22658     }
22659     if (_v) {
22660       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
22661       _v = SWIG_CheckState(res);
22662       if (_v) {
22663         {
22664           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
22665           _v = SWIG_CheckState(res);
22666         }
22667         if (_v) {
22668           {
22669             int res = SWIG_AsVal_int(argv[3], NULL);
22670             _v = SWIG_CheckState(res);
22671           }
22672           if (_v) {
22673             return _wrap_new_DateRangeProcessor__SWIG_3(nargs, args, self);
22674           }
22675         }
22676       }
22677     }
22678   }
22679 
22680 fail:
22681   Ruby_Format_OverloadedError( argc, 4, "DateRangeProcessor.new",
22682     "    DateRangeProcessor.new(Xapian::valueno slot_, unsigned int flags_, int epoch_year_)\n"
22683     "    DateRangeProcessor.new(Xapian::valueno slot_, unsigned int flags_)\n"
22684     "    DateRangeProcessor.new(Xapian::valueno slot_)\n"
22685     "    DateRangeProcessor.new(Xapian::valueno slot_, std::string const &str_, unsigned int flags_, int epoch_year_)\n"
22686     "    DateRangeProcessor.new(Xapian::valueno slot_, std::string const &str_, unsigned int flags_)\n"
22687     "    DateRangeProcessor.new(Xapian::valueno slot_, std::string const &str_)\n");
22688 
22689   return Qnil;
22690 }
22691 
22692 
22693 SWIGINTERN VALUE
_wrap_DateRangeProcessor___call__(int argc,VALUE * argv,VALUE self)22694 _wrap_DateRangeProcessor___call__(int argc, VALUE *argv, VALUE self) {
22695   Xapian::DateRangeProcessor *arg1 = (Xapian::DateRangeProcessor *) 0 ;
22696   std::string *arg2 = 0 ;
22697   std::string *arg3 = 0 ;
22698   void *argp1 = 0 ;
22699   int res1 = 0 ;
22700   int res2 = SWIG_OLDOBJ ;
22701   int res3 = SWIG_OLDOBJ ;
22702   Xapian::Query result;
22703   VALUE vresult = Qnil;
22704 
22705   if ((argc < 2) || (argc > 2)) {
22706     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
22707   }
22708   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__DateRangeProcessor, 0 |  0 );
22709   if (!SWIG_IsOK(res1)) {
22710     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::DateRangeProcessor *","operator ()", 1, self ));
22711   }
22712   arg1 = reinterpret_cast< Xapian::DateRangeProcessor * >(argp1);
22713   {
22714     std::string *ptr = (std::string *)0;
22715     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
22716     if (!SWIG_IsOK(res2)) {
22717       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","operator ()", 2, argv[0] ));
22718     }
22719     if (!ptr) {
22720       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","operator ()", 2, argv[0]));
22721     }
22722     arg2 = ptr;
22723   }
22724   {
22725     std::string *ptr = (std::string *)0;
22726     res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
22727     if (!SWIG_IsOK(res3)) {
22728       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","operator ()", 3, argv[1] ));
22729     }
22730     if (!ptr) {
22731       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","operator ()", 3, argv[1]));
22732     }
22733     arg3 = ptr;
22734   }
22735   {
22736     try {
22737       result = (arg1)->operator ()((std::string const &)*arg2,(std::string const &)*arg3);
22738     } catch (...) {
22739       string msg;
22740       int code = XapianExceptionHandler(msg);
22741       SWIG_exception(code, msg.c_str());
22742     }
22743   }
22744   vresult = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN |  0 );
22745   if (SWIG_IsNewObj(res2)) delete arg2;
22746   if (SWIG_IsNewObj(res3)) delete arg3;
22747   return vresult;
22748 fail:
22749   if (SWIG_IsNewObj(res2)) delete arg2;
22750   if (SWIG_IsNewObj(res3)) delete arg3;
22751   return Qnil;
22752 }
22753 
22754 
22755 SWIGINTERN void
free_Xapian_DateRangeProcessor(void * self)22756 free_Xapian_DateRangeProcessor(void *self) {
22757     Xapian::DateRangeProcessor *arg1 = (Xapian::DateRangeProcessor *)self;
22758     delete arg1;
22759 }
22760 
22761 static swig_class SwigClassNumberRangeProcessor;
22762 
22763 SWIGINTERN VALUE
_wrap_new_NumberRangeProcessor__SWIG_0(int argc,VALUE * argv,VALUE self)22764 _wrap_new_NumberRangeProcessor__SWIG_0(int argc, VALUE *argv, VALUE self) {
22765   Xapian::valueno arg1 ;
22766   std::string *arg2 = 0 ;
22767   unsigned int arg3 ;
22768   unsigned int val1 ;
22769   int ecode1 = 0 ;
22770   int res2 = SWIG_OLDOBJ ;
22771   unsigned int val3 ;
22772   int ecode3 = 0 ;
22773   const char *classname SWIGUNUSED = "Xapian::NumberRangeProcessor";
22774   Xapian::NumberRangeProcessor *result = 0 ;
22775 
22776   if ((argc < 3) || (argc > 3)) {
22777     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
22778   }
22779   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
22780   if (!SWIG_IsOK(ecode1)) {
22781     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","NumberRangeProcessor", 1, argv[0] ));
22782   }
22783   arg1 = static_cast< Xapian::valueno >(val1);
22784   {
22785     std::string *ptr = (std::string *)0;
22786     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
22787     if (!SWIG_IsOK(res2)) {
22788       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","NumberRangeProcessor", 2, argv[1] ));
22789     }
22790     if (!ptr) {
22791       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","NumberRangeProcessor", 2, argv[1]));
22792     }
22793     arg2 = ptr;
22794   }
22795   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
22796   if (!SWIG_IsOK(ecode3)) {
22797     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","NumberRangeProcessor", 3, argv[2] ));
22798   }
22799   arg3 = static_cast< unsigned int >(val3);
22800   {
22801     try {
22802       result = (Xapian::NumberRangeProcessor *)new Xapian::NumberRangeProcessor(arg1,(std::string const &)*arg2,arg3);
22803       DATA_PTR(self) = result;
22804     } catch (...) {
22805       string msg;
22806       int code = XapianExceptionHandler(msg);
22807       SWIG_exception(code, msg.c_str());
22808     }
22809   }
22810   if (SWIG_IsNewObj(res2)) delete arg2;
22811   return self;
22812 fail:
22813   if (SWIG_IsNewObj(res2)) delete arg2;
22814   return Qnil;
22815 }
22816 
22817 
22818 SWIGINTERN VALUE
_wrap_new_NumberRangeProcessor__SWIG_1(int argc,VALUE * argv,VALUE self)22819 _wrap_new_NumberRangeProcessor__SWIG_1(int argc, VALUE *argv, VALUE self) {
22820   Xapian::valueno arg1 ;
22821   std::string *arg2 = 0 ;
22822   unsigned int val1 ;
22823   int ecode1 = 0 ;
22824   int res2 = SWIG_OLDOBJ ;
22825   const char *classname SWIGUNUSED = "Xapian::NumberRangeProcessor";
22826   Xapian::NumberRangeProcessor *result = 0 ;
22827 
22828   if ((argc < 2) || (argc > 2)) {
22829     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
22830   }
22831   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
22832   if (!SWIG_IsOK(ecode1)) {
22833     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","NumberRangeProcessor", 1, argv[0] ));
22834   }
22835   arg1 = static_cast< Xapian::valueno >(val1);
22836   {
22837     std::string *ptr = (std::string *)0;
22838     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
22839     if (!SWIG_IsOK(res2)) {
22840       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","NumberRangeProcessor", 2, argv[1] ));
22841     }
22842     if (!ptr) {
22843       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","NumberRangeProcessor", 2, argv[1]));
22844     }
22845     arg2 = ptr;
22846   }
22847   {
22848     try {
22849       result = (Xapian::NumberRangeProcessor *)new Xapian::NumberRangeProcessor(arg1,(std::string const &)*arg2);
22850       DATA_PTR(self) = result;
22851     } catch (...) {
22852       string msg;
22853       int code = XapianExceptionHandler(msg);
22854       SWIG_exception(code, msg.c_str());
22855     }
22856   }
22857   if (SWIG_IsNewObj(res2)) delete arg2;
22858   return self;
22859 fail:
22860   if (SWIG_IsNewObj(res2)) delete arg2;
22861   return Qnil;
22862 }
22863 
22864 
22865 SWIGINTERN VALUE
22866 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_NumberRangeProcessor_allocate(VALUE self)22867 _wrap_NumberRangeProcessor_allocate(VALUE self)
22868 #else
22869 _wrap_NumberRangeProcessor_allocate(int argc, VALUE *argv, VALUE self)
22870 #endif
22871 {
22872   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__NumberRangeProcessor);
22873 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
22874   rb_obj_call_init(vresult, argc, argv);
22875 #endif
22876   return vresult;
22877 }
22878 
22879 
22880 SWIGINTERN VALUE
_wrap_new_NumberRangeProcessor__SWIG_2(int argc,VALUE * argv,VALUE self)22881 _wrap_new_NumberRangeProcessor__SWIG_2(int argc, VALUE *argv, VALUE self) {
22882   Xapian::valueno arg1 ;
22883   unsigned int val1 ;
22884   int ecode1 = 0 ;
22885   const char *classname SWIGUNUSED = "Xapian::NumberRangeProcessor";
22886   Xapian::NumberRangeProcessor *result = 0 ;
22887 
22888   if ((argc < 1) || (argc > 1)) {
22889     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
22890   }
22891   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
22892   if (!SWIG_IsOK(ecode1)) {
22893     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","NumberRangeProcessor", 1, argv[0] ));
22894   }
22895   arg1 = static_cast< Xapian::valueno >(val1);
22896   {
22897     try {
22898       result = (Xapian::NumberRangeProcessor *)new Xapian::NumberRangeProcessor(arg1);
22899       DATA_PTR(self) = result;
22900     } catch (...) {
22901       string msg;
22902       int code = XapianExceptionHandler(msg);
22903       SWIG_exception(code, msg.c_str());
22904     }
22905   }
22906   return self;
22907 fail:
22908   return Qnil;
22909 }
22910 
22911 
_wrap_new_NumberRangeProcessor(int nargs,VALUE * args,VALUE self)22912 SWIGINTERN VALUE _wrap_new_NumberRangeProcessor(int nargs, VALUE *args, VALUE self) {
22913   int argc;
22914   VALUE argv[3];
22915   int ii;
22916 
22917   argc = nargs;
22918   if (argc > 3) SWIG_fail;
22919   for (ii = 0; (ii < argc); ++ii) {
22920     argv[ii] = args[ii];
22921   }
22922   if (argc == 1) {
22923     int _v;
22924     {
22925       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
22926       _v = SWIG_CheckState(res);
22927     }
22928     if (_v) {
22929       return _wrap_new_NumberRangeProcessor__SWIG_2(nargs, args, self);
22930     }
22931   }
22932   if (argc == 2) {
22933     int _v;
22934     {
22935       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
22936       _v = SWIG_CheckState(res);
22937     }
22938     if (_v) {
22939       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
22940       _v = SWIG_CheckState(res);
22941       if (_v) {
22942         return _wrap_new_NumberRangeProcessor__SWIG_1(nargs, args, self);
22943       }
22944     }
22945   }
22946   if (argc == 3) {
22947     int _v;
22948     {
22949       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
22950       _v = SWIG_CheckState(res);
22951     }
22952     if (_v) {
22953       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
22954       _v = SWIG_CheckState(res);
22955       if (_v) {
22956         {
22957           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
22958           _v = SWIG_CheckState(res);
22959         }
22960         if (_v) {
22961           return _wrap_new_NumberRangeProcessor__SWIG_0(nargs, args, self);
22962         }
22963       }
22964     }
22965   }
22966 
22967 fail:
22968   Ruby_Format_OverloadedError( argc, 3, "NumberRangeProcessor.new",
22969     "    NumberRangeProcessor.new(Xapian::valueno slot_, std::string const &str_, unsigned int flags_)\n"
22970     "    NumberRangeProcessor.new(Xapian::valueno slot_, std::string const &str_)\n"
22971     "    NumberRangeProcessor.new(Xapian::valueno slot_)\n");
22972 
22973   return Qnil;
22974 }
22975 
22976 
22977 SWIGINTERN VALUE
_wrap_NumberRangeProcessor___call__(int argc,VALUE * argv,VALUE self)22978 _wrap_NumberRangeProcessor___call__(int argc, VALUE *argv, VALUE self) {
22979   Xapian::NumberRangeProcessor *arg1 = (Xapian::NumberRangeProcessor *) 0 ;
22980   std::string *arg2 = 0 ;
22981   std::string *arg3 = 0 ;
22982   void *argp1 = 0 ;
22983   int res1 = 0 ;
22984   int res2 = SWIG_OLDOBJ ;
22985   int res3 = SWIG_OLDOBJ ;
22986   Xapian::Query result;
22987   VALUE vresult = Qnil;
22988 
22989   if ((argc < 2) || (argc > 2)) {
22990     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
22991   }
22992   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__NumberRangeProcessor, 0 |  0 );
22993   if (!SWIG_IsOK(res1)) {
22994     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::NumberRangeProcessor *","operator ()", 1, self ));
22995   }
22996   arg1 = reinterpret_cast< Xapian::NumberRangeProcessor * >(argp1);
22997   {
22998     std::string *ptr = (std::string *)0;
22999     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
23000     if (!SWIG_IsOK(res2)) {
23001       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","operator ()", 2, argv[0] ));
23002     }
23003     if (!ptr) {
23004       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","operator ()", 2, argv[0]));
23005     }
23006     arg2 = ptr;
23007   }
23008   {
23009     std::string *ptr = (std::string *)0;
23010     res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
23011     if (!SWIG_IsOK(res3)) {
23012       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","operator ()", 3, argv[1] ));
23013     }
23014     if (!ptr) {
23015       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","operator ()", 3, argv[1]));
23016     }
23017     arg3 = ptr;
23018   }
23019   {
23020     try {
23021       result = (arg1)->operator ()((std::string const &)*arg2,(std::string const &)*arg3);
23022     } catch (...) {
23023       string msg;
23024       int code = XapianExceptionHandler(msg);
23025       SWIG_exception(code, msg.c_str());
23026     }
23027   }
23028   vresult = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN |  0 );
23029   if (SWIG_IsNewObj(res2)) delete arg2;
23030   if (SWIG_IsNewObj(res3)) delete arg3;
23031   return vresult;
23032 fail:
23033   if (SWIG_IsNewObj(res2)) delete arg2;
23034   if (SWIG_IsNewObj(res3)) delete arg3;
23035   return Qnil;
23036 }
23037 
23038 
23039 SWIGINTERN void
free_Xapian_NumberRangeProcessor(void * self)23040 free_Xapian_NumberRangeProcessor(void *self) {
23041     Xapian::NumberRangeProcessor *arg1 = (Xapian::NumberRangeProcessor *)self;
23042     delete arg1;
23043 }
23044 
23045 static swig_class SwigClassValueRangeProcessor;
23046 
23047 SWIGINTERN VALUE
23048 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_ValueRangeProcessor_allocate(VALUE self)23049 _wrap_ValueRangeProcessor_allocate(VALUE self)
23050 #else
23051 _wrap_ValueRangeProcessor_allocate(int argc, VALUE *argv, VALUE self)
23052 #endif
23053 {
23054   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__ValueRangeProcessor);
23055 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
23056   rb_obj_call_init(vresult, argc, argv);
23057 #endif
23058   return vresult;
23059 }
23060 
23061 
23062 SWIGINTERN VALUE
_wrap_new_ValueRangeProcessor(int argc,VALUE * argv,VALUE self)23063 _wrap_new_ValueRangeProcessor(int argc, VALUE *argv, VALUE self) {
23064   VALUE arg1 = (VALUE) 0 ;
23065   const char *classname SWIGUNUSED = "Xapian::ValueRangeProcessor";
23066   Xapian::ValueRangeProcessor *result = 0 ;
23067 
23068   if ((argc < 0) || (argc > 0)) {
23069     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
23070   }
23071   arg1 = self;
23072   {
23073     try {
23074       if ( strcmp(rb_obj_classname(self), classname) != 0 ) {
23075         /* subclassed */
23076         result = (Xapian::ValueRangeProcessor *)new SwigDirector_ValueRangeProcessor(arg1);
23077       } else {
23078         rb_raise(rb_eNameError,"accessing abstract class or protected constructor");
23079         return Qnil;
23080       }
23081 
23082       DATA_PTR(self) = result;
23083     } catch (...) {
23084       string msg;
23085       int code = XapianExceptionHandler(msg);
23086       SWIG_exception(code, msg.c_str());
23087     }
23088   }
23089   return self;
23090 fail:
23091   return Qnil;
23092 }
23093 
23094 
23095 SWIGINTERN void
free_Xapian_ValueRangeProcessor(void * self)23096 free_Xapian_ValueRangeProcessor(void *self) {
23097     Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *)self;
23098     delete arg1;
23099 }
23100 
23101 SWIGINTERN VALUE
_wrap_ValueRangeProcessor___call__(int argc,VALUE * argv,VALUE self)23102 _wrap_ValueRangeProcessor___call__(int argc, VALUE *argv, VALUE self) {
23103   Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ;
23104   std::string *arg2 = 0 ;
23105   std::string *arg3 = 0 ;
23106   void *argp1 = 0 ;
23107   int res1 = 0 ;
23108   void *argp2 = 0 ;
23109   int res2 = 0 ;
23110   void *argp3 = 0 ;
23111   int res3 = 0 ;
23112   Swig::Director *director = 0;
23113   bool upcall = false;
23114   Xapian::valueno result;
23115   VALUE vresult = Qnil;
23116 
23117   if ((argc < 2) || (argc > 2)) {
23118     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
23119   }
23120   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueRangeProcessor, 0 |  0 );
23121   if (!SWIG_IsOK(res1)) {
23122     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueRangeProcessor *","operator ()", 1, self ));
23123   }
23124   arg1 = reinterpret_cast< Xapian::ValueRangeProcessor * >(argp1);
23125   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__string,  0 );
23126   if (!SWIG_IsOK(res2)) {
23127     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string &","operator ()", 2, argv[0] ));
23128   }
23129   if (!argp2) {
23130     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string &","operator ()", 2, argv[0]));
23131   }
23132   arg2 = reinterpret_cast< std::string * >(argp2);
23133   res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_std__string,  0 );
23134   if (!SWIG_IsOK(res3)) {
23135     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string &","operator ()", 3, argv[1] ));
23136   }
23137   if (!argp3) {
23138     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string &","operator ()", 3, argv[1]));
23139   }
23140   arg3 = reinterpret_cast< std::string * >(argp3);
23141   director = dynamic_cast<Swig::Director *>(arg1);
23142   upcall = (director && (director->swig_get_self() == self));
23143   try {
23144     {
23145       try {
23146         if (upcall) {
23147           Swig::DirectorPureVirtualException::raise("Xapian::ValueRangeProcessor::operator ()");
23148         } else {
23149           result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
23150         }
23151       } catch (...) {
23152         string msg;
23153         int code = XapianExceptionHandler(msg);
23154         SWIG_exception(code, msg.c_str());
23155       }
23156     }
23157   } catch (Swig::DirectorException& e) {
23158     rb_exc_raise(e.getError());
23159     SWIG_fail;
23160   }
23161   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
23162   return vresult;
23163 fail:
23164   return Qnil;
23165 }
23166 
23167 
23168 SWIGINTERN VALUE
_wrap_ValueRangeProcessor_release(int argc,VALUE * argv,VALUE self)23169 _wrap_ValueRangeProcessor_release(int argc, VALUE *argv, VALUE self) {
23170   Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ;
23171   void *argp1 = 0 ;
23172   int res1 = 0 ;
23173   Swig::Director *director = 0;
23174   Xapian::ValueRangeProcessor *result = 0 ;
23175   VALUE vresult = Qnil;
23176 
23177   if ((argc < 0) || (argc > 0)) {
23178     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
23179   }
23180   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueRangeProcessor, 0 |  0 );
23181   if (!SWIG_IsOK(res1)) {
23182     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueRangeProcessor const *","release", 1, self ));
23183   }
23184   arg1 = reinterpret_cast< Xapian::ValueRangeProcessor * >(argp1);
23185   {
23186     try {
23187       result = (Xapian::ValueRangeProcessor *)((Xapian::ValueRangeProcessor const *)arg1)->release();
23188     } catch (...) {
23189       string msg;
23190       int code = XapianExceptionHandler(msg);
23191       SWIG_exception(code, msg.c_str());
23192     }
23193   }
23194   director = dynamic_cast<Swig::Director *>(result);
23195   if (director) {
23196     vresult = director->swig_get_self();
23197   } else {
23198     vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueRangeProcessor, 0 |  0 );
23199   }
23200   return vresult;
23201 fail:
23202   return Qnil;
23203 }
23204 
23205 
23206 SWIGINTERN VALUE
_wrap_disown_ValueRangeProcessor(int argc,VALUE * argv,VALUE self)23207 _wrap_disown_ValueRangeProcessor(int argc, VALUE *argv, VALUE self) {
23208   Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ;
23209   void *argp1 = 0 ;
23210   int res1 = 0 ;
23211 
23212   if ((argc < 1) || (argc > 1)) {
23213     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
23214   }
23215   res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Xapian__ValueRangeProcessor, 0 |  0 );
23216   if (!SWIG_IsOK(res1)) {
23217     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueRangeProcessor *","disown_ValueRangeProcessor", 1, argv[0] ));
23218   }
23219   arg1 = reinterpret_cast< Xapian::ValueRangeProcessor * >(argp1);
23220   {
23221     Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
23222     if (director) director->swig_disown();
23223   }
23224 
23225   return Qnil;
23226 fail:
23227   return Qnil;
23228 }
23229 
23230 
23231 static swig_class SwigClassStringValueRangeProcessor;
23232 
23233 SWIGINTERN VALUE
_wrap_new_StringValueRangeProcessor__SWIG_0(int argc,VALUE * argv,VALUE self)23234 _wrap_new_StringValueRangeProcessor__SWIG_0(int argc, VALUE *argv, VALUE self) {
23235   Xapian::valueno arg1 ;
23236   unsigned int val1 ;
23237   int ecode1 = 0 ;
23238   const char *classname SWIGUNUSED = "Xapian::StringValueRangeProcessor";
23239   Xapian::StringValueRangeProcessor *result = 0 ;
23240 
23241   if ((argc < 1) || (argc > 1)) {
23242     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
23243   }
23244   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
23245   if (!SWIG_IsOK(ecode1)) {
23246     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","StringValueRangeProcessor", 1, argv[0] ));
23247   }
23248   arg1 = static_cast< Xapian::valueno >(val1);
23249   {
23250     try {
23251       result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1);
23252       DATA_PTR(self) = result;
23253     } catch (...) {
23254       string msg;
23255       int code = XapianExceptionHandler(msg);
23256       SWIG_exception(code, msg.c_str());
23257     }
23258   }
23259   return self;
23260 fail:
23261   return Qnil;
23262 }
23263 
23264 
23265 SWIGINTERN VALUE
_wrap_new_StringValueRangeProcessor__SWIG_1(int argc,VALUE * argv,VALUE self)23266 _wrap_new_StringValueRangeProcessor__SWIG_1(int argc, VALUE *argv, VALUE self) {
23267   Xapian::valueno arg1 ;
23268   std::string *arg2 = 0 ;
23269   bool arg3 ;
23270   unsigned int val1 ;
23271   int ecode1 = 0 ;
23272   int res2 = SWIG_OLDOBJ ;
23273   bool val3 ;
23274   int ecode3 = 0 ;
23275   const char *classname SWIGUNUSED = "Xapian::StringValueRangeProcessor";
23276   Xapian::StringValueRangeProcessor *result = 0 ;
23277 
23278   if ((argc < 3) || (argc > 3)) {
23279     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
23280   }
23281   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
23282   if (!SWIG_IsOK(ecode1)) {
23283     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","StringValueRangeProcessor", 1, argv[0] ));
23284   }
23285   arg1 = static_cast< Xapian::valueno >(val1);
23286   {
23287     std::string *ptr = (std::string *)0;
23288     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
23289     if (!SWIG_IsOK(res2)) {
23290       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","StringValueRangeProcessor", 2, argv[1] ));
23291     }
23292     if (!ptr) {
23293       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","StringValueRangeProcessor", 2, argv[1]));
23294     }
23295     arg2 = ptr;
23296   }
23297   ecode3 = SWIG_AsVal_bool(argv[2], &val3);
23298   if (!SWIG_IsOK(ecode3)) {
23299     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","StringValueRangeProcessor", 3, argv[2] ));
23300   }
23301   arg3 = static_cast< bool >(val3);
23302   {
23303     try {
23304       result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
23305       DATA_PTR(self) = result;
23306     } catch (...) {
23307       string msg;
23308       int code = XapianExceptionHandler(msg);
23309       SWIG_exception(code, msg.c_str());
23310     }
23311   }
23312   if (SWIG_IsNewObj(res2)) delete arg2;
23313   return self;
23314 fail:
23315   if (SWIG_IsNewObj(res2)) delete arg2;
23316   return Qnil;
23317 }
23318 
23319 
23320 SWIGINTERN VALUE
23321 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_StringValueRangeProcessor_allocate(VALUE self)23322 _wrap_StringValueRangeProcessor_allocate(VALUE self)
23323 #else
23324 _wrap_StringValueRangeProcessor_allocate(int argc, VALUE *argv, VALUE self)
23325 #endif
23326 {
23327   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__StringValueRangeProcessor);
23328 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
23329   rb_obj_call_init(vresult, argc, argv);
23330 #endif
23331   return vresult;
23332 }
23333 
23334 
23335 SWIGINTERN VALUE
_wrap_new_StringValueRangeProcessor__SWIG_2(int argc,VALUE * argv,VALUE self)23336 _wrap_new_StringValueRangeProcessor__SWIG_2(int argc, VALUE *argv, VALUE self) {
23337   Xapian::valueno arg1 ;
23338   std::string *arg2 = 0 ;
23339   unsigned int val1 ;
23340   int ecode1 = 0 ;
23341   int res2 = SWIG_OLDOBJ ;
23342   const char *classname SWIGUNUSED = "Xapian::StringValueRangeProcessor";
23343   Xapian::StringValueRangeProcessor *result = 0 ;
23344 
23345   if ((argc < 2) || (argc > 2)) {
23346     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
23347   }
23348   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
23349   if (!SWIG_IsOK(ecode1)) {
23350     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","StringValueRangeProcessor", 1, argv[0] ));
23351   }
23352   arg1 = static_cast< Xapian::valueno >(val1);
23353   {
23354     std::string *ptr = (std::string *)0;
23355     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
23356     if (!SWIG_IsOK(res2)) {
23357       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","StringValueRangeProcessor", 2, argv[1] ));
23358     }
23359     if (!ptr) {
23360       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","StringValueRangeProcessor", 2, argv[1]));
23361     }
23362     arg2 = ptr;
23363   }
23364   {
23365     try {
23366       result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1,(std::string const &)*arg2);
23367       DATA_PTR(self) = result;
23368     } catch (...) {
23369       string msg;
23370       int code = XapianExceptionHandler(msg);
23371       SWIG_exception(code, msg.c_str());
23372     }
23373   }
23374   if (SWIG_IsNewObj(res2)) delete arg2;
23375   return self;
23376 fail:
23377   if (SWIG_IsNewObj(res2)) delete arg2;
23378   return Qnil;
23379 }
23380 
23381 
_wrap_new_StringValueRangeProcessor(int nargs,VALUE * args,VALUE self)23382 SWIGINTERN VALUE _wrap_new_StringValueRangeProcessor(int nargs, VALUE *args, VALUE self) {
23383   int argc;
23384   VALUE argv[3];
23385   int ii;
23386 
23387   argc = nargs;
23388   if (argc > 3) SWIG_fail;
23389   for (ii = 0; (ii < argc); ++ii) {
23390     argv[ii] = args[ii];
23391   }
23392   if (argc == 1) {
23393     int _v;
23394     {
23395       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
23396       _v = SWIG_CheckState(res);
23397     }
23398     if (_v) {
23399       return _wrap_new_StringValueRangeProcessor__SWIG_0(nargs, args, self);
23400     }
23401   }
23402   if (argc == 2) {
23403     int _v;
23404     {
23405       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
23406       _v = SWIG_CheckState(res);
23407     }
23408     if (_v) {
23409       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
23410       _v = SWIG_CheckState(res);
23411       if (_v) {
23412         return _wrap_new_StringValueRangeProcessor__SWIG_2(nargs, args, self);
23413       }
23414     }
23415   }
23416   if (argc == 3) {
23417     int _v;
23418     {
23419       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
23420       _v = SWIG_CheckState(res);
23421     }
23422     if (_v) {
23423       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
23424       _v = SWIG_CheckState(res);
23425       if (_v) {
23426         {
23427           int res = SWIG_AsVal_bool(argv[2], NULL);
23428           _v = SWIG_CheckState(res);
23429         }
23430         if (_v) {
23431           return _wrap_new_StringValueRangeProcessor__SWIG_1(nargs, args, self);
23432         }
23433       }
23434     }
23435   }
23436 
23437 fail:
23438   Ruby_Format_OverloadedError( argc, 3, "StringValueRangeProcessor.new",
23439     "    StringValueRangeProcessor.new(Xapian::valueno slot_)\n"
23440     "    StringValueRangeProcessor.new(Xapian::valueno slot_, std::string const &str_, bool prefix_)\n"
23441     "    StringValueRangeProcessor.new(Xapian::valueno slot_, std::string const &str_)\n");
23442 
23443   return Qnil;
23444 }
23445 
23446 
23447 SWIGINTERN VALUE
_wrap_StringValueRangeProcessor___call__(int argc,VALUE * argv,VALUE self)23448 _wrap_StringValueRangeProcessor___call__(int argc, VALUE *argv, VALUE self) {
23449   Xapian::StringValueRangeProcessor *arg1 = (Xapian::StringValueRangeProcessor *) 0 ;
23450   std::string *arg2 = 0 ;
23451   std::string *arg3 = 0 ;
23452   void *argp1 = 0 ;
23453   int res1 = 0 ;
23454   void *argp2 = 0 ;
23455   int res2 = 0 ;
23456   void *argp3 = 0 ;
23457   int res3 = 0 ;
23458   Xapian::valueno result;
23459   VALUE vresult = Qnil;
23460 
23461   if ((argc < 2) || (argc > 2)) {
23462     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
23463   }
23464   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__StringValueRangeProcessor, 0 |  0 );
23465   if (!SWIG_IsOK(res1)) {
23466     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::StringValueRangeProcessor *","operator ()", 1, self ));
23467   }
23468   arg1 = reinterpret_cast< Xapian::StringValueRangeProcessor * >(argp1);
23469   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__string,  0 );
23470   if (!SWIG_IsOK(res2)) {
23471     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string &","operator ()", 2, argv[0] ));
23472   }
23473   if (!argp2) {
23474     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string &","operator ()", 2, argv[0]));
23475   }
23476   arg2 = reinterpret_cast< std::string * >(argp2);
23477   res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_std__string,  0 );
23478   if (!SWIG_IsOK(res3)) {
23479     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string &","operator ()", 3, argv[1] ));
23480   }
23481   if (!argp3) {
23482     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string &","operator ()", 3, argv[1]));
23483   }
23484   arg3 = reinterpret_cast< std::string * >(argp3);
23485   {
23486     try {
23487       result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
23488     } catch (...) {
23489       string msg;
23490       int code = XapianExceptionHandler(msg);
23491       SWIG_exception(code, msg.c_str());
23492     }
23493   }
23494   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
23495   return vresult;
23496 fail:
23497   return Qnil;
23498 }
23499 
23500 
23501 SWIGINTERN void
free_Xapian_StringValueRangeProcessor(void * self)23502 free_Xapian_StringValueRangeProcessor(void *self) {
23503     Xapian::StringValueRangeProcessor *arg1 = (Xapian::StringValueRangeProcessor *)self;
23504     delete arg1;
23505 }
23506 
23507 static swig_class SwigClassDateValueRangeProcessor;
23508 
23509 SWIGINTERN VALUE
_wrap_new_DateValueRangeProcessor__SWIG_0(int argc,VALUE * argv,VALUE self)23510 _wrap_new_DateValueRangeProcessor__SWIG_0(int argc, VALUE *argv, VALUE self) {
23511   Xapian::valueno arg1 ;
23512   bool arg2 ;
23513   int arg3 ;
23514   unsigned int val1 ;
23515   int ecode1 = 0 ;
23516   bool val2 ;
23517   int ecode2 = 0 ;
23518   int val3 ;
23519   int ecode3 = 0 ;
23520   const char *classname SWIGUNUSED = "Xapian::DateValueRangeProcessor";
23521   Xapian::DateValueRangeProcessor *result = 0 ;
23522 
23523   if ((argc < 3) || (argc > 3)) {
23524     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
23525   }
23526   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
23527   if (!SWIG_IsOK(ecode1)) {
23528     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","DateValueRangeProcessor", 1, argv[0] ));
23529   }
23530   arg1 = static_cast< Xapian::valueno >(val1);
23531   ecode2 = SWIG_AsVal_bool(argv[1], &val2);
23532   if (!SWIG_IsOK(ecode2)) {
23533     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","DateValueRangeProcessor", 2, argv[1] ));
23534   }
23535   arg2 = static_cast< bool >(val2);
23536   ecode3 = SWIG_AsVal_int(argv[2], &val3);
23537   if (!SWIG_IsOK(ecode3)) {
23538     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","DateValueRangeProcessor", 3, argv[2] ));
23539   }
23540   arg3 = static_cast< int >(val3);
23541   {
23542     try {
23543       result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,arg2,arg3);
23544       DATA_PTR(self) = result;
23545     } catch (...) {
23546       string msg;
23547       int code = XapianExceptionHandler(msg);
23548       SWIG_exception(code, msg.c_str());
23549     }
23550   }
23551   return self;
23552 fail:
23553   return Qnil;
23554 }
23555 
23556 
23557 SWIGINTERN VALUE
_wrap_new_DateValueRangeProcessor__SWIG_1(int argc,VALUE * argv,VALUE self)23558 _wrap_new_DateValueRangeProcessor__SWIG_1(int argc, VALUE *argv, VALUE self) {
23559   Xapian::valueno arg1 ;
23560   bool arg2 ;
23561   unsigned int val1 ;
23562   int ecode1 = 0 ;
23563   bool val2 ;
23564   int ecode2 = 0 ;
23565   const char *classname SWIGUNUSED = "Xapian::DateValueRangeProcessor";
23566   Xapian::DateValueRangeProcessor *result = 0 ;
23567 
23568   if ((argc < 2) || (argc > 2)) {
23569     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
23570   }
23571   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
23572   if (!SWIG_IsOK(ecode1)) {
23573     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","DateValueRangeProcessor", 1, argv[0] ));
23574   }
23575   arg1 = static_cast< Xapian::valueno >(val1);
23576   ecode2 = SWIG_AsVal_bool(argv[1], &val2);
23577   if (!SWIG_IsOK(ecode2)) {
23578     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","DateValueRangeProcessor", 2, argv[1] ));
23579   }
23580   arg2 = static_cast< bool >(val2);
23581   {
23582     try {
23583       result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,arg2);
23584       DATA_PTR(self) = result;
23585     } catch (...) {
23586       string msg;
23587       int code = XapianExceptionHandler(msg);
23588       SWIG_exception(code, msg.c_str());
23589     }
23590   }
23591   return self;
23592 fail:
23593   return Qnil;
23594 }
23595 
23596 
23597 SWIGINTERN VALUE
_wrap_new_DateValueRangeProcessor__SWIG_2(int argc,VALUE * argv,VALUE self)23598 _wrap_new_DateValueRangeProcessor__SWIG_2(int argc, VALUE *argv, VALUE self) {
23599   Xapian::valueno arg1 ;
23600   unsigned int val1 ;
23601   int ecode1 = 0 ;
23602   const char *classname SWIGUNUSED = "Xapian::DateValueRangeProcessor";
23603   Xapian::DateValueRangeProcessor *result = 0 ;
23604 
23605   if ((argc < 1) || (argc > 1)) {
23606     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
23607   }
23608   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
23609   if (!SWIG_IsOK(ecode1)) {
23610     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","DateValueRangeProcessor", 1, argv[0] ));
23611   }
23612   arg1 = static_cast< Xapian::valueno >(val1);
23613   {
23614     try {
23615       result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1);
23616       DATA_PTR(self) = result;
23617     } catch (...) {
23618       string msg;
23619       int code = XapianExceptionHandler(msg);
23620       SWIG_exception(code, msg.c_str());
23621     }
23622   }
23623   return self;
23624 fail:
23625   return Qnil;
23626 }
23627 
23628 
23629 SWIGINTERN VALUE
_wrap_new_DateValueRangeProcessor__SWIG_3(int argc,VALUE * argv,VALUE self)23630 _wrap_new_DateValueRangeProcessor__SWIG_3(int argc, VALUE *argv, VALUE self) {
23631   Xapian::valueno arg1 ;
23632   std::string *arg2 = 0 ;
23633   bool arg3 ;
23634   bool arg4 ;
23635   int arg5 ;
23636   unsigned int val1 ;
23637   int ecode1 = 0 ;
23638   int res2 = SWIG_OLDOBJ ;
23639   bool val3 ;
23640   int ecode3 = 0 ;
23641   bool val4 ;
23642   int ecode4 = 0 ;
23643   int val5 ;
23644   int ecode5 = 0 ;
23645   const char *classname SWIGUNUSED = "Xapian::DateValueRangeProcessor";
23646   Xapian::DateValueRangeProcessor *result = 0 ;
23647 
23648   if ((argc < 5) || (argc > 5)) {
23649     rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
23650   }
23651   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
23652   if (!SWIG_IsOK(ecode1)) {
23653     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","DateValueRangeProcessor", 1, argv[0] ));
23654   }
23655   arg1 = static_cast< Xapian::valueno >(val1);
23656   {
23657     std::string *ptr = (std::string *)0;
23658     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
23659     if (!SWIG_IsOK(res2)) {
23660       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","DateValueRangeProcessor", 2, argv[1] ));
23661     }
23662     if (!ptr) {
23663       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","DateValueRangeProcessor", 2, argv[1]));
23664     }
23665     arg2 = ptr;
23666   }
23667   ecode3 = SWIG_AsVal_bool(argv[2], &val3);
23668   if (!SWIG_IsOK(ecode3)) {
23669     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","DateValueRangeProcessor", 3, argv[2] ));
23670   }
23671   arg3 = static_cast< bool >(val3);
23672   ecode4 = SWIG_AsVal_bool(argv[3], &val4);
23673   if (!SWIG_IsOK(ecode4)) {
23674     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "bool","DateValueRangeProcessor", 4, argv[3] ));
23675   }
23676   arg4 = static_cast< bool >(val4);
23677   ecode5 = SWIG_AsVal_int(argv[4], &val5);
23678   if (!SWIG_IsOK(ecode5)) {
23679     SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "int","DateValueRangeProcessor", 5, argv[4] ));
23680   }
23681   arg5 = static_cast< int >(val5);
23682   {
23683     try {
23684       result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3,arg4,arg5);
23685       DATA_PTR(self) = result;
23686     } catch (...) {
23687       string msg;
23688       int code = XapianExceptionHandler(msg);
23689       SWIG_exception(code, msg.c_str());
23690     }
23691   }
23692   if (SWIG_IsNewObj(res2)) delete arg2;
23693   return self;
23694 fail:
23695   if (SWIG_IsNewObj(res2)) delete arg2;
23696   return Qnil;
23697 }
23698 
23699 
23700 SWIGINTERN VALUE
_wrap_new_DateValueRangeProcessor__SWIG_4(int argc,VALUE * argv,VALUE self)23701 _wrap_new_DateValueRangeProcessor__SWIG_4(int argc, VALUE *argv, VALUE self) {
23702   Xapian::valueno arg1 ;
23703   std::string *arg2 = 0 ;
23704   bool arg3 ;
23705   bool arg4 ;
23706   unsigned int val1 ;
23707   int ecode1 = 0 ;
23708   int res2 = SWIG_OLDOBJ ;
23709   bool val3 ;
23710   int ecode3 = 0 ;
23711   bool val4 ;
23712   int ecode4 = 0 ;
23713   const char *classname SWIGUNUSED = "Xapian::DateValueRangeProcessor";
23714   Xapian::DateValueRangeProcessor *result = 0 ;
23715 
23716   if ((argc < 4) || (argc > 4)) {
23717     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
23718   }
23719   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
23720   if (!SWIG_IsOK(ecode1)) {
23721     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","DateValueRangeProcessor", 1, argv[0] ));
23722   }
23723   arg1 = static_cast< Xapian::valueno >(val1);
23724   {
23725     std::string *ptr = (std::string *)0;
23726     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
23727     if (!SWIG_IsOK(res2)) {
23728       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","DateValueRangeProcessor", 2, argv[1] ));
23729     }
23730     if (!ptr) {
23731       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","DateValueRangeProcessor", 2, argv[1]));
23732     }
23733     arg2 = ptr;
23734   }
23735   ecode3 = SWIG_AsVal_bool(argv[2], &val3);
23736   if (!SWIG_IsOK(ecode3)) {
23737     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","DateValueRangeProcessor", 3, argv[2] ));
23738   }
23739   arg3 = static_cast< bool >(val3);
23740   ecode4 = SWIG_AsVal_bool(argv[3], &val4);
23741   if (!SWIG_IsOK(ecode4)) {
23742     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "bool","DateValueRangeProcessor", 4, argv[3] ));
23743   }
23744   arg4 = static_cast< bool >(val4);
23745   {
23746     try {
23747       result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3,arg4);
23748       DATA_PTR(self) = result;
23749     } catch (...) {
23750       string msg;
23751       int code = XapianExceptionHandler(msg);
23752       SWIG_exception(code, msg.c_str());
23753     }
23754   }
23755   if (SWIG_IsNewObj(res2)) delete arg2;
23756   return self;
23757 fail:
23758   if (SWIG_IsNewObj(res2)) delete arg2;
23759   return Qnil;
23760 }
23761 
23762 
23763 SWIGINTERN VALUE
_wrap_new_DateValueRangeProcessor__SWIG_5(int argc,VALUE * argv,VALUE self)23764 _wrap_new_DateValueRangeProcessor__SWIG_5(int argc, VALUE *argv, VALUE self) {
23765   Xapian::valueno arg1 ;
23766   std::string *arg2 = 0 ;
23767   bool arg3 ;
23768   unsigned int val1 ;
23769   int ecode1 = 0 ;
23770   int res2 = SWIG_OLDOBJ ;
23771   bool val3 ;
23772   int ecode3 = 0 ;
23773   const char *classname SWIGUNUSED = "Xapian::DateValueRangeProcessor";
23774   Xapian::DateValueRangeProcessor *result = 0 ;
23775 
23776   if ((argc < 3) || (argc > 3)) {
23777     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
23778   }
23779   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
23780   if (!SWIG_IsOK(ecode1)) {
23781     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","DateValueRangeProcessor", 1, argv[0] ));
23782   }
23783   arg1 = static_cast< Xapian::valueno >(val1);
23784   {
23785     std::string *ptr = (std::string *)0;
23786     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
23787     if (!SWIG_IsOK(res2)) {
23788       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","DateValueRangeProcessor", 2, argv[1] ));
23789     }
23790     if (!ptr) {
23791       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","DateValueRangeProcessor", 2, argv[1]));
23792     }
23793     arg2 = ptr;
23794   }
23795   ecode3 = SWIG_AsVal_bool(argv[2], &val3);
23796   if (!SWIG_IsOK(ecode3)) {
23797     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","DateValueRangeProcessor", 3, argv[2] ));
23798   }
23799   arg3 = static_cast< bool >(val3);
23800   {
23801     try {
23802       result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
23803       DATA_PTR(self) = result;
23804     } catch (...) {
23805       string msg;
23806       int code = XapianExceptionHandler(msg);
23807       SWIG_exception(code, msg.c_str());
23808     }
23809   }
23810   if (SWIG_IsNewObj(res2)) delete arg2;
23811   return self;
23812 fail:
23813   if (SWIG_IsNewObj(res2)) delete arg2;
23814   return Qnil;
23815 }
23816 
23817 
23818 SWIGINTERN VALUE
23819 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_DateValueRangeProcessor_allocate(VALUE self)23820 _wrap_DateValueRangeProcessor_allocate(VALUE self)
23821 #else
23822 _wrap_DateValueRangeProcessor_allocate(int argc, VALUE *argv, VALUE self)
23823 #endif
23824 {
23825   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__DateValueRangeProcessor);
23826 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
23827   rb_obj_call_init(vresult, argc, argv);
23828 #endif
23829   return vresult;
23830 }
23831 
23832 
23833 SWIGINTERN VALUE
_wrap_new_DateValueRangeProcessor__SWIG_6(int argc,VALUE * argv,VALUE self)23834 _wrap_new_DateValueRangeProcessor__SWIG_6(int argc, VALUE *argv, VALUE self) {
23835   Xapian::valueno arg1 ;
23836   std::string *arg2 = 0 ;
23837   unsigned int val1 ;
23838   int ecode1 = 0 ;
23839   int res2 = SWIG_OLDOBJ ;
23840   const char *classname SWIGUNUSED = "Xapian::DateValueRangeProcessor";
23841   Xapian::DateValueRangeProcessor *result = 0 ;
23842 
23843   if ((argc < 2) || (argc > 2)) {
23844     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
23845   }
23846   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
23847   if (!SWIG_IsOK(ecode1)) {
23848     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","DateValueRangeProcessor", 1, argv[0] ));
23849   }
23850   arg1 = static_cast< Xapian::valueno >(val1);
23851   {
23852     std::string *ptr = (std::string *)0;
23853     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
23854     if (!SWIG_IsOK(res2)) {
23855       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","DateValueRangeProcessor", 2, argv[1] ));
23856     }
23857     if (!ptr) {
23858       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","DateValueRangeProcessor", 2, argv[1]));
23859     }
23860     arg2 = ptr;
23861   }
23862   {
23863     try {
23864       result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2);
23865       DATA_PTR(self) = result;
23866     } catch (...) {
23867       string msg;
23868       int code = XapianExceptionHandler(msg);
23869       SWIG_exception(code, msg.c_str());
23870     }
23871   }
23872   if (SWIG_IsNewObj(res2)) delete arg2;
23873   return self;
23874 fail:
23875   if (SWIG_IsNewObj(res2)) delete arg2;
23876   return Qnil;
23877 }
23878 
23879 
_wrap_new_DateValueRangeProcessor(int nargs,VALUE * args,VALUE self)23880 SWIGINTERN VALUE _wrap_new_DateValueRangeProcessor(int nargs, VALUE *args, VALUE self) {
23881   int argc;
23882   VALUE argv[5];
23883   int ii;
23884 
23885   argc = nargs;
23886   if (argc > 5) SWIG_fail;
23887   for (ii = 0; (ii < argc); ++ii) {
23888     argv[ii] = args[ii];
23889   }
23890   if (argc == 1) {
23891     int _v;
23892     {
23893       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
23894       _v = SWIG_CheckState(res);
23895     }
23896     if (_v) {
23897       return _wrap_new_DateValueRangeProcessor__SWIG_2(nargs, args, self);
23898     }
23899   }
23900   if (argc == 2) {
23901     int _v;
23902     {
23903       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
23904       _v = SWIG_CheckState(res);
23905     }
23906     if (_v) {
23907       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
23908       _v = SWIG_CheckState(res);
23909       if (_v) {
23910         return _wrap_new_DateValueRangeProcessor__SWIG_6(nargs, args, self);
23911       }
23912     }
23913   }
23914   if (argc == 2) {
23915     int _v;
23916     {
23917       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
23918       _v = SWIG_CheckState(res);
23919     }
23920     if (_v) {
23921       {
23922         int res = SWIG_AsVal_bool(argv[1], NULL);
23923         _v = SWIG_CheckState(res);
23924       }
23925       if (_v) {
23926         return _wrap_new_DateValueRangeProcessor__SWIG_1(nargs, args, self);
23927       }
23928     }
23929   }
23930   if (argc == 3) {
23931     int _v;
23932     {
23933       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
23934       _v = SWIG_CheckState(res);
23935     }
23936     if (_v) {
23937       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
23938       _v = SWIG_CheckState(res);
23939       if (_v) {
23940         {
23941           int res = SWIG_AsVal_bool(argv[2], NULL);
23942           _v = SWIG_CheckState(res);
23943         }
23944         if (_v) {
23945           return _wrap_new_DateValueRangeProcessor__SWIG_5(nargs, args, self);
23946         }
23947       }
23948     }
23949   }
23950   if (argc == 3) {
23951     int _v;
23952     {
23953       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
23954       _v = SWIG_CheckState(res);
23955     }
23956     if (_v) {
23957       {
23958         int res = SWIG_AsVal_bool(argv[1], NULL);
23959         _v = SWIG_CheckState(res);
23960       }
23961       if (_v) {
23962         {
23963           int res = SWIG_AsVal_int(argv[2], NULL);
23964           _v = SWIG_CheckState(res);
23965         }
23966         if (_v) {
23967           return _wrap_new_DateValueRangeProcessor__SWIG_0(nargs, args, self);
23968         }
23969       }
23970     }
23971   }
23972   if (argc == 4) {
23973     int _v;
23974     {
23975       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
23976       _v = SWIG_CheckState(res);
23977     }
23978     if (_v) {
23979       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
23980       _v = SWIG_CheckState(res);
23981       if (_v) {
23982         {
23983           int res = SWIG_AsVal_bool(argv[2], NULL);
23984           _v = SWIG_CheckState(res);
23985         }
23986         if (_v) {
23987           {
23988             int res = SWIG_AsVal_bool(argv[3], NULL);
23989             _v = SWIG_CheckState(res);
23990           }
23991           if (_v) {
23992             return _wrap_new_DateValueRangeProcessor__SWIG_4(nargs, args, self);
23993           }
23994         }
23995       }
23996     }
23997   }
23998   if (argc == 5) {
23999     int _v;
24000     {
24001       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
24002       _v = SWIG_CheckState(res);
24003     }
24004     if (_v) {
24005       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
24006       _v = SWIG_CheckState(res);
24007       if (_v) {
24008         {
24009           int res = SWIG_AsVal_bool(argv[2], NULL);
24010           _v = SWIG_CheckState(res);
24011         }
24012         if (_v) {
24013           {
24014             int res = SWIG_AsVal_bool(argv[3], NULL);
24015             _v = SWIG_CheckState(res);
24016           }
24017           if (_v) {
24018             {
24019               int res = SWIG_AsVal_int(argv[4], NULL);
24020               _v = SWIG_CheckState(res);
24021             }
24022             if (_v) {
24023               return _wrap_new_DateValueRangeProcessor__SWIG_3(nargs, args, self);
24024             }
24025           }
24026         }
24027       }
24028     }
24029   }
24030 
24031 fail:
24032   Ruby_Format_OverloadedError( argc, 5, "DateValueRangeProcessor.new",
24033     "    DateValueRangeProcessor.new(Xapian::valueno slot_, bool prefer_mdy_, int epoch_year_)\n"
24034     "    DateValueRangeProcessor.new(Xapian::valueno slot_, bool prefer_mdy_)\n"
24035     "    DateValueRangeProcessor.new(Xapian::valueno slot_)\n"
24036     "    DateValueRangeProcessor.new(Xapian::valueno slot_, std::string const &str_, bool prefix_, bool prefer_mdy_, int epoch_year_)\n"
24037     "    DateValueRangeProcessor.new(Xapian::valueno slot_, std::string const &str_, bool prefix_, bool prefer_mdy_)\n"
24038     "    DateValueRangeProcessor.new(Xapian::valueno slot_, std::string const &str_, bool prefix_)\n"
24039     "    DateValueRangeProcessor.new(Xapian::valueno slot_, std::string const &str_)\n");
24040 
24041   return Qnil;
24042 }
24043 
24044 
24045 SWIGINTERN VALUE
_wrap_DateValueRangeProcessor___call__(int argc,VALUE * argv,VALUE self)24046 _wrap_DateValueRangeProcessor___call__(int argc, VALUE *argv, VALUE self) {
24047   Xapian::DateValueRangeProcessor *arg1 = (Xapian::DateValueRangeProcessor *) 0 ;
24048   std::string *arg2 = 0 ;
24049   std::string *arg3 = 0 ;
24050   void *argp1 = 0 ;
24051   int res1 = 0 ;
24052   void *argp2 = 0 ;
24053   int res2 = 0 ;
24054   void *argp3 = 0 ;
24055   int res3 = 0 ;
24056   Xapian::valueno result;
24057   VALUE vresult = Qnil;
24058 
24059   if ((argc < 2) || (argc > 2)) {
24060     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
24061   }
24062   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__DateValueRangeProcessor, 0 |  0 );
24063   if (!SWIG_IsOK(res1)) {
24064     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::DateValueRangeProcessor *","operator ()", 1, self ));
24065   }
24066   arg1 = reinterpret_cast< Xapian::DateValueRangeProcessor * >(argp1);
24067   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__string,  0 );
24068   if (!SWIG_IsOK(res2)) {
24069     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string &","operator ()", 2, argv[0] ));
24070   }
24071   if (!argp2) {
24072     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string &","operator ()", 2, argv[0]));
24073   }
24074   arg2 = reinterpret_cast< std::string * >(argp2);
24075   res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_std__string,  0 );
24076   if (!SWIG_IsOK(res3)) {
24077     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string &","operator ()", 3, argv[1] ));
24078   }
24079   if (!argp3) {
24080     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string &","operator ()", 3, argv[1]));
24081   }
24082   arg3 = reinterpret_cast< std::string * >(argp3);
24083   {
24084     try {
24085       result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
24086     } catch (...) {
24087       string msg;
24088       int code = XapianExceptionHandler(msg);
24089       SWIG_exception(code, msg.c_str());
24090     }
24091   }
24092   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
24093   return vresult;
24094 fail:
24095   return Qnil;
24096 }
24097 
24098 
24099 SWIGINTERN void
free_Xapian_DateValueRangeProcessor(void * self)24100 free_Xapian_DateValueRangeProcessor(void *self) {
24101     Xapian::DateValueRangeProcessor *arg1 = (Xapian::DateValueRangeProcessor *)self;
24102     delete arg1;
24103 }
24104 
24105 static swig_class SwigClassNumberValueRangeProcessor;
24106 
24107 SWIGINTERN VALUE
_wrap_new_NumberValueRangeProcessor__SWIG_0(int argc,VALUE * argv,VALUE self)24108 _wrap_new_NumberValueRangeProcessor__SWIG_0(int argc, VALUE *argv, VALUE self) {
24109   Xapian::valueno arg1 ;
24110   unsigned int val1 ;
24111   int ecode1 = 0 ;
24112   const char *classname SWIGUNUSED = "Xapian::NumberValueRangeProcessor";
24113   Xapian::NumberValueRangeProcessor *result = 0 ;
24114 
24115   if ((argc < 1) || (argc > 1)) {
24116     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
24117   }
24118   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
24119   if (!SWIG_IsOK(ecode1)) {
24120     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","NumberValueRangeProcessor", 1, argv[0] ));
24121   }
24122   arg1 = static_cast< Xapian::valueno >(val1);
24123   {
24124     try {
24125       result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1);
24126       DATA_PTR(self) = result;
24127     } catch (...) {
24128       string msg;
24129       int code = XapianExceptionHandler(msg);
24130       SWIG_exception(code, msg.c_str());
24131     }
24132   }
24133   return self;
24134 fail:
24135   return Qnil;
24136 }
24137 
24138 
24139 SWIGINTERN VALUE
_wrap_new_NumberValueRangeProcessor__SWIG_1(int argc,VALUE * argv,VALUE self)24140 _wrap_new_NumberValueRangeProcessor__SWIG_1(int argc, VALUE *argv, VALUE self) {
24141   Xapian::valueno arg1 ;
24142   std::string *arg2 = 0 ;
24143   bool arg3 ;
24144   unsigned int val1 ;
24145   int ecode1 = 0 ;
24146   int res2 = SWIG_OLDOBJ ;
24147   bool val3 ;
24148   int ecode3 = 0 ;
24149   const char *classname SWIGUNUSED = "Xapian::NumberValueRangeProcessor";
24150   Xapian::NumberValueRangeProcessor *result = 0 ;
24151 
24152   if ((argc < 3) || (argc > 3)) {
24153     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
24154   }
24155   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
24156   if (!SWIG_IsOK(ecode1)) {
24157     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","NumberValueRangeProcessor", 1, argv[0] ));
24158   }
24159   arg1 = static_cast< Xapian::valueno >(val1);
24160   {
24161     std::string *ptr = (std::string *)0;
24162     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
24163     if (!SWIG_IsOK(res2)) {
24164       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","NumberValueRangeProcessor", 2, argv[1] ));
24165     }
24166     if (!ptr) {
24167       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","NumberValueRangeProcessor", 2, argv[1]));
24168     }
24169     arg2 = ptr;
24170   }
24171   ecode3 = SWIG_AsVal_bool(argv[2], &val3);
24172   if (!SWIG_IsOK(ecode3)) {
24173     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","NumberValueRangeProcessor", 3, argv[2] ));
24174   }
24175   arg3 = static_cast< bool >(val3);
24176   {
24177     try {
24178       result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
24179       DATA_PTR(self) = result;
24180     } catch (...) {
24181       string msg;
24182       int code = XapianExceptionHandler(msg);
24183       SWIG_exception(code, msg.c_str());
24184     }
24185   }
24186   if (SWIG_IsNewObj(res2)) delete arg2;
24187   return self;
24188 fail:
24189   if (SWIG_IsNewObj(res2)) delete arg2;
24190   return Qnil;
24191 }
24192 
24193 
24194 SWIGINTERN VALUE
24195 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_NumberValueRangeProcessor_allocate(VALUE self)24196 _wrap_NumberValueRangeProcessor_allocate(VALUE self)
24197 #else
24198 _wrap_NumberValueRangeProcessor_allocate(int argc, VALUE *argv, VALUE self)
24199 #endif
24200 {
24201   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__NumberValueRangeProcessor);
24202 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
24203   rb_obj_call_init(vresult, argc, argv);
24204 #endif
24205   return vresult;
24206 }
24207 
24208 
24209 SWIGINTERN VALUE
_wrap_new_NumberValueRangeProcessor__SWIG_2(int argc,VALUE * argv,VALUE self)24210 _wrap_new_NumberValueRangeProcessor__SWIG_2(int argc, VALUE *argv, VALUE self) {
24211   Xapian::valueno arg1 ;
24212   std::string *arg2 = 0 ;
24213   unsigned int val1 ;
24214   int ecode1 = 0 ;
24215   int res2 = SWIG_OLDOBJ ;
24216   const char *classname SWIGUNUSED = "Xapian::NumberValueRangeProcessor";
24217   Xapian::NumberValueRangeProcessor *result = 0 ;
24218 
24219   if ((argc < 2) || (argc > 2)) {
24220     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
24221   }
24222   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
24223   if (!SWIG_IsOK(ecode1)) {
24224     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","NumberValueRangeProcessor", 1, argv[0] ));
24225   }
24226   arg1 = static_cast< Xapian::valueno >(val1);
24227   {
24228     std::string *ptr = (std::string *)0;
24229     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
24230     if (!SWIG_IsOK(res2)) {
24231       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","NumberValueRangeProcessor", 2, argv[1] ));
24232     }
24233     if (!ptr) {
24234       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","NumberValueRangeProcessor", 2, argv[1]));
24235     }
24236     arg2 = ptr;
24237   }
24238   {
24239     try {
24240       result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1,(std::string const &)*arg2);
24241       DATA_PTR(self) = result;
24242     } catch (...) {
24243       string msg;
24244       int code = XapianExceptionHandler(msg);
24245       SWIG_exception(code, msg.c_str());
24246     }
24247   }
24248   if (SWIG_IsNewObj(res2)) delete arg2;
24249   return self;
24250 fail:
24251   if (SWIG_IsNewObj(res2)) delete arg2;
24252   return Qnil;
24253 }
24254 
24255 
_wrap_new_NumberValueRangeProcessor(int nargs,VALUE * args,VALUE self)24256 SWIGINTERN VALUE _wrap_new_NumberValueRangeProcessor(int nargs, VALUE *args, VALUE self) {
24257   int argc;
24258   VALUE argv[3];
24259   int ii;
24260 
24261   argc = nargs;
24262   if (argc > 3) SWIG_fail;
24263   for (ii = 0; (ii < argc); ++ii) {
24264     argv[ii] = args[ii];
24265   }
24266   if (argc == 1) {
24267     int _v;
24268     {
24269       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
24270       _v = SWIG_CheckState(res);
24271     }
24272     if (_v) {
24273       return _wrap_new_NumberValueRangeProcessor__SWIG_0(nargs, args, self);
24274     }
24275   }
24276   if (argc == 2) {
24277     int _v;
24278     {
24279       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
24280       _v = SWIG_CheckState(res);
24281     }
24282     if (_v) {
24283       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
24284       _v = SWIG_CheckState(res);
24285       if (_v) {
24286         return _wrap_new_NumberValueRangeProcessor__SWIG_2(nargs, args, self);
24287       }
24288     }
24289   }
24290   if (argc == 3) {
24291     int _v;
24292     {
24293       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
24294       _v = SWIG_CheckState(res);
24295     }
24296     if (_v) {
24297       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
24298       _v = SWIG_CheckState(res);
24299       if (_v) {
24300         {
24301           int res = SWIG_AsVal_bool(argv[2], NULL);
24302           _v = SWIG_CheckState(res);
24303         }
24304         if (_v) {
24305           return _wrap_new_NumberValueRangeProcessor__SWIG_1(nargs, args, self);
24306         }
24307       }
24308     }
24309   }
24310 
24311 fail:
24312   Ruby_Format_OverloadedError( argc, 3, "NumberValueRangeProcessor.new",
24313     "    NumberValueRangeProcessor.new(Xapian::valueno slot_)\n"
24314     "    NumberValueRangeProcessor.new(Xapian::valueno slot_, std::string const &str_, bool prefix_)\n"
24315     "    NumberValueRangeProcessor.new(Xapian::valueno slot_, std::string const &str_)\n");
24316 
24317   return Qnil;
24318 }
24319 
24320 
24321 SWIGINTERN VALUE
_wrap_NumberValueRangeProcessor___call__(int argc,VALUE * argv,VALUE self)24322 _wrap_NumberValueRangeProcessor___call__(int argc, VALUE *argv, VALUE self) {
24323   Xapian::NumberValueRangeProcessor *arg1 = (Xapian::NumberValueRangeProcessor *) 0 ;
24324   std::string *arg2 = 0 ;
24325   std::string *arg3 = 0 ;
24326   void *argp1 = 0 ;
24327   int res1 = 0 ;
24328   void *argp2 = 0 ;
24329   int res2 = 0 ;
24330   void *argp3 = 0 ;
24331   int res3 = 0 ;
24332   Xapian::valueno result;
24333   VALUE vresult = Qnil;
24334 
24335   if ((argc < 2) || (argc > 2)) {
24336     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
24337   }
24338   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__NumberValueRangeProcessor, 0 |  0 );
24339   if (!SWIG_IsOK(res1)) {
24340     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::NumberValueRangeProcessor *","operator ()", 1, self ));
24341   }
24342   arg1 = reinterpret_cast< Xapian::NumberValueRangeProcessor * >(argp1);
24343   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__string,  0 );
24344   if (!SWIG_IsOK(res2)) {
24345     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string &","operator ()", 2, argv[0] ));
24346   }
24347   if (!argp2) {
24348     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string &","operator ()", 2, argv[0]));
24349   }
24350   arg2 = reinterpret_cast< std::string * >(argp2);
24351   res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_std__string,  0 );
24352   if (!SWIG_IsOK(res3)) {
24353     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string &","operator ()", 3, argv[1] ));
24354   }
24355   if (!argp3) {
24356     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string &","operator ()", 3, argv[1]));
24357   }
24358   arg3 = reinterpret_cast< std::string * >(argp3);
24359   {
24360     try {
24361       result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
24362     } catch (...) {
24363       string msg;
24364       int code = XapianExceptionHandler(msg);
24365       SWIG_exception(code, msg.c_str());
24366     }
24367   }
24368   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
24369   return vresult;
24370 fail:
24371   return Qnil;
24372 }
24373 
24374 
24375 SWIGINTERN void
free_Xapian_NumberValueRangeProcessor(void * self)24376 free_Xapian_NumberValueRangeProcessor(void *self) {
24377     Xapian::NumberValueRangeProcessor *arg1 = (Xapian::NumberValueRangeProcessor *)self;
24378     delete arg1;
24379 }
24380 
24381 static swig_class SwigClassFieldProcessor;
24382 
24383 SWIGINTERN VALUE
24384 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_FieldProcessor_allocate(VALUE self)24385 _wrap_FieldProcessor_allocate(VALUE self)
24386 #else
24387 _wrap_FieldProcessor_allocate(int argc, VALUE *argv, VALUE self)
24388 #endif
24389 {
24390   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__FieldProcessor);
24391 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
24392   rb_obj_call_init(vresult, argc, argv);
24393 #endif
24394   return vresult;
24395 }
24396 
24397 
24398 SWIGINTERN VALUE
_wrap_new_FieldProcessor(int argc,VALUE * argv,VALUE self)24399 _wrap_new_FieldProcessor(int argc, VALUE *argv, VALUE self) {
24400   VALUE arg1 = (VALUE) 0 ;
24401   const char *classname SWIGUNUSED = "Xapian::FieldProcessor";
24402   Xapian::FieldProcessor *result = 0 ;
24403 
24404   if ((argc < 0) || (argc > 0)) {
24405     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
24406   }
24407   arg1 = self;
24408   {
24409     try {
24410       if ( strcmp(rb_obj_classname(self), classname) != 0 ) {
24411         /* subclassed */
24412         result = (Xapian::FieldProcessor *)new SwigDirector_FieldProcessor(arg1);
24413       } else {
24414         rb_raise(rb_eNameError,"accessing abstract class or protected constructor");
24415         return Qnil;
24416       }
24417 
24418       DATA_PTR(self) = result;
24419     } catch (...) {
24420       string msg;
24421       int code = XapianExceptionHandler(msg);
24422       SWIG_exception(code, msg.c_str());
24423     }
24424   }
24425   return self;
24426 fail:
24427   return Qnil;
24428 }
24429 
24430 
24431 SWIGINTERN void
free_Xapian_FieldProcessor(void * self)24432 free_Xapian_FieldProcessor(void *self) {
24433     Xapian::FieldProcessor *arg1 = (Xapian::FieldProcessor *)self;
24434     delete arg1;
24435 }
24436 
24437 SWIGINTERN VALUE
_wrap_FieldProcessor___call__(int argc,VALUE * argv,VALUE self)24438 _wrap_FieldProcessor___call__(int argc, VALUE *argv, VALUE self) {
24439   Xapian::FieldProcessor *arg1 = (Xapian::FieldProcessor *) 0 ;
24440   std::string *arg2 = 0 ;
24441   void *argp1 = 0 ;
24442   int res1 = 0 ;
24443   int res2 = SWIG_OLDOBJ ;
24444   Swig::Director *director = 0;
24445   bool upcall = false;
24446   Xapian::Query result;
24447   VALUE vresult = Qnil;
24448 
24449   if ((argc < 1) || (argc > 1)) {
24450     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
24451   }
24452   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__FieldProcessor, 0 |  0 );
24453   if (!SWIG_IsOK(res1)) {
24454     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::FieldProcessor *","operator ()", 1, self ));
24455   }
24456   arg1 = reinterpret_cast< Xapian::FieldProcessor * >(argp1);
24457   {
24458     std::string *ptr = (std::string *)0;
24459     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
24460     if (!SWIG_IsOK(res2)) {
24461       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","operator ()", 2, argv[0] ));
24462     }
24463     if (!ptr) {
24464       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","operator ()", 2, argv[0]));
24465     }
24466     arg2 = ptr;
24467   }
24468   director = dynamic_cast<Swig::Director *>(arg1);
24469   upcall = (director && (director->swig_get_self() == self));
24470   try {
24471     {
24472       try {
24473         if (upcall) {
24474           Swig::DirectorPureVirtualException::raise("Xapian::FieldProcessor::operator ()");
24475         } else {
24476           result = (arg1)->operator ()((std::string const &)*arg2);
24477         }
24478       } catch (...) {
24479         string msg;
24480         int code = XapianExceptionHandler(msg);
24481         SWIG_exception(code, msg.c_str());
24482       }
24483     }
24484   } catch (Swig::DirectorException& e) {
24485     rb_exc_raise(e.getError());
24486     SWIG_fail;
24487   }
24488   vresult = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN |  0 );
24489   if (SWIG_IsNewObj(res2)) delete arg2;
24490   return vresult;
24491 fail:
24492   if (SWIG_IsNewObj(res2)) delete arg2;
24493   return Qnil;
24494 }
24495 
24496 
24497 SWIGINTERN VALUE
_wrap_FieldProcessor_release(int argc,VALUE * argv,VALUE self)24498 _wrap_FieldProcessor_release(int argc, VALUE *argv, VALUE self) {
24499   Xapian::FieldProcessor *arg1 = (Xapian::FieldProcessor *) 0 ;
24500   void *argp1 = 0 ;
24501   int res1 = 0 ;
24502   Swig::Director *director = 0;
24503   Xapian::FieldProcessor *result = 0 ;
24504   VALUE vresult = Qnil;
24505 
24506   if ((argc < 0) || (argc > 0)) {
24507     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
24508   }
24509   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__FieldProcessor, 0 |  0 );
24510   if (!SWIG_IsOK(res1)) {
24511     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::FieldProcessor const *","release", 1, self ));
24512   }
24513   arg1 = reinterpret_cast< Xapian::FieldProcessor * >(argp1);
24514   {
24515     try {
24516       result = (Xapian::FieldProcessor *)((Xapian::FieldProcessor const *)arg1)->release();
24517     } catch (...) {
24518       string msg;
24519       int code = XapianExceptionHandler(msg);
24520       SWIG_exception(code, msg.c_str());
24521     }
24522   }
24523   director = dynamic_cast<Swig::Director *>(result);
24524   if (director) {
24525     vresult = director->swig_get_self();
24526   } else {
24527     vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__FieldProcessor, 0 |  0 );
24528   }
24529   return vresult;
24530 fail:
24531   return Qnil;
24532 }
24533 
24534 
24535 SWIGINTERN VALUE
_wrap_disown_FieldProcessor(int argc,VALUE * argv,VALUE self)24536 _wrap_disown_FieldProcessor(int argc, VALUE *argv, VALUE self) {
24537   Xapian::FieldProcessor *arg1 = (Xapian::FieldProcessor *) 0 ;
24538   void *argp1 = 0 ;
24539   int res1 = 0 ;
24540 
24541   if ((argc < 1) || (argc > 1)) {
24542     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
24543   }
24544   res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Xapian__FieldProcessor, 0 |  0 );
24545   if (!SWIG_IsOK(res1)) {
24546     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::FieldProcessor *","disown_FieldProcessor", 1, argv[0] ));
24547   }
24548   arg1 = reinterpret_cast< Xapian::FieldProcessor * >(argp1);
24549   {
24550     Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
24551     if (director) director->swig_disown();
24552   }
24553 
24554   return Qnil;
24555 fail:
24556   return Qnil;
24557 }
24558 
24559 
24560 static swig_class SwigClassQueryParser;
24561 
24562 SWIGINTERN VALUE
24563 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_QueryParser_allocate(VALUE self)24564 _wrap_QueryParser_allocate(VALUE self)
24565 #else
24566 _wrap_QueryParser_allocate(int argc, VALUE *argv, VALUE self)
24567 #endif
24568 {
24569   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__QueryParser);
24570 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
24571   rb_obj_call_init(vresult, argc, argv);
24572 #endif
24573   return vresult;
24574 }
24575 
24576 
24577 SWIGINTERN VALUE
_wrap_new_QueryParser(int argc,VALUE * argv,VALUE self)24578 _wrap_new_QueryParser(int argc, VALUE *argv, VALUE self) {
24579   const char *classname SWIGUNUSED = "Xapian::QueryParser";
24580   Xapian::QueryParser *result = 0 ;
24581 
24582   if ((argc < 0) || (argc > 0)) {
24583     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
24584   }
24585   {
24586     try {
24587       result = (Xapian::QueryParser *)new Xapian::QueryParser();
24588       DATA_PTR(self) = result;
24589     } catch (...) {
24590       string msg;
24591       int code = XapianExceptionHandler(msg);
24592       SWIG_exception(code, msg.c_str());
24593     }
24594   }
24595   return self;
24596 fail:
24597   return Qnil;
24598 }
24599 
24600 
24601 SWIGINTERN void
free_Xapian_QueryParser(void * self)24602 free_Xapian_QueryParser(void *self) {
24603     Xapian::QueryParser *arg1 = (Xapian::QueryParser *)self;
24604     delete arg1;
24605 }
24606 
24607 SWIGINTERN VALUE
_wrap_QueryParser_stemmere___(int argc,VALUE * argv,VALUE self)24608 _wrap_QueryParser_stemmere___(int argc, VALUE *argv, VALUE self) {
24609   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
24610   Xapian::Stem *arg2 = 0 ;
24611   void *argp1 = 0 ;
24612   int res1 = 0 ;
24613   void *argp2 ;
24614   int res2 = 0 ;
24615 
24616   if ((argc < 1) || (argc > 1)) {
24617     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
24618   }
24619   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
24620   if (!SWIG_IsOK(res1)) {
24621     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","set_stemmer", 1, self ));
24622   }
24623   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
24624   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Stem,  0 );
24625   if (!SWIG_IsOK(res2)) {
24626     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Stem const &","set_stemmer", 2, argv[0] ));
24627   }
24628   if (!argp2) {
24629     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Stem const &","set_stemmer", 2, argv[0]));
24630   }
24631   arg2 = reinterpret_cast< Xapian::Stem * >(argp2);
24632   {
24633     try {
24634       (arg1)->set_stemmer((Xapian::Stem const &)*arg2);
24635     } catch (...) {
24636       string msg;
24637       int code = XapianExceptionHandler(msg);
24638       SWIG_exception(code, msg.c_str());
24639     }
24640   }
24641   return Qnil;
24642 fail:
24643   return Qnil;
24644 }
24645 
24646 
24647 SWIGINTERN VALUE
_wrap_QueryParser_stemming_strategye___(int argc,VALUE * argv,VALUE self)24648 _wrap_QueryParser_stemming_strategye___(int argc, VALUE *argv, VALUE self) {
24649   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
24650   Xapian::QueryParser::stem_strategy arg2 ;
24651   void *argp1 = 0 ;
24652   int res1 = 0 ;
24653   int val2 ;
24654   int ecode2 = 0 ;
24655 
24656   if ((argc < 1) || (argc > 1)) {
24657     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
24658   }
24659   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
24660   if (!SWIG_IsOK(res1)) {
24661     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","set_stemming_strategy", 1, self ));
24662   }
24663   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
24664   ecode2 = SWIG_AsVal_int(argv[0], &val2);
24665   if (!SWIG_IsOK(ecode2)) {
24666     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::QueryParser::stem_strategy","set_stemming_strategy", 2, argv[0] ));
24667   }
24668   arg2 = static_cast< Xapian::QueryParser::stem_strategy >(val2);
24669   {
24670     try {
24671       (arg1)->set_stemming_strategy(arg2);
24672     } catch (...) {
24673       string msg;
24674       int code = XapianExceptionHandler(msg);
24675       SWIG_exception(code, msg.c_str());
24676     }
24677   }
24678   return Qnil;
24679 fail:
24680   return Qnil;
24681 }
24682 
24683 
24684 SWIGINTERN VALUE
_wrap_QueryParser_stoppere_____SWIG_0(int argc,VALUE * argv,VALUE self)24685 _wrap_QueryParser_stoppere_____SWIG_0(int argc, VALUE *argv, VALUE self) {
24686   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
24687   Xapian::Stopper *arg2 = (Xapian::Stopper *) 0 ;
24688   void *argp1 = 0 ;
24689   int res1 = 0 ;
24690   void *argp2 = 0 ;
24691   int res2 = 0 ;
24692 
24693   if ((argc < 1) || (argc > 1)) {
24694     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
24695   }
24696   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
24697   if (!SWIG_IsOK(res1)) {
24698     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","set_stopper", 1, self ));
24699   }
24700   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
24701   res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Xapian__Stopper, 0 |  0 );
24702   if (!SWIG_IsOK(res2)) {
24703     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Stopper const *","set_stopper", 2, argv[0] ));
24704   }
24705   arg2 = reinterpret_cast< Xapian::Stopper * >(argp2);
24706   {
24707     try {
24708       (arg1)->set_stopper((Xapian::Stopper const *)arg2);
24709     } catch (...) {
24710       string msg;
24711       int code = XapianExceptionHandler(msg);
24712       SWIG_exception(code, msg.c_str());
24713     }
24714   }
24715   return Qnil;
24716 fail:
24717   return Qnil;
24718 }
24719 
24720 
24721 SWIGINTERN VALUE
_wrap_QueryParser_stoppere_____SWIG_1(int argc,VALUE * argv,VALUE self)24722 _wrap_QueryParser_stoppere_____SWIG_1(int argc, VALUE *argv, VALUE self) {
24723   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
24724   void *argp1 = 0 ;
24725   int res1 = 0 ;
24726 
24727   if ((argc < 0) || (argc > 0)) {
24728     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
24729   }
24730   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
24731   if (!SWIG_IsOK(res1)) {
24732     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","set_stopper", 1, self ));
24733   }
24734   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
24735   {
24736     try {
24737       (arg1)->set_stopper();
24738     } catch (...) {
24739       string msg;
24740       int code = XapianExceptionHandler(msg);
24741       SWIG_exception(code, msg.c_str());
24742     }
24743   }
24744   return Qnil;
24745 fail:
24746   return Qnil;
24747 }
24748 
24749 
_wrap_QueryParser_stoppere___(int nargs,VALUE * args,VALUE self)24750 SWIGINTERN VALUE _wrap_QueryParser_stoppere___(int nargs, VALUE *args, VALUE self) {
24751   int argc;
24752   VALUE argv[3];
24753   int ii;
24754 
24755   argc = nargs + 1;
24756   argv[0] = self;
24757   if (argc > 3) SWIG_fail;
24758   for (ii = 1; (ii < argc); ++ii) {
24759     argv[ii] = args[ii-1];
24760   }
24761   if (argc == 1) {
24762     int _v;
24763     void *vptr = 0;
24764     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
24765     _v = SWIG_CheckState(res);
24766     if (_v) {
24767       return _wrap_QueryParser_stoppere_____SWIG_1(nargs, args, self);
24768     }
24769   }
24770   if (argc == 2) {
24771     int _v;
24772     void *vptr = 0;
24773     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
24774     _v = SWIG_CheckState(res);
24775     if (_v) {
24776       void *vptr = 0;
24777       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__Stopper, 0);
24778       _v = SWIG_CheckState(res);
24779       if (_v) {
24780         return _wrap_QueryParser_stoppere_____SWIG_0(nargs, args, self);
24781       }
24782     }
24783   }
24784 
24785 fail:
24786   Ruby_Format_OverloadedError( argc, 3, "QueryParser.stopper=",
24787     "    void QueryParser.stopper=(Xapian::Stopper const *stop)\n"
24788     "    void QueryParser.stopper=()\n");
24789 
24790   return Qnil;
24791 }
24792 
24793 
24794 SWIGINTERN VALUE
_wrap_QueryParser_default_ope___(int argc,VALUE * argv,VALUE self)24795 _wrap_QueryParser_default_ope___(int argc, VALUE *argv, VALUE self) {
24796   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
24797   Xapian::Query::op arg2 ;
24798   void *argp1 = 0 ;
24799   int res1 = 0 ;
24800   int val2 ;
24801   int ecode2 = 0 ;
24802 
24803   if ((argc < 1) || (argc > 1)) {
24804     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
24805   }
24806   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
24807   if (!SWIG_IsOK(res1)) {
24808     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","set_default_op", 1, self ));
24809   }
24810   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
24811   ecode2 = SWIG_AsVal_int(argv[0], &val2);
24812   if (!SWIG_IsOK(ecode2)) {
24813     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::Query::op","set_default_op", 2, argv[0] ));
24814   }
24815   arg2 = static_cast< Xapian::Query::op >(val2);
24816   {
24817     try {
24818       (arg1)->set_default_op(arg2);
24819     } catch (...) {
24820       string msg;
24821       int code = XapianExceptionHandler(msg);
24822       SWIG_exception(code, msg.c_str());
24823     }
24824   }
24825   return Qnil;
24826 fail:
24827   return Qnil;
24828 }
24829 
24830 
24831 SWIGINTERN VALUE
_wrap_QueryParser_default_op(int argc,VALUE * argv,VALUE self)24832 _wrap_QueryParser_default_op(int argc, VALUE *argv, VALUE self) {
24833   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
24834   void *argp1 = 0 ;
24835   int res1 = 0 ;
24836   Xapian::Query::op result;
24837   VALUE vresult = Qnil;
24838 
24839   if ((argc < 0) || (argc > 0)) {
24840     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
24841   }
24842   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
24843   if (!SWIG_IsOK(res1)) {
24844     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser const *","get_default_op", 1, self ));
24845   }
24846   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
24847   {
24848     try {
24849       result = (Xapian::Query::op)((Xapian::QueryParser const *)arg1)->get_default_op();
24850     } catch (...) {
24851       string msg;
24852       int code = XapianExceptionHandler(msg);
24853       SWIG_exception(code, msg.c_str());
24854     }
24855   }
24856   vresult = SWIG_From_int(static_cast< int >(result));
24857   return vresult;
24858 fail:
24859   return Qnil;
24860 }
24861 
24862 
24863 SWIGINTERN VALUE
_wrap_QueryParser_databasee___(int argc,VALUE * argv,VALUE self)24864 _wrap_QueryParser_databasee___(int argc, VALUE *argv, VALUE self) {
24865   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
24866   Xapian::Database *arg2 = 0 ;
24867   void *argp1 = 0 ;
24868   int res1 = 0 ;
24869   void *argp2 ;
24870   int res2 = 0 ;
24871 
24872   if ((argc < 1) || (argc > 1)) {
24873     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
24874   }
24875   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
24876   if (!SWIG_IsOK(res1)) {
24877     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","set_database", 1, self ));
24878   }
24879   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
24880   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Database,  0 );
24881   if (!SWIG_IsOK(res2)) {
24882     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Database const &","set_database", 2, argv[0] ));
24883   }
24884   if (!argp2) {
24885     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Database const &","set_database", 2, argv[0]));
24886   }
24887   arg2 = reinterpret_cast< Xapian::Database * >(argp2);
24888   {
24889     try {
24890       (arg1)->set_database((Xapian::Database const &)*arg2);
24891     } catch (...) {
24892       string msg;
24893       int code = XapianExceptionHandler(msg);
24894       SWIG_exception(code, msg.c_str());
24895     }
24896   }
24897   return Qnil;
24898 fail:
24899   return Qnil;
24900 }
24901 
24902 
24903 SWIGINTERN VALUE
_wrap_QueryParser_set_max_expansion__SWIG_0(int argc,VALUE * argv,VALUE self)24904 _wrap_QueryParser_set_max_expansion__SWIG_0(int argc, VALUE *argv, VALUE self) {
24905   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
24906   Xapian::termcount arg2 ;
24907   int arg3 ;
24908   unsigned int arg4 ;
24909   void *argp1 = 0 ;
24910   int res1 = 0 ;
24911   unsigned int val2 ;
24912   int ecode2 = 0 ;
24913   int val3 ;
24914   int ecode3 = 0 ;
24915   unsigned int val4 ;
24916   int ecode4 = 0 ;
24917 
24918   if ((argc < 3) || (argc > 3)) {
24919     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
24920   }
24921   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
24922   if (!SWIG_IsOK(res1)) {
24923     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","set_max_expansion", 1, self ));
24924   }
24925   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
24926   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
24927   if (!SWIG_IsOK(ecode2)) {
24928     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","set_max_expansion", 2, argv[0] ));
24929   }
24930   arg2 = static_cast< Xapian::termcount >(val2);
24931   ecode3 = SWIG_AsVal_int(argv[1], &val3);
24932   if (!SWIG_IsOK(ecode3)) {
24933     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","set_max_expansion", 3, argv[1] ));
24934   }
24935   arg3 = static_cast< int >(val3);
24936   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
24937   if (!SWIG_IsOK(ecode4)) {
24938     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "unsigned int","set_max_expansion", 4, argv[2] ));
24939   }
24940   arg4 = static_cast< unsigned int >(val4);
24941   {
24942     try {
24943       (arg1)->set_max_expansion(arg2,arg3,arg4);
24944     } catch (...) {
24945       string msg;
24946       int code = XapianExceptionHandler(msg);
24947       SWIG_exception(code, msg.c_str());
24948     }
24949   }
24950   return Qnil;
24951 fail:
24952   return Qnil;
24953 }
24954 
24955 
24956 SWIGINTERN VALUE
_wrap_QueryParser_set_max_expansion__SWIG_1(int argc,VALUE * argv,VALUE self)24957 _wrap_QueryParser_set_max_expansion__SWIG_1(int argc, VALUE *argv, VALUE self) {
24958   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
24959   Xapian::termcount arg2 ;
24960   int arg3 ;
24961   void *argp1 = 0 ;
24962   int res1 = 0 ;
24963   unsigned int val2 ;
24964   int ecode2 = 0 ;
24965   int val3 ;
24966   int ecode3 = 0 ;
24967 
24968   if ((argc < 2) || (argc > 2)) {
24969     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
24970   }
24971   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
24972   if (!SWIG_IsOK(res1)) {
24973     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","set_max_expansion", 1, self ));
24974   }
24975   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
24976   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
24977   if (!SWIG_IsOK(ecode2)) {
24978     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","set_max_expansion", 2, argv[0] ));
24979   }
24980   arg2 = static_cast< Xapian::termcount >(val2);
24981   ecode3 = SWIG_AsVal_int(argv[1], &val3);
24982   if (!SWIG_IsOK(ecode3)) {
24983     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","set_max_expansion", 3, argv[1] ));
24984   }
24985   arg3 = static_cast< int >(val3);
24986   {
24987     try {
24988       (arg1)->set_max_expansion(arg2,arg3);
24989     } catch (...) {
24990       string msg;
24991       int code = XapianExceptionHandler(msg);
24992       SWIG_exception(code, msg.c_str());
24993     }
24994   }
24995   return Qnil;
24996 fail:
24997   return Qnil;
24998 }
24999 
25000 
25001 SWIGINTERN VALUE
_wrap_QueryParser_set_max_expansion__SWIG_2(int argc,VALUE * argv,VALUE self)25002 _wrap_QueryParser_set_max_expansion__SWIG_2(int argc, VALUE *argv, VALUE self) {
25003   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
25004   Xapian::termcount arg2 ;
25005   void *argp1 = 0 ;
25006   int res1 = 0 ;
25007   unsigned int val2 ;
25008   int ecode2 = 0 ;
25009 
25010   if ((argc < 1) || (argc > 1)) {
25011     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
25012   }
25013   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
25014   if (!SWIG_IsOK(res1)) {
25015     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","set_max_expansion", 1, self ));
25016   }
25017   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
25018   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
25019   if (!SWIG_IsOK(ecode2)) {
25020     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","set_max_expansion", 2, argv[0] ));
25021   }
25022   arg2 = static_cast< Xapian::termcount >(val2);
25023   {
25024     try {
25025       (arg1)->set_max_expansion(arg2);
25026     } catch (...) {
25027       string msg;
25028       int code = XapianExceptionHandler(msg);
25029       SWIG_exception(code, msg.c_str());
25030     }
25031   }
25032   return Qnil;
25033 fail:
25034   return Qnil;
25035 }
25036 
25037 
_wrap_QueryParser_set_max_expansion(int nargs,VALUE * args,VALUE self)25038 SWIGINTERN VALUE _wrap_QueryParser_set_max_expansion(int nargs, VALUE *args, VALUE self) {
25039   int argc;
25040   VALUE argv[5];
25041   int ii;
25042 
25043   argc = nargs + 1;
25044   argv[0] = self;
25045   if (argc > 5) SWIG_fail;
25046   for (ii = 1; (ii < argc); ++ii) {
25047     argv[ii] = args[ii-1];
25048   }
25049   if (argc == 2) {
25050     int _v;
25051     void *vptr = 0;
25052     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
25053     _v = SWIG_CheckState(res);
25054     if (_v) {
25055       {
25056         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
25057         _v = SWIG_CheckState(res);
25058       }
25059       if (_v) {
25060         return _wrap_QueryParser_set_max_expansion__SWIG_2(nargs, args, self);
25061       }
25062     }
25063   }
25064   if (argc == 3) {
25065     int _v;
25066     void *vptr = 0;
25067     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
25068     _v = SWIG_CheckState(res);
25069     if (_v) {
25070       {
25071         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
25072         _v = SWIG_CheckState(res);
25073       }
25074       if (_v) {
25075         {
25076           int res = SWIG_AsVal_int(argv[2], NULL);
25077           _v = SWIG_CheckState(res);
25078         }
25079         if (_v) {
25080           return _wrap_QueryParser_set_max_expansion__SWIG_1(nargs, args, self);
25081         }
25082       }
25083     }
25084   }
25085   if (argc == 4) {
25086     int _v;
25087     void *vptr = 0;
25088     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
25089     _v = SWIG_CheckState(res);
25090     if (_v) {
25091       {
25092         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
25093         _v = SWIG_CheckState(res);
25094       }
25095       if (_v) {
25096         {
25097           int res = SWIG_AsVal_int(argv[2], NULL);
25098           _v = SWIG_CheckState(res);
25099         }
25100         if (_v) {
25101           {
25102             int res = SWIG_AsVal_unsigned_SS_int(argv[3], NULL);
25103             _v = SWIG_CheckState(res);
25104           }
25105           if (_v) {
25106             return _wrap_QueryParser_set_max_expansion__SWIG_0(nargs, args, self);
25107           }
25108         }
25109       }
25110     }
25111   }
25112 
25113 fail:
25114   Ruby_Format_OverloadedError( argc, 5, "QueryParser.set_max_expansion",
25115     "    void QueryParser.set_max_expansion(Xapian::termcount max_expansion, int max_type, unsigned int flags)\n"
25116     "    void QueryParser.set_max_expansion(Xapian::termcount max_expansion, int max_type)\n"
25117     "    void QueryParser.set_max_expansion(Xapian::termcount max_expansion)\n");
25118 
25119   return Qnil;
25120 }
25121 
25122 
25123 SWIGINTERN VALUE
_wrap_QueryParser_set_max_wildcard_expansion(int argc,VALUE * argv,VALUE self)25124 _wrap_QueryParser_set_max_wildcard_expansion(int argc, VALUE *argv, VALUE self) {
25125   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
25126   Xapian::termcount arg2 ;
25127   void *argp1 = 0 ;
25128   int res1 = 0 ;
25129   unsigned int val2 ;
25130   int ecode2 = 0 ;
25131 
25132   if ((argc < 1) || (argc > 1)) {
25133     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
25134   }
25135   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
25136   if (!SWIG_IsOK(res1)) {
25137     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","set_max_wildcard_expansion", 1, self ));
25138   }
25139   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
25140   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
25141   if (!SWIG_IsOK(ecode2)) {
25142     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","set_max_wildcard_expansion", 2, argv[0] ));
25143   }
25144   arg2 = static_cast< Xapian::termcount >(val2);
25145   {
25146     try {
25147       (arg1)->set_max_wildcard_expansion(arg2);
25148     } catch (...) {
25149       string msg;
25150       int code = XapianExceptionHandler(msg);
25151       SWIG_exception(code, msg.c_str());
25152     }
25153   }
25154   return Qnil;
25155 fail:
25156   return Qnil;
25157 }
25158 
25159 
25160 SWIGINTERN VALUE
_wrap_QueryParser_parse_query__SWIG_0(int argc,VALUE * argv,VALUE self)25161 _wrap_QueryParser_parse_query__SWIG_0(int argc, VALUE *argv, VALUE self) {
25162   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
25163   std::string *arg2 = 0 ;
25164   unsigned int arg3 ;
25165   std::string *arg4 = 0 ;
25166   void *argp1 = 0 ;
25167   int res1 = 0 ;
25168   int res2 = SWIG_OLDOBJ ;
25169   unsigned int val3 ;
25170   int ecode3 = 0 ;
25171   int res4 = SWIG_OLDOBJ ;
25172   Xapian::Query result;
25173   VALUE vresult = Qnil;
25174 
25175   if ((argc < 3) || (argc > 3)) {
25176     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
25177   }
25178   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
25179   if (!SWIG_IsOK(res1)) {
25180     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","parse_query", 1, self ));
25181   }
25182   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
25183   {
25184     std::string *ptr = (std::string *)0;
25185     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
25186     if (!SWIG_IsOK(res2)) {
25187       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","parse_query", 2, argv[0] ));
25188     }
25189     if (!ptr) {
25190       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","parse_query", 2, argv[0]));
25191     }
25192     arg2 = ptr;
25193   }
25194   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
25195   if (!SWIG_IsOK(ecode3)) {
25196     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","parse_query", 3, argv[1] ));
25197   }
25198   arg3 = static_cast< unsigned int >(val3);
25199   {
25200     std::string *ptr = (std::string *)0;
25201     res4 = SWIG_AsPtr_std_string(argv[2], &ptr);
25202     if (!SWIG_IsOK(res4)) {
25203       SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "std::string const &","parse_query", 4, argv[2] ));
25204     }
25205     if (!ptr) {
25206       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","parse_query", 4, argv[2]));
25207     }
25208     arg4 = ptr;
25209   }
25210   {
25211     try {
25212       result = (arg1)->parse_query((std::string const &)*arg2,arg3,(std::string const &)*arg4);
25213     } catch (...) {
25214       string msg;
25215       int code = XapianExceptionHandler(msg);
25216       SWIG_exception(code, msg.c_str());
25217     }
25218   }
25219   vresult = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN |  0 );
25220   if (SWIG_IsNewObj(res2)) delete arg2;
25221   if (SWIG_IsNewObj(res4)) delete arg4;
25222   return vresult;
25223 fail:
25224   if (SWIG_IsNewObj(res2)) delete arg2;
25225   if (SWIG_IsNewObj(res4)) delete arg4;
25226   return Qnil;
25227 }
25228 
25229 
25230 SWIGINTERN VALUE
_wrap_QueryParser_parse_query__SWIG_1(int argc,VALUE * argv,VALUE self)25231 _wrap_QueryParser_parse_query__SWIG_1(int argc, VALUE *argv, VALUE self) {
25232   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
25233   std::string *arg2 = 0 ;
25234   unsigned int arg3 ;
25235   void *argp1 = 0 ;
25236   int res1 = 0 ;
25237   int res2 = SWIG_OLDOBJ ;
25238   unsigned int val3 ;
25239   int ecode3 = 0 ;
25240   Xapian::Query result;
25241   VALUE vresult = Qnil;
25242 
25243   if ((argc < 2) || (argc > 2)) {
25244     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
25245   }
25246   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
25247   if (!SWIG_IsOK(res1)) {
25248     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","parse_query", 1, self ));
25249   }
25250   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
25251   {
25252     std::string *ptr = (std::string *)0;
25253     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
25254     if (!SWIG_IsOK(res2)) {
25255       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","parse_query", 2, argv[0] ));
25256     }
25257     if (!ptr) {
25258       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","parse_query", 2, argv[0]));
25259     }
25260     arg2 = ptr;
25261   }
25262   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
25263   if (!SWIG_IsOK(ecode3)) {
25264     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","parse_query", 3, argv[1] ));
25265   }
25266   arg3 = static_cast< unsigned int >(val3);
25267   {
25268     try {
25269       result = (arg1)->parse_query((std::string const &)*arg2,arg3);
25270     } catch (...) {
25271       string msg;
25272       int code = XapianExceptionHandler(msg);
25273       SWIG_exception(code, msg.c_str());
25274     }
25275   }
25276   vresult = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN |  0 );
25277   if (SWIG_IsNewObj(res2)) delete arg2;
25278   return vresult;
25279 fail:
25280   if (SWIG_IsNewObj(res2)) delete arg2;
25281   return Qnil;
25282 }
25283 
25284 
25285 SWIGINTERN VALUE
_wrap_QueryParser_parse_query__SWIG_2(int argc,VALUE * argv,VALUE self)25286 _wrap_QueryParser_parse_query__SWIG_2(int argc, VALUE *argv, VALUE self) {
25287   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
25288   std::string *arg2 = 0 ;
25289   void *argp1 = 0 ;
25290   int res1 = 0 ;
25291   int res2 = SWIG_OLDOBJ ;
25292   Xapian::Query result;
25293   VALUE vresult = Qnil;
25294 
25295   if ((argc < 1) || (argc > 1)) {
25296     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
25297   }
25298   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
25299   if (!SWIG_IsOK(res1)) {
25300     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","parse_query", 1, self ));
25301   }
25302   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
25303   {
25304     std::string *ptr = (std::string *)0;
25305     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
25306     if (!SWIG_IsOK(res2)) {
25307       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","parse_query", 2, argv[0] ));
25308     }
25309     if (!ptr) {
25310       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","parse_query", 2, argv[0]));
25311     }
25312     arg2 = ptr;
25313   }
25314   {
25315     try {
25316       result = (arg1)->parse_query((std::string const &)*arg2);
25317     } catch (...) {
25318       string msg;
25319       int code = XapianExceptionHandler(msg);
25320       SWIG_exception(code, msg.c_str());
25321     }
25322   }
25323   vresult = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN |  0 );
25324   if (SWIG_IsNewObj(res2)) delete arg2;
25325   return vresult;
25326 fail:
25327   if (SWIG_IsNewObj(res2)) delete arg2;
25328   return Qnil;
25329 }
25330 
25331 
_wrap_QueryParser_parse_query(int nargs,VALUE * args,VALUE self)25332 SWIGINTERN VALUE _wrap_QueryParser_parse_query(int nargs, VALUE *args, VALUE self) {
25333   int argc;
25334   VALUE argv[5];
25335   int ii;
25336 
25337   argc = nargs + 1;
25338   argv[0] = self;
25339   if (argc > 5) SWIG_fail;
25340   for (ii = 1; (ii < argc); ++ii) {
25341     argv[ii] = args[ii-1];
25342   }
25343   if (argc == 2) {
25344     int _v;
25345     void *vptr = 0;
25346     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
25347     _v = SWIG_CheckState(res);
25348     if (_v) {
25349       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
25350       _v = SWIG_CheckState(res);
25351       if (_v) {
25352         return _wrap_QueryParser_parse_query__SWIG_2(nargs, args, self);
25353       }
25354     }
25355   }
25356   if (argc == 3) {
25357     int _v;
25358     void *vptr = 0;
25359     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
25360     _v = SWIG_CheckState(res);
25361     if (_v) {
25362       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
25363       _v = SWIG_CheckState(res);
25364       if (_v) {
25365         {
25366           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
25367           _v = SWIG_CheckState(res);
25368         }
25369         if (_v) {
25370           return _wrap_QueryParser_parse_query__SWIG_1(nargs, args, self);
25371         }
25372       }
25373     }
25374   }
25375   if (argc == 4) {
25376     int _v;
25377     void *vptr = 0;
25378     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
25379     _v = SWIG_CheckState(res);
25380     if (_v) {
25381       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
25382       _v = SWIG_CheckState(res);
25383       if (_v) {
25384         {
25385           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
25386           _v = SWIG_CheckState(res);
25387         }
25388         if (_v) {
25389           int res = SWIG_AsPtr_std_string(argv[3], (std::string**)(0));
25390           _v = SWIG_CheckState(res);
25391           if (_v) {
25392             return _wrap_QueryParser_parse_query__SWIG_0(nargs, args, self);
25393           }
25394         }
25395       }
25396     }
25397   }
25398 
25399 fail:
25400   Ruby_Format_OverloadedError( argc, 5, "QueryParser.parse_query",
25401     "    Xapian::Query QueryParser.parse_query(std::string const &query_string, unsigned int flags, std::string const &default_prefix)\n"
25402     "    Xapian::Query QueryParser.parse_query(std::string const &query_string, unsigned int flags)\n"
25403     "    Xapian::Query QueryParser.parse_query(std::string const &query_string)\n");
25404 
25405   return Qnil;
25406 }
25407 
25408 
25409 SWIGINTERN VALUE
_wrap_QueryParser_add_prefix__SWIG_0(int argc,VALUE * argv,VALUE self)25410 _wrap_QueryParser_add_prefix__SWIG_0(int argc, VALUE *argv, VALUE self) {
25411   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
25412   std::string *arg2 = 0 ;
25413   std::string *arg3 = 0 ;
25414   void *argp1 = 0 ;
25415   int res1 = 0 ;
25416   int res2 = SWIG_OLDOBJ ;
25417   int res3 = SWIG_OLDOBJ ;
25418 
25419   if ((argc < 2) || (argc > 2)) {
25420     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
25421   }
25422   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
25423   if (!SWIG_IsOK(res1)) {
25424     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","add_prefix", 1, self ));
25425   }
25426   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
25427   {
25428     std::string *ptr = (std::string *)0;
25429     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
25430     if (!SWIG_IsOK(res2)) {
25431       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","add_prefix", 2, argv[0] ));
25432     }
25433     if (!ptr) {
25434       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_prefix", 2, argv[0]));
25435     }
25436     arg2 = ptr;
25437   }
25438   {
25439     std::string *ptr = (std::string *)0;
25440     res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
25441     if (!SWIG_IsOK(res3)) {
25442       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","add_prefix", 3, argv[1] ));
25443     }
25444     if (!ptr) {
25445       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_prefix", 3, argv[1]));
25446     }
25447     arg3 = ptr;
25448   }
25449   {
25450     try {
25451       (arg1)->add_prefix((std::string const &)*arg2,(std::string const &)*arg3);
25452     } catch (...) {
25453       string msg;
25454       int code = XapianExceptionHandler(msg);
25455       SWIG_exception(code, msg.c_str());
25456     }
25457   }
25458   if (SWIG_IsNewObj(res2)) delete arg2;
25459   if (SWIG_IsNewObj(res3)) delete arg3;
25460   return Qnil;
25461 fail:
25462   if (SWIG_IsNewObj(res2)) delete arg2;
25463   if (SWIG_IsNewObj(res3)) delete arg3;
25464   return Qnil;
25465 }
25466 
25467 
25468 SWIGINTERN VALUE
_wrap_QueryParser_add_prefix__SWIG_1(int argc,VALUE * argv,VALUE self)25469 _wrap_QueryParser_add_prefix__SWIG_1(int argc, VALUE *argv, VALUE self) {
25470   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
25471   std::string *arg2 = 0 ;
25472   Xapian::FieldProcessor *arg3 = (Xapian::FieldProcessor *) 0 ;
25473   void *argp1 = 0 ;
25474   int res1 = 0 ;
25475   int res2 = SWIG_OLDOBJ ;
25476   void *argp3 = 0 ;
25477   int res3 = 0 ;
25478 
25479   if ((argc < 2) || (argc > 2)) {
25480     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
25481   }
25482   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
25483   if (!SWIG_IsOK(res1)) {
25484     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","add_prefix", 1, self ));
25485   }
25486   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
25487   {
25488     std::string *ptr = (std::string *)0;
25489     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
25490     if (!SWIG_IsOK(res2)) {
25491       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","add_prefix", 2, argv[0] ));
25492     }
25493     if (!ptr) {
25494       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_prefix", 2, argv[0]));
25495     }
25496     arg2 = ptr;
25497   }
25498   res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_Xapian__FieldProcessor, 0 |  0 );
25499   if (!SWIG_IsOK(res3)) {
25500     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::FieldProcessor *","add_prefix", 3, argv[1] ));
25501   }
25502   arg3 = reinterpret_cast< Xapian::FieldProcessor * >(argp3);
25503   {
25504     try {
25505       (arg1)->add_prefix((std::string const &)*arg2,arg3);
25506     } catch (...) {
25507       string msg;
25508       int code = XapianExceptionHandler(msg);
25509       SWIG_exception(code, msg.c_str());
25510     }
25511   }
25512   if (SWIG_IsNewObj(res2)) delete arg2;
25513   return Qnil;
25514 fail:
25515   if (SWIG_IsNewObj(res2)) delete arg2;
25516   return Qnil;
25517 }
25518 
25519 
_wrap_QueryParser_add_prefix(int nargs,VALUE * args,VALUE self)25520 SWIGINTERN VALUE _wrap_QueryParser_add_prefix(int nargs, VALUE *args, VALUE self) {
25521   int argc;
25522   VALUE argv[4];
25523   int ii;
25524 
25525   argc = nargs + 1;
25526   argv[0] = self;
25527   if (argc > 4) SWIG_fail;
25528   for (ii = 1; (ii < argc); ++ii) {
25529     argv[ii] = args[ii-1];
25530   }
25531   if (argc == 3) {
25532     int _v;
25533     void *vptr = 0;
25534     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
25535     _v = SWIG_CheckState(res);
25536     if (_v) {
25537       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
25538       _v = SWIG_CheckState(res);
25539       if (_v) {
25540         void *vptr = 0;
25541         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__FieldProcessor, 0);
25542         _v = SWIG_CheckState(res);
25543         if (_v) {
25544           return _wrap_QueryParser_add_prefix__SWIG_1(nargs, args, self);
25545         }
25546       }
25547     }
25548   }
25549   if (argc == 3) {
25550     int _v;
25551     void *vptr = 0;
25552     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
25553     _v = SWIG_CheckState(res);
25554     if (_v) {
25555       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
25556       _v = SWIG_CheckState(res);
25557       if (_v) {
25558         int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
25559         _v = SWIG_CheckState(res);
25560         if (_v) {
25561           return _wrap_QueryParser_add_prefix__SWIG_0(nargs, args, self);
25562         }
25563       }
25564     }
25565   }
25566 
25567 fail:
25568   Ruby_Format_OverloadedError( argc, 4, "QueryParser.add_prefix",
25569     "    void QueryParser.add_prefix(std::string const &field, std::string const &prefix)\n"
25570     "    void QueryParser.add_prefix(std::string const &field, Xapian::FieldProcessor *proc)\n");
25571 
25572   return Qnil;
25573 }
25574 
25575 
25576 SWIGINTERN VALUE
_wrap_QueryParser_add_boolean_prefix__SWIG_0(int argc,VALUE * argv,VALUE self)25577 _wrap_QueryParser_add_boolean_prefix__SWIG_0(int argc, VALUE *argv, VALUE self) {
25578   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
25579   std::string *arg2 = 0 ;
25580   std::string *arg3 = 0 ;
25581   std::string *arg4 = (std::string *) 0 ;
25582   void *argp1 = 0 ;
25583   int res1 = 0 ;
25584   int res2 = SWIG_OLDOBJ ;
25585   int res3 = SWIG_OLDOBJ ;
25586   void *argp4 = 0 ;
25587   int res4 = 0 ;
25588 
25589   if ((argc < 3) || (argc > 3)) {
25590     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
25591   }
25592   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
25593   if (!SWIG_IsOK(res1)) {
25594     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","add_boolean_prefix", 1, self ));
25595   }
25596   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
25597   {
25598     std::string *ptr = (std::string *)0;
25599     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
25600     if (!SWIG_IsOK(res2)) {
25601       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","add_boolean_prefix", 2, argv[0] ));
25602     }
25603     if (!ptr) {
25604       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_boolean_prefix", 2, argv[0]));
25605     }
25606     arg2 = ptr;
25607   }
25608   {
25609     std::string *ptr = (std::string *)0;
25610     res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
25611     if (!SWIG_IsOK(res3)) {
25612       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","add_boolean_prefix", 3, argv[1] ));
25613     }
25614     if (!ptr) {
25615       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_boolean_prefix", 3, argv[1]));
25616     }
25617     arg3 = ptr;
25618   }
25619   res4 = SWIG_ConvertPtr(argv[2], &argp4,SWIGTYPE_p_std__string, 0 |  0 );
25620   if (!SWIG_IsOK(res4)) {
25621     SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "std::string const *","add_boolean_prefix", 4, argv[2] ));
25622   }
25623   arg4 = reinterpret_cast< std::string * >(argp4);
25624   {
25625     try {
25626       (arg1)->add_boolean_prefix((std::string const &)*arg2,(std::string const &)*arg3,(std::string const *)arg4);
25627     } catch (...) {
25628       string msg;
25629       int code = XapianExceptionHandler(msg);
25630       SWIG_exception(code, msg.c_str());
25631     }
25632   }
25633   if (SWIG_IsNewObj(res2)) delete arg2;
25634   if (SWIG_IsNewObj(res3)) delete arg3;
25635   return Qnil;
25636 fail:
25637   if (SWIG_IsNewObj(res2)) delete arg2;
25638   if (SWIG_IsNewObj(res3)) delete arg3;
25639   return Qnil;
25640 }
25641 
25642 
25643 SWIGINTERN VALUE
_wrap_QueryParser_add_boolean_prefix__SWIG_1(int argc,VALUE * argv,VALUE self)25644 _wrap_QueryParser_add_boolean_prefix__SWIG_1(int argc, VALUE *argv, VALUE self) {
25645   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
25646   std::string *arg2 = 0 ;
25647   std::string *arg3 = 0 ;
25648   void *argp1 = 0 ;
25649   int res1 = 0 ;
25650   int res2 = SWIG_OLDOBJ ;
25651   int res3 = SWIG_OLDOBJ ;
25652 
25653   if ((argc < 2) || (argc > 2)) {
25654     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
25655   }
25656   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
25657   if (!SWIG_IsOK(res1)) {
25658     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","add_boolean_prefix", 1, self ));
25659   }
25660   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
25661   {
25662     std::string *ptr = (std::string *)0;
25663     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
25664     if (!SWIG_IsOK(res2)) {
25665       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","add_boolean_prefix", 2, argv[0] ));
25666     }
25667     if (!ptr) {
25668       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_boolean_prefix", 2, argv[0]));
25669     }
25670     arg2 = ptr;
25671   }
25672   {
25673     std::string *ptr = (std::string *)0;
25674     res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
25675     if (!SWIG_IsOK(res3)) {
25676       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","add_boolean_prefix", 3, argv[1] ));
25677     }
25678     if (!ptr) {
25679       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_boolean_prefix", 3, argv[1]));
25680     }
25681     arg3 = ptr;
25682   }
25683   {
25684     try {
25685       (arg1)->add_boolean_prefix((std::string const &)*arg2,(std::string const &)*arg3);
25686     } catch (...) {
25687       string msg;
25688       int code = XapianExceptionHandler(msg);
25689       SWIG_exception(code, msg.c_str());
25690     }
25691   }
25692   if (SWIG_IsNewObj(res2)) delete arg2;
25693   if (SWIG_IsNewObj(res3)) delete arg3;
25694   return Qnil;
25695 fail:
25696   if (SWIG_IsNewObj(res2)) delete arg2;
25697   if (SWIG_IsNewObj(res3)) delete arg3;
25698   return Qnil;
25699 }
25700 
25701 
25702 SWIGINTERN VALUE
_wrap_QueryParser_add_boolean_prefix__SWIG_2(int argc,VALUE * argv,VALUE self)25703 _wrap_QueryParser_add_boolean_prefix__SWIG_2(int argc, VALUE *argv, VALUE self) {
25704   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
25705   std::string *arg2 = 0 ;
25706   std::string *arg3 = 0 ;
25707   bool arg4 ;
25708   void *argp1 = 0 ;
25709   int res1 = 0 ;
25710   int res2 = SWIG_OLDOBJ ;
25711   int res3 = SWIG_OLDOBJ ;
25712   bool val4 ;
25713   int ecode4 = 0 ;
25714 
25715   if ((argc < 3) || (argc > 3)) {
25716     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
25717   }
25718   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
25719   if (!SWIG_IsOK(res1)) {
25720     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","add_boolean_prefix", 1, self ));
25721   }
25722   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
25723   {
25724     std::string *ptr = (std::string *)0;
25725     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
25726     if (!SWIG_IsOK(res2)) {
25727       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","add_boolean_prefix", 2, argv[0] ));
25728     }
25729     if (!ptr) {
25730       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_boolean_prefix", 2, argv[0]));
25731     }
25732     arg2 = ptr;
25733   }
25734   {
25735     std::string *ptr = (std::string *)0;
25736     res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
25737     if (!SWIG_IsOK(res3)) {
25738       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","add_boolean_prefix", 3, argv[1] ));
25739     }
25740     if (!ptr) {
25741       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_boolean_prefix", 3, argv[1]));
25742     }
25743     arg3 = ptr;
25744   }
25745   ecode4 = SWIG_AsVal_bool(argv[2], &val4);
25746   if (!SWIG_IsOK(ecode4)) {
25747     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "bool","add_boolean_prefix", 4, argv[2] ));
25748   }
25749   arg4 = static_cast< bool >(val4);
25750   {
25751     try {
25752       (arg1)->add_boolean_prefix((std::string const &)*arg2,(std::string const &)*arg3,arg4);
25753     } catch (...) {
25754       string msg;
25755       int code = XapianExceptionHandler(msg);
25756       SWIG_exception(code, msg.c_str());
25757     }
25758   }
25759   if (SWIG_IsNewObj(res2)) delete arg2;
25760   if (SWIG_IsNewObj(res3)) delete arg3;
25761   return Qnil;
25762 fail:
25763   if (SWIG_IsNewObj(res2)) delete arg2;
25764   if (SWIG_IsNewObj(res3)) delete arg3;
25765   return Qnil;
25766 }
25767 
25768 
25769 SWIGINTERN VALUE
_wrap_QueryParser_add_boolean_prefix__SWIG_3(int argc,VALUE * argv,VALUE self)25770 _wrap_QueryParser_add_boolean_prefix__SWIG_3(int argc, VALUE *argv, VALUE self) {
25771   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
25772   std::string *arg2 = 0 ;
25773   Xapian::FieldProcessor *arg3 = (Xapian::FieldProcessor *) 0 ;
25774   std::string *arg4 = (std::string *) 0 ;
25775   void *argp1 = 0 ;
25776   int res1 = 0 ;
25777   int res2 = SWIG_OLDOBJ ;
25778   void *argp3 = 0 ;
25779   int res3 = 0 ;
25780   void *argp4 = 0 ;
25781   int res4 = 0 ;
25782 
25783   if ((argc < 3) || (argc > 3)) {
25784     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
25785   }
25786   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
25787   if (!SWIG_IsOK(res1)) {
25788     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","add_boolean_prefix", 1, self ));
25789   }
25790   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
25791   {
25792     std::string *ptr = (std::string *)0;
25793     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
25794     if (!SWIG_IsOK(res2)) {
25795       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","add_boolean_prefix", 2, argv[0] ));
25796     }
25797     if (!ptr) {
25798       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_boolean_prefix", 2, argv[0]));
25799     }
25800     arg2 = ptr;
25801   }
25802   res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_Xapian__FieldProcessor, 0 |  0 );
25803   if (!SWIG_IsOK(res3)) {
25804     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::FieldProcessor *","add_boolean_prefix", 3, argv[1] ));
25805   }
25806   arg3 = reinterpret_cast< Xapian::FieldProcessor * >(argp3);
25807   res4 = SWIG_ConvertPtr(argv[2], &argp4,SWIGTYPE_p_std__string, 0 |  0 );
25808   if (!SWIG_IsOK(res4)) {
25809     SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "std::string const *","add_boolean_prefix", 4, argv[2] ));
25810   }
25811   arg4 = reinterpret_cast< std::string * >(argp4);
25812   {
25813     try {
25814       (arg1)->add_boolean_prefix((std::string const &)*arg2,arg3,(std::string const *)arg4);
25815     } catch (...) {
25816       string msg;
25817       int code = XapianExceptionHandler(msg);
25818       SWIG_exception(code, msg.c_str());
25819     }
25820   }
25821   if (SWIG_IsNewObj(res2)) delete arg2;
25822   return Qnil;
25823 fail:
25824   if (SWIG_IsNewObj(res2)) delete arg2;
25825   return Qnil;
25826 }
25827 
25828 
25829 SWIGINTERN VALUE
_wrap_QueryParser_add_boolean_prefix__SWIG_4(int argc,VALUE * argv,VALUE self)25830 _wrap_QueryParser_add_boolean_prefix__SWIG_4(int argc, VALUE *argv, VALUE self) {
25831   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
25832   std::string *arg2 = 0 ;
25833   Xapian::FieldProcessor *arg3 = (Xapian::FieldProcessor *) 0 ;
25834   void *argp1 = 0 ;
25835   int res1 = 0 ;
25836   int res2 = SWIG_OLDOBJ ;
25837   void *argp3 = 0 ;
25838   int res3 = 0 ;
25839 
25840   if ((argc < 2) || (argc > 2)) {
25841     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
25842   }
25843   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
25844   if (!SWIG_IsOK(res1)) {
25845     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","add_boolean_prefix", 1, self ));
25846   }
25847   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
25848   {
25849     std::string *ptr = (std::string *)0;
25850     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
25851     if (!SWIG_IsOK(res2)) {
25852       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","add_boolean_prefix", 2, argv[0] ));
25853     }
25854     if (!ptr) {
25855       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_boolean_prefix", 2, argv[0]));
25856     }
25857     arg2 = ptr;
25858   }
25859   res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_Xapian__FieldProcessor, 0 |  0 );
25860   if (!SWIG_IsOK(res3)) {
25861     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::FieldProcessor *","add_boolean_prefix", 3, argv[1] ));
25862   }
25863   arg3 = reinterpret_cast< Xapian::FieldProcessor * >(argp3);
25864   {
25865     try {
25866       (arg1)->add_boolean_prefix((std::string const &)*arg2,arg3);
25867     } catch (...) {
25868       string msg;
25869       int code = XapianExceptionHandler(msg);
25870       SWIG_exception(code, msg.c_str());
25871     }
25872   }
25873   if (SWIG_IsNewObj(res2)) delete arg2;
25874   return Qnil;
25875 fail:
25876   if (SWIG_IsNewObj(res2)) delete arg2;
25877   return Qnil;
25878 }
25879 
25880 
25881 SWIGINTERN VALUE
_wrap_QueryParser_add_boolean_prefix__SWIG_5(int argc,VALUE * argv,VALUE self)25882 _wrap_QueryParser_add_boolean_prefix__SWIG_5(int argc, VALUE *argv, VALUE self) {
25883   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
25884   std::string *arg2 = 0 ;
25885   Xapian::FieldProcessor *arg3 = (Xapian::FieldProcessor *) 0 ;
25886   bool arg4 ;
25887   void *argp1 = 0 ;
25888   int res1 = 0 ;
25889   int res2 = SWIG_OLDOBJ ;
25890   void *argp3 = 0 ;
25891   int res3 = 0 ;
25892   bool val4 ;
25893   int ecode4 = 0 ;
25894 
25895   if ((argc < 3) || (argc > 3)) {
25896     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
25897   }
25898   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
25899   if (!SWIG_IsOK(res1)) {
25900     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","add_boolean_prefix", 1, self ));
25901   }
25902   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
25903   {
25904     std::string *ptr = (std::string *)0;
25905     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
25906     if (!SWIG_IsOK(res2)) {
25907       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","add_boolean_prefix", 2, argv[0] ));
25908     }
25909     if (!ptr) {
25910       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_boolean_prefix", 2, argv[0]));
25911     }
25912     arg2 = ptr;
25913   }
25914   res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_Xapian__FieldProcessor, 0 |  0 );
25915   if (!SWIG_IsOK(res3)) {
25916     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::FieldProcessor *","add_boolean_prefix", 3, argv[1] ));
25917   }
25918   arg3 = reinterpret_cast< Xapian::FieldProcessor * >(argp3);
25919   ecode4 = SWIG_AsVal_bool(argv[2], &val4);
25920   if (!SWIG_IsOK(ecode4)) {
25921     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "bool","add_boolean_prefix", 4, argv[2] ));
25922   }
25923   arg4 = static_cast< bool >(val4);
25924   {
25925     try {
25926       (arg1)->add_boolean_prefix((std::string const &)*arg2,arg3,arg4);
25927     } catch (...) {
25928       string msg;
25929       int code = XapianExceptionHandler(msg);
25930       SWIG_exception(code, msg.c_str());
25931     }
25932   }
25933   if (SWIG_IsNewObj(res2)) delete arg2;
25934   return Qnil;
25935 fail:
25936   if (SWIG_IsNewObj(res2)) delete arg2;
25937   return Qnil;
25938 }
25939 
25940 
_wrap_QueryParser_add_boolean_prefix(int nargs,VALUE * args,VALUE self)25941 SWIGINTERN VALUE _wrap_QueryParser_add_boolean_prefix(int nargs, VALUE *args, VALUE self) {
25942   int argc;
25943   VALUE argv[5];
25944   int ii;
25945 
25946   argc = nargs + 1;
25947   argv[0] = self;
25948   if (argc > 5) SWIG_fail;
25949   for (ii = 1; (ii < argc); ++ii) {
25950     argv[ii] = args[ii-1];
25951   }
25952   if (argc == 3) {
25953     int _v;
25954     void *vptr = 0;
25955     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
25956     _v = SWIG_CheckState(res);
25957     if (_v) {
25958       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
25959       _v = SWIG_CheckState(res);
25960       if (_v) {
25961         void *vptr = 0;
25962         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__FieldProcessor, 0);
25963         _v = SWIG_CheckState(res);
25964         if (_v) {
25965           return _wrap_QueryParser_add_boolean_prefix__SWIG_4(nargs, args, self);
25966         }
25967       }
25968     }
25969   }
25970   if (argc == 3) {
25971     int _v;
25972     void *vptr = 0;
25973     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
25974     _v = SWIG_CheckState(res);
25975     if (_v) {
25976       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
25977       _v = SWIG_CheckState(res);
25978       if (_v) {
25979         int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
25980         _v = SWIG_CheckState(res);
25981         if (_v) {
25982           return _wrap_QueryParser_add_boolean_prefix__SWIG_1(nargs, args, self);
25983         }
25984       }
25985     }
25986   }
25987   if (argc == 4) {
25988     int _v;
25989     void *vptr = 0;
25990     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
25991     _v = SWIG_CheckState(res);
25992     if (_v) {
25993       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
25994       _v = SWIG_CheckState(res);
25995       if (_v) {
25996         void *vptr = 0;
25997         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__FieldProcessor, 0);
25998         _v = SWIG_CheckState(res);
25999         if (_v) {
26000           int res = SWIG_AsPtr_std_string(argv[3], (std::string**)(0));
26001           _v = SWIG_CheckState(res);
26002           if (_v) {
26003             return _wrap_QueryParser_add_boolean_prefix__SWIG_3(nargs, args, self);
26004           }
26005         }
26006       }
26007     }
26008   }
26009   if (argc == 4) {
26010     int _v;
26011     void *vptr = 0;
26012     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
26013     _v = SWIG_CheckState(res);
26014     if (_v) {
26015       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
26016       _v = SWIG_CheckState(res);
26017       if (_v) {
26018         void *vptr = 0;
26019         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__FieldProcessor, 0);
26020         _v = SWIG_CheckState(res);
26021         if (_v) {
26022           {
26023             int res = SWIG_AsVal_bool(argv[3], NULL);
26024             _v = SWIG_CheckState(res);
26025           }
26026           if (_v) {
26027             return _wrap_QueryParser_add_boolean_prefix__SWIG_5(nargs, args, self);
26028           }
26029         }
26030       }
26031     }
26032   }
26033   if (argc == 4) {
26034     int _v;
26035     void *vptr = 0;
26036     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
26037     _v = SWIG_CheckState(res);
26038     if (_v) {
26039       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
26040       _v = SWIG_CheckState(res);
26041       if (_v) {
26042         int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
26043         _v = SWIG_CheckState(res);
26044         if (_v) {
26045           int res = SWIG_AsPtr_std_string(argv[3], (std::string**)(0));
26046           _v = SWIG_CheckState(res);
26047           if (_v) {
26048             return _wrap_QueryParser_add_boolean_prefix__SWIG_0(nargs, args, self);
26049           }
26050         }
26051       }
26052     }
26053   }
26054   if (argc == 4) {
26055     int _v;
26056     void *vptr = 0;
26057     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
26058     _v = SWIG_CheckState(res);
26059     if (_v) {
26060       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
26061       _v = SWIG_CheckState(res);
26062       if (_v) {
26063         int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
26064         _v = SWIG_CheckState(res);
26065         if (_v) {
26066           {
26067             int res = SWIG_AsVal_bool(argv[3], NULL);
26068             _v = SWIG_CheckState(res);
26069           }
26070           if (_v) {
26071             return _wrap_QueryParser_add_boolean_prefix__SWIG_2(nargs, args, self);
26072           }
26073         }
26074       }
26075     }
26076   }
26077 
26078 fail:
26079   Ruby_Format_OverloadedError( argc, 5, "QueryParser.add_boolean_prefix",
26080     "    void QueryParser.add_boolean_prefix(std::string const &field, std::string const &prefix, std::string const *grouping)\n"
26081     "    void QueryParser.add_boolean_prefix(std::string const &field, std::string const &prefix)\n"
26082     "    void QueryParser.add_boolean_prefix(std::string const &field, std::string const &prefix, bool exclusive)\n"
26083     "    void QueryParser.add_boolean_prefix(std::string const &field, Xapian::FieldProcessor *proc, std::string const *grouping)\n"
26084     "    void QueryParser.add_boolean_prefix(std::string const &field, Xapian::FieldProcessor *proc)\n"
26085     "    void QueryParser.add_boolean_prefix(std::string const &field, Xapian::FieldProcessor *proc, bool exclusive)\n");
26086 
26087   return Qnil;
26088 }
26089 
26090 
26091 SWIGINTERN VALUE
_wrap_QueryParser__dangerous_stoplist_begin(int argc,VALUE * argv,VALUE self)26092 _wrap_QueryParser__dangerous_stoplist_begin(int argc, VALUE *argv, VALUE self) {
26093   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
26094   void *argp1 = 0 ;
26095   int res1 = 0 ;
26096   Xapian::TermIterator result;
26097   VALUE vresult = Qnil;
26098 
26099   if ((argc < 0) || (argc > 0)) {
26100     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
26101   }
26102   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
26103   if (!SWIG_IsOK(res1)) {
26104     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser const *","stoplist_begin", 1, self ));
26105   }
26106   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
26107   {
26108     try {
26109       result = ((Xapian::QueryParser const *)arg1)->stoplist_begin();
26110     } catch (...) {
26111       string msg;
26112       int code = XapianExceptionHandler(msg);
26113       SWIG_exception(code, msg.c_str());
26114     }
26115   }
26116   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
26117   return vresult;
26118 fail:
26119   return Qnil;
26120 }
26121 
26122 
26123 SWIGINTERN VALUE
_wrap_QueryParser__dangerous_stoplist_end(int argc,VALUE * argv,VALUE self)26124 _wrap_QueryParser__dangerous_stoplist_end(int argc, VALUE *argv, VALUE self) {
26125   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
26126   void *argp1 = 0 ;
26127   int res1 = 0 ;
26128   Xapian::TermIterator result;
26129   VALUE vresult = Qnil;
26130 
26131   if ((argc < 0) || (argc > 0)) {
26132     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
26133   }
26134   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
26135   if (!SWIG_IsOK(res1)) {
26136     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser const *","stoplist_end", 1, self ));
26137   }
26138   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
26139   result = ((Xapian::QueryParser const *)arg1)->stoplist_end();
26140   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
26141   return vresult;
26142 fail:
26143   return Qnil;
26144 }
26145 
26146 
26147 SWIGINTERN VALUE
_wrap_QueryParser__dangerous_unstem_begin(int argc,VALUE * argv,VALUE self)26148 _wrap_QueryParser__dangerous_unstem_begin(int argc, VALUE *argv, VALUE self) {
26149   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
26150   std::string *arg2 = 0 ;
26151   void *argp1 = 0 ;
26152   int res1 = 0 ;
26153   int res2 = SWIG_OLDOBJ ;
26154   Xapian::TermIterator result;
26155   VALUE vresult = Qnil;
26156 
26157   if ((argc < 1) || (argc > 1)) {
26158     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
26159   }
26160   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
26161   if (!SWIG_IsOK(res1)) {
26162     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser const *","unstem_begin", 1, self ));
26163   }
26164   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
26165   {
26166     std::string *ptr = (std::string *)0;
26167     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
26168     if (!SWIG_IsOK(res2)) {
26169       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","unstem_begin", 2, argv[0] ));
26170     }
26171     if (!ptr) {
26172       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","unstem_begin", 2, argv[0]));
26173     }
26174     arg2 = ptr;
26175   }
26176   {
26177     try {
26178       result = ((Xapian::QueryParser const *)arg1)->unstem_begin((std::string const &)*arg2);
26179     } catch (...) {
26180       string msg;
26181       int code = XapianExceptionHandler(msg);
26182       SWIG_exception(code, msg.c_str());
26183     }
26184   }
26185   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
26186   if (SWIG_IsNewObj(res2)) delete arg2;
26187   return vresult;
26188 fail:
26189   if (SWIG_IsNewObj(res2)) delete arg2;
26190   return Qnil;
26191 }
26192 
26193 
26194 SWIGINTERN VALUE
_wrap_QueryParser__dangerous_unstem_end(int argc,VALUE * argv,VALUE self)26195 _wrap_QueryParser__dangerous_unstem_end(int argc, VALUE *argv, VALUE self) {
26196   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
26197   std::string *arg2 = 0 ;
26198   void *argp1 = 0 ;
26199   int res1 = 0 ;
26200   int res2 = SWIG_OLDOBJ ;
26201   Xapian::TermIterator result;
26202   VALUE vresult = Qnil;
26203 
26204   if ((argc < 1) || (argc > 1)) {
26205     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
26206   }
26207   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
26208   if (!SWIG_IsOK(res1)) {
26209     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser const *","unstem_end", 1, self ));
26210   }
26211   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
26212   {
26213     std::string *ptr = (std::string *)0;
26214     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
26215     if (!SWIG_IsOK(res2)) {
26216       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","unstem_end", 2, argv[0] ));
26217     }
26218     if (!ptr) {
26219       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","unstem_end", 2, argv[0]));
26220     }
26221     arg2 = ptr;
26222   }
26223   result = ((Xapian::QueryParser const *)arg1)->unstem_end((std::string const &)*arg2);
26224   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
26225   if (SWIG_IsNewObj(res2)) delete arg2;
26226   return vresult;
26227 fail:
26228   if (SWIG_IsNewObj(res2)) delete arg2;
26229   return Qnil;
26230 }
26231 
26232 
26233 SWIGINTERN VALUE
_wrap_QueryParser_add_rangeprocessor__SWIG_0(int argc,VALUE * argv,VALUE self)26234 _wrap_QueryParser_add_rangeprocessor__SWIG_0(int argc, VALUE *argv, VALUE self) {
26235   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
26236   Xapian::RangeProcessor *arg2 = (Xapian::RangeProcessor *) 0 ;
26237   std::string *arg3 = (std::string *) 0 ;
26238   void *argp1 = 0 ;
26239   int res1 = 0 ;
26240   void *argp2 = 0 ;
26241   int res2 = 0 ;
26242   void *argp3 = 0 ;
26243   int res3 = 0 ;
26244 
26245   if ((argc < 2) || (argc > 2)) {
26246     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
26247   }
26248   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
26249   if (!SWIG_IsOK(res1)) {
26250     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","add_rangeprocessor", 1, self ));
26251   }
26252   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
26253   res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Xapian__RangeProcessor, 0 |  0 );
26254   if (!SWIG_IsOK(res2)) {
26255     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::RangeProcessor *","add_rangeprocessor", 2, argv[0] ));
26256   }
26257   arg2 = reinterpret_cast< Xapian::RangeProcessor * >(argp2);
26258   res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_std__string, 0 |  0 );
26259   if (!SWIG_IsOK(res3)) {
26260     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const *","add_rangeprocessor", 3, argv[1] ));
26261   }
26262   arg3 = reinterpret_cast< std::string * >(argp3);
26263   {
26264     try {
26265       (arg1)->add_rangeprocessor(arg2,(std::string const *)arg3);
26266     } catch (...) {
26267       string msg;
26268       int code = XapianExceptionHandler(msg);
26269       SWIG_exception(code, msg.c_str());
26270     }
26271   }
26272   return Qnil;
26273 fail:
26274   return Qnil;
26275 }
26276 
26277 
26278 SWIGINTERN VALUE
_wrap_QueryParser_add_rangeprocessor__SWIG_1(int argc,VALUE * argv,VALUE self)26279 _wrap_QueryParser_add_rangeprocessor__SWIG_1(int argc, VALUE *argv, VALUE self) {
26280   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
26281   Xapian::RangeProcessor *arg2 = (Xapian::RangeProcessor *) 0 ;
26282   void *argp1 = 0 ;
26283   int res1 = 0 ;
26284   void *argp2 = 0 ;
26285   int res2 = 0 ;
26286 
26287   if ((argc < 1) || (argc > 1)) {
26288     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
26289   }
26290   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
26291   if (!SWIG_IsOK(res1)) {
26292     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","add_rangeprocessor", 1, self ));
26293   }
26294   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
26295   res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Xapian__RangeProcessor, 0 |  0 );
26296   if (!SWIG_IsOK(res2)) {
26297     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::RangeProcessor *","add_rangeprocessor", 2, argv[0] ));
26298   }
26299   arg2 = reinterpret_cast< Xapian::RangeProcessor * >(argp2);
26300   {
26301     try {
26302       (arg1)->add_rangeprocessor(arg2);
26303     } catch (...) {
26304       string msg;
26305       int code = XapianExceptionHandler(msg);
26306       SWIG_exception(code, msg.c_str());
26307     }
26308   }
26309   return Qnil;
26310 fail:
26311   return Qnil;
26312 }
26313 
26314 
_wrap_QueryParser_add_rangeprocessor(int nargs,VALUE * args,VALUE self)26315 SWIGINTERN VALUE _wrap_QueryParser_add_rangeprocessor(int nargs, VALUE *args, VALUE self) {
26316   int argc;
26317   VALUE argv[4];
26318   int ii;
26319 
26320   argc = nargs + 1;
26321   argv[0] = self;
26322   if (argc > 4) SWIG_fail;
26323   for (ii = 1; (ii < argc); ++ii) {
26324     argv[ii] = args[ii-1];
26325   }
26326   if (argc == 2) {
26327     int _v;
26328     void *vptr = 0;
26329     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
26330     _v = SWIG_CheckState(res);
26331     if (_v) {
26332       void *vptr = 0;
26333       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__RangeProcessor, 0);
26334       _v = SWIG_CheckState(res);
26335       if (_v) {
26336         return _wrap_QueryParser_add_rangeprocessor__SWIG_1(nargs, args, self);
26337       }
26338     }
26339   }
26340   if (argc == 3) {
26341     int _v;
26342     void *vptr = 0;
26343     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
26344     _v = SWIG_CheckState(res);
26345     if (_v) {
26346       void *vptr = 0;
26347       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__RangeProcessor, 0);
26348       _v = SWIG_CheckState(res);
26349       if (_v) {
26350         int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
26351         _v = SWIG_CheckState(res);
26352         if (_v) {
26353           return _wrap_QueryParser_add_rangeprocessor__SWIG_0(nargs, args, self);
26354         }
26355       }
26356     }
26357   }
26358 
26359 fail:
26360   Ruby_Format_OverloadedError( argc, 4, "QueryParser.add_rangeprocessor",
26361     "    void QueryParser.add_rangeprocessor(Xapian::RangeProcessor *range_proc, std::string const *grouping)\n"
26362     "    void QueryParser.add_rangeprocessor(Xapian::RangeProcessor *range_proc)\n");
26363 
26364   return Qnil;
26365 }
26366 
26367 
26368 SWIGINTERN VALUE
_wrap_QueryParser_add_valuerangeprocessor(int argc,VALUE * argv,VALUE self)26369 _wrap_QueryParser_add_valuerangeprocessor(int argc, VALUE *argv, VALUE self) {
26370   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
26371   Xapian::ValueRangeProcessor *arg2 = (Xapian::ValueRangeProcessor *) 0 ;
26372   void *argp1 = 0 ;
26373   int res1 = 0 ;
26374   void *argp2 = 0 ;
26375   int res2 = 0 ;
26376 
26377   if ((argc < 1) || (argc > 1)) {
26378     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
26379   }
26380   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
26381   if (!SWIG_IsOK(res1)) {
26382     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser *","add_valuerangeprocessor", 1, self ));
26383   }
26384   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
26385   res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Xapian__ValueRangeProcessor, 0 |  0 );
26386   if (!SWIG_IsOK(res2)) {
26387     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::ValueRangeProcessor *","add_valuerangeprocessor", 2, argv[0] ));
26388   }
26389   arg2 = reinterpret_cast< Xapian::ValueRangeProcessor * >(argp2);
26390   {
26391     try {
26392       (arg1)->add_valuerangeprocessor(arg2);
26393     } catch (...) {
26394       string msg;
26395       int code = XapianExceptionHandler(msg);
26396       SWIG_exception(code, msg.c_str());
26397     }
26398   }
26399   return Qnil;
26400 fail:
26401   return Qnil;
26402 }
26403 
26404 
26405 SWIGINTERN VALUE
_wrap_QueryParser_get_corrected_query_string(int argc,VALUE * argv,VALUE self)26406 _wrap_QueryParser_get_corrected_query_string(int argc, VALUE *argv, VALUE self) {
26407   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
26408   void *argp1 = 0 ;
26409   int res1 = 0 ;
26410   std::string result;
26411   VALUE vresult = Qnil;
26412 
26413   if ((argc < 0) || (argc > 0)) {
26414     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
26415   }
26416   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
26417   if (!SWIG_IsOK(res1)) {
26418     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser const *","get_corrected_query_string", 1, self ));
26419   }
26420   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
26421   {
26422     try {
26423       result = ((Xapian::QueryParser const *)arg1)->get_corrected_query_string();
26424     } catch (...) {
26425       string msg;
26426       int code = XapianExceptionHandler(msg);
26427       SWIG_exception(code, msg.c_str());
26428     }
26429   }
26430   vresult = SWIG_From_std_string(static_cast< std::string >(result));
26431   return vresult;
26432 fail:
26433   return Qnil;
26434 }
26435 
26436 
26437 SWIGINTERN VALUE
_wrap_QueryParser_description(int argc,VALUE * argv,VALUE self)26438 _wrap_QueryParser_description(int argc, VALUE *argv, VALUE self) {
26439   Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
26440   void *argp1 = 0 ;
26441   int res1 = 0 ;
26442   std::string result;
26443   VALUE vresult = Qnil;
26444 
26445   if ((argc < 0) || (argc > 0)) {
26446     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
26447   }
26448   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
26449   if (!SWIG_IsOK(res1)) {
26450     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::QueryParser const *","get_description", 1, self ));
26451   }
26452   arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
26453   {
26454     try {
26455       result = ((Xapian::QueryParser const *)arg1)->get_description();
26456     } catch (...) {
26457       string msg;
26458       int code = XapianExceptionHandler(msg);
26459       SWIG_exception(code, msg.c_str());
26460     }
26461   }
26462   vresult = SWIG_From_std_string(static_cast< std::string >(result));
26463   return vresult;
26464 fail:
26465   return Qnil;
26466 }
26467 
26468 
26469 SWIGINTERN VALUE
_wrap_sortable_serialise(int argc,VALUE * argv,VALUE self)26470 _wrap_sortable_serialise(int argc, VALUE *argv, VALUE self) {
26471   double arg1 ;
26472   double val1 ;
26473   int ecode1 = 0 ;
26474   std::string result;
26475   VALUE vresult = Qnil;
26476 
26477   if ((argc < 1) || (argc > 1)) {
26478     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
26479   }
26480   ecode1 = SWIG_AsVal_double(argv[0], &val1);
26481   if (!SWIG_IsOK(ecode1)) {
26482     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Xapian::sortable_serialise", 1, argv[0] ));
26483   }
26484   arg1 = static_cast< double >(val1);
26485   {
26486     try {
26487       result = Xapian::sortable_serialise(arg1);
26488     } catch (...) {
26489       string msg;
26490       int code = XapianExceptionHandler(msg);
26491       SWIG_exception(code, msg.c_str());
26492     }
26493   }
26494   vresult = SWIG_From_std_string(static_cast< std::string >(result));
26495   return vresult;
26496 fail:
26497   return Qnil;
26498 }
26499 
26500 
26501 SWIGINTERN VALUE
_wrap_sortable_unserialise(int argc,VALUE * argv,VALUE self)26502 _wrap_sortable_unserialise(int argc, VALUE *argv, VALUE self) {
26503   std::string *arg1 = 0 ;
26504   int res1 = SWIG_OLDOBJ ;
26505   double result;
26506   VALUE vresult = Qnil;
26507 
26508   if ((argc < 1) || (argc > 1)) {
26509     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
26510   }
26511   {
26512     std::string *ptr = (std::string *)0;
26513     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
26514     if (!SWIG_IsOK(res1)) {
26515       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::sortable_unserialise", 1, argv[0] ));
26516     }
26517     if (!ptr) {
26518       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::sortable_unserialise", 1, argv[0]));
26519     }
26520     arg1 = ptr;
26521   }
26522   {
26523     try {
26524       result = (double)Xapian::sortable_unserialise((std::string const &)*arg1);
26525     } catch (...) {
26526       string msg;
26527       int code = XapianExceptionHandler(msg);
26528       SWIG_exception(code, msg.c_str());
26529     }
26530   }
26531   vresult = SWIG_From_double(static_cast< double >(result));
26532   if (SWIG_IsNewObj(res1)) delete arg1;
26533   return vresult;
26534 fail:
26535   if (SWIG_IsNewObj(res1)) delete arg1;
26536   return Qnil;
26537 }
26538 
26539 
26540 static swig_class SwigClassValueSetMatchDecider;
26541 
26542 SWIGINTERN VALUE
26543 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_ValueSetMatchDecider_allocate(VALUE self)26544 _wrap_ValueSetMatchDecider_allocate(VALUE self)
26545 #else
26546 _wrap_ValueSetMatchDecider_allocate(int argc, VALUE *argv, VALUE self)
26547 #endif
26548 {
26549   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__ValueSetMatchDecider);
26550 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
26551   rb_obj_call_init(vresult, argc, argv);
26552 #endif
26553   return vresult;
26554 }
26555 
26556 
26557 SWIGINTERN VALUE
_wrap_new_ValueSetMatchDecider(int argc,VALUE * argv,VALUE self)26558 _wrap_new_ValueSetMatchDecider(int argc, VALUE *argv, VALUE self) {
26559   Xapian::valueno arg1 ;
26560   bool arg2 ;
26561   unsigned int val1 ;
26562   int ecode1 = 0 ;
26563   bool val2 ;
26564   int ecode2 = 0 ;
26565   const char *classname SWIGUNUSED = "Xapian::ValueSetMatchDecider";
26566   Xapian::ValueSetMatchDecider *result = 0 ;
26567 
26568   if ((argc < 2) || (argc > 2)) {
26569     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
26570   }
26571   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
26572   if (!SWIG_IsOK(ecode1)) {
26573     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","ValueSetMatchDecider", 1, argv[0] ));
26574   }
26575   arg1 = static_cast< Xapian::valueno >(val1);
26576   ecode2 = SWIG_AsVal_bool(argv[1], &val2);
26577   if (!SWIG_IsOK(ecode2)) {
26578     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","ValueSetMatchDecider", 2, argv[1] ));
26579   }
26580   arg2 = static_cast< bool >(val2);
26581   {
26582     try {
26583       result = (Xapian::ValueSetMatchDecider *)new Xapian::ValueSetMatchDecider(arg1,arg2);
26584       DATA_PTR(self) = result;
26585     } catch (...) {
26586       string msg;
26587       int code = XapianExceptionHandler(msg);
26588       SWIG_exception(code, msg.c_str());
26589     }
26590   }
26591   return self;
26592 fail:
26593   return Qnil;
26594 }
26595 
26596 
26597 SWIGINTERN VALUE
_wrap_ValueSetMatchDecider_add_value(int argc,VALUE * argv,VALUE self)26598 _wrap_ValueSetMatchDecider_add_value(int argc, VALUE *argv, VALUE self) {
26599   Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
26600   std::string *arg2 = 0 ;
26601   void *argp1 = 0 ;
26602   int res1 = 0 ;
26603   int res2 = SWIG_OLDOBJ ;
26604 
26605   if ((argc < 1) || (argc > 1)) {
26606     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
26607   }
26608   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueSetMatchDecider, 0 |  0 );
26609   if (!SWIG_IsOK(res1)) {
26610     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueSetMatchDecider *","add_value", 1, self ));
26611   }
26612   arg1 = reinterpret_cast< Xapian::ValueSetMatchDecider * >(argp1);
26613   {
26614     std::string *ptr = (std::string *)0;
26615     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
26616     if (!SWIG_IsOK(res2)) {
26617       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","add_value", 2, argv[0] ));
26618     }
26619     if (!ptr) {
26620       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_value", 2, argv[0]));
26621     }
26622     arg2 = ptr;
26623   }
26624   {
26625     try {
26626       (arg1)->add_value((std::string const &)*arg2);
26627     } catch (...) {
26628       string msg;
26629       int code = XapianExceptionHandler(msg);
26630       SWIG_exception(code, msg.c_str());
26631     }
26632   }
26633   if (SWIG_IsNewObj(res2)) delete arg2;
26634   return Qnil;
26635 fail:
26636   if (SWIG_IsNewObj(res2)) delete arg2;
26637   return Qnil;
26638 }
26639 
26640 
26641 SWIGINTERN VALUE
_wrap_ValueSetMatchDecider_remove_value(int argc,VALUE * argv,VALUE self)26642 _wrap_ValueSetMatchDecider_remove_value(int argc, VALUE *argv, VALUE self) {
26643   Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
26644   std::string *arg2 = 0 ;
26645   void *argp1 = 0 ;
26646   int res1 = 0 ;
26647   int res2 = SWIG_OLDOBJ ;
26648 
26649   if ((argc < 1) || (argc > 1)) {
26650     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
26651   }
26652   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueSetMatchDecider, 0 |  0 );
26653   if (!SWIG_IsOK(res1)) {
26654     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueSetMatchDecider *","remove_value", 1, self ));
26655   }
26656   arg1 = reinterpret_cast< Xapian::ValueSetMatchDecider * >(argp1);
26657   {
26658     std::string *ptr = (std::string *)0;
26659     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
26660     if (!SWIG_IsOK(res2)) {
26661       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","remove_value", 2, argv[0] ));
26662     }
26663     if (!ptr) {
26664       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","remove_value", 2, argv[0]));
26665     }
26666     arg2 = ptr;
26667   }
26668   {
26669     try {
26670       (arg1)->remove_value((std::string const &)*arg2);
26671     } catch (...) {
26672       string msg;
26673       int code = XapianExceptionHandler(msg);
26674       SWIG_exception(code, msg.c_str());
26675     }
26676   }
26677   if (SWIG_IsNewObj(res2)) delete arg2;
26678   return Qnil;
26679 fail:
26680   if (SWIG_IsNewObj(res2)) delete arg2;
26681   return Qnil;
26682 }
26683 
26684 
26685 SWIGINTERN VALUE
_wrap_ValueSetMatchDecider___call__(int argc,VALUE * argv,VALUE self)26686 _wrap_ValueSetMatchDecider___call__(int argc, VALUE *argv, VALUE self) {
26687   Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
26688   Xapian::Document *arg2 = 0 ;
26689   void *argp1 = 0 ;
26690   int res1 = 0 ;
26691   void *argp2 ;
26692   int res2 = 0 ;
26693   bool result;
26694   VALUE vresult = Qnil;
26695 
26696   if ((argc < 1) || (argc > 1)) {
26697     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
26698   }
26699   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueSetMatchDecider, 0 |  0 );
26700   if (!SWIG_IsOK(res1)) {
26701     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueSetMatchDecider const *","operator ()", 1, self ));
26702   }
26703   arg1 = reinterpret_cast< Xapian::ValueSetMatchDecider * >(argp1);
26704   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Document,  0 );
26705   if (!SWIG_IsOK(res2)) {
26706     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Document const &","operator ()", 2, argv[0] ));
26707   }
26708   if (!argp2) {
26709     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Document const &","operator ()", 2, argv[0]));
26710   }
26711   arg2 = reinterpret_cast< Xapian::Document * >(argp2);
26712   {
26713     try {
26714       result = (bool)((Xapian::ValueSetMatchDecider const *)arg1)->operator ()((Xapian::Document const &)*arg2);
26715     } catch (...) {
26716       string msg;
26717       int code = XapianExceptionHandler(msg);
26718       SWIG_exception(code, msg.c_str());
26719     }
26720   }
26721   vresult = SWIG_From_bool(static_cast< bool >(result));
26722   return vresult;
26723 fail:
26724   return Qnil;
26725 }
26726 
26727 
26728 SWIGINTERN void
free_Xapian_ValueSetMatchDecider(void * self)26729 free_Xapian_ValueSetMatchDecider(void *self) {
26730     Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *)self;
26731     delete arg1;
26732 }
26733 
26734 static swig_class SwigClassWeight;
26735 
26736 SWIGINTERN void
free_Xapian_Weight(void * self)26737 free_Xapian_Weight(void *self) {
26738     Xapian::Weight *arg1 = (Xapian::Weight *)self;
26739     delete arg1;
26740 }
26741 
26742 SWIGINTERN VALUE
_wrap_Weight_name(int argc,VALUE * argv,VALUE self)26743 _wrap_Weight_name(int argc, VALUE *argv, VALUE self) {
26744   Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
26745   void *argp1 = 0 ;
26746   int res1 = 0 ;
26747   std::string result;
26748   VALUE vresult = Qnil;
26749 
26750   if ((argc < 0) || (argc > 0)) {
26751     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
26752   }
26753   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Weight, 0 |  0 );
26754   if (!SWIG_IsOK(res1)) {
26755     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Weight const *","name", 1, self ));
26756   }
26757   arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
26758   {
26759     try {
26760       result = ((Xapian::Weight const *)arg1)->name();
26761     } catch (...) {
26762       string msg;
26763       int code = XapianExceptionHandler(msg);
26764       SWIG_exception(code, msg.c_str());
26765     }
26766   }
26767   vresult = SWIG_From_std_string(static_cast< std::string >(result));
26768   return vresult;
26769 fail:
26770   return Qnil;
26771 }
26772 
26773 
26774 SWIGINTERN VALUE
_wrap_Weight_sumpart(int argc,VALUE * argv,VALUE self)26775 _wrap_Weight_sumpart(int argc, VALUE *argv, VALUE self) {
26776   Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
26777   Xapian::termcount arg2 ;
26778   Xapian::termcount arg3 ;
26779   Xapian::termcount arg4 ;
26780   void *argp1 = 0 ;
26781   int res1 = 0 ;
26782   unsigned int val2 ;
26783   int ecode2 = 0 ;
26784   unsigned int val3 ;
26785   int ecode3 = 0 ;
26786   unsigned int val4 ;
26787   int ecode4 = 0 ;
26788   double result;
26789   VALUE vresult = Qnil;
26790 
26791   if ((argc < 3) || (argc > 3)) {
26792     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
26793   }
26794   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Weight, 0 |  0 );
26795   if (!SWIG_IsOK(res1)) {
26796     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Weight const *","get_sumpart", 1, self ));
26797   }
26798   arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
26799   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
26800   if (!SWIG_IsOK(ecode2)) {
26801     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 2, argv[0] ));
26802   }
26803   arg2 = static_cast< Xapian::termcount >(val2);
26804   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
26805   if (!SWIG_IsOK(ecode3)) {
26806     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 3, argv[1] ));
26807   }
26808   arg3 = static_cast< Xapian::termcount >(val3);
26809   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
26810   if (!SWIG_IsOK(ecode4)) {
26811     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 4, argv[2] ));
26812   }
26813   arg4 = static_cast< Xapian::termcount >(val4);
26814   {
26815     try {
26816       result = (double)((Xapian::Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
26817     } catch (...) {
26818       string msg;
26819       int code = XapianExceptionHandler(msg);
26820       SWIG_exception(code, msg.c_str());
26821     }
26822   }
26823   vresult = SWIG_From_double(static_cast< double >(result));
26824   return vresult;
26825 fail:
26826   return Qnil;
26827 }
26828 
26829 
26830 SWIGINTERN VALUE
_wrap_Weight_maxpart(int argc,VALUE * argv,VALUE self)26831 _wrap_Weight_maxpart(int argc, VALUE *argv, VALUE self) {
26832   Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
26833   void *argp1 = 0 ;
26834   int res1 = 0 ;
26835   double result;
26836   VALUE vresult = Qnil;
26837 
26838   if ((argc < 0) || (argc > 0)) {
26839     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
26840   }
26841   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Weight, 0 |  0 );
26842   if (!SWIG_IsOK(res1)) {
26843     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Weight const *","get_maxpart", 1, self ));
26844   }
26845   arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
26846   {
26847     try {
26848       result = (double)((Xapian::Weight const *)arg1)->get_maxpart();
26849     } catch (...) {
26850       string msg;
26851       int code = XapianExceptionHandler(msg);
26852       SWIG_exception(code, msg.c_str());
26853     }
26854   }
26855   vresult = SWIG_From_double(static_cast< double >(result));
26856   return vresult;
26857 fail:
26858   return Qnil;
26859 }
26860 
26861 
26862 SWIGINTERN VALUE
_wrap_Weight_sumextra(int argc,VALUE * argv,VALUE self)26863 _wrap_Weight_sumextra(int argc, VALUE *argv, VALUE self) {
26864   Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
26865   Xapian::termcount arg2 ;
26866   Xapian::termcount arg3 ;
26867   void *argp1 = 0 ;
26868   int res1 = 0 ;
26869   unsigned int val2 ;
26870   int ecode2 = 0 ;
26871   unsigned int val3 ;
26872   int ecode3 = 0 ;
26873   double result;
26874   VALUE vresult = Qnil;
26875 
26876   if ((argc < 2) || (argc > 2)) {
26877     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
26878   }
26879   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Weight, 0 |  0 );
26880   if (!SWIG_IsOK(res1)) {
26881     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Weight const *","get_sumextra", 1, self ));
26882   }
26883   arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
26884   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
26885   if (!SWIG_IsOK(ecode2)) {
26886     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 2, argv[0] ));
26887   }
26888   arg2 = static_cast< Xapian::termcount >(val2);
26889   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
26890   if (!SWIG_IsOK(ecode3)) {
26891     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 3, argv[1] ));
26892   }
26893   arg3 = static_cast< Xapian::termcount >(val3);
26894   {
26895     try {
26896       result = (double)((Xapian::Weight const *)arg1)->get_sumextra(arg2,arg3);
26897     } catch (...) {
26898       string msg;
26899       int code = XapianExceptionHandler(msg);
26900       SWIG_exception(code, msg.c_str());
26901     }
26902   }
26903   vresult = SWIG_From_double(static_cast< double >(result));
26904   return vresult;
26905 fail:
26906   return Qnil;
26907 }
26908 
26909 
26910 SWIGINTERN VALUE
_wrap_Weight_maxextra(int argc,VALUE * argv,VALUE self)26911 _wrap_Weight_maxextra(int argc, VALUE *argv, VALUE self) {
26912   Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
26913   void *argp1 = 0 ;
26914   int res1 = 0 ;
26915   double result;
26916   VALUE vresult = Qnil;
26917 
26918   if ((argc < 0) || (argc > 0)) {
26919     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
26920   }
26921   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Weight, 0 |  0 );
26922   if (!SWIG_IsOK(res1)) {
26923     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Weight const *","get_maxextra", 1, self ));
26924   }
26925   arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
26926   {
26927     try {
26928       result = (double)((Xapian::Weight const *)arg1)->get_maxextra();
26929     } catch (...) {
26930       string msg;
26931       int code = XapianExceptionHandler(msg);
26932       SWIG_exception(code, msg.c_str());
26933     }
26934   }
26935   vresult = SWIG_From_double(static_cast< double >(result));
26936   return vresult;
26937 fail:
26938   return Qnil;
26939 }
26940 
26941 
26942 static swig_class SwigClassBoolWeight;
26943 
26944 SWIGINTERN VALUE
26945 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_BoolWeight_allocate(VALUE self)26946 _wrap_BoolWeight_allocate(VALUE self)
26947 #else
26948 _wrap_BoolWeight_allocate(int argc, VALUE *argv, VALUE self)
26949 #endif
26950 {
26951   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__BoolWeight);
26952 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
26953   rb_obj_call_init(vresult, argc, argv);
26954 #endif
26955   return vresult;
26956 }
26957 
26958 
26959 SWIGINTERN VALUE
_wrap_new_BoolWeight(int argc,VALUE * argv,VALUE self)26960 _wrap_new_BoolWeight(int argc, VALUE *argv, VALUE self) {
26961   const char *classname SWIGUNUSED = "Xapian::BoolWeight";
26962   Xapian::BoolWeight *result = 0 ;
26963 
26964   if ((argc < 0) || (argc > 0)) {
26965     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
26966   }
26967   {
26968     try {
26969       result = (Xapian::BoolWeight *)new Xapian::BoolWeight();
26970       DATA_PTR(self) = result;
26971     } catch (...) {
26972       string msg;
26973       int code = XapianExceptionHandler(msg);
26974       SWIG_exception(code, msg.c_str());
26975     }
26976   }
26977   return self;
26978 fail:
26979   return Qnil;
26980 }
26981 
26982 
26983 SWIGINTERN VALUE
_wrap_BoolWeight_name(int argc,VALUE * argv,VALUE self)26984 _wrap_BoolWeight_name(int argc, VALUE *argv, VALUE self) {
26985   Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
26986   void *argp1 = 0 ;
26987   int res1 = 0 ;
26988   std::string result;
26989   VALUE vresult = Qnil;
26990 
26991   if ((argc < 0) || (argc > 0)) {
26992     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
26993   }
26994   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__BoolWeight, 0 |  0 );
26995   if (!SWIG_IsOK(res1)) {
26996     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::BoolWeight const *","name", 1, self ));
26997   }
26998   arg1 = reinterpret_cast< Xapian::BoolWeight * >(argp1);
26999   {
27000     try {
27001       result = ((Xapian::BoolWeight const *)arg1)->name();
27002     } catch (...) {
27003       string msg;
27004       int code = XapianExceptionHandler(msg);
27005       SWIG_exception(code, msg.c_str());
27006     }
27007   }
27008   vresult = SWIG_From_std_string(static_cast< std::string >(result));
27009   return vresult;
27010 fail:
27011   return Qnil;
27012 }
27013 
27014 
27015 SWIGINTERN VALUE
_wrap_BoolWeight_sumpart(int argc,VALUE * argv,VALUE self)27016 _wrap_BoolWeight_sumpart(int argc, VALUE *argv, VALUE self) {
27017   Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
27018   Xapian::termcount arg2 ;
27019   Xapian::termcount arg3 ;
27020   Xapian::termcount arg4 ;
27021   void *argp1 = 0 ;
27022   int res1 = 0 ;
27023   unsigned int val2 ;
27024   int ecode2 = 0 ;
27025   unsigned int val3 ;
27026   int ecode3 = 0 ;
27027   unsigned int val4 ;
27028   int ecode4 = 0 ;
27029   double result;
27030   VALUE vresult = Qnil;
27031 
27032   if ((argc < 3) || (argc > 3)) {
27033     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
27034   }
27035   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__BoolWeight, 0 |  0 );
27036   if (!SWIG_IsOK(res1)) {
27037     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::BoolWeight const *","get_sumpart", 1, self ));
27038   }
27039   arg1 = reinterpret_cast< Xapian::BoolWeight * >(argp1);
27040   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
27041   if (!SWIG_IsOK(ecode2)) {
27042     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 2, argv[0] ));
27043   }
27044   arg2 = static_cast< Xapian::termcount >(val2);
27045   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
27046   if (!SWIG_IsOK(ecode3)) {
27047     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 3, argv[1] ));
27048   }
27049   arg3 = static_cast< Xapian::termcount >(val3);
27050   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
27051   if (!SWIG_IsOK(ecode4)) {
27052     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 4, argv[2] ));
27053   }
27054   arg4 = static_cast< Xapian::termcount >(val4);
27055   {
27056     try {
27057       result = (double)((Xapian::BoolWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
27058     } catch (...) {
27059       string msg;
27060       int code = XapianExceptionHandler(msg);
27061       SWIG_exception(code, msg.c_str());
27062     }
27063   }
27064   vresult = SWIG_From_double(static_cast< double >(result));
27065   return vresult;
27066 fail:
27067   return Qnil;
27068 }
27069 
27070 
27071 SWIGINTERN VALUE
_wrap_BoolWeight_maxpart(int argc,VALUE * argv,VALUE self)27072 _wrap_BoolWeight_maxpart(int argc, VALUE *argv, VALUE self) {
27073   Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
27074   void *argp1 = 0 ;
27075   int res1 = 0 ;
27076   double result;
27077   VALUE vresult = Qnil;
27078 
27079   if ((argc < 0) || (argc > 0)) {
27080     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
27081   }
27082   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__BoolWeight, 0 |  0 );
27083   if (!SWIG_IsOK(res1)) {
27084     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::BoolWeight const *","get_maxpart", 1, self ));
27085   }
27086   arg1 = reinterpret_cast< Xapian::BoolWeight * >(argp1);
27087   {
27088     try {
27089       result = (double)((Xapian::BoolWeight const *)arg1)->get_maxpart();
27090     } catch (...) {
27091       string msg;
27092       int code = XapianExceptionHandler(msg);
27093       SWIG_exception(code, msg.c_str());
27094     }
27095   }
27096   vresult = SWIG_From_double(static_cast< double >(result));
27097   return vresult;
27098 fail:
27099   return Qnil;
27100 }
27101 
27102 
27103 SWIGINTERN VALUE
_wrap_BoolWeight_sumextra(int argc,VALUE * argv,VALUE self)27104 _wrap_BoolWeight_sumextra(int argc, VALUE *argv, VALUE self) {
27105   Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
27106   Xapian::termcount arg2 ;
27107   Xapian::termcount arg3 ;
27108   void *argp1 = 0 ;
27109   int res1 = 0 ;
27110   unsigned int val2 ;
27111   int ecode2 = 0 ;
27112   unsigned int val3 ;
27113   int ecode3 = 0 ;
27114   double result;
27115   VALUE vresult = Qnil;
27116 
27117   if ((argc < 2) || (argc > 2)) {
27118     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
27119   }
27120   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__BoolWeight, 0 |  0 );
27121   if (!SWIG_IsOK(res1)) {
27122     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::BoolWeight const *","get_sumextra", 1, self ));
27123   }
27124   arg1 = reinterpret_cast< Xapian::BoolWeight * >(argp1);
27125   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
27126   if (!SWIG_IsOK(ecode2)) {
27127     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 2, argv[0] ));
27128   }
27129   arg2 = static_cast< Xapian::termcount >(val2);
27130   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
27131   if (!SWIG_IsOK(ecode3)) {
27132     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 3, argv[1] ));
27133   }
27134   arg3 = static_cast< Xapian::termcount >(val3);
27135   {
27136     try {
27137       result = (double)((Xapian::BoolWeight const *)arg1)->get_sumextra(arg2,arg3);
27138     } catch (...) {
27139       string msg;
27140       int code = XapianExceptionHandler(msg);
27141       SWIG_exception(code, msg.c_str());
27142     }
27143   }
27144   vresult = SWIG_From_double(static_cast< double >(result));
27145   return vresult;
27146 fail:
27147   return Qnil;
27148 }
27149 
27150 
27151 SWIGINTERN VALUE
_wrap_BoolWeight_maxextra(int argc,VALUE * argv,VALUE self)27152 _wrap_BoolWeight_maxextra(int argc, VALUE *argv, VALUE self) {
27153   Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
27154   void *argp1 = 0 ;
27155   int res1 = 0 ;
27156   double result;
27157   VALUE vresult = Qnil;
27158 
27159   if ((argc < 0) || (argc > 0)) {
27160     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
27161   }
27162   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__BoolWeight, 0 |  0 );
27163   if (!SWIG_IsOK(res1)) {
27164     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::BoolWeight const *","get_maxextra", 1, self ));
27165   }
27166   arg1 = reinterpret_cast< Xapian::BoolWeight * >(argp1);
27167   {
27168     try {
27169       result = (double)((Xapian::BoolWeight const *)arg1)->get_maxextra();
27170     } catch (...) {
27171       string msg;
27172       int code = XapianExceptionHandler(msg);
27173       SWIG_exception(code, msg.c_str());
27174     }
27175   }
27176   vresult = SWIG_From_double(static_cast< double >(result));
27177   return vresult;
27178 fail:
27179   return Qnil;
27180 }
27181 
27182 
27183 SWIGINTERN void
free_Xapian_BoolWeight(void * self)27184 free_Xapian_BoolWeight(void *self) {
27185     Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *)self;
27186     delete arg1;
27187 }
27188 
27189 static swig_class SwigClassTfIdfWeight;
27190 
27191 SWIGINTERN VALUE
_wrap_new_TfIdfWeight__SWIG_0(int argc,VALUE * argv,VALUE self)27192 _wrap_new_TfIdfWeight__SWIG_0(int argc, VALUE *argv, VALUE self) {
27193   std::string *arg1 = 0 ;
27194   int res1 = SWIG_OLDOBJ ;
27195   const char *classname SWIGUNUSED = "Xapian::TfIdfWeight";
27196   Xapian::TfIdfWeight *result = 0 ;
27197 
27198   if ((argc < 1) || (argc > 1)) {
27199     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
27200   }
27201   {
27202     std::string *ptr = (std::string *)0;
27203     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
27204     if (!SWIG_IsOK(res1)) {
27205       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","TfIdfWeight", 1, argv[0] ));
27206     }
27207     if (!ptr) {
27208       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","TfIdfWeight", 1, argv[0]));
27209     }
27210     arg1 = ptr;
27211   }
27212   {
27213     try {
27214       result = (Xapian::TfIdfWeight *)new Xapian::TfIdfWeight((std::string const &)*arg1);
27215       DATA_PTR(self) = result;
27216     } catch (...) {
27217       string msg;
27218       int code = XapianExceptionHandler(msg);
27219       SWIG_exception(code, msg.c_str());
27220     }
27221   }
27222   if (SWIG_IsNewObj(res1)) delete arg1;
27223   return self;
27224 fail:
27225   if (SWIG_IsNewObj(res1)) delete arg1;
27226   return Qnil;
27227 }
27228 
27229 
27230 SWIGINTERN VALUE
27231 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_TfIdfWeight_allocate(VALUE self)27232 _wrap_TfIdfWeight_allocate(VALUE self)
27233 #else
27234 _wrap_TfIdfWeight_allocate(int argc, VALUE *argv, VALUE self)
27235 #endif
27236 {
27237   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__TfIdfWeight);
27238 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
27239   rb_obj_call_init(vresult, argc, argv);
27240 #endif
27241   return vresult;
27242 }
27243 
27244 
27245 SWIGINTERN VALUE
_wrap_new_TfIdfWeight__SWIG_1(int argc,VALUE * argv,VALUE self)27246 _wrap_new_TfIdfWeight__SWIG_1(int argc, VALUE *argv, VALUE self) {
27247   const char *classname SWIGUNUSED = "Xapian::TfIdfWeight";
27248   Xapian::TfIdfWeight *result = 0 ;
27249 
27250   if ((argc < 0) || (argc > 0)) {
27251     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
27252   }
27253   {
27254     try {
27255       result = (Xapian::TfIdfWeight *)new Xapian::TfIdfWeight();
27256       DATA_PTR(self) = result;
27257     } catch (...) {
27258       string msg;
27259       int code = XapianExceptionHandler(msg);
27260       SWIG_exception(code, msg.c_str());
27261     }
27262   }
27263   return self;
27264 fail:
27265   return Qnil;
27266 }
27267 
27268 
_wrap_new_TfIdfWeight(int nargs,VALUE * args,VALUE self)27269 SWIGINTERN VALUE _wrap_new_TfIdfWeight(int nargs, VALUE *args, VALUE self) {
27270   int argc;
27271   VALUE argv[1];
27272   int ii;
27273 
27274   argc = nargs;
27275   if (argc > 1) SWIG_fail;
27276   for (ii = 0; (ii < argc); ++ii) {
27277     argv[ii] = args[ii];
27278   }
27279   if (argc == 0) {
27280     return _wrap_new_TfIdfWeight__SWIG_1(nargs, args, self);
27281   }
27282   if (argc == 1) {
27283     int _v;
27284     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
27285     _v = SWIG_CheckState(res);
27286     if (_v) {
27287       return _wrap_new_TfIdfWeight__SWIG_0(nargs, args, self);
27288     }
27289   }
27290 
27291 fail:
27292   Ruby_Format_OverloadedError( argc, 1, "TfIdfWeight.new",
27293     "    TfIdfWeight.new(std::string const &normalizations)\n"
27294     "    TfIdfWeight.new()\n");
27295 
27296   return Qnil;
27297 }
27298 
27299 
27300 SWIGINTERN VALUE
_wrap_TfIdfWeight_name(int argc,VALUE * argv,VALUE self)27301 _wrap_TfIdfWeight_name(int argc, VALUE *argv, VALUE self) {
27302   Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
27303   void *argp1 = 0 ;
27304   int res1 = 0 ;
27305   std::string result;
27306   VALUE vresult = Qnil;
27307 
27308   if ((argc < 0) || (argc > 0)) {
27309     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
27310   }
27311   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TfIdfWeight, 0 |  0 );
27312   if (!SWIG_IsOK(res1)) {
27313     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TfIdfWeight const *","name", 1, self ));
27314   }
27315   arg1 = reinterpret_cast< Xapian::TfIdfWeight * >(argp1);
27316   {
27317     try {
27318       result = ((Xapian::TfIdfWeight const *)arg1)->name();
27319     } catch (...) {
27320       string msg;
27321       int code = XapianExceptionHandler(msg);
27322       SWIG_exception(code, msg.c_str());
27323     }
27324   }
27325   vresult = SWIG_From_std_string(static_cast< std::string >(result));
27326   return vresult;
27327 fail:
27328   return Qnil;
27329 }
27330 
27331 
27332 SWIGINTERN VALUE
_wrap_TfIdfWeight_sumpart(int argc,VALUE * argv,VALUE self)27333 _wrap_TfIdfWeight_sumpart(int argc, VALUE *argv, VALUE self) {
27334   Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
27335   Xapian::termcount arg2 ;
27336   Xapian::termcount arg3 ;
27337   Xapian::termcount arg4 ;
27338   void *argp1 = 0 ;
27339   int res1 = 0 ;
27340   unsigned int val2 ;
27341   int ecode2 = 0 ;
27342   unsigned int val3 ;
27343   int ecode3 = 0 ;
27344   unsigned int val4 ;
27345   int ecode4 = 0 ;
27346   double result;
27347   VALUE vresult = Qnil;
27348 
27349   if ((argc < 3) || (argc > 3)) {
27350     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
27351   }
27352   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TfIdfWeight, 0 |  0 );
27353   if (!SWIG_IsOK(res1)) {
27354     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TfIdfWeight const *","get_sumpart", 1, self ));
27355   }
27356   arg1 = reinterpret_cast< Xapian::TfIdfWeight * >(argp1);
27357   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
27358   if (!SWIG_IsOK(ecode2)) {
27359     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 2, argv[0] ));
27360   }
27361   arg2 = static_cast< Xapian::termcount >(val2);
27362   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
27363   if (!SWIG_IsOK(ecode3)) {
27364     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 3, argv[1] ));
27365   }
27366   arg3 = static_cast< Xapian::termcount >(val3);
27367   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
27368   if (!SWIG_IsOK(ecode4)) {
27369     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 4, argv[2] ));
27370   }
27371   arg4 = static_cast< Xapian::termcount >(val4);
27372   {
27373     try {
27374       result = (double)((Xapian::TfIdfWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
27375     } catch (...) {
27376       string msg;
27377       int code = XapianExceptionHandler(msg);
27378       SWIG_exception(code, msg.c_str());
27379     }
27380   }
27381   vresult = SWIG_From_double(static_cast< double >(result));
27382   return vresult;
27383 fail:
27384   return Qnil;
27385 }
27386 
27387 
27388 SWIGINTERN VALUE
_wrap_TfIdfWeight_maxpart(int argc,VALUE * argv,VALUE self)27389 _wrap_TfIdfWeight_maxpart(int argc, VALUE *argv, VALUE self) {
27390   Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
27391   void *argp1 = 0 ;
27392   int res1 = 0 ;
27393   double result;
27394   VALUE vresult = Qnil;
27395 
27396   if ((argc < 0) || (argc > 0)) {
27397     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
27398   }
27399   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TfIdfWeight, 0 |  0 );
27400   if (!SWIG_IsOK(res1)) {
27401     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TfIdfWeight const *","get_maxpart", 1, self ));
27402   }
27403   arg1 = reinterpret_cast< Xapian::TfIdfWeight * >(argp1);
27404   {
27405     try {
27406       result = (double)((Xapian::TfIdfWeight const *)arg1)->get_maxpart();
27407     } catch (...) {
27408       string msg;
27409       int code = XapianExceptionHandler(msg);
27410       SWIG_exception(code, msg.c_str());
27411     }
27412   }
27413   vresult = SWIG_From_double(static_cast< double >(result));
27414   return vresult;
27415 fail:
27416   return Qnil;
27417 }
27418 
27419 
27420 SWIGINTERN VALUE
_wrap_TfIdfWeight_sumextra(int argc,VALUE * argv,VALUE self)27421 _wrap_TfIdfWeight_sumextra(int argc, VALUE *argv, VALUE self) {
27422   Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
27423   Xapian::termcount arg2 ;
27424   Xapian::termcount arg3 ;
27425   void *argp1 = 0 ;
27426   int res1 = 0 ;
27427   unsigned int val2 ;
27428   int ecode2 = 0 ;
27429   unsigned int val3 ;
27430   int ecode3 = 0 ;
27431   double result;
27432   VALUE vresult = Qnil;
27433 
27434   if ((argc < 2) || (argc > 2)) {
27435     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
27436   }
27437   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TfIdfWeight, 0 |  0 );
27438   if (!SWIG_IsOK(res1)) {
27439     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TfIdfWeight const *","get_sumextra", 1, self ));
27440   }
27441   arg1 = reinterpret_cast< Xapian::TfIdfWeight * >(argp1);
27442   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
27443   if (!SWIG_IsOK(ecode2)) {
27444     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 2, argv[0] ));
27445   }
27446   arg2 = static_cast< Xapian::termcount >(val2);
27447   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
27448   if (!SWIG_IsOK(ecode3)) {
27449     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 3, argv[1] ));
27450   }
27451   arg3 = static_cast< Xapian::termcount >(val3);
27452   {
27453     try {
27454       result = (double)((Xapian::TfIdfWeight const *)arg1)->get_sumextra(arg2,arg3);
27455     } catch (...) {
27456       string msg;
27457       int code = XapianExceptionHandler(msg);
27458       SWIG_exception(code, msg.c_str());
27459     }
27460   }
27461   vresult = SWIG_From_double(static_cast< double >(result));
27462   return vresult;
27463 fail:
27464   return Qnil;
27465 }
27466 
27467 
27468 SWIGINTERN VALUE
_wrap_TfIdfWeight_maxextra(int argc,VALUE * argv,VALUE self)27469 _wrap_TfIdfWeight_maxextra(int argc, VALUE *argv, VALUE self) {
27470   Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
27471   void *argp1 = 0 ;
27472   int res1 = 0 ;
27473   double result;
27474   VALUE vresult = Qnil;
27475 
27476   if ((argc < 0) || (argc > 0)) {
27477     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
27478   }
27479   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TfIdfWeight, 0 |  0 );
27480   if (!SWIG_IsOK(res1)) {
27481     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TfIdfWeight const *","get_maxextra", 1, self ));
27482   }
27483   arg1 = reinterpret_cast< Xapian::TfIdfWeight * >(argp1);
27484   {
27485     try {
27486       result = (double)((Xapian::TfIdfWeight const *)arg1)->get_maxextra();
27487     } catch (...) {
27488       string msg;
27489       int code = XapianExceptionHandler(msg);
27490       SWIG_exception(code, msg.c_str());
27491     }
27492   }
27493   vresult = SWIG_From_double(static_cast< double >(result));
27494   return vresult;
27495 fail:
27496   return Qnil;
27497 }
27498 
27499 
27500 SWIGINTERN void
free_Xapian_TfIdfWeight(void * self)27501 free_Xapian_TfIdfWeight(void *self) {
27502     Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *)self;
27503     delete arg1;
27504 }
27505 
27506 static swig_class SwigClassBM25Weight;
27507 
27508 SWIGINTERN VALUE
_wrap_new_BM25Weight__SWIG_0(int argc,VALUE * argv,VALUE self)27509 _wrap_new_BM25Weight__SWIG_0(int argc, VALUE *argv, VALUE self) {
27510   double arg1 ;
27511   double arg2 ;
27512   double arg3 ;
27513   double arg4 ;
27514   double arg5 ;
27515   double val1 ;
27516   int ecode1 = 0 ;
27517   double val2 ;
27518   int ecode2 = 0 ;
27519   double val3 ;
27520   int ecode3 = 0 ;
27521   double val4 ;
27522   int ecode4 = 0 ;
27523   double val5 ;
27524   int ecode5 = 0 ;
27525   const char *classname SWIGUNUSED = "Xapian::BM25Weight";
27526   Xapian::BM25Weight *result = 0 ;
27527 
27528   if ((argc < 5) || (argc > 5)) {
27529     rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
27530   }
27531   ecode1 = SWIG_AsVal_double(argv[0], &val1);
27532   if (!SWIG_IsOK(ecode1)) {
27533     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","BM25Weight", 1, argv[0] ));
27534   }
27535   arg1 = static_cast< double >(val1);
27536   ecode2 = SWIG_AsVal_double(argv[1], &val2);
27537   if (!SWIG_IsOK(ecode2)) {
27538     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","BM25Weight", 2, argv[1] ));
27539   }
27540   arg2 = static_cast< double >(val2);
27541   ecode3 = SWIG_AsVal_double(argv[2], &val3);
27542   if (!SWIG_IsOK(ecode3)) {
27543     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","BM25Weight", 3, argv[2] ));
27544   }
27545   arg3 = static_cast< double >(val3);
27546   ecode4 = SWIG_AsVal_double(argv[3], &val4);
27547   if (!SWIG_IsOK(ecode4)) {
27548     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","BM25Weight", 4, argv[3] ));
27549   }
27550   arg4 = static_cast< double >(val4);
27551   ecode5 = SWIG_AsVal_double(argv[4], &val5);
27552   if (!SWIG_IsOK(ecode5)) {
27553     SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","BM25Weight", 5, argv[4] ));
27554   }
27555   arg5 = static_cast< double >(val5);
27556   {
27557     try {
27558       result = (Xapian::BM25Weight *)new Xapian::BM25Weight(arg1,arg2,arg3,arg4,arg5);
27559       DATA_PTR(self) = result;
27560     } catch (...) {
27561       string msg;
27562       int code = XapianExceptionHandler(msg);
27563       SWIG_exception(code, msg.c_str());
27564     }
27565   }
27566   return self;
27567 fail:
27568   return Qnil;
27569 }
27570 
27571 
27572 SWIGINTERN VALUE
27573 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_BM25Weight_allocate(VALUE self)27574 _wrap_BM25Weight_allocate(VALUE self)
27575 #else
27576 _wrap_BM25Weight_allocate(int argc, VALUE *argv, VALUE self)
27577 #endif
27578 {
27579   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__BM25Weight);
27580 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
27581   rb_obj_call_init(vresult, argc, argv);
27582 #endif
27583   return vresult;
27584 }
27585 
27586 
27587 SWIGINTERN VALUE
_wrap_new_BM25Weight__SWIG_1(int argc,VALUE * argv,VALUE self)27588 _wrap_new_BM25Weight__SWIG_1(int argc, VALUE *argv, VALUE self) {
27589   const char *classname SWIGUNUSED = "Xapian::BM25Weight";
27590   Xapian::BM25Weight *result = 0 ;
27591 
27592   if ((argc < 0) || (argc > 0)) {
27593     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
27594   }
27595   {
27596     try {
27597       result = (Xapian::BM25Weight *)new Xapian::BM25Weight();
27598       DATA_PTR(self) = result;
27599     } catch (...) {
27600       string msg;
27601       int code = XapianExceptionHandler(msg);
27602       SWIG_exception(code, msg.c_str());
27603     }
27604   }
27605   return self;
27606 fail:
27607   return Qnil;
27608 }
27609 
27610 
_wrap_new_BM25Weight(int nargs,VALUE * args,VALUE self)27611 SWIGINTERN VALUE _wrap_new_BM25Weight(int nargs, VALUE *args, VALUE self) {
27612   int argc;
27613   VALUE argv[5];
27614   int ii;
27615 
27616   argc = nargs;
27617   if (argc > 5) SWIG_fail;
27618   for (ii = 0; (ii < argc); ++ii) {
27619     argv[ii] = args[ii];
27620   }
27621   if (argc == 0) {
27622     return _wrap_new_BM25Weight__SWIG_1(nargs, args, self);
27623   }
27624   if (argc == 5) {
27625     int _v;
27626     {
27627       int res = SWIG_AsVal_double(argv[0], NULL);
27628       _v = SWIG_CheckState(res);
27629     }
27630     if (_v) {
27631       {
27632         int res = SWIG_AsVal_double(argv[1], NULL);
27633         _v = SWIG_CheckState(res);
27634       }
27635       if (_v) {
27636         {
27637           int res = SWIG_AsVal_double(argv[2], NULL);
27638           _v = SWIG_CheckState(res);
27639         }
27640         if (_v) {
27641           {
27642             int res = SWIG_AsVal_double(argv[3], NULL);
27643             _v = SWIG_CheckState(res);
27644           }
27645           if (_v) {
27646             {
27647               int res = SWIG_AsVal_double(argv[4], NULL);
27648               _v = SWIG_CheckState(res);
27649             }
27650             if (_v) {
27651               return _wrap_new_BM25Weight__SWIG_0(nargs, args, self);
27652             }
27653           }
27654         }
27655       }
27656     }
27657   }
27658 
27659 fail:
27660   Ruby_Format_OverloadedError( argc, 5, "BM25Weight.new",
27661     "    BM25Weight.new(double k1, double k2, double k3, double b, double min_normlen)\n"
27662     "    BM25Weight.new()\n");
27663 
27664   return Qnil;
27665 }
27666 
27667 
27668 SWIGINTERN VALUE
_wrap_BM25Weight_name(int argc,VALUE * argv,VALUE self)27669 _wrap_BM25Weight_name(int argc, VALUE *argv, VALUE self) {
27670   Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
27671   void *argp1 = 0 ;
27672   int res1 = 0 ;
27673   std::string result;
27674   VALUE vresult = Qnil;
27675 
27676   if ((argc < 0) || (argc > 0)) {
27677     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
27678   }
27679   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__BM25Weight, 0 |  0 );
27680   if (!SWIG_IsOK(res1)) {
27681     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::BM25Weight const *","name", 1, self ));
27682   }
27683   arg1 = reinterpret_cast< Xapian::BM25Weight * >(argp1);
27684   {
27685     try {
27686       result = ((Xapian::BM25Weight const *)arg1)->name();
27687     } catch (...) {
27688       string msg;
27689       int code = XapianExceptionHandler(msg);
27690       SWIG_exception(code, msg.c_str());
27691     }
27692   }
27693   vresult = SWIG_From_std_string(static_cast< std::string >(result));
27694   return vresult;
27695 fail:
27696   return Qnil;
27697 }
27698 
27699 
27700 SWIGINTERN VALUE
_wrap_BM25Weight_sumpart(int argc,VALUE * argv,VALUE self)27701 _wrap_BM25Weight_sumpart(int argc, VALUE *argv, VALUE self) {
27702   Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
27703   Xapian::termcount arg2 ;
27704   Xapian::termcount arg3 ;
27705   Xapian::termcount arg4 ;
27706   void *argp1 = 0 ;
27707   int res1 = 0 ;
27708   unsigned int val2 ;
27709   int ecode2 = 0 ;
27710   unsigned int val3 ;
27711   int ecode3 = 0 ;
27712   unsigned int val4 ;
27713   int ecode4 = 0 ;
27714   double result;
27715   VALUE vresult = Qnil;
27716 
27717   if ((argc < 3) || (argc > 3)) {
27718     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
27719   }
27720   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__BM25Weight, 0 |  0 );
27721   if (!SWIG_IsOK(res1)) {
27722     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::BM25Weight const *","get_sumpart", 1, self ));
27723   }
27724   arg1 = reinterpret_cast< Xapian::BM25Weight * >(argp1);
27725   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
27726   if (!SWIG_IsOK(ecode2)) {
27727     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 2, argv[0] ));
27728   }
27729   arg2 = static_cast< Xapian::termcount >(val2);
27730   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
27731   if (!SWIG_IsOK(ecode3)) {
27732     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 3, argv[1] ));
27733   }
27734   arg3 = static_cast< Xapian::termcount >(val3);
27735   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
27736   if (!SWIG_IsOK(ecode4)) {
27737     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 4, argv[2] ));
27738   }
27739   arg4 = static_cast< Xapian::termcount >(val4);
27740   {
27741     try {
27742       result = (double)((Xapian::BM25Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
27743     } catch (...) {
27744       string msg;
27745       int code = XapianExceptionHandler(msg);
27746       SWIG_exception(code, msg.c_str());
27747     }
27748   }
27749   vresult = SWIG_From_double(static_cast< double >(result));
27750   return vresult;
27751 fail:
27752   return Qnil;
27753 }
27754 
27755 
27756 SWIGINTERN VALUE
_wrap_BM25Weight_maxpart(int argc,VALUE * argv,VALUE self)27757 _wrap_BM25Weight_maxpart(int argc, VALUE *argv, VALUE self) {
27758   Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
27759   void *argp1 = 0 ;
27760   int res1 = 0 ;
27761   double result;
27762   VALUE vresult = Qnil;
27763 
27764   if ((argc < 0) || (argc > 0)) {
27765     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
27766   }
27767   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__BM25Weight, 0 |  0 );
27768   if (!SWIG_IsOK(res1)) {
27769     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::BM25Weight const *","get_maxpart", 1, self ));
27770   }
27771   arg1 = reinterpret_cast< Xapian::BM25Weight * >(argp1);
27772   {
27773     try {
27774       result = (double)((Xapian::BM25Weight const *)arg1)->get_maxpart();
27775     } catch (...) {
27776       string msg;
27777       int code = XapianExceptionHandler(msg);
27778       SWIG_exception(code, msg.c_str());
27779     }
27780   }
27781   vresult = SWIG_From_double(static_cast< double >(result));
27782   return vresult;
27783 fail:
27784   return Qnil;
27785 }
27786 
27787 
27788 SWIGINTERN VALUE
_wrap_BM25Weight_sumextra(int argc,VALUE * argv,VALUE self)27789 _wrap_BM25Weight_sumextra(int argc, VALUE *argv, VALUE self) {
27790   Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
27791   Xapian::termcount arg2 ;
27792   Xapian::termcount arg3 ;
27793   void *argp1 = 0 ;
27794   int res1 = 0 ;
27795   unsigned int val2 ;
27796   int ecode2 = 0 ;
27797   unsigned int val3 ;
27798   int ecode3 = 0 ;
27799   double result;
27800   VALUE vresult = Qnil;
27801 
27802   if ((argc < 2) || (argc > 2)) {
27803     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
27804   }
27805   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__BM25Weight, 0 |  0 );
27806   if (!SWIG_IsOK(res1)) {
27807     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::BM25Weight const *","get_sumextra", 1, self ));
27808   }
27809   arg1 = reinterpret_cast< Xapian::BM25Weight * >(argp1);
27810   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
27811   if (!SWIG_IsOK(ecode2)) {
27812     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 2, argv[0] ));
27813   }
27814   arg2 = static_cast< Xapian::termcount >(val2);
27815   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
27816   if (!SWIG_IsOK(ecode3)) {
27817     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 3, argv[1] ));
27818   }
27819   arg3 = static_cast< Xapian::termcount >(val3);
27820   {
27821     try {
27822       result = (double)((Xapian::BM25Weight const *)arg1)->get_sumextra(arg2,arg3);
27823     } catch (...) {
27824       string msg;
27825       int code = XapianExceptionHandler(msg);
27826       SWIG_exception(code, msg.c_str());
27827     }
27828   }
27829   vresult = SWIG_From_double(static_cast< double >(result));
27830   return vresult;
27831 fail:
27832   return Qnil;
27833 }
27834 
27835 
27836 SWIGINTERN VALUE
_wrap_BM25Weight_maxextra(int argc,VALUE * argv,VALUE self)27837 _wrap_BM25Weight_maxextra(int argc, VALUE *argv, VALUE self) {
27838   Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
27839   void *argp1 = 0 ;
27840   int res1 = 0 ;
27841   double result;
27842   VALUE vresult = Qnil;
27843 
27844   if ((argc < 0) || (argc > 0)) {
27845     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
27846   }
27847   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__BM25Weight, 0 |  0 );
27848   if (!SWIG_IsOK(res1)) {
27849     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::BM25Weight const *","get_maxextra", 1, self ));
27850   }
27851   arg1 = reinterpret_cast< Xapian::BM25Weight * >(argp1);
27852   {
27853     try {
27854       result = (double)((Xapian::BM25Weight const *)arg1)->get_maxextra();
27855     } catch (...) {
27856       string msg;
27857       int code = XapianExceptionHandler(msg);
27858       SWIG_exception(code, msg.c_str());
27859     }
27860   }
27861   vresult = SWIG_From_double(static_cast< double >(result));
27862   return vresult;
27863 fail:
27864   return Qnil;
27865 }
27866 
27867 
27868 SWIGINTERN void
free_Xapian_BM25Weight(void * self)27869 free_Xapian_BM25Weight(void *self) {
27870     Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *)self;
27871     delete arg1;
27872 }
27873 
27874 static swig_class SwigClassBM25PlusWeight;
27875 
27876 SWIGINTERN VALUE
_wrap_new_BM25PlusWeight__SWIG_0(int argc,VALUE * argv,VALUE self)27877 _wrap_new_BM25PlusWeight__SWIG_0(int argc, VALUE *argv, VALUE self) {
27878   double arg1 ;
27879   double arg2 ;
27880   double arg3 ;
27881   double arg4 ;
27882   double arg5 ;
27883   double arg6 ;
27884   double val1 ;
27885   int ecode1 = 0 ;
27886   double val2 ;
27887   int ecode2 = 0 ;
27888   double val3 ;
27889   int ecode3 = 0 ;
27890   double val4 ;
27891   int ecode4 = 0 ;
27892   double val5 ;
27893   int ecode5 = 0 ;
27894   double val6 ;
27895   int ecode6 = 0 ;
27896   const char *classname SWIGUNUSED = "Xapian::BM25PlusWeight";
27897   Xapian::BM25PlusWeight *result = 0 ;
27898 
27899   if ((argc < 6) || (argc > 6)) {
27900     rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
27901   }
27902   ecode1 = SWIG_AsVal_double(argv[0], &val1);
27903   if (!SWIG_IsOK(ecode1)) {
27904     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","BM25PlusWeight", 1, argv[0] ));
27905   }
27906   arg1 = static_cast< double >(val1);
27907   ecode2 = SWIG_AsVal_double(argv[1], &val2);
27908   if (!SWIG_IsOK(ecode2)) {
27909     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","BM25PlusWeight", 2, argv[1] ));
27910   }
27911   arg2 = static_cast< double >(val2);
27912   ecode3 = SWIG_AsVal_double(argv[2], &val3);
27913   if (!SWIG_IsOK(ecode3)) {
27914     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","BM25PlusWeight", 3, argv[2] ));
27915   }
27916   arg3 = static_cast< double >(val3);
27917   ecode4 = SWIG_AsVal_double(argv[3], &val4);
27918   if (!SWIG_IsOK(ecode4)) {
27919     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","BM25PlusWeight", 4, argv[3] ));
27920   }
27921   arg4 = static_cast< double >(val4);
27922   ecode5 = SWIG_AsVal_double(argv[4], &val5);
27923   if (!SWIG_IsOK(ecode5)) {
27924     SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","BM25PlusWeight", 5, argv[4] ));
27925   }
27926   arg5 = static_cast< double >(val5);
27927   ecode6 = SWIG_AsVal_double(argv[5], &val6);
27928   if (!SWIG_IsOK(ecode6)) {
27929     SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","BM25PlusWeight", 6, argv[5] ));
27930   }
27931   arg6 = static_cast< double >(val6);
27932   {
27933     try {
27934       result = (Xapian::BM25PlusWeight *)new Xapian::BM25PlusWeight(arg1,arg2,arg3,arg4,arg5,arg6);
27935       DATA_PTR(self) = result;
27936     } catch (...) {
27937       string msg;
27938       int code = XapianExceptionHandler(msg);
27939       SWIG_exception(code, msg.c_str());
27940     }
27941   }
27942   return self;
27943 fail:
27944   return Qnil;
27945 }
27946 
27947 
27948 SWIGINTERN VALUE
27949 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_BM25PlusWeight_allocate(VALUE self)27950 _wrap_BM25PlusWeight_allocate(VALUE self)
27951 #else
27952 _wrap_BM25PlusWeight_allocate(int argc, VALUE *argv, VALUE self)
27953 #endif
27954 {
27955   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__BM25PlusWeight);
27956 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
27957   rb_obj_call_init(vresult, argc, argv);
27958 #endif
27959   return vresult;
27960 }
27961 
27962 
27963 SWIGINTERN VALUE
_wrap_new_BM25PlusWeight__SWIG_1(int argc,VALUE * argv,VALUE self)27964 _wrap_new_BM25PlusWeight__SWIG_1(int argc, VALUE *argv, VALUE self) {
27965   const char *classname SWIGUNUSED = "Xapian::BM25PlusWeight";
27966   Xapian::BM25PlusWeight *result = 0 ;
27967 
27968   if ((argc < 0) || (argc > 0)) {
27969     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
27970   }
27971   {
27972     try {
27973       result = (Xapian::BM25PlusWeight *)new Xapian::BM25PlusWeight();
27974       DATA_PTR(self) = result;
27975     } catch (...) {
27976       string msg;
27977       int code = XapianExceptionHandler(msg);
27978       SWIG_exception(code, msg.c_str());
27979     }
27980   }
27981   return self;
27982 fail:
27983   return Qnil;
27984 }
27985 
27986 
_wrap_new_BM25PlusWeight(int nargs,VALUE * args,VALUE self)27987 SWIGINTERN VALUE _wrap_new_BM25PlusWeight(int nargs, VALUE *args, VALUE self) {
27988   int argc;
27989   VALUE argv[6];
27990   int ii;
27991 
27992   argc = nargs;
27993   if (argc > 6) SWIG_fail;
27994   for (ii = 0; (ii < argc); ++ii) {
27995     argv[ii] = args[ii];
27996   }
27997   if (argc == 0) {
27998     return _wrap_new_BM25PlusWeight__SWIG_1(nargs, args, self);
27999   }
28000   if (argc == 6) {
28001     int _v;
28002     {
28003       int res = SWIG_AsVal_double(argv[0], NULL);
28004       _v = SWIG_CheckState(res);
28005     }
28006     if (_v) {
28007       {
28008         int res = SWIG_AsVal_double(argv[1], NULL);
28009         _v = SWIG_CheckState(res);
28010       }
28011       if (_v) {
28012         {
28013           int res = SWIG_AsVal_double(argv[2], NULL);
28014           _v = SWIG_CheckState(res);
28015         }
28016         if (_v) {
28017           {
28018             int res = SWIG_AsVal_double(argv[3], NULL);
28019             _v = SWIG_CheckState(res);
28020           }
28021           if (_v) {
28022             {
28023               int res = SWIG_AsVal_double(argv[4], NULL);
28024               _v = SWIG_CheckState(res);
28025             }
28026             if (_v) {
28027               {
28028                 int res = SWIG_AsVal_double(argv[5], NULL);
28029                 _v = SWIG_CheckState(res);
28030               }
28031               if (_v) {
28032                 return _wrap_new_BM25PlusWeight__SWIG_0(nargs, args, self);
28033               }
28034             }
28035           }
28036         }
28037       }
28038     }
28039   }
28040 
28041 fail:
28042   Ruby_Format_OverloadedError( argc, 6, "BM25PlusWeight.new",
28043     "    BM25PlusWeight.new(double k1, double k2, double k3, double b, double min_normlen, double delta)\n"
28044     "    BM25PlusWeight.new()\n");
28045 
28046   return Qnil;
28047 }
28048 
28049 
28050 SWIGINTERN VALUE
_wrap_BM25PlusWeight_name(int argc,VALUE * argv,VALUE self)28051 _wrap_BM25PlusWeight_name(int argc, VALUE *argv, VALUE self) {
28052   Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
28053   void *argp1 = 0 ;
28054   int res1 = 0 ;
28055   std::string result;
28056   VALUE vresult = Qnil;
28057 
28058   if ((argc < 0) || (argc > 0)) {
28059     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
28060   }
28061   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__BM25PlusWeight, 0 |  0 );
28062   if (!SWIG_IsOK(res1)) {
28063     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::BM25PlusWeight const *","name", 1, self ));
28064   }
28065   arg1 = reinterpret_cast< Xapian::BM25PlusWeight * >(argp1);
28066   {
28067     try {
28068       result = ((Xapian::BM25PlusWeight const *)arg1)->name();
28069     } catch (...) {
28070       string msg;
28071       int code = XapianExceptionHandler(msg);
28072       SWIG_exception(code, msg.c_str());
28073     }
28074   }
28075   vresult = SWIG_From_std_string(static_cast< std::string >(result));
28076   return vresult;
28077 fail:
28078   return Qnil;
28079 }
28080 
28081 
28082 SWIGINTERN VALUE
_wrap_BM25PlusWeight_sumpart(int argc,VALUE * argv,VALUE self)28083 _wrap_BM25PlusWeight_sumpart(int argc, VALUE *argv, VALUE self) {
28084   Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
28085   Xapian::termcount arg2 ;
28086   Xapian::termcount arg3 ;
28087   Xapian::termcount arg4 ;
28088   void *argp1 = 0 ;
28089   int res1 = 0 ;
28090   unsigned int val2 ;
28091   int ecode2 = 0 ;
28092   unsigned int val3 ;
28093   int ecode3 = 0 ;
28094   unsigned int val4 ;
28095   int ecode4 = 0 ;
28096   double result;
28097   VALUE vresult = Qnil;
28098 
28099   if ((argc < 3) || (argc > 3)) {
28100     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
28101   }
28102   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__BM25PlusWeight, 0 |  0 );
28103   if (!SWIG_IsOK(res1)) {
28104     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::BM25PlusWeight const *","get_sumpart", 1, self ));
28105   }
28106   arg1 = reinterpret_cast< Xapian::BM25PlusWeight * >(argp1);
28107   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
28108   if (!SWIG_IsOK(ecode2)) {
28109     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 2, argv[0] ));
28110   }
28111   arg2 = static_cast< Xapian::termcount >(val2);
28112   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
28113   if (!SWIG_IsOK(ecode3)) {
28114     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 3, argv[1] ));
28115   }
28116   arg3 = static_cast< Xapian::termcount >(val3);
28117   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
28118   if (!SWIG_IsOK(ecode4)) {
28119     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 4, argv[2] ));
28120   }
28121   arg4 = static_cast< Xapian::termcount >(val4);
28122   {
28123     try {
28124       result = (double)((Xapian::BM25PlusWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
28125     } catch (...) {
28126       string msg;
28127       int code = XapianExceptionHandler(msg);
28128       SWIG_exception(code, msg.c_str());
28129     }
28130   }
28131   vresult = SWIG_From_double(static_cast< double >(result));
28132   return vresult;
28133 fail:
28134   return Qnil;
28135 }
28136 
28137 
28138 SWIGINTERN VALUE
_wrap_BM25PlusWeight_maxpart(int argc,VALUE * argv,VALUE self)28139 _wrap_BM25PlusWeight_maxpart(int argc, VALUE *argv, VALUE self) {
28140   Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
28141   void *argp1 = 0 ;
28142   int res1 = 0 ;
28143   double result;
28144   VALUE vresult = Qnil;
28145 
28146   if ((argc < 0) || (argc > 0)) {
28147     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
28148   }
28149   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__BM25PlusWeight, 0 |  0 );
28150   if (!SWIG_IsOK(res1)) {
28151     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::BM25PlusWeight const *","get_maxpart", 1, self ));
28152   }
28153   arg1 = reinterpret_cast< Xapian::BM25PlusWeight * >(argp1);
28154   {
28155     try {
28156       result = (double)((Xapian::BM25PlusWeight const *)arg1)->get_maxpart();
28157     } catch (...) {
28158       string msg;
28159       int code = XapianExceptionHandler(msg);
28160       SWIG_exception(code, msg.c_str());
28161     }
28162   }
28163   vresult = SWIG_From_double(static_cast< double >(result));
28164   return vresult;
28165 fail:
28166   return Qnil;
28167 }
28168 
28169 
28170 SWIGINTERN VALUE
_wrap_BM25PlusWeight_sumextra(int argc,VALUE * argv,VALUE self)28171 _wrap_BM25PlusWeight_sumextra(int argc, VALUE *argv, VALUE self) {
28172   Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
28173   Xapian::termcount arg2 ;
28174   Xapian::termcount arg3 ;
28175   void *argp1 = 0 ;
28176   int res1 = 0 ;
28177   unsigned int val2 ;
28178   int ecode2 = 0 ;
28179   unsigned int val3 ;
28180   int ecode3 = 0 ;
28181   double result;
28182   VALUE vresult = Qnil;
28183 
28184   if ((argc < 2) || (argc > 2)) {
28185     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
28186   }
28187   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__BM25PlusWeight, 0 |  0 );
28188   if (!SWIG_IsOK(res1)) {
28189     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::BM25PlusWeight const *","get_sumextra", 1, self ));
28190   }
28191   arg1 = reinterpret_cast< Xapian::BM25PlusWeight * >(argp1);
28192   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
28193   if (!SWIG_IsOK(ecode2)) {
28194     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 2, argv[0] ));
28195   }
28196   arg2 = static_cast< Xapian::termcount >(val2);
28197   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
28198   if (!SWIG_IsOK(ecode3)) {
28199     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 3, argv[1] ));
28200   }
28201   arg3 = static_cast< Xapian::termcount >(val3);
28202   {
28203     try {
28204       result = (double)((Xapian::BM25PlusWeight const *)arg1)->get_sumextra(arg2,arg3);
28205     } catch (...) {
28206       string msg;
28207       int code = XapianExceptionHandler(msg);
28208       SWIG_exception(code, msg.c_str());
28209     }
28210   }
28211   vresult = SWIG_From_double(static_cast< double >(result));
28212   return vresult;
28213 fail:
28214   return Qnil;
28215 }
28216 
28217 
28218 SWIGINTERN VALUE
_wrap_BM25PlusWeight_maxextra(int argc,VALUE * argv,VALUE self)28219 _wrap_BM25PlusWeight_maxextra(int argc, VALUE *argv, VALUE self) {
28220   Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
28221   void *argp1 = 0 ;
28222   int res1 = 0 ;
28223   double result;
28224   VALUE vresult = Qnil;
28225 
28226   if ((argc < 0) || (argc > 0)) {
28227     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
28228   }
28229   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__BM25PlusWeight, 0 |  0 );
28230   if (!SWIG_IsOK(res1)) {
28231     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::BM25PlusWeight const *","get_maxextra", 1, self ));
28232   }
28233   arg1 = reinterpret_cast< Xapian::BM25PlusWeight * >(argp1);
28234   {
28235     try {
28236       result = (double)((Xapian::BM25PlusWeight const *)arg1)->get_maxextra();
28237     } catch (...) {
28238       string msg;
28239       int code = XapianExceptionHandler(msg);
28240       SWIG_exception(code, msg.c_str());
28241     }
28242   }
28243   vresult = SWIG_From_double(static_cast< double >(result));
28244   return vresult;
28245 fail:
28246   return Qnil;
28247 }
28248 
28249 
28250 SWIGINTERN void
free_Xapian_BM25PlusWeight(void * self)28251 free_Xapian_BM25PlusWeight(void *self) {
28252     Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *)self;
28253     delete arg1;
28254 }
28255 
28256 static swig_class SwigClassTradWeight;
28257 
28258 SWIGINTERN VALUE
_wrap_new_TradWeight__SWIG_0(int argc,VALUE * argv,VALUE self)28259 _wrap_new_TradWeight__SWIG_0(int argc, VALUE *argv, VALUE self) {
28260   double arg1 ;
28261   double val1 ;
28262   int ecode1 = 0 ;
28263   const char *classname SWIGUNUSED = "Xapian::TradWeight";
28264   Xapian::TradWeight *result = 0 ;
28265 
28266   if ((argc < 1) || (argc > 1)) {
28267     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
28268   }
28269   ecode1 = SWIG_AsVal_double(argv[0], &val1);
28270   if (!SWIG_IsOK(ecode1)) {
28271     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","TradWeight", 1, argv[0] ));
28272   }
28273   arg1 = static_cast< double >(val1);
28274   {
28275     try {
28276       result = (Xapian::TradWeight *)new Xapian::TradWeight(arg1);
28277       DATA_PTR(self) = result;
28278     } catch (...) {
28279       string msg;
28280       int code = XapianExceptionHandler(msg);
28281       SWIG_exception(code, msg.c_str());
28282     }
28283   }
28284   return self;
28285 fail:
28286   return Qnil;
28287 }
28288 
28289 
28290 SWIGINTERN VALUE
28291 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_TradWeight_allocate(VALUE self)28292 _wrap_TradWeight_allocate(VALUE self)
28293 #else
28294 _wrap_TradWeight_allocate(int argc, VALUE *argv, VALUE self)
28295 #endif
28296 {
28297   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__TradWeight);
28298 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
28299   rb_obj_call_init(vresult, argc, argv);
28300 #endif
28301   return vresult;
28302 }
28303 
28304 
28305 SWIGINTERN VALUE
_wrap_new_TradWeight__SWIG_1(int argc,VALUE * argv,VALUE self)28306 _wrap_new_TradWeight__SWIG_1(int argc, VALUE *argv, VALUE self) {
28307   const char *classname SWIGUNUSED = "Xapian::TradWeight";
28308   Xapian::TradWeight *result = 0 ;
28309 
28310   if ((argc < 0) || (argc > 0)) {
28311     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
28312   }
28313   {
28314     try {
28315       result = (Xapian::TradWeight *)new Xapian::TradWeight();
28316       DATA_PTR(self) = result;
28317     } catch (...) {
28318       string msg;
28319       int code = XapianExceptionHandler(msg);
28320       SWIG_exception(code, msg.c_str());
28321     }
28322   }
28323   return self;
28324 fail:
28325   return Qnil;
28326 }
28327 
28328 
_wrap_new_TradWeight(int nargs,VALUE * args,VALUE self)28329 SWIGINTERN VALUE _wrap_new_TradWeight(int nargs, VALUE *args, VALUE self) {
28330   int argc;
28331   VALUE argv[1];
28332   int ii;
28333 
28334   argc = nargs;
28335   if (argc > 1) SWIG_fail;
28336   for (ii = 0; (ii < argc); ++ii) {
28337     argv[ii] = args[ii];
28338   }
28339   if (argc == 0) {
28340     return _wrap_new_TradWeight__SWIG_1(nargs, args, self);
28341   }
28342   if (argc == 1) {
28343     int _v;
28344     {
28345       int res = SWIG_AsVal_double(argv[0], NULL);
28346       _v = SWIG_CheckState(res);
28347     }
28348     if (_v) {
28349       return _wrap_new_TradWeight__SWIG_0(nargs, args, self);
28350     }
28351   }
28352 
28353 fail:
28354   Ruby_Format_OverloadedError( argc, 1, "TradWeight.new",
28355     "    TradWeight.new(double k)\n"
28356     "    TradWeight.new()\n");
28357 
28358   return Qnil;
28359 }
28360 
28361 
28362 SWIGINTERN VALUE
_wrap_TradWeight_name(int argc,VALUE * argv,VALUE self)28363 _wrap_TradWeight_name(int argc, VALUE *argv, VALUE self) {
28364   Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
28365   void *argp1 = 0 ;
28366   int res1 = 0 ;
28367   std::string result;
28368   VALUE vresult = Qnil;
28369 
28370   if ((argc < 0) || (argc > 0)) {
28371     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
28372   }
28373   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TradWeight, 0 |  0 );
28374   if (!SWIG_IsOK(res1)) {
28375     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TradWeight const *","name", 1, self ));
28376   }
28377   arg1 = reinterpret_cast< Xapian::TradWeight * >(argp1);
28378   {
28379     try {
28380       result = ((Xapian::TradWeight const *)arg1)->name();
28381     } catch (...) {
28382       string msg;
28383       int code = XapianExceptionHandler(msg);
28384       SWIG_exception(code, msg.c_str());
28385     }
28386   }
28387   vresult = SWIG_From_std_string(static_cast< std::string >(result));
28388   return vresult;
28389 fail:
28390   return Qnil;
28391 }
28392 
28393 
28394 SWIGINTERN VALUE
_wrap_TradWeight_sumpart(int argc,VALUE * argv,VALUE self)28395 _wrap_TradWeight_sumpart(int argc, VALUE *argv, VALUE self) {
28396   Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
28397   Xapian::termcount arg2 ;
28398   Xapian::termcount arg3 ;
28399   Xapian::termcount arg4 ;
28400   void *argp1 = 0 ;
28401   int res1 = 0 ;
28402   unsigned int val2 ;
28403   int ecode2 = 0 ;
28404   unsigned int val3 ;
28405   int ecode3 = 0 ;
28406   unsigned int val4 ;
28407   int ecode4 = 0 ;
28408   double result;
28409   VALUE vresult = Qnil;
28410 
28411   if ((argc < 3) || (argc > 3)) {
28412     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
28413   }
28414   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TradWeight, 0 |  0 );
28415   if (!SWIG_IsOK(res1)) {
28416     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TradWeight const *","get_sumpart", 1, self ));
28417   }
28418   arg1 = reinterpret_cast< Xapian::TradWeight * >(argp1);
28419   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
28420   if (!SWIG_IsOK(ecode2)) {
28421     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 2, argv[0] ));
28422   }
28423   arg2 = static_cast< Xapian::termcount >(val2);
28424   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
28425   if (!SWIG_IsOK(ecode3)) {
28426     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 3, argv[1] ));
28427   }
28428   arg3 = static_cast< Xapian::termcount >(val3);
28429   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
28430   if (!SWIG_IsOK(ecode4)) {
28431     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 4, argv[2] ));
28432   }
28433   arg4 = static_cast< Xapian::termcount >(val4);
28434   {
28435     try {
28436       result = (double)((Xapian::TradWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
28437     } catch (...) {
28438       string msg;
28439       int code = XapianExceptionHandler(msg);
28440       SWIG_exception(code, msg.c_str());
28441     }
28442   }
28443   vresult = SWIG_From_double(static_cast< double >(result));
28444   return vresult;
28445 fail:
28446   return Qnil;
28447 }
28448 
28449 
28450 SWIGINTERN VALUE
_wrap_TradWeight_maxpart(int argc,VALUE * argv,VALUE self)28451 _wrap_TradWeight_maxpart(int argc, VALUE *argv, VALUE self) {
28452   Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
28453   void *argp1 = 0 ;
28454   int res1 = 0 ;
28455   double result;
28456   VALUE vresult = Qnil;
28457 
28458   if ((argc < 0) || (argc > 0)) {
28459     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
28460   }
28461   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TradWeight, 0 |  0 );
28462   if (!SWIG_IsOK(res1)) {
28463     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TradWeight const *","get_maxpart", 1, self ));
28464   }
28465   arg1 = reinterpret_cast< Xapian::TradWeight * >(argp1);
28466   {
28467     try {
28468       result = (double)((Xapian::TradWeight const *)arg1)->get_maxpart();
28469     } catch (...) {
28470       string msg;
28471       int code = XapianExceptionHandler(msg);
28472       SWIG_exception(code, msg.c_str());
28473     }
28474   }
28475   vresult = SWIG_From_double(static_cast< double >(result));
28476   return vresult;
28477 fail:
28478   return Qnil;
28479 }
28480 
28481 
28482 SWIGINTERN VALUE
_wrap_TradWeight_sumextra(int argc,VALUE * argv,VALUE self)28483 _wrap_TradWeight_sumextra(int argc, VALUE *argv, VALUE self) {
28484   Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
28485   Xapian::termcount arg2 ;
28486   Xapian::termcount arg3 ;
28487   void *argp1 = 0 ;
28488   int res1 = 0 ;
28489   unsigned int val2 ;
28490   int ecode2 = 0 ;
28491   unsigned int val3 ;
28492   int ecode3 = 0 ;
28493   double result;
28494   VALUE vresult = Qnil;
28495 
28496   if ((argc < 2) || (argc > 2)) {
28497     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
28498   }
28499   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TradWeight, 0 |  0 );
28500   if (!SWIG_IsOK(res1)) {
28501     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TradWeight const *","get_sumextra", 1, self ));
28502   }
28503   arg1 = reinterpret_cast< Xapian::TradWeight * >(argp1);
28504   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
28505   if (!SWIG_IsOK(ecode2)) {
28506     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 2, argv[0] ));
28507   }
28508   arg2 = static_cast< Xapian::termcount >(val2);
28509   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
28510   if (!SWIG_IsOK(ecode3)) {
28511     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 3, argv[1] ));
28512   }
28513   arg3 = static_cast< Xapian::termcount >(val3);
28514   {
28515     try {
28516       result = (double)((Xapian::TradWeight const *)arg1)->get_sumextra(arg2,arg3);
28517     } catch (...) {
28518       string msg;
28519       int code = XapianExceptionHandler(msg);
28520       SWIG_exception(code, msg.c_str());
28521     }
28522   }
28523   vresult = SWIG_From_double(static_cast< double >(result));
28524   return vresult;
28525 fail:
28526   return Qnil;
28527 }
28528 
28529 
28530 SWIGINTERN VALUE
_wrap_TradWeight_maxextra(int argc,VALUE * argv,VALUE self)28531 _wrap_TradWeight_maxextra(int argc, VALUE *argv, VALUE self) {
28532   Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
28533   void *argp1 = 0 ;
28534   int res1 = 0 ;
28535   double result;
28536   VALUE vresult = Qnil;
28537 
28538   if ((argc < 0) || (argc > 0)) {
28539     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
28540   }
28541   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__TradWeight, 0 |  0 );
28542   if (!SWIG_IsOK(res1)) {
28543     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::TradWeight const *","get_maxextra", 1, self ));
28544   }
28545   arg1 = reinterpret_cast< Xapian::TradWeight * >(argp1);
28546   {
28547     try {
28548       result = (double)((Xapian::TradWeight const *)arg1)->get_maxextra();
28549     } catch (...) {
28550       string msg;
28551       int code = XapianExceptionHandler(msg);
28552       SWIG_exception(code, msg.c_str());
28553     }
28554   }
28555   vresult = SWIG_From_double(static_cast< double >(result));
28556   return vresult;
28557 fail:
28558   return Qnil;
28559 }
28560 
28561 
28562 SWIGINTERN void
free_Xapian_TradWeight(void * self)28563 free_Xapian_TradWeight(void *self) {
28564     Xapian::TradWeight *arg1 = (Xapian::TradWeight *)self;
28565     delete arg1;
28566 }
28567 
28568 static swig_class SwigClassInL2Weight;
28569 
28570 SWIGINTERN VALUE
_wrap_new_InL2Weight__SWIG_0(int argc,VALUE * argv,VALUE self)28571 _wrap_new_InL2Weight__SWIG_0(int argc, VALUE *argv, VALUE self) {
28572   double arg1 ;
28573   double val1 ;
28574   int ecode1 = 0 ;
28575   const char *classname SWIGUNUSED = "Xapian::InL2Weight";
28576   Xapian::InL2Weight *result = 0 ;
28577 
28578   if ((argc < 1) || (argc > 1)) {
28579     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
28580   }
28581   ecode1 = SWIG_AsVal_double(argv[0], &val1);
28582   if (!SWIG_IsOK(ecode1)) {
28583     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","InL2Weight", 1, argv[0] ));
28584   }
28585   arg1 = static_cast< double >(val1);
28586   {
28587     try {
28588       result = (Xapian::InL2Weight *)new Xapian::InL2Weight(arg1);
28589       DATA_PTR(self) = result;
28590     } catch (...) {
28591       string msg;
28592       int code = XapianExceptionHandler(msg);
28593       SWIG_exception(code, msg.c_str());
28594     }
28595   }
28596   return self;
28597 fail:
28598   return Qnil;
28599 }
28600 
28601 
28602 SWIGINTERN VALUE
28603 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_InL2Weight_allocate(VALUE self)28604 _wrap_InL2Weight_allocate(VALUE self)
28605 #else
28606 _wrap_InL2Weight_allocate(int argc, VALUE *argv, VALUE self)
28607 #endif
28608 {
28609   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__InL2Weight);
28610 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
28611   rb_obj_call_init(vresult, argc, argv);
28612 #endif
28613   return vresult;
28614 }
28615 
28616 
28617 SWIGINTERN VALUE
_wrap_new_InL2Weight__SWIG_1(int argc,VALUE * argv,VALUE self)28618 _wrap_new_InL2Weight__SWIG_1(int argc, VALUE *argv, VALUE self) {
28619   const char *classname SWIGUNUSED = "Xapian::InL2Weight";
28620   Xapian::InL2Weight *result = 0 ;
28621 
28622   if ((argc < 0) || (argc > 0)) {
28623     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
28624   }
28625   {
28626     try {
28627       result = (Xapian::InL2Weight *)new Xapian::InL2Weight();
28628       DATA_PTR(self) = result;
28629     } catch (...) {
28630       string msg;
28631       int code = XapianExceptionHandler(msg);
28632       SWIG_exception(code, msg.c_str());
28633     }
28634   }
28635   return self;
28636 fail:
28637   return Qnil;
28638 }
28639 
28640 
_wrap_new_InL2Weight(int nargs,VALUE * args,VALUE self)28641 SWIGINTERN VALUE _wrap_new_InL2Weight(int nargs, VALUE *args, VALUE self) {
28642   int argc;
28643   VALUE argv[1];
28644   int ii;
28645 
28646   argc = nargs;
28647   if (argc > 1) SWIG_fail;
28648   for (ii = 0; (ii < argc); ++ii) {
28649     argv[ii] = args[ii];
28650   }
28651   if (argc == 0) {
28652     return _wrap_new_InL2Weight__SWIG_1(nargs, args, self);
28653   }
28654   if (argc == 1) {
28655     int _v;
28656     {
28657       int res = SWIG_AsVal_double(argv[0], NULL);
28658       _v = SWIG_CheckState(res);
28659     }
28660     if (_v) {
28661       return _wrap_new_InL2Weight__SWIG_0(nargs, args, self);
28662     }
28663   }
28664 
28665 fail:
28666   Ruby_Format_OverloadedError( argc, 1, "InL2Weight.new",
28667     "    InL2Weight.new(double c)\n"
28668     "    InL2Weight.new()\n");
28669 
28670   return Qnil;
28671 }
28672 
28673 
28674 SWIGINTERN VALUE
_wrap_InL2Weight_name(int argc,VALUE * argv,VALUE self)28675 _wrap_InL2Weight_name(int argc, VALUE *argv, VALUE self) {
28676   Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
28677   void *argp1 = 0 ;
28678   int res1 = 0 ;
28679   std::string result;
28680   VALUE vresult = Qnil;
28681 
28682   if ((argc < 0) || (argc > 0)) {
28683     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
28684   }
28685   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__InL2Weight, 0 |  0 );
28686   if (!SWIG_IsOK(res1)) {
28687     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::InL2Weight const *","name", 1, self ));
28688   }
28689   arg1 = reinterpret_cast< Xapian::InL2Weight * >(argp1);
28690   {
28691     try {
28692       result = ((Xapian::InL2Weight const *)arg1)->name();
28693     } catch (...) {
28694       string msg;
28695       int code = XapianExceptionHandler(msg);
28696       SWIG_exception(code, msg.c_str());
28697     }
28698   }
28699   vresult = SWIG_From_std_string(static_cast< std::string >(result));
28700   return vresult;
28701 fail:
28702   return Qnil;
28703 }
28704 
28705 
28706 SWIGINTERN VALUE
_wrap_InL2Weight_sumpart(int argc,VALUE * argv,VALUE self)28707 _wrap_InL2Weight_sumpart(int argc, VALUE *argv, VALUE self) {
28708   Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
28709   Xapian::termcount arg2 ;
28710   Xapian::termcount arg3 ;
28711   Xapian::termcount arg4 ;
28712   void *argp1 = 0 ;
28713   int res1 = 0 ;
28714   unsigned int val2 ;
28715   int ecode2 = 0 ;
28716   unsigned int val3 ;
28717   int ecode3 = 0 ;
28718   unsigned int val4 ;
28719   int ecode4 = 0 ;
28720   double result;
28721   VALUE vresult = Qnil;
28722 
28723   if ((argc < 3) || (argc > 3)) {
28724     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
28725   }
28726   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__InL2Weight, 0 |  0 );
28727   if (!SWIG_IsOK(res1)) {
28728     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::InL2Weight const *","get_sumpart", 1, self ));
28729   }
28730   arg1 = reinterpret_cast< Xapian::InL2Weight * >(argp1);
28731   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
28732   if (!SWIG_IsOK(ecode2)) {
28733     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 2, argv[0] ));
28734   }
28735   arg2 = static_cast< Xapian::termcount >(val2);
28736   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
28737   if (!SWIG_IsOK(ecode3)) {
28738     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 3, argv[1] ));
28739   }
28740   arg3 = static_cast< Xapian::termcount >(val3);
28741   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
28742   if (!SWIG_IsOK(ecode4)) {
28743     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 4, argv[2] ));
28744   }
28745   arg4 = static_cast< Xapian::termcount >(val4);
28746   {
28747     try {
28748       result = (double)((Xapian::InL2Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
28749     } catch (...) {
28750       string msg;
28751       int code = XapianExceptionHandler(msg);
28752       SWIG_exception(code, msg.c_str());
28753     }
28754   }
28755   vresult = SWIG_From_double(static_cast< double >(result));
28756   return vresult;
28757 fail:
28758   return Qnil;
28759 }
28760 
28761 
28762 SWIGINTERN VALUE
_wrap_InL2Weight_maxpart(int argc,VALUE * argv,VALUE self)28763 _wrap_InL2Weight_maxpart(int argc, VALUE *argv, VALUE self) {
28764   Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
28765   void *argp1 = 0 ;
28766   int res1 = 0 ;
28767   double result;
28768   VALUE vresult = Qnil;
28769 
28770   if ((argc < 0) || (argc > 0)) {
28771     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
28772   }
28773   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__InL2Weight, 0 |  0 );
28774   if (!SWIG_IsOK(res1)) {
28775     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::InL2Weight const *","get_maxpart", 1, self ));
28776   }
28777   arg1 = reinterpret_cast< Xapian::InL2Weight * >(argp1);
28778   {
28779     try {
28780       result = (double)((Xapian::InL2Weight const *)arg1)->get_maxpart();
28781     } catch (...) {
28782       string msg;
28783       int code = XapianExceptionHandler(msg);
28784       SWIG_exception(code, msg.c_str());
28785     }
28786   }
28787   vresult = SWIG_From_double(static_cast< double >(result));
28788   return vresult;
28789 fail:
28790   return Qnil;
28791 }
28792 
28793 
28794 SWIGINTERN VALUE
_wrap_InL2Weight_sumextra(int argc,VALUE * argv,VALUE self)28795 _wrap_InL2Weight_sumextra(int argc, VALUE *argv, VALUE self) {
28796   Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
28797   Xapian::termcount arg2 ;
28798   Xapian::termcount arg3 ;
28799   void *argp1 = 0 ;
28800   int res1 = 0 ;
28801   unsigned int val2 ;
28802   int ecode2 = 0 ;
28803   unsigned int val3 ;
28804   int ecode3 = 0 ;
28805   double result;
28806   VALUE vresult = Qnil;
28807 
28808   if ((argc < 2) || (argc > 2)) {
28809     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
28810   }
28811   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__InL2Weight, 0 |  0 );
28812   if (!SWIG_IsOK(res1)) {
28813     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::InL2Weight const *","get_sumextra", 1, self ));
28814   }
28815   arg1 = reinterpret_cast< Xapian::InL2Weight * >(argp1);
28816   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
28817   if (!SWIG_IsOK(ecode2)) {
28818     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 2, argv[0] ));
28819   }
28820   arg2 = static_cast< Xapian::termcount >(val2);
28821   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
28822   if (!SWIG_IsOK(ecode3)) {
28823     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 3, argv[1] ));
28824   }
28825   arg3 = static_cast< Xapian::termcount >(val3);
28826   {
28827     try {
28828       result = (double)((Xapian::InL2Weight const *)arg1)->get_sumextra(arg2,arg3);
28829     } catch (...) {
28830       string msg;
28831       int code = XapianExceptionHandler(msg);
28832       SWIG_exception(code, msg.c_str());
28833     }
28834   }
28835   vresult = SWIG_From_double(static_cast< double >(result));
28836   return vresult;
28837 fail:
28838   return Qnil;
28839 }
28840 
28841 
28842 SWIGINTERN VALUE
_wrap_InL2Weight_maxextra(int argc,VALUE * argv,VALUE self)28843 _wrap_InL2Weight_maxextra(int argc, VALUE *argv, VALUE self) {
28844   Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
28845   void *argp1 = 0 ;
28846   int res1 = 0 ;
28847   double result;
28848   VALUE vresult = Qnil;
28849 
28850   if ((argc < 0) || (argc > 0)) {
28851     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
28852   }
28853   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__InL2Weight, 0 |  0 );
28854   if (!SWIG_IsOK(res1)) {
28855     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::InL2Weight const *","get_maxextra", 1, self ));
28856   }
28857   arg1 = reinterpret_cast< Xapian::InL2Weight * >(argp1);
28858   {
28859     try {
28860       result = (double)((Xapian::InL2Weight const *)arg1)->get_maxextra();
28861     } catch (...) {
28862       string msg;
28863       int code = XapianExceptionHandler(msg);
28864       SWIG_exception(code, msg.c_str());
28865     }
28866   }
28867   vresult = SWIG_From_double(static_cast< double >(result));
28868   return vresult;
28869 fail:
28870   return Qnil;
28871 }
28872 
28873 
28874 SWIGINTERN void
free_Xapian_InL2Weight(void * self)28875 free_Xapian_InL2Weight(void *self) {
28876     Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *)self;
28877     delete arg1;
28878 }
28879 
28880 static swig_class SwigClassIfB2Weight;
28881 
28882 SWIGINTERN VALUE
_wrap_new_IfB2Weight__SWIG_0(int argc,VALUE * argv,VALUE self)28883 _wrap_new_IfB2Weight__SWIG_0(int argc, VALUE *argv, VALUE self) {
28884   double arg1 ;
28885   double val1 ;
28886   int ecode1 = 0 ;
28887   const char *classname SWIGUNUSED = "Xapian::IfB2Weight";
28888   Xapian::IfB2Weight *result = 0 ;
28889 
28890   if ((argc < 1) || (argc > 1)) {
28891     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
28892   }
28893   ecode1 = SWIG_AsVal_double(argv[0], &val1);
28894   if (!SWIG_IsOK(ecode1)) {
28895     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","IfB2Weight", 1, argv[0] ));
28896   }
28897   arg1 = static_cast< double >(val1);
28898   {
28899     try {
28900       result = (Xapian::IfB2Weight *)new Xapian::IfB2Weight(arg1);
28901       DATA_PTR(self) = result;
28902     } catch (...) {
28903       string msg;
28904       int code = XapianExceptionHandler(msg);
28905       SWIG_exception(code, msg.c_str());
28906     }
28907   }
28908   return self;
28909 fail:
28910   return Qnil;
28911 }
28912 
28913 
28914 SWIGINTERN VALUE
28915 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_IfB2Weight_allocate(VALUE self)28916 _wrap_IfB2Weight_allocate(VALUE self)
28917 #else
28918 _wrap_IfB2Weight_allocate(int argc, VALUE *argv, VALUE self)
28919 #endif
28920 {
28921   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__IfB2Weight);
28922 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
28923   rb_obj_call_init(vresult, argc, argv);
28924 #endif
28925   return vresult;
28926 }
28927 
28928 
28929 SWIGINTERN VALUE
_wrap_new_IfB2Weight__SWIG_1(int argc,VALUE * argv,VALUE self)28930 _wrap_new_IfB2Weight__SWIG_1(int argc, VALUE *argv, VALUE self) {
28931   const char *classname SWIGUNUSED = "Xapian::IfB2Weight";
28932   Xapian::IfB2Weight *result = 0 ;
28933 
28934   if ((argc < 0) || (argc > 0)) {
28935     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
28936   }
28937   {
28938     try {
28939       result = (Xapian::IfB2Weight *)new Xapian::IfB2Weight();
28940       DATA_PTR(self) = result;
28941     } catch (...) {
28942       string msg;
28943       int code = XapianExceptionHandler(msg);
28944       SWIG_exception(code, msg.c_str());
28945     }
28946   }
28947   return self;
28948 fail:
28949   return Qnil;
28950 }
28951 
28952 
_wrap_new_IfB2Weight(int nargs,VALUE * args,VALUE self)28953 SWIGINTERN VALUE _wrap_new_IfB2Weight(int nargs, VALUE *args, VALUE self) {
28954   int argc;
28955   VALUE argv[1];
28956   int ii;
28957 
28958   argc = nargs;
28959   if (argc > 1) SWIG_fail;
28960   for (ii = 0; (ii < argc); ++ii) {
28961     argv[ii] = args[ii];
28962   }
28963   if (argc == 0) {
28964     return _wrap_new_IfB2Weight__SWIG_1(nargs, args, self);
28965   }
28966   if (argc == 1) {
28967     int _v;
28968     {
28969       int res = SWIG_AsVal_double(argv[0], NULL);
28970       _v = SWIG_CheckState(res);
28971     }
28972     if (_v) {
28973       return _wrap_new_IfB2Weight__SWIG_0(nargs, args, self);
28974     }
28975   }
28976 
28977 fail:
28978   Ruby_Format_OverloadedError( argc, 1, "IfB2Weight.new",
28979     "    IfB2Weight.new(double c)\n"
28980     "    IfB2Weight.new()\n");
28981 
28982   return Qnil;
28983 }
28984 
28985 
28986 SWIGINTERN VALUE
_wrap_IfB2Weight_name(int argc,VALUE * argv,VALUE self)28987 _wrap_IfB2Weight_name(int argc, VALUE *argv, VALUE self) {
28988   Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
28989   void *argp1 = 0 ;
28990   int res1 = 0 ;
28991   std::string result;
28992   VALUE vresult = Qnil;
28993 
28994   if ((argc < 0) || (argc > 0)) {
28995     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
28996   }
28997   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__IfB2Weight, 0 |  0 );
28998   if (!SWIG_IsOK(res1)) {
28999     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::IfB2Weight const *","name", 1, self ));
29000   }
29001   arg1 = reinterpret_cast< Xapian::IfB2Weight * >(argp1);
29002   {
29003     try {
29004       result = ((Xapian::IfB2Weight const *)arg1)->name();
29005     } catch (...) {
29006       string msg;
29007       int code = XapianExceptionHandler(msg);
29008       SWIG_exception(code, msg.c_str());
29009     }
29010   }
29011   vresult = SWIG_From_std_string(static_cast< std::string >(result));
29012   return vresult;
29013 fail:
29014   return Qnil;
29015 }
29016 
29017 
29018 SWIGINTERN VALUE
_wrap_IfB2Weight_sumpart(int argc,VALUE * argv,VALUE self)29019 _wrap_IfB2Weight_sumpart(int argc, VALUE *argv, VALUE self) {
29020   Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
29021   Xapian::termcount arg2 ;
29022   Xapian::termcount arg3 ;
29023   Xapian::termcount arg4 ;
29024   void *argp1 = 0 ;
29025   int res1 = 0 ;
29026   unsigned int val2 ;
29027   int ecode2 = 0 ;
29028   unsigned int val3 ;
29029   int ecode3 = 0 ;
29030   unsigned int val4 ;
29031   int ecode4 = 0 ;
29032   double result;
29033   VALUE vresult = Qnil;
29034 
29035   if ((argc < 3) || (argc > 3)) {
29036     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
29037   }
29038   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__IfB2Weight, 0 |  0 );
29039   if (!SWIG_IsOK(res1)) {
29040     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::IfB2Weight const *","get_sumpart", 1, self ));
29041   }
29042   arg1 = reinterpret_cast< Xapian::IfB2Weight * >(argp1);
29043   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
29044   if (!SWIG_IsOK(ecode2)) {
29045     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 2, argv[0] ));
29046   }
29047   arg2 = static_cast< Xapian::termcount >(val2);
29048   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
29049   if (!SWIG_IsOK(ecode3)) {
29050     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 3, argv[1] ));
29051   }
29052   arg3 = static_cast< Xapian::termcount >(val3);
29053   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
29054   if (!SWIG_IsOK(ecode4)) {
29055     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 4, argv[2] ));
29056   }
29057   arg4 = static_cast< Xapian::termcount >(val4);
29058   {
29059     try {
29060       result = (double)((Xapian::IfB2Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
29061     } catch (...) {
29062       string msg;
29063       int code = XapianExceptionHandler(msg);
29064       SWIG_exception(code, msg.c_str());
29065     }
29066   }
29067   vresult = SWIG_From_double(static_cast< double >(result));
29068   return vresult;
29069 fail:
29070   return Qnil;
29071 }
29072 
29073 
29074 SWIGINTERN VALUE
_wrap_IfB2Weight_maxpart(int argc,VALUE * argv,VALUE self)29075 _wrap_IfB2Weight_maxpart(int argc, VALUE *argv, VALUE self) {
29076   Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
29077   void *argp1 = 0 ;
29078   int res1 = 0 ;
29079   double result;
29080   VALUE vresult = Qnil;
29081 
29082   if ((argc < 0) || (argc > 0)) {
29083     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
29084   }
29085   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__IfB2Weight, 0 |  0 );
29086   if (!SWIG_IsOK(res1)) {
29087     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::IfB2Weight const *","get_maxpart", 1, self ));
29088   }
29089   arg1 = reinterpret_cast< Xapian::IfB2Weight * >(argp1);
29090   {
29091     try {
29092       result = (double)((Xapian::IfB2Weight const *)arg1)->get_maxpart();
29093     } catch (...) {
29094       string msg;
29095       int code = XapianExceptionHandler(msg);
29096       SWIG_exception(code, msg.c_str());
29097     }
29098   }
29099   vresult = SWIG_From_double(static_cast< double >(result));
29100   return vresult;
29101 fail:
29102   return Qnil;
29103 }
29104 
29105 
29106 SWIGINTERN VALUE
_wrap_IfB2Weight_sumextra(int argc,VALUE * argv,VALUE self)29107 _wrap_IfB2Weight_sumextra(int argc, VALUE *argv, VALUE self) {
29108   Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
29109   Xapian::termcount arg2 ;
29110   Xapian::termcount arg3 ;
29111   void *argp1 = 0 ;
29112   int res1 = 0 ;
29113   unsigned int val2 ;
29114   int ecode2 = 0 ;
29115   unsigned int val3 ;
29116   int ecode3 = 0 ;
29117   double result;
29118   VALUE vresult = Qnil;
29119 
29120   if ((argc < 2) || (argc > 2)) {
29121     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
29122   }
29123   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__IfB2Weight, 0 |  0 );
29124   if (!SWIG_IsOK(res1)) {
29125     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::IfB2Weight const *","get_sumextra", 1, self ));
29126   }
29127   arg1 = reinterpret_cast< Xapian::IfB2Weight * >(argp1);
29128   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
29129   if (!SWIG_IsOK(ecode2)) {
29130     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 2, argv[0] ));
29131   }
29132   arg2 = static_cast< Xapian::termcount >(val2);
29133   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
29134   if (!SWIG_IsOK(ecode3)) {
29135     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 3, argv[1] ));
29136   }
29137   arg3 = static_cast< Xapian::termcount >(val3);
29138   {
29139     try {
29140       result = (double)((Xapian::IfB2Weight const *)arg1)->get_sumextra(arg2,arg3);
29141     } catch (...) {
29142       string msg;
29143       int code = XapianExceptionHandler(msg);
29144       SWIG_exception(code, msg.c_str());
29145     }
29146   }
29147   vresult = SWIG_From_double(static_cast< double >(result));
29148   return vresult;
29149 fail:
29150   return Qnil;
29151 }
29152 
29153 
29154 SWIGINTERN VALUE
_wrap_IfB2Weight_maxextra(int argc,VALUE * argv,VALUE self)29155 _wrap_IfB2Weight_maxextra(int argc, VALUE *argv, VALUE self) {
29156   Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
29157   void *argp1 = 0 ;
29158   int res1 = 0 ;
29159   double result;
29160   VALUE vresult = Qnil;
29161 
29162   if ((argc < 0) || (argc > 0)) {
29163     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
29164   }
29165   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__IfB2Weight, 0 |  0 );
29166   if (!SWIG_IsOK(res1)) {
29167     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::IfB2Weight const *","get_maxextra", 1, self ));
29168   }
29169   arg1 = reinterpret_cast< Xapian::IfB2Weight * >(argp1);
29170   {
29171     try {
29172       result = (double)((Xapian::IfB2Weight const *)arg1)->get_maxextra();
29173     } catch (...) {
29174       string msg;
29175       int code = XapianExceptionHandler(msg);
29176       SWIG_exception(code, msg.c_str());
29177     }
29178   }
29179   vresult = SWIG_From_double(static_cast< double >(result));
29180   return vresult;
29181 fail:
29182   return Qnil;
29183 }
29184 
29185 
29186 SWIGINTERN void
free_Xapian_IfB2Weight(void * self)29187 free_Xapian_IfB2Weight(void *self) {
29188     Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *)self;
29189     delete arg1;
29190 }
29191 
29192 static swig_class SwigClassIneB2Weight;
29193 
29194 SWIGINTERN VALUE
_wrap_new_IneB2Weight__SWIG_0(int argc,VALUE * argv,VALUE self)29195 _wrap_new_IneB2Weight__SWIG_0(int argc, VALUE *argv, VALUE self) {
29196   double arg1 ;
29197   double val1 ;
29198   int ecode1 = 0 ;
29199   const char *classname SWIGUNUSED = "Xapian::IneB2Weight";
29200   Xapian::IneB2Weight *result = 0 ;
29201 
29202   if ((argc < 1) || (argc > 1)) {
29203     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
29204   }
29205   ecode1 = SWIG_AsVal_double(argv[0], &val1);
29206   if (!SWIG_IsOK(ecode1)) {
29207     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","IneB2Weight", 1, argv[0] ));
29208   }
29209   arg1 = static_cast< double >(val1);
29210   {
29211     try {
29212       result = (Xapian::IneB2Weight *)new Xapian::IneB2Weight(arg1);
29213       DATA_PTR(self) = result;
29214     } catch (...) {
29215       string msg;
29216       int code = XapianExceptionHandler(msg);
29217       SWIG_exception(code, msg.c_str());
29218     }
29219   }
29220   return self;
29221 fail:
29222   return Qnil;
29223 }
29224 
29225 
29226 SWIGINTERN VALUE
29227 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_IneB2Weight_allocate(VALUE self)29228 _wrap_IneB2Weight_allocate(VALUE self)
29229 #else
29230 _wrap_IneB2Weight_allocate(int argc, VALUE *argv, VALUE self)
29231 #endif
29232 {
29233   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__IneB2Weight);
29234 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
29235   rb_obj_call_init(vresult, argc, argv);
29236 #endif
29237   return vresult;
29238 }
29239 
29240 
29241 SWIGINTERN VALUE
_wrap_new_IneB2Weight__SWIG_1(int argc,VALUE * argv,VALUE self)29242 _wrap_new_IneB2Weight__SWIG_1(int argc, VALUE *argv, VALUE self) {
29243   const char *classname SWIGUNUSED = "Xapian::IneB2Weight";
29244   Xapian::IneB2Weight *result = 0 ;
29245 
29246   if ((argc < 0) || (argc > 0)) {
29247     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
29248   }
29249   {
29250     try {
29251       result = (Xapian::IneB2Weight *)new Xapian::IneB2Weight();
29252       DATA_PTR(self) = result;
29253     } catch (...) {
29254       string msg;
29255       int code = XapianExceptionHandler(msg);
29256       SWIG_exception(code, msg.c_str());
29257     }
29258   }
29259   return self;
29260 fail:
29261   return Qnil;
29262 }
29263 
29264 
_wrap_new_IneB2Weight(int nargs,VALUE * args,VALUE self)29265 SWIGINTERN VALUE _wrap_new_IneB2Weight(int nargs, VALUE *args, VALUE self) {
29266   int argc;
29267   VALUE argv[1];
29268   int ii;
29269 
29270   argc = nargs;
29271   if (argc > 1) SWIG_fail;
29272   for (ii = 0; (ii < argc); ++ii) {
29273     argv[ii] = args[ii];
29274   }
29275   if (argc == 0) {
29276     return _wrap_new_IneB2Weight__SWIG_1(nargs, args, self);
29277   }
29278   if (argc == 1) {
29279     int _v;
29280     {
29281       int res = SWIG_AsVal_double(argv[0], NULL);
29282       _v = SWIG_CheckState(res);
29283     }
29284     if (_v) {
29285       return _wrap_new_IneB2Weight__SWIG_0(nargs, args, self);
29286     }
29287   }
29288 
29289 fail:
29290   Ruby_Format_OverloadedError( argc, 1, "IneB2Weight.new",
29291     "    IneB2Weight.new(double c)\n"
29292     "    IneB2Weight.new()\n");
29293 
29294   return Qnil;
29295 }
29296 
29297 
29298 SWIGINTERN VALUE
_wrap_IneB2Weight_name(int argc,VALUE * argv,VALUE self)29299 _wrap_IneB2Weight_name(int argc, VALUE *argv, VALUE self) {
29300   Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
29301   void *argp1 = 0 ;
29302   int res1 = 0 ;
29303   std::string result;
29304   VALUE vresult = Qnil;
29305 
29306   if ((argc < 0) || (argc > 0)) {
29307     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
29308   }
29309   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__IneB2Weight, 0 |  0 );
29310   if (!SWIG_IsOK(res1)) {
29311     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::IneB2Weight const *","name", 1, self ));
29312   }
29313   arg1 = reinterpret_cast< Xapian::IneB2Weight * >(argp1);
29314   {
29315     try {
29316       result = ((Xapian::IneB2Weight const *)arg1)->name();
29317     } catch (...) {
29318       string msg;
29319       int code = XapianExceptionHandler(msg);
29320       SWIG_exception(code, msg.c_str());
29321     }
29322   }
29323   vresult = SWIG_From_std_string(static_cast< std::string >(result));
29324   return vresult;
29325 fail:
29326   return Qnil;
29327 }
29328 
29329 
29330 SWIGINTERN VALUE
_wrap_IneB2Weight_sumpart(int argc,VALUE * argv,VALUE self)29331 _wrap_IneB2Weight_sumpart(int argc, VALUE *argv, VALUE self) {
29332   Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
29333   Xapian::termcount arg2 ;
29334   Xapian::termcount arg3 ;
29335   Xapian::termcount arg4 ;
29336   void *argp1 = 0 ;
29337   int res1 = 0 ;
29338   unsigned int val2 ;
29339   int ecode2 = 0 ;
29340   unsigned int val3 ;
29341   int ecode3 = 0 ;
29342   unsigned int val4 ;
29343   int ecode4 = 0 ;
29344   double result;
29345   VALUE vresult = Qnil;
29346 
29347   if ((argc < 3) || (argc > 3)) {
29348     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
29349   }
29350   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__IneB2Weight, 0 |  0 );
29351   if (!SWIG_IsOK(res1)) {
29352     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::IneB2Weight const *","get_sumpart", 1, self ));
29353   }
29354   arg1 = reinterpret_cast< Xapian::IneB2Weight * >(argp1);
29355   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
29356   if (!SWIG_IsOK(ecode2)) {
29357     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 2, argv[0] ));
29358   }
29359   arg2 = static_cast< Xapian::termcount >(val2);
29360   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
29361   if (!SWIG_IsOK(ecode3)) {
29362     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 3, argv[1] ));
29363   }
29364   arg3 = static_cast< Xapian::termcount >(val3);
29365   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
29366   if (!SWIG_IsOK(ecode4)) {
29367     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 4, argv[2] ));
29368   }
29369   arg4 = static_cast< Xapian::termcount >(val4);
29370   {
29371     try {
29372       result = (double)((Xapian::IneB2Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
29373     } catch (...) {
29374       string msg;
29375       int code = XapianExceptionHandler(msg);
29376       SWIG_exception(code, msg.c_str());
29377     }
29378   }
29379   vresult = SWIG_From_double(static_cast< double >(result));
29380   return vresult;
29381 fail:
29382   return Qnil;
29383 }
29384 
29385 
29386 SWIGINTERN VALUE
_wrap_IneB2Weight_maxpart(int argc,VALUE * argv,VALUE self)29387 _wrap_IneB2Weight_maxpart(int argc, VALUE *argv, VALUE self) {
29388   Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
29389   void *argp1 = 0 ;
29390   int res1 = 0 ;
29391   double result;
29392   VALUE vresult = Qnil;
29393 
29394   if ((argc < 0) || (argc > 0)) {
29395     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
29396   }
29397   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__IneB2Weight, 0 |  0 );
29398   if (!SWIG_IsOK(res1)) {
29399     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::IneB2Weight const *","get_maxpart", 1, self ));
29400   }
29401   arg1 = reinterpret_cast< Xapian::IneB2Weight * >(argp1);
29402   {
29403     try {
29404       result = (double)((Xapian::IneB2Weight const *)arg1)->get_maxpart();
29405     } catch (...) {
29406       string msg;
29407       int code = XapianExceptionHandler(msg);
29408       SWIG_exception(code, msg.c_str());
29409     }
29410   }
29411   vresult = SWIG_From_double(static_cast< double >(result));
29412   return vresult;
29413 fail:
29414   return Qnil;
29415 }
29416 
29417 
29418 SWIGINTERN VALUE
_wrap_IneB2Weight_sumextra(int argc,VALUE * argv,VALUE self)29419 _wrap_IneB2Weight_sumextra(int argc, VALUE *argv, VALUE self) {
29420   Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
29421   Xapian::termcount arg2 ;
29422   Xapian::termcount arg3 ;
29423   void *argp1 = 0 ;
29424   int res1 = 0 ;
29425   unsigned int val2 ;
29426   int ecode2 = 0 ;
29427   unsigned int val3 ;
29428   int ecode3 = 0 ;
29429   double result;
29430   VALUE vresult = Qnil;
29431 
29432   if ((argc < 2) || (argc > 2)) {
29433     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
29434   }
29435   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__IneB2Weight, 0 |  0 );
29436   if (!SWIG_IsOK(res1)) {
29437     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::IneB2Weight const *","get_sumextra", 1, self ));
29438   }
29439   arg1 = reinterpret_cast< Xapian::IneB2Weight * >(argp1);
29440   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
29441   if (!SWIG_IsOK(ecode2)) {
29442     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 2, argv[0] ));
29443   }
29444   arg2 = static_cast< Xapian::termcount >(val2);
29445   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
29446   if (!SWIG_IsOK(ecode3)) {
29447     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 3, argv[1] ));
29448   }
29449   arg3 = static_cast< Xapian::termcount >(val3);
29450   {
29451     try {
29452       result = (double)((Xapian::IneB2Weight const *)arg1)->get_sumextra(arg2,arg3);
29453     } catch (...) {
29454       string msg;
29455       int code = XapianExceptionHandler(msg);
29456       SWIG_exception(code, msg.c_str());
29457     }
29458   }
29459   vresult = SWIG_From_double(static_cast< double >(result));
29460   return vresult;
29461 fail:
29462   return Qnil;
29463 }
29464 
29465 
29466 SWIGINTERN VALUE
_wrap_IneB2Weight_maxextra(int argc,VALUE * argv,VALUE self)29467 _wrap_IneB2Weight_maxextra(int argc, VALUE *argv, VALUE self) {
29468   Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
29469   void *argp1 = 0 ;
29470   int res1 = 0 ;
29471   double result;
29472   VALUE vresult = Qnil;
29473 
29474   if ((argc < 0) || (argc > 0)) {
29475     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
29476   }
29477   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__IneB2Weight, 0 |  0 );
29478   if (!SWIG_IsOK(res1)) {
29479     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::IneB2Weight const *","get_maxextra", 1, self ));
29480   }
29481   arg1 = reinterpret_cast< Xapian::IneB2Weight * >(argp1);
29482   {
29483     try {
29484       result = (double)((Xapian::IneB2Weight const *)arg1)->get_maxextra();
29485     } catch (...) {
29486       string msg;
29487       int code = XapianExceptionHandler(msg);
29488       SWIG_exception(code, msg.c_str());
29489     }
29490   }
29491   vresult = SWIG_From_double(static_cast< double >(result));
29492   return vresult;
29493 fail:
29494   return Qnil;
29495 }
29496 
29497 
29498 SWIGINTERN void
free_Xapian_IneB2Weight(void * self)29499 free_Xapian_IneB2Weight(void *self) {
29500     Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *)self;
29501     delete arg1;
29502 }
29503 
29504 static swig_class SwigClassBB2Weight;
29505 
29506 SWIGINTERN VALUE
_wrap_new_BB2Weight__SWIG_0(int argc,VALUE * argv,VALUE self)29507 _wrap_new_BB2Weight__SWIG_0(int argc, VALUE *argv, VALUE self) {
29508   double arg1 ;
29509   double val1 ;
29510   int ecode1 = 0 ;
29511   const char *classname SWIGUNUSED = "Xapian::BB2Weight";
29512   Xapian::BB2Weight *result = 0 ;
29513 
29514   if ((argc < 1) || (argc > 1)) {
29515     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
29516   }
29517   ecode1 = SWIG_AsVal_double(argv[0], &val1);
29518   if (!SWIG_IsOK(ecode1)) {
29519     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","BB2Weight", 1, argv[0] ));
29520   }
29521   arg1 = static_cast< double >(val1);
29522   {
29523     try {
29524       result = (Xapian::BB2Weight *)new Xapian::BB2Weight(arg1);
29525       DATA_PTR(self) = result;
29526     } catch (...) {
29527       string msg;
29528       int code = XapianExceptionHandler(msg);
29529       SWIG_exception(code, msg.c_str());
29530     }
29531   }
29532   return self;
29533 fail:
29534   return Qnil;
29535 }
29536 
29537 
29538 SWIGINTERN VALUE
29539 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_BB2Weight_allocate(VALUE self)29540 _wrap_BB2Weight_allocate(VALUE self)
29541 #else
29542 _wrap_BB2Weight_allocate(int argc, VALUE *argv, VALUE self)
29543 #endif
29544 {
29545   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__BB2Weight);
29546 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
29547   rb_obj_call_init(vresult, argc, argv);
29548 #endif
29549   return vresult;
29550 }
29551 
29552 
29553 SWIGINTERN VALUE
_wrap_new_BB2Weight__SWIG_1(int argc,VALUE * argv,VALUE self)29554 _wrap_new_BB2Weight__SWIG_1(int argc, VALUE *argv, VALUE self) {
29555   const char *classname SWIGUNUSED = "Xapian::BB2Weight";
29556   Xapian::BB2Weight *result = 0 ;
29557 
29558   if ((argc < 0) || (argc > 0)) {
29559     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
29560   }
29561   {
29562     try {
29563       result = (Xapian::BB2Weight *)new Xapian::BB2Weight();
29564       DATA_PTR(self) = result;
29565     } catch (...) {
29566       string msg;
29567       int code = XapianExceptionHandler(msg);
29568       SWIG_exception(code, msg.c_str());
29569     }
29570   }
29571   return self;
29572 fail:
29573   return Qnil;
29574 }
29575 
29576 
_wrap_new_BB2Weight(int nargs,VALUE * args,VALUE self)29577 SWIGINTERN VALUE _wrap_new_BB2Weight(int nargs, VALUE *args, VALUE self) {
29578   int argc;
29579   VALUE argv[1];
29580   int ii;
29581 
29582   argc = nargs;
29583   if (argc > 1) SWIG_fail;
29584   for (ii = 0; (ii < argc); ++ii) {
29585     argv[ii] = args[ii];
29586   }
29587   if (argc == 0) {
29588     return _wrap_new_BB2Weight__SWIG_1(nargs, args, self);
29589   }
29590   if (argc == 1) {
29591     int _v;
29592     {
29593       int res = SWIG_AsVal_double(argv[0], NULL);
29594       _v = SWIG_CheckState(res);
29595     }
29596     if (_v) {
29597       return _wrap_new_BB2Weight__SWIG_0(nargs, args, self);
29598     }
29599   }
29600 
29601 fail:
29602   Ruby_Format_OverloadedError( argc, 1, "BB2Weight.new",
29603     "    BB2Weight.new(double c)\n"
29604     "    BB2Weight.new()\n");
29605 
29606   return Qnil;
29607 }
29608 
29609 
29610 SWIGINTERN VALUE
_wrap_BB2Weight_name(int argc,VALUE * argv,VALUE self)29611 _wrap_BB2Weight_name(int argc, VALUE *argv, VALUE self) {
29612   Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
29613   void *argp1 = 0 ;
29614   int res1 = 0 ;
29615   std::string result;
29616   VALUE vresult = Qnil;
29617 
29618   if ((argc < 0) || (argc > 0)) {
29619     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
29620   }
29621   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__BB2Weight, 0 |  0 );
29622   if (!SWIG_IsOK(res1)) {
29623     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::BB2Weight const *","name", 1, self ));
29624   }
29625   arg1 = reinterpret_cast< Xapian::BB2Weight * >(argp1);
29626   {
29627     try {
29628       result = ((Xapian::BB2Weight const *)arg1)->name();
29629     } catch (...) {
29630       string msg;
29631       int code = XapianExceptionHandler(msg);
29632       SWIG_exception(code, msg.c_str());
29633     }
29634   }
29635   vresult = SWIG_From_std_string(static_cast< std::string >(result));
29636   return vresult;
29637 fail:
29638   return Qnil;
29639 }
29640 
29641 
29642 SWIGINTERN VALUE
_wrap_BB2Weight_sumpart(int argc,VALUE * argv,VALUE self)29643 _wrap_BB2Weight_sumpart(int argc, VALUE *argv, VALUE self) {
29644   Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
29645   Xapian::termcount arg2 ;
29646   Xapian::termcount arg3 ;
29647   Xapian::termcount arg4 ;
29648   void *argp1 = 0 ;
29649   int res1 = 0 ;
29650   unsigned int val2 ;
29651   int ecode2 = 0 ;
29652   unsigned int val3 ;
29653   int ecode3 = 0 ;
29654   unsigned int val4 ;
29655   int ecode4 = 0 ;
29656   double result;
29657   VALUE vresult = Qnil;
29658 
29659   if ((argc < 3) || (argc > 3)) {
29660     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
29661   }
29662   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__BB2Weight, 0 |  0 );
29663   if (!SWIG_IsOK(res1)) {
29664     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::BB2Weight const *","get_sumpart", 1, self ));
29665   }
29666   arg1 = reinterpret_cast< Xapian::BB2Weight * >(argp1);
29667   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
29668   if (!SWIG_IsOK(ecode2)) {
29669     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 2, argv[0] ));
29670   }
29671   arg2 = static_cast< Xapian::termcount >(val2);
29672   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
29673   if (!SWIG_IsOK(ecode3)) {
29674     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 3, argv[1] ));
29675   }
29676   arg3 = static_cast< Xapian::termcount >(val3);
29677   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
29678   if (!SWIG_IsOK(ecode4)) {
29679     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 4, argv[2] ));
29680   }
29681   arg4 = static_cast< Xapian::termcount >(val4);
29682   {
29683     try {
29684       result = (double)((Xapian::BB2Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
29685     } catch (...) {
29686       string msg;
29687       int code = XapianExceptionHandler(msg);
29688       SWIG_exception(code, msg.c_str());
29689     }
29690   }
29691   vresult = SWIG_From_double(static_cast< double >(result));
29692   return vresult;
29693 fail:
29694   return Qnil;
29695 }
29696 
29697 
29698 SWIGINTERN VALUE
_wrap_BB2Weight_maxpart(int argc,VALUE * argv,VALUE self)29699 _wrap_BB2Weight_maxpart(int argc, VALUE *argv, VALUE self) {
29700   Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
29701   void *argp1 = 0 ;
29702   int res1 = 0 ;
29703   double result;
29704   VALUE vresult = Qnil;
29705 
29706   if ((argc < 0) || (argc > 0)) {
29707     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
29708   }
29709   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__BB2Weight, 0 |  0 );
29710   if (!SWIG_IsOK(res1)) {
29711     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::BB2Weight const *","get_maxpart", 1, self ));
29712   }
29713   arg1 = reinterpret_cast< Xapian::BB2Weight * >(argp1);
29714   {
29715     try {
29716       result = (double)((Xapian::BB2Weight const *)arg1)->get_maxpart();
29717     } catch (...) {
29718       string msg;
29719       int code = XapianExceptionHandler(msg);
29720       SWIG_exception(code, msg.c_str());
29721     }
29722   }
29723   vresult = SWIG_From_double(static_cast< double >(result));
29724   return vresult;
29725 fail:
29726   return Qnil;
29727 }
29728 
29729 
29730 SWIGINTERN VALUE
_wrap_BB2Weight_sumextra(int argc,VALUE * argv,VALUE self)29731 _wrap_BB2Weight_sumextra(int argc, VALUE *argv, VALUE self) {
29732   Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
29733   Xapian::termcount arg2 ;
29734   Xapian::termcount arg3 ;
29735   void *argp1 = 0 ;
29736   int res1 = 0 ;
29737   unsigned int val2 ;
29738   int ecode2 = 0 ;
29739   unsigned int val3 ;
29740   int ecode3 = 0 ;
29741   double result;
29742   VALUE vresult = Qnil;
29743 
29744   if ((argc < 2) || (argc > 2)) {
29745     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
29746   }
29747   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__BB2Weight, 0 |  0 );
29748   if (!SWIG_IsOK(res1)) {
29749     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::BB2Weight const *","get_sumextra", 1, self ));
29750   }
29751   arg1 = reinterpret_cast< Xapian::BB2Weight * >(argp1);
29752   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
29753   if (!SWIG_IsOK(ecode2)) {
29754     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 2, argv[0] ));
29755   }
29756   arg2 = static_cast< Xapian::termcount >(val2);
29757   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
29758   if (!SWIG_IsOK(ecode3)) {
29759     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 3, argv[1] ));
29760   }
29761   arg3 = static_cast< Xapian::termcount >(val3);
29762   {
29763     try {
29764       result = (double)((Xapian::BB2Weight const *)arg1)->get_sumextra(arg2,arg3);
29765     } catch (...) {
29766       string msg;
29767       int code = XapianExceptionHandler(msg);
29768       SWIG_exception(code, msg.c_str());
29769     }
29770   }
29771   vresult = SWIG_From_double(static_cast< double >(result));
29772   return vresult;
29773 fail:
29774   return Qnil;
29775 }
29776 
29777 
29778 SWIGINTERN VALUE
_wrap_BB2Weight_maxextra(int argc,VALUE * argv,VALUE self)29779 _wrap_BB2Weight_maxextra(int argc, VALUE *argv, VALUE self) {
29780   Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
29781   void *argp1 = 0 ;
29782   int res1 = 0 ;
29783   double result;
29784   VALUE vresult = Qnil;
29785 
29786   if ((argc < 0) || (argc > 0)) {
29787     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
29788   }
29789   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__BB2Weight, 0 |  0 );
29790   if (!SWIG_IsOK(res1)) {
29791     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::BB2Weight const *","get_maxextra", 1, self ));
29792   }
29793   arg1 = reinterpret_cast< Xapian::BB2Weight * >(argp1);
29794   {
29795     try {
29796       result = (double)((Xapian::BB2Weight const *)arg1)->get_maxextra();
29797     } catch (...) {
29798       string msg;
29799       int code = XapianExceptionHandler(msg);
29800       SWIG_exception(code, msg.c_str());
29801     }
29802   }
29803   vresult = SWIG_From_double(static_cast< double >(result));
29804   return vresult;
29805 fail:
29806   return Qnil;
29807 }
29808 
29809 
29810 SWIGINTERN void
free_Xapian_BB2Weight(void * self)29811 free_Xapian_BB2Weight(void *self) {
29812     Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *)self;
29813     delete arg1;
29814 }
29815 
29816 static swig_class SwigClassDLHWeight;
29817 
29818 SWIGINTERN VALUE
29819 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_DLHWeight_allocate(VALUE self)29820 _wrap_DLHWeight_allocate(VALUE self)
29821 #else
29822 _wrap_DLHWeight_allocate(int argc, VALUE *argv, VALUE self)
29823 #endif
29824 {
29825   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__DLHWeight);
29826 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
29827   rb_obj_call_init(vresult, argc, argv);
29828 #endif
29829   return vresult;
29830 }
29831 
29832 
29833 SWIGINTERN VALUE
_wrap_new_DLHWeight(int argc,VALUE * argv,VALUE self)29834 _wrap_new_DLHWeight(int argc, VALUE *argv, VALUE self) {
29835   const char *classname SWIGUNUSED = "Xapian::DLHWeight";
29836   Xapian::DLHWeight *result = 0 ;
29837 
29838   if ((argc < 0) || (argc > 0)) {
29839     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
29840   }
29841   {
29842     try {
29843       result = (Xapian::DLHWeight *)new Xapian::DLHWeight();
29844       DATA_PTR(self) = result;
29845     } catch (...) {
29846       string msg;
29847       int code = XapianExceptionHandler(msg);
29848       SWIG_exception(code, msg.c_str());
29849     }
29850   }
29851   return self;
29852 fail:
29853   return Qnil;
29854 }
29855 
29856 
29857 SWIGINTERN VALUE
_wrap_DLHWeight_name(int argc,VALUE * argv,VALUE self)29858 _wrap_DLHWeight_name(int argc, VALUE *argv, VALUE self) {
29859   Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
29860   void *argp1 = 0 ;
29861   int res1 = 0 ;
29862   std::string result;
29863   VALUE vresult = Qnil;
29864 
29865   if ((argc < 0) || (argc > 0)) {
29866     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
29867   }
29868   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__DLHWeight, 0 |  0 );
29869   if (!SWIG_IsOK(res1)) {
29870     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::DLHWeight const *","name", 1, self ));
29871   }
29872   arg1 = reinterpret_cast< Xapian::DLHWeight * >(argp1);
29873   {
29874     try {
29875       result = ((Xapian::DLHWeight const *)arg1)->name();
29876     } catch (...) {
29877       string msg;
29878       int code = XapianExceptionHandler(msg);
29879       SWIG_exception(code, msg.c_str());
29880     }
29881   }
29882   vresult = SWIG_From_std_string(static_cast< std::string >(result));
29883   return vresult;
29884 fail:
29885   return Qnil;
29886 }
29887 
29888 
29889 SWIGINTERN VALUE
_wrap_DLHWeight_sumpart(int argc,VALUE * argv,VALUE self)29890 _wrap_DLHWeight_sumpart(int argc, VALUE *argv, VALUE self) {
29891   Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
29892   Xapian::termcount arg2 ;
29893   Xapian::termcount arg3 ;
29894   Xapian::termcount arg4 ;
29895   void *argp1 = 0 ;
29896   int res1 = 0 ;
29897   unsigned int val2 ;
29898   int ecode2 = 0 ;
29899   unsigned int val3 ;
29900   int ecode3 = 0 ;
29901   unsigned int val4 ;
29902   int ecode4 = 0 ;
29903   double result;
29904   VALUE vresult = Qnil;
29905 
29906   if ((argc < 3) || (argc > 3)) {
29907     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
29908   }
29909   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__DLHWeight, 0 |  0 );
29910   if (!SWIG_IsOK(res1)) {
29911     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::DLHWeight const *","get_sumpart", 1, self ));
29912   }
29913   arg1 = reinterpret_cast< Xapian::DLHWeight * >(argp1);
29914   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
29915   if (!SWIG_IsOK(ecode2)) {
29916     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 2, argv[0] ));
29917   }
29918   arg2 = static_cast< Xapian::termcount >(val2);
29919   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
29920   if (!SWIG_IsOK(ecode3)) {
29921     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 3, argv[1] ));
29922   }
29923   arg3 = static_cast< Xapian::termcount >(val3);
29924   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
29925   if (!SWIG_IsOK(ecode4)) {
29926     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 4, argv[2] ));
29927   }
29928   arg4 = static_cast< Xapian::termcount >(val4);
29929   {
29930     try {
29931       result = (double)((Xapian::DLHWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
29932     } catch (...) {
29933       string msg;
29934       int code = XapianExceptionHandler(msg);
29935       SWIG_exception(code, msg.c_str());
29936     }
29937   }
29938   vresult = SWIG_From_double(static_cast< double >(result));
29939   return vresult;
29940 fail:
29941   return Qnil;
29942 }
29943 
29944 
29945 SWIGINTERN VALUE
_wrap_DLHWeight_maxpart(int argc,VALUE * argv,VALUE self)29946 _wrap_DLHWeight_maxpart(int argc, VALUE *argv, VALUE self) {
29947   Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
29948   void *argp1 = 0 ;
29949   int res1 = 0 ;
29950   double result;
29951   VALUE vresult = Qnil;
29952 
29953   if ((argc < 0) || (argc > 0)) {
29954     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
29955   }
29956   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__DLHWeight, 0 |  0 );
29957   if (!SWIG_IsOK(res1)) {
29958     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::DLHWeight const *","get_maxpart", 1, self ));
29959   }
29960   arg1 = reinterpret_cast< Xapian::DLHWeight * >(argp1);
29961   {
29962     try {
29963       result = (double)((Xapian::DLHWeight const *)arg1)->get_maxpart();
29964     } catch (...) {
29965       string msg;
29966       int code = XapianExceptionHandler(msg);
29967       SWIG_exception(code, msg.c_str());
29968     }
29969   }
29970   vresult = SWIG_From_double(static_cast< double >(result));
29971   return vresult;
29972 fail:
29973   return Qnil;
29974 }
29975 
29976 
29977 SWIGINTERN VALUE
_wrap_DLHWeight_sumextra(int argc,VALUE * argv,VALUE self)29978 _wrap_DLHWeight_sumextra(int argc, VALUE *argv, VALUE self) {
29979   Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
29980   Xapian::termcount arg2 ;
29981   Xapian::termcount arg3 ;
29982   void *argp1 = 0 ;
29983   int res1 = 0 ;
29984   unsigned int val2 ;
29985   int ecode2 = 0 ;
29986   unsigned int val3 ;
29987   int ecode3 = 0 ;
29988   double result;
29989   VALUE vresult = Qnil;
29990 
29991   if ((argc < 2) || (argc > 2)) {
29992     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
29993   }
29994   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__DLHWeight, 0 |  0 );
29995   if (!SWIG_IsOK(res1)) {
29996     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::DLHWeight const *","get_sumextra", 1, self ));
29997   }
29998   arg1 = reinterpret_cast< Xapian::DLHWeight * >(argp1);
29999   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
30000   if (!SWIG_IsOK(ecode2)) {
30001     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 2, argv[0] ));
30002   }
30003   arg2 = static_cast< Xapian::termcount >(val2);
30004   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
30005   if (!SWIG_IsOK(ecode3)) {
30006     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 3, argv[1] ));
30007   }
30008   arg3 = static_cast< Xapian::termcount >(val3);
30009   {
30010     try {
30011       result = (double)((Xapian::DLHWeight const *)arg1)->get_sumextra(arg2,arg3);
30012     } catch (...) {
30013       string msg;
30014       int code = XapianExceptionHandler(msg);
30015       SWIG_exception(code, msg.c_str());
30016     }
30017   }
30018   vresult = SWIG_From_double(static_cast< double >(result));
30019   return vresult;
30020 fail:
30021   return Qnil;
30022 }
30023 
30024 
30025 SWIGINTERN VALUE
_wrap_DLHWeight_maxextra(int argc,VALUE * argv,VALUE self)30026 _wrap_DLHWeight_maxextra(int argc, VALUE *argv, VALUE self) {
30027   Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
30028   void *argp1 = 0 ;
30029   int res1 = 0 ;
30030   double result;
30031   VALUE vresult = Qnil;
30032 
30033   if ((argc < 0) || (argc > 0)) {
30034     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
30035   }
30036   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__DLHWeight, 0 |  0 );
30037   if (!SWIG_IsOK(res1)) {
30038     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::DLHWeight const *","get_maxextra", 1, self ));
30039   }
30040   arg1 = reinterpret_cast< Xapian::DLHWeight * >(argp1);
30041   {
30042     try {
30043       result = (double)((Xapian::DLHWeight const *)arg1)->get_maxextra();
30044     } catch (...) {
30045       string msg;
30046       int code = XapianExceptionHandler(msg);
30047       SWIG_exception(code, msg.c_str());
30048     }
30049   }
30050   vresult = SWIG_From_double(static_cast< double >(result));
30051   return vresult;
30052 fail:
30053   return Qnil;
30054 }
30055 
30056 
30057 SWIGINTERN void
free_Xapian_DLHWeight(void * self)30058 free_Xapian_DLHWeight(void *self) {
30059     Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *)self;
30060     delete arg1;
30061 }
30062 
30063 static swig_class SwigClassPL2Weight;
30064 
30065 SWIGINTERN VALUE
_wrap_new_PL2Weight__SWIG_0(int argc,VALUE * argv,VALUE self)30066 _wrap_new_PL2Weight__SWIG_0(int argc, VALUE *argv, VALUE self) {
30067   double arg1 ;
30068   double val1 ;
30069   int ecode1 = 0 ;
30070   const char *classname SWIGUNUSED = "Xapian::PL2Weight";
30071   Xapian::PL2Weight *result = 0 ;
30072 
30073   if ((argc < 1) || (argc > 1)) {
30074     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
30075   }
30076   ecode1 = SWIG_AsVal_double(argv[0], &val1);
30077   if (!SWIG_IsOK(ecode1)) {
30078     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","PL2Weight", 1, argv[0] ));
30079   }
30080   arg1 = static_cast< double >(val1);
30081   {
30082     try {
30083       result = (Xapian::PL2Weight *)new Xapian::PL2Weight(arg1);
30084       DATA_PTR(self) = result;
30085     } catch (...) {
30086       string msg;
30087       int code = XapianExceptionHandler(msg);
30088       SWIG_exception(code, msg.c_str());
30089     }
30090   }
30091   return self;
30092 fail:
30093   return Qnil;
30094 }
30095 
30096 
30097 SWIGINTERN VALUE
30098 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_PL2Weight_allocate(VALUE self)30099 _wrap_PL2Weight_allocate(VALUE self)
30100 #else
30101 _wrap_PL2Weight_allocate(int argc, VALUE *argv, VALUE self)
30102 #endif
30103 {
30104   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__PL2Weight);
30105 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
30106   rb_obj_call_init(vresult, argc, argv);
30107 #endif
30108   return vresult;
30109 }
30110 
30111 
30112 SWIGINTERN VALUE
_wrap_new_PL2Weight__SWIG_1(int argc,VALUE * argv,VALUE self)30113 _wrap_new_PL2Weight__SWIG_1(int argc, VALUE *argv, VALUE self) {
30114   const char *classname SWIGUNUSED = "Xapian::PL2Weight";
30115   Xapian::PL2Weight *result = 0 ;
30116 
30117   if ((argc < 0) || (argc > 0)) {
30118     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
30119   }
30120   {
30121     try {
30122       result = (Xapian::PL2Weight *)new Xapian::PL2Weight();
30123       DATA_PTR(self) = result;
30124     } catch (...) {
30125       string msg;
30126       int code = XapianExceptionHandler(msg);
30127       SWIG_exception(code, msg.c_str());
30128     }
30129   }
30130   return self;
30131 fail:
30132   return Qnil;
30133 }
30134 
30135 
_wrap_new_PL2Weight(int nargs,VALUE * args,VALUE self)30136 SWIGINTERN VALUE _wrap_new_PL2Weight(int nargs, VALUE *args, VALUE self) {
30137   int argc;
30138   VALUE argv[1];
30139   int ii;
30140 
30141   argc = nargs;
30142   if (argc > 1) SWIG_fail;
30143   for (ii = 0; (ii < argc); ++ii) {
30144     argv[ii] = args[ii];
30145   }
30146   if (argc == 0) {
30147     return _wrap_new_PL2Weight__SWIG_1(nargs, args, self);
30148   }
30149   if (argc == 1) {
30150     int _v;
30151     {
30152       int res = SWIG_AsVal_double(argv[0], NULL);
30153       _v = SWIG_CheckState(res);
30154     }
30155     if (_v) {
30156       return _wrap_new_PL2Weight__SWIG_0(nargs, args, self);
30157     }
30158   }
30159 
30160 fail:
30161   Ruby_Format_OverloadedError( argc, 1, "PL2Weight.new",
30162     "    PL2Weight.new(double c)\n"
30163     "    PL2Weight.new()\n");
30164 
30165   return Qnil;
30166 }
30167 
30168 
30169 SWIGINTERN VALUE
_wrap_PL2Weight_name(int argc,VALUE * argv,VALUE self)30170 _wrap_PL2Weight_name(int argc, VALUE *argv, VALUE self) {
30171   Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
30172   void *argp1 = 0 ;
30173   int res1 = 0 ;
30174   std::string result;
30175   VALUE vresult = Qnil;
30176 
30177   if ((argc < 0) || (argc > 0)) {
30178     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
30179   }
30180   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PL2Weight, 0 |  0 );
30181   if (!SWIG_IsOK(res1)) {
30182     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PL2Weight const *","name", 1, self ));
30183   }
30184   arg1 = reinterpret_cast< Xapian::PL2Weight * >(argp1);
30185   {
30186     try {
30187       result = ((Xapian::PL2Weight const *)arg1)->name();
30188     } catch (...) {
30189       string msg;
30190       int code = XapianExceptionHandler(msg);
30191       SWIG_exception(code, msg.c_str());
30192     }
30193   }
30194   vresult = SWIG_From_std_string(static_cast< std::string >(result));
30195   return vresult;
30196 fail:
30197   return Qnil;
30198 }
30199 
30200 
30201 SWIGINTERN VALUE
_wrap_PL2Weight_sumpart(int argc,VALUE * argv,VALUE self)30202 _wrap_PL2Weight_sumpart(int argc, VALUE *argv, VALUE self) {
30203   Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
30204   Xapian::termcount arg2 ;
30205   Xapian::termcount arg3 ;
30206   Xapian::termcount arg4 ;
30207   void *argp1 = 0 ;
30208   int res1 = 0 ;
30209   unsigned int val2 ;
30210   int ecode2 = 0 ;
30211   unsigned int val3 ;
30212   int ecode3 = 0 ;
30213   unsigned int val4 ;
30214   int ecode4 = 0 ;
30215   double result;
30216   VALUE vresult = Qnil;
30217 
30218   if ((argc < 3) || (argc > 3)) {
30219     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
30220   }
30221   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PL2Weight, 0 |  0 );
30222   if (!SWIG_IsOK(res1)) {
30223     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PL2Weight const *","get_sumpart", 1, self ));
30224   }
30225   arg1 = reinterpret_cast< Xapian::PL2Weight * >(argp1);
30226   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
30227   if (!SWIG_IsOK(ecode2)) {
30228     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 2, argv[0] ));
30229   }
30230   arg2 = static_cast< Xapian::termcount >(val2);
30231   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
30232   if (!SWIG_IsOK(ecode3)) {
30233     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 3, argv[1] ));
30234   }
30235   arg3 = static_cast< Xapian::termcount >(val3);
30236   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
30237   if (!SWIG_IsOK(ecode4)) {
30238     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 4, argv[2] ));
30239   }
30240   arg4 = static_cast< Xapian::termcount >(val4);
30241   {
30242     try {
30243       result = (double)((Xapian::PL2Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
30244     } catch (...) {
30245       string msg;
30246       int code = XapianExceptionHandler(msg);
30247       SWIG_exception(code, msg.c_str());
30248     }
30249   }
30250   vresult = SWIG_From_double(static_cast< double >(result));
30251   return vresult;
30252 fail:
30253   return Qnil;
30254 }
30255 
30256 
30257 SWIGINTERN VALUE
_wrap_PL2Weight_maxpart(int argc,VALUE * argv,VALUE self)30258 _wrap_PL2Weight_maxpart(int argc, VALUE *argv, VALUE self) {
30259   Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
30260   void *argp1 = 0 ;
30261   int res1 = 0 ;
30262   double result;
30263   VALUE vresult = Qnil;
30264 
30265   if ((argc < 0) || (argc > 0)) {
30266     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
30267   }
30268   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PL2Weight, 0 |  0 );
30269   if (!SWIG_IsOK(res1)) {
30270     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PL2Weight const *","get_maxpart", 1, self ));
30271   }
30272   arg1 = reinterpret_cast< Xapian::PL2Weight * >(argp1);
30273   {
30274     try {
30275       result = (double)((Xapian::PL2Weight const *)arg1)->get_maxpart();
30276     } catch (...) {
30277       string msg;
30278       int code = XapianExceptionHandler(msg);
30279       SWIG_exception(code, msg.c_str());
30280     }
30281   }
30282   vresult = SWIG_From_double(static_cast< double >(result));
30283   return vresult;
30284 fail:
30285   return Qnil;
30286 }
30287 
30288 
30289 SWIGINTERN VALUE
_wrap_PL2Weight_sumextra(int argc,VALUE * argv,VALUE self)30290 _wrap_PL2Weight_sumextra(int argc, VALUE *argv, VALUE self) {
30291   Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
30292   Xapian::termcount arg2 ;
30293   Xapian::termcount arg3 ;
30294   void *argp1 = 0 ;
30295   int res1 = 0 ;
30296   unsigned int val2 ;
30297   int ecode2 = 0 ;
30298   unsigned int val3 ;
30299   int ecode3 = 0 ;
30300   double result;
30301   VALUE vresult = Qnil;
30302 
30303   if ((argc < 2) || (argc > 2)) {
30304     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
30305   }
30306   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PL2Weight, 0 |  0 );
30307   if (!SWIG_IsOK(res1)) {
30308     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PL2Weight const *","get_sumextra", 1, self ));
30309   }
30310   arg1 = reinterpret_cast< Xapian::PL2Weight * >(argp1);
30311   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
30312   if (!SWIG_IsOK(ecode2)) {
30313     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 2, argv[0] ));
30314   }
30315   arg2 = static_cast< Xapian::termcount >(val2);
30316   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
30317   if (!SWIG_IsOK(ecode3)) {
30318     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 3, argv[1] ));
30319   }
30320   arg3 = static_cast< Xapian::termcount >(val3);
30321   {
30322     try {
30323       result = (double)((Xapian::PL2Weight const *)arg1)->get_sumextra(arg2,arg3);
30324     } catch (...) {
30325       string msg;
30326       int code = XapianExceptionHandler(msg);
30327       SWIG_exception(code, msg.c_str());
30328     }
30329   }
30330   vresult = SWIG_From_double(static_cast< double >(result));
30331   return vresult;
30332 fail:
30333   return Qnil;
30334 }
30335 
30336 
30337 SWIGINTERN VALUE
_wrap_PL2Weight_maxextra(int argc,VALUE * argv,VALUE self)30338 _wrap_PL2Weight_maxextra(int argc, VALUE *argv, VALUE self) {
30339   Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
30340   void *argp1 = 0 ;
30341   int res1 = 0 ;
30342   double result;
30343   VALUE vresult = Qnil;
30344 
30345   if ((argc < 0) || (argc > 0)) {
30346     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
30347   }
30348   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PL2Weight, 0 |  0 );
30349   if (!SWIG_IsOK(res1)) {
30350     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PL2Weight const *","get_maxextra", 1, self ));
30351   }
30352   arg1 = reinterpret_cast< Xapian::PL2Weight * >(argp1);
30353   {
30354     try {
30355       result = (double)((Xapian::PL2Weight const *)arg1)->get_maxextra();
30356     } catch (...) {
30357       string msg;
30358       int code = XapianExceptionHandler(msg);
30359       SWIG_exception(code, msg.c_str());
30360     }
30361   }
30362   vresult = SWIG_From_double(static_cast< double >(result));
30363   return vresult;
30364 fail:
30365   return Qnil;
30366 }
30367 
30368 
30369 SWIGINTERN void
free_Xapian_PL2Weight(void * self)30370 free_Xapian_PL2Weight(void *self) {
30371     Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *)self;
30372     delete arg1;
30373 }
30374 
30375 static swig_class SwigClassPL2PlusWeight;
30376 
30377 SWIGINTERN VALUE
_wrap_new_PL2PlusWeight__SWIG_0(int argc,VALUE * argv,VALUE self)30378 _wrap_new_PL2PlusWeight__SWIG_0(int argc, VALUE *argv, VALUE self) {
30379   double arg1 ;
30380   double arg2 ;
30381   double val1 ;
30382   int ecode1 = 0 ;
30383   double val2 ;
30384   int ecode2 = 0 ;
30385   const char *classname SWIGUNUSED = "Xapian::PL2PlusWeight";
30386   Xapian::PL2PlusWeight *result = 0 ;
30387 
30388   if ((argc < 2) || (argc > 2)) {
30389     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
30390   }
30391   ecode1 = SWIG_AsVal_double(argv[0], &val1);
30392   if (!SWIG_IsOK(ecode1)) {
30393     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","PL2PlusWeight", 1, argv[0] ));
30394   }
30395   arg1 = static_cast< double >(val1);
30396   ecode2 = SWIG_AsVal_double(argv[1], &val2);
30397   if (!SWIG_IsOK(ecode2)) {
30398     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","PL2PlusWeight", 2, argv[1] ));
30399   }
30400   arg2 = static_cast< double >(val2);
30401   {
30402     try {
30403       result = (Xapian::PL2PlusWeight *)new Xapian::PL2PlusWeight(arg1,arg2);
30404       DATA_PTR(self) = result;
30405     } catch (...) {
30406       string msg;
30407       int code = XapianExceptionHandler(msg);
30408       SWIG_exception(code, msg.c_str());
30409     }
30410   }
30411   return self;
30412 fail:
30413   return Qnil;
30414 }
30415 
30416 
30417 SWIGINTERN VALUE
30418 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_PL2PlusWeight_allocate(VALUE self)30419 _wrap_PL2PlusWeight_allocate(VALUE self)
30420 #else
30421 _wrap_PL2PlusWeight_allocate(int argc, VALUE *argv, VALUE self)
30422 #endif
30423 {
30424   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__PL2PlusWeight);
30425 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
30426   rb_obj_call_init(vresult, argc, argv);
30427 #endif
30428   return vresult;
30429 }
30430 
30431 
30432 SWIGINTERN VALUE
_wrap_new_PL2PlusWeight__SWIG_1(int argc,VALUE * argv,VALUE self)30433 _wrap_new_PL2PlusWeight__SWIG_1(int argc, VALUE *argv, VALUE self) {
30434   const char *classname SWIGUNUSED = "Xapian::PL2PlusWeight";
30435   Xapian::PL2PlusWeight *result = 0 ;
30436 
30437   if ((argc < 0) || (argc > 0)) {
30438     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
30439   }
30440   {
30441     try {
30442       result = (Xapian::PL2PlusWeight *)new Xapian::PL2PlusWeight();
30443       DATA_PTR(self) = result;
30444     } catch (...) {
30445       string msg;
30446       int code = XapianExceptionHandler(msg);
30447       SWIG_exception(code, msg.c_str());
30448     }
30449   }
30450   return self;
30451 fail:
30452   return Qnil;
30453 }
30454 
30455 
_wrap_new_PL2PlusWeight(int nargs,VALUE * args,VALUE self)30456 SWIGINTERN VALUE _wrap_new_PL2PlusWeight(int nargs, VALUE *args, VALUE self) {
30457   int argc;
30458   VALUE argv[2];
30459   int ii;
30460 
30461   argc = nargs;
30462   if (argc > 2) SWIG_fail;
30463   for (ii = 0; (ii < argc); ++ii) {
30464     argv[ii] = args[ii];
30465   }
30466   if (argc == 0) {
30467     return _wrap_new_PL2PlusWeight__SWIG_1(nargs, args, self);
30468   }
30469   if (argc == 2) {
30470     int _v;
30471     {
30472       int res = SWIG_AsVal_double(argv[0], NULL);
30473       _v = SWIG_CheckState(res);
30474     }
30475     if (_v) {
30476       {
30477         int res = SWIG_AsVal_double(argv[1], NULL);
30478         _v = SWIG_CheckState(res);
30479       }
30480       if (_v) {
30481         return _wrap_new_PL2PlusWeight__SWIG_0(nargs, args, self);
30482       }
30483     }
30484   }
30485 
30486 fail:
30487   Ruby_Format_OverloadedError( argc, 2, "PL2PlusWeight.new",
30488     "    PL2PlusWeight.new(double c, double delta)\n"
30489     "    PL2PlusWeight.new()\n");
30490 
30491   return Qnil;
30492 }
30493 
30494 
30495 SWIGINTERN VALUE
_wrap_PL2PlusWeight_name(int argc,VALUE * argv,VALUE self)30496 _wrap_PL2PlusWeight_name(int argc, VALUE *argv, VALUE self) {
30497   Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
30498   void *argp1 = 0 ;
30499   int res1 = 0 ;
30500   std::string result;
30501   VALUE vresult = Qnil;
30502 
30503   if ((argc < 0) || (argc > 0)) {
30504     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
30505   }
30506   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PL2PlusWeight, 0 |  0 );
30507   if (!SWIG_IsOK(res1)) {
30508     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PL2PlusWeight const *","name", 1, self ));
30509   }
30510   arg1 = reinterpret_cast< Xapian::PL2PlusWeight * >(argp1);
30511   {
30512     try {
30513       result = ((Xapian::PL2PlusWeight const *)arg1)->name();
30514     } catch (...) {
30515       string msg;
30516       int code = XapianExceptionHandler(msg);
30517       SWIG_exception(code, msg.c_str());
30518     }
30519   }
30520   vresult = SWIG_From_std_string(static_cast< std::string >(result));
30521   return vresult;
30522 fail:
30523   return Qnil;
30524 }
30525 
30526 
30527 SWIGINTERN VALUE
_wrap_PL2PlusWeight_sumpart(int argc,VALUE * argv,VALUE self)30528 _wrap_PL2PlusWeight_sumpart(int argc, VALUE *argv, VALUE self) {
30529   Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
30530   Xapian::termcount arg2 ;
30531   Xapian::termcount arg3 ;
30532   Xapian::termcount arg4 ;
30533   void *argp1 = 0 ;
30534   int res1 = 0 ;
30535   unsigned int val2 ;
30536   int ecode2 = 0 ;
30537   unsigned int val3 ;
30538   int ecode3 = 0 ;
30539   unsigned int val4 ;
30540   int ecode4 = 0 ;
30541   double result;
30542   VALUE vresult = Qnil;
30543 
30544   if ((argc < 3) || (argc > 3)) {
30545     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
30546   }
30547   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PL2PlusWeight, 0 |  0 );
30548   if (!SWIG_IsOK(res1)) {
30549     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PL2PlusWeight const *","get_sumpart", 1, self ));
30550   }
30551   arg1 = reinterpret_cast< Xapian::PL2PlusWeight * >(argp1);
30552   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
30553   if (!SWIG_IsOK(ecode2)) {
30554     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 2, argv[0] ));
30555   }
30556   arg2 = static_cast< Xapian::termcount >(val2);
30557   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
30558   if (!SWIG_IsOK(ecode3)) {
30559     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 3, argv[1] ));
30560   }
30561   arg3 = static_cast< Xapian::termcount >(val3);
30562   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
30563   if (!SWIG_IsOK(ecode4)) {
30564     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 4, argv[2] ));
30565   }
30566   arg4 = static_cast< Xapian::termcount >(val4);
30567   {
30568     try {
30569       result = (double)((Xapian::PL2PlusWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
30570     } catch (...) {
30571       string msg;
30572       int code = XapianExceptionHandler(msg);
30573       SWIG_exception(code, msg.c_str());
30574     }
30575   }
30576   vresult = SWIG_From_double(static_cast< double >(result));
30577   return vresult;
30578 fail:
30579   return Qnil;
30580 }
30581 
30582 
30583 SWIGINTERN VALUE
_wrap_PL2PlusWeight_maxpart(int argc,VALUE * argv,VALUE self)30584 _wrap_PL2PlusWeight_maxpart(int argc, VALUE *argv, VALUE self) {
30585   Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
30586   void *argp1 = 0 ;
30587   int res1 = 0 ;
30588   double result;
30589   VALUE vresult = Qnil;
30590 
30591   if ((argc < 0) || (argc > 0)) {
30592     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
30593   }
30594   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PL2PlusWeight, 0 |  0 );
30595   if (!SWIG_IsOK(res1)) {
30596     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PL2PlusWeight const *","get_maxpart", 1, self ));
30597   }
30598   arg1 = reinterpret_cast< Xapian::PL2PlusWeight * >(argp1);
30599   {
30600     try {
30601       result = (double)((Xapian::PL2PlusWeight const *)arg1)->get_maxpart();
30602     } catch (...) {
30603       string msg;
30604       int code = XapianExceptionHandler(msg);
30605       SWIG_exception(code, msg.c_str());
30606     }
30607   }
30608   vresult = SWIG_From_double(static_cast< double >(result));
30609   return vresult;
30610 fail:
30611   return Qnil;
30612 }
30613 
30614 
30615 SWIGINTERN VALUE
_wrap_PL2PlusWeight_sumextra(int argc,VALUE * argv,VALUE self)30616 _wrap_PL2PlusWeight_sumextra(int argc, VALUE *argv, VALUE self) {
30617   Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
30618   Xapian::termcount arg2 ;
30619   Xapian::termcount arg3 ;
30620   void *argp1 = 0 ;
30621   int res1 = 0 ;
30622   unsigned int val2 ;
30623   int ecode2 = 0 ;
30624   unsigned int val3 ;
30625   int ecode3 = 0 ;
30626   double result;
30627   VALUE vresult = Qnil;
30628 
30629   if ((argc < 2) || (argc > 2)) {
30630     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
30631   }
30632   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PL2PlusWeight, 0 |  0 );
30633   if (!SWIG_IsOK(res1)) {
30634     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PL2PlusWeight const *","get_sumextra", 1, self ));
30635   }
30636   arg1 = reinterpret_cast< Xapian::PL2PlusWeight * >(argp1);
30637   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
30638   if (!SWIG_IsOK(ecode2)) {
30639     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 2, argv[0] ));
30640   }
30641   arg2 = static_cast< Xapian::termcount >(val2);
30642   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
30643   if (!SWIG_IsOK(ecode3)) {
30644     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 3, argv[1] ));
30645   }
30646   arg3 = static_cast< Xapian::termcount >(val3);
30647   {
30648     try {
30649       result = (double)((Xapian::PL2PlusWeight const *)arg1)->get_sumextra(arg2,arg3);
30650     } catch (...) {
30651       string msg;
30652       int code = XapianExceptionHandler(msg);
30653       SWIG_exception(code, msg.c_str());
30654     }
30655   }
30656   vresult = SWIG_From_double(static_cast< double >(result));
30657   return vresult;
30658 fail:
30659   return Qnil;
30660 }
30661 
30662 
30663 SWIGINTERN VALUE
_wrap_PL2PlusWeight_maxextra(int argc,VALUE * argv,VALUE self)30664 _wrap_PL2PlusWeight_maxextra(int argc, VALUE *argv, VALUE self) {
30665   Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
30666   void *argp1 = 0 ;
30667   int res1 = 0 ;
30668   double result;
30669   VALUE vresult = Qnil;
30670 
30671   if ((argc < 0) || (argc > 0)) {
30672     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
30673   }
30674   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PL2PlusWeight, 0 |  0 );
30675   if (!SWIG_IsOK(res1)) {
30676     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PL2PlusWeight const *","get_maxextra", 1, self ));
30677   }
30678   arg1 = reinterpret_cast< Xapian::PL2PlusWeight * >(argp1);
30679   {
30680     try {
30681       result = (double)((Xapian::PL2PlusWeight const *)arg1)->get_maxextra();
30682     } catch (...) {
30683       string msg;
30684       int code = XapianExceptionHandler(msg);
30685       SWIG_exception(code, msg.c_str());
30686     }
30687   }
30688   vresult = SWIG_From_double(static_cast< double >(result));
30689   return vresult;
30690 fail:
30691   return Qnil;
30692 }
30693 
30694 
30695 SWIGINTERN void
free_Xapian_PL2PlusWeight(void * self)30696 free_Xapian_PL2PlusWeight(void *self) {
30697     Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *)self;
30698     delete arg1;
30699 }
30700 
30701 static swig_class SwigClassDPHWeight;
30702 
30703 SWIGINTERN VALUE
30704 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_DPHWeight_allocate(VALUE self)30705 _wrap_DPHWeight_allocate(VALUE self)
30706 #else
30707 _wrap_DPHWeight_allocate(int argc, VALUE *argv, VALUE self)
30708 #endif
30709 {
30710   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__DPHWeight);
30711 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
30712   rb_obj_call_init(vresult, argc, argv);
30713 #endif
30714   return vresult;
30715 }
30716 
30717 
30718 SWIGINTERN VALUE
_wrap_new_DPHWeight(int argc,VALUE * argv,VALUE self)30719 _wrap_new_DPHWeight(int argc, VALUE *argv, VALUE self) {
30720   const char *classname SWIGUNUSED = "Xapian::DPHWeight";
30721   Xapian::DPHWeight *result = 0 ;
30722 
30723   if ((argc < 0) || (argc > 0)) {
30724     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
30725   }
30726   {
30727     try {
30728       result = (Xapian::DPHWeight *)new Xapian::DPHWeight();
30729       DATA_PTR(self) = result;
30730     } catch (...) {
30731       string msg;
30732       int code = XapianExceptionHandler(msg);
30733       SWIG_exception(code, msg.c_str());
30734     }
30735   }
30736   return self;
30737 fail:
30738   return Qnil;
30739 }
30740 
30741 
30742 SWIGINTERN VALUE
_wrap_DPHWeight_name(int argc,VALUE * argv,VALUE self)30743 _wrap_DPHWeight_name(int argc, VALUE *argv, VALUE self) {
30744   Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
30745   void *argp1 = 0 ;
30746   int res1 = 0 ;
30747   std::string result;
30748   VALUE vresult = Qnil;
30749 
30750   if ((argc < 0) || (argc > 0)) {
30751     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
30752   }
30753   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__DPHWeight, 0 |  0 );
30754   if (!SWIG_IsOK(res1)) {
30755     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::DPHWeight const *","name", 1, self ));
30756   }
30757   arg1 = reinterpret_cast< Xapian::DPHWeight * >(argp1);
30758   {
30759     try {
30760       result = ((Xapian::DPHWeight const *)arg1)->name();
30761     } catch (...) {
30762       string msg;
30763       int code = XapianExceptionHandler(msg);
30764       SWIG_exception(code, msg.c_str());
30765     }
30766   }
30767   vresult = SWIG_From_std_string(static_cast< std::string >(result));
30768   return vresult;
30769 fail:
30770   return Qnil;
30771 }
30772 
30773 
30774 SWIGINTERN VALUE
_wrap_DPHWeight_sumpart(int argc,VALUE * argv,VALUE self)30775 _wrap_DPHWeight_sumpart(int argc, VALUE *argv, VALUE self) {
30776   Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
30777   Xapian::termcount arg2 ;
30778   Xapian::termcount arg3 ;
30779   Xapian::termcount arg4 ;
30780   void *argp1 = 0 ;
30781   int res1 = 0 ;
30782   unsigned int val2 ;
30783   int ecode2 = 0 ;
30784   unsigned int val3 ;
30785   int ecode3 = 0 ;
30786   unsigned int val4 ;
30787   int ecode4 = 0 ;
30788   double result;
30789   VALUE vresult = Qnil;
30790 
30791   if ((argc < 3) || (argc > 3)) {
30792     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
30793   }
30794   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__DPHWeight, 0 |  0 );
30795   if (!SWIG_IsOK(res1)) {
30796     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::DPHWeight const *","get_sumpart", 1, self ));
30797   }
30798   arg1 = reinterpret_cast< Xapian::DPHWeight * >(argp1);
30799   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
30800   if (!SWIG_IsOK(ecode2)) {
30801     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 2, argv[0] ));
30802   }
30803   arg2 = static_cast< Xapian::termcount >(val2);
30804   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
30805   if (!SWIG_IsOK(ecode3)) {
30806     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 3, argv[1] ));
30807   }
30808   arg3 = static_cast< Xapian::termcount >(val3);
30809   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
30810   if (!SWIG_IsOK(ecode4)) {
30811     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 4, argv[2] ));
30812   }
30813   arg4 = static_cast< Xapian::termcount >(val4);
30814   {
30815     try {
30816       result = (double)((Xapian::DPHWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
30817     } catch (...) {
30818       string msg;
30819       int code = XapianExceptionHandler(msg);
30820       SWIG_exception(code, msg.c_str());
30821     }
30822   }
30823   vresult = SWIG_From_double(static_cast< double >(result));
30824   return vresult;
30825 fail:
30826   return Qnil;
30827 }
30828 
30829 
30830 SWIGINTERN VALUE
_wrap_DPHWeight_maxpart(int argc,VALUE * argv,VALUE self)30831 _wrap_DPHWeight_maxpart(int argc, VALUE *argv, VALUE self) {
30832   Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
30833   void *argp1 = 0 ;
30834   int res1 = 0 ;
30835   double result;
30836   VALUE vresult = Qnil;
30837 
30838   if ((argc < 0) || (argc > 0)) {
30839     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
30840   }
30841   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__DPHWeight, 0 |  0 );
30842   if (!SWIG_IsOK(res1)) {
30843     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::DPHWeight const *","get_maxpart", 1, self ));
30844   }
30845   arg1 = reinterpret_cast< Xapian::DPHWeight * >(argp1);
30846   {
30847     try {
30848       result = (double)((Xapian::DPHWeight const *)arg1)->get_maxpart();
30849     } catch (...) {
30850       string msg;
30851       int code = XapianExceptionHandler(msg);
30852       SWIG_exception(code, msg.c_str());
30853     }
30854   }
30855   vresult = SWIG_From_double(static_cast< double >(result));
30856   return vresult;
30857 fail:
30858   return Qnil;
30859 }
30860 
30861 
30862 SWIGINTERN VALUE
_wrap_DPHWeight_sumextra(int argc,VALUE * argv,VALUE self)30863 _wrap_DPHWeight_sumextra(int argc, VALUE *argv, VALUE self) {
30864   Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
30865   Xapian::termcount arg2 ;
30866   Xapian::termcount arg3 ;
30867   void *argp1 = 0 ;
30868   int res1 = 0 ;
30869   unsigned int val2 ;
30870   int ecode2 = 0 ;
30871   unsigned int val3 ;
30872   int ecode3 = 0 ;
30873   double result;
30874   VALUE vresult = Qnil;
30875 
30876   if ((argc < 2) || (argc > 2)) {
30877     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
30878   }
30879   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__DPHWeight, 0 |  0 );
30880   if (!SWIG_IsOK(res1)) {
30881     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::DPHWeight const *","get_sumextra", 1, self ));
30882   }
30883   arg1 = reinterpret_cast< Xapian::DPHWeight * >(argp1);
30884   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
30885   if (!SWIG_IsOK(ecode2)) {
30886     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 2, argv[0] ));
30887   }
30888   arg2 = static_cast< Xapian::termcount >(val2);
30889   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
30890   if (!SWIG_IsOK(ecode3)) {
30891     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 3, argv[1] ));
30892   }
30893   arg3 = static_cast< Xapian::termcount >(val3);
30894   {
30895     try {
30896       result = (double)((Xapian::DPHWeight const *)arg1)->get_sumextra(arg2,arg3);
30897     } catch (...) {
30898       string msg;
30899       int code = XapianExceptionHandler(msg);
30900       SWIG_exception(code, msg.c_str());
30901     }
30902   }
30903   vresult = SWIG_From_double(static_cast< double >(result));
30904   return vresult;
30905 fail:
30906   return Qnil;
30907 }
30908 
30909 
30910 SWIGINTERN VALUE
_wrap_DPHWeight_maxextra(int argc,VALUE * argv,VALUE self)30911 _wrap_DPHWeight_maxextra(int argc, VALUE *argv, VALUE self) {
30912   Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
30913   void *argp1 = 0 ;
30914   int res1 = 0 ;
30915   double result;
30916   VALUE vresult = Qnil;
30917 
30918   if ((argc < 0) || (argc > 0)) {
30919     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
30920   }
30921   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__DPHWeight, 0 |  0 );
30922   if (!SWIG_IsOK(res1)) {
30923     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::DPHWeight const *","get_maxextra", 1, self ));
30924   }
30925   arg1 = reinterpret_cast< Xapian::DPHWeight * >(argp1);
30926   {
30927     try {
30928       result = (double)((Xapian::DPHWeight const *)arg1)->get_maxextra();
30929     } catch (...) {
30930       string msg;
30931       int code = XapianExceptionHandler(msg);
30932       SWIG_exception(code, msg.c_str());
30933     }
30934   }
30935   vresult = SWIG_From_double(static_cast< double >(result));
30936   return vresult;
30937 fail:
30938   return Qnil;
30939 }
30940 
30941 
30942 SWIGINTERN void
free_Xapian_DPHWeight(void * self)30943 free_Xapian_DPHWeight(void *self) {
30944     Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *)self;
30945     delete arg1;
30946 }
30947 
30948 static swig_class SwigClassLMWeight;
30949 
30950 SWIGINTERN VALUE
_wrap_new_LMWeight__SWIG_0(int argc,VALUE * argv,VALUE self)30951 _wrap_new_LMWeight__SWIG_0(int argc, VALUE *argv, VALUE self) {
30952   double arg1 ;
30953   Xapian::Weight::type_smoothing arg2 ;
30954   double arg3 ;
30955   double arg4 ;
30956   double val1 ;
30957   int ecode1 = 0 ;
30958   int val2 ;
30959   int ecode2 = 0 ;
30960   double val3 ;
30961   int ecode3 = 0 ;
30962   double val4 ;
30963   int ecode4 = 0 ;
30964   const char *classname SWIGUNUSED = "Xapian::LMWeight";
30965   Xapian::LMWeight *result = 0 ;
30966 
30967   if ((argc < 4) || (argc > 4)) {
30968     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
30969   }
30970   ecode1 = SWIG_AsVal_double(argv[0], &val1);
30971   if (!SWIG_IsOK(ecode1)) {
30972     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","LMWeight", 1, argv[0] ));
30973   }
30974   arg1 = static_cast< double >(val1);
30975   ecode2 = SWIG_AsVal_int(argv[1], &val2);
30976   if (!SWIG_IsOK(ecode2)) {
30977     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::Weight::type_smoothing","LMWeight", 2, argv[1] ));
30978   }
30979   arg2 = static_cast< Xapian::Weight::type_smoothing >(val2);
30980   ecode3 = SWIG_AsVal_double(argv[2], &val3);
30981   if (!SWIG_IsOK(ecode3)) {
30982     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","LMWeight", 3, argv[2] ));
30983   }
30984   arg3 = static_cast< double >(val3);
30985   ecode4 = SWIG_AsVal_double(argv[3], &val4);
30986   if (!SWIG_IsOK(ecode4)) {
30987     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","LMWeight", 4, argv[3] ));
30988   }
30989   arg4 = static_cast< double >(val4);
30990   {
30991     try {
30992       result = (Xapian::LMWeight *)new Xapian::LMWeight(arg1,arg2,arg3,arg4);
30993       DATA_PTR(self) = result;
30994     } catch (...) {
30995       string msg;
30996       int code = XapianExceptionHandler(msg);
30997       SWIG_exception(code, msg.c_str());
30998     }
30999   }
31000   return self;
31001 fail:
31002   return Qnil;
31003 }
31004 
31005 
31006 SWIGINTERN VALUE
_wrap_new_LMWeight__SWIG_1(int argc,VALUE * argv,VALUE self)31007 _wrap_new_LMWeight__SWIG_1(int argc, VALUE *argv, VALUE self) {
31008   double arg1 ;
31009   Xapian::Weight::type_smoothing arg2 ;
31010   double arg3 ;
31011   double val1 ;
31012   int ecode1 = 0 ;
31013   int val2 ;
31014   int ecode2 = 0 ;
31015   double val3 ;
31016   int ecode3 = 0 ;
31017   const char *classname SWIGUNUSED = "Xapian::LMWeight";
31018   Xapian::LMWeight *result = 0 ;
31019 
31020   if ((argc < 3) || (argc > 3)) {
31021     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
31022   }
31023   ecode1 = SWIG_AsVal_double(argv[0], &val1);
31024   if (!SWIG_IsOK(ecode1)) {
31025     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","LMWeight", 1, argv[0] ));
31026   }
31027   arg1 = static_cast< double >(val1);
31028   ecode2 = SWIG_AsVal_int(argv[1], &val2);
31029   if (!SWIG_IsOK(ecode2)) {
31030     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::Weight::type_smoothing","LMWeight", 2, argv[1] ));
31031   }
31032   arg2 = static_cast< Xapian::Weight::type_smoothing >(val2);
31033   ecode3 = SWIG_AsVal_double(argv[2], &val3);
31034   if (!SWIG_IsOK(ecode3)) {
31035     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","LMWeight", 3, argv[2] ));
31036   }
31037   arg3 = static_cast< double >(val3);
31038   {
31039     try {
31040       result = (Xapian::LMWeight *)new Xapian::LMWeight(arg1,arg2,arg3);
31041       DATA_PTR(self) = result;
31042     } catch (...) {
31043       string msg;
31044       int code = XapianExceptionHandler(msg);
31045       SWIG_exception(code, msg.c_str());
31046     }
31047   }
31048   return self;
31049 fail:
31050   return Qnil;
31051 }
31052 
31053 
31054 SWIGINTERN VALUE
_wrap_new_LMWeight__SWIG_2(int argc,VALUE * argv,VALUE self)31055 _wrap_new_LMWeight__SWIG_2(int argc, VALUE *argv, VALUE self) {
31056   double arg1 ;
31057   Xapian::Weight::type_smoothing arg2 ;
31058   double val1 ;
31059   int ecode1 = 0 ;
31060   int val2 ;
31061   int ecode2 = 0 ;
31062   const char *classname SWIGUNUSED = "Xapian::LMWeight";
31063   Xapian::LMWeight *result = 0 ;
31064 
31065   if ((argc < 2) || (argc > 2)) {
31066     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
31067   }
31068   ecode1 = SWIG_AsVal_double(argv[0], &val1);
31069   if (!SWIG_IsOK(ecode1)) {
31070     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","LMWeight", 1, argv[0] ));
31071   }
31072   arg1 = static_cast< double >(val1);
31073   ecode2 = SWIG_AsVal_int(argv[1], &val2);
31074   if (!SWIG_IsOK(ecode2)) {
31075     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::Weight::type_smoothing","LMWeight", 2, argv[1] ));
31076   }
31077   arg2 = static_cast< Xapian::Weight::type_smoothing >(val2);
31078   {
31079     try {
31080       result = (Xapian::LMWeight *)new Xapian::LMWeight(arg1,arg2);
31081       DATA_PTR(self) = result;
31082     } catch (...) {
31083       string msg;
31084       int code = XapianExceptionHandler(msg);
31085       SWIG_exception(code, msg.c_str());
31086     }
31087   }
31088   return self;
31089 fail:
31090   return Qnil;
31091 }
31092 
31093 
31094 SWIGINTERN VALUE
_wrap_new_LMWeight__SWIG_3(int argc,VALUE * argv,VALUE self)31095 _wrap_new_LMWeight__SWIG_3(int argc, VALUE *argv, VALUE self) {
31096   double arg1 ;
31097   double val1 ;
31098   int ecode1 = 0 ;
31099   const char *classname SWIGUNUSED = "Xapian::LMWeight";
31100   Xapian::LMWeight *result = 0 ;
31101 
31102   if ((argc < 1) || (argc > 1)) {
31103     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
31104   }
31105   ecode1 = SWIG_AsVal_double(argv[0], &val1);
31106   if (!SWIG_IsOK(ecode1)) {
31107     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","LMWeight", 1, argv[0] ));
31108   }
31109   arg1 = static_cast< double >(val1);
31110   {
31111     try {
31112       result = (Xapian::LMWeight *)new Xapian::LMWeight(arg1);
31113       DATA_PTR(self) = result;
31114     } catch (...) {
31115       string msg;
31116       int code = XapianExceptionHandler(msg);
31117       SWIG_exception(code, msg.c_str());
31118     }
31119   }
31120   return self;
31121 fail:
31122   return Qnil;
31123 }
31124 
31125 
31126 SWIGINTERN VALUE
31127 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_LMWeight_allocate(VALUE self)31128 _wrap_LMWeight_allocate(VALUE self)
31129 #else
31130 _wrap_LMWeight_allocate(int argc, VALUE *argv, VALUE self)
31131 #endif
31132 {
31133   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__LMWeight);
31134 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
31135   rb_obj_call_init(vresult, argc, argv);
31136 #endif
31137   return vresult;
31138 }
31139 
31140 
31141 SWIGINTERN VALUE
_wrap_new_LMWeight__SWIG_4(int argc,VALUE * argv,VALUE self)31142 _wrap_new_LMWeight__SWIG_4(int argc, VALUE *argv, VALUE self) {
31143   const char *classname SWIGUNUSED = "Xapian::LMWeight";
31144   Xapian::LMWeight *result = 0 ;
31145 
31146   if ((argc < 0) || (argc > 0)) {
31147     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
31148   }
31149   {
31150     try {
31151       result = (Xapian::LMWeight *)new Xapian::LMWeight();
31152       DATA_PTR(self) = result;
31153     } catch (...) {
31154       string msg;
31155       int code = XapianExceptionHandler(msg);
31156       SWIG_exception(code, msg.c_str());
31157     }
31158   }
31159   return self;
31160 fail:
31161   return Qnil;
31162 }
31163 
31164 
_wrap_new_LMWeight(int nargs,VALUE * args,VALUE self)31165 SWIGINTERN VALUE _wrap_new_LMWeight(int nargs, VALUE *args, VALUE self) {
31166   int argc;
31167   VALUE argv[4];
31168   int ii;
31169 
31170   argc = nargs;
31171   if (argc > 4) SWIG_fail;
31172   for (ii = 0; (ii < argc); ++ii) {
31173     argv[ii] = args[ii];
31174   }
31175   if (argc == 0) {
31176     return _wrap_new_LMWeight__SWIG_4(nargs, args, self);
31177   }
31178   if (argc == 1) {
31179     int _v;
31180     {
31181       int res = SWIG_AsVal_double(argv[0], NULL);
31182       _v = SWIG_CheckState(res);
31183     }
31184     if (_v) {
31185       return _wrap_new_LMWeight__SWIG_3(nargs, args, self);
31186     }
31187   }
31188   if (argc == 2) {
31189     int _v;
31190     {
31191       int res = SWIG_AsVal_double(argv[0], NULL);
31192       _v = SWIG_CheckState(res);
31193     }
31194     if (_v) {
31195       {
31196         int res = SWIG_AsVal_int(argv[1], NULL);
31197         _v = SWIG_CheckState(res);
31198       }
31199       if (_v) {
31200         return _wrap_new_LMWeight__SWIG_2(nargs, args, self);
31201       }
31202     }
31203   }
31204   if (argc == 3) {
31205     int _v;
31206     {
31207       int res = SWIG_AsVal_double(argv[0], NULL);
31208       _v = SWIG_CheckState(res);
31209     }
31210     if (_v) {
31211       {
31212         int res = SWIG_AsVal_int(argv[1], NULL);
31213         _v = SWIG_CheckState(res);
31214       }
31215       if (_v) {
31216         {
31217           int res = SWIG_AsVal_double(argv[2], NULL);
31218           _v = SWIG_CheckState(res);
31219         }
31220         if (_v) {
31221           return _wrap_new_LMWeight__SWIG_1(nargs, args, self);
31222         }
31223       }
31224     }
31225   }
31226   if (argc == 4) {
31227     int _v;
31228     {
31229       int res = SWIG_AsVal_double(argv[0], NULL);
31230       _v = SWIG_CheckState(res);
31231     }
31232     if (_v) {
31233       {
31234         int res = SWIG_AsVal_int(argv[1], NULL);
31235         _v = SWIG_CheckState(res);
31236       }
31237       if (_v) {
31238         {
31239           int res = SWIG_AsVal_double(argv[2], NULL);
31240           _v = SWIG_CheckState(res);
31241         }
31242         if (_v) {
31243           {
31244             int res = SWIG_AsVal_double(argv[3], NULL);
31245             _v = SWIG_CheckState(res);
31246           }
31247           if (_v) {
31248             return _wrap_new_LMWeight__SWIG_0(nargs, args, self);
31249           }
31250         }
31251       }
31252     }
31253   }
31254 
31255 fail:
31256   Ruby_Format_OverloadedError( argc, 4, "LMWeight.new",
31257     "    LMWeight.new(double param_log_, Xapian::Weight::type_smoothing select_smoothing_, double param_smoothing1_, double param_smoothing2_)\n"
31258     "    LMWeight.new(double param_log_, Xapian::Weight::type_smoothing select_smoothing_, double param_smoothing1_)\n"
31259     "    LMWeight.new(double param_log_, Xapian::Weight::type_smoothing select_smoothing_)\n"
31260     "    LMWeight.new(double param_log_)\n"
31261     "    LMWeight.new()\n");
31262 
31263   return Qnil;
31264 }
31265 
31266 
31267 SWIGINTERN VALUE
_wrap_LMWeight_name(int argc,VALUE * argv,VALUE self)31268 _wrap_LMWeight_name(int argc, VALUE *argv, VALUE self) {
31269   Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
31270   void *argp1 = 0 ;
31271   int res1 = 0 ;
31272   std::string result;
31273   VALUE vresult = Qnil;
31274 
31275   if ((argc < 0) || (argc > 0)) {
31276     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
31277   }
31278   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LMWeight, 0 |  0 );
31279   if (!SWIG_IsOK(res1)) {
31280     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LMWeight const *","name", 1, self ));
31281   }
31282   arg1 = reinterpret_cast< Xapian::LMWeight * >(argp1);
31283   {
31284     try {
31285       result = ((Xapian::LMWeight const *)arg1)->name();
31286     } catch (...) {
31287       string msg;
31288       int code = XapianExceptionHandler(msg);
31289       SWIG_exception(code, msg.c_str());
31290     }
31291   }
31292   vresult = SWIG_From_std_string(static_cast< std::string >(result));
31293   return vresult;
31294 fail:
31295   return Qnil;
31296 }
31297 
31298 
31299 SWIGINTERN VALUE
_wrap_LMWeight_sumpart(int argc,VALUE * argv,VALUE self)31300 _wrap_LMWeight_sumpart(int argc, VALUE *argv, VALUE self) {
31301   Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
31302   Xapian::termcount arg2 ;
31303   Xapian::termcount arg3 ;
31304   Xapian::termcount arg4 ;
31305   void *argp1 = 0 ;
31306   int res1 = 0 ;
31307   unsigned int val2 ;
31308   int ecode2 = 0 ;
31309   unsigned int val3 ;
31310   int ecode3 = 0 ;
31311   unsigned int val4 ;
31312   int ecode4 = 0 ;
31313   double result;
31314   VALUE vresult = Qnil;
31315 
31316   if ((argc < 3) || (argc > 3)) {
31317     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
31318   }
31319   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LMWeight, 0 |  0 );
31320   if (!SWIG_IsOK(res1)) {
31321     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LMWeight const *","get_sumpart", 1, self ));
31322   }
31323   arg1 = reinterpret_cast< Xapian::LMWeight * >(argp1);
31324   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
31325   if (!SWIG_IsOK(ecode2)) {
31326     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 2, argv[0] ));
31327   }
31328   arg2 = static_cast< Xapian::termcount >(val2);
31329   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
31330   if (!SWIG_IsOK(ecode3)) {
31331     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 3, argv[1] ));
31332   }
31333   arg3 = static_cast< Xapian::termcount >(val3);
31334   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
31335   if (!SWIG_IsOK(ecode4)) {
31336     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 4, argv[2] ));
31337   }
31338   arg4 = static_cast< Xapian::termcount >(val4);
31339   {
31340     try {
31341       result = (double)((Xapian::LMWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
31342     } catch (...) {
31343       string msg;
31344       int code = XapianExceptionHandler(msg);
31345       SWIG_exception(code, msg.c_str());
31346     }
31347   }
31348   vresult = SWIG_From_double(static_cast< double >(result));
31349   return vresult;
31350 fail:
31351   return Qnil;
31352 }
31353 
31354 
31355 SWIGINTERN VALUE
_wrap_LMWeight_maxpart(int argc,VALUE * argv,VALUE self)31356 _wrap_LMWeight_maxpart(int argc, VALUE *argv, VALUE self) {
31357   Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
31358   void *argp1 = 0 ;
31359   int res1 = 0 ;
31360   double result;
31361   VALUE vresult = Qnil;
31362 
31363   if ((argc < 0) || (argc > 0)) {
31364     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
31365   }
31366   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LMWeight, 0 |  0 );
31367   if (!SWIG_IsOK(res1)) {
31368     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LMWeight const *","get_maxpart", 1, self ));
31369   }
31370   arg1 = reinterpret_cast< Xapian::LMWeight * >(argp1);
31371   {
31372     try {
31373       result = (double)((Xapian::LMWeight const *)arg1)->get_maxpart();
31374     } catch (...) {
31375       string msg;
31376       int code = XapianExceptionHandler(msg);
31377       SWIG_exception(code, msg.c_str());
31378     }
31379   }
31380   vresult = SWIG_From_double(static_cast< double >(result));
31381   return vresult;
31382 fail:
31383   return Qnil;
31384 }
31385 
31386 
31387 SWIGINTERN VALUE
_wrap_LMWeight_sumextra(int argc,VALUE * argv,VALUE self)31388 _wrap_LMWeight_sumextra(int argc, VALUE *argv, VALUE self) {
31389   Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
31390   Xapian::termcount arg2 ;
31391   Xapian::termcount arg3 ;
31392   void *argp1 = 0 ;
31393   int res1 = 0 ;
31394   unsigned int val2 ;
31395   int ecode2 = 0 ;
31396   unsigned int val3 ;
31397   int ecode3 = 0 ;
31398   double result;
31399   VALUE vresult = Qnil;
31400 
31401   if ((argc < 2) || (argc > 2)) {
31402     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
31403   }
31404   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LMWeight, 0 |  0 );
31405   if (!SWIG_IsOK(res1)) {
31406     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LMWeight const *","get_sumextra", 1, self ));
31407   }
31408   arg1 = reinterpret_cast< Xapian::LMWeight * >(argp1);
31409   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
31410   if (!SWIG_IsOK(ecode2)) {
31411     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 2, argv[0] ));
31412   }
31413   arg2 = static_cast< Xapian::termcount >(val2);
31414   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
31415   if (!SWIG_IsOK(ecode3)) {
31416     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 3, argv[1] ));
31417   }
31418   arg3 = static_cast< Xapian::termcount >(val3);
31419   {
31420     try {
31421       result = (double)((Xapian::LMWeight const *)arg1)->get_sumextra(arg2,arg3);
31422     } catch (...) {
31423       string msg;
31424       int code = XapianExceptionHandler(msg);
31425       SWIG_exception(code, msg.c_str());
31426     }
31427   }
31428   vresult = SWIG_From_double(static_cast< double >(result));
31429   return vresult;
31430 fail:
31431   return Qnil;
31432 }
31433 
31434 
31435 SWIGINTERN VALUE
_wrap_LMWeight_maxextra(int argc,VALUE * argv,VALUE self)31436 _wrap_LMWeight_maxextra(int argc, VALUE *argv, VALUE self) {
31437   Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
31438   void *argp1 = 0 ;
31439   int res1 = 0 ;
31440   double result;
31441   VALUE vresult = Qnil;
31442 
31443   if ((argc < 0) || (argc > 0)) {
31444     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
31445   }
31446   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LMWeight, 0 |  0 );
31447   if (!SWIG_IsOK(res1)) {
31448     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LMWeight const *","get_maxextra", 1, self ));
31449   }
31450   arg1 = reinterpret_cast< Xapian::LMWeight * >(argp1);
31451   {
31452     try {
31453       result = (double)((Xapian::LMWeight const *)arg1)->get_maxextra();
31454     } catch (...) {
31455       string msg;
31456       int code = XapianExceptionHandler(msg);
31457       SWIG_exception(code, msg.c_str());
31458     }
31459   }
31460   vresult = SWIG_From_double(static_cast< double >(result));
31461   return vresult;
31462 fail:
31463   return Qnil;
31464 }
31465 
31466 
31467 SWIGINTERN void
free_Xapian_LMWeight(void * self)31468 free_Xapian_LMWeight(void *self) {
31469     Xapian::LMWeight *arg1 = (Xapian::LMWeight *)self;
31470     delete arg1;
31471 }
31472 
31473 static swig_class SwigClassCoordWeight;
31474 
31475 SWIGINTERN VALUE
_wrap_CoordWeight_init(int argc,VALUE * argv,VALUE self)31476 _wrap_CoordWeight_init(int argc, VALUE *argv, VALUE self) {
31477   Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
31478   double arg2 ;
31479   void *argp1 = 0 ;
31480   int res1 = 0 ;
31481   double val2 ;
31482   int ecode2 = 0 ;
31483 
31484   if ((argc < 1) || (argc > 1)) {
31485     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
31486   }
31487   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__CoordWeight, 0 |  0 );
31488   if (!SWIG_IsOK(res1)) {
31489     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::CoordWeight *","init", 1, self ));
31490   }
31491   arg1 = reinterpret_cast< Xapian::CoordWeight * >(argp1);
31492   ecode2 = SWIG_AsVal_double(argv[0], &val2);
31493   if (!SWIG_IsOK(ecode2)) {
31494     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","init", 2, argv[0] ));
31495   }
31496   arg2 = static_cast< double >(val2);
31497   {
31498     try {
31499       (arg1)->init(arg2);
31500     } catch (...) {
31501       string msg;
31502       int code = XapianExceptionHandler(msg);
31503       SWIG_exception(code, msg.c_str());
31504     }
31505   }
31506   return Qnil;
31507 fail:
31508   return Qnil;
31509 }
31510 
31511 
31512 SWIGINTERN VALUE
31513 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_CoordWeight_allocate(VALUE self)31514 _wrap_CoordWeight_allocate(VALUE self)
31515 #else
31516 _wrap_CoordWeight_allocate(int argc, VALUE *argv, VALUE self)
31517 #endif
31518 {
31519   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__CoordWeight);
31520 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
31521   rb_obj_call_init(vresult, argc, argv);
31522 #endif
31523   return vresult;
31524 }
31525 
31526 
31527 SWIGINTERN VALUE
_wrap_new_CoordWeight(int argc,VALUE * argv,VALUE self)31528 _wrap_new_CoordWeight(int argc, VALUE *argv, VALUE self) {
31529   const char *classname SWIGUNUSED = "Xapian::CoordWeight";
31530   Xapian::CoordWeight *result = 0 ;
31531 
31532   if ((argc < 0) || (argc > 0)) {
31533     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
31534   }
31535   {
31536     try {
31537       result = (Xapian::CoordWeight *)new Xapian::CoordWeight();
31538       DATA_PTR(self) = result;
31539     } catch (...) {
31540       string msg;
31541       int code = XapianExceptionHandler(msg);
31542       SWIG_exception(code, msg.c_str());
31543     }
31544   }
31545   return self;
31546 fail:
31547   return Qnil;
31548 }
31549 
31550 
31551 SWIGINTERN VALUE
_wrap_CoordWeight_name(int argc,VALUE * argv,VALUE self)31552 _wrap_CoordWeight_name(int argc, VALUE *argv, VALUE self) {
31553   Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
31554   void *argp1 = 0 ;
31555   int res1 = 0 ;
31556   std::string result;
31557   VALUE vresult = Qnil;
31558 
31559   if ((argc < 0) || (argc > 0)) {
31560     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
31561   }
31562   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__CoordWeight, 0 |  0 );
31563   if (!SWIG_IsOK(res1)) {
31564     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::CoordWeight const *","name", 1, self ));
31565   }
31566   arg1 = reinterpret_cast< Xapian::CoordWeight * >(argp1);
31567   {
31568     try {
31569       result = ((Xapian::CoordWeight const *)arg1)->name();
31570     } catch (...) {
31571       string msg;
31572       int code = XapianExceptionHandler(msg);
31573       SWIG_exception(code, msg.c_str());
31574     }
31575   }
31576   vresult = SWIG_From_std_string(static_cast< std::string >(result));
31577   return vresult;
31578 fail:
31579   return Qnil;
31580 }
31581 
31582 
31583 SWIGINTERN VALUE
_wrap_CoordWeight_sumpart(int argc,VALUE * argv,VALUE self)31584 _wrap_CoordWeight_sumpart(int argc, VALUE *argv, VALUE self) {
31585   Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
31586   Xapian::termcount arg2 ;
31587   Xapian::termcount arg3 ;
31588   Xapian::termcount arg4 ;
31589   void *argp1 = 0 ;
31590   int res1 = 0 ;
31591   unsigned int val2 ;
31592   int ecode2 = 0 ;
31593   unsigned int val3 ;
31594   int ecode3 = 0 ;
31595   unsigned int val4 ;
31596   int ecode4 = 0 ;
31597   double result;
31598   VALUE vresult = Qnil;
31599 
31600   if ((argc < 3) || (argc > 3)) {
31601     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
31602   }
31603   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__CoordWeight, 0 |  0 );
31604   if (!SWIG_IsOK(res1)) {
31605     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::CoordWeight const *","get_sumpart", 1, self ));
31606   }
31607   arg1 = reinterpret_cast< Xapian::CoordWeight * >(argp1);
31608   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
31609   if (!SWIG_IsOK(ecode2)) {
31610     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 2, argv[0] ));
31611   }
31612   arg2 = static_cast< Xapian::termcount >(val2);
31613   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
31614   if (!SWIG_IsOK(ecode3)) {
31615     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 3, argv[1] ));
31616   }
31617   arg3 = static_cast< Xapian::termcount >(val3);
31618   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
31619   if (!SWIG_IsOK(ecode4)) {
31620     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumpart", 4, argv[2] ));
31621   }
31622   arg4 = static_cast< Xapian::termcount >(val4);
31623   {
31624     try {
31625       result = (double)((Xapian::CoordWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
31626     } catch (...) {
31627       string msg;
31628       int code = XapianExceptionHandler(msg);
31629       SWIG_exception(code, msg.c_str());
31630     }
31631   }
31632   vresult = SWIG_From_double(static_cast< double >(result));
31633   return vresult;
31634 fail:
31635   return Qnil;
31636 }
31637 
31638 
31639 SWIGINTERN VALUE
_wrap_CoordWeight_maxpart(int argc,VALUE * argv,VALUE self)31640 _wrap_CoordWeight_maxpart(int argc, VALUE *argv, VALUE self) {
31641   Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
31642   void *argp1 = 0 ;
31643   int res1 = 0 ;
31644   double result;
31645   VALUE vresult = Qnil;
31646 
31647   if ((argc < 0) || (argc > 0)) {
31648     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
31649   }
31650   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__CoordWeight, 0 |  0 );
31651   if (!SWIG_IsOK(res1)) {
31652     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::CoordWeight const *","get_maxpart", 1, self ));
31653   }
31654   arg1 = reinterpret_cast< Xapian::CoordWeight * >(argp1);
31655   {
31656     try {
31657       result = (double)((Xapian::CoordWeight const *)arg1)->get_maxpart();
31658     } catch (...) {
31659       string msg;
31660       int code = XapianExceptionHandler(msg);
31661       SWIG_exception(code, msg.c_str());
31662     }
31663   }
31664   vresult = SWIG_From_double(static_cast< double >(result));
31665   return vresult;
31666 fail:
31667   return Qnil;
31668 }
31669 
31670 
31671 SWIGINTERN VALUE
_wrap_CoordWeight_sumextra(int argc,VALUE * argv,VALUE self)31672 _wrap_CoordWeight_sumextra(int argc, VALUE *argv, VALUE self) {
31673   Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
31674   Xapian::termcount arg2 ;
31675   Xapian::termcount arg3 ;
31676   void *argp1 = 0 ;
31677   int res1 = 0 ;
31678   unsigned int val2 ;
31679   int ecode2 = 0 ;
31680   unsigned int val3 ;
31681   int ecode3 = 0 ;
31682   double result;
31683   VALUE vresult = Qnil;
31684 
31685   if ((argc < 2) || (argc > 2)) {
31686     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
31687   }
31688   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__CoordWeight, 0 |  0 );
31689   if (!SWIG_IsOK(res1)) {
31690     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::CoordWeight const *","get_sumextra", 1, self ));
31691   }
31692   arg1 = reinterpret_cast< Xapian::CoordWeight * >(argp1);
31693   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
31694   if (!SWIG_IsOK(ecode2)) {
31695     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 2, argv[0] ));
31696   }
31697   arg2 = static_cast< Xapian::termcount >(val2);
31698   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
31699   if (!SWIG_IsOK(ecode3)) {
31700     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","get_sumextra", 3, argv[1] ));
31701   }
31702   arg3 = static_cast< Xapian::termcount >(val3);
31703   {
31704     try {
31705       result = (double)((Xapian::CoordWeight const *)arg1)->get_sumextra(arg2,arg3);
31706     } catch (...) {
31707       string msg;
31708       int code = XapianExceptionHandler(msg);
31709       SWIG_exception(code, msg.c_str());
31710     }
31711   }
31712   vresult = SWIG_From_double(static_cast< double >(result));
31713   return vresult;
31714 fail:
31715   return Qnil;
31716 }
31717 
31718 
31719 SWIGINTERN VALUE
_wrap_CoordWeight_maxextra(int argc,VALUE * argv,VALUE self)31720 _wrap_CoordWeight_maxextra(int argc, VALUE *argv, VALUE self) {
31721   Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
31722   void *argp1 = 0 ;
31723   int res1 = 0 ;
31724   double result;
31725   VALUE vresult = Qnil;
31726 
31727   if ((argc < 0) || (argc > 0)) {
31728     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
31729   }
31730   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__CoordWeight, 0 |  0 );
31731   if (!SWIG_IsOK(res1)) {
31732     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::CoordWeight const *","get_maxextra", 1, self ));
31733   }
31734   arg1 = reinterpret_cast< Xapian::CoordWeight * >(argp1);
31735   {
31736     try {
31737       result = (double)((Xapian::CoordWeight const *)arg1)->get_maxextra();
31738     } catch (...) {
31739       string msg;
31740       int code = XapianExceptionHandler(msg);
31741       SWIG_exception(code, msg.c_str());
31742     }
31743   }
31744   vresult = SWIG_From_double(static_cast< double >(result));
31745   return vresult;
31746 fail:
31747   return Qnil;
31748 }
31749 
31750 
31751 SWIGINTERN void
free_Xapian_CoordWeight(void * self)31752 free_Xapian_CoordWeight(void *self) {
31753     Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *)self;
31754     delete arg1;
31755 }
31756 
31757 static swig_class SwigClassCompactor;
31758 
31759 SWIGINTERN VALUE
31760 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_Compactor_allocate(VALUE self)31761 _wrap_Compactor_allocate(VALUE self)
31762 #else
31763 _wrap_Compactor_allocate(int argc, VALUE *argv, VALUE self)
31764 #endif
31765 {
31766   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__Compactor);
31767 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
31768   rb_obj_call_init(vresult, argc, argv);
31769 #endif
31770   return vresult;
31771 }
31772 
31773 
31774 SWIGINTERN VALUE
_wrap_new_Compactor(int argc,VALUE * argv,VALUE self)31775 _wrap_new_Compactor(int argc, VALUE *argv, VALUE self) {
31776   VALUE arg1 = (VALUE) 0 ;
31777   const char *classname SWIGUNUSED = "Xapian::Compactor";
31778   Xapian::Compactor *result = 0 ;
31779 
31780   if ((argc < 0) || (argc > 0)) {
31781     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
31782   }
31783   arg1 = self;
31784   {
31785     try {
31786       if ( strcmp(rb_obj_classname(self), classname) != 0 ) {
31787         /* subclassed */
31788         result = (Xapian::Compactor *)new SwigDirector_Compactor(arg1);
31789       } else {
31790         result = (Xapian::Compactor *)new Xapian::Compactor();
31791       }
31792 
31793       DATA_PTR(self) = result;
31794     } catch (...) {
31795       string msg;
31796       int code = XapianExceptionHandler(msg);
31797       SWIG_exception(code, msg.c_str());
31798     }
31799   }
31800   return self;
31801 fail:
31802   return Qnil;
31803 }
31804 
31805 
31806 SWIGINTERN void
free_Xapian_Compactor(void * self)31807 free_Xapian_Compactor(void *self) {
31808     Xapian::Compactor *arg1 = (Xapian::Compactor *)self;
31809     delete arg1;
31810 }
31811 
31812 SWIGINTERN VALUE
_wrap_Compactor_set_block_size(int argc,VALUE * argv,VALUE self)31813 _wrap_Compactor_set_block_size(int argc, VALUE *argv, VALUE self) {
31814   Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
31815   size_t arg2 ;
31816   void *argp1 = 0 ;
31817   int res1 = 0 ;
31818   size_t val2 ;
31819   int ecode2 = 0 ;
31820 
31821   if ((argc < 1) || (argc > 1)) {
31822     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
31823   }
31824   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
31825   if (!SWIG_IsOK(res1)) {
31826     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Compactor *","set_block_size", 1, self ));
31827   }
31828   arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
31829   ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
31830   if (!SWIG_IsOK(ecode2)) {
31831     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","set_block_size", 2, argv[0] ));
31832   }
31833   arg2 = static_cast< size_t >(val2);
31834   {
31835     try {
31836       (arg1)->set_block_size(arg2);
31837     } catch (...) {
31838       string msg;
31839       int code = XapianExceptionHandler(msg);
31840       SWIG_exception(code, msg.c_str());
31841     }
31842   }
31843   return Qnil;
31844 fail:
31845   return Qnil;
31846 }
31847 
31848 
31849 SWIGINTERN VALUE
_wrap_Compactor_set_renumber(int argc,VALUE * argv,VALUE self)31850 _wrap_Compactor_set_renumber(int argc, VALUE *argv, VALUE self) {
31851   Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
31852   bool arg2 ;
31853   void *argp1 = 0 ;
31854   int res1 = 0 ;
31855   bool val2 ;
31856   int ecode2 = 0 ;
31857 
31858   if ((argc < 1) || (argc > 1)) {
31859     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
31860   }
31861   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
31862   if (!SWIG_IsOK(res1)) {
31863     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Compactor *","set_renumber", 1, self ));
31864   }
31865   arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
31866   ecode2 = SWIG_AsVal_bool(argv[0], &val2);
31867   if (!SWIG_IsOK(ecode2)) {
31868     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","set_renumber", 2, argv[0] ));
31869   }
31870   arg2 = static_cast< bool >(val2);
31871   {
31872     try {
31873       (arg1)->set_renumber(arg2);
31874     } catch (...) {
31875       string msg;
31876       int code = XapianExceptionHandler(msg);
31877       SWIG_exception(code, msg.c_str());
31878     }
31879   }
31880   return Qnil;
31881 fail:
31882   return Qnil;
31883 }
31884 
31885 
31886 SWIGINTERN VALUE
_wrap_Compactor_set_multipass(int argc,VALUE * argv,VALUE self)31887 _wrap_Compactor_set_multipass(int argc, VALUE *argv, VALUE self) {
31888   Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
31889   bool arg2 ;
31890   void *argp1 = 0 ;
31891   int res1 = 0 ;
31892   bool val2 ;
31893   int ecode2 = 0 ;
31894 
31895   if ((argc < 1) || (argc > 1)) {
31896     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
31897   }
31898   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
31899   if (!SWIG_IsOK(res1)) {
31900     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Compactor *","set_multipass", 1, self ));
31901   }
31902   arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
31903   ecode2 = SWIG_AsVal_bool(argv[0], &val2);
31904   if (!SWIG_IsOK(ecode2)) {
31905     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","set_multipass", 2, argv[0] ));
31906   }
31907   arg2 = static_cast< bool >(val2);
31908   {
31909     try {
31910       (arg1)->set_multipass(arg2);
31911     } catch (...) {
31912       string msg;
31913       int code = XapianExceptionHandler(msg);
31914       SWIG_exception(code, msg.c_str());
31915     }
31916   }
31917   return Qnil;
31918 fail:
31919   return Qnil;
31920 }
31921 
31922 
31923 SWIGINTERN VALUE
_wrap_Compactor_set_compaction_level(int argc,VALUE * argv,VALUE self)31924 _wrap_Compactor_set_compaction_level(int argc, VALUE *argv, VALUE self) {
31925   Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
31926   Xapian::Compactor::compaction_level arg2 ;
31927   void *argp1 = 0 ;
31928   int res1 = 0 ;
31929   int val2 ;
31930   int ecode2 = 0 ;
31931 
31932   if ((argc < 1) || (argc > 1)) {
31933     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
31934   }
31935   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
31936   if (!SWIG_IsOK(res1)) {
31937     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Compactor *","set_compaction_level", 1, self ));
31938   }
31939   arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
31940   ecode2 = SWIG_AsVal_int(argv[0], &val2);
31941   if (!SWIG_IsOK(ecode2)) {
31942     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::Compactor::compaction_level","set_compaction_level", 2, argv[0] ));
31943   }
31944   arg2 = static_cast< Xapian::Compactor::compaction_level >(val2);
31945   {
31946     try {
31947       (arg1)->set_compaction_level(arg2);
31948     } catch (...) {
31949       string msg;
31950       int code = XapianExceptionHandler(msg);
31951       SWIG_exception(code, msg.c_str());
31952     }
31953   }
31954   return Qnil;
31955 fail:
31956   return Qnil;
31957 }
31958 
31959 
31960 SWIGINTERN VALUE
_wrap_Compactor_set_destdir(int argc,VALUE * argv,VALUE self)31961 _wrap_Compactor_set_destdir(int argc, VALUE *argv, VALUE self) {
31962   Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
31963   std::string *arg2 = 0 ;
31964   void *argp1 = 0 ;
31965   int res1 = 0 ;
31966   int res2 = SWIG_OLDOBJ ;
31967 
31968   if ((argc < 1) || (argc > 1)) {
31969     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
31970   }
31971   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
31972   if (!SWIG_IsOK(res1)) {
31973     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Compactor *","set_destdir", 1, self ));
31974   }
31975   arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
31976   {
31977     std::string *ptr = (std::string *)0;
31978     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
31979     if (!SWIG_IsOK(res2)) {
31980       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","set_destdir", 2, argv[0] ));
31981     }
31982     if (!ptr) {
31983       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","set_destdir", 2, argv[0]));
31984     }
31985     arg2 = ptr;
31986   }
31987   {
31988     try {
31989       (arg1)->set_destdir((std::string const &)*arg2);
31990     } catch (...) {
31991       string msg;
31992       int code = XapianExceptionHandler(msg);
31993       SWIG_exception(code, msg.c_str());
31994     }
31995   }
31996   if (SWIG_IsNewObj(res2)) delete arg2;
31997   return Qnil;
31998 fail:
31999   if (SWIG_IsNewObj(res2)) delete arg2;
32000   return Qnil;
32001 }
32002 
32003 
32004 SWIGINTERN VALUE
_wrap_Compactor_add_source(int argc,VALUE * argv,VALUE self)32005 _wrap_Compactor_add_source(int argc, VALUE *argv, VALUE self) {
32006   Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
32007   std::string *arg2 = 0 ;
32008   void *argp1 = 0 ;
32009   int res1 = 0 ;
32010   int res2 = SWIG_OLDOBJ ;
32011 
32012   if ((argc < 1) || (argc > 1)) {
32013     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
32014   }
32015   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
32016   if (!SWIG_IsOK(res1)) {
32017     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Compactor *","add_source", 1, self ));
32018   }
32019   arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
32020   {
32021     std::string *ptr = (std::string *)0;
32022     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
32023     if (!SWIG_IsOK(res2)) {
32024       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","add_source", 2, argv[0] ));
32025     }
32026     if (!ptr) {
32027       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_source", 2, argv[0]));
32028     }
32029     arg2 = ptr;
32030   }
32031   {
32032     try {
32033       (arg1)->add_source((std::string const &)*arg2);
32034     } catch (...) {
32035       string msg;
32036       int code = XapianExceptionHandler(msg);
32037       SWIG_exception(code, msg.c_str());
32038     }
32039   }
32040   if (SWIG_IsNewObj(res2)) delete arg2;
32041   return Qnil;
32042 fail:
32043   if (SWIG_IsNewObj(res2)) delete arg2;
32044   return Qnil;
32045 }
32046 
32047 
32048 SWIGINTERN VALUE
_wrap_Compactor_compact(int argc,VALUE * argv,VALUE self)32049 _wrap_Compactor_compact(int argc, VALUE *argv, VALUE self) {
32050   Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
32051   void *argp1 = 0 ;
32052   int res1 = 0 ;
32053 
32054   if ((argc < 0) || (argc > 0)) {
32055     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
32056   }
32057   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
32058   if (!SWIG_IsOK(res1)) {
32059     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Compactor *","compact", 1, self ));
32060   }
32061   arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
32062   {
32063     try {
32064       (arg1)->compact();
32065     } catch (...) {
32066       string msg;
32067       int code = XapianExceptionHandler(msg);
32068       SWIG_exception(code, msg.c_str());
32069     }
32070   }
32071   return Qnil;
32072 fail:
32073   return Qnil;
32074 }
32075 
32076 
32077 SWIGINTERN VALUE
_wrap_Compactor_set_status(int argc,VALUE * argv,VALUE self)32078 _wrap_Compactor_set_status(int argc, VALUE *argv, VALUE self) {
32079   Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
32080   std::string *arg2 = 0 ;
32081   std::string *arg3 = 0 ;
32082   void *argp1 = 0 ;
32083   int res1 = 0 ;
32084   int res2 = SWIG_OLDOBJ ;
32085   int res3 = SWIG_OLDOBJ ;
32086   Swig::Director *director = 0;
32087   bool upcall = false;
32088 
32089   if ((argc < 2) || (argc > 2)) {
32090     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
32091   }
32092   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
32093   if (!SWIG_IsOK(res1)) {
32094     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Compactor *","set_status", 1, self ));
32095   }
32096   arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
32097   {
32098     std::string *ptr = (std::string *)0;
32099     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
32100     if (!SWIG_IsOK(res2)) {
32101       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","set_status", 2, argv[0] ));
32102     }
32103     if (!ptr) {
32104       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","set_status", 2, argv[0]));
32105     }
32106     arg2 = ptr;
32107   }
32108   {
32109     std::string *ptr = (std::string *)0;
32110     res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
32111     if (!SWIG_IsOK(res3)) {
32112       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","set_status", 3, argv[1] ));
32113     }
32114     if (!ptr) {
32115       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","set_status", 3, argv[1]));
32116     }
32117     arg3 = ptr;
32118   }
32119   director = dynamic_cast<Swig::Director *>(arg1);
32120   upcall = (director && (director->swig_get_self() == self));
32121   try {
32122     {
32123       try {
32124         if (upcall) {
32125           (arg1)->Xapian::Compactor::set_status((std::string const &)*arg2,(std::string const &)*arg3);
32126         } else {
32127           (arg1)->set_status((std::string const &)*arg2,(std::string const &)*arg3);
32128         }
32129       } catch (...) {
32130         string msg;
32131         int code = XapianExceptionHandler(msg);
32132         SWIG_exception(code, msg.c_str());
32133       }
32134     }
32135   } catch (Swig::DirectorException& e) {
32136     rb_exc_raise(e.getError());
32137     SWIG_fail;
32138   }
32139   if (SWIG_IsNewObj(res2)) delete arg2;
32140   if (SWIG_IsNewObj(res3)) delete arg3;
32141   return Qnil;
32142 fail:
32143   if (SWIG_IsNewObj(res2)) delete arg2;
32144   if (SWIG_IsNewObj(res3)) delete arg3;
32145   return Qnil;
32146 }
32147 
32148 
32149 SWIGINTERN VALUE
_wrap_Compactor_resolve_duplicate_metadata(int argc,VALUE * argv,VALUE self)32150 _wrap_Compactor_resolve_duplicate_metadata(int argc, VALUE *argv, VALUE self) {
32151   Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
32152   std::string *arg2 = 0 ;
32153   size_t arg3 ;
32154   std::string *arg4 ;
32155   void *argp1 = 0 ;
32156   int res1 = 0 ;
32157   int res2 = SWIG_OLDOBJ ;
32158   size_t val3 ;
32159   int ecode3 = 0 ;
32160   void *argp4 = 0 ;
32161   int res4 = 0 ;
32162   Swig::Director *director = 0;
32163   bool upcall = false;
32164   std::string result;
32165   VALUE vresult = Qnil;
32166 
32167   if ((argc < 3) || (argc > 3)) {
32168     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
32169   }
32170   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
32171   if (!SWIG_IsOK(res1)) {
32172     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Compactor *","resolve_duplicate_metadata", 1, self ));
32173   }
32174   arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
32175   {
32176     std::string *ptr = (std::string *)0;
32177     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
32178     if (!SWIG_IsOK(res2)) {
32179       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","resolve_duplicate_metadata", 2, argv[0] ));
32180     }
32181     if (!ptr) {
32182       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","resolve_duplicate_metadata", 2, argv[0]));
32183     }
32184     arg2 = ptr;
32185   }
32186   ecode3 = SWIG_AsVal_size_t(argv[1], &val3);
32187   if (!SWIG_IsOK(ecode3)) {
32188     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","resolve_duplicate_metadata", 3, argv[1] ));
32189   }
32190   arg3 = static_cast< size_t >(val3);
32191   res4 = SWIG_ConvertPtr(argv[2], &argp4,SWIGTYPE_p_std__string, 0 |  0 );
32192   if (!SWIG_IsOK(res4)) {
32193     SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "std::string const []","resolve_duplicate_metadata", 4, argv[2] ));
32194   }
32195   arg4 = reinterpret_cast< std::string * >(argp4);
32196   director = dynamic_cast<Swig::Director *>(arg1);
32197   upcall = (director && (director->swig_get_self() == self));
32198   try {
32199     {
32200       try {
32201         if (upcall) {
32202           result = (arg1)->Xapian::Compactor::resolve_duplicate_metadata((std::string const &)*arg2,arg3,(std::string const (*))arg4);
32203         } else {
32204           result = (arg1)->resolve_duplicate_metadata((std::string const &)*arg2,arg3,(std::string const (*))arg4);
32205         }
32206       } catch (...) {
32207         string msg;
32208         int code = XapianExceptionHandler(msg);
32209         SWIG_exception(code, msg.c_str());
32210       }
32211     }
32212   } catch (Swig::DirectorException& e) {
32213     rb_exc_raise(e.getError());
32214     SWIG_fail;
32215   }
32216   vresult = SWIG_From_std_string(static_cast< std::string >(result));
32217   if (SWIG_IsNewObj(res2)) delete arg2;
32218   return vresult;
32219 fail:
32220   if (SWIG_IsNewObj(res2)) delete arg2;
32221   return Qnil;
32222 }
32223 
32224 
32225 SWIGINTERN VALUE
_wrap_disown_Compactor(int argc,VALUE * argv,VALUE self)32226 _wrap_disown_Compactor(int argc, VALUE *argv, VALUE self) {
32227   Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
32228   void *argp1 = 0 ;
32229   int res1 = 0 ;
32230 
32231   if ((argc < 1) || (argc > 1)) {
32232     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
32233   }
32234   res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
32235   if (!SWIG_IsOK(res1)) {
32236     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Compactor *","disown_Compactor", 1, argv[0] ));
32237   }
32238   arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
32239   {
32240     Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
32241     if (director) director->swig_disown();
32242   }
32243 
32244   return Qnil;
32245 fail:
32246   return Qnil;
32247 }
32248 
32249 
32250 static swig_class SwigClassPostingSource;
32251 
32252 SWIGINTERN VALUE
32253 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_PostingSource_allocate(VALUE self)32254 _wrap_PostingSource_allocate(VALUE self)
32255 #else
32256 _wrap_PostingSource_allocate(int argc, VALUE *argv, VALUE self)
32257 #endif
32258 {
32259   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__PostingSource);
32260 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
32261   rb_obj_call_init(vresult, argc, argv);
32262 #endif
32263   return vresult;
32264 }
32265 
32266 
32267 SWIGINTERN VALUE
_wrap_new_PostingSource(int argc,VALUE * argv,VALUE self)32268 _wrap_new_PostingSource(int argc, VALUE *argv, VALUE self) {
32269   VALUE arg1 = (VALUE) 0 ;
32270   const char *classname SWIGUNUSED = "Xapian::PostingSource";
32271   Xapian::PostingSource *result = 0 ;
32272 
32273   if ((argc < 0) || (argc > 0)) {
32274     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
32275   }
32276   arg1 = self;
32277   if ( strcmp(rb_obj_classname(self), classname) != 0 ) {
32278     /* subclassed */
32279     result = (Xapian::PostingSource *)new SwigDirector_PostingSource(arg1);
32280   } else {
32281     rb_raise(rb_eNameError,"accessing abstract class or protected constructor");
32282     return Qnil;
32283   }
32284 
32285   DATA_PTR(self) = result;
32286   return self;
32287 fail:
32288   return Qnil;
32289 }
32290 
32291 
32292 SWIGINTERN void
free_Xapian_PostingSource(void * self)32293 free_Xapian_PostingSource(void *self) {
32294     Xapian::PostingSource *arg1 = (Xapian::PostingSource *)self;
32295     delete arg1;
32296 }
32297 
32298 SWIGINTERN VALUE
_wrap_PostingSource_get_termfreq_min(int argc,VALUE * argv,VALUE self)32299 _wrap_PostingSource_get_termfreq_min(int argc, VALUE *argv, VALUE self) {
32300   Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
32301   void *argp1 = 0 ;
32302   int res1 = 0 ;
32303   Swig::Director *director = 0;
32304   bool upcall = false;
32305   Xapian::doccount result;
32306   VALUE vresult = Qnil;
32307 
32308   if ((argc < 0) || (argc > 0)) {
32309     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
32310   }
32311   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
32312   if (!SWIG_IsOK(res1)) {
32313     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingSource const *","get_termfreq_min", 1, self ));
32314   }
32315   arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
32316   director = dynamic_cast<Swig::Director *>(arg1);
32317   upcall = (director && (director->swig_get_self() == self));
32318   try {
32319     {
32320       try {
32321         if (upcall) {
32322           Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::get_termfreq_min");
32323         } else {
32324           result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_min();
32325         }
32326       } catch (...) {
32327         string msg;
32328         int code = XapianExceptionHandler(msg);
32329         SWIG_exception(code, msg.c_str());
32330       }
32331     }
32332   } catch (Swig::DirectorException& e) {
32333     rb_exc_raise(e.getError());
32334     SWIG_fail;
32335   }
32336   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
32337   return vresult;
32338 fail:
32339   return Qnil;
32340 }
32341 
32342 
32343 SWIGINTERN VALUE
_wrap_PostingSource_get_termfreq_est(int argc,VALUE * argv,VALUE self)32344 _wrap_PostingSource_get_termfreq_est(int argc, VALUE *argv, VALUE self) {
32345   Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
32346   void *argp1 = 0 ;
32347   int res1 = 0 ;
32348   Swig::Director *director = 0;
32349   bool upcall = false;
32350   Xapian::doccount result;
32351   VALUE vresult = Qnil;
32352 
32353   if ((argc < 0) || (argc > 0)) {
32354     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
32355   }
32356   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
32357   if (!SWIG_IsOK(res1)) {
32358     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingSource const *","get_termfreq_est", 1, self ));
32359   }
32360   arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
32361   director = dynamic_cast<Swig::Director *>(arg1);
32362   upcall = (director && (director->swig_get_self() == self));
32363   try {
32364     {
32365       try {
32366         if (upcall) {
32367           Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::get_termfreq_est");
32368         } else {
32369           result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_est();
32370         }
32371       } catch (...) {
32372         string msg;
32373         int code = XapianExceptionHandler(msg);
32374         SWIG_exception(code, msg.c_str());
32375       }
32376     }
32377   } catch (Swig::DirectorException& e) {
32378     rb_exc_raise(e.getError());
32379     SWIG_fail;
32380   }
32381   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
32382   return vresult;
32383 fail:
32384   return Qnil;
32385 }
32386 
32387 
32388 SWIGINTERN VALUE
_wrap_PostingSource_get_termfreq_max(int argc,VALUE * argv,VALUE self)32389 _wrap_PostingSource_get_termfreq_max(int argc, VALUE *argv, VALUE self) {
32390   Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
32391   void *argp1 = 0 ;
32392   int res1 = 0 ;
32393   Swig::Director *director = 0;
32394   bool upcall = false;
32395   Xapian::doccount result;
32396   VALUE vresult = Qnil;
32397 
32398   if ((argc < 0) || (argc > 0)) {
32399     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
32400   }
32401   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
32402   if (!SWIG_IsOK(res1)) {
32403     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingSource const *","get_termfreq_max", 1, self ));
32404   }
32405   arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
32406   director = dynamic_cast<Swig::Director *>(arg1);
32407   upcall = (director && (director->swig_get_self() == self));
32408   try {
32409     {
32410       try {
32411         if (upcall) {
32412           Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::get_termfreq_max");
32413         } else {
32414           result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_max();
32415         }
32416       } catch (...) {
32417         string msg;
32418         int code = XapianExceptionHandler(msg);
32419         SWIG_exception(code, msg.c_str());
32420       }
32421     }
32422   } catch (Swig::DirectorException& e) {
32423     rb_exc_raise(e.getError());
32424     SWIG_fail;
32425   }
32426   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
32427   return vresult;
32428 fail:
32429   return Qnil;
32430 }
32431 
32432 
32433 SWIGINTERN VALUE
_wrap_PostingSource_set_maxweight(int argc,VALUE * argv,VALUE self)32434 _wrap_PostingSource_set_maxweight(int argc, VALUE *argv, VALUE self) {
32435   Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
32436   double arg2 ;
32437   void *argp1 = 0 ;
32438   int res1 = 0 ;
32439   double val2 ;
32440   int ecode2 = 0 ;
32441 
32442   if ((argc < 1) || (argc > 1)) {
32443     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
32444   }
32445   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
32446   if (!SWIG_IsOK(res1)) {
32447     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingSource *","set_maxweight", 1, self ));
32448   }
32449   arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
32450   ecode2 = SWIG_AsVal_double(argv[0], &val2);
32451   if (!SWIG_IsOK(ecode2)) {
32452     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","set_maxweight", 2, argv[0] ));
32453   }
32454   arg2 = static_cast< double >(val2);
32455   {
32456     try {
32457       (arg1)->set_maxweight(arg2);
32458     } catch (...) {
32459       string msg;
32460       int code = XapianExceptionHandler(msg);
32461       SWIG_exception(code, msg.c_str());
32462     }
32463   }
32464   return Qnil;
32465 fail:
32466   return Qnil;
32467 }
32468 
32469 
32470 SWIGINTERN VALUE
_wrap_PostingSource_get_maxweight(int argc,VALUE * argv,VALUE self)32471 _wrap_PostingSource_get_maxweight(int argc, VALUE *argv, VALUE self) {
32472   Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
32473   void *argp1 = 0 ;
32474   int res1 = 0 ;
32475   double result;
32476   VALUE vresult = Qnil;
32477 
32478   if ((argc < 0) || (argc > 0)) {
32479     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
32480   }
32481   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
32482   if (!SWIG_IsOK(res1)) {
32483     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingSource const *","get_maxweight", 1, self ));
32484   }
32485   arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
32486   result = (double)((Xapian::PostingSource const *)arg1)->get_maxweight();
32487   vresult = SWIG_From_double(static_cast< double >(result));
32488   return vresult;
32489 fail:
32490   return Qnil;
32491 }
32492 
32493 
32494 SWIGINTERN VALUE
_wrap_PostingSource_weight(int argc,VALUE * argv,VALUE self)32495 _wrap_PostingSource_weight(int argc, VALUE *argv, VALUE self) {
32496   Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
32497   void *argp1 = 0 ;
32498   int res1 = 0 ;
32499   Swig::Director *director = 0;
32500   bool upcall = false;
32501   double result;
32502   VALUE vresult = Qnil;
32503 
32504   if ((argc < 0) || (argc > 0)) {
32505     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
32506   }
32507   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
32508   if (!SWIG_IsOK(res1)) {
32509     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingSource const *","get_weight", 1, self ));
32510   }
32511   arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
32512   director = dynamic_cast<Swig::Director *>(arg1);
32513   upcall = (director && (director->swig_get_self() == self));
32514   try {
32515     {
32516       try {
32517         if (upcall) {
32518           result = (double)((Xapian::PostingSource const *)arg1)->Xapian::PostingSource::get_weight();
32519         } else {
32520           result = (double)((Xapian::PostingSource const *)arg1)->get_weight();
32521         }
32522       } catch (...) {
32523         string msg;
32524         int code = XapianExceptionHandler(msg);
32525         SWIG_exception(code, msg.c_str());
32526       }
32527     }
32528   } catch (Swig::DirectorException& e) {
32529     rb_exc_raise(e.getError());
32530     SWIG_fail;
32531   }
32532   vresult = SWIG_From_double(static_cast< double >(result));
32533   return vresult;
32534 fail:
32535   return Qnil;
32536 }
32537 
32538 
32539 SWIGINTERN VALUE
_wrap_PostingSource_docid(int argc,VALUE * argv,VALUE self)32540 _wrap_PostingSource_docid(int argc, VALUE *argv, VALUE self) {
32541   Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
32542   void *argp1 = 0 ;
32543   int res1 = 0 ;
32544   Swig::Director *director = 0;
32545   bool upcall = false;
32546   Xapian::docid result;
32547   VALUE vresult = Qnil;
32548 
32549   if ((argc < 0) || (argc > 0)) {
32550     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
32551   }
32552   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
32553   if (!SWIG_IsOK(res1)) {
32554     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingSource const *","get_docid", 1, self ));
32555   }
32556   arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
32557   director = dynamic_cast<Swig::Director *>(arg1);
32558   upcall = (director && (director->swig_get_self() == self));
32559   try {
32560     {
32561       try {
32562         if (upcall) {
32563           Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::get_docid");
32564         } else {
32565           result = (Xapian::docid)((Xapian::PostingSource const *)arg1)->get_docid();
32566         }
32567       } catch (...) {
32568         string msg;
32569         int code = XapianExceptionHandler(msg);
32570         SWIG_exception(code, msg.c_str());
32571       }
32572     }
32573   } catch (Swig::DirectorException& e) {
32574     rb_exc_raise(e.getError());
32575     SWIG_fail;
32576   }
32577   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
32578   return vresult;
32579 fail:
32580   return Qnil;
32581 }
32582 
32583 
32584 SWIGINTERN VALUE
_wrap_PostingSource_next(int argc,VALUE * argv,VALUE self)32585 _wrap_PostingSource_next(int argc, VALUE *argv, VALUE self) {
32586   Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
32587   double arg2 ;
32588   void *argp1 = 0 ;
32589   int res1 = 0 ;
32590   double val2 ;
32591   int ecode2 = 0 ;
32592   Swig::Director *director = 0;
32593   bool upcall = false;
32594 
32595   if ((argc < 1) || (argc > 1)) {
32596     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
32597   }
32598   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
32599   if (!SWIG_IsOK(res1)) {
32600     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingSource *","next", 1, self ));
32601   }
32602   arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
32603   ecode2 = SWIG_AsVal_double(argv[0], &val2);
32604   if (!SWIG_IsOK(ecode2)) {
32605     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","next", 2, argv[0] ));
32606   }
32607   arg2 = static_cast< double >(val2);
32608   director = dynamic_cast<Swig::Director *>(arg1);
32609   upcall = (director && (director->swig_get_self() == self));
32610   try {
32611     {
32612       try {
32613         if (upcall) {
32614           Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::next");
32615         } else {
32616           (arg1)->next(arg2);
32617         }
32618       } catch (...) {
32619         string msg;
32620         int code = XapianExceptionHandler(msg);
32621         SWIG_exception(code, msg.c_str());
32622       }
32623     }
32624   } catch (Swig::DirectorException& e) {
32625     rb_exc_raise(e.getError());
32626     SWIG_fail;
32627   }
32628   return Qnil;
32629 fail:
32630   return Qnil;
32631 }
32632 
32633 
32634 SWIGINTERN VALUE
_wrap_PostingSource_skip_to(int argc,VALUE * argv,VALUE self)32635 _wrap_PostingSource_skip_to(int argc, VALUE *argv, VALUE self) {
32636   Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
32637   Xapian::docid arg2 ;
32638   double arg3 ;
32639   void *argp1 = 0 ;
32640   int res1 = 0 ;
32641   unsigned int val2 ;
32642   int ecode2 = 0 ;
32643   double val3 ;
32644   int ecode3 = 0 ;
32645   Swig::Director *director = 0;
32646   bool upcall = false;
32647 
32648   if ((argc < 2) || (argc > 2)) {
32649     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
32650   }
32651   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
32652   if (!SWIG_IsOK(res1)) {
32653     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingSource *","skip_to", 1, self ));
32654   }
32655   arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
32656   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
32657   if (!SWIG_IsOK(ecode2)) {
32658     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","skip_to", 2, argv[0] ));
32659   }
32660   arg2 = static_cast< Xapian::docid >(val2);
32661   ecode3 = SWIG_AsVal_double(argv[1], &val3);
32662   if (!SWIG_IsOK(ecode3)) {
32663     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","skip_to", 3, argv[1] ));
32664   }
32665   arg3 = static_cast< double >(val3);
32666   director = dynamic_cast<Swig::Director *>(arg1);
32667   upcall = (director && (director->swig_get_self() == self));
32668   try {
32669     {
32670       try {
32671         if (upcall) {
32672           (arg1)->Xapian::PostingSource::skip_to(arg2,arg3);
32673         } else {
32674           (arg1)->skip_to(arg2,arg3);
32675         }
32676       } catch (...) {
32677         string msg;
32678         int code = XapianExceptionHandler(msg);
32679         SWIG_exception(code, msg.c_str());
32680       }
32681     }
32682   } catch (Swig::DirectorException& e) {
32683     rb_exc_raise(e.getError());
32684     SWIG_fail;
32685   }
32686   return Qnil;
32687 fail:
32688   return Qnil;
32689 }
32690 
32691 
32692 SWIGINTERN VALUE
_wrap_PostingSource_check(int argc,VALUE * argv,VALUE self)32693 _wrap_PostingSource_check(int argc, VALUE *argv, VALUE self) {
32694   Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
32695   Xapian::docid arg2 ;
32696   double arg3 ;
32697   void *argp1 = 0 ;
32698   int res1 = 0 ;
32699   unsigned int val2 ;
32700   int ecode2 = 0 ;
32701   double val3 ;
32702   int ecode3 = 0 ;
32703   Swig::Director *director = 0;
32704   bool upcall = false;
32705   bool result;
32706   VALUE vresult = Qnil;
32707 
32708   if ((argc < 2) || (argc > 2)) {
32709     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
32710   }
32711   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
32712   if (!SWIG_IsOK(res1)) {
32713     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingSource *","check", 1, self ));
32714   }
32715   arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
32716   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
32717   if (!SWIG_IsOK(ecode2)) {
32718     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","check", 2, argv[0] ));
32719   }
32720   arg2 = static_cast< Xapian::docid >(val2);
32721   ecode3 = SWIG_AsVal_double(argv[1], &val3);
32722   if (!SWIG_IsOK(ecode3)) {
32723     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","check", 3, argv[1] ));
32724   }
32725   arg3 = static_cast< double >(val3);
32726   director = dynamic_cast<Swig::Director *>(arg1);
32727   upcall = (director && (director->swig_get_self() == self));
32728   try {
32729     {
32730       try {
32731         if (upcall) {
32732           result = (bool)(arg1)->Xapian::PostingSource::check(arg2,arg3);
32733         } else {
32734           result = (bool)(arg1)->check(arg2,arg3);
32735         }
32736       } catch (...) {
32737         string msg;
32738         int code = XapianExceptionHandler(msg);
32739         SWIG_exception(code, msg.c_str());
32740       }
32741     }
32742   } catch (Swig::DirectorException& e) {
32743     rb_exc_raise(e.getError());
32744     SWIG_fail;
32745   }
32746   vresult = SWIG_From_bool(static_cast< bool >(result));
32747   return vresult;
32748 fail:
32749   return Qnil;
32750 }
32751 
32752 
32753 SWIGINTERN VALUE
_wrap_PostingSource_at_end(int argc,VALUE * argv,VALUE self)32754 _wrap_PostingSource_at_end(int argc, VALUE *argv, VALUE self) {
32755   Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
32756   void *argp1 = 0 ;
32757   int res1 = 0 ;
32758   Swig::Director *director = 0;
32759   bool upcall = false;
32760   bool result;
32761   VALUE vresult = Qnil;
32762 
32763   if ((argc < 0) || (argc > 0)) {
32764     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
32765   }
32766   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
32767   if (!SWIG_IsOK(res1)) {
32768     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingSource const *","at_end", 1, self ));
32769   }
32770   arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
32771   director = dynamic_cast<Swig::Director *>(arg1);
32772   upcall = (director && (director->swig_get_self() == self));
32773   try {
32774     {
32775       try {
32776         if (upcall) {
32777           Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::at_end");
32778         } else {
32779           result = (bool)((Xapian::PostingSource const *)arg1)->at_end();
32780         }
32781       } catch (...) {
32782         string msg;
32783         int code = XapianExceptionHandler(msg);
32784         SWIG_exception(code, msg.c_str());
32785       }
32786     }
32787   } catch (Swig::DirectorException& e) {
32788     rb_exc_raise(e.getError());
32789     SWIG_fail;
32790   }
32791   vresult = SWIG_From_bool(static_cast< bool >(result));
32792   return vresult;
32793 fail:
32794   return Qnil;
32795 }
32796 
32797 
32798 SWIGINTERN VALUE
_wrap_PostingSource_name(int argc,VALUE * argv,VALUE self)32799 _wrap_PostingSource_name(int argc, VALUE *argv, VALUE self) {
32800   Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
32801   void *argp1 = 0 ;
32802   int res1 = 0 ;
32803   Swig::Director *director = 0;
32804   bool upcall = false;
32805   std::string result;
32806   VALUE vresult = Qnil;
32807 
32808   if ((argc < 0) || (argc > 0)) {
32809     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
32810   }
32811   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
32812   if (!SWIG_IsOK(res1)) {
32813     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingSource const *","name", 1, self ));
32814   }
32815   arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
32816   director = dynamic_cast<Swig::Director *>(arg1);
32817   upcall = (director && (director->swig_get_self() == self));
32818   try {
32819     {
32820       try {
32821         if (upcall) {
32822           result = ((Xapian::PostingSource const *)arg1)->Xapian::PostingSource::name();
32823         } else {
32824           result = ((Xapian::PostingSource const *)arg1)->name();
32825         }
32826       } catch (...) {
32827         string msg;
32828         int code = XapianExceptionHandler(msg);
32829         SWIG_exception(code, msg.c_str());
32830       }
32831     }
32832   } catch (Swig::DirectorException& e) {
32833     rb_exc_raise(e.getError());
32834     SWIG_fail;
32835   }
32836   vresult = SWIG_From_std_string(static_cast< std::string >(result));
32837   return vresult;
32838 fail:
32839   return Qnil;
32840 }
32841 
32842 
32843 SWIGINTERN VALUE
_wrap_PostingSource_init(int argc,VALUE * argv,VALUE self)32844 _wrap_PostingSource_init(int argc, VALUE *argv, VALUE self) {
32845   Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
32846   Xapian::Database *arg2 = 0 ;
32847   void *argp1 = 0 ;
32848   int res1 = 0 ;
32849   void *argp2 ;
32850   int res2 = 0 ;
32851   Swig::Director *director = 0;
32852   bool upcall = false;
32853 
32854   if ((argc < 1) || (argc > 1)) {
32855     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
32856   }
32857   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
32858   if (!SWIG_IsOK(res1)) {
32859     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingSource *","init", 1, self ));
32860   }
32861   arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
32862   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Database,  0 );
32863   if (!SWIG_IsOK(res2)) {
32864     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Database const &","init", 2, argv[0] ));
32865   }
32866   if (!argp2) {
32867     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Database const &","init", 2, argv[0]));
32868   }
32869   arg2 = reinterpret_cast< Xapian::Database * >(argp2);
32870   director = dynamic_cast<Swig::Director *>(arg1);
32871   upcall = (director && (director->swig_get_self() == self));
32872   try {
32873     {
32874       try {
32875         if (upcall) {
32876           Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::init");
32877         } else {
32878           (arg1)->init((Xapian::Database const &)*arg2);
32879         }
32880       } catch (...) {
32881         string msg;
32882         int code = XapianExceptionHandler(msg);
32883         SWIG_exception(code, msg.c_str());
32884       }
32885     }
32886   } catch (Swig::DirectorException& e) {
32887     rb_exc_raise(e.getError());
32888     SWIG_fail;
32889   }
32890   return Qnil;
32891 fail:
32892   return Qnil;
32893 }
32894 
32895 
32896 SWIGINTERN VALUE
_wrap_PostingSource_description(int argc,VALUE * argv,VALUE self)32897 _wrap_PostingSource_description(int argc, VALUE *argv, VALUE self) {
32898   Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
32899   void *argp1 = 0 ;
32900   int res1 = 0 ;
32901   Swig::Director *director = 0;
32902   bool upcall = false;
32903   std::string result;
32904   VALUE vresult = Qnil;
32905 
32906   if ((argc < 0) || (argc > 0)) {
32907     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
32908   }
32909   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
32910   if (!SWIG_IsOK(res1)) {
32911     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingSource const *","get_description", 1, self ));
32912   }
32913   arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
32914   director = dynamic_cast<Swig::Director *>(arg1);
32915   upcall = (director && (director->swig_get_self() == self));
32916   try {
32917     {
32918       try {
32919         if (upcall) {
32920           result = ((Xapian::PostingSource const *)arg1)->Xapian::PostingSource::get_description();
32921         } else {
32922           result = ((Xapian::PostingSource const *)arg1)->get_description();
32923         }
32924       } catch (...) {
32925         string msg;
32926         int code = XapianExceptionHandler(msg);
32927         SWIG_exception(code, msg.c_str());
32928       }
32929     }
32930   } catch (Swig::DirectorException& e) {
32931     rb_exc_raise(e.getError());
32932     SWIG_fail;
32933   }
32934   vresult = SWIG_From_std_string(static_cast< std::string >(result));
32935   return vresult;
32936 fail:
32937   return Qnil;
32938 }
32939 
32940 
32941 SWIGINTERN VALUE
_wrap_PostingSource_release(int argc,VALUE * argv,VALUE self)32942 _wrap_PostingSource_release(int argc, VALUE *argv, VALUE self) {
32943   Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
32944   void *argp1 = 0 ;
32945   int res1 = 0 ;
32946   Swig::Director *director = 0;
32947   Xapian::PostingSource *result = 0 ;
32948   VALUE vresult = Qnil;
32949 
32950   if ((argc < 0) || (argc > 0)) {
32951     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
32952   }
32953   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
32954   if (!SWIG_IsOK(res1)) {
32955     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingSource const *","release", 1, self ));
32956   }
32957   arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
32958   {
32959     try {
32960       result = (Xapian::PostingSource *)((Xapian::PostingSource const *)arg1)->release();
32961     } catch (...) {
32962       string msg;
32963       int code = XapianExceptionHandler(msg);
32964       SWIG_exception(code, msg.c_str());
32965     }
32966   }
32967   director = dynamic_cast<Swig::Director *>(result);
32968   if (director) {
32969     vresult = director->swig_get_self();
32970   } else {
32971     vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
32972   }
32973   return vresult;
32974 fail:
32975   return Qnil;
32976 }
32977 
32978 
32979 SWIGINTERN VALUE
_wrap_disown_PostingSource(int argc,VALUE * argv,VALUE self)32980 _wrap_disown_PostingSource(int argc, VALUE *argv, VALUE self) {
32981   Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
32982   void *argp1 = 0 ;
32983   int res1 = 0 ;
32984 
32985   if ((argc < 1) || (argc > 1)) {
32986     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
32987   }
32988   res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
32989   if (!SWIG_IsOK(res1)) {
32990     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::PostingSource *","disown_PostingSource", 1, argv[0] ));
32991   }
32992   arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
32993   {
32994     Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
32995     if (director) director->swig_disown();
32996   }
32997 
32998   return Qnil;
32999 fail:
33000   return Qnil;
33001 }
33002 
33003 
33004 static swig_class SwigClassValuePostingSource;
33005 
33006 SWIGINTERN VALUE
33007 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_ValuePostingSource_allocate(VALUE self)33008 _wrap_ValuePostingSource_allocate(VALUE self)
33009 #else
33010 _wrap_ValuePostingSource_allocate(int argc, VALUE *argv, VALUE self)
33011 #endif
33012 {
33013   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__ValuePostingSource);
33014 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
33015   rb_obj_call_init(vresult, argc, argv);
33016 #endif
33017   return vresult;
33018 }
33019 
33020 
33021 SWIGINTERN VALUE
_wrap_new_ValuePostingSource(int argc,VALUE * argv,VALUE self)33022 _wrap_new_ValuePostingSource(int argc, VALUE *argv, VALUE self) {
33023   VALUE arg1 = (VALUE) 0 ;
33024   Xapian::valueno arg2 ;
33025   unsigned int val2 ;
33026   int ecode2 = 0 ;
33027   const char *classname SWIGUNUSED = "Xapian::ValuePostingSource";
33028   Xapian::ValuePostingSource *result = 0 ;
33029 
33030   if ((argc < 1) || (argc > 1)) {
33031     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
33032   }
33033   arg1 = self;
33034   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
33035   if (!SWIG_IsOK(ecode2)) {
33036     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","ValuePostingSource", 2, argv[0] ));
33037   }
33038   arg2 = static_cast< Xapian::valueno >(val2);
33039   {
33040     try {
33041       if ( strcmp(rb_obj_classname(self), classname) != 0 ) {
33042         /* subclassed */
33043         result = (Xapian::ValuePostingSource *)new SwigDirector_ValuePostingSource(arg1,arg2);
33044       } else {
33045         result = (Xapian::ValuePostingSource *)new Xapian::ValuePostingSource(arg2);
33046       }
33047 
33048       DATA_PTR(self) = result;
33049     } catch (...) {
33050       string msg;
33051       int code = XapianExceptionHandler(msg);
33052       SWIG_exception(code, msg.c_str());
33053     }
33054   }
33055   return self;
33056 fail:
33057   return Qnil;
33058 }
33059 
33060 
33061 SWIGINTERN VALUE
_wrap_ValuePostingSource_get_termfreq_min(int argc,VALUE * argv,VALUE self)33062 _wrap_ValuePostingSource_get_termfreq_min(int argc, VALUE *argv, VALUE self) {
33063   Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
33064   void *argp1 = 0 ;
33065   int res1 = 0 ;
33066   Swig::Director *director = 0;
33067   bool upcall = false;
33068   Xapian::doccount result;
33069   VALUE vresult = Qnil;
33070 
33071   if ((argc < 0) || (argc > 0)) {
33072     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
33073   }
33074   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
33075   if (!SWIG_IsOK(res1)) {
33076     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValuePostingSource const *","get_termfreq_min", 1, self ));
33077   }
33078   arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
33079   director = dynamic_cast<Swig::Director *>(arg1);
33080   upcall = (director && (director->swig_get_self() == self));
33081   try {
33082     {
33083       try {
33084         if (upcall) {
33085           result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->Xapian::ValuePostingSource::get_termfreq_min();
33086         } else {
33087           result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->get_termfreq_min();
33088         }
33089       } catch (...) {
33090         string msg;
33091         int code = XapianExceptionHandler(msg);
33092         SWIG_exception(code, msg.c_str());
33093       }
33094     }
33095   } catch (Swig::DirectorException& e) {
33096     rb_exc_raise(e.getError());
33097     SWIG_fail;
33098   }
33099   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
33100   return vresult;
33101 fail:
33102   return Qnil;
33103 }
33104 
33105 
33106 SWIGINTERN VALUE
_wrap_ValuePostingSource_get_termfreq_est(int argc,VALUE * argv,VALUE self)33107 _wrap_ValuePostingSource_get_termfreq_est(int argc, VALUE *argv, VALUE self) {
33108   Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
33109   void *argp1 = 0 ;
33110   int res1 = 0 ;
33111   Swig::Director *director = 0;
33112   bool upcall = false;
33113   Xapian::doccount result;
33114   VALUE vresult = Qnil;
33115 
33116   if ((argc < 0) || (argc > 0)) {
33117     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
33118   }
33119   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
33120   if (!SWIG_IsOK(res1)) {
33121     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValuePostingSource const *","get_termfreq_est", 1, self ));
33122   }
33123   arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
33124   director = dynamic_cast<Swig::Director *>(arg1);
33125   upcall = (director && (director->swig_get_self() == self));
33126   try {
33127     {
33128       try {
33129         if (upcall) {
33130           result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->Xapian::ValuePostingSource::get_termfreq_est();
33131         } else {
33132           result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->get_termfreq_est();
33133         }
33134       } catch (...) {
33135         string msg;
33136         int code = XapianExceptionHandler(msg);
33137         SWIG_exception(code, msg.c_str());
33138       }
33139     }
33140   } catch (Swig::DirectorException& e) {
33141     rb_exc_raise(e.getError());
33142     SWIG_fail;
33143   }
33144   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
33145   return vresult;
33146 fail:
33147   return Qnil;
33148 }
33149 
33150 
33151 SWIGINTERN VALUE
_wrap_ValuePostingSource_get_termfreq_max(int argc,VALUE * argv,VALUE self)33152 _wrap_ValuePostingSource_get_termfreq_max(int argc, VALUE *argv, VALUE self) {
33153   Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
33154   void *argp1 = 0 ;
33155   int res1 = 0 ;
33156   Swig::Director *director = 0;
33157   bool upcall = false;
33158   Xapian::doccount result;
33159   VALUE vresult = Qnil;
33160 
33161   if ((argc < 0) || (argc > 0)) {
33162     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
33163   }
33164   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
33165   if (!SWIG_IsOK(res1)) {
33166     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValuePostingSource const *","get_termfreq_max", 1, self ));
33167   }
33168   arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
33169   director = dynamic_cast<Swig::Director *>(arg1);
33170   upcall = (director && (director->swig_get_self() == self));
33171   try {
33172     {
33173       try {
33174         if (upcall) {
33175           result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->Xapian::ValuePostingSource::get_termfreq_max();
33176         } else {
33177           result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->get_termfreq_max();
33178         }
33179       } catch (...) {
33180         string msg;
33181         int code = XapianExceptionHandler(msg);
33182         SWIG_exception(code, msg.c_str());
33183       }
33184     }
33185   } catch (Swig::DirectorException& e) {
33186     rb_exc_raise(e.getError());
33187     SWIG_fail;
33188   }
33189   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
33190   return vresult;
33191 fail:
33192   return Qnil;
33193 }
33194 
33195 
33196 SWIGINTERN VALUE
_wrap_ValuePostingSource_next(int argc,VALUE * argv,VALUE self)33197 _wrap_ValuePostingSource_next(int argc, VALUE *argv, VALUE self) {
33198   Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
33199   double arg2 ;
33200   void *argp1 = 0 ;
33201   int res1 = 0 ;
33202   double val2 ;
33203   int ecode2 = 0 ;
33204   Swig::Director *director = 0;
33205   bool upcall = false;
33206 
33207   if ((argc < 1) || (argc > 1)) {
33208     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
33209   }
33210   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
33211   if (!SWIG_IsOK(res1)) {
33212     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValuePostingSource *","next", 1, self ));
33213   }
33214   arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
33215   ecode2 = SWIG_AsVal_double(argv[0], &val2);
33216   if (!SWIG_IsOK(ecode2)) {
33217     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","next", 2, argv[0] ));
33218   }
33219   arg2 = static_cast< double >(val2);
33220   director = dynamic_cast<Swig::Director *>(arg1);
33221   upcall = (director && (director->swig_get_self() == self));
33222   try {
33223     {
33224       try {
33225         if (upcall) {
33226           (arg1)->Xapian::ValuePostingSource::next(arg2);
33227         } else {
33228           (arg1)->next(arg2);
33229         }
33230       } catch (...) {
33231         string msg;
33232         int code = XapianExceptionHandler(msg);
33233         SWIG_exception(code, msg.c_str());
33234       }
33235     }
33236   } catch (Swig::DirectorException& e) {
33237     rb_exc_raise(e.getError());
33238     SWIG_fail;
33239   }
33240   return Qnil;
33241 fail:
33242   return Qnil;
33243 }
33244 
33245 
33246 SWIGINTERN VALUE
_wrap_ValuePostingSource_skip_to(int argc,VALUE * argv,VALUE self)33247 _wrap_ValuePostingSource_skip_to(int argc, VALUE *argv, VALUE self) {
33248   Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
33249   Xapian::docid arg2 ;
33250   double arg3 ;
33251   void *argp1 = 0 ;
33252   int res1 = 0 ;
33253   unsigned int val2 ;
33254   int ecode2 = 0 ;
33255   double val3 ;
33256   int ecode3 = 0 ;
33257   Swig::Director *director = 0;
33258   bool upcall = false;
33259 
33260   if ((argc < 2) || (argc > 2)) {
33261     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
33262   }
33263   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
33264   if (!SWIG_IsOK(res1)) {
33265     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValuePostingSource *","skip_to", 1, self ));
33266   }
33267   arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
33268   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
33269   if (!SWIG_IsOK(ecode2)) {
33270     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","skip_to", 2, argv[0] ));
33271   }
33272   arg2 = static_cast< Xapian::docid >(val2);
33273   ecode3 = SWIG_AsVal_double(argv[1], &val3);
33274   if (!SWIG_IsOK(ecode3)) {
33275     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","skip_to", 3, argv[1] ));
33276   }
33277   arg3 = static_cast< double >(val3);
33278   director = dynamic_cast<Swig::Director *>(arg1);
33279   upcall = (director && (director->swig_get_self() == self));
33280   try {
33281     {
33282       try {
33283         if (upcall) {
33284           (arg1)->Xapian::ValuePostingSource::skip_to(arg2,arg3);
33285         } else {
33286           (arg1)->skip_to(arg2,arg3);
33287         }
33288       } catch (...) {
33289         string msg;
33290         int code = XapianExceptionHandler(msg);
33291         SWIG_exception(code, msg.c_str());
33292       }
33293     }
33294   } catch (Swig::DirectorException& e) {
33295     rb_exc_raise(e.getError());
33296     SWIG_fail;
33297   }
33298   return Qnil;
33299 fail:
33300   return Qnil;
33301 }
33302 
33303 
33304 SWIGINTERN VALUE
_wrap_ValuePostingSource_check(int argc,VALUE * argv,VALUE self)33305 _wrap_ValuePostingSource_check(int argc, VALUE *argv, VALUE self) {
33306   Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
33307   Xapian::docid arg2 ;
33308   double arg3 ;
33309   void *argp1 = 0 ;
33310   int res1 = 0 ;
33311   unsigned int val2 ;
33312   int ecode2 = 0 ;
33313   double val3 ;
33314   int ecode3 = 0 ;
33315   Swig::Director *director = 0;
33316   bool upcall = false;
33317   bool result;
33318   VALUE vresult = Qnil;
33319 
33320   if ((argc < 2) || (argc > 2)) {
33321     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
33322   }
33323   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
33324   if (!SWIG_IsOK(res1)) {
33325     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValuePostingSource *","check", 1, self ));
33326   }
33327   arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
33328   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
33329   if (!SWIG_IsOK(ecode2)) {
33330     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","check", 2, argv[0] ));
33331   }
33332   arg2 = static_cast< Xapian::docid >(val2);
33333   ecode3 = SWIG_AsVal_double(argv[1], &val3);
33334   if (!SWIG_IsOK(ecode3)) {
33335     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","check", 3, argv[1] ));
33336   }
33337   arg3 = static_cast< double >(val3);
33338   director = dynamic_cast<Swig::Director *>(arg1);
33339   upcall = (director && (director->swig_get_self() == self));
33340   try {
33341     {
33342       try {
33343         if (upcall) {
33344           result = (bool)(arg1)->Xapian::ValuePostingSource::check(arg2,arg3);
33345         } else {
33346           result = (bool)(arg1)->check(arg2,arg3);
33347         }
33348       } catch (...) {
33349         string msg;
33350         int code = XapianExceptionHandler(msg);
33351         SWIG_exception(code, msg.c_str());
33352       }
33353     }
33354   } catch (Swig::DirectorException& e) {
33355     rb_exc_raise(e.getError());
33356     SWIG_fail;
33357   }
33358   vresult = SWIG_From_bool(static_cast< bool >(result));
33359   return vresult;
33360 fail:
33361   return Qnil;
33362 }
33363 
33364 
33365 SWIGINTERN VALUE
_wrap_ValuePostingSource_at_end(int argc,VALUE * argv,VALUE self)33366 _wrap_ValuePostingSource_at_end(int argc, VALUE *argv, VALUE self) {
33367   Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
33368   void *argp1 = 0 ;
33369   int res1 = 0 ;
33370   Swig::Director *director = 0;
33371   bool upcall = false;
33372   bool result;
33373   VALUE vresult = Qnil;
33374 
33375   if ((argc < 0) || (argc > 0)) {
33376     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
33377   }
33378   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
33379   if (!SWIG_IsOK(res1)) {
33380     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValuePostingSource const *","at_end", 1, self ));
33381   }
33382   arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
33383   director = dynamic_cast<Swig::Director *>(arg1);
33384   upcall = (director && (director->swig_get_self() == self));
33385   try {
33386     {
33387       try {
33388         if (upcall) {
33389           result = (bool)((Xapian::ValuePostingSource const *)arg1)->Xapian::ValuePostingSource::at_end();
33390         } else {
33391           result = (bool)((Xapian::ValuePostingSource const *)arg1)->at_end();
33392         }
33393       } catch (...) {
33394         string msg;
33395         int code = XapianExceptionHandler(msg);
33396         SWIG_exception(code, msg.c_str());
33397       }
33398     }
33399   } catch (Swig::DirectorException& e) {
33400     rb_exc_raise(e.getError());
33401     SWIG_fail;
33402   }
33403   vresult = SWIG_From_bool(static_cast< bool >(result));
33404   return vresult;
33405 fail:
33406   return Qnil;
33407 }
33408 
33409 
33410 SWIGINTERN VALUE
_wrap_ValuePostingSource_docid(int argc,VALUE * argv,VALUE self)33411 _wrap_ValuePostingSource_docid(int argc, VALUE *argv, VALUE self) {
33412   Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
33413   void *argp1 = 0 ;
33414   int res1 = 0 ;
33415   Swig::Director *director = 0;
33416   bool upcall = false;
33417   Xapian::docid result;
33418   VALUE vresult = Qnil;
33419 
33420   if ((argc < 0) || (argc > 0)) {
33421     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
33422   }
33423   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
33424   if (!SWIG_IsOK(res1)) {
33425     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValuePostingSource const *","get_docid", 1, self ));
33426   }
33427   arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
33428   director = dynamic_cast<Swig::Director *>(arg1);
33429   upcall = (director && (director->swig_get_self() == self));
33430   try {
33431     {
33432       try {
33433         if (upcall) {
33434           result = (Xapian::docid)((Xapian::ValuePostingSource const *)arg1)->Xapian::ValuePostingSource::get_docid();
33435         } else {
33436           result = (Xapian::docid)((Xapian::ValuePostingSource const *)arg1)->get_docid();
33437         }
33438       } catch (...) {
33439         string msg;
33440         int code = XapianExceptionHandler(msg);
33441         SWIG_exception(code, msg.c_str());
33442       }
33443     }
33444   } catch (Swig::DirectorException& e) {
33445     rb_exc_raise(e.getError());
33446     SWIG_fail;
33447   }
33448   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
33449   return vresult;
33450 fail:
33451   return Qnil;
33452 }
33453 
33454 
33455 SWIGINTERN VALUE
_wrap_ValuePostingSource_init(int argc,VALUE * argv,VALUE self)33456 _wrap_ValuePostingSource_init(int argc, VALUE *argv, VALUE self) {
33457   Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
33458   Xapian::Database *arg2 = 0 ;
33459   void *argp1 = 0 ;
33460   int res1 = 0 ;
33461   void *argp2 ;
33462   int res2 = 0 ;
33463   Swig::Director *director = 0;
33464   bool upcall = false;
33465 
33466   if ((argc < 1) || (argc > 1)) {
33467     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
33468   }
33469   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
33470   if (!SWIG_IsOK(res1)) {
33471     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValuePostingSource *","init", 1, self ));
33472   }
33473   arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
33474   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Database,  0 );
33475   if (!SWIG_IsOK(res2)) {
33476     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Database const &","init", 2, argv[0] ));
33477   }
33478   if (!argp2) {
33479     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Database const &","init", 2, argv[0]));
33480   }
33481   arg2 = reinterpret_cast< Xapian::Database * >(argp2);
33482   director = dynamic_cast<Swig::Director *>(arg1);
33483   upcall = (director && (director->swig_get_self() == self));
33484   try {
33485     {
33486       try {
33487         if (upcall) {
33488           (arg1)->Xapian::ValuePostingSource::init((Xapian::Database const &)*arg2);
33489         } else {
33490           (arg1)->init((Xapian::Database const &)*arg2);
33491         }
33492       } catch (...) {
33493         string msg;
33494         int code = XapianExceptionHandler(msg);
33495         SWIG_exception(code, msg.c_str());
33496       }
33497     }
33498   } catch (Swig::DirectorException& e) {
33499     rb_exc_raise(e.getError());
33500     SWIG_fail;
33501   }
33502   return Qnil;
33503 fail:
33504   return Qnil;
33505 }
33506 
33507 
33508 SWIGINTERN VALUE
_wrap_ValuePostingSource_get_database(int argc,VALUE * argv,VALUE self)33509 _wrap_ValuePostingSource_get_database(int argc, VALUE *argv, VALUE self) {
33510   Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
33511   void *argp1 = 0 ;
33512   int res1 = 0 ;
33513   Xapian::Database result;
33514   VALUE vresult = Qnil;
33515 
33516   if ((argc < 0) || (argc > 0)) {
33517     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
33518   }
33519   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
33520   if (!SWIG_IsOK(res1)) {
33521     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValuePostingSource const *","get_database", 1, self ));
33522   }
33523   arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
33524   {
33525     try {
33526       result = ((Xapian::ValuePostingSource const *)arg1)->get_database();
33527     } catch (...) {
33528       string msg;
33529       int code = XapianExceptionHandler(msg);
33530       SWIG_exception(code, msg.c_str());
33531     }
33532   }
33533   vresult = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN |  0 );
33534   return vresult;
33535 fail:
33536   return Qnil;
33537 }
33538 
33539 
33540 SWIGINTERN VALUE
_wrap_ValuePostingSource_get_slot(int argc,VALUE * argv,VALUE self)33541 _wrap_ValuePostingSource_get_slot(int argc, VALUE *argv, VALUE self) {
33542   Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
33543   void *argp1 = 0 ;
33544   int res1 = 0 ;
33545   Xapian::valueno result;
33546   VALUE vresult = Qnil;
33547 
33548   if ((argc < 0) || (argc > 0)) {
33549     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
33550   }
33551   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
33552   if (!SWIG_IsOK(res1)) {
33553     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValuePostingSource const *","get_slot", 1, self ));
33554   }
33555   arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
33556   {
33557     try {
33558       result = (Xapian::valueno)((Xapian::ValuePostingSource const *)arg1)->get_slot();
33559     } catch (...) {
33560       string msg;
33561       int code = XapianExceptionHandler(msg);
33562       SWIG_exception(code, msg.c_str());
33563     }
33564   }
33565   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
33566   return vresult;
33567 fail:
33568   return Qnil;
33569 }
33570 
33571 
33572 SWIGINTERN VALUE
_wrap_ValuePostingSource_value(int argc,VALUE * argv,VALUE self)33573 _wrap_ValuePostingSource_value(int argc, VALUE *argv, VALUE self) {
33574   Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
33575   void *argp1 = 0 ;
33576   int res1 = 0 ;
33577   std::string result;
33578   VALUE vresult = Qnil;
33579 
33580   if ((argc < 0) || (argc > 0)) {
33581     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
33582   }
33583   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
33584   if (!SWIG_IsOK(res1)) {
33585     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValuePostingSource const *","get_value", 1, self ));
33586   }
33587   arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
33588   {
33589     try {
33590       result = ((Xapian::ValuePostingSource const *)arg1)->get_value();
33591     } catch (...) {
33592       string msg;
33593       int code = XapianExceptionHandler(msg);
33594       SWIG_exception(code, msg.c_str());
33595     }
33596   }
33597   vresult = SWIG_From_std_string(static_cast< std::string >(result));
33598   return vresult;
33599 fail:
33600   return Qnil;
33601 }
33602 
33603 
33604 SWIGINTERN VALUE
_wrap_ValuePostingSource_done(int argc,VALUE * argv,VALUE self)33605 _wrap_ValuePostingSource_done(int argc, VALUE *argv, VALUE self) {
33606   Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
33607   void *argp1 = 0 ;
33608   int res1 = 0 ;
33609 
33610   if ((argc < 0) || (argc > 0)) {
33611     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
33612   }
33613   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
33614   if (!SWIG_IsOK(res1)) {
33615     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValuePostingSource *","done", 1, self ));
33616   }
33617   arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
33618   {
33619     try {
33620       (arg1)->done();
33621     } catch (...) {
33622       string msg;
33623       int code = XapianExceptionHandler(msg);
33624       SWIG_exception(code, msg.c_str());
33625     }
33626   }
33627   return Qnil;
33628 fail:
33629   return Qnil;
33630 }
33631 
33632 
33633 SWIGINTERN VALUE
_wrap_ValuePostingSource_get_started(int argc,VALUE * argv,VALUE self)33634 _wrap_ValuePostingSource_get_started(int argc, VALUE *argv, VALUE self) {
33635   Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
33636   void *argp1 = 0 ;
33637   int res1 = 0 ;
33638   bool result;
33639   VALUE vresult = Qnil;
33640 
33641   if ((argc < 0) || (argc > 0)) {
33642     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
33643   }
33644   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
33645   if (!SWIG_IsOK(res1)) {
33646     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValuePostingSource const *","get_started", 1, self ));
33647   }
33648   arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
33649   {
33650     try {
33651       result = (bool)((Xapian::ValuePostingSource const *)arg1)->get_started();
33652     } catch (...) {
33653       string msg;
33654       int code = XapianExceptionHandler(msg);
33655       SWIG_exception(code, msg.c_str());
33656     }
33657   }
33658   vresult = SWIG_From_bool(static_cast< bool >(result));
33659   return vresult;
33660 fail:
33661   return Qnil;
33662 }
33663 
33664 
33665 SWIGINTERN VALUE
_wrap_ValuePostingSource_set_termfreq_min(int argc,VALUE * argv,VALUE self)33666 _wrap_ValuePostingSource_set_termfreq_min(int argc, VALUE *argv, VALUE self) {
33667   Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
33668   Xapian::doccount arg2 ;
33669   void *argp1 = 0 ;
33670   int res1 = 0 ;
33671   unsigned int val2 ;
33672   int ecode2 = 0 ;
33673 
33674   if ((argc < 1) || (argc > 1)) {
33675     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
33676   }
33677   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
33678   if (!SWIG_IsOK(res1)) {
33679     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValuePostingSource *","set_termfreq_min", 1, self ));
33680   }
33681   arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
33682   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
33683   if (!SWIG_IsOK(ecode2)) {
33684     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::doccount","set_termfreq_min", 2, argv[0] ));
33685   }
33686   arg2 = static_cast< Xapian::doccount >(val2);
33687   {
33688     try {
33689       (arg1)->set_termfreq_min(arg2);
33690     } catch (...) {
33691       string msg;
33692       int code = XapianExceptionHandler(msg);
33693       SWIG_exception(code, msg.c_str());
33694     }
33695   }
33696   return Qnil;
33697 fail:
33698   return Qnil;
33699 }
33700 
33701 
33702 SWIGINTERN VALUE
_wrap_ValuePostingSource_set_termfreq_est(int argc,VALUE * argv,VALUE self)33703 _wrap_ValuePostingSource_set_termfreq_est(int argc, VALUE *argv, VALUE self) {
33704   Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
33705   Xapian::doccount arg2 ;
33706   void *argp1 = 0 ;
33707   int res1 = 0 ;
33708   unsigned int val2 ;
33709   int ecode2 = 0 ;
33710 
33711   if ((argc < 1) || (argc > 1)) {
33712     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
33713   }
33714   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
33715   if (!SWIG_IsOK(res1)) {
33716     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValuePostingSource *","set_termfreq_est", 1, self ));
33717   }
33718   arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
33719   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
33720   if (!SWIG_IsOK(ecode2)) {
33721     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::doccount","set_termfreq_est", 2, argv[0] ));
33722   }
33723   arg2 = static_cast< Xapian::doccount >(val2);
33724   {
33725     try {
33726       (arg1)->set_termfreq_est(arg2);
33727     } catch (...) {
33728       string msg;
33729       int code = XapianExceptionHandler(msg);
33730       SWIG_exception(code, msg.c_str());
33731     }
33732   }
33733   return Qnil;
33734 fail:
33735   return Qnil;
33736 }
33737 
33738 
33739 SWIGINTERN VALUE
_wrap_ValuePostingSource_set_termfreq_max(int argc,VALUE * argv,VALUE self)33740 _wrap_ValuePostingSource_set_termfreq_max(int argc, VALUE *argv, VALUE self) {
33741   Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
33742   Xapian::doccount arg2 ;
33743   void *argp1 = 0 ;
33744   int res1 = 0 ;
33745   unsigned int val2 ;
33746   int ecode2 = 0 ;
33747 
33748   if ((argc < 1) || (argc > 1)) {
33749     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
33750   }
33751   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
33752   if (!SWIG_IsOK(res1)) {
33753     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValuePostingSource *","set_termfreq_max", 1, self ));
33754   }
33755   arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
33756   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
33757   if (!SWIG_IsOK(ecode2)) {
33758     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::doccount","set_termfreq_max", 2, argv[0] ));
33759   }
33760   arg2 = static_cast< Xapian::doccount >(val2);
33761   {
33762     try {
33763       (arg1)->set_termfreq_max(arg2);
33764     } catch (...) {
33765       string msg;
33766       int code = XapianExceptionHandler(msg);
33767       SWIG_exception(code, msg.c_str());
33768     }
33769   }
33770   return Qnil;
33771 fail:
33772   return Qnil;
33773 }
33774 
33775 
33776 SWIGINTERN void
free_Xapian_ValuePostingSource(void * self)33777 free_Xapian_ValuePostingSource(void *self) {
33778     Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *)self;
33779     delete arg1;
33780 }
33781 
33782 SWIGINTERN VALUE
_wrap_disown_ValuePostingSource(int argc,VALUE * argv,VALUE self)33783 _wrap_disown_ValuePostingSource(int argc, VALUE *argv, VALUE self) {
33784   Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
33785   void *argp1 = 0 ;
33786   int res1 = 0 ;
33787 
33788   if ((argc < 1) || (argc > 1)) {
33789     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
33790   }
33791   res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
33792   if (!SWIG_IsOK(res1)) {
33793     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValuePostingSource *","disown_ValuePostingSource", 1, argv[0] ));
33794   }
33795   arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
33796   {
33797     Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
33798     if (director) director->swig_disown();
33799   }
33800 
33801   return Qnil;
33802 fail:
33803   return Qnil;
33804 }
33805 
33806 
33807 static swig_class SwigClassValueWeightPostingSource;
33808 
33809 SWIGINTERN VALUE
33810 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_ValueWeightPostingSource_allocate(VALUE self)33811 _wrap_ValueWeightPostingSource_allocate(VALUE self)
33812 #else
33813 _wrap_ValueWeightPostingSource_allocate(int argc, VALUE *argv, VALUE self)
33814 #endif
33815 {
33816   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__ValueWeightPostingSource);
33817 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
33818   rb_obj_call_init(vresult, argc, argv);
33819 #endif
33820   return vresult;
33821 }
33822 
33823 
33824 SWIGINTERN VALUE
_wrap_new_ValueWeightPostingSource(int argc,VALUE * argv,VALUE self)33825 _wrap_new_ValueWeightPostingSource(int argc, VALUE *argv, VALUE self) {
33826   VALUE arg1 = (VALUE) 0 ;
33827   Xapian::valueno arg2 ;
33828   unsigned int val2 ;
33829   int ecode2 = 0 ;
33830   const char *classname SWIGUNUSED = "Xapian::ValueWeightPostingSource";
33831   Xapian::ValueWeightPostingSource *result = 0 ;
33832 
33833   if ((argc < 1) || (argc > 1)) {
33834     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
33835   }
33836   arg1 = self;
33837   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
33838   if (!SWIG_IsOK(ecode2)) {
33839     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","ValueWeightPostingSource", 2, argv[0] ));
33840   }
33841   arg2 = static_cast< Xapian::valueno >(val2);
33842   {
33843     try {
33844       if ( strcmp(rb_obj_classname(self), classname) != 0 ) {
33845         /* subclassed */
33846         result = (Xapian::ValueWeightPostingSource *)new SwigDirector_ValueWeightPostingSource(arg1,arg2);
33847       } else {
33848         result = (Xapian::ValueWeightPostingSource *)new Xapian::ValueWeightPostingSource(arg2);
33849       }
33850 
33851       DATA_PTR(self) = result;
33852     } catch (...) {
33853       string msg;
33854       int code = XapianExceptionHandler(msg);
33855       SWIG_exception(code, msg.c_str());
33856     }
33857   }
33858   return self;
33859 fail:
33860   return Qnil;
33861 }
33862 
33863 
33864 SWIGINTERN VALUE
_wrap_ValueWeightPostingSource_weight(int argc,VALUE * argv,VALUE self)33865 _wrap_ValueWeightPostingSource_weight(int argc, VALUE *argv, VALUE self) {
33866   Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
33867   void *argp1 = 0 ;
33868   int res1 = 0 ;
33869   Swig::Director *director = 0;
33870   bool upcall = false;
33871   double result;
33872   VALUE vresult = Qnil;
33873 
33874   if ((argc < 0) || (argc > 0)) {
33875     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
33876   }
33877   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueWeightPostingSource, 0 |  0 );
33878   if (!SWIG_IsOK(res1)) {
33879     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueWeightPostingSource const *","get_weight", 1, self ));
33880   }
33881   arg1 = reinterpret_cast< Xapian::ValueWeightPostingSource * >(argp1);
33882   director = dynamic_cast<Swig::Director *>(arg1);
33883   upcall = (director && (director->swig_get_self() == self));
33884   try {
33885     {
33886       try {
33887         if (upcall) {
33888           result = (double)((Xapian::ValueWeightPostingSource const *)arg1)->Xapian::ValueWeightPostingSource::get_weight();
33889         } else {
33890           result = (double)((Xapian::ValueWeightPostingSource const *)arg1)->get_weight();
33891         }
33892       } catch (...) {
33893         string msg;
33894         int code = XapianExceptionHandler(msg);
33895         SWIG_exception(code, msg.c_str());
33896       }
33897     }
33898   } catch (Swig::DirectorException& e) {
33899     rb_exc_raise(e.getError());
33900     SWIG_fail;
33901   }
33902   vresult = SWIG_From_double(static_cast< double >(result));
33903   return vresult;
33904 fail:
33905   return Qnil;
33906 }
33907 
33908 
33909 SWIGINTERN VALUE
_wrap_ValueWeightPostingSource_name(int argc,VALUE * argv,VALUE self)33910 _wrap_ValueWeightPostingSource_name(int argc, VALUE *argv, VALUE self) {
33911   Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
33912   void *argp1 = 0 ;
33913   int res1 = 0 ;
33914   Swig::Director *director = 0;
33915   bool upcall = false;
33916   std::string result;
33917   VALUE vresult = Qnil;
33918 
33919   if ((argc < 0) || (argc > 0)) {
33920     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
33921   }
33922   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueWeightPostingSource, 0 |  0 );
33923   if (!SWIG_IsOK(res1)) {
33924     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueWeightPostingSource const *","name", 1, self ));
33925   }
33926   arg1 = reinterpret_cast< Xapian::ValueWeightPostingSource * >(argp1);
33927   director = dynamic_cast<Swig::Director *>(arg1);
33928   upcall = (director && (director->swig_get_self() == self));
33929   try {
33930     {
33931       try {
33932         if (upcall) {
33933           result = ((Xapian::ValueWeightPostingSource const *)arg1)->Xapian::ValueWeightPostingSource::name();
33934         } else {
33935           result = ((Xapian::ValueWeightPostingSource const *)arg1)->name();
33936         }
33937       } catch (...) {
33938         string msg;
33939         int code = XapianExceptionHandler(msg);
33940         SWIG_exception(code, msg.c_str());
33941       }
33942     }
33943   } catch (Swig::DirectorException& e) {
33944     rb_exc_raise(e.getError());
33945     SWIG_fail;
33946   }
33947   vresult = SWIG_From_std_string(static_cast< std::string >(result));
33948   return vresult;
33949 fail:
33950   return Qnil;
33951 }
33952 
33953 
33954 SWIGINTERN VALUE
_wrap_ValueWeightPostingSource_init(int argc,VALUE * argv,VALUE self)33955 _wrap_ValueWeightPostingSource_init(int argc, VALUE *argv, VALUE self) {
33956   Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
33957   Xapian::Database *arg2 = 0 ;
33958   void *argp1 = 0 ;
33959   int res1 = 0 ;
33960   void *argp2 ;
33961   int res2 = 0 ;
33962   Swig::Director *director = 0;
33963   bool upcall = false;
33964 
33965   if ((argc < 1) || (argc > 1)) {
33966     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
33967   }
33968   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueWeightPostingSource, 0 |  0 );
33969   if (!SWIG_IsOK(res1)) {
33970     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueWeightPostingSource *","init", 1, self ));
33971   }
33972   arg1 = reinterpret_cast< Xapian::ValueWeightPostingSource * >(argp1);
33973   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Database,  0 );
33974   if (!SWIG_IsOK(res2)) {
33975     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Database const &","init", 2, argv[0] ));
33976   }
33977   if (!argp2) {
33978     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Database const &","init", 2, argv[0]));
33979   }
33980   arg2 = reinterpret_cast< Xapian::Database * >(argp2);
33981   director = dynamic_cast<Swig::Director *>(arg1);
33982   upcall = (director && (director->swig_get_self() == self));
33983   try {
33984     {
33985       try {
33986         if (upcall) {
33987           (arg1)->Xapian::ValueWeightPostingSource::init((Xapian::Database const &)*arg2);
33988         } else {
33989           (arg1)->init((Xapian::Database const &)*arg2);
33990         }
33991       } catch (...) {
33992         string msg;
33993         int code = XapianExceptionHandler(msg);
33994         SWIG_exception(code, msg.c_str());
33995       }
33996     }
33997   } catch (Swig::DirectorException& e) {
33998     rb_exc_raise(e.getError());
33999     SWIG_fail;
34000   }
34001   return Qnil;
34002 fail:
34003   return Qnil;
34004 }
34005 
34006 
34007 SWIGINTERN VALUE
_wrap_ValueWeightPostingSource_description(int argc,VALUE * argv,VALUE self)34008 _wrap_ValueWeightPostingSource_description(int argc, VALUE *argv, VALUE self) {
34009   Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
34010   void *argp1 = 0 ;
34011   int res1 = 0 ;
34012   Swig::Director *director = 0;
34013   bool upcall = false;
34014   std::string result;
34015   VALUE vresult = Qnil;
34016 
34017   if ((argc < 0) || (argc > 0)) {
34018     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
34019   }
34020   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueWeightPostingSource, 0 |  0 );
34021   if (!SWIG_IsOK(res1)) {
34022     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueWeightPostingSource const *","get_description", 1, self ));
34023   }
34024   arg1 = reinterpret_cast< Xapian::ValueWeightPostingSource * >(argp1);
34025   director = dynamic_cast<Swig::Director *>(arg1);
34026   upcall = (director && (director->swig_get_self() == self));
34027   try {
34028     {
34029       try {
34030         if (upcall) {
34031           result = ((Xapian::ValueWeightPostingSource const *)arg1)->Xapian::ValueWeightPostingSource::get_description();
34032         } else {
34033           result = ((Xapian::ValueWeightPostingSource const *)arg1)->get_description();
34034         }
34035       } catch (...) {
34036         string msg;
34037         int code = XapianExceptionHandler(msg);
34038         SWIG_exception(code, msg.c_str());
34039       }
34040     }
34041   } catch (Swig::DirectorException& e) {
34042     rb_exc_raise(e.getError());
34043     SWIG_fail;
34044   }
34045   vresult = SWIG_From_std_string(static_cast< std::string >(result));
34046   return vresult;
34047 fail:
34048   return Qnil;
34049 }
34050 
34051 
34052 SWIGINTERN void
free_Xapian_ValueWeightPostingSource(void * self)34053 free_Xapian_ValueWeightPostingSource(void *self) {
34054     Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *)self;
34055     delete arg1;
34056 }
34057 
34058 SWIGINTERN VALUE
_wrap_disown_ValueWeightPostingSource(int argc,VALUE * argv,VALUE self)34059 _wrap_disown_ValueWeightPostingSource(int argc, VALUE *argv, VALUE self) {
34060   Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
34061   void *argp1 = 0 ;
34062   int res1 = 0 ;
34063 
34064   if ((argc < 1) || (argc > 1)) {
34065     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
34066   }
34067   res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Xapian__ValueWeightPostingSource, 0 |  0 );
34068   if (!SWIG_IsOK(res1)) {
34069     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueWeightPostingSource *","disown_ValueWeightPostingSource", 1, argv[0] ));
34070   }
34071   arg1 = reinterpret_cast< Xapian::ValueWeightPostingSource * >(argp1);
34072   {
34073     Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
34074     if (director) director->swig_disown();
34075   }
34076 
34077   return Qnil;
34078 fail:
34079   return Qnil;
34080 }
34081 
34082 
34083 static swig_class SwigClassDecreasingValueWeightPostingSource;
34084 
34085 SWIGINTERN VALUE
_wrap_new_DecreasingValueWeightPostingSource__SWIG_0(int argc,VALUE * argv,VALUE self)34086 _wrap_new_DecreasingValueWeightPostingSource__SWIG_0(int argc, VALUE *argv, VALUE self) {
34087   Xapian::valueno arg1 ;
34088   Xapian::docid arg2 ;
34089   Xapian::docid arg3 ;
34090   unsigned int val1 ;
34091   int ecode1 = 0 ;
34092   unsigned int val2 ;
34093   int ecode2 = 0 ;
34094   unsigned int val3 ;
34095   int ecode3 = 0 ;
34096   const char *classname SWIGUNUSED = "Xapian::DecreasingValueWeightPostingSource";
34097   Xapian::DecreasingValueWeightPostingSource *result = 0 ;
34098 
34099   if ((argc < 3) || (argc > 3)) {
34100     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
34101   }
34102   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
34103   if (!SWIG_IsOK(ecode1)) {
34104     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","DecreasingValueWeightPostingSource", 1, argv[0] ));
34105   }
34106   arg1 = static_cast< Xapian::valueno >(val1);
34107   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
34108   if (!SWIG_IsOK(ecode2)) {
34109     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","DecreasingValueWeightPostingSource", 2, argv[1] ));
34110   }
34111   arg2 = static_cast< Xapian::docid >(val2);
34112   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
34113   if (!SWIG_IsOK(ecode3)) {
34114     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::docid","DecreasingValueWeightPostingSource", 3, argv[2] ));
34115   }
34116   arg3 = static_cast< Xapian::docid >(val3);
34117   {
34118     try {
34119       result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1,arg2,arg3);
34120       DATA_PTR(self) = result;
34121     } catch (...) {
34122       string msg;
34123       int code = XapianExceptionHandler(msg);
34124       SWIG_exception(code, msg.c_str());
34125     }
34126   }
34127   return self;
34128 fail:
34129   return Qnil;
34130 }
34131 
34132 
34133 SWIGINTERN VALUE
_wrap_new_DecreasingValueWeightPostingSource__SWIG_1(int argc,VALUE * argv,VALUE self)34134 _wrap_new_DecreasingValueWeightPostingSource__SWIG_1(int argc, VALUE *argv, VALUE self) {
34135   Xapian::valueno arg1 ;
34136   Xapian::docid arg2 ;
34137   unsigned int val1 ;
34138   int ecode1 = 0 ;
34139   unsigned int val2 ;
34140   int ecode2 = 0 ;
34141   const char *classname SWIGUNUSED = "Xapian::DecreasingValueWeightPostingSource";
34142   Xapian::DecreasingValueWeightPostingSource *result = 0 ;
34143 
34144   if ((argc < 2) || (argc > 2)) {
34145     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
34146   }
34147   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
34148   if (!SWIG_IsOK(ecode1)) {
34149     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","DecreasingValueWeightPostingSource", 1, argv[0] ));
34150   }
34151   arg1 = static_cast< Xapian::valueno >(val1);
34152   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
34153   if (!SWIG_IsOK(ecode2)) {
34154     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","DecreasingValueWeightPostingSource", 2, argv[1] ));
34155   }
34156   arg2 = static_cast< Xapian::docid >(val2);
34157   {
34158     try {
34159       result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1,arg2);
34160       DATA_PTR(self) = result;
34161     } catch (...) {
34162       string msg;
34163       int code = XapianExceptionHandler(msg);
34164       SWIG_exception(code, msg.c_str());
34165     }
34166   }
34167   return self;
34168 fail:
34169   return Qnil;
34170 }
34171 
34172 
34173 SWIGINTERN VALUE
34174 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_DecreasingValueWeightPostingSource_allocate(VALUE self)34175 _wrap_DecreasingValueWeightPostingSource_allocate(VALUE self)
34176 #else
34177 _wrap_DecreasingValueWeightPostingSource_allocate(int argc, VALUE *argv, VALUE self)
34178 #endif
34179 {
34180   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource);
34181 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
34182   rb_obj_call_init(vresult, argc, argv);
34183 #endif
34184   return vresult;
34185 }
34186 
34187 
34188 SWIGINTERN VALUE
_wrap_new_DecreasingValueWeightPostingSource__SWIG_2(int argc,VALUE * argv,VALUE self)34189 _wrap_new_DecreasingValueWeightPostingSource__SWIG_2(int argc, VALUE *argv, VALUE self) {
34190   Xapian::valueno arg1 ;
34191   unsigned int val1 ;
34192   int ecode1 = 0 ;
34193   const char *classname SWIGUNUSED = "Xapian::DecreasingValueWeightPostingSource";
34194   Xapian::DecreasingValueWeightPostingSource *result = 0 ;
34195 
34196   if ((argc < 1) || (argc > 1)) {
34197     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
34198   }
34199   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
34200   if (!SWIG_IsOK(ecode1)) {
34201     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","DecreasingValueWeightPostingSource", 1, argv[0] ));
34202   }
34203   arg1 = static_cast< Xapian::valueno >(val1);
34204   {
34205     try {
34206       result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1);
34207       DATA_PTR(self) = result;
34208     } catch (...) {
34209       string msg;
34210       int code = XapianExceptionHandler(msg);
34211       SWIG_exception(code, msg.c_str());
34212     }
34213   }
34214   return self;
34215 fail:
34216   return Qnil;
34217 }
34218 
34219 
_wrap_new_DecreasingValueWeightPostingSource(int nargs,VALUE * args,VALUE self)34220 SWIGINTERN VALUE _wrap_new_DecreasingValueWeightPostingSource(int nargs, VALUE *args, VALUE self) {
34221   int argc;
34222   VALUE argv[3];
34223   int ii;
34224 
34225   argc = nargs;
34226   if (argc > 3) SWIG_fail;
34227   for (ii = 0; (ii < argc); ++ii) {
34228     argv[ii] = args[ii];
34229   }
34230   if (argc == 1) {
34231     int _v;
34232     {
34233       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
34234       _v = SWIG_CheckState(res);
34235     }
34236     if (_v) {
34237       return _wrap_new_DecreasingValueWeightPostingSource__SWIG_2(nargs, args, self);
34238     }
34239   }
34240   if (argc == 2) {
34241     int _v;
34242     {
34243       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
34244       _v = SWIG_CheckState(res);
34245     }
34246     if (_v) {
34247       {
34248         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
34249         _v = SWIG_CheckState(res);
34250       }
34251       if (_v) {
34252         return _wrap_new_DecreasingValueWeightPostingSource__SWIG_1(nargs, args, self);
34253       }
34254     }
34255   }
34256   if (argc == 3) {
34257     int _v;
34258     {
34259       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
34260       _v = SWIG_CheckState(res);
34261     }
34262     if (_v) {
34263       {
34264         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
34265         _v = SWIG_CheckState(res);
34266       }
34267       if (_v) {
34268         {
34269           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
34270           _v = SWIG_CheckState(res);
34271         }
34272         if (_v) {
34273           return _wrap_new_DecreasingValueWeightPostingSource__SWIG_0(nargs, args, self);
34274         }
34275       }
34276     }
34277   }
34278 
34279 fail:
34280   Ruby_Format_OverloadedError( argc, 3, "DecreasingValueWeightPostingSource.new",
34281     "    DecreasingValueWeightPostingSource.new(Xapian::valueno slot_, Xapian::docid range_start_, Xapian::docid range_end_)\n"
34282     "    DecreasingValueWeightPostingSource.new(Xapian::valueno slot_, Xapian::docid range_start_)\n"
34283     "    DecreasingValueWeightPostingSource.new(Xapian::valueno slot_)\n");
34284 
34285   return Qnil;
34286 }
34287 
34288 
34289 SWIGINTERN VALUE
_wrap_DecreasingValueWeightPostingSource_weight(int argc,VALUE * argv,VALUE self)34290 _wrap_DecreasingValueWeightPostingSource_weight(int argc, VALUE *argv, VALUE self) {
34291   Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
34292   void *argp1 = 0 ;
34293   int res1 = 0 ;
34294   double result;
34295   VALUE vresult = Qnil;
34296 
34297   if ((argc < 0) || (argc > 0)) {
34298     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
34299   }
34300   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
34301   if (!SWIG_IsOK(res1)) {
34302     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::DecreasingValueWeightPostingSource const *","get_weight", 1, self ));
34303   }
34304   arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
34305   {
34306     try {
34307       result = (double)((Xapian::DecreasingValueWeightPostingSource const *)arg1)->get_weight();
34308     } catch (...) {
34309       string msg;
34310       int code = XapianExceptionHandler(msg);
34311       SWIG_exception(code, msg.c_str());
34312     }
34313   }
34314   vresult = SWIG_From_double(static_cast< double >(result));
34315   return vresult;
34316 fail:
34317   return Qnil;
34318 }
34319 
34320 
34321 SWIGINTERN VALUE
_wrap_DecreasingValueWeightPostingSource_name(int argc,VALUE * argv,VALUE self)34322 _wrap_DecreasingValueWeightPostingSource_name(int argc, VALUE *argv, VALUE self) {
34323   Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
34324   void *argp1 = 0 ;
34325   int res1 = 0 ;
34326   std::string result;
34327   VALUE vresult = Qnil;
34328 
34329   if ((argc < 0) || (argc > 0)) {
34330     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
34331   }
34332   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
34333   if (!SWIG_IsOK(res1)) {
34334     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::DecreasingValueWeightPostingSource const *","name", 1, self ));
34335   }
34336   arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
34337   {
34338     try {
34339       result = ((Xapian::DecreasingValueWeightPostingSource const *)arg1)->name();
34340     } catch (...) {
34341       string msg;
34342       int code = XapianExceptionHandler(msg);
34343       SWIG_exception(code, msg.c_str());
34344     }
34345   }
34346   vresult = SWIG_From_std_string(static_cast< std::string >(result));
34347   return vresult;
34348 fail:
34349   return Qnil;
34350 }
34351 
34352 
34353 SWIGINTERN VALUE
_wrap_DecreasingValueWeightPostingSource_init(int argc,VALUE * argv,VALUE self)34354 _wrap_DecreasingValueWeightPostingSource_init(int argc, VALUE *argv, VALUE self) {
34355   Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
34356   Xapian::Database *arg2 = 0 ;
34357   void *argp1 = 0 ;
34358   int res1 = 0 ;
34359   void *argp2 ;
34360   int res2 = 0 ;
34361 
34362   if ((argc < 1) || (argc > 1)) {
34363     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
34364   }
34365   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
34366   if (!SWIG_IsOK(res1)) {
34367     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::DecreasingValueWeightPostingSource *","init", 1, self ));
34368   }
34369   arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
34370   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Database,  0 );
34371   if (!SWIG_IsOK(res2)) {
34372     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Database const &","init", 2, argv[0] ));
34373   }
34374   if (!argp2) {
34375     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Database const &","init", 2, argv[0]));
34376   }
34377   arg2 = reinterpret_cast< Xapian::Database * >(argp2);
34378   {
34379     try {
34380       (arg1)->init((Xapian::Database const &)*arg2);
34381     } catch (...) {
34382       string msg;
34383       int code = XapianExceptionHandler(msg);
34384       SWIG_exception(code, msg.c_str());
34385     }
34386   }
34387   return Qnil;
34388 fail:
34389   return Qnil;
34390 }
34391 
34392 
34393 SWIGINTERN VALUE
_wrap_DecreasingValueWeightPostingSource_next(int argc,VALUE * argv,VALUE self)34394 _wrap_DecreasingValueWeightPostingSource_next(int argc, VALUE *argv, VALUE self) {
34395   Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
34396   double arg2 ;
34397   void *argp1 = 0 ;
34398   int res1 = 0 ;
34399   double val2 ;
34400   int ecode2 = 0 ;
34401 
34402   if ((argc < 1) || (argc > 1)) {
34403     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
34404   }
34405   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
34406   if (!SWIG_IsOK(res1)) {
34407     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::DecreasingValueWeightPostingSource *","next", 1, self ));
34408   }
34409   arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
34410   ecode2 = SWIG_AsVal_double(argv[0], &val2);
34411   if (!SWIG_IsOK(ecode2)) {
34412     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","next", 2, argv[0] ));
34413   }
34414   arg2 = static_cast< double >(val2);
34415   {
34416     try {
34417       (arg1)->next(arg2);
34418     } catch (...) {
34419       string msg;
34420       int code = XapianExceptionHandler(msg);
34421       SWIG_exception(code, msg.c_str());
34422     }
34423   }
34424   return Qnil;
34425 fail:
34426   return Qnil;
34427 }
34428 
34429 
34430 SWIGINTERN VALUE
_wrap_DecreasingValueWeightPostingSource_skip_to(int argc,VALUE * argv,VALUE self)34431 _wrap_DecreasingValueWeightPostingSource_skip_to(int argc, VALUE *argv, VALUE self) {
34432   Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
34433   Xapian::docid arg2 ;
34434   double arg3 ;
34435   void *argp1 = 0 ;
34436   int res1 = 0 ;
34437   unsigned int val2 ;
34438   int ecode2 = 0 ;
34439   double val3 ;
34440   int ecode3 = 0 ;
34441 
34442   if ((argc < 2) || (argc > 2)) {
34443     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
34444   }
34445   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
34446   if (!SWIG_IsOK(res1)) {
34447     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::DecreasingValueWeightPostingSource *","skip_to", 1, self ));
34448   }
34449   arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
34450   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
34451   if (!SWIG_IsOK(ecode2)) {
34452     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","skip_to", 2, argv[0] ));
34453   }
34454   arg2 = static_cast< Xapian::docid >(val2);
34455   ecode3 = SWIG_AsVal_double(argv[1], &val3);
34456   if (!SWIG_IsOK(ecode3)) {
34457     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","skip_to", 3, argv[1] ));
34458   }
34459   arg3 = static_cast< double >(val3);
34460   {
34461     try {
34462       (arg1)->skip_to(arg2,arg3);
34463     } catch (...) {
34464       string msg;
34465       int code = XapianExceptionHandler(msg);
34466       SWIG_exception(code, msg.c_str());
34467     }
34468   }
34469   return Qnil;
34470 fail:
34471   return Qnil;
34472 }
34473 
34474 
34475 SWIGINTERN VALUE
_wrap_DecreasingValueWeightPostingSource_check(int argc,VALUE * argv,VALUE self)34476 _wrap_DecreasingValueWeightPostingSource_check(int argc, VALUE *argv, VALUE self) {
34477   Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
34478   Xapian::docid arg2 ;
34479   double arg3 ;
34480   void *argp1 = 0 ;
34481   int res1 = 0 ;
34482   unsigned int val2 ;
34483   int ecode2 = 0 ;
34484   double val3 ;
34485   int ecode3 = 0 ;
34486   bool result;
34487   VALUE vresult = Qnil;
34488 
34489   if ((argc < 2) || (argc > 2)) {
34490     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
34491   }
34492   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
34493   if (!SWIG_IsOK(res1)) {
34494     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::DecreasingValueWeightPostingSource *","check", 1, self ));
34495   }
34496   arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
34497   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
34498   if (!SWIG_IsOK(ecode2)) {
34499     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","check", 2, argv[0] ));
34500   }
34501   arg2 = static_cast< Xapian::docid >(val2);
34502   ecode3 = SWIG_AsVal_double(argv[1], &val3);
34503   if (!SWIG_IsOK(ecode3)) {
34504     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","check", 3, argv[1] ));
34505   }
34506   arg3 = static_cast< double >(val3);
34507   {
34508     try {
34509       result = (bool)(arg1)->check(arg2,arg3);
34510     } catch (...) {
34511       string msg;
34512       int code = XapianExceptionHandler(msg);
34513       SWIG_exception(code, msg.c_str());
34514     }
34515   }
34516   vresult = SWIG_From_bool(static_cast< bool >(result));
34517   return vresult;
34518 fail:
34519   return Qnil;
34520 }
34521 
34522 
34523 SWIGINTERN VALUE
_wrap_DecreasingValueWeightPostingSource_description(int argc,VALUE * argv,VALUE self)34524 _wrap_DecreasingValueWeightPostingSource_description(int argc, VALUE *argv, VALUE self) {
34525   Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
34526   void *argp1 = 0 ;
34527   int res1 = 0 ;
34528   std::string result;
34529   VALUE vresult = Qnil;
34530 
34531   if ((argc < 0) || (argc > 0)) {
34532     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
34533   }
34534   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
34535   if (!SWIG_IsOK(res1)) {
34536     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::DecreasingValueWeightPostingSource const *","get_description", 1, self ));
34537   }
34538   arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
34539   {
34540     try {
34541       result = ((Xapian::DecreasingValueWeightPostingSource const *)arg1)->get_description();
34542     } catch (...) {
34543       string msg;
34544       int code = XapianExceptionHandler(msg);
34545       SWIG_exception(code, msg.c_str());
34546     }
34547   }
34548   vresult = SWIG_From_std_string(static_cast< std::string >(result));
34549   return vresult;
34550 fail:
34551   return Qnil;
34552 }
34553 
34554 
34555 SWIGINTERN void
free_Xapian_DecreasingValueWeightPostingSource(void * self)34556 free_Xapian_DecreasingValueWeightPostingSource(void *self) {
34557     Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *)self;
34558     delete arg1;
34559 }
34560 
34561 static swig_class SwigClassValueMapPostingSource;
34562 
34563 SWIGINTERN VALUE
34564 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_ValueMapPostingSource_allocate(VALUE self)34565 _wrap_ValueMapPostingSource_allocate(VALUE self)
34566 #else
34567 _wrap_ValueMapPostingSource_allocate(int argc, VALUE *argv, VALUE self)
34568 #endif
34569 {
34570   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__ValueMapPostingSource);
34571 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
34572   rb_obj_call_init(vresult, argc, argv);
34573 #endif
34574   return vresult;
34575 }
34576 
34577 
34578 SWIGINTERN VALUE
_wrap_new_ValueMapPostingSource(int argc,VALUE * argv,VALUE self)34579 _wrap_new_ValueMapPostingSource(int argc, VALUE *argv, VALUE self) {
34580   Xapian::valueno arg1 ;
34581   unsigned int val1 ;
34582   int ecode1 = 0 ;
34583   const char *classname SWIGUNUSED = "Xapian::ValueMapPostingSource";
34584   Xapian::ValueMapPostingSource *result = 0 ;
34585 
34586   if ((argc < 1) || (argc > 1)) {
34587     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
34588   }
34589   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
34590   if (!SWIG_IsOK(ecode1)) {
34591     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","ValueMapPostingSource", 1, argv[0] ));
34592   }
34593   arg1 = static_cast< Xapian::valueno >(val1);
34594   {
34595     try {
34596       result = (Xapian::ValueMapPostingSource *)new Xapian::ValueMapPostingSource(arg1);
34597       DATA_PTR(self) = result;
34598     } catch (...) {
34599       string msg;
34600       int code = XapianExceptionHandler(msg);
34601       SWIG_exception(code, msg.c_str());
34602     }
34603   }
34604   return self;
34605 fail:
34606   return Qnil;
34607 }
34608 
34609 
34610 SWIGINTERN VALUE
_wrap_ValueMapPostingSource_add_mapping(int argc,VALUE * argv,VALUE self)34611 _wrap_ValueMapPostingSource_add_mapping(int argc, VALUE *argv, VALUE self) {
34612   Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
34613   std::string *arg2 = 0 ;
34614   double arg3 ;
34615   void *argp1 = 0 ;
34616   int res1 = 0 ;
34617   int res2 = SWIG_OLDOBJ ;
34618   double val3 ;
34619   int ecode3 = 0 ;
34620 
34621   if ((argc < 2) || (argc > 2)) {
34622     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
34623   }
34624   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, 0 |  0 );
34625   if (!SWIG_IsOK(res1)) {
34626     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueMapPostingSource *","add_mapping", 1, self ));
34627   }
34628   arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
34629   {
34630     std::string *ptr = (std::string *)0;
34631     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
34632     if (!SWIG_IsOK(res2)) {
34633       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","add_mapping", 2, argv[0] ));
34634     }
34635     if (!ptr) {
34636       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_mapping", 2, argv[0]));
34637     }
34638     arg2 = ptr;
34639   }
34640   ecode3 = SWIG_AsVal_double(argv[1], &val3);
34641   if (!SWIG_IsOK(ecode3)) {
34642     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","add_mapping", 3, argv[1] ));
34643   }
34644   arg3 = static_cast< double >(val3);
34645   {
34646     try {
34647       (arg1)->add_mapping((std::string const &)*arg2,arg3);
34648     } catch (...) {
34649       string msg;
34650       int code = XapianExceptionHandler(msg);
34651       SWIG_exception(code, msg.c_str());
34652     }
34653   }
34654   if (SWIG_IsNewObj(res2)) delete arg2;
34655   return Qnil;
34656 fail:
34657   if (SWIG_IsNewObj(res2)) delete arg2;
34658   return Qnil;
34659 }
34660 
34661 
34662 SWIGINTERN VALUE
_wrap_ValueMapPostingSource_clear_mappings(int argc,VALUE * argv,VALUE self)34663 _wrap_ValueMapPostingSource_clear_mappings(int argc, VALUE *argv, VALUE self) {
34664   Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
34665   void *argp1 = 0 ;
34666   int res1 = 0 ;
34667 
34668   if ((argc < 0) || (argc > 0)) {
34669     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
34670   }
34671   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, 0 |  0 );
34672   if (!SWIG_IsOK(res1)) {
34673     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueMapPostingSource *","clear_mappings", 1, self ));
34674   }
34675   arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
34676   {
34677     try {
34678       (arg1)->clear_mappings();
34679     } catch (...) {
34680       string msg;
34681       int code = XapianExceptionHandler(msg);
34682       SWIG_exception(code, msg.c_str());
34683     }
34684   }
34685   return Qnil;
34686 fail:
34687   return Qnil;
34688 }
34689 
34690 
34691 SWIGINTERN VALUE
_wrap_ValueMapPostingSource_set_default_weight(int argc,VALUE * argv,VALUE self)34692 _wrap_ValueMapPostingSource_set_default_weight(int argc, VALUE *argv, VALUE self) {
34693   Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
34694   double arg2 ;
34695   void *argp1 = 0 ;
34696   int res1 = 0 ;
34697   double val2 ;
34698   int ecode2 = 0 ;
34699 
34700   if ((argc < 1) || (argc > 1)) {
34701     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
34702   }
34703   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, 0 |  0 );
34704   if (!SWIG_IsOK(res1)) {
34705     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueMapPostingSource *","set_default_weight", 1, self ));
34706   }
34707   arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
34708   ecode2 = SWIG_AsVal_double(argv[0], &val2);
34709   if (!SWIG_IsOK(ecode2)) {
34710     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","set_default_weight", 2, argv[0] ));
34711   }
34712   arg2 = static_cast< double >(val2);
34713   {
34714     try {
34715       (arg1)->set_default_weight(arg2);
34716     } catch (...) {
34717       string msg;
34718       int code = XapianExceptionHandler(msg);
34719       SWIG_exception(code, msg.c_str());
34720     }
34721   }
34722   return Qnil;
34723 fail:
34724   return Qnil;
34725 }
34726 
34727 
34728 SWIGINTERN VALUE
_wrap_ValueMapPostingSource_weight(int argc,VALUE * argv,VALUE self)34729 _wrap_ValueMapPostingSource_weight(int argc, VALUE *argv, VALUE self) {
34730   Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
34731   void *argp1 = 0 ;
34732   int res1 = 0 ;
34733   double result;
34734   VALUE vresult = Qnil;
34735 
34736   if ((argc < 0) || (argc > 0)) {
34737     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
34738   }
34739   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, 0 |  0 );
34740   if (!SWIG_IsOK(res1)) {
34741     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueMapPostingSource const *","get_weight", 1, self ));
34742   }
34743   arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
34744   {
34745     try {
34746       result = (double)((Xapian::ValueMapPostingSource const *)arg1)->get_weight();
34747     } catch (...) {
34748       string msg;
34749       int code = XapianExceptionHandler(msg);
34750       SWIG_exception(code, msg.c_str());
34751     }
34752   }
34753   vresult = SWIG_From_double(static_cast< double >(result));
34754   return vresult;
34755 fail:
34756   return Qnil;
34757 }
34758 
34759 
34760 SWIGINTERN VALUE
_wrap_ValueMapPostingSource_name(int argc,VALUE * argv,VALUE self)34761 _wrap_ValueMapPostingSource_name(int argc, VALUE *argv, VALUE self) {
34762   Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
34763   void *argp1 = 0 ;
34764   int res1 = 0 ;
34765   std::string result;
34766   VALUE vresult = Qnil;
34767 
34768   if ((argc < 0) || (argc > 0)) {
34769     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
34770   }
34771   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, 0 |  0 );
34772   if (!SWIG_IsOK(res1)) {
34773     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueMapPostingSource const *","name", 1, self ));
34774   }
34775   arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
34776   {
34777     try {
34778       result = ((Xapian::ValueMapPostingSource const *)arg1)->name();
34779     } catch (...) {
34780       string msg;
34781       int code = XapianExceptionHandler(msg);
34782       SWIG_exception(code, msg.c_str());
34783     }
34784   }
34785   vresult = SWIG_From_std_string(static_cast< std::string >(result));
34786   return vresult;
34787 fail:
34788   return Qnil;
34789 }
34790 
34791 
34792 SWIGINTERN VALUE
_wrap_ValueMapPostingSource_init(int argc,VALUE * argv,VALUE self)34793 _wrap_ValueMapPostingSource_init(int argc, VALUE *argv, VALUE self) {
34794   Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
34795   Xapian::Database *arg2 = 0 ;
34796   void *argp1 = 0 ;
34797   int res1 = 0 ;
34798   void *argp2 ;
34799   int res2 = 0 ;
34800 
34801   if ((argc < 1) || (argc > 1)) {
34802     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
34803   }
34804   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, 0 |  0 );
34805   if (!SWIG_IsOK(res1)) {
34806     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueMapPostingSource *","init", 1, self ));
34807   }
34808   arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
34809   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Database,  0 );
34810   if (!SWIG_IsOK(res2)) {
34811     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Database const &","init", 2, argv[0] ));
34812   }
34813   if (!argp2) {
34814     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Database const &","init", 2, argv[0]));
34815   }
34816   arg2 = reinterpret_cast< Xapian::Database * >(argp2);
34817   {
34818     try {
34819       (arg1)->init((Xapian::Database const &)*arg2);
34820     } catch (...) {
34821       string msg;
34822       int code = XapianExceptionHandler(msg);
34823       SWIG_exception(code, msg.c_str());
34824     }
34825   }
34826   return Qnil;
34827 fail:
34828   return Qnil;
34829 }
34830 
34831 
34832 SWIGINTERN VALUE
_wrap_ValueMapPostingSource_description(int argc,VALUE * argv,VALUE self)34833 _wrap_ValueMapPostingSource_description(int argc, VALUE *argv, VALUE self) {
34834   Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
34835   void *argp1 = 0 ;
34836   int res1 = 0 ;
34837   std::string result;
34838   VALUE vresult = Qnil;
34839 
34840   if ((argc < 0) || (argc > 0)) {
34841     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
34842   }
34843   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, 0 |  0 );
34844   if (!SWIG_IsOK(res1)) {
34845     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueMapPostingSource const *","get_description", 1, self ));
34846   }
34847   arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
34848   {
34849     try {
34850       result = ((Xapian::ValueMapPostingSource const *)arg1)->get_description();
34851     } catch (...) {
34852       string msg;
34853       int code = XapianExceptionHandler(msg);
34854       SWIG_exception(code, msg.c_str());
34855     }
34856   }
34857   vresult = SWIG_From_std_string(static_cast< std::string >(result));
34858   return vresult;
34859 fail:
34860   return Qnil;
34861 }
34862 
34863 
34864 SWIGINTERN void
free_Xapian_ValueMapPostingSource(void * self)34865 free_Xapian_ValueMapPostingSource(void *self) {
34866     Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *)self;
34867     delete arg1;
34868 }
34869 
34870 static swig_class SwigClassFixedWeightPostingSource;
34871 
34872 SWIGINTERN VALUE
34873 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_FixedWeightPostingSource_allocate(VALUE self)34874 _wrap_FixedWeightPostingSource_allocate(VALUE self)
34875 #else
34876 _wrap_FixedWeightPostingSource_allocate(int argc, VALUE *argv, VALUE self)
34877 #endif
34878 {
34879   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__FixedWeightPostingSource);
34880 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
34881   rb_obj_call_init(vresult, argc, argv);
34882 #endif
34883   return vresult;
34884 }
34885 
34886 
34887 SWIGINTERN VALUE
_wrap_new_FixedWeightPostingSource(int argc,VALUE * argv,VALUE self)34888 _wrap_new_FixedWeightPostingSource(int argc, VALUE *argv, VALUE self) {
34889   double arg1 ;
34890   double val1 ;
34891   int ecode1 = 0 ;
34892   const char *classname SWIGUNUSED = "Xapian::FixedWeightPostingSource";
34893   Xapian::FixedWeightPostingSource *result = 0 ;
34894 
34895   if ((argc < 1) || (argc > 1)) {
34896     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
34897   }
34898   ecode1 = SWIG_AsVal_double(argv[0], &val1);
34899   if (!SWIG_IsOK(ecode1)) {
34900     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","FixedWeightPostingSource", 1, argv[0] ));
34901   }
34902   arg1 = static_cast< double >(val1);
34903   {
34904     try {
34905       result = (Xapian::FixedWeightPostingSource *)new Xapian::FixedWeightPostingSource(arg1);
34906       DATA_PTR(self) = result;
34907     } catch (...) {
34908       string msg;
34909       int code = XapianExceptionHandler(msg);
34910       SWIG_exception(code, msg.c_str());
34911     }
34912   }
34913   return self;
34914 fail:
34915   return Qnil;
34916 }
34917 
34918 
34919 SWIGINTERN VALUE
_wrap_FixedWeightPostingSource_get_termfreq_min(int argc,VALUE * argv,VALUE self)34920 _wrap_FixedWeightPostingSource_get_termfreq_min(int argc, VALUE *argv, VALUE self) {
34921   Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
34922   void *argp1 = 0 ;
34923   int res1 = 0 ;
34924   Xapian::doccount result;
34925   VALUE vresult = Qnil;
34926 
34927   if ((argc < 0) || (argc > 0)) {
34928     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
34929   }
34930   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
34931   if (!SWIG_IsOK(res1)) {
34932     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::FixedWeightPostingSource const *","get_termfreq_min", 1, self ));
34933   }
34934   arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
34935   {
34936     try {
34937       result = (Xapian::doccount)((Xapian::FixedWeightPostingSource const *)arg1)->get_termfreq_min();
34938     } catch (...) {
34939       string msg;
34940       int code = XapianExceptionHandler(msg);
34941       SWIG_exception(code, msg.c_str());
34942     }
34943   }
34944   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
34945   return vresult;
34946 fail:
34947   return Qnil;
34948 }
34949 
34950 
34951 SWIGINTERN VALUE
_wrap_FixedWeightPostingSource_get_termfreq_est(int argc,VALUE * argv,VALUE self)34952 _wrap_FixedWeightPostingSource_get_termfreq_est(int argc, VALUE *argv, VALUE self) {
34953   Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
34954   void *argp1 = 0 ;
34955   int res1 = 0 ;
34956   Xapian::doccount result;
34957   VALUE vresult = Qnil;
34958 
34959   if ((argc < 0) || (argc > 0)) {
34960     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
34961   }
34962   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
34963   if (!SWIG_IsOK(res1)) {
34964     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::FixedWeightPostingSource const *","get_termfreq_est", 1, self ));
34965   }
34966   arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
34967   {
34968     try {
34969       result = (Xapian::doccount)((Xapian::FixedWeightPostingSource const *)arg1)->get_termfreq_est();
34970     } catch (...) {
34971       string msg;
34972       int code = XapianExceptionHandler(msg);
34973       SWIG_exception(code, msg.c_str());
34974     }
34975   }
34976   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
34977   return vresult;
34978 fail:
34979   return Qnil;
34980 }
34981 
34982 
34983 SWIGINTERN VALUE
_wrap_FixedWeightPostingSource_get_termfreq_max(int argc,VALUE * argv,VALUE self)34984 _wrap_FixedWeightPostingSource_get_termfreq_max(int argc, VALUE *argv, VALUE self) {
34985   Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
34986   void *argp1 = 0 ;
34987   int res1 = 0 ;
34988   Xapian::doccount result;
34989   VALUE vresult = Qnil;
34990 
34991   if ((argc < 0) || (argc > 0)) {
34992     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
34993   }
34994   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
34995   if (!SWIG_IsOK(res1)) {
34996     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::FixedWeightPostingSource const *","get_termfreq_max", 1, self ));
34997   }
34998   arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
34999   {
35000     try {
35001       result = (Xapian::doccount)((Xapian::FixedWeightPostingSource const *)arg1)->get_termfreq_max();
35002     } catch (...) {
35003       string msg;
35004       int code = XapianExceptionHandler(msg);
35005       SWIG_exception(code, msg.c_str());
35006     }
35007   }
35008   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
35009   return vresult;
35010 fail:
35011   return Qnil;
35012 }
35013 
35014 
35015 SWIGINTERN VALUE
_wrap_FixedWeightPostingSource_weight(int argc,VALUE * argv,VALUE self)35016 _wrap_FixedWeightPostingSource_weight(int argc, VALUE *argv, VALUE self) {
35017   Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
35018   void *argp1 = 0 ;
35019   int res1 = 0 ;
35020   double result;
35021   VALUE vresult = Qnil;
35022 
35023   if ((argc < 0) || (argc > 0)) {
35024     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
35025   }
35026   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
35027   if (!SWIG_IsOK(res1)) {
35028     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::FixedWeightPostingSource const *","get_weight", 1, self ));
35029   }
35030   arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
35031   {
35032     try {
35033       result = (double)((Xapian::FixedWeightPostingSource const *)arg1)->get_weight();
35034     } catch (...) {
35035       string msg;
35036       int code = XapianExceptionHandler(msg);
35037       SWIG_exception(code, msg.c_str());
35038     }
35039   }
35040   vresult = SWIG_From_double(static_cast< double >(result));
35041   return vresult;
35042 fail:
35043   return Qnil;
35044 }
35045 
35046 
35047 SWIGINTERN VALUE
_wrap_FixedWeightPostingSource_next(int argc,VALUE * argv,VALUE self)35048 _wrap_FixedWeightPostingSource_next(int argc, VALUE *argv, VALUE self) {
35049   Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
35050   double arg2 ;
35051   void *argp1 = 0 ;
35052   int res1 = 0 ;
35053   double val2 ;
35054   int ecode2 = 0 ;
35055 
35056   if ((argc < 1) || (argc > 1)) {
35057     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
35058   }
35059   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
35060   if (!SWIG_IsOK(res1)) {
35061     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::FixedWeightPostingSource *","next", 1, self ));
35062   }
35063   arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
35064   ecode2 = SWIG_AsVal_double(argv[0], &val2);
35065   if (!SWIG_IsOK(ecode2)) {
35066     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","next", 2, argv[0] ));
35067   }
35068   arg2 = static_cast< double >(val2);
35069   {
35070     try {
35071       (arg1)->next(arg2);
35072     } catch (...) {
35073       string msg;
35074       int code = XapianExceptionHandler(msg);
35075       SWIG_exception(code, msg.c_str());
35076     }
35077   }
35078   return Qnil;
35079 fail:
35080   return Qnil;
35081 }
35082 
35083 
35084 SWIGINTERN VALUE
_wrap_FixedWeightPostingSource_skip_to(int argc,VALUE * argv,VALUE self)35085 _wrap_FixedWeightPostingSource_skip_to(int argc, VALUE *argv, VALUE self) {
35086   Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
35087   Xapian::docid arg2 ;
35088   double arg3 ;
35089   void *argp1 = 0 ;
35090   int res1 = 0 ;
35091   unsigned int val2 ;
35092   int ecode2 = 0 ;
35093   double val3 ;
35094   int ecode3 = 0 ;
35095 
35096   if ((argc < 2) || (argc > 2)) {
35097     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
35098   }
35099   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
35100   if (!SWIG_IsOK(res1)) {
35101     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::FixedWeightPostingSource *","skip_to", 1, self ));
35102   }
35103   arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
35104   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
35105   if (!SWIG_IsOK(ecode2)) {
35106     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","skip_to", 2, argv[0] ));
35107   }
35108   arg2 = static_cast< Xapian::docid >(val2);
35109   ecode3 = SWIG_AsVal_double(argv[1], &val3);
35110   if (!SWIG_IsOK(ecode3)) {
35111     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","skip_to", 3, argv[1] ));
35112   }
35113   arg3 = static_cast< double >(val3);
35114   {
35115     try {
35116       (arg1)->skip_to(arg2,arg3);
35117     } catch (...) {
35118       string msg;
35119       int code = XapianExceptionHandler(msg);
35120       SWIG_exception(code, msg.c_str());
35121     }
35122   }
35123   return Qnil;
35124 fail:
35125   return Qnil;
35126 }
35127 
35128 
35129 SWIGINTERN VALUE
_wrap_FixedWeightPostingSource_check(int argc,VALUE * argv,VALUE self)35130 _wrap_FixedWeightPostingSource_check(int argc, VALUE *argv, VALUE self) {
35131   Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
35132   Xapian::docid arg2 ;
35133   double arg3 ;
35134   void *argp1 = 0 ;
35135   int res1 = 0 ;
35136   unsigned int val2 ;
35137   int ecode2 = 0 ;
35138   double val3 ;
35139   int ecode3 = 0 ;
35140   bool result;
35141   VALUE vresult = Qnil;
35142 
35143   if ((argc < 2) || (argc > 2)) {
35144     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
35145   }
35146   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
35147   if (!SWIG_IsOK(res1)) {
35148     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::FixedWeightPostingSource *","check", 1, self ));
35149   }
35150   arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
35151   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
35152   if (!SWIG_IsOK(ecode2)) {
35153     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","check", 2, argv[0] ));
35154   }
35155   arg2 = static_cast< Xapian::docid >(val2);
35156   ecode3 = SWIG_AsVal_double(argv[1], &val3);
35157   if (!SWIG_IsOK(ecode3)) {
35158     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","check", 3, argv[1] ));
35159   }
35160   arg3 = static_cast< double >(val3);
35161   {
35162     try {
35163       result = (bool)(arg1)->check(arg2,arg3);
35164     } catch (...) {
35165       string msg;
35166       int code = XapianExceptionHandler(msg);
35167       SWIG_exception(code, msg.c_str());
35168     }
35169   }
35170   vresult = SWIG_From_bool(static_cast< bool >(result));
35171   return vresult;
35172 fail:
35173   return Qnil;
35174 }
35175 
35176 
35177 SWIGINTERN VALUE
_wrap_FixedWeightPostingSource_at_end(int argc,VALUE * argv,VALUE self)35178 _wrap_FixedWeightPostingSource_at_end(int argc, VALUE *argv, VALUE self) {
35179   Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
35180   void *argp1 = 0 ;
35181   int res1 = 0 ;
35182   bool result;
35183   VALUE vresult = Qnil;
35184 
35185   if ((argc < 0) || (argc > 0)) {
35186     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
35187   }
35188   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
35189   if (!SWIG_IsOK(res1)) {
35190     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::FixedWeightPostingSource const *","at_end", 1, self ));
35191   }
35192   arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
35193   {
35194     try {
35195       result = (bool)((Xapian::FixedWeightPostingSource const *)arg1)->at_end();
35196     } catch (...) {
35197       string msg;
35198       int code = XapianExceptionHandler(msg);
35199       SWIG_exception(code, msg.c_str());
35200     }
35201   }
35202   vresult = SWIG_From_bool(static_cast< bool >(result));
35203   return vresult;
35204 fail:
35205   return Qnil;
35206 }
35207 
35208 
35209 SWIGINTERN VALUE
_wrap_FixedWeightPostingSource_docid(int argc,VALUE * argv,VALUE self)35210 _wrap_FixedWeightPostingSource_docid(int argc, VALUE *argv, VALUE self) {
35211   Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
35212   void *argp1 = 0 ;
35213   int res1 = 0 ;
35214   Xapian::docid result;
35215   VALUE vresult = Qnil;
35216 
35217   if ((argc < 0) || (argc > 0)) {
35218     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
35219   }
35220   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
35221   if (!SWIG_IsOK(res1)) {
35222     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::FixedWeightPostingSource const *","get_docid", 1, self ));
35223   }
35224   arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
35225   {
35226     try {
35227       result = (Xapian::docid)((Xapian::FixedWeightPostingSource const *)arg1)->get_docid();
35228     } catch (...) {
35229       string msg;
35230       int code = XapianExceptionHandler(msg);
35231       SWIG_exception(code, msg.c_str());
35232     }
35233   }
35234   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
35235   return vresult;
35236 fail:
35237   return Qnil;
35238 }
35239 
35240 
35241 SWIGINTERN VALUE
_wrap_FixedWeightPostingSource_name(int argc,VALUE * argv,VALUE self)35242 _wrap_FixedWeightPostingSource_name(int argc, VALUE *argv, VALUE self) {
35243   Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
35244   void *argp1 = 0 ;
35245   int res1 = 0 ;
35246   std::string result;
35247   VALUE vresult = Qnil;
35248 
35249   if ((argc < 0) || (argc > 0)) {
35250     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
35251   }
35252   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
35253   if (!SWIG_IsOK(res1)) {
35254     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::FixedWeightPostingSource const *","name", 1, self ));
35255   }
35256   arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
35257   {
35258     try {
35259       result = ((Xapian::FixedWeightPostingSource const *)arg1)->name();
35260     } catch (...) {
35261       string msg;
35262       int code = XapianExceptionHandler(msg);
35263       SWIG_exception(code, msg.c_str());
35264     }
35265   }
35266   vresult = SWIG_From_std_string(static_cast< std::string >(result));
35267   return vresult;
35268 fail:
35269   return Qnil;
35270 }
35271 
35272 
35273 SWIGINTERN VALUE
_wrap_FixedWeightPostingSource_init(int argc,VALUE * argv,VALUE self)35274 _wrap_FixedWeightPostingSource_init(int argc, VALUE *argv, VALUE self) {
35275   Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
35276   Xapian::Database *arg2 = 0 ;
35277   void *argp1 = 0 ;
35278   int res1 = 0 ;
35279   void *argp2 ;
35280   int res2 = 0 ;
35281 
35282   if ((argc < 1) || (argc > 1)) {
35283     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
35284   }
35285   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
35286   if (!SWIG_IsOK(res1)) {
35287     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::FixedWeightPostingSource *","init", 1, self ));
35288   }
35289   arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
35290   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Database,  0 );
35291   if (!SWIG_IsOK(res2)) {
35292     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Database const &","init", 2, argv[0] ));
35293   }
35294   if (!argp2) {
35295     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Database const &","init", 2, argv[0]));
35296   }
35297   arg2 = reinterpret_cast< Xapian::Database * >(argp2);
35298   {
35299     try {
35300       (arg1)->init((Xapian::Database const &)*arg2);
35301     } catch (...) {
35302       string msg;
35303       int code = XapianExceptionHandler(msg);
35304       SWIG_exception(code, msg.c_str());
35305     }
35306   }
35307   return Qnil;
35308 fail:
35309   return Qnil;
35310 }
35311 
35312 
35313 SWIGINTERN VALUE
_wrap_FixedWeightPostingSource_description(int argc,VALUE * argv,VALUE self)35314 _wrap_FixedWeightPostingSource_description(int argc, VALUE *argv, VALUE self) {
35315   Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
35316   void *argp1 = 0 ;
35317   int res1 = 0 ;
35318   std::string result;
35319   VALUE vresult = Qnil;
35320 
35321   if ((argc < 0) || (argc > 0)) {
35322     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
35323   }
35324   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
35325   if (!SWIG_IsOK(res1)) {
35326     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::FixedWeightPostingSource const *","get_description", 1, self ));
35327   }
35328   arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
35329   {
35330     try {
35331       result = ((Xapian::FixedWeightPostingSource const *)arg1)->get_description();
35332     } catch (...) {
35333       string msg;
35334       int code = XapianExceptionHandler(msg);
35335       SWIG_exception(code, msg.c_str());
35336     }
35337   }
35338   vresult = SWIG_From_std_string(static_cast< std::string >(result));
35339   return vresult;
35340 fail:
35341   return Qnil;
35342 }
35343 
35344 
35345 SWIGINTERN void
free_Xapian_FixedWeightPostingSource(void * self)35346 free_Xapian_FixedWeightPostingSource(void *self) {
35347     Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *)self;
35348     delete arg1;
35349 }
35350 
35351 static swig_class SwigClassMatchSpy;
35352 
35353 SWIGINTERN VALUE
35354 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_MatchSpy_allocate(VALUE self)35355 _wrap_MatchSpy_allocate(VALUE self)
35356 #else
35357 _wrap_MatchSpy_allocate(int argc, VALUE *argv, VALUE self)
35358 #endif
35359 {
35360   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__MatchSpy);
35361 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
35362   rb_obj_call_init(vresult, argc, argv);
35363 #endif
35364   return vresult;
35365 }
35366 
35367 
35368 SWIGINTERN VALUE
_wrap_new_MatchSpy(int argc,VALUE * argv,VALUE self)35369 _wrap_new_MatchSpy(int argc, VALUE *argv, VALUE self) {
35370   VALUE arg1 = (VALUE) 0 ;
35371   const char *classname SWIGUNUSED = "Xapian::MatchSpy";
35372   Xapian::MatchSpy *result = 0 ;
35373 
35374   if ((argc < 0) || (argc > 0)) {
35375     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
35376   }
35377   arg1 = self;
35378   if ( strcmp(rb_obj_classname(self), classname) != 0 ) {
35379     /* subclassed */
35380     result = (Xapian::MatchSpy *)new SwigDirector_MatchSpy(arg1);
35381   } else {
35382     rb_raise(rb_eNameError,"accessing abstract class or protected constructor");
35383     return Qnil;
35384   }
35385 
35386   DATA_PTR(self) = result;
35387   return self;
35388 fail:
35389   return Qnil;
35390 }
35391 
35392 
35393 SWIGINTERN void
free_Xapian_MatchSpy(void * self)35394 free_Xapian_MatchSpy(void *self) {
35395     Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *)self;
35396     delete arg1;
35397 }
35398 
35399 SWIGINTERN VALUE
_wrap_MatchSpy___call__(int argc,VALUE * argv,VALUE self)35400 _wrap_MatchSpy___call__(int argc, VALUE *argv, VALUE self) {
35401   Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
35402   Xapian::Document *arg2 = 0 ;
35403   double arg3 ;
35404   void *argp1 = 0 ;
35405   int res1 = 0 ;
35406   void *argp2 ;
35407   int res2 = 0 ;
35408   double val3 ;
35409   int ecode3 = 0 ;
35410   Swig::Director *director = 0;
35411   bool upcall = false;
35412 
35413   if ((argc < 2) || (argc > 2)) {
35414     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
35415   }
35416   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
35417   if (!SWIG_IsOK(res1)) {
35418     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MatchSpy *","operator ()", 1, self ));
35419   }
35420   arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
35421   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Document,  0 );
35422   if (!SWIG_IsOK(res2)) {
35423     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Document const &","operator ()", 2, argv[0] ));
35424   }
35425   if (!argp2) {
35426     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Document const &","operator ()", 2, argv[0]));
35427   }
35428   arg2 = reinterpret_cast< Xapian::Document * >(argp2);
35429   ecode3 = SWIG_AsVal_double(argv[1], &val3);
35430   if (!SWIG_IsOK(ecode3)) {
35431     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","operator ()", 3, argv[1] ));
35432   }
35433   arg3 = static_cast< double >(val3);
35434   director = dynamic_cast<Swig::Director *>(arg1);
35435   upcall = (director && (director->swig_get_self() == self));
35436   try {
35437     {
35438       try {
35439         if (upcall) {
35440           Swig::DirectorPureVirtualException::raise("Xapian::MatchSpy::operator ()");
35441         } else {
35442           (arg1)->operator ()((Xapian::Document const &)*arg2,arg3);
35443         }
35444       } catch (...) {
35445         string msg;
35446         int code = XapianExceptionHandler(msg);
35447         SWIG_exception(code, msg.c_str());
35448       }
35449     }
35450   } catch (Swig::DirectorException& e) {
35451     rb_exc_raise(e.getError());
35452     SWIG_fail;
35453   }
35454   return Qnil;
35455 fail:
35456   return Qnil;
35457 }
35458 
35459 
35460 SWIGINTERN VALUE
_wrap_MatchSpy_name(int argc,VALUE * argv,VALUE self)35461 _wrap_MatchSpy_name(int argc, VALUE *argv, VALUE self) {
35462   Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
35463   void *argp1 = 0 ;
35464   int res1 = 0 ;
35465   Swig::Director *director = 0;
35466   bool upcall = false;
35467   std::string result;
35468   VALUE vresult = Qnil;
35469 
35470   if ((argc < 0) || (argc > 0)) {
35471     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
35472   }
35473   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
35474   if (!SWIG_IsOK(res1)) {
35475     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MatchSpy const *","name", 1, self ));
35476   }
35477   arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
35478   director = dynamic_cast<Swig::Director *>(arg1);
35479   upcall = (director && (director->swig_get_self() == self));
35480   try {
35481     {
35482       try {
35483         if (upcall) {
35484           result = ((Xapian::MatchSpy const *)arg1)->Xapian::MatchSpy::name();
35485         } else {
35486           result = ((Xapian::MatchSpy const *)arg1)->name();
35487         }
35488       } catch (...) {
35489         string msg;
35490         int code = XapianExceptionHandler(msg);
35491         SWIG_exception(code, msg.c_str());
35492       }
35493     }
35494   } catch (Swig::DirectorException& e) {
35495     rb_exc_raise(e.getError());
35496     SWIG_fail;
35497   }
35498   vresult = SWIG_From_std_string(static_cast< std::string >(result));
35499   return vresult;
35500 fail:
35501   return Qnil;
35502 }
35503 
35504 
35505 SWIGINTERN VALUE
_wrap_MatchSpy_merge_results(int argc,VALUE * argv,VALUE self)35506 _wrap_MatchSpy_merge_results(int argc, VALUE *argv, VALUE self) {
35507   Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
35508   std::string *arg2 = 0 ;
35509   void *argp1 = 0 ;
35510   int res1 = 0 ;
35511   int res2 = SWIG_OLDOBJ ;
35512   Swig::Director *director = 0;
35513   bool upcall = false;
35514 
35515   if ((argc < 1) || (argc > 1)) {
35516     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
35517   }
35518   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
35519   if (!SWIG_IsOK(res1)) {
35520     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MatchSpy *","merge_results", 1, self ));
35521   }
35522   arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
35523   {
35524     std::string *ptr = (std::string *)0;
35525     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
35526     if (!SWIG_IsOK(res2)) {
35527       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","merge_results", 2, argv[0] ));
35528     }
35529     if (!ptr) {
35530       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","merge_results", 2, argv[0]));
35531     }
35532     arg2 = ptr;
35533   }
35534   director = dynamic_cast<Swig::Director *>(arg1);
35535   upcall = (director && (director->swig_get_self() == self));
35536   try {
35537     {
35538       try {
35539         if (upcall) {
35540           (arg1)->Xapian::MatchSpy::merge_results((std::string const &)*arg2);
35541         } else {
35542           (arg1)->merge_results((std::string const &)*arg2);
35543         }
35544       } catch (...) {
35545         string msg;
35546         int code = XapianExceptionHandler(msg);
35547         SWIG_exception(code, msg.c_str());
35548       }
35549     }
35550   } catch (Swig::DirectorException& e) {
35551     rb_exc_raise(e.getError());
35552     SWIG_fail;
35553   }
35554   if (SWIG_IsNewObj(res2)) delete arg2;
35555   return Qnil;
35556 fail:
35557   if (SWIG_IsNewObj(res2)) delete arg2;
35558   return Qnil;
35559 }
35560 
35561 
35562 SWIGINTERN VALUE
_wrap_MatchSpy_description(int argc,VALUE * argv,VALUE self)35563 _wrap_MatchSpy_description(int argc, VALUE *argv, VALUE self) {
35564   Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
35565   void *argp1 = 0 ;
35566   int res1 = 0 ;
35567   Swig::Director *director = 0;
35568   bool upcall = false;
35569   std::string result;
35570   VALUE vresult = Qnil;
35571 
35572   if ((argc < 0) || (argc > 0)) {
35573     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
35574   }
35575   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
35576   if (!SWIG_IsOK(res1)) {
35577     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MatchSpy const *","get_description", 1, self ));
35578   }
35579   arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
35580   director = dynamic_cast<Swig::Director *>(arg1);
35581   upcall = (director && (director->swig_get_self() == self));
35582   try {
35583     {
35584       try {
35585         if (upcall) {
35586           result = ((Xapian::MatchSpy const *)arg1)->Xapian::MatchSpy::get_description();
35587         } else {
35588           result = ((Xapian::MatchSpy const *)arg1)->get_description();
35589         }
35590       } catch (...) {
35591         string msg;
35592         int code = XapianExceptionHandler(msg);
35593         SWIG_exception(code, msg.c_str());
35594       }
35595     }
35596   } catch (Swig::DirectorException& e) {
35597     rb_exc_raise(e.getError());
35598     SWIG_fail;
35599   }
35600   vresult = SWIG_From_std_string(static_cast< std::string >(result));
35601   return vresult;
35602 fail:
35603   return Qnil;
35604 }
35605 
35606 
35607 SWIGINTERN VALUE
_wrap_MatchSpy_release(int argc,VALUE * argv,VALUE self)35608 _wrap_MatchSpy_release(int argc, VALUE *argv, VALUE self) {
35609   Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
35610   void *argp1 = 0 ;
35611   int res1 = 0 ;
35612   Swig::Director *director = 0;
35613   Xapian::MatchSpy *result = 0 ;
35614   VALUE vresult = Qnil;
35615 
35616   if ((argc < 0) || (argc > 0)) {
35617     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
35618   }
35619   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
35620   if (!SWIG_IsOK(res1)) {
35621     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MatchSpy const *","release", 1, self ));
35622   }
35623   arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
35624   {
35625     try {
35626       result = (Xapian::MatchSpy *)((Xapian::MatchSpy const *)arg1)->release();
35627     } catch (...) {
35628       string msg;
35629       int code = XapianExceptionHandler(msg);
35630       SWIG_exception(code, msg.c_str());
35631     }
35632   }
35633   director = dynamic_cast<Swig::Director *>(result);
35634   if (director) {
35635     vresult = director->swig_get_self();
35636   } else {
35637     vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
35638   }
35639   return vresult;
35640 fail:
35641   return Qnil;
35642 }
35643 
35644 
35645 SWIGINTERN VALUE
_wrap_disown_MatchSpy(int argc,VALUE * argv,VALUE self)35646 _wrap_disown_MatchSpy(int argc, VALUE *argv, VALUE self) {
35647   Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
35648   void *argp1 = 0 ;
35649   int res1 = 0 ;
35650 
35651   if ((argc < 1) || (argc > 1)) {
35652     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
35653   }
35654   res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
35655   if (!SWIG_IsOK(res1)) {
35656     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::MatchSpy *","disown_MatchSpy", 1, argv[0] ));
35657   }
35658   arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
35659   {
35660     Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
35661     if (director) director->swig_disown();
35662   }
35663 
35664   return Qnil;
35665 fail:
35666   return Qnil;
35667 }
35668 
35669 
35670 static swig_class SwigClassValueCountMatchSpy;
35671 
35672 SWIGINTERN VALUE
_wrap_new_ValueCountMatchSpy__SWIG_0(int argc,VALUE * argv,VALUE self)35673 _wrap_new_ValueCountMatchSpy__SWIG_0(int argc, VALUE *argv, VALUE self) {
35674   const char *classname SWIGUNUSED = "Xapian::ValueCountMatchSpy";
35675   Xapian::ValueCountMatchSpy *result = 0 ;
35676 
35677   if ((argc < 0) || (argc > 0)) {
35678     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
35679   }
35680   {
35681     try {
35682       result = (Xapian::ValueCountMatchSpy *)new Xapian::ValueCountMatchSpy();
35683       DATA_PTR(self) = result;
35684     } catch (...) {
35685       string msg;
35686       int code = XapianExceptionHandler(msg);
35687       SWIG_exception(code, msg.c_str());
35688     }
35689   }
35690   return self;
35691 fail:
35692   return Qnil;
35693 }
35694 
35695 
35696 SWIGINTERN VALUE
35697 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_ValueCountMatchSpy_allocate(VALUE self)35698 _wrap_ValueCountMatchSpy_allocate(VALUE self)
35699 #else
35700 _wrap_ValueCountMatchSpy_allocate(int argc, VALUE *argv, VALUE self)
35701 #endif
35702 {
35703   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__ValueCountMatchSpy);
35704 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
35705   rb_obj_call_init(vresult, argc, argv);
35706 #endif
35707   return vresult;
35708 }
35709 
35710 
35711 SWIGINTERN VALUE
_wrap_new_ValueCountMatchSpy__SWIG_1(int argc,VALUE * argv,VALUE self)35712 _wrap_new_ValueCountMatchSpy__SWIG_1(int argc, VALUE *argv, VALUE self) {
35713   Xapian::valueno arg1 ;
35714   unsigned int val1 ;
35715   int ecode1 = 0 ;
35716   const char *classname SWIGUNUSED = "Xapian::ValueCountMatchSpy";
35717   Xapian::ValueCountMatchSpy *result = 0 ;
35718 
35719   if ((argc < 1) || (argc > 1)) {
35720     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
35721   }
35722   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
35723   if (!SWIG_IsOK(ecode1)) {
35724     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","ValueCountMatchSpy", 1, argv[0] ));
35725   }
35726   arg1 = static_cast< Xapian::valueno >(val1);
35727   {
35728     try {
35729       result = (Xapian::ValueCountMatchSpy *)new Xapian::ValueCountMatchSpy(arg1);
35730       DATA_PTR(self) = result;
35731     } catch (...) {
35732       string msg;
35733       int code = XapianExceptionHandler(msg);
35734       SWIG_exception(code, msg.c_str());
35735     }
35736   }
35737   return self;
35738 fail:
35739   return Qnil;
35740 }
35741 
35742 
_wrap_new_ValueCountMatchSpy(int nargs,VALUE * args,VALUE self)35743 SWIGINTERN VALUE _wrap_new_ValueCountMatchSpy(int nargs, VALUE *args, VALUE self) {
35744   int argc;
35745   VALUE argv[1];
35746   int ii;
35747 
35748   argc = nargs;
35749   if (argc > 1) SWIG_fail;
35750   for (ii = 0; (ii < argc); ++ii) {
35751     argv[ii] = args[ii];
35752   }
35753   if (argc == 0) {
35754     return _wrap_new_ValueCountMatchSpy__SWIG_0(nargs, args, self);
35755   }
35756   if (argc == 1) {
35757     int _v;
35758     {
35759       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
35760       _v = SWIG_CheckState(res);
35761     }
35762     if (_v) {
35763       return _wrap_new_ValueCountMatchSpy__SWIG_1(nargs, args, self);
35764     }
35765   }
35766 
35767 fail:
35768   Ruby_Format_OverloadedError( argc, 1, "ValueCountMatchSpy.new",
35769     "    ValueCountMatchSpy.new()\n"
35770     "    ValueCountMatchSpy.new(Xapian::valueno slot_)\n");
35771 
35772   return Qnil;
35773 }
35774 
35775 
35776 SWIGINTERN VALUE
_wrap_ValueCountMatchSpy_get_total(int argc,VALUE * argv,VALUE self)35777 _wrap_ValueCountMatchSpy_get_total(int argc, VALUE *argv, VALUE self) {
35778   Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
35779   void *argp1 = 0 ;
35780   int res1 = 0 ;
35781   size_t result;
35782   VALUE vresult = Qnil;
35783 
35784   if ((argc < 0) || (argc > 0)) {
35785     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
35786   }
35787   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
35788   if (!SWIG_IsOK(res1)) {
35789     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueCountMatchSpy const *","get_total", 1, self ));
35790   }
35791   arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
35792   result = ((Xapian::ValueCountMatchSpy const *)arg1)->get_total();
35793   vresult = SWIG_From_size_t(static_cast< size_t >(result));
35794   return vresult;
35795 fail:
35796   return Qnil;
35797 }
35798 
35799 
35800 SWIGINTERN VALUE
_wrap_ValueCountMatchSpy__dangerous_values_begin(int argc,VALUE * argv,VALUE self)35801 _wrap_ValueCountMatchSpy__dangerous_values_begin(int argc, VALUE *argv, VALUE self) {
35802   Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
35803   void *argp1 = 0 ;
35804   int res1 = 0 ;
35805   Xapian::TermIterator result;
35806   VALUE vresult = Qnil;
35807 
35808   if ((argc < 0) || (argc > 0)) {
35809     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
35810   }
35811   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
35812   if (!SWIG_IsOK(res1)) {
35813     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueCountMatchSpy const *","values_begin", 1, self ));
35814   }
35815   arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
35816   {
35817     try {
35818       result = ((Xapian::ValueCountMatchSpy const *)arg1)->values_begin();
35819     } catch (...) {
35820       string msg;
35821       int code = XapianExceptionHandler(msg);
35822       SWIG_exception(code, msg.c_str());
35823     }
35824   }
35825   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
35826   return vresult;
35827 fail:
35828   return Qnil;
35829 }
35830 
35831 
35832 SWIGINTERN VALUE
_wrap_ValueCountMatchSpy__dangerous_values_end(int argc,VALUE * argv,VALUE self)35833 _wrap_ValueCountMatchSpy__dangerous_values_end(int argc, VALUE *argv, VALUE self) {
35834   Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
35835   void *argp1 = 0 ;
35836   int res1 = 0 ;
35837   Xapian::TermIterator result;
35838   VALUE vresult = Qnil;
35839 
35840   if ((argc < 0) || (argc > 0)) {
35841     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
35842   }
35843   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
35844   if (!SWIG_IsOK(res1)) {
35845     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueCountMatchSpy const *","values_end", 1, self ));
35846   }
35847   arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
35848   result = ((Xapian::ValueCountMatchSpy const *)arg1)->values_end();
35849   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
35850   return vresult;
35851 fail:
35852   return Qnil;
35853 }
35854 
35855 
35856 SWIGINTERN VALUE
_wrap_ValueCountMatchSpy__dangerous_top_values_begin(int argc,VALUE * argv,VALUE self)35857 _wrap_ValueCountMatchSpy__dangerous_top_values_begin(int argc, VALUE *argv, VALUE self) {
35858   Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
35859   size_t arg2 ;
35860   void *argp1 = 0 ;
35861   int res1 = 0 ;
35862   size_t val2 ;
35863   int ecode2 = 0 ;
35864   Xapian::TermIterator result;
35865   VALUE vresult = Qnil;
35866 
35867   if ((argc < 1) || (argc > 1)) {
35868     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
35869   }
35870   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
35871   if (!SWIG_IsOK(res1)) {
35872     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueCountMatchSpy const *","top_values_begin", 1, self ));
35873   }
35874   arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
35875   ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
35876   if (!SWIG_IsOK(ecode2)) {
35877     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","top_values_begin", 2, argv[0] ));
35878   }
35879   arg2 = static_cast< size_t >(val2);
35880   {
35881     try {
35882       result = ((Xapian::ValueCountMatchSpy const *)arg1)->top_values_begin(arg2);
35883     } catch (...) {
35884       string msg;
35885       int code = XapianExceptionHandler(msg);
35886       SWIG_exception(code, msg.c_str());
35887     }
35888   }
35889   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
35890   return vresult;
35891 fail:
35892   return Qnil;
35893 }
35894 
35895 
35896 SWIGINTERN VALUE
_wrap_ValueCountMatchSpy__dangerous_top_values_end(int argc,VALUE * argv,VALUE self)35897 _wrap_ValueCountMatchSpy__dangerous_top_values_end(int argc, VALUE *argv, VALUE self) {
35898   Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
35899   size_t arg2 ;
35900   void *argp1 = 0 ;
35901   int res1 = 0 ;
35902   size_t val2 ;
35903   int ecode2 = 0 ;
35904   Xapian::TermIterator result;
35905   VALUE vresult = Qnil;
35906 
35907   if ((argc < 1) || (argc > 1)) {
35908     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
35909   }
35910   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
35911   if (!SWIG_IsOK(res1)) {
35912     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueCountMatchSpy const *","top_values_end", 1, self ));
35913   }
35914   arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
35915   ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
35916   if (!SWIG_IsOK(ecode2)) {
35917     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","top_values_end", 2, argv[0] ));
35918   }
35919   arg2 = static_cast< size_t >(val2);
35920   result = ((Xapian::ValueCountMatchSpy const *)arg1)->top_values_end(arg2);
35921   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
35922   return vresult;
35923 fail:
35924   return Qnil;
35925 }
35926 
35927 
35928 SWIGINTERN VALUE
_wrap_ValueCountMatchSpy___call__(int argc,VALUE * argv,VALUE self)35929 _wrap_ValueCountMatchSpy___call__(int argc, VALUE *argv, VALUE self) {
35930   Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
35931   Xapian::Document *arg2 = 0 ;
35932   double arg3 ;
35933   void *argp1 = 0 ;
35934   int res1 = 0 ;
35935   void *argp2 ;
35936   int res2 = 0 ;
35937   double val3 ;
35938   int ecode3 = 0 ;
35939 
35940   if ((argc < 2) || (argc > 2)) {
35941     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
35942   }
35943   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
35944   if (!SWIG_IsOK(res1)) {
35945     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueCountMatchSpy *","operator ()", 1, self ));
35946   }
35947   arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
35948   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Document,  0 );
35949   if (!SWIG_IsOK(res2)) {
35950     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Document const &","operator ()", 2, argv[0] ));
35951   }
35952   if (!argp2) {
35953     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Document const &","operator ()", 2, argv[0]));
35954   }
35955   arg2 = reinterpret_cast< Xapian::Document * >(argp2);
35956   ecode3 = SWIG_AsVal_double(argv[1], &val3);
35957   if (!SWIG_IsOK(ecode3)) {
35958     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","operator ()", 3, argv[1] ));
35959   }
35960   arg3 = static_cast< double >(val3);
35961   {
35962     try {
35963       (arg1)->operator ()((Xapian::Document const &)*arg2,arg3);
35964     } catch (...) {
35965       string msg;
35966       int code = XapianExceptionHandler(msg);
35967       SWIG_exception(code, msg.c_str());
35968     }
35969   }
35970   return Qnil;
35971 fail:
35972   return Qnil;
35973 }
35974 
35975 
35976 SWIGINTERN VALUE
_wrap_ValueCountMatchSpy_name(int argc,VALUE * argv,VALUE self)35977 _wrap_ValueCountMatchSpy_name(int argc, VALUE *argv, VALUE self) {
35978   Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
35979   void *argp1 = 0 ;
35980   int res1 = 0 ;
35981   std::string result;
35982   VALUE vresult = Qnil;
35983 
35984   if ((argc < 0) || (argc > 0)) {
35985     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
35986   }
35987   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
35988   if (!SWIG_IsOK(res1)) {
35989     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueCountMatchSpy const *","name", 1, self ));
35990   }
35991   arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
35992   {
35993     try {
35994       result = ((Xapian::ValueCountMatchSpy const *)arg1)->name();
35995     } catch (...) {
35996       string msg;
35997       int code = XapianExceptionHandler(msg);
35998       SWIG_exception(code, msg.c_str());
35999     }
36000   }
36001   vresult = SWIG_From_std_string(static_cast< std::string >(result));
36002   return vresult;
36003 fail:
36004   return Qnil;
36005 }
36006 
36007 
36008 SWIGINTERN VALUE
_wrap_ValueCountMatchSpy_merge_results(int argc,VALUE * argv,VALUE self)36009 _wrap_ValueCountMatchSpy_merge_results(int argc, VALUE *argv, VALUE self) {
36010   Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
36011   std::string *arg2 = 0 ;
36012   void *argp1 = 0 ;
36013   int res1 = 0 ;
36014   int res2 = SWIG_OLDOBJ ;
36015 
36016   if ((argc < 1) || (argc > 1)) {
36017     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
36018   }
36019   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
36020   if (!SWIG_IsOK(res1)) {
36021     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueCountMatchSpy *","merge_results", 1, self ));
36022   }
36023   arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
36024   {
36025     std::string *ptr = (std::string *)0;
36026     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
36027     if (!SWIG_IsOK(res2)) {
36028       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","merge_results", 2, argv[0] ));
36029     }
36030     if (!ptr) {
36031       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","merge_results", 2, argv[0]));
36032     }
36033     arg2 = ptr;
36034   }
36035   {
36036     try {
36037       (arg1)->merge_results((std::string const &)*arg2);
36038     } catch (...) {
36039       string msg;
36040       int code = XapianExceptionHandler(msg);
36041       SWIG_exception(code, msg.c_str());
36042     }
36043   }
36044   if (SWIG_IsNewObj(res2)) delete arg2;
36045   return Qnil;
36046 fail:
36047   if (SWIG_IsNewObj(res2)) delete arg2;
36048   return Qnil;
36049 }
36050 
36051 
36052 SWIGINTERN VALUE
_wrap_ValueCountMatchSpy_description(int argc,VALUE * argv,VALUE self)36053 _wrap_ValueCountMatchSpy_description(int argc, VALUE *argv, VALUE self) {
36054   Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
36055   void *argp1 = 0 ;
36056   int res1 = 0 ;
36057   std::string result;
36058   VALUE vresult = Qnil;
36059 
36060   if ((argc < 0) || (argc > 0)) {
36061     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
36062   }
36063   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
36064   if (!SWIG_IsOK(res1)) {
36065     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::ValueCountMatchSpy const *","get_description", 1, self ));
36066   }
36067   arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
36068   {
36069     try {
36070       result = ((Xapian::ValueCountMatchSpy const *)arg1)->get_description();
36071     } catch (...) {
36072       string msg;
36073       int code = XapianExceptionHandler(msg);
36074       SWIG_exception(code, msg.c_str());
36075     }
36076   }
36077   vresult = SWIG_From_std_string(static_cast< std::string >(result));
36078   return vresult;
36079 fail:
36080   return Qnil;
36081 }
36082 
36083 
36084 SWIGINTERN void
free_Xapian_ValueCountMatchSpy(void * self)36085 free_Xapian_ValueCountMatchSpy(void *self) {
36086     Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *)self;
36087     delete arg1;
36088 }
36089 
36090 SWIGINTERN VALUE
_wrap_miles_to_metres(int argc,VALUE * argv,VALUE self)36091 _wrap_miles_to_metres(int argc, VALUE *argv, VALUE self) {
36092   double arg1 ;
36093   double val1 ;
36094   int ecode1 = 0 ;
36095   double result;
36096   VALUE vresult = Qnil;
36097 
36098   if ((argc < 1) || (argc > 1)) {
36099     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
36100   }
36101   ecode1 = SWIG_AsVal_double(argv[0], &val1);
36102   if (!SWIG_IsOK(ecode1)) {
36103     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Xapian::miles_to_metres", 1, argv[0] ));
36104   }
36105   arg1 = static_cast< double >(val1);
36106   {
36107     try {
36108       result = (double)Xapian::miles_to_metres(arg1);
36109     } catch (...) {
36110       string msg;
36111       int code = XapianExceptionHandler(msg);
36112       SWIG_exception(code, msg.c_str());
36113     }
36114   }
36115   vresult = SWIG_From_double(static_cast< double >(result));
36116   return vresult;
36117 fail:
36118   return Qnil;
36119 }
36120 
36121 
36122 SWIGINTERN VALUE
_wrap_metres_to_miles(int argc,VALUE * argv,VALUE self)36123 _wrap_metres_to_miles(int argc, VALUE *argv, VALUE self) {
36124   double arg1 ;
36125   double val1 ;
36126   int ecode1 = 0 ;
36127   double result;
36128   VALUE vresult = Qnil;
36129 
36130   if ((argc < 1) || (argc > 1)) {
36131     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
36132   }
36133   ecode1 = SWIG_AsVal_double(argv[0], &val1);
36134   if (!SWIG_IsOK(ecode1)) {
36135     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Xapian::metres_to_miles", 1, argv[0] ));
36136   }
36137   arg1 = static_cast< double >(val1);
36138   {
36139     try {
36140       result = (double)Xapian::metres_to_miles(arg1);
36141     } catch (...) {
36142       string msg;
36143       int code = XapianExceptionHandler(msg);
36144       SWIG_exception(code, msg.c_str());
36145     }
36146   }
36147   vresult = SWIG_From_double(static_cast< double >(result));
36148   return vresult;
36149 fail:
36150   return Qnil;
36151 }
36152 
36153 
36154 static swig_class SwigClassLatLongCoord;
36155 
36156 SWIGINTERN VALUE
_wrap_LatLongCoord_latitude_set(int argc,VALUE * argv,VALUE self)36157 _wrap_LatLongCoord_latitude_set(int argc, VALUE *argv, VALUE self) {
36158   Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
36159   double arg2 ;
36160   void *argp1 = 0 ;
36161   int res1 = 0 ;
36162   double val2 ;
36163   int ecode2 = 0 ;
36164 
36165   if ((argc < 1) || (argc > 1)) {
36166     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
36167   }
36168   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongCoord, 0 |  0 );
36169   if (!SWIG_IsOK(res1)) {
36170     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongCoord *","latitude", 1, self ));
36171   }
36172   arg1 = reinterpret_cast< Xapian::LatLongCoord * >(argp1);
36173   ecode2 = SWIG_AsVal_double(argv[0], &val2);
36174   if (!SWIG_IsOK(ecode2)) {
36175     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","latitude", 2, argv[0] ));
36176   }
36177   arg2 = static_cast< double >(val2);
36178   if (arg1) (arg1)->latitude = arg2;
36179   return Qnil;
36180 fail:
36181   return Qnil;
36182 }
36183 
36184 
36185 SWIGINTERN VALUE
_wrap_LatLongCoord_latitude_get(int argc,VALUE * argv,VALUE self)36186 _wrap_LatLongCoord_latitude_get(int argc, VALUE *argv, VALUE self) {
36187   Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
36188   void *argp1 = 0 ;
36189   int res1 = 0 ;
36190   double result;
36191   VALUE vresult = Qnil;
36192 
36193   if ((argc < 0) || (argc > 0)) {
36194     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
36195   }
36196   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongCoord, 0 |  0 );
36197   if (!SWIG_IsOK(res1)) {
36198     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongCoord *","latitude", 1, self ));
36199   }
36200   arg1 = reinterpret_cast< Xapian::LatLongCoord * >(argp1);
36201   result = (double) ((arg1)->latitude);
36202   vresult = SWIG_From_double(static_cast< double >(result));
36203   return vresult;
36204 fail:
36205   return Qnil;
36206 }
36207 
36208 
36209 SWIGINTERN VALUE
_wrap_LatLongCoord_longitude_set(int argc,VALUE * argv,VALUE self)36210 _wrap_LatLongCoord_longitude_set(int argc, VALUE *argv, VALUE self) {
36211   Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
36212   double arg2 ;
36213   void *argp1 = 0 ;
36214   int res1 = 0 ;
36215   double val2 ;
36216   int ecode2 = 0 ;
36217 
36218   if ((argc < 1) || (argc > 1)) {
36219     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
36220   }
36221   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongCoord, 0 |  0 );
36222   if (!SWIG_IsOK(res1)) {
36223     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongCoord *","longitude", 1, self ));
36224   }
36225   arg1 = reinterpret_cast< Xapian::LatLongCoord * >(argp1);
36226   ecode2 = SWIG_AsVal_double(argv[0], &val2);
36227   if (!SWIG_IsOK(ecode2)) {
36228     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","longitude", 2, argv[0] ));
36229   }
36230   arg2 = static_cast< double >(val2);
36231   if (arg1) (arg1)->longitude = arg2;
36232   return Qnil;
36233 fail:
36234   return Qnil;
36235 }
36236 
36237 
36238 SWIGINTERN VALUE
_wrap_LatLongCoord_longitude_get(int argc,VALUE * argv,VALUE self)36239 _wrap_LatLongCoord_longitude_get(int argc, VALUE *argv, VALUE self) {
36240   Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
36241   void *argp1 = 0 ;
36242   int res1 = 0 ;
36243   double result;
36244   VALUE vresult = Qnil;
36245 
36246   if ((argc < 0) || (argc > 0)) {
36247     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
36248   }
36249   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongCoord, 0 |  0 );
36250   if (!SWIG_IsOK(res1)) {
36251     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongCoord *","longitude", 1, self ));
36252   }
36253   arg1 = reinterpret_cast< Xapian::LatLongCoord * >(argp1);
36254   result = (double) ((arg1)->longitude);
36255   vresult = SWIG_From_double(static_cast< double >(result));
36256   return vresult;
36257 fail:
36258   return Qnil;
36259 }
36260 
36261 
36262 SWIGINTERN VALUE
_wrap_new_LatLongCoord__SWIG_0(int argc,VALUE * argv,VALUE self)36263 _wrap_new_LatLongCoord__SWIG_0(int argc, VALUE *argv, VALUE self) {
36264   const char *classname SWIGUNUSED = "Xapian::LatLongCoord";
36265   Xapian::LatLongCoord *result = 0 ;
36266 
36267   if ((argc < 0) || (argc > 0)) {
36268     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
36269   }
36270   {
36271     try {
36272       result = (Xapian::LatLongCoord *)new Xapian::LatLongCoord();
36273       DATA_PTR(self) = result;
36274     } catch (...) {
36275       string msg;
36276       int code = XapianExceptionHandler(msg);
36277       SWIG_exception(code, msg.c_str());
36278     }
36279   }
36280   return self;
36281 fail:
36282   return Qnil;
36283 }
36284 
36285 
36286 SWIGINTERN VALUE
36287 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_LatLongCoord_allocate(VALUE self)36288 _wrap_LatLongCoord_allocate(VALUE self)
36289 #else
36290 _wrap_LatLongCoord_allocate(int argc, VALUE *argv, VALUE self)
36291 #endif
36292 {
36293   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__LatLongCoord);
36294 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
36295   rb_obj_call_init(vresult, argc, argv);
36296 #endif
36297   return vresult;
36298 }
36299 
36300 
36301 SWIGINTERN VALUE
_wrap_new_LatLongCoord__SWIG_1(int argc,VALUE * argv,VALUE self)36302 _wrap_new_LatLongCoord__SWIG_1(int argc, VALUE *argv, VALUE self) {
36303   double arg1 ;
36304   double arg2 ;
36305   double val1 ;
36306   int ecode1 = 0 ;
36307   double val2 ;
36308   int ecode2 = 0 ;
36309   const char *classname SWIGUNUSED = "Xapian::LatLongCoord";
36310   Xapian::LatLongCoord *result = 0 ;
36311 
36312   if ((argc < 2) || (argc > 2)) {
36313     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
36314   }
36315   ecode1 = SWIG_AsVal_double(argv[0], &val1);
36316   if (!SWIG_IsOK(ecode1)) {
36317     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","LatLongCoord", 1, argv[0] ));
36318   }
36319   arg1 = static_cast< double >(val1);
36320   ecode2 = SWIG_AsVal_double(argv[1], &val2);
36321   if (!SWIG_IsOK(ecode2)) {
36322     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","LatLongCoord", 2, argv[1] ));
36323   }
36324   arg2 = static_cast< double >(val2);
36325   {
36326     try {
36327       result = (Xapian::LatLongCoord *)new Xapian::LatLongCoord(arg1,arg2);
36328       DATA_PTR(self) = result;
36329     } catch (...) {
36330       string msg;
36331       int code = XapianExceptionHandler(msg);
36332       SWIG_exception(code, msg.c_str());
36333     }
36334   }
36335   return self;
36336 fail:
36337   return Qnil;
36338 }
36339 
36340 
_wrap_new_LatLongCoord(int nargs,VALUE * args,VALUE self)36341 SWIGINTERN VALUE _wrap_new_LatLongCoord(int nargs, VALUE *args, VALUE self) {
36342   int argc;
36343   VALUE argv[2];
36344   int ii;
36345 
36346   argc = nargs;
36347   if (argc > 2) SWIG_fail;
36348   for (ii = 0; (ii < argc); ++ii) {
36349     argv[ii] = args[ii];
36350   }
36351   if (argc == 0) {
36352     return _wrap_new_LatLongCoord__SWIG_0(nargs, args, self);
36353   }
36354   if (argc == 2) {
36355     int _v;
36356     {
36357       int res = SWIG_AsVal_double(argv[0], NULL);
36358       _v = SWIG_CheckState(res);
36359     }
36360     if (_v) {
36361       {
36362         int res = SWIG_AsVal_double(argv[1], NULL);
36363         _v = SWIG_CheckState(res);
36364       }
36365       if (_v) {
36366         return _wrap_new_LatLongCoord__SWIG_1(nargs, args, self);
36367       }
36368     }
36369   }
36370 
36371 fail:
36372   Ruby_Format_OverloadedError( argc, 2, "LatLongCoord.new",
36373     "    LatLongCoord.new()\n"
36374     "    LatLongCoord.new(double latitude_, double longitude_)\n");
36375 
36376   return Qnil;
36377 }
36378 
36379 
36380 SWIGINTERN VALUE
_wrap_LatLongCoord_unserialise(int argc,VALUE * argv,VALUE self)36381 _wrap_LatLongCoord_unserialise(int argc, VALUE *argv, VALUE self) {
36382   Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
36383   std::string *arg2 = 0 ;
36384   void *argp1 = 0 ;
36385   int res1 = 0 ;
36386   int res2 = SWIG_OLDOBJ ;
36387 
36388   if ((argc < 1) || (argc > 1)) {
36389     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
36390   }
36391   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongCoord, 0 |  0 );
36392   if (!SWIG_IsOK(res1)) {
36393     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongCoord *","unserialise", 1, self ));
36394   }
36395   arg1 = reinterpret_cast< Xapian::LatLongCoord * >(argp1);
36396   {
36397     std::string *ptr = (std::string *)0;
36398     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
36399     if (!SWIG_IsOK(res2)) {
36400       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","unserialise", 2, argv[0] ));
36401     }
36402     if (!ptr) {
36403       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","unserialise", 2, argv[0]));
36404     }
36405     arg2 = ptr;
36406   }
36407   {
36408     try {
36409       (arg1)->unserialise((std::string const &)*arg2);
36410     } catch (...) {
36411       string msg;
36412       int code = XapianExceptionHandler(msg);
36413       SWIG_exception(code, msg.c_str());
36414     }
36415   }
36416   if (SWIG_IsNewObj(res2)) delete arg2;
36417   return Qnil;
36418 fail:
36419   if (SWIG_IsNewObj(res2)) delete arg2;
36420   return Qnil;
36421 }
36422 
36423 
36424 SWIGINTERN VALUE
_wrap_LatLongCoord_serialise(int argc,VALUE * argv,VALUE self)36425 _wrap_LatLongCoord_serialise(int argc, VALUE *argv, VALUE self) {
36426   Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
36427   void *argp1 = 0 ;
36428   int res1 = 0 ;
36429   std::string result;
36430   VALUE vresult = Qnil;
36431 
36432   if ((argc < 0) || (argc > 0)) {
36433     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
36434   }
36435   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongCoord, 0 |  0 );
36436   if (!SWIG_IsOK(res1)) {
36437     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongCoord const *","serialise", 1, self ));
36438   }
36439   arg1 = reinterpret_cast< Xapian::LatLongCoord * >(argp1);
36440   {
36441     try {
36442       result = ((Xapian::LatLongCoord const *)arg1)->serialise();
36443     } catch (...) {
36444       string msg;
36445       int code = XapianExceptionHandler(msg);
36446       SWIG_exception(code, msg.c_str());
36447     }
36448   }
36449   vresult = SWIG_From_std_string(static_cast< std::string >(result));
36450   return vresult;
36451 fail:
36452   return Qnil;
36453 }
36454 
36455 
36456 SWIGINTERN VALUE
_wrap_LatLongCoord_description(int argc,VALUE * argv,VALUE self)36457 _wrap_LatLongCoord_description(int argc, VALUE *argv, VALUE self) {
36458   Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
36459   void *argp1 = 0 ;
36460   int res1 = 0 ;
36461   std::string result;
36462   VALUE vresult = Qnil;
36463 
36464   if ((argc < 0) || (argc > 0)) {
36465     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
36466   }
36467   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongCoord, 0 |  0 );
36468   if (!SWIG_IsOK(res1)) {
36469     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongCoord const *","get_description", 1, self ));
36470   }
36471   arg1 = reinterpret_cast< Xapian::LatLongCoord * >(argp1);
36472   {
36473     try {
36474       result = ((Xapian::LatLongCoord const *)arg1)->get_description();
36475     } catch (...) {
36476       string msg;
36477       int code = XapianExceptionHandler(msg);
36478       SWIG_exception(code, msg.c_str());
36479     }
36480   }
36481   vresult = SWIG_From_std_string(static_cast< std::string >(result));
36482   return vresult;
36483 fail:
36484   return Qnil;
36485 }
36486 
36487 
36488 SWIGINTERN void
free_Xapian_LatLongCoord(void * self)36489 free_Xapian_LatLongCoord(void *self) {
36490     Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *)self;
36491     delete arg1;
36492 }
36493 
36494 static swig_class SwigClassLatLongCoordsIterator;
36495 
36496 SWIGINTERN VALUE
36497 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_LatLongCoordsIterator_allocate(VALUE self)36498 _wrap_LatLongCoordsIterator_allocate(VALUE self)
36499 #else
36500 _wrap_LatLongCoordsIterator_allocate(int argc, VALUE *argv, VALUE self)
36501 #endif
36502 {
36503   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__LatLongCoordsIterator);
36504 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
36505   rb_obj_call_init(vresult, argc, argv);
36506 #endif
36507   return vresult;
36508 }
36509 
36510 
36511 SWIGINTERN VALUE
_wrap_new_LatLongCoordsIterator(int argc,VALUE * argv,VALUE self)36512 _wrap_new_LatLongCoordsIterator(int argc, VALUE *argv, VALUE self) {
36513   const char *classname SWIGUNUSED = "Xapian::LatLongCoordsIterator";
36514   Xapian::LatLongCoordsIterator *result = 0 ;
36515 
36516   if ((argc < 0) || (argc > 0)) {
36517     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
36518   }
36519   {
36520     try {
36521       result = (Xapian::LatLongCoordsIterator *)new Xapian::LatLongCoordsIterator();
36522       DATA_PTR(self) = result;
36523     } catch (...) {
36524       string msg;
36525       int code = XapianExceptionHandler(msg);
36526       SWIG_exception(code, msg.c_str());
36527     }
36528   }
36529   return self;
36530 fail:
36531   return Qnil;
36532 }
36533 
36534 
36535 
36536 /*
36537   Document-method: Xapian::LatLongCoordsIterator.==
36538 
36539   call-seq:
36540     ==(other) -> bool
36541 
36542 Equality comparison operator.
36543 */
36544 SWIGINTERN VALUE
_wrap_LatLongCoordsIterator___eq__(int argc,VALUE * argv,VALUE self)36545 _wrap_LatLongCoordsIterator___eq__(int argc, VALUE *argv, VALUE self) {
36546   Xapian::LatLongCoordsIterator *arg1 = (Xapian::LatLongCoordsIterator *) 0 ;
36547   Xapian::LatLongCoordsIterator *arg2 = 0 ;
36548   void *argp1 = 0 ;
36549   int res1 = 0 ;
36550   void *argp2 ;
36551   int res2 = 0 ;
36552   bool result;
36553   VALUE vresult = Qnil;
36554 
36555   if ((argc < 1) || (argc > 1)) {
36556     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
36557   }
36558   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongCoordsIterator, 0 |  0 );
36559   if (!SWIG_IsOK(res1)) {
36560     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongCoordsIterator const *","operator ==", 1, self ));
36561   }
36562   arg1 = reinterpret_cast< Xapian::LatLongCoordsIterator * >(argp1);
36563   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__LatLongCoordsIterator,  0 );
36564   if (!SWIG_IsOK(res2)) {
36565     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoordsIterator const &","operator ==", 2, argv[0] ));
36566   }
36567   if (!argp2) {
36568     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoordsIterator const &","operator ==", 2, argv[0]));
36569   }
36570   arg2 = reinterpret_cast< Xapian::LatLongCoordsIterator * >(argp2);
36571   {
36572     try {
36573       result = (bool)((Xapian::LatLongCoordsIterator const *)arg1)->operator ==((Xapian::LatLongCoordsIterator const &)*arg2);
36574     } catch (...) {
36575       string msg;
36576       int code = XapianExceptionHandler(msg);
36577       SWIG_exception(code, msg.c_str());
36578     }
36579   }
36580   vresult = SWIG_From_bool(static_cast< bool >(result));
36581   return vresult;
36582 fail:
36583   return Qnil;
36584 }
36585 
36586 
36587 SWIGINTERN VALUE
_wrap_LatLongCoordsIterator_equals(int argc,VALUE * argv,VALUE self)36588 _wrap_LatLongCoordsIterator_equals(int argc, VALUE *argv, VALUE self) {
36589   Xapian::LatLongCoordsIterator *arg1 = (Xapian::LatLongCoordsIterator *) 0 ;
36590   Xapian::LatLongCoordsIterator *arg2 = 0 ;
36591   void *argp1 = 0 ;
36592   int res1 = 0 ;
36593   void *argp2 ;
36594   int res2 = 0 ;
36595   bool result;
36596   VALUE vresult = Qnil;
36597 
36598   if ((argc < 1) || (argc > 1)) {
36599     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
36600   }
36601   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongCoordsIterator, 0 |  0 );
36602   if (!SWIG_IsOK(res1)) {
36603     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongCoordsIterator const *","equals", 1, self ));
36604   }
36605   arg1 = reinterpret_cast< Xapian::LatLongCoordsIterator * >(argp1);
36606   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__LatLongCoordsIterator,  0 );
36607   if (!SWIG_IsOK(res2)) {
36608     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoordsIterator const &","equals", 2, argv[0] ));
36609   }
36610   if (!argp2) {
36611     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoordsIterator const &","equals", 2, argv[0]));
36612   }
36613   arg2 = reinterpret_cast< Xapian::LatLongCoordsIterator * >(argp2);
36614   {
36615     try {
36616       result = (bool)Xapian_LatLongCoordsIterator_equals((Xapian::LatLongCoordsIterator const *)arg1,(Xapian::LatLongCoordsIterator const &)*arg2);
36617     } catch (...) {
36618       string msg;
36619       int code = XapianExceptionHandler(msg);
36620       SWIG_exception(code, msg.c_str());
36621     }
36622   }
36623   vresult = SWIG_From_bool(static_cast< bool >(result));
36624   return vresult;
36625 fail:
36626   return Qnil;
36627 }
36628 
36629 
36630 SWIGINTERN VALUE
_wrap_LatLongCoordsIterator_get_coord(int argc,VALUE * argv,VALUE self)36631 _wrap_LatLongCoordsIterator_get_coord(int argc, VALUE *argv, VALUE self) {
36632   Xapian::LatLongCoordsIterator *arg1 = (Xapian::LatLongCoordsIterator *) 0 ;
36633   void *argp1 = 0 ;
36634   int res1 = 0 ;
36635   Xapian::LatLongCoord result;
36636   VALUE vresult = Qnil;
36637 
36638   if ((argc < 0) || (argc > 0)) {
36639     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
36640   }
36641   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongCoordsIterator, 0 |  0 );
36642   if (!SWIG_IsOK(res1)) {
36643     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongCoordsIterator const *","get_coord", 1, self ));
36644   }
36645   arg1 = reinterpret_cast< Xapian::LatLongCoordsIterator * >(argp1);
36646   {
36647     try {
36648       result = Xapian_LatLongCoordsIterator_get_coord((Xapian::LatLongCoordsIterator const *)arg1);
36649     } catch (...) {
36650       string msg;
36651       int code = XapianExceptionHandler(msg);
36652       SWIG_exception(code, msg.c_str());
36653     }
36654   }
36655   vresult = SWIG_NewPointerObj((new Xapian::LatLongCoord(static_cast< const Xapian::LatLongCoord& >(result))), SWIGTYPE_p_Xapian__LatLongCoord, SWIG_POINTER_OWN |  0 );
36656   return vresult;
36657 fail:
36658   return Qnil;
36659 }
36660 
36661 
36662 SWIGINTERN VALUE
_wrap_LatLongCoordsIterator_next(int argc,VALUE * argv,VALUE self)36663 _wrap_LatLongCoordsIterator_next(int argc, VALUE *argv, VALUE self) {
36664   Xapian::LatLongCoordsIterator *arg1 = (Xapian::LatLongCoordsIterator *) 0 ;
36665   void *argp1 = 0 ;
36666   int res1 = 0 ;
36667 
36668   if ((argc < 0) || (argc > 0)) {
36669     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
36670   }
36671   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongCoordsIterator, 0 |  0 );
36672   if (!SWIG_IsOK(res1)) {
36673     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongCoordsIterator *","next", 1, self ));
36674   }
36675   arg1 = reinterpret_cast< Xapian::LatLongCoordsIterator * >(argp1);
36676   {
36677     try {
36678       Xapian_LatLongCoordsIterator_next(arg1);
36679     } catch (...) {
36680       string msg;
36681       int code = XapianExceptionHandler(msg);
36682       SWIG_exception(code, msg.c_str());
36683     }
36684   }
36685   return Qnil;
36686 fail:
36687   return Qnil;
36688 }
36689 
36690 
36691 SWIGINTERN void
free_Xapian_LatLongCoordsIterator(void * self)36692 free_Xapian_LatLongCoordsIterator(void *self) {
36693     Xapian::LatLongCoordsIterator *arg1 = (Xapian::LatLongCoordsIterator *)self;
36694     delete arg1;
36695 }
36696 
36697 static swig_class SwigClassLatLongCoords;
36698 
36699 
36700 /*
36701   Document-method: Xapian::LatLongCoords._begin
36702 
36703   call-seq:
36704     _begin -> LatLongCoordsIterator
36705 
36706 Return an iterator to the beginning of the LatLongCoords.
36707 */
36708 SWIGINTERN VALUE
_wrap_LatLongCoords__begin(int argc,VALUE * argv,VALUE self)36709 _wrap_LatLongCoords__begin(int argc, VALUE *argv, VALUE self) {
36710   Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
36711   void *argp1 = 0 ;
36712   int res1 = 0 ;
36713   Xapian::LatLongCoordsIterator result;
36714   VALUE vresult = Qnil;
36715 
36716   if ((argc < 0) || (argc > 0)) {
36717     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
36718   }
36719   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongCoords, 0 |  0 );
36720   if (!SWIG_IsOK(res1)) {
36721     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const *","begin", 1, self ));
36722   }
36723   arg1 = reinterpret_cast< Xapian::LatLongCoords * >(argp1);
36724   {
36725     try {
36726       result = ((Xapian::LatLongCoords const *)arg1)->begin();
36727     } catch (...) {
36728       string msg;
36729       int code = XapianExceptionHandler(msg);
36730       SWIG_exception(code, msg.c_str());
36731     }
36732   }
36733   vresult = SWIG_NewPointerObj((new Xapian::LatLongCoordsIterator(static_cast< const Xapian::LatLongCoordsIterator& >(result))), SWIGTYPE_p_Xapian__LatLongCoordsIterator, SWIG_POINTER_OWN |  0 );
36734   return vresult;
36735 fail:
36736   return Qnil;
36737 }
36738 
36739 
36740 
36741 /*
36742   Document-method: Xapian::LatLongCoords._end
36743 
36744   call-seq:
36745     _end -> LatLongCoordsIterator
36746 
36747 Return an iterator to past the end of the LatLongCoords.
36748 */
36749 SWIGINTERN VALUE
_wrap_LatLongCoords__end(int argc,VALUE * argv,VALUE self)36750 _wrap_LatLongCoords__end(int argc, VALUE *argv, VALUE self) {
36751   Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
36752   void *argp1 = 0 ;
36753   int res1 = 0 ;
36754   Xapian::LatLongCoordsIterator result;
36755   VALUE vresult = Qnil;
36756 
36757   if ((argc < 0) || (argc > 0)) {
36758     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
36759   }
36760   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongCoords, 0 |  0 );
36761   if (!SWIG_IsOK(res1)) {
36762     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const *","end", 1, self ));
36763   }
36764   arg1 = reinterpret_cast< Xapian::LatLongCoords * >(argp1);
36765   {
36766     try {
36767       result = ((Xapian::LatLongCoords const *)arg1)->end();
36768     } catch (...) {
36769       string msg;
36770       int code = XapianExceptionHandler(msg);
36771       SWIG_exception(code, msg.c_str());
36772     }
36773   }
36774   vresult = SWIG_NewPointerObj((new Xapian::LatLongCoordsIterator(static_cast< const Xapian::LatLongCoordsIterator& >(result))), SWIGTYPE_p_Xapian__LatLongCoordsIterator, SWIG_POINTER_OWN |  0 );
36775   return vresult;
36776 fail:
36777   return Qnil;
36778 }
36779 
36780 
36781 
36782 /*
36783   Document-method: Xapian::LatLongCoords.size
36784 
36785   call-seq:
36786     size -> size_t
36787 
36788 Size or Length of the LatLongCoords.
36789 */
36790 SWIGINTERN VALUE
_wrap_LatLongCoords_size(int argc,VALUE * argv,VALUE self)36791 _wrap_LatLongCoords_size(int argc, VALUE *argv, VALUE self) {
36792   Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
36793   void *argp1 = 0 ;
36794   int res1 = 0 ;
36795   size_t result;
36796   VALUE vresult = Qnil;
36797 
36798   if ((argc < 0) || (argc > 0)) {
36799     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
36800   }
36801   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongCoords, 0 |  0 );
36802   if (!SWIG_IsOK(res1)) {
36803     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const *","size", 1, self ));
36804   }
36805   arg1 = reinterpret_cast< Xapian::LatLongCoords * >(argp1);
36806   {
36807     try {
36808       result = ((Xapian::LatLongCoords const *)arg1)->size();
36809     } catch (...) {
36810       string msg;
36811       int code = XapianExceptionHandler(msg);
36812       SWIG_exception(code, msg.c_str());
36813     }
36814   }
36815   vresult = SWIG_From_size_t(static_cast< size_t >(result));
36816   return vresult;
36817 fail:
36818   return Qnil;
36819 }
36820 
36821 
36822 
36823 /*
36824   Document-method: Xapian::LatLongCoords.empty
36825 
36826   call-seq:
36827     empty -> bool
36828 
36829 Check if the LatLongCoords is empty or not.
36830 */
36831 SWIGINTERN VALUE
_wrap_LatLongCoords_emptyq___(int argc,VALUE * argv,VALUE self)36832 _wrap_LatLongCoords_emptyq___(int argc, VALUE *argv, VALUE self) {
36833   Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
36834   void *argp1 = 0 ;
36835   int res1 = 0 ;
36836   bool result;
36837   VALUE vresult = Qnil;
36838 
36839   if ((argc < 0) || (argc > 0)) {
36840     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
36841   }
36842   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongCoords, 0 |  0 );
36843   if (!SWIG_IsOK(res1)) {
36844     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const *","empty", 1, self ));
36845   }
36846   arg1 = reinterpret_cast< Xapian::LatLongCoords * >(argp1);
36847   {
36848     try {
36849       result = (bool)((Xapian::LatLongCoords const *)arg1)->empty();
36850     } catch (...) {
36851       string msg;
36852       int code = XapianExceptionHandler(msg);
36853       SWIG_exception(code, msg.c_str());
36854     }
36855   }
36856   vresult = (result ? Qtrue : Qfalse);
36857   return vresult;
36858 fail:
36859   return Qnil;
36860 }
36861 
36862 
36863 SWIGINTERN VALUE
_wrap_LatLongCoords_append(int argc,VALUE * argv,VALUE self)36864 _wrap_LatLongCoords_append(int argc, VALUE *argv, VALUE self) {
36865   Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
36866   Xapian::LatLongCoord *arg2 = 0 ;
36867   void *argp1 = 0 ;
36868   int res1 = 0 ;
36869   void *argp2 ;
36870   int res2 = 0 ;
36871 
36872   if ((argc < 1) || (argc > 1)) {
36873     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
36874   }
36875   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongCoords, 0 |  0 );
36876   if (!SWIG_IsOK(res1)) {
36877     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongCoords *","append", 1, self ));
36878   }
36879   arg1 = reinterpret_cast< Xapian::LatLongCoords * >(argp1);
36880   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__LatLongCoord,  0 );
36881   if (!SWIG_IsOK(res2)) {
36882     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoord const &","append", 2, argv[0] ));
36883   }
36884   if (!argp2) {
36885     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoord const &","append", 2, argv[0]));
36886   }
36887   arg2 = reinterpret_cast< Xapian::LatLongCoord * >(argp2);
36888   {
36889     try {
36890       (arg1)->append((Xapian::LatLongCoord const &)*arg2);
36891     } catch (...) {
36892       string msg;
36893       int code = XapianExceptionHandler(msg);
36894       SWIG_exception(code, msg.c_str());
36895     }
36896   }
36897   return Qnil;
36898 fail:
36899   return Qnil;
36900 }
36901 
36902 
36903 SWIGINTERN VALUE
_wrap_new_LatLongCoords__SWIG_0(int argc,VALUE * argv,VALUE self)36904 _wrap_new_LatLongCoords__SWIG_0(int argc, VALUE *argv, VALUE self) {
36905   const char *classname SWIGUNUSED = "Xapian::LatLongCoords";
36906   Xapian::LatLongCoords *result = 0 ;
36907 
36908   if ((argc < 0) || (argc > 0)) {
36909     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
36910   }
36911   {
36912     try {
36913       result = (Xapian::LatLongCoords *)new Xapian::LatLongCoords();
36914       DATA_PTR(self) = result;
36915     } catch (...) {
36916       string msg;
36917       int code = XapianExceptionHandler(msg);
36918       SWIG_exception(code, msg.c_str());
36919     }
36920   }
36921   return self;
36922 fail:
36923   return Qnil;
36924 }
36925 
36926 
36927 SWIGINTERN VALUE
36928 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_LatLongCoords_allocate(VALUE self)36929 _wrap_LatLongCoords_allocate(VALUE self)
36930 #else
36931 _wrap_LatLongCoords_allocate(int argc, VALUE *argv, VALUE self)
36932 #endif
36933 {
36934   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__LatLongCoords);
36935 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
36936   rb_obj_call_init(vresult, argc, argv);
36937 #endif
36938   return vresult;
36939 }
36940 
36941 
36942 SWIGINTERN VALUE
_wrap_new_LatLongCoords__SWIG_1(int argc,VALUE * argv,VALUE self)36943 _wrap_new_LatLongCoords__SWIG_1(int argc, VALUE *argv, VALUE self) {
36944   Xapian::LatLongCoord *arg1 = 0 ;
36945   void *argp1 ;
36946   int res1 = 0 ;
36947   const char *classname SWIGUNUSED = "Xapian::LatLongCoords";
36948   Xapian::LatLongCoords *result = 0 ;
36949 
36950   if ((argc < 1) || (argc > 1)) {
36951     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
36952   }
36953   res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Xapian__LatLongCoord,  0 );
36954   if (!SWIG_IsOK(res1)) {
36955     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongCoord const &","LatLongCoords", 1, argv[0] ));
36956   }
36957   if (!argp1) {
36958     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoord const &","LatLongCoords", 1, argv[0]));
36959   }
36960   arg1 = reinterpret_cast< Xapian::LatLongCoord * >(argp1);
36961   {
36962     try {
36963       result = (Xapian::LatLongCoords *)new Xapian::LatLongCoords((Xapian::LatLongCoord const &)*arg1);
36964       DATA_PTR(self) = result;
36965     } catch (...) {
36966       string msg;
36967       int code = XapianExceptionHandler(msg);
36968       SWIG_exception(code, msg.c_str());
36969     }
36970   }
36971   return self;
36972 fail:
36973   return Qnil;
36974 }
36975 
36976 
_wrap_new_LatLongCoords(int nargs,VALUE * args,VALUE self)36977 SWIGINTERN VALUE _wrap_new_LatLongCoords(int nargs, VALUE *args, VALUE self) {
36978   int argc;
36979   VALUE argv[1];
36980   int ii;
36981 
36982   argc = nargs;
36983   if (argc > 1) SWIG_fail;
36984   for (ii = 0; (ii < argc); ++ii) {
36985     argv[ii] = args[ii];
36986   }
36987   if (argc == 0) {
36988     return _wrap_new_LatLongCoords__SWIG_0(nargs, args, self);
36989   }
36990   if (argc == 1) {
36991     int _v;
36992     void *vptr = 0;
36993     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__LatLongCoord, 0);
36994     _v = SWIG_CheckState(res);
36995     if (_v) {
36996       return _wrap_new_LatLongCoords__SWIG_1(nargs, args, self);
36997     }
36998   }
36999 
37000 fail:
37001   Ruby_Format_OverloadedError( argc, 1, "LatLongCoords.new",
37002     "    LatLongCoords.new()\n"
37003     "    LatLongCoords.new(Xapian::LatLongCoord const &coord)\n");
37004 
37005   return Qnil;
37006 }
37007 
37008 
37009 SWIGINTERN VALUE
_wrap_LatLongCoords_unserialise(int argc,VALUE * argv,VALUE self)37010 _wrap_LatLongCoords_unserialise(int argc, VALUE *argv, VALUE self) {
37011   Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
37012   std::string *arg2 = 0 ;
37013   void *argp1 = 0 ;
37014   int res1 = 0 ;
37015   int res2 = SWIG_OLDOBJ ;
37016 
37017   if ((argc < 1) || (argc > 1)) {
37018     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
37019   }
37020   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongCoords, 0 |  0 );
37021   if (!SWIG_IsOK(res1)) {
37022     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongCoords *","unserialise", 1, self ));
37023   }
37024   arg1 = reinterpret_cast< Xapian::LatLongCoords * >(argp1);
37025   {
37026     std::string *ptr = (std::string *)0;
37027     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
37028     if (!SWIG_IsOK(res2)) {
37029       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","unserialise", 2, argv[0] ));
37030     }
37031     if (!ptr) {
37032       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","unserialise", 2, argv[0]));
37033     }
37034     arg2 = ptr;
37035   }
37036   {
37037     try {
37038       (arg1)->unserialise((std::string const &)*arg2);
37039     } catch (...) {
37040       string msg;
37041       int code = XapianExceptionHandler(msg);
37042       SWIG_exception(code, msg.c_str());
37043     }
37044   }
37045   if (SWIG_IsNewObj(res2)) delete arg2;
37046   return Qnil;
37047 fail:
37048   if (SWIG_IsNewObj(res2)) delete arg2;
37049   return Qnil;
37050 }
37051 
37052 
37053 SWIGINTERN VALUE
_wrap_LatLongCoords_serialise(int argc,VALUE * argv,VALUE self)37054 _wrap_LatLongCoords_serialise(int argc, VALUE *argv, VALUE self) {
37055   Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
37056   void *argp1 = 0 ;
37057   int res1 = 0 ;
37058   std::string result;
37059   VALUE vresult = Qnil;
37060 
37061   if ((argc < 0) || (argc > 0)) {
37062     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
37063   }
37064   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongCoords, 0 |  0 );
37065   if (!SWIG_IsOK(res1)) {
37066     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const *","serialise", 1, self ));
37067   }
37068   arg1 = reinterpret_cast< Xapian::LatLongCoords * >(argp1);
37069   {
37070     try {
37071       result = ((Xapian::LatLongCoords const *)arg1)->serialise();
37072     } catch (...) {
37073       string msg;
37074       int code = XapianExceptionHandler(msg);
37075       SWIG_exception(code, msg.c_str());
37076     }
37077   }
37078   vresult = SWIG_From_std_string(static_cast< std::string >(result));
37079   return vresult;
37080 fail:
37081   return Qnil;
37082 }
37083 
37084 
37085 SWIGINTERN VALUE
_wrap_LatLongCoords_description(int argc,VALUE * argv,VALUE self)37086 _wrap_LatLongCoords_description(int argc, VALUE *argv, VALUE self) {
37087   Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
37088   void *argp1 = 0 ;
37089   int res1 = 0 ;
37090   std::string result;
37091   VALUE vresult = Qnil;
37092 
37093   if ((argc < 0) || (argc > 0)) {
37094     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
37095   }
37096   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongCoords, 0 |  0 );
37097   if (!SWIG_IsOK(res1)) {
37098     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const *","get_description", 1, self ));
37099   }
37100   arg1 = reinterpret_cast< Xapian::LatLongCoords * >(argp1);
37101   {
37102     try {
37103       result = ((Xapian::LatLongCoords const *)arg1)->get_description();
37104     } catch (...) {
37105       string msg;
37106       int code = XapianExceptionHandler(msg);
37107       SWIG_exception(code, msg.c_str());
37108     }
37109   }
37110   vresult = SWIG_From_std_string(static_cast< std::string >(result));
37111   return vresult;
37112 fail:
37113   return Qnil;
37114 }
37115 
37116 
37117 SWIGINTERN void
free_Xapian_LatLongCoords(void * self)37118 free_Xapian_LatLongCoords(void *self) {
37119     Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *)self;
37120     delete arg1;
37121 }
37122 
37123 static swig_class SwigClassLatLongMetric;
37124 
37125 SWIGINTERN void
free_Xapian_LatLongMetric(void * self)37126 free_Xapian_LatLongMetric(void *self) {
37127     Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *)self;
37128     delete arg1;
37129 }
37130 
37131 SWIGINTERN VALUE
_wrap_LatLongMetric_pointwise_distance(int argc,VALUE * argv,VALUE self)37132 _wrap_LatLongMetric_pointwise_distance(int argc, VALUE *argv, VALUE self) {
37133   Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
37134   Xapian::LatLongCoord *arg2 = 0 ;
37135   Xapian::LatLongCoord *arg3 = 0 ;
37136   void *argp1 = 0 ;
37137   int res1 = 0 ;
37138   void *argp2 ;
37139   int res2 = 0 ;
37140   void *argp3 ;
37141   int res3 = 0 ;
37142   Swig::Director *director = 0;
37143   bool upcall = false;
37144   double result;
37145   VALUE vresult = Qnil;
37146 
37147   if ((argc < 2) || (argc > 2)) {
37148     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
37149   }
37150   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongMetric, 0 |  0 );
37151   if (!SWIG_IsOK(res1)) {
37152     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongMetric const *","pointwise_distance", 1, self ));
37153   }
37154   arg1 = reinterpret_cast< Xapian::LatLongMetric * >(argp1);
37155   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__LatLongCoord,  0 );
37156   if (!SWIG_IsOK(res2)) {
37157     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoord const &","pointwise_distance", 2, argv[0] ));
37158   }
37159   if (!argp2) {
37160     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoord const &","pointwise_distance", 2, argv[0]));
37161   }
37162   arg2 = reinterpret_cast< Xapian::LatLongCoord * >(argp2);
37163   res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_Xapian__LatLongCoord,  0 );
37164   if (!SWIG_IsOK(res3)) {
37165     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::LatLongCoord const &","pointwise_distance", 3, argv[1] ));
37166   }
37167   if (!argp3) {
37168     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoord const &","pointwise_distance", 3, argv[1]));
37169   }
37170   arg3 = reinterpret_cast< Xapian::LatLongCoord * >(argp3);
37171   director = dynamic_cast<Swig::Director *>(arg1);
37172   upcall = (director && (director->swig_get_self() == self));
37173   try {
37174     {
37175       try {
37176         if (upcall) {
37177           Swig::DirectorPureVirtualException::raise("Xapian::LatLongMetric::pointwise_distance");
37178         } else {
37179           result = (double)((Xapian::LatLongMetric const *)arg1)->pointwise_distance((Xapian::LatLongCoord const &)*arg2,(Xapian::LatLongCoord const &)*arg3);
37180         }
37181       } catch (...) {
37182         string msg;
37183         int code = XapianExceptionHandler(msg);
37184         SWIG_exception(code, msg.c_str());
37185       }
37186     }
37187   } catch (Swig::DirectorException& e) {
37188     rb_exc_raise(e.getError());
37189     SWIG_fail;
37190   }
37191   vresult = SWIG_From_double(static_cast< double >(result));
37192   return vresult;
37193 fail:
37194   return Qnil;
37195 }
37196 
37197 
37198 SWIGINTERN VALUE
_wrap_LatLongMetric___call____SWIG_0(int argc,VALUE * argv,VALUE self)37199 _wrap_LatLongMetric___call____SWIG_0(int argc, VALUE *argv, VALUE self) {
37200   Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
37201   Xapian::LatLongCoords *arg2 = 0 ;
37202   Xapian::LatLongCoords *arg3 = 0 ;
37203   void *argp1 = 0 ;
37204   int res1 = 0 ;
37205   void *argp2 ;
37206   int res2 = 0 ;
37207   void *argp3 ;
37208   int res3 = 0 ;
37209   double result;
37210   VALUE vresult = Qnil;
37211 
37212   if ((argc < 2) || (argc > 2)) {
37213     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
37214   }
37215   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongMetric, 0 |  0 );
37216   if (!SWIG_IsOK(res1)) {
37217     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongMetric const *","operator ()", 1, self ));
37218   }
37219   arg1 = reinterpret_cast< Xapian::LatLongMetric * >(argp1);
37220   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
37221   if (!SWIG_IsOK(res2)) {
37222     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const &","operator ()", 2, argv[0] ));
37223   }
37224   if (!argp2) {
37225     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoords const &","operator ()", 2, argv[0]));
37226   }
37227   arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
37228   res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
37229   if (!SWIG_IsOK(res3)) {
37230     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const &","operator ()", 3, argv[1] ));
37231   }
37232   if (!argp3) {
37233     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoords const &","operator ()", 3, argv[1]));
37234   }
37235   arg3 = reinterpret_cast< Xapian::LatLongCoords * >(argp3);
37236   {
37237     try {
37238       result = (double)((Xapian::LatLongMetric const *)arg1)->operator ()((Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongCoords const &)*arg3);
37239     } catch (...) {
37240       string msg;
37241       int code = XapianExceptionHandler(msg);
37242       SWIG_exception(code, msg.c_str());
37243     }
37244   }
37245   vresult = SWIG_From_double(static_cast< double >(result));
37246   return vresult;
37247 fail:
37248   return Qnil;
37249 }
37250 
37251 
37252 SWIGINTERN VALUE
_wrap_LatLongMetric___call____SWIG_1(int argc,VALUE * argv,VALUE self)37253 _wrap_LatLongMetric___call____SWIG_1(int argc, VALUE *argv, VALUE self) {
37254   Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
37255   Xapian::LatLongCoords *arg2 = 0 ;
37256   std::string *arg3 = 0 ;
37257   void *argp1 = 0 ;
37258   int res1 = 0 ;
37259   void *argp2 ;
37260   int res2 = 0 ;
37261   int res3 = SWIG_OLDOBJ ;
37262   double result;
37263   VALUE vresult = Qnil;
37264 
37265   if ((argc < 2) || (argc > 2)) {
37266     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
37267   }
37268   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongMetric, 0 |  0 );
37269   if (!SWIG_IsOK(res1)) {
37270     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongMetric const *","operator ()", 1, self ));
37271   }
37272   arg1 = reinterpret_cast< Xapian::LatLongMetric * >(argp1);
37273   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
37274   if (!SWIG_IsOK(res2)) {
37275     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const &","operator ()", 2, argv[0] ));
37276   }
37277   if (!argp2) {
37278     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoords const &","operator ()", 2, argv[0]));
37279   }
37280   arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
37281   {
37282     std::string *ptr = (std::string *)0;
37283     res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
37284     if (!SWIG_IsOK(res3)) {
37285       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","operator ()", 3, argv[1] ));
37286     }
37287     if (!ptr) {
37288       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","operator ()", 3, argv[1]));
37289     }
37290     arg3 = ptr;
37291   }
37292   {
37293     try {
37294       result = (double)((Xapian::LatLongMetric const *)arg1)->operator ()((Xapian::LatLongCoords const &)*arg2,(std::string const &)*arg3);
37295     } catch (...) {
37296       string msg;
37297       int code = XapianExceptionHandler(msg);
37298       SWIG_exception(code, msg.c_str());
37299     }
37300   }
37301   vresult = SWIG_From_double(static_cast< double >(result));
37302   if (SWIG_IsNewObj(res3)) delete arg3;
37303   return vresult;
37304 fail:
37305   if (SWIG_IsNewObj(res3)) delete arg3;
37306   return Qnil;
37307 }
37308 
37309 
37310 SWIGINTERN VALUE
_wrap_LatLongMetric___call____SWIG_2(int argc,VALUE * argv,VALUE self)37311 _wrap_LatLongMetric___call____SWIG_2(int argc, VALUE *argv, VALUE self) {
37312   Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
37313   Xapian::LatLongCoords *arg2 = 0 ;
37314   char *arg3 = (char *) 0 ;
37315   size_t arg4 ;
37316   void *argp1 = 0 ;
37317   int res1 = 0 ;
37318   void *argp2 ;
37319   int res2 = 0 ;
37320   int res3 ;
37321   char *buf3 = 0 ;
37322   int alloc3 = 0 ;
37323   size_t val4 ;
37324   int ecode4 = 0 ;
37325   double result;
37326   VALUE vresult = Qnil;
37327 
37328   if ((argc < 3) || (argc > 3)) {
37329     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
37330   }
37331   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongMetric, 0 |  0 );
37332   if (!SWIG_IsOK(res1)) {
37333     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongMetric const *","operator ()", 1, self ));
37334   }
37335   arg1 = reinterpret_cast< Xapian::LatLongMetric * >(argp1);
37336   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
37337   if (!SWIG_IsOK(res2)) {
37338     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const &","operator ()", 2, argv[0] ));
37339   }
37340   if (!argp2) {
37341     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoords const &","operator ()", 2, argv[0]));
37342   }
37343   arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
37344   res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
37345   if (!SWIG_IsOK(res3)) {
37346     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","operator ()", 3, argv[1] ));
37347   }
37348   arg3 = reinterpret_cast< char * >(buf3);
37349   ecode4 = SWIG_AsVal_size_t(argv[2], &val4);
37350   if (!SWIG_IsOK(ecode4)) {
37351     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","operator ()", 4, argv[2] ));
37352   }
37353   arg4 = static_cast< size_t >(val4);
37354   {
37355     try {
37356       result = (double)((Xapian::LatLongMetric const *)arg1)->operator ()((Xapian::LatLongCoords const &)*arg2,(char const *)arg3,arg4);
37357     } catch (...) {
37358       string msg;
37359       int code = XapianExceptionHandler(msg);
37360       SWIG_exception(code, msg.c_str());
37361     }
37362   }
37363   vresult = SWIG_From_double(static_cast< double >(result));
37364   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
37365   return vresult;
37366 fail:
37367   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
37368   return Qnil;
37369 }
37370 
37371 
_wrap_LatLongMetric___call__(int nargs,VALUE * args,VALUE self)37372 SWIGINTERN VALUE _wrap_LatLongMetric___call__(int nargs, VALUE *args, VALUE self) {
37373   int argc;
37374   VALUE argv[5];
37375   int ii;
37376 
37377   argc = nargs + 1;
37378   argv[0] = self;
37379   if (argc > 5) SWIG_fail;
37380   for (ii = 1; (ii < argc); ++ii) {
37381     argv[ii] = args[ii-1];
37382   }
37383   if (argc == 3) {
37384     int _v;
37385     void *vptr = 0;
37386     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__LatLongMetric, 0);
37387     _v = SWIG_CheckState(res);
37388     if (_v) {
37389       void *vptr = 0;
37390       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__LatLongCoords, 0);
37391       _v = SWIG_CheckState(res);
37392       if (_v) {
37393         void *vptr = 0;
37394         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__LatLongCoords, 0);
37395         _v = SWIG_CheckState(res);
37396         if (_v) {
37397           return _wrap_LatLongMetric___call____SWIG_0(nargs, args, self);
37398         }
37399       }
37400     }
37401   }
37402   if (argc == 3) {
37403     int _v;
37404     void *vptr = 0;
37405     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__LatLongMetric, 0);
37406     _v = SWIG_CheckState(res);
37407     if (_v) {
37408       void *vptr = 0;
37409       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__LatLongCoords, 0);
37410       _v = SWIG_CheckState(res);
37411       if (_v) {
37412         int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
37413         _v = SWIG_CheckState(res);
37414         if (_v) {
37415           return _wrap_LatLongMetric___call____SWIG_1(nargs, args, self);
37416         }
37417       }
37418     }
37419   }
37420   if (argc == 4) {
37421     int _v;
37422     void *vptr = 0;
37423     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__LatLongMetric, 0);
37424     _v = SWIG_CheckState(res);
37425     if (_v) {
37426       void *vptr = 0;
37427       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__LatLongCoords, 0);
37428       _v = SWIG_CheckState(res);
37429       if (_v) {
37430         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
37431         _v = SWIG_CheckState(res);
37432         if (_v) {
37433           {
37434             int res = SWIG_AsVal_size_t(argv[3], NULL);
37435             _v = SWIG_CheckState(res);
37436           }
37437           if (_v) {
37438             return _wrap_LatLongMetric___call____SWIG_2(nargs, args, self);
37439           }
37440         }
37441       }
37442     }
37443   }
37444 
37445 fail:
37446   Ruby_Format_OverloadedError( argc, 5, "LatLongMetric.__call__",
37447     "    double LatLongMetric.__call__(Xapian::LatLongCoords const &a, Xapian::LatLongCoords const &b)\n"
37448     "    double LatLongMetric.__call__(Xapian::LatLongCoords const &a, std::string const &b)\n"
37449     "    double LatLongMetric.__call__(Xapian::LatLongCoords const &a, char const *b_ptr, size_t b_len)\n");
37450 
37451   return Qnil;
37452 }
37453 
37454 
37455 SWIGINTERN VALUE
_wrap_LatLongMetric_name(int argc,VALUE * argv,VALUE self)37456 _wrap_LatLongMetric_name(int argc, VALUE *argv, VALUE self) {
37457   Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
37458   void *argp1 = 0 ;
37459   int res1 = 0 ;
37460   Swig::Director *director = 0;
37461   bool upcall = false;
37462   std::string result;
37463   VALUE vresult = Qnil;
37464 
37465   if ((argc < 0) || (argc > 0)) {
37466     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
37467   }
37468   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongMetric, 0 |  0 );
37469   if (!SWIG_IsOK(res1)) {
37470     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongMetric const *","name", 1, self ));
37471   }
37472   arg1 = reinterpret_cast< Xapian::LatLongMetric * >(argp1);
37473   director = dynamic_cast<Swig::Director *>(arg1);
37474   upcall = (director && (director->swig_get_self() == self));
37475   try {
37476     {
37477       try {
37478         if (upcall) {
37479           Swig::DirectorPureVirtualException::raise("Xapian::LatLongMetric::name");
37480         } else {
37481           result = ((Xapian::LatLongMetric const *)arg1)->name();
37482         }
37483       } catch (...) {
37484         string msg;
37485         int code = XapianExceptionHandler(msg);
37486         SWIG_exception(code, msg.c_str());
37487       }
37488     }
37489   } catch (Swig::DirectorException& e) {
37490     rb_exc_raise(e.getError());
37491     SWIG_fail;
37492   }
37493   vresult = SWIG_From_std_string(static_cast< std::string >(result));
37494   return vresult;
37495 fail:
37496   return Qnil;
37497 }
37498 
37499 
37500 SWIGINTERN VALUE
37501 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_LatLongMetric_allocate(VALUE self)37502 _wrap_LatLongMetric_allocate(VALUE self)
37503 #else
37504 _wrap_LatLongMetric_allocate(int argc, VALUE *argv, VALUE self)
37505 #endif
37506 {
37507   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__LatLongMetric);
37508 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
37509   rb_obj_call_init(vresult, argc, argv);
37510 #endif
37511   return vresult;
37512 }
37513 
37514 
37515 SWIGINTERN VALUE
_wrap_new_LatLongMetric(int argc,VALUE * argv,VALUE self)37516 _wrap_new_LatLongMetric(int argc, VALUE *argv, VALUE self) {
37517   VALUE arg1 = (VALUE) 0 ;
37518   const char *classname SWIGUNUSED = "Xapian::LatLongMetric";
37519   Xapian::LatLongMetric *result = 0 ;
37520 
37521   if ((argc < 0) || (argc > 0)) {
37522     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
37523   }
37524   arg1 = self;
37525   {
37526     try {
37527       if ( strcmp(rb_obj_classname(self), classname) != 0 ) {
37528         /* subclassed */
37529         result = (Xapian::LatLongMetric *)new SwigDirector_LatLongMetric(arg1);
37530       } else {
37531         rb_raise(rb_eNameError,"accessing abstract class or protected constructor");
37532         return Qnil;
37533       }
37534 
37535       DATA_PTR(self) = result;
37536     } catch (...) {
37537       string msg;
37538       int code = XapianExceptionHandler(msg);
37539       SWIG_exception(code, msg.c_str());
37540     }
37541   }
37542   return self;
37543 fail:
37544   return Qnil;
37545 }
37546 
37547 
37548 SWIGINTERN VALUE
_wrap_disown_LatLongMetric(int argc,VALUE * argv,VALUE self)37549 _wrap_disown_LatLongMetric(int argc, VALUE *argv, VALUE self) {
37550   Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
37551   void *argp1 = 0 ;
37552   int res1 = 0 ;
37553 
37554   if ((argc < 1) || (argc > 1)) {
37555     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
37556   }
37557   res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Xapian__LatLongMetric, 0 |  0 );
37558   if (!SWIG_IsOK(res1)) {
37559     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongMetric *","disown_LatLongMetric", 1, argv[0] ));
37560   }
37561   arg1 = reinterpret_cast< Xapian::LatLongMetric * >(argp1);
37562   {
37563     Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
37564     if (director) director->swig_disown();
37565   }
37566 
37567   return Qnil;
37568 fail:
37569   return Qnil;
37570 }
37571 
37572 
37573 static swig_class SwigClassGreatCircleMetric;
37574 
37575 SWIGINTERN VALUE
_wrap_new_GreatCircleMetric__SWIG_0(int argc,VALUE * argv,VALUE self)37576 _wrap_new_GreatCircleMetric__SWIG_0(int argc, VALUE *argv, VALUE self) {
37577   const char *classname SWIGUNUSED = "Xapian::GreatCircleMetric";
37578   Xapian::GreatCircleMetric *result = 0 ;
37579 
37580   if ((argc < 0) || (argc > 0)) {
37581     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
37582   }
37583   {
37584     try {
37585       result = (Xapian::GreatCircleMetric *)new Xapian::GreatCircleMetric();
37586       DATA_PTR(self) = result;
37587     } catch (...) {
37588       string msg;
37589       int code = XapianExceptionHandler(msg);
37590       SWIG_exception(code, msg.c_str());
37591     }
37592   }
37593   return self;
37594 fail:
37595   return Qnil;
37596 }
37597 
37598 
37599 SWIGINTERN VALUE
37600 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_GreatCircleMetric_allocate(VALUE self)37601 _wrap_GreatCircleMetric_allocate(VALUE self)
37602 #else
37603 _wrap_GreatCircleMetric_allocate(int argc, VALUE *argv, VALUE self)
37604 #endif
37605 {
37606   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__GreatCircleMetric);
37607 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
37608   rb_obj_call_init(vresult, argc, argv);
37609 #endif
37610   return vresult;
37611 }
37612 
37613 
37614 SWIGINTERN VALUE
_wrap_new_GreatCircleMetric__SWIG_1(int argc,VALUE * argv,VALUE self)37615 _wrap_new_GreatCircleMetric__SWIG_1(int argc, VALUE *argv, VALUE self) {
37616   double arg1 ;
37617   double val1 ;
37618   int ecode1 = 0 ;
37619   const char *classname SWIGUNUSED = "Xapian::GreatCircleMetric";
37620   Xapian::GreatCircleMetric *result = 0 ;
37621 
37622   if ((argc < 1) || (argc > 1)) {
37623     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
37624   }
37625   ecode1 = SWIG_AsVal_double(argv[0], &val1);
37626   if (!SWIG_IsOK(ecode1)) {
37627     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","GreatCircleMetric", 1, argv[0] ));
37628   }
37629   arg1 = static_cast< double >(val1);
37630   {
37631     try {
37632       result = (Xapian::GreatCircleMetric *)new Xapian::GreatCircleMetric(arg1);
37633       DATA_PTR(self) = result;
37634     } catch (...) {
37635       string msg;
37636       int code = XapianExceptionHandler(msg);
37637       SWIG_exception(code, msg.c_str());
37638     }
37639   }
37640   return self;
37641 fail:
37642   return Qnil;
37643 }
37644 
37645 
_wrap_new_GreatCircleMetric(int nargs,VALUE * args,VALUE self)37646 SWIGINTERN VALUE _wrap_new_GreatCircleMetric(int nargs, VALUE *args, VALUE self) {
37647   int argc;
37648   VALUE argv[1];
37649   int ii;
37650 
37651   argc = nargs;
37652   if (argc > 1) SWIG_fail;
37653   for (ii = 0; (ii < argc); ++ii) {
37654     argv[ii] = args[ii];
37655   }
37656   if (argc == 0) {
37657     return _wrap_new_GreatCircleMetric__SWIG_0(nargs, args, self);
37658   }
37659   if (argc == 1) {
37660     int _v;
37661     {
37662       int res = SWIG_AsVal_double(argv[0], NULL);
37663       _v = SWIG_CheckState(res);
37664     }
37665     if (_v) {
37666       return _wrap_new_GreatCircleMetric__SWIG_1(nargs, args, self);
37667     }
37668   }
37669 
37670 fail:
37671   Ruby_Format_OverloadedError( argc, 1, "GreatCircleMetric.new",
37672     "    GreatCircleMetric.new()\n"
37673     "    GreatCircleMetric.new(double radius_)\n");
37674 
37675   return Qnil;
37676 }
37677 
37678 
37679 SWIGINTERN VALUE
_wrap_GreatCircleMetric_pointwise_distance(int argc,VALUE * argv,VALUE self)37680 _wrap_GreatCircleMetric_pointwise_distance(int argc, VALUE *argv, VALUE self) {
37681   Xapian::GreatCircleMetric *arg1 = (Xapian::GreatCircleMetric *) 0 ;
37682   Xapian::LatLongCoord *arg2 = 0 ;
37683   Xapian::LatLongCoord *arg3 = 0 ;
37684   void *argp1 = 0 ;
37685   int res1 = 0 ;
37686   void *argp2 ;
37687   int res2 = 0 ;
37688   void *argp3 ;
37689   int res3 = 0 ;
37690   double result;
37691   VALUE vresult = Qnil;
37692 
37693   if ((argc < 2) || (argc > 2)) {
37694     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
37695   }
37696   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__GreatCircleMetric, 0 |  0 );
37697   if (!SWIG_IsOK(res1)) {
37698     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::GreatCircleMetric const *","pointwise_distance", 1, self ));
37699   }
37700   arg1 = reinterpret_cast< Xapian::GreatCircleMetric * >(argp1);
37701   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__LatLongCoord,  0 );
37702   if (!SWIG_IsOK(res2)) {
37703     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoord const &","pointwise_distance", 2, argv[0] ));
37704   }
37705   if (!argp2) {
37706     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoord const &","pointwise_distance", 2, argv[0]));
37707   }
37708   arg2 = reinterpret_cast< Xapian::LatLongCoord * >(argp2);
37709   res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_Xapian__LatLongCoord,  0 );
37710   if (!SWIG_IsOK(res3)) {
37711     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::LatLongCoord const &","pointwise_distance", 3, argv[1] ));
37712   }
37713   if (!argp3) {
37714     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoord const &","pointwise_distance", 3, argv[1]));
37715   }
37716   arg3 = reinterpret_cast< Xapian::LatLongCoord * >(argp3);
37717   {
37718     try {
37719       result = (double)((Xapian::GreatCircleMetric const *)arg1)->pointwise_distance((Xapian::LatLongCoord const &)*arg2,(Xapian::LatLongCoord const &)*arg3);
37720     } catch (...) {
37721       string msg;
37722       int code = XapianExceptionHandler(msg);
37723       SWIG_exception(code, msg.c_str());
37724     }
37725   }
37726   vresult = SWIG_From_double(static_cast< double >(result));
37727   return vresult;
37728 fail:
37729   return Qnil;
37730 }
37731 
37732 
37733 SWIGINTERN VALUE
_wrap_GreatCircleMetric_name(int argc,VALUE * argv,VALUE self)37734 _wrap_GreatCircleMetric_name(int argc, VALUE *argv, VALUE self) {
37735   Xapian::GreatCircleMetric *arg1 = (Xapian::GreatCircleMetric *) 0 ;
37736   void *argp1 = 0 ;
37737   int res1 = 0 ;
37738   std::string result;
37739   VALUE vresult = Qnil;
37740 
37741   if ((argc < 0) || (argc > 0)) {
37742     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
37743   }
37744   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__GreatCircleMetric, 0 |  0 );
37745   if (!SWIG_IsOK(res1)) {
37746     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::GreatCircleMetric const *","name", 1, self ));
37747   }
37748   arg1 = reinterpret_cast< Xapian::GreatCircleMetric * >(argp1);
37749   {
37750     try {
37751       result = ((Xapian::GreatCircleMetric const *)arg1)->name();
37752     } catch (...) {
37753       string msg;
37754       int code = XapianExceptionHandler(msg);
37755       SWIG_exception(code, msg.c_str());
37756     }
37757   }
37758   vresult = SWIG_From_std_string(static_cast< std::string >(result));
37759   return vresult;
37760 fail:
37761   return Qnil;
37762 }
37763 
37764 
37765 SWIGINTERN void
free_Xapian_GreatCircleMetric(void * self)37766 free_Xapian_GreatCircleMetric(void *self) {
37767     Xapian::GreatCircleMetric *arg1 = (Xapian::GreatCircleMetric *)self;
37768     delete arg1;
37769 }
37770 
37771 static swig_class SwigClassLatLongDistancePostingSource;
37772 
37773 SWIGINTERN VALUE
_wrap_new_LatLongDistancePostingSource__SWIG_0(int argc,VALUE * argv,VALUE self)37774 _wrap_new_LatLongDistancePostingSource__SWIG_0(int argc, VALUE *argv, VALUE self) {
37775   Xapian::valueno arg1 ;
37776   Xapian::LatLongCoords *arg2 = 0 ;
37777   Xapian::LatLongMetric *arg3 = 0 ;
37778   double arg4 ;
37779   double arg5 ;
37780   double arg6 ;
37781   unsigned int val1 ;
37782   int ecode1 = 0 ;
37783   void *argp2 ;
37784   int res2 = 0 ;
37785   void *argp3 ;
37786   int res3 = 0 ;
37787   double val4 ;
37788   int ecode4 = 0 ;
37789   double val5 ;
37790   int ecode5 = 0 ;
37791   double val6 ;
37792   int ecode6 = 0 ;
37793   const char *classname SWIGUNUSED = "Xapian::LatLongDistancePostingSource";
37794   Xapian::LatLongDistancePostingSource *result = 0 ;
37795 
37796   if ((argc < 6) || (argc > 6)) {
37797     rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
37798   }
37799   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
37800   if (!SWIG_IsOK(ecode1)) {
37801     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","LatLongDistancePostingSource", 1, argv[0] ));
37802   }
37803   arg1 = static_cast< Xapian::valueno >(val1);
37804   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
37805   if (!SWIG_IsOK(res2)) {
37806     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const &","LatLongDistancePostingSource", 2, argv[1] ));
37807   }
37808   if (!argp2) {
37809     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoords const &","LatLongDistancePostingSource", 2, argv[1]));
37810   }
37811   arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
37812   res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_Xapian__LatLongMetric,  0 );
37813   if (!SWIG_IsOK(res3)) {
37814     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::LatLongMetric const &","LatLongDistancePostingSource", 3, argv[2] ));
37815   }
37816   if (!argp3) {
37817     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongMetric const &","LatLongDistancePostingSource", 3, argv[2]));
37818   }
37819   arg3 = reinterpret_cast< Xapian::LatLongMetric * >(argp3);
37820   ecode4 = SWIG_AsVal_double(argv[3], &val4);
37821   if (!SWIG_IsOK(ecode4)) {
37822     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","LatLongDistancePostingSource", 4, argv[3] ));
37823   }
37824   arg4 = static_cast< double >(val4);
37825   ecode5 = SWIG_AsVal_double(argv[4], &val5);
37826   if (!SWIG_IsOK(ecode5)) {
37827     SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","LatLongDistancePostingSource", 5, argv[4] ));
37828   }
37829   arg5 = static_cast< double >(val5);
37830   ecode6 = SWIG_AsVal_double(argv[5], &val6);
37831   if (!SWIG_IsOK(ecode6)) {
37832     SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","LatLongDistancePostingSource", 6, argv[5] ));
37833   }
37834   arg6 = static_cast< double >(val6);
37835   {
37836     try {
37837       result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongMetric const &)*arg3,arg4,arg5,arg6);
37838       DATA_PTR(self) = result;
37839     } catch (...) {
37840       string msg;
37841       int code = XapianExceptionHandler(msg);
37842       SWIG_exception(code, msg.c_str());
37843     }
37844   }
37845   return self;
37846 fail:
37847   return Qnil;
37848 }
37849 
37850 
37851 SWIGINTERN VALUE
_wrap_new_LatLongDistancePostingSource__SWIG_1(int argc,VALUE * argv,VALUE self)37852 _wrap_new_LatLongDistancePostingSource__SWIG_1(int argc, VALUE *argv, VALUE self) {
37853   Xapian::valueno arg1 ;
37854   Xapian::LatLongCoords *arg2 = 0 ;
37855   Xapian::LatLongMetric *arg3 = 0 ;
37856   double arg4 ;
37857   double arg5 ;
37858   unsigned int val1 ;
37859   int ecode1 = 0 ;
37860   void *argp2 ;
37861   int res2 = 0 ;
37862   void *argp3 ;
37863   int res3 = 0 ;
37864   double val4 ;
37865   int ecode4 = 0 ;
37866   double val5 ;
37867   int ecode5 = 0 ;
37868   const char *classname SWIGUNUSED = "Xapian::LatLongDistancePostingSource";
37869   Xapian::LatLongDistancePostingSource *result = 0 ;
37870 
37871   if ((argc < 5) || (argc > 5)) {
37872     rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
37873   }
37874   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
37875   if (!SWIG_IsOK(ecode1)) {
37876     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","LatLongDistancePostingSource", 1, argv[0] ));
37877   }
37878   arg1 = static_cast< Xapian::valueno >(val1);
37879   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
37880   if (!SWIG_IsOK(res2)) {
37881     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const &","LatLongDistancePostingSource", 2, argv[1] ));
37882   }
37883   if (!argp2) {
37884     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoords const &","LatLongDistancePostingSource", 2, argv[1]));
37885   }
37886   arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
37887   res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_Xapian__LatLongMetric,  0 );
37888   if (!SWIG_IsOK(res3)) {
37889     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::LatLongMetric const &","LatLongDistancePostingSource", 3, argv[2] ));
37890   }
37891   if (!argp3) {
37892     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongMetric const &","LatLongDistancePostingSource", 3, argv[2]));
37893   }
37894   arg3 = reinterpret_cast< Xapian::LatLongMetric * >(argp3);
37895   ecode4 = SWIG_AsVal_double(argv[3], &val4);
37896   if (!SWIG_IsOK(ecode4)) {
37897     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","LatLongDistancePostingSource", 4, argv[3] ));
37898   }
37899   arg4 = static_cast< double >(val4);
37900   ecode5 = SWIG_AsVal_double(argv[4], &val5);
37901   if (!SWIG_IsOK(ecode5)) {
37902     SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","LatLongDistancePostingSource", 5, argv[4] ));
37903   }
37904   arg5 = static_cast< double >(val5);
37905   {
37906     try {
37907       result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongMetric const &)*arg3,arg4,arg5);
37908       DATA_PTR(self) = result;
37909     } catch (...) {
37910       string msg;
37911       int code = XapianExceptionHandler(msg);
37912       SWIG_exception(code, msg.c_str());
37913     }
37914   }
37915   return self;
37916 fail:
37917   return Qnil;
37918 }
37919 
37920 
37921 SWIGINTERN VALUE
_wrap_new_LatLongDistancePostingSource__SWIG_2(int argc,VALUE * argv,VALUE self)37922 _wrap_new_LatLongDistancePostingSource__SWIG_2(int argc, VALUE *argv, VALUE self) {
37923   Xapian::valueno arg1 ;
37924   Xapian::LatLongCoords *arg2 = 0 ;
37925   Xapian::LatLongMetric *arg3 = 0 ;
37926   double arg4 ;
37927   unsigned int val1 ;
37928   int ecode1 = 0 ;
37929   void *argp2 ;
37930   int res2 = 0 ;
37931   void *argp3 ;
37932   int res3 = 0 ;
37933   double val4 ;
37934   int ecode4 = 0 ;
37935   const char *classname SWIGUNUSED = "Xapian::LatLongDistancePostingSource";
37936   Xapian::LatLongDistancePostingSource *result = 0 ;
37937 
37938   if ((argc < 4) || (argc > 4)) {
37939     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
37940   }
37941   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
37942   if (!SWIG_IsOK(ecode1)) {
37943     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","LatLongDistancePostingSource", 1, argv[0] ));
37944   }
37945   arg1 = static_cast< Xapian::valueno >(val1);
37946   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
37947   if (!SWIG_IsOK(res2)) {
37948     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const &","LatLongDistancePostingSource", 2, argv[1] ));
37949   }
37950   if (!argp2) {
37951     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoords const &","LatLongDistancePostingSource", 2, argv[1]));
37952   }
37953   arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
37954   res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_Xapian__LatLongMetric,  0 );
37955   if (!SWIG_IsOK(res3)) {
37956     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::LatLongMetric const &","LatLongDistancePostingSource", 3, argv[2] ));
37957   }
37958   if (!argp3) {
37959     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongMetric const &","LatLongDistancePostingSource", 3, argv[2]));
37960   }
37961   arg3 = reinterpret_cast< Xapian::LatLongMetric * >(argp3);
37962   ecode4 = SWIG_AsVal_double(argv[3], &val4);
37963   if (!SWIG_IsOK(ecode4)) {
37964     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","LatLongDistancePostingSource", 4, argv[3] ));
37965   }
37966   arg4 = static_cast< double >(val4);
37967   {
37968     try {
37969       result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongMetric const &)*arg3,arg4);
37970       DATA_PTR(self) = result;
37971     } catch (...) {
37972       string msg;
37973       int code = XapianExceptionHandler(msg);
37974       SWIG_exception(code, msg.c_str());
37975     }
37976   }
37977   return self;
37978 fail:
37979   return Qnil;
37980 }
37981 
37982 
37983 SWIGINTERN VALUE
_wrap_new_LatLongDistancePostingSource__SWIG_3(int argc,VALUE * argv,VALUE self)37984 _wrap_new_LatLongDistancePostingSource__SWIG_3(int argc, VALUE *argv, VALUE self) {
37985   Xapian::valueno arg1 ;
37986   Xapian::LatLongCoords *arg2 = 0 ;
37987   Xapian::LatLongMetric *arg3 = 0 ;
37988   unsigned int val1 ;
37989   int ecode1 = 0 ;
37990   void *argp2 ;
37991   int res2 = 0 ;
37992   void *argp3 ;
37993   int res3 = 0 ;
37994   const char *classname SWIGUNUSED = "Xapian::LatLongDistancePostingSource";
37995   Xapian::LatLongDistancePostingSource *result = 0 ;
37996 
37997   if ((argc < 3) || (argc > 3)) {
37998     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
37999   }
38000   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
38001   if (!SWIG_IsOK(ecode1)) {
38002     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","LatLongDistancePostingSource", 1, argv[0] ));
38003   }
38004   arg1 = static_cast< Xapian::valueno >(val1);
38005   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
38006   if (!SWIG_IsOK(res2)) {
38007     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const &","LatLongDistancePostingSource", 2, argv[1] ));
38008   }
38009   if (!argp2) {
38010     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoords const &","LatLongDistancePostingSource", 2, argv[1]));
38011   }
38012   arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
38013   res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_Xapian__LatLongMetric,  0 );
38014   if (!SWIG_IsOK(res3)) {
38015     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::LatLongMetric const &","LatLongDistancePostingSource", 3, argv[2] ));
38016   }
38017   if (!argp3) {
38018     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongMetric const &","LatLongDistancePostingSource", 3, argv[2]));
38019   }
38020   arg3 = reinterpret_cast< Xapian::LatLongMetric * >(argp3);
38021   {
38022     try {
38023       result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongMetric const &)*arg3);
38024       DATA_PTR(self) = result;
38025     } catch (...) {
38026       string msg;
38027       int code = XapianExceptionHandler(msg);
38028       SWIG_exception(code, msg.c_str());
38029     }
38030   }
38031   return self;
38032 fail:
38033   return Qnil;
38034 }
38035 
38036 
38037 SWIGINTERN VALUE
_wrap_new_LatLongDistancePostingSource__SWIG_4(int argc,VALUE * argv,VALUE self)38038 _wrap_new_LatLongDistancePostingSource__SWIG_4(int argc, VALUE *argv, VALUE self) {
38039   Xapian::valueno arg1 ;
38040   Xapian::LatLongCoords *arg2 = 0 ;
38041   double arg3 ;
38042   double arg4 ;
38043   double arg5 ;
38044   unsigned int val1 ;
38045   int ecode1 = 0 ;
38046   void *argp2 ;
38047   int res2 = 0 ;
38048   double val3 ;
38049   int ecode3 = 0 ;
38050   double val4 ;
38051   int ecode4 = 0 ;
38052   double val5 ;
38053   int ecode5 = 0 ;
38054   const char *classname SWIGUNUSED = "Xapian::LatLongDistancePostingSource";
38055   Xapian::LatLongDistancePostingSource *result = 0 ;
38056 
38057   if ((argc < 5) || (argc > 5)) {
38058     rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
38059   }
38060   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
38061   if (!SWIG_IsOK(ecode1)) {
38062     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","LatLongDistancePostingSource", 1, argv[0] ));
38063   }
38064   arg1 = static_cast< Xapian::valueno >(val1);
38065   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
38066   if (!SWIG_IsOK(res2)) {
38067     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const &","LatLongDistancePostingSource", 2, argv[1] ));
38068   }
38069   if (!argp2) {
38070     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoords const &","LatLongDistancePostingSource", 2, argv[1]));
38071   }
38072   arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
38073   ecode3 = SWIG_AsVal_double(argv[2], &val3);
38074   if (!SWIG_IsOK(ecode3)) {
38075     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","LatLongDistancePostingSource", 3, argv[2] ));
38076   }
38077   arg3 = static_cast< double >(val3);
38078   ecode4 = SWIG_AsVal_double(argv[3], &val4);
38079   if (!SWIG_IsOK(ecode4)) {
38080     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","LatLongDistancePostingSource", 4, argv[3] ));
38081   }
38082   arg4 = static_cast< double >(val4);
38083   ecode5 = SWIG_AsVal_double(argv[4], &val5);
38084   if (!SWIG_IsOK(ecode5)) {
38085     SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","LatLongDistancePostingSource", 5, argv[4] ));
38086   }
38087   arg5 = static_cast< double >(val5);
38088   {
38089     try {
38090       result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,arg3,arg4,arg5);
38091       DATA_PTR(self) = result;
38092     } catch (...) {
38093       string msg;
38094       int code = XapianExceptionHandler(msg);
38095       SWIG_exception(code, msg.c_str());
38096     }
38097   }
38098   return self;
38099 fail:
38100   return Qnil;
38101 }
38102 
38103 
38104 SWIGINTERN VALUE
_wrap_new_LatLongDistancePostingSource__SWIG_5(int argc,VALUE * argv,VALUE self)38105 _wrap_new_LatLongDistancePostingSource__SWIG_5(int argc, VALUE *argv, VALUE self) {
38106   Xapian::valueno arg1 ;
38107   Xapian::LatLongCoords *arg2 = 0 ;
38108   double arg3 ;
38109   double arg4 ;
38110   unsigned int val1 ;
38111   int ecode1 = 0 ;
38112   void *argp2 ;
38113   int res2 = 0 ;
38114   double val3 ;
38115   int ecode3 = 0 ;
38116   double val4 ;
38117   int ecode4 = 0 ;
38118   const char *classname SWIGUNUSED = "Xapian::LatLongDistancePostingSource";
38119   Xapian::LatLongDistancePostingSource *result = 0 ;
38120 
38121   if ((argc < 4) || (argc > 4)) {
38122     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
38123   }
38124   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
38125   if (!SWIG_IsOK(ecode1)) {
38126     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","LatLongDistancePostingSource", 1, argv[0] ));
38127   }
38128   arg1 = static_cast< Xapian::valueno >(val1);
38129   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
38130   if (!SWIG_IsOK(res2)) {
38131     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const &","LatLongDistancePostingSource", 2, argv[1] ));
38132   }
38133   if (!argp2) {
38134     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoords const &","LatLongDistancePostingSource", 2, argv[1]));
38135   }
38136   arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
38137   ecode3 = SWIG_AsVal_double(argv[2], &val3);
38138   if (!SWIG_IsOK(ecode3)) {
38139     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","LatLongDistancePostingSource", 3, argv[2] ));
38140   }
38141   arg3 = static_cast< double >(val3);
38142   ecode4 = SWIG_AsVal_double(argv[3], &val4);
38143   if (!SWIG_IsOK(ecode4)) {
38144     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","LatLongDistancePostingSource", 4, argv[3] ));
38145   }
38146   arg4 = static_cast< double >(val4);
38147   {
38148     try {
38149       result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,arg3,arg4);
38150       DATA_PTR(self) = result;
38151     } catch (...) {
38152       string msg;
38153       int code = XapianExceptionHandler(msg);
38154       SWIG_exception(code, msg.c_str());
38155     }
38156   }
38157   return self;
38158 fail:
38159   return Qnil;
38160 }
38161 
38162 
38163 SWIGINTERN VALUE
_wrap_new_LatLongDistancePostingSource__SWIG_6(int argc,VALUE * argv,VALUE self)38164 _wrap_new_LatLongDistancePostingSource__SWIG_6(int argc, VALUE *argv, VALUE self) {
38165   Xapian::valueno arg1 ;
38166   Xapian::LatLongCoords *arg2 = 0 ;
38167   double arg3 ;
38168   unsigned int val1 ;
38169   int ecode1 = 0 ;
38170   void *argp2 ;
38171   int res2 = 0 ;
38172   double val3 ;
38173   int ecode3 = 0 ;
38174   const char *classname SWIGUNUSED = "Xapian::LatLongDistancePostingSource";
38175   Xapian::LatLongDistancePostingSource *result = 0 ;
38176 
38177   if ((argc < 3) || (argc > 3)) {
38178     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
38179   }
38180   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
38181   if (!SWIG_IsOK(ecode1)) {
38182     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","LatLongDistancePostingSource", 1, argv[0] ));
38183   }
38184   arg1 = static_cast< Xapian::valueno >(val1);
38185   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
38186   if (!SWIG_IsOK(res2)) {
38187     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const &","LatLongDistancePostingSource", 2, argv[1] ));
38188   }
38189   if (!argp2) {
38190     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoords const &","LatLongDistancePostingSource", 2, argv[1]));
38191   }
38192   arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
38193   ecode3 = SWIG_AsVal_double(argv[2], &val3);
38194   if (!SWIG_IsOK(ecode3)) {
38195     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","LatLongDistancePostingSource", 3, argv[2] ));
38196   }
38197   arg3 = static_cast< double >(val3);
38198   {
38199     try {
38200       result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,arg3);
38201       DATA_PTR(self) = result;
38202     } catch (...) {
38203       string msg;
38204       int code = XapianExceptionHandler(msg);
38205       SWIG_exception(code, msg.c_str());
38206     }
38207   }
38208   return self;
38209 fail:
38210   return Qnil;
38211 }
38212 
38213 
38214 SWIGINTERN VALUE
38215 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_LatLongDistancePostingSource_allocate(VALUE self)38216 _wrap_LatLongDistancePostingSource_allocate(VALUE self)
38217 #else
38218 _wrap_LatLongDistancePostingSource_allocate(int argc, VALUE *argv, VALUE self)
38219 #endif
38220 {
38221   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__LatLongDistancePostingSource);
38222 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
38223   rb_obj_call_init(vresult, argc, argv);
38224 #endif
38225   return vresult;
38226 }
38227 
38228 
38229 SWIGINTERN VALUE
_wrap_new_LatLongDistancePostingSource__SWIG_7(int argc,VALUE * argv,VALUE self)38230 _wrap_new_LatLongDistancePostingSource__SWIG_7(int argc, VALUE *argv, VALUE self) {
38231   Xapian::valueno arg1 ;
38232   Xapian::LatLongCoords *arg2 = 0 ;
38233   unsigned int val1 ;
38234   int ecode1 = 0 ;
38235   void *argp2 ;
38236   int res2 = 0 ;
38237   const char *classname SWIGUNUSED = "Xapian::LatLongDistancePostingSource";
38238   Xapian::LatLongDistancePostingSource *result = 0 ;
38239 
38240   if ((argc < 2) || (argc > 2)) {
38241     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
38242   }
38243   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
38244   if (!SWIG_IsOK(ecode1)) {
38245     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","LatLongDistancePostingSource", 1, argv[0] ));
38246   }
38247   arg1 = static_cast< Xapian::valueno >(val1);
38248   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
38249   if (!SWIG_IsOK(res2)) {
38250     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const &","LatLongDistancePostingSource", 2, argv[1] ));
38251   }
38252   if (!argp2) {
38253     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoords const &","LatLongDistancePostingSource", 2, argv[1]));
38254   }
38255   arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
38256   {
38257     try {
38258       result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2);
38259       DATA_PTR(self) = result;
38260     } catch (...) {
38261       string msg;
38262       int code = XapianExceptionHandler(msg);
38263       SWIG_exception(code, msg.c_str());
38264     }
38265   }
38266   return self;
38267 fail:
38268   return Qnil;
38269 }
38270 
38271 
_wrap_new_LatLongDistancePostingSource(int nargs,VALUE * args,VALUE self)38272 SWIGINTERN VALUE _wrap_new_LatLongDistancePostingSource(int nargs, VALUE *args, VALUE self) {
38273   int argc;
38274   VALUE argv[6];
38275   int ii;
38276 
38277   argc = nargs;
38278   if (argc > 6) SWIG_fail;
38279   for (ii = 0; (ii < argc); ++ii) {
38280     argv[ii] = args[ii];
38281   }
38282   if (argc == 2) {
38283     int _v;
38284     {
38285       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
38286       _v = SWIG_CheckState(res);
38287     }
38288     if (_v) {
38289       void *vptr = 0;
38290       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__LatLongCoords, 0);
38291       _v = SWIG_CheckState(res);
38292       if (_v) {
38293         return _wrap_new_LatLongDistancePostingSource__SWIG_7(nargs, args, self);
38294       }
38295     }
38296   }
38297   if (argc == 3) {
38298     int _v;
38299     {
38300       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
38301       _v = SWIG_CheckState(res);
38302     }
38303     if (_v) {
38304       void *vptr = 0;
38305       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__LatLongCoords, 0);
38306       _v = SWIG_CheckState(res);
38307       if (_v) {
38308         void *vptr = 0;
38309         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__LatLongMetric, 0);
38310         _v = SWIG_CheckState(res);
38311         if (_v) {
38312           return _wrap_new_LatLongDistancePostingSource__SWIG_3(nargs, args, self);
38313         }
38314       }
38315     }
38316   }
38317   if (argc == 3) {
38318     int _v;
38319     {
38320       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
38321       _v = SWIG_CheckState(res);
38322     }
38323     if (_v) {
38324       void *vptr = 0;
38325       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__LatLongCoords, 0);
38326       _v = SWIG_CheckState(res);
38327       if (_v) {
38328         {
38329           int res = SWIG_AsVal_double(argv[2], NULL);
38330           _v = SWIG_CheckState(res);
38331         }
38332         if (_v) {
38333           return _wrap_new_LatLongDistancePostingSource__SWIG_6(nargs, args, self);
38334         }
38335       }
38336     }
38337   }
38338   if (argc == 4) {
38339     int _v;
38340     {
38341       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
38342       _v = SWIG_CheckState(res);
38343     }
38344     if (_v) {
38345       void *vptr = 0;
38346       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__LatLongCoords, 0);
38347       _v = SWIG_CheckState(res);
38348       if (_v) {
38349         void *vptr = 0;
38350         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__LatLongMetric, 0);
38351         _v = SWIG_CheckState(res);
38352         if (_v) {
38353           {
38354             int res = SWIG_AsVal_double(argv[3], NULL);
38355             _v = SWIG_CheckState(res);
38356           }
38357           if (_v) {
38358             return _wrap_new_LatLongDistancePostingSource__SWIG_2(nargs, args, self);
38359           }
38360         }
38361       }
38362     }
38363   }
38364   if (argc == 4) {
38365     int _v;
38366     {
38367       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
38368       _v = SWIG_CheckState(res);
38369     }
38370     if (_v) {
38371       void *vptr = 0;
38372       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__LatLongCoords, 0);
38373       _v = SWIG_CheckState(res);
38374       if (_v) {
38375         {
38376           int res = SWIG_AsVal_double(argv[2], NULL);
38377           _v = SWIG_CheckState(res);
38378         }
38379         if (_v) {
38380           {
38381             int res = SWIG_AsVal_double(argv[3], NULL);
38382             _v = SWIG_CheckState(res);
38383           }
38384           if (_v) {
38385             return _wrap_new_LatLongDistancePostingSource__SWIG_5(nargs, args, self);
38386           }
38387         }
38388       }
38389     }
38390   }
38391   if (argc == 5) {
38392     int _v;
38393     {
38394       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
38395       _v = SWIG_CheckState(res);
38396     }
38397     if (_v) {
38398       void *vptr = 0;
38399       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__LatLongCoords, 0);
38400       _v = SWIG_CheckState(res);
38401       if (_v) {
38402         void *vptr = 0;
38403         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__LatLongMetric, 0);
38404         _v = SWIG_CheckState(res);
38405         if (_v) {
38406           {
38407             int res = SWIG_AsVal_double(argv[3], NULL);
38408             _v = SWIG_CheckState(res);
38409           }
38410           if (_v) {
38411             {
38412               int res = SWIG_AsVal_double(argv[4], NULL);
38413               _v = SWIG_CheckState(res);
38414             }
38415             if (_v) {
38416               return _wrap_new_LatLongDistancePostingSource__SWIG_1(nargs, args, self);
38417             }
38418           }
38419         }
38420       }
38421     }
38422   }
38423   if (argc == 5) {
38424     int _v;
38425     {
38426       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
38427       _v = SWIG_CheckState(res);
38428     }
38429     if (_v) {
38430       void *vptr = 0;
38431       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__LatLongCoords, 0);
38432       _v = SWIG_CheckState(res);
38433       if (_v) {
38434         {
38435           int res = SWIG_AsVal_double(argv[2], NULL);
38436           _v = SWIG_CheckState(res);
38437         }
38438         if (_v) {
38439           {
38440             int res = SWIG_AsVal_double(argv[3], NULL);
38441             _v = SWIG_CheckState(res);
38442           }
38443           if (_v) {
38444             {
38445               int res = SWIG_AsVal_double(argv[4], NULL);
38446               _v = SWIG_CheckState(res);
38447             }
38448             if (_v) {
38449               return _wrap_new_LatLongDistancePostingSource__SWIG_4(nargs, args, self);
38450             }
38451           }
38452         }
38453       }
38454     }
38455   }
38456   if (argc == 6) {
38457     int _v;
38458     {
38459       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
38460       _v = SWIG_CheckState(res);
38461     }
38462     if (_v) {
38463       void *vptr = 0;
38464       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__LatLongCoords, 0);
38465       _v = SWIG_CheckState(res);
38466       if (_v) {
38467         void *vptr = 0;
38468         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__LatLongMetric, 0);
38469         _v = SWIG_CheckState(res);
38470         if (_v) {
38471           {
38472             int res = SWIG_AsVal_double(argv[3], NULL);
38473             _v = SWIG_CheckState(res);
38474           }
38475           if (_v) {
38476             {
38477               int res = SWIG_AsVal_double(argv[4], NULL);
38478               _v = SWIG_CheckState(res);
38479             }
38480             if (_v) {
38481               {
38482                 int res = SWIG_AsVal_double(argv[5], NULL);
38483                 _v = SWIG_CheckState(res);
38484               }
38485               if (_v) {
38486                 return _wrap_new_LatLongDistancePostingSource__SWIG_0(nargs, args, self);
38487               }
38488             }
38489           }
38490         }
38491       }
38492     }
38493   }
38494 
38495 fail:
38496   Ruby_Format_OverloadedError( argc, 6, "LatLongDistancePostingSource.new",
38497     "    LatLongDistancePostingSource.new(Xapian::valueno slot_, Xapian::LatLongCoords const &centre_, Xapian::LatLongMetric const &metric_, double max_range_, double k1_, double k2_)\n"
38498     "    LatLongDistancePostingSource.new(Xapian::valueno slot_, Xapian::LatLongCoords const &centre_, Xapian::LatLongMetric const &metric_, double max_range_, double k1_)\n"
38499     "    LatLongDistancePostingSource.new(Xapian::valueno slot_, Xapian::LatLongCoords const &centre_, Xapian::LatLongMetric const &metric_, double max_range_)\n"
38500     "    LatLongDistancePostingSource.new(Xapian::valueno slot_, Xapian::LatLongCoords const &centre_, Xapian::LatLongMetric const &metric_)\n"
38501     "    LatLongDistancePostingSource.new(Xapian::valueno slot_, Xapian::LatLongCoords const &centre_, double max_range_, double k1_, double k2_)\n"
38502     "    LatLongDistancePostingSource.new(Xapian::valueno slot_, Xapian::LatLongCoords const &centre_, double max_range_, double k1_)\n"
38503     "    LatLongDistancePostingSource.new(Xapian::valueno slot_, Xapian::LatLongCoords const &centre_, double max_range_)\n"
38504     "    LatLongDistancePostingSource.new(Xapian::valueno slot_, Xapian::LatLongCoords const &centre_)\n");
38505 
38506   return Qnil;
38507 }
38508 
38509 
38510 SWIGINTERN void
free_Xapian_LatLongDistancePostingSource(void * self)38511 free_Xapian_LatLongDistancePostingSource(void *self) {
38512     Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *)self;
38513     delete arg1;
38514 }
38515 
38516 SWIGINTERN VALUE
_wrap_LatLongDistancePostingSource_next(int argc,VALUE * argv,VALUE self)38517 _wrap_LatLongDistancePostingSource_next(int argc, VALUE *argv, VALUE self) {
38518   Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
38519   double arg2 ;
38520   void *argp1 = 0 ;
38521   int res1 = 0 ;
38522   double val2 ;
38523   int ecode2 = 0 ;
38524 
38525   if ((argc < 1) || (argc > 1)) {
38526     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
38527   }
38528   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0 |  0 );
38529   if (!SWIG_IsOK(res1)) {
38530     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongDistancePostingSource *","next", 1, self ));
38531   }
38532   arg1 = reinterpret_cast< Xapian::LatLongDistancePostingSource * >(argp1);
38533   ecode2 = SWIG_AsVal_double(argv[0], &val2);
38534   if (!SWIG_IsOK(ecode2)) {
38535     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","next", 2, argv[0] ));
38536   }
38537   arg2 = static_cast< double >(val2);
38538   {
38539     try {
38540       (arg1)->next(arg2);
38541     } catch (...) {
38542       string msg;
38543       int code = XapianExceptionHandler(msg);
38544       SWIG_exception(code, msg.c_str());
38545     }
38546   }
38547   return Qnil;
38548 fail:
38549   return Qnil;
38550 }
38551 
38552 
38553 SWIGINTERN VALUE
_wrap_LatLongDistancePostingSource_skip_to(int argc,VALUE * argv,VALUE self)38554 _wrap_LatLongDistancePostingSource_skip_to(int argc, VALUE *argv, VALUE self) {
38555   Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
38556   Xapian::docid arg2 ;
38557   double arg3 ;
38558   void *argp1 = 0 ;
38559   int res1 = 0 ;
38560   unsigned int val2 ;
38561   int ecode2 = 0 ;
38562   double val3 ;
38563   int ecode3 = 0 ;
38564 
38565   if ((argc < 2) || (argc > 2)) {
38566     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
38567   }
38568   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0 |  0 );
38569   if (!SWIG_IsOK(res1)) {
38570     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongDistancePostingSource *","skip_to", 1, self ));
38571   }
38572   arg1 = reinterpret_cast< Xapian::LatLongDistancePostingSource * >(argp1);
38573   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
38574   if (!SWIG_IsOK(ecode2)) {
38575     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","skip_to", 2, argv[0] ));
38576   }
38577   arg2 = static_cast< Xapian::docid >(val2);
38578   ecode3 = SWIG_AsVal_double(argv[1], &val3);
38579   if (!SWIG_IsOK(ecode3)) {
38580     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","skip_to", 3, argv[1] ));
38581   }
38582   arg3 = static_cast< double >(val3);
38583   {
38584     try {
38585       (arg1)->skip_to(arg2,arg3);
38586     } catch (...) {
38587       string msg;
38588       int code = XapianExceptionHandler(msg);
38589       SWIG_exception(code, msg.c_str());
38590     }
38591   }
38592   return Qnil;
38593 fail:
38594   return Qnil;
38595 }
38596 
38597 
38598 SWIGINTERN VALUE
_wrap_LatLongDistancePostingSource_check(int argc,VALUE * argv,VALUE self)38599 _wrap_LatLongDistancePostingSource_check(int argc, VALUE *argv, VALUE self) {
38600   Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
38601   Xapian::docid arg2 ;
38602   double arg3 ;
38603   void *argp1 = 0 ;
38604   int res1 = 0 ;
38605   unsigned int val2 ;
38606   int ecode2 = 0 ;
38607   double val3 ;
38608   int ecode3 = 0 ;
38609   bool result;
38610   VALUE vresult = Qnil;
38611 
38612   if ((argc < 2) || (argc > 2)) {
38613     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
38614   }
38615   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0 |  0 );
38616   if (!SWIG_IsOK(res1)) {
38617     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongDistancePostingSource *","check", 1, self ));
38618   }
38619   arg1 = reinterpret_cast< Xapian::LatLongDistancePostingSource * >(argp1);
38620   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
38621   if (!SWIG_IsOK(ecode2)) {
38622     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","check", 2, argv[0] ));
38623   }
38624   arg2 = static_cast< Xapian::docid >(val2);
38625   ecode3 = SWIG_AsVal_double(argv[1], &val3);
38626   if (!SWIG_IsOK(ecode3)) {
38627     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","check", 3, argv[1] ));
38628   }
38629   arg3 = static_cast< double >(val3);
38630   {
38631     try {
38632       result = (bool)(arg1)->check(arg2,arg3);
38633     } catch (...) {
38634       string msg;
38635       int code = XapianExceptionHandler(msg);
38636       SWIG_exception(code, msg.c_str());
38637     }
38638   }
38639   vresult = SWIG_From_bool(static_cast< bool >(result));
38640   return vresult;
38641 fail:
38642   return Qnil;
38643 }
38644 
38645 
38646 SWIGINTERN VALUE
_wrap_LatLongDistancePostingSource_weight(int argc,VALUE * argv,VALUE self)38647 _wrap_LatLongDistancePostingSource_weight(int argc, VALUE *argv, VALUE self) {
38648   Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
38649   void *argp1 = 0 ;
38650   int res1 = 0 ;
38651   double result;
38652   VALUE vresult = Qnil;
38653 
38654   if ((argc < 0) || (argc > 0)) {
38655     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
38656   }
38657   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0 |  0 );
38658   if (!SWIG_IsOK(res1)) {
38659     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongDistancePostingSource const *","get_weight", 1, self ));
38660   }
38661   arg1 = reinterpret_cast< Xapian::LatLongDistancePostingSource * >(argp1);
38662   {
38663     try {
38664       result = (double)((Xapian::LatLongDistancePostingSource const *)arg1)->get_weight();
38665     } catch (...) {
38666       string msg;
38667       int code = XapianExceptionHandler(msg);
38668       SWIG_exception(code, msg.c_str());
38669     }
38670   }
38671   vresult = SWIG_From_double(static_cast< double >(result));
38672   return vresult;
38673 fail:
38674   return Qnil;
38675 }
38676 
38677 
38678 SWIGINTERN VALUE
_wrap_LatLongDistancePostingSource_name(int argc,VALUE * argv,VALUE self)38679 _wrap_LatLongDistancePostingSource_name(int argc, VALUE *argv, VALUE self) {
38680   Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
38681   void *argp1 = 0 ;
38682   int res1 = 0 ;
38683   std::string result;
38684   VALUE vresult = Qnil;
38685 
38686   if ((argc < 0) || (argc > 0)) {
38687     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
38688   }
38689   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0 |  0 );
38690   if (!SWIG_IsOK(res1)) {
38691     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongDistancePostingSource const *","name", 1, self ));
38692   }
38693   arg1 = reinterpret_cast< Xapian::LatLongDistancePostingSource * >(argp1);
38694   {
38695     try {
38696       result = ((Xapian::LatLongDistancePostingSource const *)arg1)->name();
38697     } catch (...) {
38698       string msg;
38699       int code = XapianExceptionHandler(msg);
38700       SWIG_exception(code, msg.c_str());
38701     }
38702   }
38703   vresult = SWIG_From_std_string(static_cast< std::string >(result));
38704   return vresult;
38705 fail:
38706   return Qnil;
38707 }
38708 
38709 
38710 SWIGINTERN VALUE
_wrap_LatLongDistancePostingSource_init(int argc,VALUE * argv,VALUE self)38711 _wrap_LatLongDistancePostingSource_init(int argc, VALUE *argv, VALUE self) {
38712   Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
38713   Xapian::Database *arg2 = 0 ;
38714   void *argp1 = 0 ;
38715   int res1 = 0 ;
38716   void *argp2 ;
38717   int res2 = 0 ;
38718 
38719   if ((argc < 1) || (argc > 1)) {
38720     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
38721   }
38722   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0 |  0 );
38723   if (!SWIG_IsOK(res1)) {
38724     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongDistancePostingSource *","init", 1, self ));
38725   }
38726   arg1 = reinterpret_cast< Xapian::LatLongDistancePostingSource * >(argp1);
38727   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Database,  0 );
38728   if (!SWIG_IsOK(res2)) {
38729     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Database const &","init", 2, argv[0] ));
38730   }
38731   if (!argp2) {
38732     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Database const &","init", 2, argv[0]));
38733   }
38734   arg2 = reinterpret_cast< Xapian::Database * >(argp2);
38735   {
38736     try {
38737       (arg1)->init((Xapian::Database const &)*arg2);
38738     } catch (...) {
38739       string msg;
38740       int code = XapianExceptionHandler(msg);
38741       SWIG_exception(code, msg.c_str());
38742     }
38743   }
38744   return Qnil;
38745 fail:
38746   return Qnil;
38747 }
38748 
38749 
38750 SWIGINTERN VALUE
_wrap_LatLongDistancePostingSource_description(int argc,VALUE * argv,VALUE self)38751 _wrap_LatLongDistancePostingSource_description(int argc, VALUE *argv, VALUE self) {
38752   Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
38753   void *argp1 = 0 ;
38754   int res1 = 0 ;
38755   std::string result;
38756   VALUE vresult = Qnil;
38757 
38758   if ((argc < 0) || (argc > 0)) {
38759     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
38760   }
38761   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0 |  0 );
38762   if (!SWIG_IsOK(res1)) {
38763     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongDistancePostingSource const *","get_description", 1, self ));
38764   }
38765   arg1 = reinterpret_cast< Xapian::LatLongDistancePostingSource * >(argp1);
38766   {
38767     try {
38768       result = ((Xapian::LatLongDistancePostingSource const *)arg1)->get_description();
38769     } catch (...) {
38770       string msg;
38771       int code = XapianExceptionHandler(msg);
38772       SWIG_exception(code, msg.c_str());
38773     }
38774   }
38775   vresult = SWIG_From_std_string(static_cast< std::string >(result));
38776   return vresult;
38777 fail:
38778   return Qnil;
38779 }
38780 
38781 
38782 static swig_class SwigClassLatLongDistanceKeyMaker;
38783 
38784 SWIGINTERN VALUE
_wrap_new_LatLongDistanceKeyMaker__SWIG_0(int argc,VALUE * argv,VALUE self)38785 _wrap_new_LatLongDistanceKeyMaker__SWIG_0(int argc, VALUE *argv, VALUE self) {
38786   Xapian::valueno arg1 ;
38787   Xapian::LatLongCoords *arg2 = 0 ;
38788   Xapian::LatLongMetric *arg3 = 0 ;
38789   double arg4 ;
38790   unsigned int val1 ;
38791   int ecode1 = 0 ;
38792   void *argp2 ;
38793   int res2 = 0 ;
38794   void *argp3 ;
38795   int res3 = 0 ;
38796   double val4 ;
38797   int ecode4 = 0 ;
38798   const char *classname SWIGUNUSED = "Xapian::LatLongDistanceKeyMaker";
38799   Xapian::LatLongDistanceKeyMaker *result = 0 ;
38800 
38801   if ((argc < 4) || (argc > 4)) {
38802     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
38803   }
38804   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
38805   if (!SWIG_IsOK(ecode1)) {
38806     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","LatLongDistanceKeyMaker", 1, argv[0] ));
38807   }
38808   arg1 = static_cast< Xapian::valueno >(val1);
38809   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
38810   if (!SWIG_IsOK(res2)) {
38811     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const &","LatLongDistanceKeyMaker", 2, argv[1] ));
38812   }
38813   if (!argp2) {
38814     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoords const &","LatLongDistanceKeyMaker", 2, argv[1]));
38815   }
38816   arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
38817   res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_Xapian__LatLongMetric,  0 );
38818   if (!SWIG_IsOK(res3)) {
38819     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::LatLongMetric const &","LatLongDistanceKeyMaker", 3, argv[2] ));
38820   }
38821   if (!argp3) {
38822     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongMetric const &","LatLongDistanceKeyMaker", 3, argv[2]));
38823   }
38824   arg3 = reinterpret_cast< Xapian::LatLongMetric * >(argp3);
38825   ecode4 = SWIG_AsVal_double(argv[3], &val4);
38826   if (!SWIG_IsOK(ecode4)) {
38827     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","LatLongDistanceKeyMaker", 4, argv[3] ));
38828   }
38829   arg4 = static_cast< double >(val4);
38830   {
38831     try {
38832       result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongMetric const &)*arg3,arg4);
38833       DATA_PTR(self) = result;
38834     } catch (...) {
38835       string msg;
38836       int code = XapianExceptionHandler(msg);
38837       SWIG_exception(code, msg.c_str());
38838     }
38839   }
38840   return self;
38841 fail:
38842   return Qnil;
38843 }
38844 
38845 
38846 SWIGINTERN VALUE
_wrap_new_LatLongDistanceKeyMaker__SWIG_1(int argc,VALUE * argv,VALUE self)38847 _wrap_new_LatLongDistanceKeyMaker__SWIG_1(int argc, VALUE *argv, VALUE self) {
38848   Xapian::valueno arg1 ;
38849   Xapian::LatLongCoords *arg2 = 0 ;
38850   Xapian::LatLongMetric *arg3 = 0 ;
38851   unsigned int val1 ;
38852   int ecode1 = 0 ;
38853   void *argp2 ;
38854   int res2 = 0 ;
38855   void *argp3 ;
38856   int res3 = 0 ;
38857   const char *classname SWIGUNUSED = "Xapian::LatLongDistanceKeyMaker";
38858   Xapian::LatLongDistanceKeyMaker *result = 0 ;
38859 
38860   if ((argc < 3) || (argc > 3)) {
38861     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
38862   }
38863   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
38864   if (!SWIG_IsOK(ecode1)) {
38865     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","LatLongDistanceKeyMaker", 1, argv[0] ));
38866   }
38867   arg1 = static_cast< Xapian::valueno >(val1);
38868   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
38869   if (!SWIG_IsOK(res2)) {
38870     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const &","LatLongDistanceKeyMaker", 2, argv[1] ));
38871   }
38872   if (!argp2) {
38873     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoords const &","LatLongDistanceKeyMaker", 2, argv[1]));
38874   }
38875   arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
38876   res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_Xapian__LatLongMetric,  0 );
38877   if (!SWIG_IsOK(res3)) {
38878     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::LatLongMetric const &","LatLongDistanceKeyMaker", 3, argv[2] ));
38879   }
38880   if (!argp3) {
38881     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongMetric const &","LatLongDistanceKeyMaker", 3, argv[2]));
38882   }
38883   arg3 = reinterpret_cast< Xapian::LatLongMetric * >(argp3);
38884   {
38885     try {
38886       result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongMetric const &)*arg3);
38887       DATA_PTR(self) = result;
38888     } catch (...) {
38889       string msg;
38890       int code = XapianExceptionHandler(msg);
38891       SWIG_exception(code, msg.c_str());
38892     }
38893   }
38894   return self;
38895 fail:
38896   return Qnil;
38897 }
38898 
38899 
38900 SWIGINTERN VALUE
_wrap_new_LatLongDistanceKeyMaker__SWIG_2(int argc,VALUE * argv,VALUE self)38901 _wrap_new_LatLongDistanceKeyMaker__SWIG_2(int argc, VALUE *argv, VALUE self) {
38902   Xapian::valueno arg1 ;
38903   Xapian::LatLongCoords *arg2 = 0 ;
38904   unsigned int val1 ;
38905   int ecode1 = 0 ;
38906   void *argp2 ;
38907   int res2 = 0 ;
38908   const char *classname SWIGUNUSED = "Xapian::LatLongDistanceKeyMaker";
38909   Xapian::LatLongDistanceKeyMaker *result = 0 ;
38910 
38911   if ((argc < 2) || (argc > 2)) {
38912     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
38913   }
38914   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
38915   if (!SWIG_IsOK(ecode1)) {
38916     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","LatLongDistanceKeyMaker", 1, argv[0] ));
38917   }
38918   arg1 = static_cast< Xapian::valueno >(val1);
38919   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
38920   if (!SWIG_IsOK(res2)) {
38921     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoords const &","LatLongDistanceKeyMaker", 2, argv[1] ));
38922   }
38923   if (!argp2) {
38924     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoords const &","LatLongDistanceKeyMaker", 2, argv[1]));
38925   }
38926   arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
38927   {
38928     try {
38929       result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoords const &)*arg2);
38930       DATA_PTR(self) = result;
38931     } catch (...) {
38932       string msg;
38933       int code = XapianExceptionHandler(msg);
38934       SWIG_exception(code, msg.c_str());
38935     }
38936   }
38937   return self;
38938 fail:
38939   return Qnil;
38940 }
38941 
38942 
38943 SWIGINTERN VALUE
_wrap_new_LatLongDistanceKeyMaker__SWIG_3(int argc,VALUE * argv,VALUE self)38944 _wrap_new_LatLongDistanceKeyMaker__SWIG_3(int argc, VALUE *argv, VALUE self) {
38945   Xapian::valueno arg1 ;
38946   Xapian::LatLongCoord *arg2 = 0 ;
38947   Xapian::LatLongMetric *arg3 = 0 ;
38948   double arg4 ;
38949   unsigned int val1 ;
38950   int ecode1 = 0 ;
38951   void *argp2 ;
38952   int res2 = 0 ;
38953   void *argp3 ;
38954   int res3 = 0 ;
38955   double val4 ;
38956   int ecode4 = 0 ;
38957   const char *classname SWIGUNUSED = "Xapian::LatLongDistanceKeyMaker";
38958   Xapian::LatLongDistanceKeyMaker *result = 0 ;
38959 
38960   if ((argc < 4) || (argc > 4)) {
38961     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
38962   }
38963   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
38964   if (!SWIG_IsOK(ecode1)) {
38965     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","LatLongDistanceKeyMaker", 1, argv[0] ));
38966   }
38967   arg1 = static_cast< Xapian::valueno >(val1);
38968   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__LatLongCoord,  0 );
38969   if (!SWIG_IsOK(res2)) {
38970     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoord const &","LatLongDistanceKeyMaker", 2, argv[1] ));
38971   }
38972   if (!argp2) {
38973     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoord const &","LatLongDistanceKeyMaker", 2, argv[1]));
38974   }
38975   arg2 = reinterpret_cast< Xapian::LatLongCoord * >(argp2);
38976   res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_Xapian__LatLongMetric,  0 );
38977   if (!SWIG_IsOK(res3)) {
38978     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::LatLongMetric const &","LatLongDistanceKeyMaker", 3, argv[2] ));
38979   }
38980   if (!argp3) {
38981     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongMetric const &","LatLongDistanceKeyMaker", 3, argv[2]));
38982   }
38983   arg3 = reinterpret_cast< Xapian::LatLongMetric * >(argp3);
38984   ecode4 = SWIG_AsVal_double(argv[3], &val4);
38985   if (!SWIG_IsOK(ecode4)) {
38986     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","LatLongDistanceKeyMaker", 4, argv[3] ));
38987   }
38988   arg4 = static_cast< double >(val4);
38989   {
38990     try {
38991       result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoord const &)*arg2,(Xapian::LatLongMetric const &)*arg3,arg4);
38992       DATA_PTR(self) = result;
38993     } catch (...) {
38994       string msg;
38995       int code = XapianExceptionHandler(msg);
38996       SWIG_exception(code, msg.c_str());
38997     }
38998   }
38999   return self;
39000 fail:
39001   return Qnil;
39002 }
39003 
39004 
39005 SWIGINTERN VALUE
_wrap_new_LatLongDistanceKeyMaker__SWIG_4(int argc,VALUE * argv,VALUE self)39006 _wrap_new_LatLongDistanceKeyMaker__SWIG_4(int argc, VALUE *argv, VALUE self) {
39007   Xapian::valueno arg1 ;
39008   Xapian::LatLongCoord *arg2 = 0 ;
39009   Xapian::LatLongMetric *arg3 = 0 ;
39010   unsigned int val1 ;
39011   int ecode1 = 0 ;
39012   void *argp2 ;
39013   int res2 = 0 ;
39014   void *argp3 ;
39015   int res3 = 0 ;
39016   const char *classname SWIGUNUSED = "Xapian::LatLongDistanceKeyMaker";
39017   Xapian::LatLongDistanceKeyMaker *result = 0 ;
39018 
39019   if ((argc < 3) || (argc > 3)) {
39020     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
39021   }
39022   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
39023   if (!SWIG_IsOK(ecode1)) {
39024     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","LatLongDistanceKeyMaker", 1, argv[0] ));
39025   }
39026   arg1 = static_cast< Xapian::valueno >(val1);
39027   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__LatLongCoord,  0 );
39028   if (!SWIG_IsOK(res2)) {
39029     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoord const &","LatLongDistanceKeyMaker", 2, argv[1] ));
39030   }
39031   if (!argp2) {
39032     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoord const &","LatLongDistanceKeyMaker", 2, argv[1]));
39033   }
39034   arg2 = reinterpret_cast< Xapian::LatLongCoord * >(argp2);
39035   res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_Xapian__LatLongMetric,  0 );
39036   if (!SWIG_IsOK(res3)) {
39037     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::LatLongMetric const &","LatLongDistanceKeyMaker", 3, argv[2] ));
39038   }
39039   if (!argp3) {
39040     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongMetric const &","LatLongDistanceKeyMaker", 3, argv[2]));
39041   }
39042   arg3 = reinterpret_cast< Xapian::LatLongMetric * >(argp3);
39043   {
39044     try {
39045       result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoord const &)*arg2,(Xapian::LatLongMetric const &)*arg3);
39046       DATA_PTR(self) = result;
39047     } catch (...) {
39048       string msg;
39049       int code = XapianExceptionHandler(msg);
39050       SWIG_exception(code, msg.c_str());
39051     }
39052   }
39053   return self;
39054 fail:
39055   return Qnil;
39056 }
39057 
39058 
39059 SWIGINTERN VALUE
39060 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_LatLongDistanceKeyMaker_allocate(VALUE self)39061 _wrap_LatLongDistanceKeyMaker_allocate(VALUE self)
39062 #else
39063 _wrap_LatLongDistanceKeyMaker_allocate(int argc, VALUE *argv, VALUE self)
39064 #endif
39065 {
39066   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker);
39067 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
39068   rb_obj_call_init(vresult, argc, argv);
39069 #endif
39070   return vresult;
39071 }
39072 
39073 
39074 SWIGINTERN VALUE
_wrap_new_LatLongDistanceKeyMaker__SWIG_5(int argc,VALUE * argv,VALUE self)39075 _wrap_new_LatLongDistanceKeyMaker__SWIG_5(int argc, VALUE *argv, VALUE self) {
39076   Xapian::valueno arg1 ;
39077   Xapian::LatLongCoord *arg2 = 0 ;
39078   unsigned int val1 ;
39079   int ecode1 = 0 ;
39080   void *argp2 ;
39081   int res2 = 0 ;
39082   const char *classname SWIGUNUSED = "Xapian::LatLongDistanceKeyMaker";
39083   Xapian::LatLongDistanceKeyMaker *result = 0 ;
39084 
39085   if ((argc < 2) || (argc > 2)) {
39086     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
39087   }
39088   ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
39089   if (!SWIG_IsOK(ecode1)) {
39090     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Xapian::valueno","LatLongDistanceKeyMaker", 1, argv[0] ));
39091   }
39092   arg1 = static_cast< Xapian::valueno >(val1);
39093   res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_Xapian__LatLongCoord,  0 );
39094   if (!SWIG_IsOK(res2)) {
39095     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::LatLongCoord const &","LatLongDistanceKeyMaker", 2, argv[1] ));
39096   }
39097   if (!argp2) {
39098     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::LatLongCoord const &","LatLongDistanceKeyMaker", 2, argv[1]));
39099   }
39100   arg2 = reinterpret_cast< Xapian::LatLongCoord * >(argp2);
39101   {
39102     try {
39103       result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoord const &)*arg2);
39104       DATA_PTR(self) = result;
39105     } catch (...) {
39106       string msg;
39107       int code = XapianExceptionHandler(msg);
39108       SWIG_exception(code, msg.c_str());
39109     }
39110   }
39111   return self;
39112 fail:
39113   return Qnil;
39114 }
39115 
39116 
_wrap_new_LatLongDistanceKeyMaker(int nargs,VALUE * args,VALUE self)39117 SWIGINTERN VALUE _wrap_new_LatLongDistanceKeyMaker(int nargs, VALUE *args, VALUE self) {
39118   int argc;
39119   VALUE argv[4];
39120   int ii;
39121 
39122   argc = nargs;
39123   if (argc > 4) SWIG_fail;
39124   for (ii = 0; (ii < argc); ++ii) {
39125     argv[ii] = args[ii];
39126   }
39127   if (argc == 2) {
39128     int _v;
39129     {
39130       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
39131       _v = SWIG_CheckState(res);
39132     }
39133     if (_v) {
39134       void *vptr = 0;
39135       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__LatLongCoords, 0);
39136       _v = SWIG_CheckState(res);
39137       if (_v) {
39138         return _wrap_new_LatLongDistanceKeyMaker__SWIG_2(nargs, args, self);
39139       }
39140     }
39141   }
39142   if (argc == 2) {
39143     int _v;
39144     {
39145       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
39146       _v = SWIG_CheckState(res);
39147     }
39148     if (_v) {
39149       void *vptr = 0;
39150       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__LatLongCoord, 0);
39151       _v = SWIG_CheckState(res);
39152       if (_v) {
39153         return _wrap_new_LatLongDistanceKeyMaker__SWIG_5(nargs, args, self);
39154       }
39155     }
39156   }
39157   if (argc == 3) {
39158     int _v;
39159     {
39160       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
39161       _v = SWIG_CheckState(res);
39162     }
39163     if (_v) {
39164       void *vptr = 0;
39165       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__LatLongCoord, 0);
39166       _v = SWIG_CheckState(res);
39167       if (_v) {
39168         void *vptr = 0;
39169         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__LatLongMetric, 0);
39170         _v = SWIG_CheckState(res);
39171         if (_v) {
39172           return _wrap_new_LatLongDistanceKeyMaker__SWIG_4(nargs, args, self);
39173         }
39174       }
39175     }
39176   }
39177   if (argc == 3) {
39178     int _v;
39179     {
39180       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
39181       _v = SWIG_CheckState(res);
39182     }
39183     if (_v) {
39184       void *vptr = 0;
39185       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__LatLongCoords, 0);
39186       _v = SWIG_CheckState(res);
39187       if (_v) {
39188         void *vptr = 0;
39189         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__LatLongMetric, 0);
39190         _v = SWIG_CheckState(res);
39191         if (_v) {
39192           return _wrap_new_LatLongDistanceKeyMaker__SWIG_1(nargs, args, self);
39193         }
39194       }
39195     }
39196   }
39197   if (argc == 4) {
39198     int _v;
39199     {
39200       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
39201       _v = SWIG_CheckState(res);
39202     }
39203     if (_v) {
39204       void *vptr = 0;
39205       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__LatLongCoords, 0);
39206       _v = SWIG_CheckState(res);
39207       if (_v) {
39208         void *vptr = 0;
39209         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__LatLongMetric, 0);
39210         _v = SWIG_CheckState(res);
39211         if (_v) {
39212           {
39213             int res = SWIG_AsVal_double(argv[3], NULL);
39214             _v = SWIG_CheckState(res);
39215           }
39216           if (_v) {
39217             return _wrap_new_LatLongDistanceKeyMaker__SWIG_0(nargs, args, self);
39218           }
39219         }
39220       }
39221     }
39222   }
39223   if (argc == 4) {
39224     int _v;
39225     {
39226       int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
39227       _v = SWIG_CheckState(res);
39228     }
39229     if (_v) {
39230       void *vptr = 0;
39231       int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__LatLongCoord, 0);
39232       _v = SWIG_CheckState(res);
39233       if (_v) {
39234         void *vptr = 0;
39235         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__LatLongMetric, 0);
39236         _v = SWIG_CheckState(res);
39237         if (_v) {
39238           {
39239             int res = SWIG_AsVal_double(argv[3], NULL);
39240             _v = SWIG_CheckState(res);
39241           }
39242           if (_v) {
39243             return _wrap_new_LatLongDistanceKeyMaker__SWIG_3(nargs, args, self);
39244           }
39245         }
39246       }
39247     }
39248   }
39249 
39250 fail:
39251   Ruby_Format_OverloadedError( argc, 4, "LatLongDistanceKeyMaker.new",
39252     "    LatLongDistanceKeyMaker.new(Xapian::valueno slot_, Xapian::LatLongCoords const &centre_, Xapian::LatLongMetric const &metric_, double defdistance)\n"
39253     "    LatLongDistanceKeyMaker.new(Xapian::valueno slot_, Xapian::LatLongCoords const &centre_, Xapian::LatLongMetric const &metric_)\n"
39254     "    LatLongDistanceKeyMaker.new(Xapian::valueno slot_, Xapian::LatLongCoords const &centre_)\n"
39255     "    LatLongDistanceKeyMaker.new(Xapian::valueno slot_, Xapian::LatLongCoord const &centre_, Xapian::LatLongMetric const &metric_, double defdistance)\n"
39256     "    LatLongDistanceKeyMaker.new(Xapian::valueno slot_, Xapian::LatLongCoord const &centre_, Xapian::LatLongMetric const &metric_)\n"
39257     "    LatLongDistanceKeyMaker.new(Xapian::valueno slot_, Xapian::LatLongCoord const &centre_)\n");
39258 
39259   return Qnil;
39260 }
39261 
39262 
39263 SWIGINTERN void
free_Xapian_LatLongDistanceKeyMaker(void * self)39264 free_Xapian_LatLongDistanceKeyMaker(void *self) {
39265     Xapian::LatLongDistanceKeyMaker *arg1 = (Xapian::LatLongDistanceKeyMaker *)self;
39266     delete arg1;
39267 }
39268 
39269 SWIGINTERN VALUE
_wrap_LatLongDistanceKeyMaker___call__(int argc,VALUE * argv,VALUE self)39270 _wrap_LatLongDistanceKeyMaker___call__(int argc, VALUE *argv, VALUE self) {
39271   Xapian::LatLongDistanceKeyMaker *arg1 = (Xapian::LatLongDistanceKeyMaker *) 0 ;
39272   Xapian::Document *arg2 = 0 ;
39273   void *argp1 = 0 ;
39274   int res1 = 0 ;
39275   void *argp2 ;
39276   int res2 = 0 ;
39277   std::string result;
39278   VALUE vresult = Qnil;
39279 
39280   if ((argc < 1) || (argc > 1)) {
39281     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
39282   }
39283   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, 0 |  0 );
39284   if (!SWIG_IsOK(res1)) {
39285     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::LatLongDistanceKeyMaker const *","operator ()", 1, self ));
39286   }
39287   arg1 = reinterpret_cast< Xapian::LatLongDistanceKeyMaker * >(argp1);
39288   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Document,  0 );
39289   if (!SWIG_IsOK(res2)) {
39290     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Document const &","operator ()", 2, argv[0] ));
39291   }
39292   if (!argp2) {
39293     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Document const &","operator ()", 2, argv[0]));
39294   }
39295   arg2 = reinterpret_cast< Xapian::Document * >(argp2);
39296   {
39297     try {
39298       result = ((Xapian::LatLongDistanceKeyMaker const *)arg1)->operator ()((Xapian::Document const &)*arg2);
39299     } catch (...) {
39300       string msg;
39301       int code = XapianExceptionHandler(msg);
39302       SWIG_exception(code, msg.c_str());
39303     }
39304   }
39305   vresult = SWIG_From_std_string(static_cast< std::string >(result));
39306   return vresult;
39307 fail:
39308   return Qnil;
39309 }
39310 
39311 
39312 static swig_class SwigClassDatabase;
39313 
39314 SWIGINTERN VALUE
_wrap_Database_add_database(int argc,VALUE * argv,VALUE self)39315 _wrap_Database_add_database(int argc, VALUE *argv, VALUE self) {
39316   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
39317   Xapian::Database *arg2 = 0 ;
39318   void *argp1 = 0 ;
39319   int res1 = 0 ;
39320   void *argp2 ;
39321   int res2 = 0 ;
39322 
39323   if ((argc < 1) || (argc > 1)) {
39324     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
39325   }
39326   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
39327   if (!SWIG_IsOK(res1)) {
39328     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database *","add_database", 1, self ));
39329   }
39330   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
39331   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Database,  0 );
39332   if (!SWIG_IsOK(res2)) {
39333     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Database const &","add_database", 2, argv[0] ));
39334   }
39335   if (!argp2) {
39336     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Database const &","add_database", 2, argv[0]));
39337   }
39338   arg2 = reinterpret_cast< Xapian::Database * >(argp2);
39339   {
39340     try {
39341       (arg1)->add_database((Xapian::Database const &)*arg2);
39342     } catch (...) {
39343       string msg;
39344       int code = XapianExceptionHandler(msg);
39345       SWIG_exception(code, msg.c_str());
39346     }
39347   }
39348   return Qnil;
39349 fail:
39350   return Qnil;
39351 }
39352 
39353 
39354 
39355 /*
39356   Document-method: Xapian::Database.size
39357 
39358   call-seq:
39359     size -> size_t
39360 
39361 Size or Length of the Database.
39362 */
39363 SWIGINTERN VALUE
_wrap_Database_size(int argc,VALUE * argv,VALUE self)39364 _wrap_Database_size(int argc, VALUE *argv, VALUE self) {
39365   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
39366   void *argp1 = 0 ;
39367   int res1 = 0 ;
39368   size_t result;
39369   VALUE vresult = Qnil;
39370 
39371   if ((argc < 0) || (argc > 0)) {
39372     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
39373   }
39374   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
39375   if (!SWIG_IsOK(res1)) {
39376     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","size", 1, self ));
39377   }
39378   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
39379   {
39380     try {
39381       result = ((Xapian::Database const *)arg1)->size();
39382     } catch (...) {
39383       string msg;
39384       int code = XapianExceptionHandler(msg);
39385       SWIG_exception(code, msg.c_str());
39386     }
39387   }
39388   vresult = SWIG_From_size_t(static_cast< size_t >(result));
39389   return vresult;
39390 fail:
39391   return Qnil;
39392 }
39393 
39394 
39395 SWIGINTERN VALUE
_wrap_new_Database__SWIG_0(int argc,VALUE * argv,VALUE self)39396 _wrap_new_Database__SWIG_0(int argc, VALUE *argv, VALUE self) {
39397   const char *classname SWIGUNUSED = "Xapian::Database";
39398   Xapian::Database *result = 0 ;
39399 
39400   if ((argc < 0) || (argc > 0)) {
39401     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
39402   }
39403   {
39404     try {
39405       result = (Xapian::Database *)new Xapian::Database();
39406       DATA_PTR(self) = result;
39407     } catch (...) {
39408       string msg;
39409       int code = XapianExceptionHandler(msg);
39410       SWIG_exception(code, msg.c_str());
39411     }
39412   }
39413   return self;
39414 fail:
39415   return Qnil;
39416 }
39417 
39418 
39419 SWIGINTERN VALUE
_wrap_new_Database__SWIG_1(int argc,VALUE * argv,VALUE self)39420 _wrap_new_Database__SWIG_1(int argc, VALUE *argv, VALUE self) {
39421   std::string *arg1 = 0 ;
39422   int arg2 ;
39423   int res1 = SWIG_OLDOBJ ;
39424   int val2 ;
39425   int ecode2 = 0 ;
39426   const char *classname SWIGUNUSED = "Xapian::Database";
39427   Xapian::Database *result = 0 ;
39428 
39429   if ((argc < 2) || (argc > 2)) {
39430     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
39431   }
39432   {
39433     std::string *ptr = (std::string *)0;
39434     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
39435     if (!SWIG_IsOK(res1)) {
39436       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Database", 1, argv[0] ));
39437     }
39438     if (!ptr) {
39439       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Database", 1, argv[0]));
39440     }
39441     arg1 = ptr;
39442   }
39443   ecode2 = SWIG_AsVal_int(argv[1], &val2);
39444   if (!SWIG_IsOK(ecode2)) {
39445     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Database", 2, argv[1] ));
39446   }
39447   arg2 = static_cast< int >(val2);
39448   {
39449     try {
39450       result = (Xapian::Database *)new Xapian::Database((std::string const &)*arg1,arg2);
39451       DATA_PTR(self) = result;
39452     } catch (...) {
39453       string msg;
39454       int code = XapianExceptionHandler(msg);
39455       SWIG_exception(code, msg.c_str());
39456     }
39457   }
39458   if (SWIG_IsNewObj(res1)) delete arg1;
39459   return self;
39460 fail:
39461   if (SWIG_IsNewObj(res1)) delete arg1;
39462   return Qnil;
39463 }
39464 
39465 
39466 SWIGINTERN VALUE
_wrap_new_Database__SWIG_2(int argc,VALUE * argv,VALUE self)39467 _wrap_new_Database__SWIG_2(int argc, VALUE *argv, VALUE self) {
39468   std::string *arg1 = 0 ;
39469   int res1 = SWIG_OLDOBJ ;
39470   const char *classname SWIGUNUSED = "Xapian::Database";
39471   Xapian::Database *result = 0 ;
39472 
39473   if ((argc < 1) || (argc > 1)) {
39474     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
39475   }
39476   {
39477     std::string *ptr = (std::string *)0;
39478     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
39479     if (!SWIG_IsOK(res1)) {
39480       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Database", 1, argv[0] ));
39481     }
39482     if (!ptr) {
39483       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Database", 1, argv[0]));
39484     }
39485     arg1 = ptr;
39486   }
39487   {
39488     try {
39489       result = (Xapian::Database *)new Xapian::Database((std::string const &)*arg1);
39490       DATA_PTR(self) = result;
39491     } catch (...) {
39492       string msg;
39493       int code = XapianExceptionHandler(msg);
39494       SWIG_exception(code, msg.c_str());
39495     }
39496   }
39497   if (SWIG_IsNewObj(res1)) delete arg1;
39498   return self;
39499 fail:
39500   if (SWIG_IsNewObj(res1)) delete arg1;
39501   return Qnil;
39502 }
39503 
39504 
39505 SWIGINTERN VALUE
_wrap_new_Database__SWIG_3(int argc,VALUE * argv,VALUE self)39506 _wrap_new_Database__SWIG_3(int argc, VALUE *argv, VALUE self) {
39507   int arg1 ;
39508   int arg2 ;
39509   int val1 ;
39510   int ecode1 = 0 ;
39511   int val2 ;
39512   int ecode2 = 0 ;
39513   const char *classname SWIGUNUSED = "Xapian::Database";
39514   Xapian::Database *result = 0 ;
39515 
39516   if ((argc < 2) || (argc > 2)) {
39517     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
39518   }
39519   ecode1 = SWIG_AsVal_int(argv[0], &val1);
39520   if (!SWIG_IsOK(ecode1)) {
39521     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Database", 1, argv[0] ));
39522   }
39523   arg1 = static_cast< int >(val1);
39524   ecode2 = SWIG_AsVal_int(argv[1], &val2);
39525   if (!SWIG_IsOK(ecode2)) {
39526     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Database", 2, argv[1] ));
39527   }
39528   arg2 = static_cast< int >(val2);
39529   {
39530     try {
39531       result = (Xapian::Database *)new Xapian::Database(arg1,arg2);
39532       DATA_PTR(self) = result;
39533     } catch (...) {
39534       string msg;
39535       int code = XapianExceptionHandler(msg);
39536       SWIG_exception(code, msg.c_str());
39537     }
39538   }
39539   return self;
39540 fail:
39541   return Qnil;
39542 }
39543 
39544 
39545 SWIGINTERN VALUE
39546 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_Database_allocate(VALUE self)39547 _wrap_Database_allocate(VALUE self)
39548 #else
39549 _wrap_Database_allocate(int argc, VALUE *argv, VALUE self)
39550 #endif
39551 {
39552   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__Database);
39553 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
39554   rb_obj_call_init(vresult, argc, argv);
39555 #endif
39556   return vresult;
39557 }
39558 
39559 
39560 SWIGINTERN VALUE
_wrap_new_Database__SWIG_4(int argc,VALUE * argv,VALUE self)39561 _wrap_new_Database__SWIG_4(int argc, VALUE *argv, VALUE self) {
39562   int arg1 ;
39563   int val1 ;
39564   int ecode1 = 0 ;
39565   const char *classname SWIGUNUSED = "Xapian::Database";
39566   Xapian::Database *result = 0 ;
39567 
39568   if ((argc < 1) || (argc > 1)) {
39569     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
39570   }
39571   ecode1 = SWIG_AsVal_int(argv[0], &val1);
39572   if (!SWIG_IsOK(ecode1)) {
39573     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Database", 1, argv[0] ));
39574   }
39575   arg1 = static_cast< int >(val1);
39576   {
39577     try {
39578       result = (Xapian::Database *)new Xapian::Database(arg1);
39579       DATA_PTR(self) = result;
39580     } catch (...) {
39581       string msg;
39582       int code = XapianExceptionHandler(msg);
39583       SWIG_exception(code, msg.c_str());
39584     }
39585   }
39586   return self;
39587 fail:
39588   return Qnil;
39589 }
39590 
39591 
_wrap_new_Database(int nargs,VALUE * args,VALUE self)39592 SWIGINTERN VALUE _wrap_new_Database(int nargs, VALUE *args, VALUE self) {
39593   int argc;
39594   VALUE argv[2];
39595   int ii;
39596 
39597   argc = nargs;
39598   if (argc > 2) SWIG_fail;
39599   for (ii = 0; (ii < argc); ++ii) {
39600     argv[ii] = args[ii];
39601   }
39602   if (argc == 0) {
39603     return _wrap_new_Database__SWIG_0(nargs, args, self);
39604   }
39605   if (argc == 1) {
39606     int _v;
39607     {
39608       int res = SWIG_AsVal_int(argv[0], NULL);
39609       _v = SWIG_CheckState(res);
39610     }
39611     if (_v) {
39612       return _wrap_new_Database__SWIG_4(nargs, args, self);
39613     }
39614   }
39615   if (argc == 1) {
39616     int _v;
39617     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
39618     _v = SWIG_CheckState(res);
39619     if (_v) {
39620       return _wrap_new_Database__SWIG_2(nargs, args, self);
39621     }
39622   }
39623   if (argc == 2) {
39624     int _v;
39625     {
39626       int res = SWIG_AsVal_int(argv[0], NULL);
39627       _v = SWIG_CheckState(res);
39628     }
39629     if (_v) {
39630       {
39631         int res = SWIG_AsVal_int(argv[1], NULL);
39632         _v = SWIG_CheckState(res);
39633       }
39634       if (_v) {
39635         return _wrap_new_Database__SWIG_3(nargs, args, self);
39636       }
39637     }
39638   }
39639   if (argc == 2) {
39640     int _v;
39641     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
39642     _v = SWIG_CheckState(res);
39643     if (_v) {
39644       {
39645         int res = SWIG_AsVal_int(argv[1], NULL);
39646         _v = SWIG_CheckState(res);
39647       }
39648       if (_v) {
39649         return _wrap_new_Database__SWIG_1(nargs, args, self);
39650       }
39651     }
39652   }
39653 
39654 fail:
39655   Ruby_Format_OverloadedError( argc, 2, "Database.new",
39656     "    Database.new()\n"
39657     "    Database.new(std::string const &path, int flags)\n"
39658     "    Database.new(std::string const &path)\n"
39659     "    Database.new(int fd, int flags)\n"
39660     "    Database.new(int fd)\n");
39661 
39662   return Qnil;
39663 }
39664 
39665 
39666 SWIGINTERN void
free_Xapian_Database(void * self)39667 free_Xapian_Database(void *self) {
39668     Xapian::Database *arg1 = (Xapian::Database *)self;
39669     delete arg1;
39670 }
39671 
39672 SWIGINTERN VALUE
_wrap_Database_reopen(int argc,VALUE * argv,VALUE self)39673 _wrap_Database_reopen(int argc, VALUE *argv, VALUE self) {
39674   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
39675   void *argp1 = 0 ;
39676   int res1 = 0 ;
39677   bool result;
39678   VALUE vresult = Qnil;
39679 
39680   if ((argc < 0) || (argc > 0)) {
39681     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
39682   }
39683   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
39684   if (!SWIG_IsOK(res1)) {
39685     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database *","reopen", 1, self ));
39686   }
39687   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
39688   {
39689     try {
39690       result = (bool)(arg1)->reopen();
39691     } catch (...) {
39692       string msg;
39693       int code = XapianExceptionHandler(msg);
39694       SWIG_exception(code, msg.c_str());
39695     }
39696   }
39697   vresult = SWIG_From_bool(static_cast< bool >(result));
39698   return vresult;
39699 fail:
39700   return Qnil;
39701 }
39702 
39703 
39704 SWIGINTERN VALUE
_wrap_Database_close(int argc,VALUE * argv,VALUE self)39705 _wrap_Database_close(int argc, VALUE *argv, VALUE self) {
39706   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
39707   void *argp1 = 0 ;
39708   int res1 = 0 ;
39709 
39710   if ((argc < 0) || (argc > 0)) {
39711     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
39712   }
39713   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
39714   if (!SWIG_IsOK(res1)) {
39715     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database *","close", 1, self ));
39716   }
39717   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
39718   {
39719     try {
39720       (arg1)->close();
39721     } catch (...) {
39722       string msg;
39723       int code = XapianExceptionHandler(msg);
39724       SWIG_exception(code, msg.c_str());
39725     }
39726   }
39727   return Qnil;
39728 fail:
39729   return Qnil;
39730 }
39731 
39732 
39733 SWIGINTERN VALUE
_wrap_Database_description(int argc,VALUE * argv,VALUE self)39734 _wrap_Database_description(int argc, VALUE *argv, VALUE self) {
39735   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
39736   void *argp1 = 0 ;
39737   int res1 = 0 ;
39738   std::string result;
39739   VALUE vresult = Qnil;
39740 
39741   if ((argc < 0) || (argc > 0)) {
39742     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
39743   }
39744   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
39745   if (!SWIG_IsOK(res1)) {
39746     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_description", 1, self ));
39747   }
39748   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
39749   {
39750     try {
39751       result = ((Xapian::Database const *)arg1)->get_description();
39752     } catch (...) {
39753       string msg;
39754       int code = XapianExceptionHandler(msg);
39755       SWIG_exception(code, msg.c_str());
39756     }
39757   }
39758   vresult = SWIG_From_std_string(static_cast< std::string >(result));
39759   return vresult;
39760 fail:
39761   return Qnil;
39762 }
39763 
39764 
39765 SWIGINTERN VALUE
_wrap_Database__dangerous_postlist_begin(int argc,VALUE * argv,VALUE self)39766 _wrap_Database__dangerous_postlist_begin(int argc, VALUE *argv, VALUE self) {
39767   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
39768   std::string *arg2 = 0 ;
39769   void *argp1 = 0 ;
39770   int res1 = 0 ;
39771   int res2 = SWIG_OLDOBJ ;
39772   Xapian::PostingIterator result;
39773   VALUE vresult = Qnil;
39774 
39775   if ((argc < 1) || (argc > 1)) {
39776     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
39777   }
39778   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
39779   if (!SWIG_IsOK(res1)) {
39780     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","postlist_begin", 1, self ));
39781   }
39782   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
39783   {
39784     std::string *ptr = (std::string *)0;
39785     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
39786     if (!SWIG_IsOK(res2)) {
39787       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","postlist_begin", 2, argv[0] ));
39788     }
39789     if (!ptr) {
39790       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","postlist_begin", 2, argv[0]));
39791     }
39792     arg2 = ptr;
39793   }
39794   {
39795     try {
39796       result = ((Xapian::Database const *)arg1)->postlist_begin((std::string const &)*arg2);
39797     } catch (...) {
39798       string msg;
39799       int code = XapianExceptionHandler(msg);
39800       SWIG_exception(code, msg.c_str());
39801     }
39802   }
39803   vresult = SWIG_NewPointerObj((new Xapian::PostingIterator(static_cast< const Xapian::PostingIterator& >(result))), SWIGTYPE_p_Xapian__PostingIterator, SWIG_POINTER_OWN |  0 );
39804   if (SWIG_IsNewObj(res2)) delete arg2;
39805   return vresult;
39806 fail:
39807   if (SWIG_IsNewObj(res2)) delete arg2;
39808   return Qnil;
39809 }
39810 
39811 
39812 SWIGINTERN VALUE
_wrap_Database__dangerous_postlist_end(int argc,VALUE * argv,VALUE self)39813 _wrap_Database__dangerous_postlist_end(int argc, VALUE *argv, VALUE self) {
39814   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
39815   std::string *arg2 = 0 ;
39816   void *argp1 = 0 ;
39817   int res1 = 0 ;
39818   int res2 = SWIG_OLDOBJ ;
39819   Xapian::PostingIterator result;
39820   VALUE vresult = Qnil;
39821 
39822   if ((argc < 1) || (argc > 1)) {
39823     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
39824   }
39825   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
39826   if (!SWIG_IsOK(res1)) {
39827     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","postlist_end", 1, self ));
39828   }
39829   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
39830   {
39831     std::string *ptr = (std::string *)0;
39832     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
39833     if (!SWIG_IsOK(res2)) {
39834       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","postlist_end", 2, argv[0] ));
39835     }
39836     if (!ptr) {
39837       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","postlist_end", 2, argv[0]));
39838     }
39839     arg2 = ptr;
39840   }
39841   result = ((Xapian::Database const *)arg1)->postlist_end((std::string const &)*arg2);
39842   vresult = SWIG_NewPointerObj((new Xapian::PostingIterator(static_cast< const Xapian::PostingIterator& >(result))), SWIGTYPE_p_Xapian__PostingIterator, SWIG_POINTER_OWN |  0 );
39843   if (SWIG_IsNewObj(res2)) delete arg2;
39844   return vresult;
39845 fail:
39846   if (SWIG_IsNewObj(res2)) delete arg2;
39847   return Qnil;
39848 }
39849 
39850 
39851 SWIGINTERN VALUE
_wrap_Database__dangerous_termlist_begin(int argc,VALUE * argv,VALUE self)39852 _wrap_Database__dangerous_termlist_begin(int argc, VALUE *argv, VALUE self) {
39853   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
39854   Xapian::docid arg2 ;
39855   void *argp1 = 0 ;
39856   int res1 = 0 ;
39857   unsigned int val2 ;
39858   int ecode2 = 0 ;
39859   Xapian::TermIterator result;
39860   VALUE vresult = Qnil;
39861 
39862   if ((argc < 1) || (argc > 1)) {
39863     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
39864   }
39865   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
39866   if (!SWIG_IsOK(res1)) {
39867     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","termlist_begin", 1, self ));
39868   }
39869   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
39870   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
39871   if (!SWIG_IsOK(ecode2)) {
39872     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","termlist_begin", 2, argv[0] ));
39873   }
39874   arg2 = static_cast< Xapian::docid >(val2);
39875   {
39876     try {
39877       result = ((Xapian::Database const *)arg1)->termlist_begin(arg2);
39878     } catch (...) {
39879       string msg;
39880       int code = XapianExceptionHandler(msg);
39881       SWIG_exception(code, msg.c_str());
39882     }
39883   }
39884   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
39885   return vresult;
39886 fail:
39887   return Qnil;
39888 }
39889 
39890 
39891 SWIGINTERN VALUE
_wrap_Database__dangerous_termlist_end(int argc,VALUE * argv,VALUE self)39892 _wrap_Database__dangerous_termlist_end(int argc, VALUE *argv, VALUE self) {
39893   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
39894   Xapian::docid arg2 ;
39895   void *argp1 = 0 ;
39896   int res1 = 0 ;
39897   unsigned int val2 ;
39898   int ecode2 = 0 ;
39899   Xapian::TermIterator result;
39900   VALUE vresult = Qnil;
39901 
39902   if ((argc < 1) || (argc > 1)) {
39903     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
39904   }
39905   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
39906   if (!SWIG_IsOK(res1)) {
39907     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","termlist_end", 1, self ));
39908   }
39909   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
39910   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
39911   if (!SWIG_IsOK(ecode2)) {
39912     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","termlist_end", 2, argv[0] ));
39913   }
39914   arg2 = static_cast< Xapian::docid >(val2);
39915   result = ((Xapian::Database const *)arg1)->termlist_end(arg2);
39916   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
39917   return vresult;
39918 fail:
39919   return Qnil;
39920 }
39921 
39922 
39923 SWIGINTERN VALUE
_wrap_Database_has_positions(int argc,VALUE * argv,VALUE self)39924 _wrap_Database_has_positions(int argc, VALUE *argv, VALUE self) {
39925   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
39926   void *argp1 = 0 ;
39927   int res1 = 0 ;
39928   bool result;
39929   VALUE vresult = Qnil;
39930 
39931   if ((argc < 0) || (argc > 0)) {
39932     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
39933   }
39934   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
39935   if (!SWIG_IsOK(res1)) {
39936     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","has_positions", 1, self ));
39937   }
39938   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
39939   {
39940     try {
39941       result = (bool)((Xapian::Database const *)arg1)->has_positions();
39942     } catch (...) {
39943       string msg;
39944       int code = XapianExceptionHandler(msg);
39945       SWIG_exception(code, msg.c_str());
39946     }
39947   }
39948   vresult = SWIG_From_bool(static_cast< bool >(result));
39949   return vresult;
39950 fail:
39951   return Qnil;
39952 }
39953 
39954 
39955 SWIGINTERN VALUE
_wrap_Database__dangerous_positionlist_begin(int argc,VALUE * argv,VALUE self)39956 _wrap_Database__dangerous_positionlist_begin(int argc, VALUE *argv, VALUE self) {
39957   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
39958   Xapian::docid arg2 ;
39959   std::string *arg3 = 0 ;
39960   void *argp1 = 0 ;
39961   int res1 = 0 ;
39962   unsigned int val2 ;
39963   int ecode2 = 0 ;
39964   int res3 = SWIG_OLDOBJ ;
39965   Xapian::PositionIterator result;
39966   VALUE vresult = Qnil;
39967 
39968   if ((argc < 2) || (argc > 2)) {
39969     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
39970   }
39971   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
39972   if (!SWIG_IsOK(res1)) {
39973     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","positionlist_begin", 1, self ));
39974   }
39975   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
39976   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
39977   if (!SWIG_IsOK(ecode2)) {
39978     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","positionlist_begin", 2, argv[0] ));
39979   }
39980   arg2 = static_cast< Xapian::docid >(val2);
39981   {
39982     std::string *ptr = (std::string *)0;
39983     res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
39984     if (!SWIG_IsOK(res3)) {
39985       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","positionlist_begin", 3, argv[1] ));
39986     }
39987     if (!ptr) {
39988       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","positionlist_begin", 3, argv[1]));
39989     }
39990     arg3 = ptr;
39991   }
39992   {
39993     try {
39994       result = ((Xapian::Database const *)arg1)->positionlist_begin(arg2,(std::string const &)*arg3);
39995     } catch (...) {
39996       string msg;
39997       int code = XapianExceptionHandler(msg);
39998       SWIG_exception(code, msg.c_str());
39999     }
40000   }
40001   vresult = SWIG_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN |  0 );
40002   if (SWIG_IsNewObj(res3)) delete arg3;
40003   return vresult;
40004 fail:
40005   if (SWIG_IsNewObj(res3)) delete arg3;
40006   return Qnil;
40007 }
40008 
40009 
40010 SWIGINTERN VALUE
_wrap_Database__dangerous_positionlist_end(int argc,VALUE * argv,VALUE self)40011 _wrap_Database__dangerous_positionlist_end(int argc, VALUE *argv, VALUE self) {
40012   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40013   Xapian::docid arg2 ;
40014   std::string *arg3 = 0 ;
40015   void *argp1 = 0 ;
40016   int res1 = 0 ;
40017   unsigned int val2 ;
40018   int ecode2 = 0 ;
40019   int res3 = SWIG_OLDOBJ ;
40020   Xapian::PositionIterator result;
40021   VALUE vresult = Qnil;
40022 
40023   if ((argc < 2) || (argc > 2)) {
40024     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
40025   }
40026   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40027   if (!SWIG_IsOK(res1)) {
40028     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","positionlist_end", 1, self ));
40029   }
40030   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40031   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
40032   if (!SWIG_IsOK(ecode2)) {
40033     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","positionlist_end", 2, argv[0] ));
40034   }
40035   arg2 = static_cast< Xapian::docid >(val2);
40036   {
40037     std::string *ptr = (std::string *)0;
40038     res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
40039     if (!SWIG_IsOK(res3)) {
40040       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","positionlist_end", 3, argv[1] ));
40041     }
40042     if (!ptr) {
40043       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","positionlist_end", 3, argv[1]));
40044     }
40045     arg3 = ptr;
40046   }
40047   result = ((Xapian::Database const *)arg1)->positionlist_end(arg2,(std::string const &)*arg3);
40048   vresult = SWIG_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN |  0 );
40049   if (SWIG_IsNewObj(res3)) delete arg3;
40050   return vresult;
40051 fail:
40052   if (SWIG_IsNewObj(res3)) delete arg3;
40053   return Qnil;
40054 }
40055 
40056 
40057 SWIGINTERN VALUE
_wrap_Database__dangerous_allterms_begin__SWIG_0(int argc,VALUE * argv,VALUE self)40058 _wrap_Database__dangerous_allterms_begin__SWIG_0(int argc, VALUE *argv, VALUE self) {
40059   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40060   std::string *arg2 = 0 ;
40061   void *argp1 = 0 ;
40062   int res1 = 0 ;
40063   int res2 = SWIG_OLDOBJ ;
40064   Xapian::TermIterator result;
40065   VALUE vresult = Qnil;
40066 
40067   if ((argc < 1) || (argc > 1)) {
40068     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
40069   }
40070   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40071   if (!SWIG_IsOK(res1)) {
40072     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","allterms_begin", 1, self ));
40073   }
40074   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40075   {
40076     std::string *ptr = (std::string *)0;
40077     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
40078     if (!SWIG_IsOK(res2)) {
40079       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","allterms_begin", 2, argv[0] ));
40080     }
40081     if (!ptr) {
40082       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","allterms_begin", 2, argv[0]));
40083     }
40084     arg2 = ptr;
40085   }
40086   {
40087     try {
40088       result = ((Xapian::Database const *)arg1)->allterms_begin((std::string const &)*arg2);
40089     } catch (...) {
40090       string msg;
40091       int code = XapianExceptionHandler(msg);
40092       SWIG_exception(code, msg.c_str());
40093     }
40094   }
40095   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
40096   if (SWIG_IsNewObj(res2)) delete arg2;
40097   return vresult;
40098 fail:
40099   if (SWIG_IsNewObj(res2)) delete arg2;
40100   return Qnil;
40101 }
40102 
40103 
40104 SWIGINTERN VALUE
_wrap_Database__dangerous_allterms_begin__SWIG_1(int argc,VALUE * argv,VALUE self)40105 _wrap_Database__dangerous_allterms_begin__SWIG_1(int argc, VALUE *argv, VALUE self) {
40106   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40107   void *argp1 = 0 ;
40108   int res1 = 0 ;
40109   Xapian::TermIterator result;
40110   VALUE vresult = Qnil;
40111 
40112   if ((argc < 0) || (argc > 0)) {
40113     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
40114   }
40115   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40116   if (!SWIG_IsOK(res1)) {
40117     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","allterms_begin", 1, self ));
40118   }
40119   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40120   {
40121     try {
40122       result = ((Xapian::Database const *)arg1)->allterms_begin();
40123     } catch (...) {
40124       string msg;
40125       int code = XapianExceptionHandler(msg);
40126       SWIG_exception(code, msg.c_str());
40127     }
40128   }
40129   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
40130   return vresult;
40131 fail:
40132   return Qnil;
40133 }
40134 
40135 
_wrap_Database__dangerous_allterms_begin(int nargs,VALUE * args,VALUE self)40136 SWIGINTERN VALUE _wrap_Database__dangerous_allterms_begin(int nargs, VALUE *args, VALUE self) {
40137   int argc;
40138   VALUE argv[3];
40139   int ii;
40140 
40141   argc = nargs + 1;
40142   argv[0] = self;
40143   if (argc > 3) SWIG_fail;
40144   for (ii = 1; (ii < argc); ++ii) {
40145     argv[ii] = args[ii-1];
40146   }
40147   if (argc == 1) {
40148     int _v;
40149     void *vptr = 0;
40150     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
40151     _v = SWIG_CheckState(res);
40152     if (_v) {
40153       return _wrap_Database__dangerous_allterms_begin__SWIG_1(nargs, args, self);
40154     }
40155   }
40156   if (argc == 2) {
40157     int _v;
40158     void *vptr = 0;
40159     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
40160     _v = SWIG_CheckState(res);
40161     if (_v) {
40162       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
40163       _v = SWIG_CheckState(res);
40164       if (_v) {
40165         return _wrap_Database__dangerous_allterms_begin__SWIG_0(nargs, args, self);
40166       }
40167     }
40168   }
40169 
40170 fail:
40171   Ruby_Format_OverloadedError( argc, 3, "Database._dangerous_allterms_begin",
40172     "    Xapian::TermIterator Database._dangerous_allterms_begin(std::string const &prefix)\n"
40173     "    Xapian::TermIterator Database._dangerous_allterms_begin()\n");
40174 
40175   return Qnil;
40176 }
40177 
40178 
40179 SWIGINTERN VALUE
_wrap_Database__dangerous_allterms_end__SWIG_0(int argc,VALUE * argv,VALUE self)40180 _wrap_Database__dangerous_allterms_end__SWIG_0(int argc, VALUE *argv, VALUE self) {
40181   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40182   std::string *arg2 = 0 ;
40183   void *argp1 = 0 ;
40184   int res1 = 0 ;
40185   int res2 = SWIG_OLDOBJ ;
40186   Xapian::TermIterator result;
40187   VALUE vresult = Qnil;
40188 
40189   if ((argc < 1) || (argc > 1)) {
40190     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
40191   }
40192   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40193   if (!SWIG_IsOK(res1)) {
40194     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","allterms_end", 1, self ));
40195   }
40196   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40197   {
40198     std::string *ptr = (std::string *)0;
40199     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
40200     if (!SWIG_IsOK(res2)) {
40201       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","allterms_end", 2, argv[0] ));
40202     }
40203     if (!ptr) {
40204       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","allterms_end", 2, argv[0]));
40205     }
40206     arg2 = ptr;
40207   }
40208   result = ((Xapian::Database const *)arg1)->allterms_end((std::string const &)*arg2);
40209   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
40210   if (SWIG_IsNewObj(res2)) delete arg2;
40211   return vresult;
40212 fail:
40213   if (SWIG_IsNewObj(res2)) delete arg2;
40214   return Qnil;
40215 }
40216 
40217 
40218 SWIGINTERN VALUE
_wrap_Database__dangerous_allterms_end__SWIG_1(int argc,VALUE * argv,VALUE self)40219 _wrap_Database__dangerous_allterms_end__SWIG_1(int argc, VALUE *argv, VALUE self) {
40220   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40221   void *argp1 = 0 ;
40222   int res1 = 0 ;
40223   Xapian::TermIterator result;
40224   VALUE vresult = Qnil;
40225 
40226   if ((argc < 0) || (argc > 0)) {
40227     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
40228   }
40229   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40230   if (!SWIG_IsOK(res1)) {
40231     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","allterms_end", 1, self ));
40232   }
40233   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40234   result = ((Xapian::Database const *)arg1)->allterms_end();
40235   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
40236   return vresult;
40237 fail:
40238   return Qnil;
40239 }
40240 
40241 
_wrap_Database__dangerous_allterms_end(int nargs,VALUE * args,VALUE self)40242 SWIGINTERN VALUE _wrap_Database__dangerous_allterms_end(int nargs, VALUE *args, VALUE self) {
40243   int argc;
40244   VALUE argv[3];
40245   int ii;
40246 
40247   argc = nargs + 1;
40248   argv[0] = self;
40249   if (argc > 3) SWIG_fail;
40250   for (ii = 1; (ii < argc); ++ii) {
40251     argv[ii] = args[ii-1];
40252   }
40253   if (argc == 1) {
40254     int _v;
40255     void *vptr = 0;
40256     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
40257     _v = SWIG_CheckState(res);
40258     if (_v) {
40259       return _wrap_Database__dangerous_allterms_end__SWIG_1(nargs, args, self);
40260     }
40261   }
40262   if (argc == 2) {
40263     int _v;
40264     void *vptr = 0;
40265     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
40266     _v = SWIG_CheckState(res);
40267     if (_v) {
40268       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
40269       _v = SWIG_CheckState(res);
40270       if (_v) {
40271         return _wrap_Database__dangerous_allterms_end__SWIG_0(nargs, args, self);
40272       }
40273     }
40274   }
40275 
40276 fail:
40277   Ruby_Format_OverloadedError( argc, 3, "Database._dangerous_allterms_end",
40278     "    Xapian::TermIterator Database._dangerous_allterms_end(std::string const &)\n"
40279     "    Xapian::TermIterator Database._dangerous_allterms_end()\n");
40280 
40281   return Qnil;
40282 }
40283 
40284 
40285 SWIGINTERN VALUE
_wrap_Database_doccount(int argc,VALUE * argv,VALUE self)40286 _wrap_Database_doccount(int argc, VALUE *argv, VALUE self) {
40287   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40288   void *argp1 = 0 ;
40289   int res1 = 0 ;
40290   Xapian::doccount result;
40291   VALUE vresult = Qnil;
40292 
40293   if ((argc < 0) || (argc > 0)) {
40294     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
40295   }
40296   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40297   if (!SWIG_IsOK(res1)) {
40298     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_doccount", 1, self ));
40299   }
40300   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40301   {
40302     try {
40303       result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_doccount();
40304     } catch (...) {
40305       string msg;
40306       int code = XapianExceptionHandler(msg);
40307       SWIG_exception(code, msg.c_str());
40308     }
40309   }
40310   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
40311   return vresult;
40312 fail:
40313   return Qnil;
40314 }
40315 
40316 
40317 SWIGINTERN VALUE
_wrap_Database_lastdocid(int argc,VALUE * argv,VALUE self)40318 _wrap_Database_lastdocid(int argc, VALUE *argv, VALUE self) {
40319   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40320   void *argp1 = 0 ;
40321   int res1 = 0 ;
40322   Xapian::docid result;
40323   VALUE vresult = Qnil;
40324 
40325   if ((argc < 0) || (argc > 0)) {
40326     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
40327   }
40328   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40329   if (!SWIG_IsOK(res1)) {
40330     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_lastdocid", 1, self ));
40331   }
40332   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40333   {
40334     try {
40335       result = (Xapian::docid)((Xapian::Database const *)arg1)->get_lastdocid();
40336     } catch (...) {
40337       string msg;
40338       int code = XapianExceptionHandler(msg);
40339       SWIG_exception(code, msg.c_str());
40340     }
40341   }
40342   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
40343   return vresult;
40344 fail:
40345   return Qnil;
40346 }
40347 
40348 
40349 SWIGINTERN VALUE
_wrap_Database_avlength(int argc,VALUE * argv,VALUE self)40350 _wrap_Database_avlength(int argc, VALUE *argv, VALUE self) {
40351   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40352   void *argp1 = 0 ;
40353   int res1 = 0 ;
40354   Xapian::doclength result;
40355   VALUE vresult = Qnil;
40356 
40357   if ((argc < 0) || (argc > 0)) {
40358     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
40359   }
40360   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40361   if (!SWIG_IsOK(res1)) {
40362     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_avlength", 1, self ));
40363   }
40364   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40365   {
40366     try {
40367       result = (Xapian::doclength)((Xapian::Database const *)arg1)->get_avlength();
40368     } catch (...) {
40369       string msg;
40370       int code = XapianExceptionHandler(msg);
40371       SWIG_exception(code, msg.c_str());
40372     }
40373   }
40374   vresult = SWIG_From_double(static_cast< double >(result));
40375   return vresult;
40376 fail:
40377   return Qnil;
40378 }
40379 
40380 
40381 SWIGINTERN VALUE
_wrap_Database_get_average_length(int argc,VALUE * argv,VALUE self)40382 _wrap_Database_get_average_length(int argc, VALUE *argv, VALUE self) {
40383   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40384   void *argp1 = 0 ;
40385   int res1 = 0 ;
40386   double result;
40387   VALUE vresult = Qnil;
40388 
40389   if ((argc < 0) || (argc > 0)) {
40390     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
40391   }
40392   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40393   if (!SWIG_IsOK(res1)) {
40394     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_average_length", 1, self ));
40395   }
40396   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40397   {
40398     try {
40399       result = (double)((Xapian::Database const *)arg1)->get_average_length();
40400     } catch (...) {
40401       string msg;
40402       int code = XapianExceptionHandler(msg);
40403       SWIG_exception(code, msg.c_str());
40404     }
40405   }
40406   vresult = SWIG_From_double(static_cast< double >(result));
40407   return vresult;
40408 fail:
40409   return Qnil;
40410 }
40411 
40412 
40413 SWIGINTERN VALUE
_wrap_Database_get_total_length(int argc,VALUE * argv,VALUE self)40414 _wrap_Database_get_total_length(int argc, VALUE *argv, VALUE self) {
40415   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40416   void *argp1 = 0 ;
40417   int res1 = 0 ;
40418   Xapian::totallength result;
40419   VALUE vresult = Qnil;
40420 
40421   if ((argc < 0) || (argc > 0)) {
40422     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
40423   }
40424   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40425   if (!SWIG_IsOK(res1)) {
40426     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_total_length", 1, self ));
40427   }
40428   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40429   {
40430     try {
40431       result = (Xapian::totallength)((Xapian::Database const *)arg1)->get_total_length();
40432     } catch (...) {
40433       string msg;
40434       int code = XapianExceptionHandler(msg);
40435       SWIG_exception(code, msg.c_str());
40436     }
40437   }
40438   vresult = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
40439   return vresult;
40440 fail:
40441   return Qnil;
40442 }
40443 
40444 
40445 SWIGINTERN VALUE
_wrap_Database_termfreq(int argc,VALUE * argv,VALUE self)40446 _wrap_Database_termfreq(int argc, VALUE *argv, VALUE self) {
40447   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40448   std::string *arg2 = 0 ;
40449   void *argp1 = 0 ;
40450   int res1 = 0 ;
40451   int res2 = SWIG_OLDOBJ ;
40452   Xapian::doccount result;
40453   VALUE vresult = Qnil;
40454 
40455   if ((argc < 1) || (argc > 1)) {
40456     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
40457   }
40458   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40459   if (!SWIG_IsOK(res1)) {
40460     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_termfreq", 1, self ));
40461   }
40462   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40463   {
40464     std::string *ptr = (std::string *)0;
40465     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
40466     if (!SWIG_IsOK(res2)) {
40467       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","get_termfreq", 2, argv[0] ));
40468     }
40469     if (!ptr) {
40470       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","get_termfreq", 2, argv[0]));
40471     }
40472     arg2 = ptr;
40473   }
40474   {
40475     try {
40476       result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_termfreq((std::string const &)*arg2);
40477     } catch (...) {
40478       string msg;
40479       int code = XapianExceptionHandler(msg);
40480       SWIG_exception(code, msg.c_str());
40481     }
40482   }
40483   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
40484   if (SWIG_IsNewObj(res2)) delete arg2;
40485   return vresult;
40486 fail:
40487   if (SWIG_IsNewObj(res2)) delete arg2;
40488   return Qnil;
40489 }
40490 
40491 
40492 SWIGINTERN VALUE
_wrap_Database_term_exists(int argc,VALUE * argv,VALUE self)40493 _wrap_Database_term_exists(int argc, VALUE *argv, VALUE self) {
40494   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40495   std::string *arg2 = 0 ;
40496   void *argp1 = 0 ;
40497   int res1 = 0 ;
40498   int res2 = SWIG_OLDOBJ ;
40499   bool result;
40500   VALUE vresult = Qnil;
40501 
40502   if ((argc < 1) || (argc > 1)) {
40503     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
40504   }
40505   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40506   if (!SWIG_IsOK(res1)) {
40507     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","term_exists", 1, self ));
40508   }
40509   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40510   {
40511     std::string *ptr = (std::string *)0;
40512     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
40513     if (!SWIG_IsOK(res2)) {
40514       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","term_exists", 2, argv[0] ));
40515     }
40516     if (!ptr) {
40517       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","term_exists", 2, argv[0]));
40518     }
40519     arg2 = ptr;
40520   }
40521   {
40522     try {
40523       result = (bool)((Xapian::Database const *)arg1)->term_exists((std::string const &)*arg2);
40524     } catch (...) {
40525       string msg;
40526       int code = XapianExceptionHandler(msg);
40527       SWIG_exception(code, msg.c_str());
40528     }
40529   }
40530   vresult = SWIG_From_bool(static_cast< bool >(result));
40531   if (SWIG_IsNewObj(res2)) delete arg2;
40532   return vresult;
40533 fail:
40534   if (SWIG_IsNewObj(res2)) delete arg2;
40535   return Qnil;
40536 }
40537 
40538 
40539 SWIGINTERN VALUE
_wrap_Database_collection_freq(int argc,VALUE * argv,VALUE self)40540 _wrap_Database_collection_freq(int argc, VALUE *argv, VALUE self) {
40541   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40542   std::string *arg2 = 0 ;
40543   void *argp1 = 0 ;
40544   int res1 = 0 ;
40545   int res2 = SWIG_OLDOBJ ;
40546   Xapian::termcount result;
40547   VALUE vresult = Qnil;
40548 
40549   if ((argc < 1) || (argc > 1)) {
40550     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
40551   }
40552   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40553   if (!SWIG_IsOK(res1)) {
40554     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_collection_freq", 1, self ));
40555   }
40556   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40557   {
40558     std::string *ptr = (std::string *)0;
40559     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
40560     if (!SWIG_IsOK(res2)) {
40561       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","get_collection_freq", 2, argv[0] ));
40562     }
40563     if (!ptr) {
40564       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","get_collection_freq", 2, argv[0]));
40565     }
40566     arg2 = ptr;
40567   }
40568   {
40569     try {
40570       result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_collection_freq((std::string const &)*arg2);
40571     } catch (...) {
40572       string msg;
40573       int code = XapianExceptionHandler(msg);
40574       SWIG_exception(code, msg.c_str());
40575     }
40576   }
40577   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
40578   if (SWIG_IsNewObj(res2)) delete arg2;
40579   return vresult;
40580 fail:
40581   if (SWIG_IsNewObj(res2)) delete arg2;
40582   return Qnil;
40583 }
40584 
40585 
40586 SWIGINTERN VALUE
_wrap_Database_get_value_freq(int argc,VALUE * argv,VALUE self)40587 _wrap_Database_get_value_freq(int argc, VALUE *argv, VALUE self) {
40588   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40589   Xapian::valueno arg2 ;
40590   void *argp1 = 0 ;
40591   int res1 = 0 ;
40592   unsigned int val2 ;
40593   int ecode2 = 0 ;
40594   Xapian::doccount result;
40595   VALUE vresult = Qnil;
40596 
40597   if ((argc < 1) || (argc > 1)) {
40598     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
40599   }
40600   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40601   if (!SWIG_IsOK(res1)) {
40602     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_value_freq", 1, self ));
40603   }
40604   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40605   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
40606   if (!SWIG_IsOK(ecode2)) {
40607     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","get_value_freq", 2, argv[0] ));
40608   }
40609   arg2 = static_cast< Xapian::valueno >(val2);
40610   {
40611     try {
40612       result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_value_freq(arg2);
40613     } catch (...) {
40614       string msg;
40615       int code = XapianExceptionHandler(msg);
40616       SWIG_exception(code, msg.c_str());
40617     }
40618   }
40619   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
40620   return vresult;
40621 fail:
40622   return Qnil;
40623 }
40624 
40625 
40626 SWIGINTERN VALUE
_wrap_Database_get_value_lower_bound(int argc,VALUE * argv,VALUE self)40627 _wrap_Database_get_value_lower_bound(int argc, VALUE *argv, VALUE self) {
40628   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40629   Xapian::valueno arg2 ;
40630   void *argp1 = 0 ;
40631   int res1 = 0 ;
40632   unsigned int val2 ;
40633   int ecode2 = 0 ;
40634   std::string result;
40635   VALUE vresult = Qnil;
40636 
40637   if ((argc < 1) || (argc > 1)) {
40638     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
40639   }
40640   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40641   if (!SWIG_IsOK(res1)) {
40642     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_value_lower_bound", 1, self ));
40643   }
40644   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40645   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
40646   if (!SWIG_IsOK(ecode2)) {
40647     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","get_value_lower_bound", 2, argv[0] ));
40648   }
40649   arg2 = static_cast< Xapian::valueno >(val2);
40650   {
40651     try {
40652       result = ((Xapian::Database const *)arg1)->get_value_lower_bound(arg2);
40653     } catch (...) {
40654       string msg;
40655       int code = XapianExceptionHandler(msg);
40656       SWIG_exception(code, msg.c_str());
40657     }
40658   }
40659   vresult = SWIG_From_std_string(static_cast< std::string >(result));
40660   return vresult;
40661 fail:
40662   return Qnil;
40663 }
40664 
40665 
40666 SWIGINTERN VALUE
_wrap_Database_get_value_upper_bound(int argc,VALUE * argv,VALUE self)40667 _wrap_Database_get_value_upper_bound(int argc, VALUE *argv, VALUE self) {
40668   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40669   Xapian::valueno arg2 ;
40670   void *argp1 = 0 ;
40671   int res1 = 0 ;
40672   unsigned int val2 ;
40673   int ecode2 = 0 ;
40674   std::string result;
40675   VALUE vresult = Qnil;
40676 
40677   if ((argc < 1) || (argc > 1)) {
40678     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
40679   }
40680   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40681   if (!SWIG_IsOK(res1)) {
40682     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_value_upper_bound", 1, self ));
40683   }
40684   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40685   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
40686   if (!SWIG_IsOK(ecode2)) {
40687     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","get_value_upper_bound", 2, argv[0] ));
40688   }
40689   arg2 = static_cast< Xapian::valueno >(val2);
40690   {
40691     try {
40692       result = ((Xapian::Database const *)arg1)->get_value_upper_bound(arg2);
40693     } catch (...) {
40694       string msg;
40695       int code = XapianExceptionHandler(msg);
40696       SWIG_exception(code, msg.c_str());
40697     }
40698   }
40699   vresult = SWIG_From_std_string(static_cast< std::string >(result));
40700   return vresult;
40701 fail:
40702   return Qnil;
40703 }
40704 
40705 
40706 SWIGINTERN VALUE
_wrap_Database_get_doclength_lower_bound(int argc,VALUE * argv,VALUE self)40707 _wrap_Database_get_doclength_lower_bound(int argc, VALUE *argv, VALUE self) {
40708   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40709   void *argp1 = 0 ;
40710   int res1 = 0 ;
40711   Xapian::termcount result;
40712   VALUE vresult = Qnil;
40713 
40714   if ((argc < 0) || (argc > 0)) {
40715     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
40716   }
40717   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40718   if (!SWIG_IsOK(res1)) {
40719     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_doclength_lower_bound", 1, self ));
40720   }
40721   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40722   {
40723     try {
40724       result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength_lower_bound();
40725     } catch (...) {
40726       string msg;
40727       int code = XapianExceptionHandler(msg);
40728       SWIG_exception(code, msg.c_str());
40729     }
40730   }
40731   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
40732   return vresult;
40733 fail:
40734   return Qnil;
40735 }
40736 
40737 
40738 SWIGINTERN VALUE
_wrap_Database_get_doclength_upper_bound(int argc,VALUE * argv,VALUE self)40739 _wrap_Database_get_doclength_upper_bound(int argc, VALUE *argv, VALUE self) {
40740   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40741   void *argp1 = 0 ;
40742   int res1 = 0 ;
40743   Xapian::termcount result;
40744   VALUE vresult = Qnil;
40745 
40746   if ((argc < 0) || (argc > 0)) {
40747     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
40748   }
40749   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40750   if (!SWIG_IsOK(res1)) {
40751     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_doclength_upper_bound", 1, self ));
40752   }
40753   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40754   {
40755     try {
40756       result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength_upper_bound();
40757     } catch (...) {
40758       string msg;
40759       int code = XapianExceptionHandler(msg);
40760       SWIG_exception(code, msg.c_str());
40761     }
40762   }
40763   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
40764   return vresult;
40765 fail:
40766   return Qnil;
40767 }
40768 
40769 
40770 SWIGINTERN VALUE
_wrap_Database_get_wdf_upper_bound(int argc,VALUE * argv,VALUE self)40771 _wrap_Database_get_wdf_upper_bound(int argc, VALUE *argv, VALUE self) {
40772   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40773   std::string *arg2 = 0 ;
40774   void *argp1 = 0 ;
40775   int res1 = 0 ;
40776   int res2 = SWIG_OLDOBJ ;
40777   Xapian::termcount result;
40778   VALUE vresult = Qnil;
40779 
40780   if ((argc < 1) || (argc > 1)) {
40781     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
40782   }
40783   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40784   if (!SWIG_IsOK(res1)) {
40785     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_wdf_upper_bound", 1, self ));
40786   }
40787   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40788   {
40789     std::string *ptr = (std::string *)0;
40790     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
40791     if (!SWIG_IsOK(res2)) {
40792       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","get_wdf_upper_bound", 2, argv[0] ));
40793     }
40794     if (!ptr) {
40795       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","get_wdf_upper_bound", 2, argv[0]));
40796     }
40797     arg2 = ptr;
40798   }
40799   {
40800     try {
40801       result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_wdf_upper_bound((std::string const &)*arg2);
40802     } catch (...) {
40803       string msg;
40804       int code = XapianExceptionHandler(msg);
40805       SWIG_exception(code, msg.c_str());
40806     }
40807   }
40808   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
40809   if (SWIG_IsNewObj(res2)) delete arg2;
40810   return vresult;
40811 fail:
40812   if (SWIG_IsNewObj(res2)) delete arg2;
40813   return Qnil;
40814 }
40815 
40816 
40817 SWIGINTERN VALUE
_wrap_Database__dangerous_valuestream_begin(int argc,VALUE * argv,VALUE self)40818 _wrap_Database__dangerous_valuestream_begin(int argc, VALUE *argv, VALUE self) {
40819   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40820   Xapian::valueno arg2 ;
40821   void *argp1 = 0 ;
40822   int res1 = 0 ;
40823   unsigned int val2 ;
40824   int ecode2 = 0 ;
40825   Xapian::ValueIterator result;
40826   VALUE vresult = Qnil;
40827 
40828   if ((argc < 1) || (argc > 1)) {
40829     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
40830   }
40831   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40832   if (!SWIG_IsOK(res1)) {
40833     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","valuestream_begin", 1, self ));
40834   }
40835   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40836   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
40837   if (!SWIG_IsOK(ecode2)) {
40838     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","valuestream_begin", 2, argv[0] ));
40839   }
40840   arg2 = static_cast< Xapian::valueno >(val2);
40841   {
40842     try {
40843       result = ((Xapian::Database const *)arg1)->valuestream_begin(arg2);
40844     } catch (...) {
40845       string msg;
40846       int code = XapianExceptionHandler(msg);
40847       SWIG_exception(code, msg.c_str());
40848     }
40849   }
40850   vresult = SWIG_NewPointerObj((new Xapian::ValueIterator(static_cast< const Xapian::ValueIterator& >(result))), SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_OWN |  0 );
40851   return vresult;
40852 fail:
40853   return Qnil;
40854 }
40855 
40856 
40857 SWIGINTERN VALUE
_wrap_Database__dangerous_valuestream_end(int argc,VALUE * argv,VALUE self)40858 _wrap_Database__dangerous_valuestream_end(int argc, VALUE *argv, VALUE self) {
40859   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40860   Xapian::valueno arg2 ;
40861   void *argp1 = 0 ;
40862   int res1 = 0 ;
40863   unsigned int val2 ;
40864   int ecode2 = 0 ;
40865   Xapian::ValueIterator result;
40866   VALUE vresult = Qnil;
40867 
40868   if ((argc < 1) || (argc > 1)) {
40869     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
40870   }
40871   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40872   if (!SWIG_IsOK(res1)) {
40873     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","valuestream_end", 1, self ));
40874   }
40875   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40876   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
40877   if (!SWIG_IsOK(ecode2)) {
40878     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::valueno","valuestream_end", 2, argv[0] ));
40879   }
40880   arg2 = static_cast< Xapian::valueno >(val2);
40881   result = ((Xapian::Database const *)arg1)->valuestream_end(arg2);
40882   vresult = SWIG_NewPointerObj((new Xapian::ValueIterator(static_cast< const Xapian::ValueIterator& >(result))), SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_OWN |  0 );
40883   return vresult;
40884 fail:
40885   return Qnil;
40886 }
40887 
40888 
40889 SWIGINTERN VALUE
_wrap_Database_doclength(int argc,VALUE * argv,VALUE self)40890 _wrap_Database_doclength(int argc, VALUE *argv, VALUE self) {
40891   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40892   Xapian::docid arg2 ;
40893   void *argp1 = 0 ;
40894   int res1 = 0 ;
40895   unsigned int val2 ;
40896   int ecode2 = 0 ;
40897   Xapian::termcount result;
40898   VALUE vresult = Qnil;
40899 
40900   if ((argc < 1) || (argc > 1)) {
40901     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
40902   }
40903   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40904   if (!SWIG_IsOK(res1)) {
40905     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_doclength", 1, self ));
40906   }
40907   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40908   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
40909   if (!SWIG_IsOK(ecode2)) {
40910     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","get_doclength", 2, argv[0] ));
40911   }
40912   arg2 = static_cast< Xapian::docid >(val2);
40913   {
40914     try {
40915       result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength(arg2);
40916     } catch (...) {
40917       string msg;
40918       int code = XapianExceptionHandler(msg);
40919       SWIG_exception(code, msg.c_str());
40920     }
40921   }
40922   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
40923   return vresult;
40924 fail:
40925   return Qnil;
40926 }
40927 
40928 
40929 SWIGINTERN VALUE
_wrap_Database_get_unique_terms(int argc,VALUE * argv,VALUE self)40930 _wrap_Database_get_unique_terms(int argc, VALUE *argv, VALUE self) {
40931   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40932   Xapian::docid arg2 ;
40933   void *argp1 = 0 ;
40934   int res1 = 0 ;
40935   unsigned int val2 ;
40936   int ecode2 = 0 ;
40937   Xapian::termcount result;
40938   VALUE vresult = Qnil;
40939 
40940   if ((argc < 1) || (argc > 1)) {
40941     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
40942   }
40943   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40944   if (!SWIG_IsOK(res1)) {
40945     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_unique_terms", 1, self ));
40946   }
40947   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40948   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
40949   if (!SWIG_IsOK(ecode2)) {
40950     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","get_unique_terms", 2, argv[0] ));
40951   }
40952   arg2 = static_cast< Xapian::docid >(val2);
40953   {
40954     try {
40955       result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_unique_terms(arg2);
40956     } catch (...) {
40957       string msg;
40958       int code = XapianExceptionHandler(msg);
40959       SWIG_exception(code, msg.c_str());
40960     }
40961   }
40962   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
40963   return vresult;
40964 fail:
40965   return Qnil;
40966 }
40967 
40968 
40969 SWIGINTERN VALUE
_wrap_Database_keep_alive(int argc,VALUE * argv,VALUE self)40970 _wrap_Database_keep_alive(int argc, VALUE *argv, VALUE self) {
40971   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
40972   void *argp1 = 0 ;
40973   int res1 = 0 ;
40974 
40975   if ((argc < 0) || (argc > 0)) {
40976     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
40977   }
40978   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
40979   if (!SWIG_IsOK(res1)) {
40980     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database *","keep_alive", 1, self ));
40981   }
40982   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
40983   {
40984     try {
40985       (arg1)->keep_alive();
40986     } catch (...) {
40987       string msg;
40988       int code = XapianExceptionHandler(msg);
40989       SWIG_exception(code, msg.c_str());
40990     }
40991   }
40992   return Qnil;
40993 fail:
40994   return Qnil;
40995 }
40996 
40997 
40998 SWIGINTERN VALUE
_wrap_Database_document__SWIG_0(int argc,VALUE * argv,VALUE self)40999 _wrap_Database_document__SWIG_0(int argc, VALUE *argv, VALUE self) {
41000   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
41001   Xapian::docid arg2 ;
41002   void *argp1 = 0 ;
41003   int res1 = 0 ;
41004   unsigned int val2 ;
41005   int ecode2 = 0 ;
41006   Xapian::Document result;
41007   VALUE vresult = Qnil;
41008 
41009   if ((argc < 1) || (argc > 1)) {
41010     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
41011   }
41012   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
41013   if (!SWIG_IsOK(res1)) {
41014     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_document", 1, self ));
41015   }
41016   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
41017   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
41018   if (!SWIG_IsOK(ecode2)) {
41019     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","get_document", 2, argv[0] ));
41020   }
41021   arg2 = static_cast< Xapian::docid >(val2);
41022   {
41023     try {
41024       result = ((Xapian::Database const *)arg1)->get_document(arg2);
41025     } catch (...) {
41026       string msg;
41027       int code = XapianExceptionHandler(msg);
41028       SWIG_exception(code, msg.c_str());
41029     }
41030   }
41031   vresult = SWIG_NewPointerObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_OWN |  0 );
41032   return vresult;
41033 fail:
41034   return Qnil;
41035 }
41036 
41037 
41038 SWIGINTERN VALUE
_wrap_Database_document__SWIG_1(int argc,VALUE * argv,VALUE self)41039 _wrap_Database_document__SWIG_1(int argc, VALUE *argv, VALUE self) {
41040   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
41041   Xapian::docid arg2 ;
41042   unsigned int arg3 ;
41043   void *argp1 = 0 ;
41044   int res1 = 0 ;
41045   unsigned int val2 ;
41046   int ecode2 = 0 ;
41047   unsigned int val3 ;
41048   int ecode3 = 0 ;
41049   Xapian::Document result;
41050   VALUE vresult = Qnil;
41051 
41052   if ((argc < 2) || (argc > 2)) {
41053     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
41054   }
41055   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
41056   if (!SWIG_IsOK(res1)) {
41057     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_document", 1, self ));
41058   }
41059   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
41060   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
41061   if (!SWIG_IsOK(ecode2)) {
41062     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","get_document", 2, argv[0] ));
41063   }
41064   arg2 = static_cast< Xapian::docid >(val2);
41065   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
41066   if (!SWIG_IsOK(ecode3)) {
41067     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","get_document", 3, argv[1] ));
41068   }
41069   arg3 = static_cast< unsigned int >(val3);
41070   {
41071     try {
41072       result = ((Xapian::Database const *)arg1)->get_document(arg2,arg3);
41073     } catch (...) {
41074       string msg;
41075       int code = XapianExceptionHandler(msg);
41076       SWIG_exception(code, msg.c_str());
41077     }
41078   }
41079   vresult = SWIG_NewPointerObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_OWN |  0 );
41080   return vresult;
41081 fail:
41082   return Qnil;
41083 }
41084 
41085 
_wrap_Database_document(int nargs,VALUE * args,VALUE self)41086 SWIGINTERN VALUE _wrap_Database_document(int nargs, VALUE *args, VALUE self) {
41087   int argc;
41088   VALUE argv[4];
41089   int ii;
41090 
41091   argc = nargs + 1;
41092   argv[0] = self;
41093   if (argc > 4) SWIG_fail;
41094   for (ii = 1; (ii < argc); ++ii) {
41095     argv[ii] = args[ii-1];
41096   }
41097   if (argc == 2) {
41098     int _v;
41099     void *vptr = 0;
41100     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
41101     _v = SWIG_CheckState(res);
41102     if (_v) {
41103       {
41104         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
41105         _v = SWIG_CheckState(res);
41106       }
41107       if (_v) {
41108         return _wrap_Database_document__SWIG_0(nargs, args, self);
41109       }
41110     }
41111   }
41112   if (argc == 3) {
41113     int _v;
41114     void *vptr = 0;
41115     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
41116     _v = SWIG_CheckState(res);
41117     if (_v) {
41118       {
41119         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
41120         _v = SWIG_CheckState(res);
41121       }
41122       if (_v) {
41123         {
41124           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
41125           _v = SWIG_CheckState(res);
41126         }
41127         if (_v) {
41128           return _wrap_Database_document__SWIG_1(nargs, args, self);
41129         }
41130       }
41131     }
41132   }
41133 
41134 fail:
41135   Ruby_Format_OverloadedError( argc, 4, "Database.document",
41136     "    Xapian::Document Database.document(Xapian::docid did)\n"
41137     "    Xapian::Document Database.document(Xapian::docid did, unsigned int flags)\n");
41138 
41139   return Qnil;
41140 }
41141 
41142 
41143 SWIGINTERN VALUE
_wrap_Database_get_spelling_suggestion__SWIG_0(int argc,VALUE * argv,VALUE self)41144 _wrap_Database_get_spelling_suggestion__SWIG_0(int argc, VALUE *argv, VALUE self) {
41145   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
41146   std::string *arg2 = 0 ;
41147   unsigned int arg3 ;
41148   void *argp1 = 0 ;
41149   int res1 = 0 ;
41150   int res2 = SWIG_OLDOBJ ;
41151   unsigned int val3 ;
41152   int ecode3 = 0 ;
41153   std::string result;
41154   VALUE vresult = Qnil;
41155 
41156   if ((argc < 2) || (argc > 2)) {
41157     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
41158   }
41159   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
41160   if (!SWIG_IsOK(res1)) {
41161     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_spelling_suggestion", 1, self ));
41162   }
41163   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
41164   {
41165     std::string *ptr = (std::string *)0;
41166     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
41167     if (!SWIG_IsOK(res2)) {
41168       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","get_spelling_suggestion", 2, argv[0] ));
41169     }
41170     if (!ptr) {
41171       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","get_spelling_suggestion", 2, argv[0]));
41172     }
41173     arg2 = ptr;
41174   }
41175   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
41176   if (!SWIG_IsOK(ecode3)) {
41177     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","get_spelling_suggestion", 3, argv[1] ));
41178   }
41179   arg3 = static_cast< unsigned int >(val3);
41180   {
41181     try {
41182       result = ((Xapian::Database const *)arg1)->get_spelling_suggestion((std::string const &)*arg2,arg3);
41183     } catch (...) {
41184       string msg;
41185       int code = XapianExceptionHandler(msg);
41186       SWIG_exception(code, msg.c_str());
41187     }
41188   }
41189   vresult = SWIG_From_std_string(static_cast< std::string >(result));
41190   if (SWIG_IsNewObj(res2)) delete arg2;
41191   return vresult;
41192 fail:
41193   if (SWIG_IsNewObj(res2)) delete arg2;
41194   return Qnil;
41195 }
41196 
41197 
41198 SWIGINTERN VALUE
_wrap_Database_get_spelling_suggestion__SWIG_1(int argc,VALUE * argv,VALUE self)41199 _wrap_Database_get_spelling_suggestion__SWIG_1(int argc, VALUE *argv, VALUE self) {
41200   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
41201   std::string *arg2 = 0 ;
41202   void *argp1 = 0 ;
41203   int res1 = 0 ;
41204   int res2 = SWIG_OLDOBJ ;
41205   std::string result;
41206   VALUE vresult = Qnil;
41207 
41208   if ((argc < 1) || (argc > 1)) {
41209     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
41210   }
41211   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
41212   if (!SWIG_IsOK(res1)) {
41213     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_spelling_suggestion", 1, self ));
41214   }
41215   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
41216   {
41217     std::string *ptr = (std::string *)0;
41218     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
41219     if (!SWIG_IsOK(res2)) {
41220       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","get_spelling_suggestion", 2, argv[0] ));
41221     }
41222     if (!ptr) {
41223       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","get_spelling_suggestion", 2, argv[0]));
41224     }
41225     arg2 = ptr;
41226   }
41227   {
41228     try {
41229       result = ((Xapian::Database const *)arg1)->get_spelling_suggestion((std::string const &)*arg2);
41230     } catch (...) {
41231       string msg;
41232       int code = XapianExceptionHandler(msg);
41233       SWIG_exception(code, msg.c_str());
41234     }
41235   }
41236   vresult = SWIG_From_std_string(static_cast< std::string >(result));
41237   if (SWIG_IsNewObj(res2)) delete arg2;
41238   return vresult;
41239 fail:
41240   if (SWIG_IsNewObj(res2)) delete arg2;
41241   return Qnil;
41242 }
41243 
41244 
_wrap_Database_get_spelling_suggestion(int nargs,VALUE * args,VALUE self)41245 SWIGINTERN VALUE _wrap_Database_get_spelling_suggestion(int nargs, VALUE *args, VALUE self) {
41246   int argc;
41247   VALUE argv[4];
41248   int ii;
41249 
41250   argc = nargs + 1;
41251   argv[0] = self;
41252   if (argc > 4) SWIG_fail;
41253   for (ii = 1; (ii < argc); ++ii) {
41254     argv[ii] = args[ii-1];
41255   }
41256   if (argc == 2) {
41257     int _v;
41258     void *vptr = 0;
41259     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
41260     _v = SWIG_CheckState(res);
41261     if (_v) {
41262       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
41263       _v = SWIG_CheckState(res);
41264       if (_v) {
41265         return _wrap_Database_get_spelling_suggestion__SWIG_1(nargs, args, self);
41266       }
41267     }
41268   }
41269   if (argc == 3) {
41270     int _v;
41271     void *vptr = 0;
41272     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
41273     _v = SWIG_CheckState(res);
41274     if (_v) {
41275       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
41276       _v = SWIG_CheckState(res);
41277       if (_v) {
41278         {
41279           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
41280           _v = SWIG_CheckState(res);
41281         }
41282         if (_v) {
41283           return _wrap_Database_get_spelling_suggestion__SWIG_0(nargs, args, self);
41284         }
41285       }
41286     }
41287   }
41288 
41289 fail:
41290   Ruby_Format_OverloadedError( argc, 4, "Database.get_spelling_suggestion",
41291     "    std::string Database.get_spelling_suggestion(std::string const &word, unsigned int max_edit_distance)\n"
41292     "    std::string Database.get_spelling_suggestion(std::string const &word)\n");
41293 
41294   return Qnil;
41295 }
41296 
41297 
41298 SWIGINTERN VALUE
_wrap_Database__dangerous_spellings_begin(int argc,VALUE * argv,VALUE self)41299 _wrap_Database__dangerous_spellings_begin(int argc, VALUE *argv, VALUE self) {
41300   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
41301   void *argp1 = 0 ;
41302   int res1 = 0 ;
41303   Xapian::TermIterator result;
41304   VALUE vresult = Qnil;
41305 
41306   if ((argc < 0) || (argc > 0)) {
41307     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
41308   }
41309   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
41310   if (!SWIG_IsOK(res1)) {
41311     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","spellings_begin", 1, self ));
41312   }
41313   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
41314   {
41315     try {
41316       result = ((Xapian::Database const *)arg1)->spellings_begin();
41317     } catch (...) {
41318       string msg;
41319       int code = XapianExceptionHandler(msg);
41320       SWIG_exception(code, msg.c_str());
41321     }
41322   }
41323   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
41324   return vresult;
41325 fail:
41326   return Qnil;
41327 }
41328 
41329 
41330 SWIGINTERN VALUE
_wrap_Database__dangerous_spellings_end(int argc,VALUE * argv,VALUE self)41331 _wrap_Database__dangerous_spellings_end(int argc, VALUE *argv, VALUE self) {
41332   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
41333   void *argp1 = 0 ;
41334   int res1 = 0 ;
41335   Xapian::TermIterator result;
41336   VALUE vresult = Qnil;
41337 
41338   if ((argc < 0) || (argc > 0)) {
41339     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
41340   }
41341   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
41342   if (!SWIG_IsOK(res1)) {
41343     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","spellings_end", 1, self ));
41344   }
41345   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
41346   result = ((Xapian::Database const *)arg1)->spellings_end();
41347   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
41348   return vresult;
41349 fail:
41350   return Qnil;
41351 }
41352 
41353 
41354 SWIGINTERN VALUE
_wrap_Database__dangerous_synonyms_begin(int argc,VALUE * argv,VALUE self)41355 _wrap_Database__dangerous_synonyms_begin(int argc, VALUE *argv, VALUE self) {
41356   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
41357   std::string *arg2 = 0 ;
41358   void *argp1 = 0 ;
41359   int res1 = 0 ;
41360   int res2 = SWIG_OLDOBJ ;
41361   Xapian::TermIterator result;
41362   VALUE vresult = Qnil;
41363 
41364   if ((argc < 1) || (argc > 1)) {
41365     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
41366   }
41367   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
41368   if (!SWIG_IsOK(res1)) {
41369     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","synonyms_begin", 1, self ));
41370   }
41371   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
41372   {
41373     std::string *ptr = (std::string *)0;
41374     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
41375     if (!SWIG_IsOK(res2)) {
41376       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","synonyms_begin", 2, argv[0] ));
41377     }
41378     if (!ptr) {
41379       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","synonyms_begin", 2, argv[0]));
41380     }
41381     arg2 = ptr;
41382   }
41383   {
41384     try {
41385       result = ((Xapian::Database const *)arg1)->synonyms_begin((std::string const &)*arg2);
41386     } catch (...) {
41387       string msg;
41388       int code = XapianExceptionHandler(msg);
41389       SWIG_exception(code, msg.c_str());
41390     }
41391   }
41392   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
41393   if (SWIG_IsNewObj(res2)) delete arg2;
41394   return vresult;
41395 fail:
41396   if (SWIG_IsNewObj(res2)) delete arg2;
41397   return Qnil;
41398 }
41399 
41400 
41401 SWIGINTERN VALUE
_wrap_Database__dangerous_synonyms_end(int argc,VALUE * argv,VALUE self)41402 _wrap_Database__dangerous_synonyms_end(int argc, VALUE *argv, VALUE self) {
41403   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
41404   std::string *arg2 = 0 ;
41405   void *argp1 = 0 ;
41406   int res1 = 0 ;
41407   int res2 = SWIG_OLDOBJ ;
41408   Xapian::TermIterator result;
41409   VALUE vresult = Qnil;
41410 
41411   if ((argc < 1) || (argc > 1)) {
41412     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
41413   }
41414   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
41415   if (!SWIG_IsOK(res1)) {
41416     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","synonyms_end", 1, self ));
41417   }
41418   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
41419   {
41420     std::string *ptr = (std::string *)0;
41421     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
41422     if (!SWIG_IsOK(res2)) {
41423       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","synonyms_end", 2, argv[0] ));
41424     }
41425     if (!ptr) {
41426       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","synonyms_end", 2, argv[0]));
41427     }
41428     arg2 = ptr;
41429   }
41430   result = ((Xapian::Database const *)arg1)->synonyms_end((std::string const &)*arg2);
41431   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
41432   if (SWIG_IsNewObj(res2)) delete arg2;
41433   return vresult;
41434 fail:
41435   if (SWIG_IsNewObj(res2)) delete arg2;
41436   return Qnil;
41437 }
41438 
41439 
41440 SWIGINTERN VALUE
_wrap_Database__dangerous_synonym_keys_begin__SWIG_0(int argc,VALUE * argv,VALUE self)41441 _wrap_Database__dangerous_synonym_keys_begin__SWIG_0(int argc, VALUE *argv, VALUE self) {
41442   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
41443   std::string *arg2 = 0 ;
41444   void *argp1 = 0 ;
41445   int res1 = 0 ;
41446   int res2 = SWIG_OLDOBJ ;
41447   Xapian::TermIterator result;
41448   VALUE vresult = Qnil;
41449 
41450   if ((argc < 1) || (argc > 1)) {
41451     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
41452   }
41453   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
41454   if (!SWIG_IsOK(res1)) {
41455     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","synonym_keys_begin", 1, self ));
41456   }
41457   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
41458   {
41459     std::string *ptr = (std::string *)0;
41460     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
41461     if (!SWIG_IsOK(res2)) {
41462       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","synonym_keys_begin", 2, argv[0] ));
41463     }
41464     if (!ptr) {
41465       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","synonym_keys_begin", 2, argv[0]));
41466     }
41467     arg2 = ptr;
41468   }
41469   {
41470     try {
41471       result = ((Xapian::Database const *)arg1)->synonym_keys_begin((std::string const &)*arg2);
41472     } catch (...) {
41473       string msg;
41474       int code = XapianExceptionHandler(msg);
41475       SWIG_exception(code, msg.c_str());
41476     }
41477   }
41478   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
41479   if (SWIG_IsNewObj(res2)) delete arg2;
41480   return vresult;
41481 fail:
41482   if (SWIG_IsNewObj(res2)) delete arg2;
41483   return Qnil;
41484 }
41485 
41486 
41487 SWIGINTERN VALUE
_wrap_Database__dangerous_synonym_keys_begin__SWIG_1(int argc,VALUE * argv,VALUE self)41488 _wrap_Database__dangerous_synonym_keys_begin__SWIG_1(int argc, VALUE *argv, VALUE self) {
41489   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
41490   void *argp1 = 0 ;
41491   int res1 = 0 ;
41492   Xapian::TermIterator result;
41493   VALUE vresult = Qnil;
41494 
41495   if ((argc < 0) || (argc > 0)) {
41496     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
41497   }
41498   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
41499   if (!SWIG_IsOK(res1)) {
41500     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","synonym_keys_begin", 1, self ));
41501   }
41502   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
41503   {
41504     try {
41505       result = ((Xapian::Database const *)arg1)->synonym_keys_begin();
41506     } catch (...) {
41507       string msg;
41508       int code = XapianExceptionHandler(msg);
41509       SWIG_exception(code, msg.c_str());
41510     }
41511   }
41512   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
41513   return vresult;
41514 fail:
41515   return Qnil;
41516 }
41517 
41518 
_wrap_Database__dangerous_synonym_keys_begin(int nargs,VALUE * args,VALUE self)41519 SWIGINTERN VALUE _wrap_Database__dangerous_synonym_keys_begin(int nargs, VALUE *args, VALUE self) {
41520   int argc;
41521   VALUE argv[3];
41522   int ii;
41523 
41524   argc = nargs + 1;
41525   argv[0] = self;
41526   if (argc > 3) SWIG_fail;
41527   for (ii = 1; (ii < argc); ++ii) {
41528     argv[ii] = args[ii-1];
41529   }
41530   if (argc == 1) {
41531     int _v;
41532     void *vptr = 0;
41533     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
41534     _v = SWIG_CheckState(res);
41535     if (_v) {
41536       return _wrap_Database__dangerous_synonym_keys_begin__SWIG_1(nargs, args, self);
41537     }
41538   }
41539   if (argc == 2) {
41540     int _v;
41541     void *vptr = 0;
41542     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
41543     _v = SWIG_CheckState(res);
41544     if (_v) {
41545       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
41546       _v = SWIG_CheckState(res);
41547       if (_v) {
41548         return _wrap_Database__dangerous_synonym_keys_begin__SWIG_0(nargs, args, self);
41549       }
41550     }
41551   }
41552 
41553 fail:
41554   Ruby_Format_OverloadedError( argc, 3, "Database._dangerous_synonym_keys_begin",
41555     "    Xapian::TermIterator Database._dangerous_synonym_keys_begin(std::string const &prefix)\n"
41556     "    Xapian::TermIterator Database._dangerous_synonym_keys_begin()\n");
41557 
41558   return Qnil;
41559 }
41560 
41561 
41562 SWIGINTERN VALUE
_wrap_Database__dangerous_synonym_keys_end__SWIG_0(int argc,VALUE * argv,VALUE self)41563 _wrap_Database__dangerous_synonym_keys_end__SWIG_0(int argc, VALUE *argv, VALUE self) {
41564   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
41565   std::string *arg2 = 0 ;
41566   void *argp1 = 0 ;
41567   int res1 = 0 ;
41568   int res2 = SWIG_OLDOBJ ;
41569   Xapian::TermIterator result;
41570   VALUE vresult = Qnil;
41571 
41572   if ((argc < 1) || (argc > 1)) {
41573     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
41574   }
41575   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
41576   if (!SWIG_IsOK(res1)) {
41577     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","synonym_keys_end", 1, self ));
41578   }
41579   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
41580   {
41581     std::string *ptr = (std::string *)0;
41582     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
41583     if (!SWIG_IsOK(res2)) {
41584       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","synonym_keys_end", 2, argv[0] ));
41585     }
41586     if (!ptr) {
41587       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","synonym_keys_end", 2, argv[0]));
41588     }
41589     arg2 = ptr;
41590   }
41591   result = ((Xapian::Database const *)arg1)->synonym_keys_end((std::string const &)*arg2);
41592   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
41593   if (SWIG_IsNewObj(res2)) delete arg2;
41594   return vresult;
41595 fail:
41596   if (SWIG_IsNewObj(res2)) delete arg2;
41597   return Qnil;
41598 }
41599 
41600 
41601 SWIGINTERN VALUE
_wrap_Database__dangerous_synonym_keys_end__SWIG_1(int argc,VALUE * argv,VALUE self)41602 _wrap_Database__dangerous_synonym_keys_end__SWIG_1(int argc, VALUE *argv, VALUE self) {
41603   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
41604   void *argp1 = 0 ;
41605   int res1 = 0 ;
41606   Xapian::TermIterator result;
41607   VALUE vresult = Qnil;
41608 
41609   if ((argc < 0) || (argc > 0)) {
41610     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
41611   }
41612   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
41613   if (!SWIG_IsOK(res1)) {
41614     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","synonym_keys_end", 1, self ));
41615   }
41616   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
41617   result = ((Xapian::Database const *)arg1)->synonym_keys_end();
41618   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
41619   return vresult;
41620 fail:
41621   return Qnil;
41622 }
41623 
41624 
_wrap_Database__dangerous_synonym_keys_end(int nargs,VALUE * args,VALUE self)41625 SWIGINTERN VALUE _wrap_Database__dangerous_synonym_keys_end(int nargs, VALUE *args, VALUE self) {
41626   int argc;
41627   VALUE argv[3];
41628   int ii;
41629 
41630   argc = nargs + 1;
41631   argv[0] = self;
41632   if (argc > 3) SWIG_fail;
41633   for (ii = 1; (ii < argc); ++ii) {
41634     argv[ii] = args[ii-1];
41635   }
41636   if (argc == 1) {
41637     int _v;
41638     void *vptr = 0;
41639     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
41640     _v = SWIG_CheckState(res);
41641     if (_v) {
41642       return _wrap_Database__dangerous_synonym_keys_end__SWIG_1(nargs, args, self);
41643     }
41644   }
41645   if (argc == 2) {
41646     int _v;
41647     void *vptr = 0;
41648     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
41649     _v = SWIG_CheckState(res);
41650     if (_v) {
41651       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
41652       _v = SWIG_CheckState(res);
41653       if (_v) {
41654         return _wrap_Database__dangerous_synonym_keys_end__SWIG_0(nargs, args, self);
41655       }
41656     }
41657   }
41658 
41659 fail:
41660   Ruby_Format_OverloadedError( argc, 3, "Database._dangerous_synonym_keys_end",
41661     "    Xapian::TermIterator Database._dangerous_synonym_keys_end(std::string const &)\n"
41662     "    Xapian::TermIterator Database._dangerous_synonym_keys_end()\n");
41663 
41664   return Qnil;
41665 }
41666 
41667 
41668 SWIGINTERN VALUE
_wrap_Database_get_metadata(int argc,VALUE * argv,VALUE self)41669 _wrap_Database_get_metadata(int argc, VALUE *argv, VALUE self) {
41670   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
41671   std::string *arg2 = 0 ;
41672   void *argp1 = 0 ;
41673   int res1 = 0 ;
41674   int res2 = SWIG_OLDOBJ ;
41675   std::string result;
41676   VALUE vresult = Qnil;
41677 
41678   if ((argc < 1) || (argc > 1)) {
41679     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
41680   }
41681   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
41682   if (!SWIG_IsOK(res1)) {
41683     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_metadata", 1, self ));
41684   }
41685   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
41686   {
41687     std::string *ptr = (std::string *)0;
41688     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
41689     if (!SWIG_IsOK(res2)) {
41690       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","get_metadata", 2, argv[0] ));
41691     }
41692     if (!ptr) {
41693       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","get_metadata", 2, argv[0]));
41694     }
41695     arg2 = ptr;
41696   }
41697   {
41698     try {
41699       result = ((Xapian::Database const *)arg1)->get_metadata((std::string const &)*arg2);
41700     } catch (...) {
41701       string msg;
41702       int code = XapianExceptionHandler(msg);
41703       SWIG_exception(code, msg.c_str());
41704     }
41705   }
41706   vresult = SWIG_From_std_string(static_cast< std::string >(result));
41707   if (SWIG_IsNewObj(res2)) delete arg2;
41708   return vresult;
41709 fail:
41710   if (SWIG_IsNewObj(res2)) delete arg2;
41711   return Qnil;
41712 }
41713 
41714 
41715 SWIGINTERN VALUE
_wrap_Database__dangerous_metadata_keys_begin__SWIG_0(int argc,VALUE * argv,VALUE self)41716 _wrap_Database__dangerous_metadata_keys_begin__SWIG_0(int argc, VALUE *argv, VALUE self) {
41717   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
41718   std::string *arg2 = 0 ;
41719   void *argp1 = 0 ;
41720   int res1 = 0 ;
41721   int res2 = SWIG_OLDOBJ ;
41722   Xapian::TermIterator result;
41723   VALUE vresult = Qnil;
41724 
41725   if ((argc < 1) || (argc > 1)) {
41726     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
41727   }
41728   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
41729   if (!SWIG_IsOK(res1)) {
41730     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","metadata_keys_begin", 1, self ));
41731   }
41732   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
41733   {
41734     std::string *ptr = (std::string *)0;
41735     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
41736     if (!SWIG_IsOK(res2)) {
41737       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","metadata_keys_begin", 2, argv[0] ));
41738     }
41739     if (!ptr) {
41740       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","metadata_keys_begin", 2, argv[0]));
41741     }
41742     arg2 = ptr;
41743   }
41744   {
41745     try {
41746       result = ((Xapian::Database const *)arg1)->metadata_keys_begin((std::string const &)*arg2);
41747     } catch (...) {
41748       string msg;
41749       int code = XapianExceptionHandler(msg);
41750       SWIG_exception(code, msg.c_str());
41751     }
41752   }
41753   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
41754   if (SWIG_IsNewObj(res2)) delete arg2;
41755   return vresult;
41756 fail:
41757   if (SWIG_IsNewObj(res2)) delete arg2;
41758   return Qnil;
41759 }
41760 
41761 
41762 SWIGINTERN VALUE
_wrap_Database__dangerous_metadata_keys_begin__SWIG_1(int argc,VALUE * argv,VALUE self)41763 _wrap_Database__dangerous_metadata_keys_begin__SWIG_1(int argc, VALUE *argv, VALUE self) {
41764   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
41765   void *argp1 = 0 ;
41766   int res1 = 0 ;
41767   Xapian::TermIterator result;
41768   VALUE vresult = Qnil;
41769 
41770   if ((argc < 0) || (argc > 0)) {
41771     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
41772   }
41773   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
41774   if (!SWIG_IsOK(res1)) {
41775     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","metadata_keys_begin", 1, self ));
41776   }
41777   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
41778   {
41779     try {
41780       result = ((Xapian::Database const *)arg1)->metadata_keys_begin();
41781     } catch (...) {
41782       string msg;
41783       int code = XapianExceptionHandler(msg);
41784       SWIG_exception(code, msg.c_str());
41785     }
41786   }
41787   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
41788   return vresult;
41789 fail:
41790   return Qnil;
41791 }
41792 
41793 
_wrap_Database__dangerous_metadata_keys_begin(int nargs,VALUE * args,VALUE self)41794 SWIGINTERN VALUE _wrap_Database__dangerous_metadata_keys_begin(int nargs, VALUE *args, VALUE self) {
41795   int argc;
41796   VALUE argv[3];
41797   int ii;
41798 
41799   argc = nargs + 1;
41800   argv[0] = self;
41801   if (argc > 3) SWIG_fail;
41802   for (ii = 1; (ii < argc); ++ii) {
41803     argv[ii] = args[ii-1];
41804   }
41805   if (argc == 1) {
41806     int _v;
41807     void *vptr = 0;
41808     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
41809     _v = SWIG_CheckState(res);
41810     if (_v) {
41811       return _wrap_Database__dangerous_metadata_keys_begin__SWIG_1(nargs, args, self);
41812     }
41813   }
41814   if (argc == 2) {
41815     int _v;
41816     void *vptr = 0;
41817     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
41818     _v = SWIG_CheckState(res);
41819     if (_v) {
41820       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
41821       _v = SWIG_CheckState(res);
41822       if (_v) {
41823         return _wrap_Database__dangerous_metadata_keys_begin__SWIG_0(nargs, args, self);
41824       }
41825     }
41826   }
41827 
41828 fail:
41829   Ruby_Format_OverloadedError( argc, 3, "Database._dangerous_metadata_keys_begin",
41830     "    Xapian::TermIterator Database._dangerous_metadata_keys_begin(std::string const &prefix)\n"
41831     "    Xapian::TermIterator Database._dangerous_metadata_keys_begin()\n");
41832 
41833   return Qnil;
41834 }
41835 
41836 
41837 SWIGINTERN VALUE
_wrap_Database__dangerous_metadata_keys_end__SWIG_0(int argc,VALUE * argv,VALUE self)41838 _wrap_Database__dangerous_metadata_keys_end__SWIG_0(int argc, VALUE *argv, VALUE self) {
41839   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
41840   std::string *arg2 = 0 ;
41841   void *argp1 = 0 ;
41842   int res1 = 0 ;
41843   int res2 = SWIG_OLDOBJ ;
41844   Xapian::TermIterator result;
41845   VALUE vresult = Qnil;
41846 
41847   if ((argc < 1) || (argc > 1)) {
41848     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
41849   }
41850   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
41851   if (!SWIG_IsOK(res1)) {
41852     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","metadata_keys_end", 1, self ));
41853   }
41854   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
41855   {
41856     std::string *ptr = (std::string *)0;
41857     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
41858     if (!SWIG_IsOK(res2)) {
41859       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","metadata_keys_end", 2, argv[0] ));
41860     }
41861     if (!ptr) {
41862       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","metadata_keys_end", 2, argv[0]));
41863     }
41864     arg2 = ptr;
41865   }
41866   result = ((Xapian::Database const *)arg1)->metadata_keys_end((std::string const &)*arg2);
41867   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
41868   if (SWIG_IsNewObj(res2)) delete arg2;
41869   return vresult;
41870 fail:
41871   if (SWIG_IsNewObj(res2)) delete arg2;
41872   return Qnil;
41873 }
41874 
41875 
41876 SWIGINTERN VALUE
_wrap_Database__dangerous_metadata_keys_end__SWIG_1(int argc,VALUE * argv,VALUE self)41877 _wrap_Database__dangerous_metadata_keys_end__SWIG_1(int argc, VALUE *argv, VALUE self) {
41878   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
41879   void *argp1 = 0 ;
41880   int res1 = 0 ;
41881   Xapian::TermIterator result;
41882   VALUE vresult = Qnil;
41883 
41884   if ((argc < 0) || (argc > 0)) {
41885     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
41886   }
41887   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
41888   if (!SWIG_IsOK(res1)) {
41889     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","metadata_keys_end", 1, self ));
41890   }
41891   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
41892   result = ((Xapian::Database const *)arg1)->metadata_keys_end();
41893   vresult = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
41894   return vresult;
41895 fail:
41896   return Qnil;
41897 }
41898 
41899 
_wrap_Database__dangerous_metadata_keys_end(int nargs,VALUE * args,VALUE self)41900 SWIGINTERN VALUE _wrap_Database__dangerous_metadata_keys_end(int nargs, VALUE *args, VALUE self) {
41901   int argc;
41902   VALUE argv[3];
41903   int ii;
41904 
41905   argc = nargs + 1;
41906   argv[0] = self;
41907   if (argc > 3) SWIG_fail;
41908   for (ii = 1; (ii < argc); ++ii) {
41909     argv[ii] = args[ii-1];
41910   }
41911   if (argc == 1) {
41912     int _v;
41913     void *vptr = 0;
41914     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
41915     _v = SWIG_CheckState(res);
41916     if (_v) {
41917       return _wrap_Database__dangerous_metadata_keys_end__SWIG_1(nargs, args, self);
41918     }
41919   }
41920   if (argc == 2) {
41921     int _v;
41922     void *vptr = 0;
41923     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
41924     _v = SWIG_CheckState(res);
41925     if (_v) {
41926       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
41927       _v = SWIG_CheckState(res);
41928       if (_v) {
41929         return _wrap_Database__dangerous_metadata_keys_end__SWIG_0(nargs, args, self);
41930       }
41931     }
41932   }
41933 
41934 fail:
41935   Ruby_Format_OverloadedError( argc, 3, "Database._dangerous_metadata_keys_end",
41936     "    Xapian::TermIterator Database._dangerous_metadata_keys_end(std::string const &)\n"
41937     "    Xapian::TermIterator Database._dangerous_metadata_keys_end()\n");
41938 
41939   return Qnil;
41940 }
41941 
41942 
41943 SWIGINTERN VALUE
_wrap_Database_get_uuid(int argc,VALUE * argv,VALUE self)41944 _wrap_Database_get_uuid(int argc, VALUE *argv, VALUE self) {
41945   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
41946   void *argp1 = 0 ;
41947   int res1 = 0 ;
41948   std::string result;
41949   VALUE vresult = Qnil;
41950 
41951   if ((argc < 0) || (argc > 0)) {
41952     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
41953   }
41954   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
41955   if (!SWIG_IsOK(res1)) {
41956     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_uuid", 1, self ));
41957   }
41958   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
41959   {
41960     try {
41961       result = ((Xapian::Database const *)arg1)->get_uuid();
41962     } catch (...) {
41963       string msg;
41964       int code = XapianExceptionHandler(msg);
41965       SWIG_exception(code, msg.c_str());
41966     }
41967   }
41968   vresult = SWIG_From_std_string(static_cast< std::string >(result));
41969   return vresult;
41970 fail:
41971   return Qnil;
41972 }
41973 
41974 
41975 SWIGINTERN VALUE
_wrap_Database_locked(int argc,VALUE * argv,VALUE self)41976 _wrap_Database_locked(int argc, VALUE *argv, VALUE self) {
41977   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
41978   void *argp1 = 0 ;
41979   int res1 = 0 ;
41980   bool result;
41981   VALUE vresult = Qnil;
41982 
41983   if ((argc < 0) || (argc > 0)) {
41984     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
41985   }
41986   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
41987   if (!SWIG_IsOK(res1)) {
41988     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","locked", 1, self ));
41989   }
41990   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
41991   {
41992     try {
41993       result = (bool)((Xapian::Database const *)arg1)->locked();
41994     } catch (...) {
41995       string msg;
41996       int code = XapianExceptionHandler(msg);
41997       SWIG_exception(code, msg.c_str());
41998     }
41999   }
42000   vresult = SWIG_From_bool(static_cast< bool >(result));
42001   return vresult;
42002 fail:
42003   return Qnil;
42004 }
42005 
42006 
42007 SWIGINTERN VALUE
_wrap_Database_get_revision(int argc,VALUE * argv,VALUE self)42008 _wrap_Database_get_revision(int argc, VALUE *argv, VALUE self) {
42009   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
42010   void *argp1 = 0 ;
42011   int res1 = 0 ;
42012   Xapian::rev result;
42013   VALUE vresult = Qnil;
42014 
42015   if ((argc < 0) || (argc > 0)) {
42016     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
42017   }
42018   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
42019   if (!SWIG_IsOK(res1)) {
42020     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database const *","get_revision", 1, self ));
42021   }
42022   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
42023   {
42024     try {
42025       result = (Xapian::rev)((Xapian::Database const *)arg1)->get_revision();
42026     } catch (...) {
42027       string msg;
42028       int code = XapianExceptionHandler(msg);
42029       SWIG_exception(code, msg.c_str());
42030     }
42031   }
42032   vresult = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
42033   return vresult;
42034 fail:
42035   return Qnil;
42036 }
42037 
42038 
42039 SWIGINTERN VALUE
_wrap_Database_check__SWIG_0(int argc,VALUE * argv,VALUE self)42040 _wrap_Database_check__SWIG_0(int argc, VALUE *argv, VALUE self) {
42041   std::string *arg1 = 0 ;
42042   int arg2 ;
42043   int res1 = SWIG_OLDOBJ ;
42044   int val2 ;
42045   int ecode2 = 0 ;
42046   size_t result;
42047   VALUE vresult = Qnil;
42048 
42049   if ((argc < 2) || (argc > 2)) {
42050     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
42051   }
42052   {
42053     std::string *ptr = (std::string *)0;
42054     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
42055     if (!SWIG_IsOK(res1)) {
42056       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Database::check", 1, argv[0] ));
42057     }
42058     if (!ptr) {
42059       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Database::check", 1, argv[0]));
42060     }
42061     arg1 = ptr;
42062   }
42063   ecode2 = SWIG_AsVal_int(argv[1], &val2);
42064   if (!SWIG_IsOK(ecode2)) {
42065     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Xapian::Database::check", 2, argv[1] ));
42066   }
42067   arg2 = static_cast< int >(val2);
42068   {
42069     try {
42070       result = Xapian::Database::check((std::string const &)*arg1,arg2);
42071     } catch (...) {
42072       string msg;
42073       int code = XapianExceptionHandler(msg);
42074       SWIG_exception(code, msg.c_str());
42075     }
42076   }
42077   vresult = SWIG_From_size_t(static_cast< size_t >(result));
42078   if (SWIG_IsNewObj(res1)) delete arg1;
42079   return vresult;
42080 fail:
42081   if (SWIG_IsNewObj(res1)) delete arg1;
42082   return Qnil;
42083 }
42084 
42085 
42086 SWIGINTERN VALUE
_wrap_Database_check__SWIG_1(int argc,VALUE * argv,VALUE self)42087 _wrap_Database_check__SWIG_1(int argc, VALUE *argv, VALUE self) {
42088   std::string *arg1 = 0 ;
42089   int res1 = SWIG_OLDOBJ ;
42090   size_t result;
42091   VALUE vresult = Qnil;
42092 
42093   if ((argc < 1) || (argc > 1)) {
42094     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
42095   }
42096   {
42097     std::string *ptr = (std::string *)0;
42098     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
42099     if (!SWIG_IsOK(res1)) {
42100       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Database::check", 1, argv[0] ));
42101     }
42102     if (!ptr) {
42103       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Database::check", 1, argv[0]));
42104     }
42105     arg1 = ptr;
42106   }
42107   {
42108     try {
42109       result = Xapian::Database::check((std::string const &)*arg1);
42110     } catch (...) {
42111       string msg;
42112       int code = XapianExceptionHandler(msg);
42113       SWIG_exception(code, msg.c_str());
42114     }
42115   }
42116   vresult = SWIG_From_size_t(static_cast< size_t >(result));
42117   if (SWIG_IsNewObj(res1)) delete arg1;
42118   return vresult;
42119 fail:
42120   if (SWIG_IsNewObj(res1)) delete arg1;
42121   return Qnil;
42122 }
42123 
42124 
42125 SWIGINTERN VALUE
_wrap_Database_check__SWIG_2(int argc,VALUE * argv,VALUE self)42126 _wrap_Database_check__SWIG_2(int argc, VALUE *argv, VALUE self) {
42127   int arg1 ;
42128   int arg2 ;
42129   int val1 ;
42130   int ecode1 = 0 ;
42131   int val2 ;
42132   int ecode2 = 0 ;
42133   size_t result;
42134   VALUE vresult = Qnil;
42135 
42136   if ((argc < 2) || (argc > 2)) {
42137     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
42138   }
42139   ecode1 = SWIG_AsVal_int(argv[0], &val1);
42140   if (!SWIG_IsOK(ecode1)) {
42141     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Xapian::Database::check", 1, argv[0] ));
42142   }
42143   arg1 = static_cast< int >(val1);
42144   ecode2 = SWIG_AsVal_int(argv[1], &val2);
42145   if (!SWIG_IsOK(ecode2)) {
42146     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Xapian::Database::check", 2, argv[1] ));
42147   }
42148   arg2 = static_cast< int >(val2);
42149   {
42150     try {
42151       result = Xapian::Database::check(arg1,arg2);
42152     } catch (...) {
42153       string msg;
42154       int code = XapianExceptionHandler(msg);
42155       SWIG_exception(code, msg.c_str());
42156     }
42157   }
42158   vresult = SWIG_From_size_t(static_cast< size_t >(result));
42159   return vresult;
42160 fail:
42161   return Qnil;
42162 }
42163 
42164 
42165 SWIGINTERN VALUE
_wrap_Database_check__SWIG_3(int argc,VALUE * argv,VALUE self)42166 _wrap_Database_check__SWIG_3(int argc, VALUE *argv, VALUE self) {
42167   int arg1 ;
42168   int val1 ;
42169   int ecode1 = 0 ;
42170   size_t result;
42171   VALUE vresult = Qnil;
42172 
42173   if ((argc < 1) || (argc > 1)) {
42174     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
42175   }
42176   ecode1 = SWIG_AsVal_int(argv[0], &val1);
42177   if (!SWIG_IsOK(ecode1)) {
42178     SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Xapian::Database::check", 1, argv[0] ));
42179   }
42180   arg1 = static_cast< int >(val1);
42181   {
42182     try {
42183       result = Xapian::Database::check(arg1);
42184     } catch (...) {
42185       string msg;
42186       int code = XapianExceptionHandler(msg);
42187       SWIG_exception(code, msg.c_str());
42188     }
42189   }
42190   vresult = SWIG_From_size_t(static_cast< size_t >(result));
42191   return vresult;
42192 fail:
42193   return Qnil;
42194 }
42195 
42196 
_wrap_Database_check(int nargs,VALUE * args,VALUE self)42197 SWIGINTERN VALUE _wrap_Database_check(int nargs, VALUE *args, VALUE self) {
42198   int argc;
42199   VALUE argv[2];
42200   int ii;
42201 
42202   argc = nargs;
42203   if (argc > 2) SWIG_fail;
42204   for (ii = 0; (ii < argc); ++ii) {
42205     argv[ii] = args[ii];
42206   }
42207   if (argc == 1) {
42208     int _v;
42209     {
42210       int res = SWIG_AsVal_int(argv[0], NULL);
42211       _v = SWIG_CheckState(res);
42212     }
42213     if (_v) {
42214       return _wrap_Database_check__SWIG_3(nargs, args, self);
42215     }
42216   }
42217   if (argc == 1) {
42218     int _v;
42219     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
42220     _v = SWIG_CheckState(res);
42221     if (_v) {
42222       return _wrap_Database_check__SWIG_1(nargs, args, self);
42223     }
42224   }
42225   if (argc == 2) {
42226     int _v;
42227     {
42228       int res = SWIG_AsVal_int(argv[0], NULL);
42229       _v = SWIG_CheckState(res);
42230     }
42231     if (_v) {
42232       {
42233         int res = SWIG_AsVal_int(argv[1], NULL);
42234         _v = SWIG_CheckState(res);
42235       }
42236       if (_v) {
42237         return _wrap_Database_check__SWIG_2(nargs, args, self);
42238       }
42239     }
42240   }
42241   if (argc == 2) {
42242     int _v;
42243     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
42244     _v = SWIG_CheckState(res);
42245     if (_v) {
42246       {
42247         int res = SWIG_AsVal_int(argv[1], NULL);
42248         _v = SWIG_CheckState(res);
42249       }
42250       if (_v) {
42251         return _wrap_Database_check__SWIG_0(nargs, args, self);
42252       }
42253     }
42254   }
42255 
42256 fail:
42257   Ruby_Format_OverloadedError( argc, 2, "Database.check",
42258     "    size_t Database.check(std::string const &path, int opts)\n"
42259     "    size_t Database.check(std::string const &path)\n"
42260     "    size_t Database.check(int fd, int opts)\n"
42261     "    size_t Database.check(int fd)\n");
42262 
42263   return Qnil;
42264 }
42265 
42266 
42267 SWIGINTERN VALUE
_wrap_Database_compact__SWIG_0(int argc,VALUE * argv,VALUE self)42268 _wrap_Database_compact__SWIG_0(int argc, VALUE *argv, VALUE self) {
42269   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
42270   std::string *arg2 = 0 ;
42271   unsigned int arg3 ;
42272   int arg4 ;
42273   void *argp1 = 0 ;
42274   int res1 = 0 ;
42275   int res2 = SWIG_OLDOBJ ;
42276   unsigned int val3 ;
42277   int ecode3 = 0 ;
42278   int val4 ;
42279   int ecode4 = 0 ;
42280 
42281   if ((argc < 3) || (argc > 3)) {
42282     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
42283   }
42284   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
42285   if (!SWIG_IsOK(res1)) {
42286     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database *","compact", 1, self ));
42287   }
42288   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
42289   {
42290     std::string *ptr = (std::string *)0;
42291     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
42292     if (!SWIG_IsOK(res2)) {
42293       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","compact", 2, argv[0] ));
42294     }
42295     if (!ptr) {
42296       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","compact", 2, argv[0]));
42297     }
42298     arg2 = ptr;
42299   }
42300   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
42301   if (!SWIG_IsOK(ecode3)) {
42302     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","compact", 3, argv[1] ));
42303   }
42304   arg3 = static_cast< unsigned int >(val3);
42305   ecode4 = SWIG_AsVal_int(argv[2], &val4);
42306   if (!SWIG_IsOK(ecode4)) {
42307     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","compact", 4, argv[2] ));
42308   }
42309   arg4 = static_cast< int >(val4);
42310   {
42311     try {
42312       (arg1)->compact((std::string const &)*arg2,arg3,arg4);
42313     } catch (...) {
42314       string msg;
42315       int code = XapianExceptionHandler(msg);
42316       SWIG_exception(code, msg.c_str());
42317     }
42318   }
42319   if (SWIG_IsNewObj(res2)) delete arg2;
42320   return Qnil;
42321 fail:
42322   if (SWIG_IsNewObj(res2)) delete arg2;
42323   return Qnil;
42324 }
42325 
42326 
42327 SWIGINTERN VALUE
_wrap_Database_compact__SWIG_1(int argc,VALUE * argv,VALUE self)42328 _wrap_Database_compact__SWIG_1(int argc, VALUE *argv, VALUE self) {
42329   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
42330   std::string *arg2 = 0 ;
42331   unsigned int arg3 ;
42332   void *argp1 = 0 ;
42333   int res1 = 0 ;
42334   int res2 = SWIG_OLDOBJ ;
42335   unsigned int val3 ;
42336   int ecode3 = 0 ;
42337 
42338   if ((argc < 2) || (argc > 2)) {
42339     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
42340   }
42341   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
42342   if (!SWIG_IsOK(res1)) {
42343     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database *","compact", 1, self ));
42344   }
42345   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
42346   {
42347     std::string *ptr = (std::string *)0;
42348     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
42349     if (!SWIG_IsOK(res2)) {
42350       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","compact", 2, argv[0] ));
42351     }
42352     if (!ptr) {
42353       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","compact", 2, argv[0]));
42354     }
42355     arg2 = ptr;
42356   }
42357   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
42358   if (!SWIG_IsOK(ecode3)) {
42359     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","compact", 3, argv[1] ));
42360   }
42361   arg3 = static_cast< unsigned int >(val3);
42362   {
42363     try {
42364       (arg1)->compact((std::string const &)*arg2,arg3);
42365     } catch (...) {
42366       string msg;
42367       int code = XapianExceptionHandler(msg);
42368       SWIG_exception(code, msg.c_str());
42369     }
42370   }
42371   if (SWIG_IsNewObj(res2)) delete arg2;
42372   return Qnil;
42373 fail:
42374   if (SWIG_IsNewObj(res2)) delete arg2;
42375   return Qnil;
42376 }
42377 
42378 
42379 SWIGINTERN VALUE
_wrap_Database_compact__SWIG_2(int argc,VALUE * argv,VALUE self)42380 _wrap_Database_compact__SWIG_2(int argc, VALUE *argv, VALUE self) {
42381   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
42382   std::string *arg2 = 0 ;
42383   void *argp1 = 0 ;
42384   int res1 = 0 ;
42385   int res2 = SWIG_OLDOBJ ;
42386 
42387   if ((argc < 1) || (argc > 1)) {
42388     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
42389   }
42390   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
42391   if (!SWIG_IsOK(res1)) {
42392     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database *","compact", 1, self ));
42393   }
42394   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
42395   {
42396     std::string *ptr = (std::string *)0;
42397     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
42398     if (!SWIG_IsOK(res2)) {
42399       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","compact", 2, argv[0] ));
42400     }
42401     if (!ptr) {
42402       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","compact", 2, argv[0]));
42403     }
42404     arg2 = ptr;
42405   }
42406   {
42407     try {
42408       (arg1)->compact((std::string const &)*arg2);
42409     } catch (...) {
42410       string msg;
42411       int code = XapianExceptionHandler(msg);
42412       SWIG_exception(code, msg.c_str());
42413     }
42414   }
42415   if (SWIG_IsNewObj(res2)) delete arg2;
42416   return Qnil;
42417 fail:
42418   if (SWIG_IsNewObj(res2)) delete arg2;
42419   return Qnil;
42420 }
42421 
42422 
42423 SWIGINTERN VALUE
_wrap_Database_compact__SWIG_3(int argc,VALUE * argv,VALUE self)42424 _wrap_Database_compact__SWIG_3(int argc, VALUE *argv, VALUE self) {
42425   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
42426   int arg2 ;
42427   unsigned int arg3 ;
42428   int arg4 ;
42429   void *argp1 = 0 ;
42430   int res1 = 0 ;
42431   int val2 ;
42432   int ecode2 = 0 ;
42433   unsigned int val3 ;
42434   int ecode3 = 0 ;
42435   int val4 ;
42436   int ecode4 = 0 ;
42437 
42438   if ((argc < 3) || (argc > 3)) {
42439     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
42440   }
42441   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
42442   if (!SWIG_IsOK(res1)) {
42443     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database *","compact", 1, self ));
42444   }
42445   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
42446   ecode2 = SWIG_AsVal_int(argv[0], &val2);
42447   if (!SWIG_IsOK(ecode2)) {
42448     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","compact", 2, argv[0] ));
42449   }
42450   arg2 = static_cast< int >(val2);
42451   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
42452   if (!SWIG_IsOK(ecode3)) {
42453     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","compact", 3, argv[1] ));
42454   }
42455   arg3 = static_cast< unsigned int >(val3);
42456   ecode4 = SWIG_AsVal_int(argv[2], &val4);
42457   if (!SWIG_IsOK(ecode4)) {
42458     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","compact", 4, argv[2] ));
42459   }
42460   arg4 = static_cast< int >(val4);
42461   {
42462     try {
42463       (arg1)->compact(arg2,arg3,arg4);
42464     } catch (...) {
42465       string msg;
42466       int code = XapianExceptionHandler(msg);
42467       SWIG_exception(code, msg.c_str());
42468     }
42469   }
42470   return Qnil;
42471 fail:
42472   return Qnil;
42473 }
42474 
42475 
42476 SWIGINTERN VALUE
_wrap_Database_compact__SWIG_4(int argc,VALUE * argv,VALUE self)42477 _wrap_Database_compact__SWIG_4(int argc, VALUE *argv, VALUE self) {
42478   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
42479   int arg2 ;
42480   unsigned int arg3 ;
42481   void *argp1 = 0 ;
42482   int res1 = 0 ;
42483   int val2 ;
42484   int ecode2 = 0 ;
42485   unsigned int val3 ;
42486   int ecode3 = 0 ;
42487 
42488   if ((argc < 2) || (argc > 2)) {
42489     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
42490   }
42491   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
42492   if (!SWIG_IsOK(res1)) {
42493     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database *","compact", 1, self ));
42494   }
42495   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
42496   ecode2 = SWIG_AsVal_int(argv[0], &val2);
42497   if (!SWIG_IsOK(ecode2)) {
42498     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","compact", 2, argv[0] ));
42499   }
42500   arg2 = static_cast< int >(val2);
42501   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
42502   if (!SWIG_IsOK(ecode3)) {
42503     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","compact", 3, argv[1] ));
42504   }
42505   arg3 = static_cast< unsigned int >(val3);
42506   {
42507     try {
42508       (arg1)->compact(arg2,arg3);
42509     } catch (...) {
42510       string msg;
42511       int code = XapianExceptionHandler(msg);
42512       SWIG_exception(code, msg.c_str());
42513     }
42514   }
42515   return Qnil;
42516 fail:
42517   return Qnil;
42518 }
42519 
42520 
42521 SWIGINTERN VALUE
_wrap_Database_compact__SWIG_5(int argc,VALUE * argv,VALUE self)42522 _wrap_Database_compact__SWIG_5(int argc, VALUE *argv, VALUE self) {
42523   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
42524   int arg2 ;
42525   void *argp1 = 0 ;
42526   int res1 = 0 ;
42527   int val2 ;
42528   int ecode2 = 0 ;
42529 
42530   if ((argc < 1) || (argc > 1)) {
42531     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
42532   }
42533   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
42534   if (!SWIG_IsOK(res1)) {
42535     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database *","compact", 1, self ));
42536   }
42537   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
42538   ecode2 = SWIG_AsVal_int(argv[0], &val2);
42539   if (!SWIG_IsOK(ecode2)) {
42540     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","compact", 2, argv[0] ));
42541   }
42542   arg2 = static_cast< int >(val2);
42543   {
42544     try {
42545       (arg1)->compact(arg2);
42546     } catch (...) {
42547       string msg;
42548       int code = XapianExceptionHandler(msg);
42549       SWIG_exception(code, msg.c_str());
42550     }
42551   }
42552   return Qnil;
42553 fail:
42554   return Qnil;
42555 }
42556 
42557 
42558 SWIGINTERN VALUE
_wrap_Database_compact__SWIG_6(int argc,VALUE * argv,VALUE self)42559 _wrap_Database_compact__SWIG_6(int argc, VALUE *argv, VALUE self) {
42560   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
42561   std::string *arg2 = 0 ;
42562   unsigned int arg3 ;
42563   int arg4 ;
42564   Xapian::Compactor *arg5 = 0 ;
42565   void *argp1 = 0 ;
42566   int res1 = 0 ;
42567   int res2 = SWIG_OLDOBJ ;
42568   unsigned int val3 ;
42569   int ecode3 = 0 ;
42570   int val4 ;
42571   int ecode4 = 0 ;
42572   void *argp5 = 0 ;
42573   int res5 = 0 ;
42574 
42575   if ((argc < 4) || (argc > 4)) {
42576     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
42577   }
42578   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
42579   if (!SWIG_IsOK(res1)) {
42580     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database *","compact", 1, self ));
42581   }
42582   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
42583   {
42584     std::string *ptr = (std::string *)0;
42585     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
42586     if (!SWIG_IsOK(res2)) {
42587       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","compact", 2, argv[0] ));
42588     }
42589     if (!ptr) {
42590       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","compact", 2, argv[0]));
42591     }
42592     arg2 = ptr;
42593   }
42594   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
42595   if (!SWIG_IsOK(ecode3)) {
42596     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","compact", 3, argv[1] ));
42597   }
42598   arg3 = static_cast< unsigned int >(val3);
42599   ecode4 = SWIG_AsVal_int(argv[2], &val4);
42600   if (!SWIG_IsOK(ecode4)) {
42601     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","compact", 4, argv[2] ));
42602   }
42603   arg4 = static_cast< int >(val4);
42604   res5 = SWIG_ConvertPtr(argv[3], &argp5, SWIGTYPE_p_Xapian__Compactor,  0 );
42605   if (!SWIG_IsOK(res5)) {
42606     SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "Xapian::Compactor &","compact", 5, argv[3] ));
42607   }
42608   if (!argp5) {
42609     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Compactor &","compact", 5, argv[3]));
42610   }
42611   arg5 = reinterpret_cast< Xapian::Compactor * >(argp5);
42612   {
42613     try {
42614       (arg1)->compact((std::string const &)*arg2,arg3,arg4,*arg5);
42615     } catch (...) {
42616       string msg;
42617       int code = XapianExceptionHandler(msg);
42618       SWIG_exception(code, msg.c_str());
42619     }
42620   }
42621   if (SWIG_IsNewObj(res2)) delete arg2;
42622   return Qnil;
42623 fail:
42624   if (SWIG_IsNewObj(res2)) delete arg2;
42625   return Qnil;
42626 }
42627 
42628 
42629 SWIGINTERN VALUE
_wrap_Database_compact__SWIG_7(int argc,VALUE * argv,VALUE self)42630 _wrap_Database_compact__SWIG_7(int argc, VALUE *argv, VALUE self) {
42631   Xapian::Database *arg1 = (Xapian::Database *) 0 ;
42632   int arg2 ;
42633   unsigned int arg3 ;
42634   int arg4 ;
42635   Xapian::Compactor *arg5 = 0 ;
42636   void *argp1 = 0 ;
42637   int res1 = 0 ;
42638   int val2 ;
42639   int ecode2 = 0 ;
42640   unsigned int val3 ;
42641   int ecode3 = 0 ;
42642   int val4 ;
42643   int ecode4 = 0 ;
42644   void *argp5 = 0 ;
42645   int res5 = 0 ;
42646 
42647   if ((argc < 4) || (argc > 4)) {
42648     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
42649   }
42650   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
42651   if (!SWIG_IsOK(res1)) {
42652     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::Database *","compact", 1, self ));
42653   }
42654   arg1 = reinterpret_cast< Xapian::Database * >(argp1);
42655   ecode2 = SWIG_AsVal_int(argv[0], &val2);
42656   if (!SWIG_IsOK(ecode2)) {
42657     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","compact", 2, argv[0] ));
42658   }
42659   arg2 = static_cast< int >(val2);
42660   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
42661   if (!SWIG_IsOK(ecode3)) {
42662     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","compact", 3, argv[1] ));
42663   }
42664   arg3 = static_cast< unsigned int >(val3);
42665   ecode4 = SWIG_AsVal_int(argv[2], &val4);
42666   if (!SWIG_IsOK(ecode4)) {
42667     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","compact", 4, argv[2] ));
42668   }
42669   arg4 = static_cast< int >(val4);
42670   res5 = SWIG_ConvertPtr(argv[3], &argp5, SWIGTYPE_p_Xapian__Compactor,  0 );
42671   if (!SWIG_IsOK(res5)) {
42672     SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "Xapian::Compactor &","compact", 5, argv[3] ));
42673   }
42674   if (!argp5) {
42675     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Compactor &","compact", 5, argv[3]));
42676   }
42677   arg5 = reinterpret_cast< Xapian::Compactor * >(argp5);
42678   {
42679     try {
42680       (arg1)->compact(arg2,arg3,arg4,*arg5);
42681     } catch (...) {
42682       string msg;
42683       int code = XapianExceptionHandler(msg);
42684       SWIG_exception(code, msg.c_str());
42685     }
42686   }
42687   return Qnil;
42688 fail:
42689   return Qnil;
42690 }
42691 
42692 
_wrap_Database_compact(int nargs,VALUE * args,VALUE self)42693 SWIGINTERN VALUE _wrap_Database_compact(int nargs, VALUE *args, VALUE self) {
42694   int argc;
42695   VALUE argv[6];
42696   int ii;
42697 
42698   argc = nargs + 1;
42699   argv[0] = self;
42700   if (argc > 6) SWIG_fail;
42701   for (ii = 1; (ii < argc); ++ii) {
42702     argv[ii] = args[ii-1];
42703   }
42704   if (argc == 2) {
42705     int _v;
42706     void *vptr = 0;
42707     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
42708     _v = SWIG_CheckState(res);
42709     if (_v) {
42710       {
42711         int res = SWIG_AsVal_int(argv[1], NULL);
42712         _v = SWIG_CheckState(res);
42713       }
42714       if (_v) {
42715         return _wrap_Database_compact__SWIG_5(nargs, args, self);
42716       }
42717     }
42718   }
42719   if (argc == 2) {
42720     int _v;
42721     void *vptr = 0;
42722     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
42723     _v = SWIG_CheckState(res);
42724     if (_v) {
42725       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
42726       _v = SWIG_CheckState(res);
42727       if (_v) {
42728         return _wrap_Database_compact__SWIG_2(nargs, args, self);
42729       }
42730     }
42731   }
42732   if (argc == 3) {
42733     int _v;
42734     void *vptr = 0;
42735     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
42736     _v = SWIG_CheckState(res);
42737     if (_v) {
42738       {
42739         int res = SWIG_AsVal_int(argv[1], NULL);
42740         _v = SWIG_CheckState(res);
42741       }
42742       if (_v) {
42743         {
42744           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
42745           _v = SWIG_CheckState(res);
42746         }
42747         if (_v) {
42748           return _wrap_Database_compact__SWIG_4(nargs, args, self);
42749         }
42750       }
42751     }
42752   }
42753   if (argc == 3) {
42754     int _v;
42755     void *vptr = 0;
42756     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
42757     _v = SWIG_CheckState(res);
42758     if (_v) {
42759       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
42760       _v = SWIG_CheckState(res);
42761       if (_v) {
42762         {
42763           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
42764           _v = SWIG_CheckState(res);
42765         }
42766         if (_v) {
42767           return _wrap_Database_compact__SWIG_1(nargs, args, self);
42768         }
42769       }
42770     }
42771   }
42772   if (argc == 4) {
42773     int _v;
42774     void *vptr = 0;
42775     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
42776     _v = SWIG_CheckState(res);
42777     if (_v) {
42778       {
42779         int res = SWIG_AsVal_int(argv[1], NULL);
42780         _v = SWIG_CheckState(res);
42781       }
42782       if (_v) {
42783         {
42784           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
42785           _v = SWIG_CheckState(res);
42786         }
42787         if (_v) {
42788           {
42789             int res = SWIG_AsVal_int(argv[3], NULL);
42790             _v = SWIG_CheckState(res);
42791           }
42792           if (_v) {
42793             return _wrap_Database_compact__SWIG_3(nargs, args, self);
42794           }
42795         }
42796       }
42797     }
42798   }
42799   if (argc == 4) {
42800     int _v;
42801     void *vptr = 0;
42802     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
42803     _v = SWIG_CheckState(res);
42804     if (_v) {
42805       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
42806       _v = SWIG_CheckState(res);
42807       if (_v) {
42808         {
42809           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
42810           _v = SWIG_CheckState(res);
42811         }
42812         if (_v) {
42813           {
42814             int res = SWIG_AsVal_int(argv[3], NULL);
42815             _v = SWIG_CheckState(res);
42816           }
42817           if (_v) {
42818             return _wrap_Database_compact__SWIG_0(nargs, args, self);
42819           }
42820         }
42821       }
42822     }
42823   }
42824   if (argc == 5) {
42825     int _v;
42826     void *vptr = 0;
42827     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
42828     _v = SWIG_CheckState(res);
42829     if (_v) {
42830       {
42831         int res = SWIG_AsVal_int(argv[1], NULL);
42832         _v = SWIG_CheckState(res);
42833       }
42834       if (_v) {
42835         {
42836           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
42837           _v = SWIG_CheckState(res);
42838         }
42839         if (_v) {
42840           {
42841             int res = SWIG_AsVal_int(argv[3], NULL);
42842             _v = SWIG_CheckState(res);
42843           }
42844           if (_v) {
42845             void *vptr = 0;
42846             int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_Xapian__Compactor, 0);
42847             _v = SWIG_CheckState(res);
42848             if (_v) {
42849               return _wrap_Database_compact__SWIG_7(nargs, args, self);
42850             }
42851           }
42852         }
42853       }
42854     }
42855   }
42856   if (argc == 5) {
42857     int _v;
42858     void *vptr = 0;
42859     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
42860     _v = SWIG_CheckState(res);
42861     if (_v) {
42862       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
42863       _v = SWIG_CheckState(res);
42864       if (_v) {
42865         {
42866           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
42867           _v = SWIG_CheckState(res);
42868         }
42869         if (_v) {
42870           {
42871             int res = SWIG_AsVal_int(argv[3], NULL);
42872             _v = SWIG_CheckState(res);
42873           }
42874           if (_v) {
42875             void *vptr = 0;
42876             int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_Xapian__Compactor, 0);
42877             _v = SWIG_CheckState(res);
42878             if (_v) {
42879               return _wrap_Database_compact__SWIG_6(nargs, args, self);
42880             }
42881           }
42882         }
42883       }
42884     }
42885   }
42886 
42887 fail:
42888   Ruby_Format_OverloadedError( argc, 6, "Database.compact",
42889     "    void Database.compact(std::string const &output, unsigned int flags, int block_size)\n"
42890     "    void Database.compact(std::string const &output, unsigned int flags)\n"
42891     "    void Database.compact(std::string const &output)\n"
42892     "    void Database.compact(int fd, unsigned int flags, int block_size)\n"
42893     "    void Database.compact(int fd, unsigned int flags)\n"
42894     "    void Database.compact(int fd)\n"
42895     "    void Database.compact(std::string const &output, unsigned int flags, int block_size, Xapian::Compactor &compactor)\n"
42896     "    void Database.compact(int fd, unsigned int flags, int block_size, Xapian::Compactor &compactor)\n");
42897 
42898   return Qnil;
42899 }
42900 
42901 
42902 static swig_class SwigClassWritableDatabase;
42903 
42904 SWIGINTERN void
free_Xapian_WritableDatabase(void * self)42905 free_Xapian_WritableDatabase(void *self) {
42906     Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *)self;
42907     delete arg1;
42908 }
42909 
42910 SWIGINTERN VALUE
_wrap_new_WritableDatabase__SWIG_0(int argc,VALUE * argv,VALUE self)42911 _wrap_new_WritableDatabase__SWIG_0(int argc, VALUE *argv, VALUE self) {
42912   const char *classname SWIGUNUSED = "Xapian::WritableDatabase";
42913   Xapian::WritableDatabase *result = 0 ;
42914 
42915   if ((argc < 0) || (argc > 0)) {
42916     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
42917   }
42918   {
42919     try {
42920       result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase();
42921       DATA_PTR(self) = result;
42922     } catch (...) {
42923       string msg;
42924       int code = XapianExceptionHandler(msg);
42925       SWIG_exception(code, msg.c_str());
42926     }
42927   }
42928   return self;
42929 fail:
42930   return Qnil;
42931 }
42932 
42933 
42934 SWIGINTERN VALUE
_wrap_new_WritableDatabase__SWIG_1(int argc,VALUE * argv,VALUE self)42935 _wrap_new_WritableDatabase__SWIG_1(int argc, VALUE *argv, VALUE self) {
42936   std::string *arg1 = 0 ;
42937   int arg2 ;
42938   int arg3 ;
42939   int res1 = SWIG_OLDOBJ ;
42940   int val2 ;
42941   int ecode2 = 0 ;
42942   int val3 ;
42943   int ecode3 = 0 ;
42944   const char *classname SWIGUNUSED = "Xapian::WritableDatabase";
42945   Xapian::WritableDatabase *result = 0 ;
42946 
42947   if ((argc < 3) || (argc > 3)) {
42948     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
42949   }
42950   {
42951     std::string *ptr = (std::string *)0;
42952     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
42953     if (!SWIG_IsOK(res1)) {
42954       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","WritableDatabase", 1, argv[0] ));
42955     }
42956     if (!ptr) {
42957       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","WritableDatabase", 1, argv[0]));
42958     }
42959     arg1 = ptr;
42960   }
42961   ecode2 = SWIG_AsVal_int(argv[1], &val2);
42962   if (!SWIG_IsOK(ecode2)) {
42963     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","WritableDatabase", 2, argv[1] ));
42964   }
42965   arg2 = static_cast< int >(val2);
42966   ecode3 = SWIG_AsVal_int(argv[2], &val3);
42967   if (!SWIG_IsOK(ecode3)) {
42968     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","WritableDatabase", 3, argv[2] ));
42969   }
42970   arg3 = static_cast< int >(val3);
42971   {
42972     try {
42973       result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((std::string const &)*arg1,arg2,arg3);
42974       DATA_PTR(self) = result;
42975     } catch (...) {
42976       string msg;
42977       int code = XapianExceptionHandler(msg);
42978       SWIG_exception(code, msg.c_str());
42979     }
42980   }
42981   if (SWIG_IsNewObj(res1)) delete arg1;
42982   return self;
42983 fail:
42984   if (SWIG_IsNewObj(res1)) delete arg1;
42985   return Qnil;
42986 }
42987 
42988 
42989 SWIGINTERN VALUE
_wrap_new_WritableDatabase__SWIG_2(int argc,VALUE * argv,VALUE self)42990 _wrap_new_WritableDatabase__SWIG_2(int argc, VALUE *argv, VALUE self) {
42991   std::string *arg1 = 0 ;
42992   int arg2 ;
42993   int res1 = SWIG_OLDOBJ ;
42994   int val2 ;
42995   int ecode2 = 0 ;
42996   const char *classname SWIGUNUSED = "Xapian::WritableDatabase";
42997   Xapian::WritableDatabase *result = 0 ;
42998 
42999   if ((argc < 2) || (argc > 2)) {
43000     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
43001   }
43002   {
43003     std::string *ptr = (std::string *)0;
43004     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
43005     if (!SWIG_IsOK(res1)) {
43006       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","WritableDatabase", 1, argv[0] ));
43007     }
43008     if (!ptr) {
43009       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","WritableDatabase", 1, argv[0]));
43010     }
43011     arg1 = ptr;
43012   }
43013   ecode2 = SWIG_AsVal_int(argv[1], &val2);
43014   if (!SWIG_IsOK(ecode2)) {
43015     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","WritableDatabase", 2, argv[1] ));
43016   }
43017   arg2 = static_cast< int >(val2);
43018   {
43019     try {
43020       result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((std::string const &)*arg1,arg2);
43021       DATA_PTR(self) = result;
43022     } catch (...) {
43023       string msg;
43024       int code = XapianExceptionHandler(msg);
43025       SWIG_exception(code, msg.c_str());
43026     }
43027   }
43028   if (SWIG_IsNewObj(res1)) delete arg1;
43029   return self;
43030 fail:
43031   if (SWIG_IsNewObj(res1)) delete arg1;
43032   return Qnil;
43033 }
43034 
43035 
43036 SWIGINTERN VALUE
43037 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
_wrap_WritableDatabase_allocate(VALUE self)43038 _wrap_WritableDatabase_allocate(VALUE self)
43039 #else
43040 _wrap_WritableDatabase_allocate(int argc, VALUE *argv, VALUE self)
43041 #endif
43042 {
43043   VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Xapian__WritableDatabase);
43044 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
43045   rb_obj_call_init(vresult, argc, argv);
43046 #endif
43047   return vresult;
43048 }
43049 
43050 
43051 SWIGINTERN VALUE
_wrap_new_WritableDatabase__SWIG_3(int argc,VALUE * argv,VALUE self)43052 _wrap_new_WritableDatabase__SWIG_3(int argc, VALUE *argv, VALUE self) {
43053   std::string *arg1 = 0 ;
43054   int res1 = SWIG_OLDOBJ ;
43055   const char *classname SWIGUNUSED = "Xapian::WritableDatabase";
43056   Xapian::WritableDatabase *result = 0 ;
43057 
43058   if ((argc < 1) || (argc > 1)) {
43059     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
43060   }
43061   {
43062     std::string *ptr = (std::string *)0;
43063     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
43064     if (!SWIG_IsOK(res1)) {
43065       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","WritableDatabase", 1, argv[0] ));
43066     }
43067     if (!ptr) {
43068       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","WritableDatabase", 1, argv[0]));
43069     }
43070     arg1 = ptr;
43071   }
43072   {
43073     try {
43074       result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((std::string const &)*arg1);
43075       DATA_PTR(self) = result;
43076     } catch (...) {
43077       string msg;
43078       int code = XapianExceptionHandler(msg);
43079       SWIG_exception(code, msg.c_str());
43080     }
43081   }
43082   if (SWIG_IsNewObj(res1)) delete arg1;
43083   return self;
43084 fail:
43085   if (SWIG_IsNewObj(res1)) delete arg1;
43086   return Qnil;
43087 }
43088 
43089 
_wrap_new_WritableDatabase(int nargs,VALUE * args,VALUE self)43090 SWIGINTERN VALUE _wrap_new_WritableDatabase(int nargs, VALUE *args, VALUE self) {
43091   int argc;
43092   VALUE argv[3];
43093   int ii;
43094 
43095   argc = nargs;
43096   if (argc > 3) SWIG_fail;
43097   for (ii = 0; (ii < argc); ++ii) {
43098     argv[ii] = args[ii];
43099   }
43100   if (argc == 0) {
43101     return _wrap_new_WritableDatabase__SWIG_0(nargs, args, self);
43102   }
43103   if (argc == 1) {
43104     int _v;
43105     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
43106     _v = SWIG_CheckState(res);
43107     if (_v) {
43108       return _wrap_new_WritableDatabase__SWIG_3(nargs, args, self);
43109     }
43110   }
43111   if (argc == 2) {
43112     int _v;
43113     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
43114     _v = SWIG_CheckState(res);
43115     if (_v) {
43116       {
43117         int res = SWIG_AsVal_int(argv[1], NULL);
43118         _v = SWIG_CheckState(res);
43119       }
43120       if (_v) {
43121         return _wrap_new_WritableDatabase__SWIG_2(nargs, args, self);
43122       }
43123     }
43124   }
43125   if (argc == 3) {
43126     int _v;
43127     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
43128     _v = SWIG_CheckState(res);
43129     if (_v) {
43130       {
43131         int res = SWIG_AsVal_int(argv[1], NULL);
43132         _v = SWIG_CheckState(res);
43133       }
43134       if (_v) {
43135         {
43136           int res = SWIG_AsVal_int(argv[2], NULL);
43137           _v = SWIG_CheckState(res);
43138         }
43139         if (_v) {
43140           return _wrap_new_WritableDatabase__SWIG_1(nargs, args, self);
43141         }
43142       }
43143     }
43144   }
43145 
43146 fail:
43147   Ruby_Format_OverloadedError( argc, 3, "WritableDatabase.new",
43148     "    WritableDatabase.new()\n"
43149     "    WritableDatabase.new(std::string const &path, int flags, int block_size)\n"
43150     "    WritableDatabase.new(std::string const &path, int flags)\n"
43151     "    WritableDatabase.new(std::string const &path)\n");
43152 
43153   return Qnil;
43154 }
43155 
43156 
43157 SWIGINTERN VALUE
_wrap_WritableDatabase_commit(int argc,VALUE * argv,VALUE self)43158 _wrap_WritableDatabase_commit(int argc, VALUE *argv, VALUE self) {
43159   Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
43160   void *argp1 = 0 ;
43161   int res1 = 0 ;
43162 
43163   if ((argc < 0) || (argc > 0)) {
43164     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
43165   }
43166   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
43167   if (!SWIG_IsOK(res1)) {
43168     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::WritableDatabase *","commit", 1, self ));
43169   }
43170   arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
43171   {
43172     try {
43173       (arg1)->commit();
43174     } catch (...) {
43175       string msg;
43176       int code = XapianExceptionHandler(msg);
43177       SWIG_exception(code, msg.c_str());
43178     }
43179   }
43180   return Qnil;
43181 fail:
43182   return Qnil;
43183 }
43184 
43185 
43186 SWIGINTERN VALUE
_wrap_WritableDatabase_flush(int argc,VALUE * argv,VALUE self)43187 _wrap_WritableDatabase_flush(int argc, VALUE *argv, VALUE self) {
43188   Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
43189   void *argp1 = 0 ;
43190   int res1 = 0 ;
43191 
43192   if ((argc < 0) || (argc > 0)) {
43193     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
43194   }
43195   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
43196   if (!SWIG_IsOK(res1)) {
43197     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::WritableDatabase *","flush", 1, self ));
43198   }
43199   arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
43200   {
43201     try {
43202       (arg1)->flush();
43203     } catch (...) {
43204       string msg;
43205       int code = XapianExceptionHandler(msg);
43206       SWIG_exception(code, msg.c_str());
43207     }
43208   }
43209   return Qnil;
43210 fail:
43211   return Qnil;
43212 }
43213 
43214 
43215 SWIGINTERN VALUE
_wrap_WritableDatabase_begin_transaction__SWIG_0(int argc,VALUE * argv,VALUE self)43216 _wrap_WritableDatabase_begin_transaction__SWIG_0(int argc, VALUE *argv, VALUE self) {
43217   Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
43218   bool arg2 ;
43219   void *argp1 = 0 ;
43220   int res1 = 0 ;
43221   bool val2 ;
43222   int ecode2 = 0 ;
43223 
43224   if ((argc < 1) || (argc > 1)) {
43225     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
43226   }
43227   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
43228   if (!SWIG_IsOK(res1)) {
43229     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::WritableDatabase *","begin_transaction", 1, self ));
43230   }
43231   arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
43232   ecode2 = SWIG_AsVal_bool(argv[0], &val2);
43233   if (!SWIG_IsOK(ecode2)) {
43234     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","begin_transaction", 2, argv[0] ));
43235   }
43236   arg2 = static_cast< bool >(val2);
43237   {
43238     try {
43239       (arg1)->begin_transaction(arg2);
43240     } catch (...) {
43241       string msg;
43242       int code = XapianExceptionHandler(msg);
43243       SWIG_exception(code, msg.c_str());
43244     }
43245   }
43246   return Qnil;
43247 fail:
43248   return Qnil;
43249 }
43250 
43251 
43252 SWIGINTERN VALUE
_wrap_WritableDatabase_begin_transaction__SWIG_1(int argc,VALUE * argv,VALUE self)43253 _wrap_WritableDatabase_begin_transaction__SWIG_1(int argc, VALUE *argv, VALUE self) {
43254   Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
43255   void *argp1 = 0 ;
43256   int res1 = 0 ;
43257 
43258   if ((argc < 0) || (argc > 0)) {
43259     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
43260   }
43261   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
43262   if (!SWIG_IsOK(res1)) {
43263     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::WritableDatabase *","begin_transaction", 1, self ));
43264   }
43265   arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
43266   {
43267     try {
43268       (arg1)->begin_transaction();
43269     } catch (...) {
43270       string msg;
43271       int code = XapianExceptionHandler(msg);
43272       SWIG_exception(code, msg.c_str());
43273     }
43274   }
43275   return Qnil;
43276 fail:
43277   return Qnil;
43278 }
43279 
43280 
_wrap_WritableDatabase_begin_transaction(int nargs,VALUE * args,VALUE self)43281 SWIGINTERN VALUE _wrap_WritableDatabase_begin_transaction(int nargs, VALUE *args, VALUE self) {
43282   int argc;
43283   VALUE argv[3];
43284   int ii;
43285 
43286   argc = nargs + 1;
43287   argv[0] = self;
43288   if (argc > 3) SWIG_fail;
43289   for (ii = 1; (ii < argc); ++ii) {
43290     argv[ii] = args[ii-1];
43291   }
43292   if (argc == 1) {
43293     int _v;
43294     void *vptr = 0;
43295     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
43296     _v = SWIG_CheckState(res);
43297     if (_v) {
43298       return _wrap_WritableDatabase_begin_transaction__SWIG_1(nargs, args, self);
43299     }
43300   }
43301   if (argc == 2) {
43302     int _v;
43303     void *vptr = 0;
43304     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
43305     _v = SWIG_CheckState(res);
43306     if (_v) {
43307       {
43308         int res = SWIG_AsVal_bool(argv[1], NULL);
43309         _v = SWIG_CheckState(res);
43310       }
43311       if (_v) {
43312         return _wrap_WritableDatabase_begin_transaction__SWIG_0(nargs, args, self);
43313       }
43314     }
43315   }
43316 
43317 fail:
43318   Ruby_Format_OverloadedError( argc, 3, "WritableDatabase.begin_transaction",
43319     "    void WritableDatabase.begin_transaction(bool flushed)\n"
43320     "    void WritableDatabase.begin_transaction()\n");
43321 
43322   return Qnil;
43323 }
43324 
43325 
43326 SWIGINTERN VALUE
_wrap_WritableDatabase_commit_transaction(int argc,VALUE * argv,VALUE self)43327 _wrap_WritableDatabase_commit_transaction(int argc, VALUE *argv, VALUE self) {
43328   Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
43329   void *argp1 = 0 ;
43330   int res1 = 0 ;
43331 
43332   if ((argc < 0) || (argc > 0)) {
43333     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
43334   }
43335   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
43336   if (!SWIG_IsOK(res1)) {
43337     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::WritableDatabase *","commit_transaction", 1, self ));
43338   }
43339   arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
43340   {
43341     try {
43342       (arg1)->commit_transaction();
43343     } catch (...) {
43344       string msg;
43345       int code = XapianExceptionHandler(msg);
43346       SWIG_exception(code, msg.c_str());
43347     }
43348   }
43349   return Qnil;
43350 fail:
43351   return Qnil;
43352 }
43353 
43354 
43355 SWIGINTERN VALUE
_wrap_WritableDatabase_cancel_transaction(int argc,VALUE * argv,VALUE self)43356 _wrap_WritableDatabase_cancel_transaction(int argc, VALUE *argv, VALUE self) {
43357   Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
43358   void *argp1 = 0 ;
43359   int res1 = 0 ;
43360 
43361   if ((argc < 0) || (argc > 0)) {
43362     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
43363   }
43364   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
43365   if (!SWIG_IsOK(res1)) {
43366     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::WritableDatabase *","cancel_transaction", 1, self ));
43367   }
43368   arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
43369   {
43370     try {
43371       (arg1)->cancel_transaction();
43372     } catch (...) {
43373       string msg;
43374       int code = XapianExceptionHandler(msg);
43375       SWIG_exception(code, msg.c_str());
43376     }
43377   }
43378   return Qnil;
43379 fail:
43380   return Qnil;
43381 }
43382 
43383 
43384 SWIGINTERN VALUE
_wrap_WritableDatabase_add_document(int argc,VALUE * argv,VALUE self)43385 _wrap_WritableDatabase_add_document(int argc, VALUE *argv, VALUE self) {
43386   Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
43387   Xapian::Document *arg2 = 0 ;
43388   void *argp1 = 0 ;
43389   int res1 = 0 ;
43390   void *argp2 ;
43391   int res2 = 0 ;
43392   Xapian::docid result;
43393   VALUE vresult = Qnil;
43394 
43395   if ((argc < 1) || (argc > 1)) {
43396     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
43397   }
43398   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
43399   if (!SWIG_IsOK(res1)) {
43400     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::WritableDatabase *","add_document", 1, self ));
43401   }
43402   arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
43403   res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Xapian__Document,  0 );
43404   if (!SWIG_IsOK(res2)) {
43405     SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Xapian::Document const &","add_document", 2, argv[0] ));
43406   }
43407   if (!argp2) {
43408     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Document const &","add_document", 2, argv[0]));
43409   }
43410   arg2 = reinterpret_cast< Xapian::Document * >(argp2);
43411   {
43412     try {
43413       result = (Xapian::docid)(arg1)->add_document((Xapian::Document const &)*arg2);
43414     } catch (...) {
43415       string msg;
43416       int code = XapianExceptionHandler(msg);
43417       SWIG_exception(code, msg.c_str());
43418     }
43419   }
43420   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
43421   return vresult;
43422 fail:
43423   return Qnil;
43424 }
43425 
43426 
43427 SWIGINTERN VALUE
_wrap_WritableDatabase_delete_document__SWIG_0(int argc,VALUE * argv,VALUE self)43428 _wrap_WritableDatabase_delete_document__SWIG_0(int argc, VALUE *argv, VALUE self) {
43429   Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
43430   Xapian::docid arg2 ;
43431   void *argp1 = 0 ;
43432   int res1 = 0 ;
43433   unsigned int val2 ;
43434   int ecode2 = 0 ;
43435 
43436   if ((argc < 1) || (argc > 1)) {
43437     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
43438   }
43439   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
43440   if (!SWIG_IsOK(res1)) {
43441     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::WritableDatabase *","delete_document", 1, self ));
43442   }
43443   arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
43444   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
43445   if (!SWIG_IsOK(ecode2)) {
43446     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","delete_document", 2, argv[0] ));
43447   }
43448   arg2 = static_cast< Xapian::docid >(val2);
43449   {
43450     try {
43451       (arg1)->delete_document(arg2);
43452     } catch (...) {
43453       string msg;
43454       int code = XapianExceptionHandler(msg);
43455       SWIG_exception(code, msg.c_str());
43456     }
43457   }
43458   return Qnil;
43459 fail:
43460   return Qnil;
43461 }
43462 
43463 
43464 SWIGINTERN VALUE
_wrap_WritableDatabase_delete_document__SWIG_1(int argc,VALUE * argv,VALUE self)43465 _wrap_WritableDatabase_delete_document__SWIG_1(int argc, VALUE *argv, VALUE self) {
43466   Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
43467   std::string *arg2 = 0 ;
43468   void *argp1 = 0 ;
43469   int res1 = 0 ;
43470   int res2 = SWIG_OLDOBJ ;
43471 
43472   if ((argc < 1) || (argc > 1)) {
43473     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
43474   }
43475   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
43476   if (!SWIG_IsOK(res1)) {
43477     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::WritableDatabase *","delete_document", 1, self ));
43478   }
43479   arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
43480   {
43481     std::string *ptr = (std::string *)0;
43482     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
43483     if (!SWIG_IsOK(res2)) {
43484       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","delete_document", 2, argv[0] ));
43485     }
43486     if (!ptr) {
43487       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","delete_document", 2, argv[0]));
43488     }
43489     arg2 = ptr;
43490   }
43491   {
43492     try {
43493       (arg1)->delete_document((std::string const &)*arg2);
43494     } catch (...) {
43495       string msg;
43496       int code = XapianExceptionHandler(msg);
43497       SWIG_exception(code, msg.c_str());
43498     }
43499   }
43500   if (SWIG_IsNewObj(res2)) delete arg2;
43501   return Qnil;
43502 fail:
43503   if (SWIG_IsNewObj(res2)) delete arg2;
43504   return Qnil;
43505 }
43506 
43507 
_wrap_WritableDatabase_delete_document(int nargs,VALUE * args,VALUE self)43508 SWIGINTERN VALUE _wrap_WritableDatabase_delete_document(int nargs, VALUE *args, VALUE self) {
43509   int argc;
43510   VALUE argv[3];
43511   int ii;
43512 
43513   argc = nargs + 1;
43514   argv[0] = self;
43515   if (argc > 3) SWIG_fail;
43516   for (ii = 1; (ii < argc); ++ii) {
43517     argv[ii] = args[ii-1];
43518   }
43519   if (argc == 2) {
43520     int _v;
43521     void *vptr = 0;
43522     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
43523     _v = SWIG_CheckState(res);
43524     if (_v) {
43525       {
43526         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
43527         _v = SWIG_CheckState(res);
43528       }
43529       if (_v) {
43530         return _wrap_WritableDatabase_delete_document__SWIG_0(nargs, args, self);
43531       }
43532     }
43533   }
43534   if (argc == 2) {
43535     int _v;
43536     void *vptr = 0;
43537     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
43538     _v = SWIG_CheckState(res);
43539     if (_v) {
43540       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
43541       _v = SWIG_CheckState(res);
43542       if (_v) {
43543         return _wrap_WritableDatabase_delete_document__SWIG_1(nargs, args, self);
43544       }
43545     }
43546   }
43547 
43548 fail:
43549   Ruby_Format_OverloadedError( argc, 3, "WritableDatabase.delete_document",
43550     "    void WritableDatabase.delete_document(Xapian::docid did)\n"
43551     "    void WritableDatabase.delete_document(std::string const &unique_term)\n");
43552 
43553   return Qnil;
43554 }
43555 
43556 
43557 SWIGINTERN VALUE
_wrap_WritableDatabase_replace_document__SWIG_0(int argc,VALUE * argv,VALUE self)43558 _wrap_WritableDatabase_replace_document__SWIG_0(int argc, VALUE *argv, VALUE self) {
43559   Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
43560   Xapian::docid arg2 ;
43561   Xapian::Document *arg3 = 0 ;
43562   void *argp1 = 0 ;
43563   int res1 = 0 ;
43564   unsigned int val2 ;
43565   int ecode2 = 0 ;
43566   void *argp3 ;
43567   int res3 = 0 ;
43568 
43569   if ((argc < 2) || (argc > 2)) {
43570     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
43571   }
43572   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
43573   if (!SWIG_IsOK(res1)) {
43574     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::WritableDatabase *","replace_document", 1, self ));
43575   }
43576   arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
43577   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
43578   if (!SWIG_IsOK(ecode2)) {
43579     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Xapian::docid","replace_document", 2, argv[0] ));
43580   }
43581   arg2 = static_cast< Xapian::docid >(val2);
43582   res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_Xapian__Document,  0 );
43583   if (!SWIG_IsOK(res3)) {
43584     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::Document const &","replace_document", 3, argv[1] ));
43585   }
43586   if (!argp3) {
43587     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Document const &","replace_document", 3, argv[1]));
43588   }
43589   arg3 = reinterpret_cast< Xapian::Document * >(argp3);
43590   {
43591     try {
43592       (arg1)->replace_document(arg2,(Xapian::Document const &)*arg3);
43593     } catch (...) {
43594       string msg;
43595       int code = XapianExceptionHandler(msg);
43596       SWIG_exception(code, msg.c_str());
43597     }
43598   }
43599   return Qnil;
43600 fail:
43601   return Qnil;
43602 }
43603 
43604 
43605 SWIGINTERN VALUE
_wrap_WritableDatabase_replace_document__SWIG_1(int argc,VALUE * argv,VALUE self)43606 _wrap_WritableDatabase_replace_document__SWIG_1(int argc, VALUE *argv, VALUE self) {
43607   Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
43608   std::string *arg2 = 0 ;
43609   Xapian::Document *arg3 = 0 ;
43610   void *argp1 = 0 ;
43611   int res1 = 0 ;
43612   int res2 = SWIG_OLDOBJ ;
43613   void *argp3 ;
43614   int res3 = 0 ;
43615   Xapian::docid result;
43616   VALUE vresult = Qnil;
43617 
43618   if ((argc < 2) || (argc > 2)) {
43619     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
43620   }
43621   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
43622   if (!SWIG_IsOK(res1)) {
43623     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::WritableDatabase *","replace_document", 1, self ));
43624   }
43625   arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
43626   {
43627     std::string *ptr = (std::string *)0;
43628     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
43629     if (!SWIG_IsOK(res2)) {
43630       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","replace_document", 2, argv[0] ));
43631     }
43632     if (!ptr) {
43633       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","replace_document", 2, argv[0]));
43634     }
43635     arg2 = ptr;
43636   }
43637   res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_Xapian__Document,  0 );
43638   if (!SWIG_IsOK(res3)) {
43639     SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Xapian::Document const &","replace_document", 3, argv[1] ));
43640   }
43641   if (!argp3) {
43642     SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Xapian::Document const &","replace_document", 3, argv[1]));
43643   }
43644   arg3 = reinterpret_cast< Xapian::Document * >(argp3);
43645   {
43646     try {
43647       result = (Xapian::docid)(arg1)->replace_document((std::string const &)*arg2,(Xapian::Document const &)*arg3);
43648     } catch (...) {
43649       string msg;
43650       int code = XapianExceptionHandler(msg);
43651       SWIG_exception(code, msg.c_str());
43652     }
43653   }
43654   vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
43655   if (SWIG_IsNewObj(res2)) delete arg2;
43656   return vresult;
43657 fail:
43658   if (SWIG_IsNewObj(res2)) delete arg2;
43659   return Qnil;
43660 }
43661 
43662 
_wrap_WritableDatabase_replace_document(int nargs,VALUE * args,VALUE self)43663 SWIGINTERN VALUE _wrap_WritableDatabase_replace_document(int nargs, VALUE *args, VALUE self) {
43664   int argc;
43665   VALUE argv[4];
43666   int ii;
43667 
43668   argc = nargs + 1;
43669   argv[0] = self;
43670   if (argc > 4) SWIG_fail;
43671   for (ii = 1; (ii < argc); ++ii) {
43672     argv[ii] = args[ii-1];
43673   }
43674   if (argc == 3) {
43675     int _v;
43676     void *vptr = 0;
43677     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
43678     _v = SWIG_CheckState(res);
43679     if (_v) {
43680       {
43681         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
43682         _v = SWIG_CheckState(res);
43683       }
43684       if (_v) {
43685         void *vptr = 0;
43686         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__Document, 0);
43687         _v = SWIG_CheckState(res);
43688         if (_v) {
43689           return _wrap_WritableDatabase_replace_document__SWIG_0(nargs, args, self);
43690         }
43691       }
43692     }
43693   }
43694   if (argc == 3) {
43695     int _v;
43696     void *vptr = 0;
43697     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
43698     _v = SWIG_CheckState(res);
43699     if (_v) {
43700       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
43701       _v = SWIG_CheckState(res);
43702       if (_v) {
43703         void *vptr = 0;
43704         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__Document, 0);
43705         _v = SWIG_CheckState(res);
43706         if (_v) {
43707           return _wrap_WritableDatabase_replace_document__SWIG_1(nargs, args, self);
43708         }
43709       }
43710     }
43711   }
43712 
43713 fail:
43714   Ruby_Format_OverloadedError( argc, 4, "WritableDatabase.replace_document",
43715     "    void WritableDatabase.replace_document(Xapian::docid did, Xapian::Document const &document)\n"
43716     "    Xapian::docid WritableDatabase.replace_document(std::string const &unique_term, Xapian::Document const &document)\n");
43717 
43718   return Qnil;
43719 }
43720 
43721 
43722 SWIGINTERN VALUE
_wrap_WritableDatabase_add_spelling__SWIG_0(int argc,VALUE * argv,VALUE self)43723 _wrap_WritableDatabase_add_spelling__SWIG_0(int argc, VALUE *argv, VALUE self) {
43724   Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
43725   std::string *arg2 = 0 ;
43726   Xapian::termcount arg3 ;
43727   void *argp1 = 0 ;
43728   int res1 = 0 ;
43729   int res2 = SWIG_OLDOBJ ;
43730   unsigned int val3 ;
43731   int ecode3 = 0 ;
43732 
43733   if ((argc < 2) || (argc > 2)) {
43734     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
43735   }
43736   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
43737   if (!SWIG_IsOK(res1)) {
43738     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::WritableDatabase const *","add_spelling", 1, self ));
43739   }
43740   arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
43741   {
43742     std::string *ptr = (std::string *)0;
43743     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
43744     if (!SWIG_IsOK(res2)) {
43745       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","add_spelling", 2, argv[0] ));
43746     }
43747     if (!ptr) {
43748       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_spelling", 2, argv[0]));
43749     }
43750     arg2 = ptr;
43751   }
43752   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
43753   if (!SWIG_IsOK(ecode3)) {
43754     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","add_spelling", 3, argv[1] ));
43755   }
43756   arg3 = static_cast< Xapian::termcount >(val3);
43757   {
43758     try {
43759       ((Xapian::WritableDatabase const *)arg1)->add_spelling((std::string const &)*arg2,arg3);
43760     } catch (...) {
43761       string msg;
43762       int code = XapianExceptionHandler(msg);
43763       SWIG_exception(code, msg.c_str());
43764     }
43765   }
43766   if (SWIG_IsNewObj(res2)) delete arg2;
43767   return Qnil;
43768 fail:
43769   if (SWIG_IsNewObj(res2)) delete arg2;
43770   return Qnil;
43771 }
43772 
43773 
43774 SWIGINTERN VALUE
_wrap_WritableDatabase_add_spelling__SWIG_1(int argc,VALUE * argv,VALUE self)43775 _wrap_WritableDatabase_add_spelling__SWIG_1(int argc, VALUE *argv, VALUE self) {
43776   Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
43777   std::string *arg2 = 0 ;
43778   void *argp1 = 0 ;
43779   int res1 = 0 ;
43780   int res2 = SWIG_OLDOBJ ;
43781 
43782   if ((argc < 1) || (argc > 1)) {
43783     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
43784   }
43785   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
43786   if (!SWIG_IsOK(res1)) {
43787     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::WritableDatabase const *","add_spelling", 1, self ));
43788   }
43789   arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
43790   {
43791     std::string *ptr = (std::string *)0;
43792     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
43793     if (!SWIG_IsOK(res2)) {
43794       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","add_spelling", 2, argv[0] ));
43795     }
43796     if (!ptr) {
43797       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_spelling", 2, argv[0]));
43798     }
43799     arg2 = ptr;
43800   }
43801   {
43802     try {
43803       ((Xapian::WritableDatabase const *)arg1)->add_spelling((std::string const &)*arg2);
43804     } catch (...) {
43805       string msg;
43806       int code = XapianExceptionHandler(msg);
43807       SWIG_exception(code, msg.c_str());
43808     }
43809   }
43810   if (SWIG_IsNewObj(res2)) delete arg2;
43811   return Qnil;
43812 fail:
43813   if (SWIG_IsNewObj(res2)) delete arg2;
43814   return Qnil;
43815 }
43816 
43817 
_wrap_WritableDatabase_add_spelling(int nargs,VALUE * args,VALUE self)43818 SWIGINTERN VALUE _wrap_WritableDatabase_add_spelling(int nargs, VALUE *args, VALUE self) {
43819   int argc;
43820   VALUE argv[4];
43821   int ii;
43822 
43823   argc = nargs + 1;
43824   argv[0] = self;
43825   if (argc > 4) SWIG_fail;
43826   for (ii = 1; (ii < argc); ++ii) {
43827     argv[ii] = args[ii-1];
43828   }
43829   if (argc == 2) {
43830     int _v;
43831     void *vptr = 0;
43832     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
43833     _v = SWIG_CheckState(res);
43834     if (_v) {
43835       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
43836       _v = SWIG_CheckState(res);
43837       if (_v) {
43838         return _wrap_WritableDatabase_add_spelling__SWIG_1(nargs, args, self);
43839       }
43840     }
43841   }
43842   if (argc == 3) {
43843     int _v;
43844     void *vptr = 0;
43845     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
43846     _v = SWIG_CheckState(res);
43847     if (_v) {
43848       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
43849       _v = SWIG_CheckState(res);
43850       if (_v) {
43851         {
43852           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
43853           _v = SWIG_CheckState(res);
43854         }
43855         if (_v) {
43856           return _wrap_WritableDatabase_add_spelling__SWIG_0(nargs, args, self);
43857         }
43858       }
43859     }
43860   }
43861 
43862 fail:
43863   Ruby_Format_OverloadedError( argc, 4, "WritableDatabase.add_spelling",
43864     "    void WritableDatabase.add_spelling(std::string const &word, Xapian::termcount freqinc)\n"
43865     "    void WritableDatabase.add_spelling(std::string const &word)\n");
43866 
43867   return Qnil;
43868 }
43869 
43870 
43871 SWIGINTERN VALUE
_wrap_WritableDatabase_remove_spelling__SWIG_0(int argc,VALUE * argv,VALUE self)43872 _wrap_WritableDatabase_remove_spelling__SWIG_0(int argc, VALUE *argv, VALUE self) {
43873   Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
43874   std::string *arg2 = 0 ;
43875   Xapian::termcount arg3 ;
43876   void *argp1 = 0 ;
43877   int res1 = 0 ;
43878   int res2 = SWIG_OLDOBJ ;
43879   unsigned int val3 ;
43880   int ecode3 = 0 ;
43881 
43882   if ((argc < 2) || (argc > 2)) {
43883     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
43884   }
43885   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
43886   if (!SWIG_IsOK(res1)) {
43887     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::WritableDatabase const *","remove_spelling", 1, self ));
43888   }
43889   arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
43890   {
43891     std::string *ptr = (std::string *)0;
43892     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
43893     if (!SWIG_IsOK(res2)) {
43894       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","remove_spelling", 2, argv[0] ));
43895     }
43896     if (!ptr) {
43897       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","remove_spelling", 2, argv[0]));
43898     }
43899     arg2 = ptr;
43900   }
43901   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
43902   if (!SWIG_IsOK(ecode3)) {
43903     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "Xapian::termcount","remove_spelling", 3, argv[1] ));
43904   }
43905   arg3 = static_cast< Xapian::termcount >(val3);
43906   {
43907     try {
43908       ((Xapian::WritableDatabase const *)arg1)->remove_spelling((std::string const &)*arg2,arg3);
43909     } catch (...) {
43910       string msg;
43911       int code = XapianExceptionHandler(msg);
43912       SWIG_exception(code, msg.c_str());
43913     }
43914   }
43915   if (SWIG_IsNewObj(res2)) delete arg2;
43916   return Qnil;
43917 fail:
43918   if (SWIG_IsNewObj(res2)) delete arg2;
43919   return Qnil;
43920 }
43921 
43922 
43923 SWIGINTERN VALUE
_wrap_WritableDatabase_remove_spelling__SWIG_1(int argc,VALUE * argv,VALUE self)43924 _wrap_WritableDatabase_remove_spelling__SWIG_1(int argc, VALUE *argv, VALUE self) {
43925   Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
43926   std::string *arg2 = 0 ;
43927   void *argp1 = 0 ;
43928   int res1 = 0 ;
43929   int res2 = SWIG_OLDOBJ ;
43930 
43931   if ((argc < 1) || (argc > 1)) {
43932     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
43933   }
43934   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
43935   if (!SWIG_IsOK(res1)) {
43936     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::WritableDatabase const *","remove_spelling", 1, self ));
43937   }
43938   arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
43939   {
43940     std::string *ptr = (std::string *)0;
43941     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
43942     if (!SWIG_IsOK(res2)) {
43943       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","remove_spelling", 2, argv[0] ));
43944     }
43945     if (!ptr) {
43946       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","remove_spelling", 2, argv[0]));
43947     }
43948     arg2 = ptr;
43949   }
43950   {
43951     try {
43952       ((Xapian::WritableDatabase const *)arg1)->remove_spelling((std::string const &)*arg2);
43953     } catch (...) {
43954       string msg;
43955       int code = XapianExceptionHandler(msg);
43956       SWIG_exception(code, msg.c_str());
43957     }
43958   }
43959   if (SWIG_IsNewObj(res2)) delete arg2;
43960   return Qnil;
43961 fail:
43962   if (SWIG_IsNewObj(res2)) delete arg2;
43963   return Qnil;
43964 }
43965 
43966 
_wrap_WritableDatabase_remove_spelling(int nargs,VALUE * args,VALUE self)43967 SWIGINTERN VALUE _wrap_WritableDatabase_remove_spelling(int nargs, VALUE *args, VALUE self) {
43968   int argc;
43969   VALUE argv[4];
43970   int ii;
43971 
43972   argc = nargs + 1;
43973   argv[0] = self;
43974   if (argc > 4) SWIG_fail;
43975   for (ii = 1; (ii < argc); ++ii) {
43976     argv[ii] = args[ii-1];
43977   }
43978   if (argc == 2) {
43979     int _v;
43980     void *vptr = 0;
43981     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
43982     _v = SWIG_CheckState(res);
43983     if (_v) {
43984       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
43985       _v = SWIG_CheckState(res);
43986       if (_v) {
43987         return _wrap_WritableDatabase_remove_spelling__SWIG_1(nargs, args, self);
43988       }
43989     }
43990   }
43991   if (argc == 3) {
43992     int _v;
43993     void *vptr = 0;
43994     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
43995     _v = SWIG_CheckState(res);
43996     if (_v) {
43997       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
43998       _v = SWIG_CheckState(res);
43999       if (_v) {
44000         {
44001           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
44002           _v = SWIG_CheckState(res);
44003         }
44004         if (_v) {
44005           return _wrap_WritableDatabase_remove_spelling__SWIG_0(nargs, args, self);
44006         }
44007       }
44008     }
44009   }
44010 
44011 fail:
44012   Ruby_Format_OverloadedError( argc, 4, "WritableDatabase.remove_spelling",
44013     "    void WritableDatabase.remove_spelling(std::string const &word, Xapian::termcount freqdec)\n"
44014     "    void WritableDatabase.remove_spelling(std::string const &word)\n");
44015 
44016   return Qnil;
44017 }
44018 
44019 
44020 SWIGINTERN VALUE
_wrap_WritableDatabase_add_synonym(int argc,VALUE * argv,VALUE self)44021 _wrap_WritableDatabase_add_synonym(int argc, VALUE *argv, VALUE self) {
44022   Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
44023   std::string *arg2 = 0 ;
44024   std::string *arg3 = 0 ;
44025   void *argp1 = 0 ;
44026   int res1 = 0 ;
44027   int res2 = SWIG_OLDOBJ ;
44028   int res3 = SWIG_OLDOBJ ;
44029 
44030   if ((argc < 2) || (argc > 2)) {
44031     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
44032   }
44033   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
44034   if (!SWIG_IsOK(res1)) {
44035     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::WritableDatabase const *","add_synonym", 1, self ));
44036   }
44037   arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
44038   {
44039     std::string *ptr = (std::string *)0;
44040     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
44041     if (!SWIG_IsOK(res2)) {
44042       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","add_synonym", 2, argv[0] ));
44043     }
44044     if (!ptr) {
44045       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_synonym", 2, argv[0]));
44046     }
44047     arg2 = ptr;
44048   }
44049   {
44050     std::string *ptr = (std::string *)0;
44051     res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
44052     if (!SWIG_IsOK(res3)) {
44053       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","add_synonym", 3, argv[1] ));
44054     }
44055     if (!ptr) {
44056       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","add_synonym", 3, argv[1]));
44057     }
44058     arg3 = ptr;
44059   }
44060   {
44061     try {
44062       ((Xapian::WritableDatabase const *)arg1)->add_synonym((std::string const &)*arg2,(std::string const &)*arg3);
44063     } catch (...) {
44064       string msg;
44065       int code = XapianExceptionHandler(msg);
44066       SWIG_exception(code, msg.c_str());
44067     }
44068   }
44069   if (SWIG_IsNewObj(res2)) delete arg2;
44070   if (SWIG_IsNewObj(res3)) delete arg3;
44071   return Qnil;
44072 fail:
44073   if (SWIG_IsNewObj(res2)) delete arg2;
44074   if (SWIG_IsNewObj(res3)) delete arg3;
44075   return Qnil;
44076 }
44077 
44078 
44079 SWIGINTERN VALUE
_wrap_WritableDatabase_remove_synonym(int argc,VALUE * argv,VALUE self)44080 _wrap_WritableDatabase_remove_synonym(int argc, VALUE *argv, VALUE self) {
44081   Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
44082   std::string *arg2 = 0 ;
44083   std::string *arg3 = 0 ;
44084   void *argp1 = 0 ;
44085   int res1 = 0 ;
44086   int res2 = SWIG_OLDOBJ ;
44087   int res3 = SWIG_OLDOBJ ;
44088 
44089   if ((argc < 2) || (argc > 2)) {
44090     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
44091   }
44092   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
44093   if (!SWIG_IsOK(res1)) {
44094     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::WritableDatabase const *","remove_synonym", 1, self ));
44095   }
44096   arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
44097   {
44098     std::string *ptr = (std::string *)0;
44099     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
44100     if (!SWIG_IsOK(res2)) {
44101       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","remove_synonym", 2, argv[0] ));
44102     }
44103     if (!ptr) {
44104       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","remove_synonym", 2, argv[0]));
44105     }
44106     arg2 = ptr;
44107   }
44108   {
44109     std::string *ptr = (std::string *)0;
44110     res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
44111     if (!SWIG_IsOK(res3)) {
44112       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","remove_synonym", 3, argv[1] ));
44113     }
44114     if (!ptr) {
44115       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","remove_synonym", 3, argv[1]));
44116     }
44117     arg3 = ptr;
44118   }
44119   {
44120     try {
44121       ((Xapian::WritableDatabase const *)arg1)->remove_synonym((std::string const &)*arg2,(std::string const &)*arg3);
44122     } catch (...) {
44123       string msg;
44124       int code = XapianExceptionHandler(msg);
44125       SWIG_exception(code, msg.c_str());
44126     }
44127   }
44128   if (SWIG_IsNewObj(res2)) delete arg2;
44129   if (SWIG_IsNewObj(res3)) delete arg3;
44130   return Qnil;
44131 fail:
44132   if (SWIG_IsNewObj(res2)) delete arg2;
44133   if (SWIG_IsNewObj(res3)) delete arg3;
44134   return Qnil;
44135 }
44136 
44137 
44138 SWIGINTERN VALUE
_wrap_WritableDatabase_clear_synonyms(int argc,VALUE * argv,VALUE self)44139 _wrap_WritableDatabase_clear_synonyms(int argc, VALUE *argv, VALUE self) {
44140   Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
44141   std::string *arg2 = 0 ;
44142   void *argp1 = 0 ;
44143   int res1 = 0 ;
44144   int res2 = SWIG_OLDOBJ ;
44145 
44146   if ((argc < 1) || (argc > 1)) {
44147     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
44148   }
44149   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
44150   if (!SWIG_IsOK(res1)) {
44151     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::WritableDatabase const *","clear_synonyms", 1, self ));
44152   }
44153   arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
44154   {
44155     std::string *ptr = (std::string *)0;
44156     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
44157     if (!SWIG_IsOK(res2)) {
44158       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","clear_synonyms", 2, argv[0] ));
44159     }
44160     if (!ptr) {
44161       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","clear_synonyms", 2, argv[0]));
44162     }
44163     arg2 = ptr;
44164   }
44165   {
44166     try {
44167       ((Xapian::WritableDatabase const *)arg1)->clear_synonyms((std::string const &)*arg2);
44168     } catch (...) {
44169       string msg;
44170       int code = XapianExceptionHandler(msg);
44171       SWIG_exception(code, msg.c_str());
44172     }
44173   }
44174   if (SWIG_IsNewObj(res2)) delete arg2;
44175   return Qnil;
44176 fail:
44177   if (SWIG_IsNewObj(res2)) delete arg2;
44178   return Qnil;
44179 }
44180 
44181 
44182 SWIGINTERN VALUE
_wrap_WritableDatabase_set_metadata(int argc,VALUE * argv,VALUE self)44183 _wrap_WritableDatabase_set_metadata(int argc, VALUE *argv, VALUE self) {
44184   Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
44185   std::string *arg2 = 0 ;
44186   std::string *arg3 = 0 ;
44187   void *argp1 = 0 ;
44188   int res1 = 0 ;
44189   int res2 = SWIG_OLDOBJ ;
44190   int res3 = SWIG_OLDOBJ ;
44191 
44192   if ((argc < 2) || (argc > 2)) {
44193     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
44194   }
44195   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
44196   if (!SWIG_IsOK(res1)) {
44197     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::WritableDatabase *","set_metadata", 1, self ));
44198   }
44199   arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
44200   {
44201     std::string *ptr = (std::string *)0;
44202     res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
44203     if (!SWIG_IsOK(res2)) {
44204       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","set_metadata", 2, argv[0] ));
44205     }
44206     if (!ptr) {
44207       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","set_metadata", 2, argv[0]));
44208     }
44209     arg2 = ptr;
44210   }
44211   {
44212     std::string *ptr = (std::string *)0;
44213     res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
44214     if (!SWIG_IsOK(res3)) {
44215       SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","set_metadata", 3, argv[1] ));
44216     }
44217     if (!ptr) {
44218       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","set_metadata", 3, argv[1]));
44219     }
44220     arg3 = ptr;
44221   }
44222   {
44223     try {
44224       (arg1)->set_metadata((std::string const &)*arg2,(std::string const &)*arg3);
44225     } catch (...) {
44226       string msg;
44227       int code = XapianExceptionHandler(msg);
44228       SWIG_exception(code, msg.c_str());
44229     }
44230   }
44231   if (SWIG_IsNewObj(res2)) delete arg2;
44232   if (SWIG_IsNewObj(res3)) delete arg3;
44233   return Qnil;
44234 fail:
44235   if (SWIG_IsNewObj(res2)) delete arg2;
44236   if (SWIG_IsNewObj(res3)) delete arg3;
44237   return Qnil;
44238 }
44239 
44240 
44241 SWIGINTERN VALUE
_wrap_WritableDatabase_description(int argc,VALUE * argv,VALUE self)44242 _wrap_WritableDatabase_description(int argc, VALUE *argv, VALUE self) {
44243   Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
44244   void *argp1 = 0 ;
44245   int res1 = 0 ;
44246   std::string result;
44247   VALUE vresult = Qnil;
44248 
44249   if ((argc < 0) || (argc > 0)) {
44250     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
44251   }
44252   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
44253   if (!SWIG_IsOK(res1)) {
44254     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Xapian::WritableDatabase const *","get_description", 1, self ));
44255   }
44256   arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
44257   {
44258     try {
44259       result = ((Xapian::WritableDatabase const *)arg1)->get_description();
44260     } catch (...) {
44261       string msg;
44262       int code = XapianExceptionHandler(msg);
44263       SWIG_exception(code, msg.c_str());
44264     }
44265   }
44266   vresult = SWIG_From_std_string(static_cast< std::string >(result));
44267   return vresult;
44268 fail:
44269   return Qnil;
44270 }
44271 
44272 
44273 SWIGINTERN VALUE
_wrap_open_stub__SWIG_0(int argc,VALUE * argv,VALUE self)44274 _wrap_open_stub__SWIG_0(int argc, VALUE *argv, VALUE self) {
44275   std::string *arg1 = 0 ;
44276   int res1 = SWIG_OLDOBJ ;
44277   Xapian::Database result;
44278   VALUE vresult = Qnil;
44279 
44280   if ((argc < 1) || (argc > 1)) {
44281     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
44282   }
44283   {
44284     std::string *ptr = (std::string *)0;
44285     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
44286     if (!SWIG_IsOK(res1)) {
44287       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Auto::open_stub", 1, argv[0] ));
44288     }
44289     if (!ptr) {
44290       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Auto::open_stub", 1, argv[0]));
44291     }
44292     arg1 = ptr;
44293   }
44294   {
44295     try {
44296       result = Xapian::Auto::open_stub((std::string const &)*arg1);
44297     } catch (...) {
44298       string msg;
44299       int code = XapianExceptionHandler(msg);
44300       SWIG_exception(code, msg.c_str());
44301     }
44302   }
44303   vresult = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN |  0 );
44304   if (SWIG_IsNewObj(res1)) delete arg1;
44305   return vresult;
44306 fail:
44307   if (SWIG_IsNewObj(res1)) delete arg1;
44308   return Qnil;
44309 }
44310 
44311 
44312 SWIGINTERN VALUE
_wrap_open_stub__SWIG_1(int argc,VALUE * argv,VALUE self)44313 _wrap_open_stub__SWIG_1(int argc, VALUE *argv, VALUE self) {
44314   std::string *arg1 = 0 ;
44315   int arg2 ;
44316   int res1 = SWIG_OLDOBJ ;
44317   int val2 ;
44318   int ecode2 = 0 ;
44319   Xapian::WritableDatabase result;
44320   VALUE vresult = Qnil;
44321 
44322   if ((argc < 2) || (argc > 2)) {
44323     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
44324   }
44325   {
44326     std::string *ptr = (std::string *)0;
44327     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
44328     if (!SWIG_IsOK(res1)) {
44329       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Auto::open_stub", 1, argv[0] ));
44330     }
44331     if (!ptr) {
44332       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Auto::open_stub", 1, argv[0]));
44333     }
44334     arg1 = ptr;
44335   }
44336   ecode2 = SWIG_AsVal_int(argv[1], &val2);
44337   if (!SWIG_IsOK(ecode2)) {
44338     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Xapian::Auto::open_stub", 2, argv[1] ));
44339   }
44340   arg2 = static_cast< int >(val2);
44341   {
44342     try {
44343       result = Xapian::Auto::open_stub((std::string const &)*arg1,arg2);
44344     } catch (...) {
44345       string msg;
44346       int code = XapianExceptionHandler(msg);
44347       SWIG_exception(code, msg.c_str());
44348     }
44349   }
44350   vresult = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
44351   if (SWIG_IsNewObj(res1)) delete arg1;
44352   return vresult;
44353 fail:
44354   if (SWIG_IsNewObj(res1)) delete arg1;
44355   return Qnil;
44356 }
44357 
44358 
_wrap_open_stub(int nargs,VALUE * args,VALUE self)44359 SWIGINTERN VALUE _wrap_open_stub(int nargs, VALUE *args, VALUE self) {
44360   int argc;
44361   VALUE argv[2];
44362   int ii;
44363 
44364   argc = nargs;
44365   if (argc > 2) SWIG_fail;
44366   for (ii = 0; (ii < argc); ++ii) {
44367     argv[ii] = args[ii];
44368   }
44369   if (argc == 1) {
44370     int _v;
44371     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
44372     _v = SWIG_CheckState(res);
44373     if (_v) {
44374       return _wrap_open_stub__SWIG_0(nargs, args, self);
44375     }
44376   }
44377   if (argc == 2) {
44378     int _v;
44379     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
44380     _v = SWIG_CheckState(res);
44381     if (_v) {
44382       {
44383         int res = SWIG_AsVal_int(argv[1], NULL);
44384         _v = SWIG_CheckState(res);
44385       }
44386       if (_v) {
44387         return _wrap_open_stub__SWIG_1(nargs, args, self);
44388       }
44389     }
44390   }
44391 
44392 fail:
44393   Ruby_Format_OverloadedError( argc, 2, "open_stub",
44394     "    Xapian::Database open_stub(std::string const &file)\n"
44395     "    Xapian::WritableDatabase open_stub(std::string const &file, int action)\n");
44396 
44397   return Qnil;
44398 }
44399 
44400 
44401 SWIGINTERN VALUE
_wrap_inmemory_open(int argc,VALUE * argv,VALUE self)44402 _wrap_inmemory_open(int argc, VALUE *argv, VALUE self) {
44403   Xapian::WritableDatabase result;
44404   VALUE vresult = Qnil;
44405 
44406   if ((argc < 0) || (argc > 0)) {
44407     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
44408   }
44409   {
44410     try {
44411       result = Xapian::InMemory::open();
44412     } catch (...) {
44413       string msg;
44414       int code = XapianExceptionHandler(msg);
44415       SWIG_exception(code, msg.c_str());
44416     }
44417   }
44418   vresult = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
44419   return vresult;
44420 fail:
44421   return Qnil;
44422 }
44423 
44424 
44425 SWIGINTERN VALUE
_wrap_chert_open__SWIG_0(int argc,VALUE * argv,VALUE self)44426 _wrap_chert_open__SWIG_0(int argc, VALUE *argv, VALUE self) {
44427   std::string *arg1 = 0 ;
44428   int res1 = SWIG_OLDOBJ ;
44429   Xapian::Database result;
44430   VALUE vresult = Qnil;
44431 
44432   if ((argc < 1) || (argc > 1)) {
44433     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
44434   }
44435   {
44436     std::string *ptr = (std::string *)0;
44437     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
44438     if (!SWIG_IsOK(res1)) {
44439       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Chert::open", 1, argv[0] ));
44440     }
44441     if (!ptr) {
44442       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Chert::open", 1, argv[0]));
44443     }
44444     arg1 = ptr;
44445   }
44446   {
44447     try {
44448       result = Xapian::Chert::open((std::string const &)*arg1);
44449     } catch (...) {
44450       string msg;
44451       int code = XapianExceptionHandler(msg);
44452       SWIG_exception(code, msg.c_str());
44453     }
44454   }
44455   vresult = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN |  0 );
44456   if (SWIG_IsNewObj(res1)) delete arg1;
44457   return vresult;
44458 fail:
44459   if (SWIG_IsNewObj(res1)) delete arg1;
44460   return Qnil;
44461 }
44462 
44463 
44464 SWIGINTERN VALUE
_wrap_chert_open__SWIG_1(int argc,VALUE * argv,VALUE self)44465 _wrap_chert_open__SWIG_1(int argc, VALUE *argv, VALUE self) {
44466   std::string *arg1 = 0 ;
44467   int arg2 ;
44468   int arg3 ;
44469   int res1 = SWIG_OLDOBJ ;
44470   int val2 ;
44471   int ecode2 = 0 ;
44472   int val3 ;
44473   int ecode3 = 0 ;
44474   Xapian::WritableDatabase result;
44475   VALUE vresult = Qnil;
44476 
44477   if ((argc < 3) || (argc > 3)) {
44478     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
44479   }
44480   {
44481     std::string *ptr = (std::string *)0;
44482     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
44483     if (!SWIG_IsOK(res1)) {
44484       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Chert::open", 1, argv[0] ));
44485     }
44486     if (!ptr) {
44487       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Chert::open", 1, argv[0]));
44488     }
44489     arg1 = ptr;
44490   }
44491   ecode2 = SWIG_AsVal_int(argv[1], &val2);
44492   if (!SWIG_IsOK(ecode2)) {
44493     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Xapian::Chert::open", 2, argv[1] ));
44494   }
44495   arg2 = static_cast< int >(val2);
44496   ecode3 = SWIG_AsVal_int(argv[2], &val3);
44497   if (!SWIG_IsOK(ecode3)) {
44498     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","Xapian::Chert::open", 3, argv[2] ));
44499   }
44500   arg3 = static_cast< int >(val3);
44501   {
44502     try {
44503       result = Xapian::Chert::open((std::string const &)*arg1,arg2,arg3);
44504     } catch (...) {
44505       string msg;
44506       int code = XapianExceptionHandler(msg);
44507       SWIG_exception(code, msg.c_str());
44508     }
44509   }
44510   vresult = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
44511   if (SWIG_IsNewObj(res1)) delete arg1;
44512   return vresult;
44513 fail:
44514   if (SWIG_IsNewObj(res1)) delete arg1;
44515   return Qnil;
44516 }
44517 
44518 
44519 SWIGINTERN VALUE
_wrap_chert_open__SWIG_2(int argc,VALUE * argv,VALUE self)44520 _wrap_chert_open__SWIG_2(int argc, VALUE *argv, VALUE self) {
44521   std::string *arg1 = 0 ;
44522   int arg2 ;
44523   int res1 = SWIG_OLDOBJ ;
44524   int val2 ;
44525   int ecode2 = 0 ;
44526   Xapian::WritableDatabase result;
44527   VALUE vresult = Qnil;
44528 
44529   if ((argc < 2) || (argc > 2)) {
44530     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
44531   }
44532   {
44533     std::string *ptr = (std::string *)0;
44534     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
44535     if (!SWIG_IsOK(res1)) {
44536       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Chert::open", 1, argv[0] ));
44537     }
44538     if (!ptr) {
44539       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Chert::open", 1, argv[0]));
44540     }
44541     arg1 = ptr;
44542   }
44543   ecode2 = SWIG_AsVal_int(argv[1], &val2);
44544   if (!SWIG_IsOK(ecode2)) {
44545     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Xapian::Chert::open", 2, argv[1] ));
44546   }
44547   arg2 = static_cast< int >(val2);
44548   {
44549     try {
44550       result = Xapian::Chert::open((std::string const &)*arg1,arg2);
44551     } catch (...) {
44552       string msg;
44553       int code = XapianExceptionHandler(msg);
44554       SWIG_exception(code, msg.c_str());
44555     }
44556   }
44557   vresult = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
44558   if (SWIG_IsNewObj(res1)) delete arg1;
44559   return vresult;
44560 fail:
44561   if (SWIG_IsNewObj(res1)) delete arg1;
44562   return Qnil;
44563 }
44564 
44565 
_wrap_chert_open(int nargs,VALUE * args,VALUE self)44566 SWIGINTERN VALUE _wrap_chert_open(int nargs, VALUE *args, VALUE self) {
44567   int argc;
44568   VALUE argv[3];
44569   int ii;
44570 
44571   argc = nargs;
44572   if (argc > 3) SWIG_fail;
44573   for (ii = 0; (ii < argc); ++ii) {
44574     argv[ii] = args[ii];
44575   }
44576   if (argc == 1) {
44577     int _v;
44578     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
44579     _v = SWIG_CheckState(res);
44580     if (_v) {
44581       return _wrap_chert_open__SWIG_0(nargs, args, self);
44582     }
44583   }
44584   if (argc == 2) {
44585     int _v;
44586     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
44587     _v = SWIG_CheckState(res);
44588     if (_v) {
44589       {
44590         int res = SWIG_AsVal_int(argv[1], NULL);
44591         _v = SWIG_CheckState(res);
44592       }
44593       if (_v) {
44594         return _wrap_chert_open__SWIG_2(nargs, args, self);
44595       }
44596     }
44597   }
44598   if (argc == 3) {
44599     int _v;
44600     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
44601     _v = SWIG_CheckState(res);
44602     if (_v) {
44603       {
44604         int res = SWIG_AsVal_int(argv[1], NULL);
44605         _v = SWIG_CheckState(res);
44606       }
44607       if (_v) {
44608         {
44609           int res = SWIG_AsVal_int(argv[2], NULL);
44610           _v = SWIG_CheckState(res);
44611         }
44612         if (_v) {
44613           return _wrap_chert_open__SWIG_1(nargs, args, self);
44614         }
44615       }
44616     }
44617   }
44618 
44619 fail:
44620   Ruby_Format_OverloadedError( argc, 3, "chert_open",
44621     "    Xapian::Database chert_open(std::string const &dir)\n"
44622     "    Xapian::WritableDatabase chert_open(std::string const &dir, int action, int block_size)\n"
44623     "    Xapian::WritableDatabase chert_open(std::string const &dir, int action)\n");
44624 
44625   return Qnil;
44626 }
44627 
44628 
44629 SWIGINTERN VALUE
_wrap_remote_open__SWIG_0(int argc,VALUE * argv,VALUE self)44630 _wrap_remote_open__SWIG_0(int argc, VALUE *argv, VALUE self) {
44631   std::string *arg1 = 0 ;
44632   unsigned int arg2 ;
44633   useconds_t arg3 ;
44634   useconds_t arg4 ;
44635   int res1 = SWIG_OLDOBJ ;
44636   unsigned int val2 ;
44637   int ecode2 = 0 ;
44638   unsigned int val3 ;
44639   int ecode3 = 0 ;
44640   unsigned int val4 ;
44641   int ecode4 = 0 ;
44642   Xapian::Database result;
44643   VALUE vresult = Qnil;
44644 
44645   if ((argc < 4) || (argc > 4)) {
44646     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
44647   }
44648   {
44649     std::string *ptr = (std::string *)0;
44650     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
44651     if (!SWIG_IsOK(res1)) {
44652       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Remote::open", 1, argv[0] ));
44653     }
44654     if (!ptr) {
44655       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Remote::open", 1, argv[0]));
44656     }
44657     arg1 = ptr;
44658   }
44659   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
44660   if (!SWIG_IsOK(ecode2)) {
44661     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","Xapian::Remote::open", 2, argv[1] ));
44662   }
44663   arg2 = static_cast< unsigned int >(val2);
44664   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
44665   if (!SWIG_IsOK(ecode3)) {
44666     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "useconds_t","Xapian::Remote::open", 3, argv[2] ));
44667   }
44668   arg3 = static_cast< useconds_t >(val3);
44669   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[3], &val4);
44670   if (!SWIG_IsOK(ecode4)) {
44671     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "useconds_t","Xapian::Remote::open", 4, argv[3] ));
44672   }
44673   arg4 = static_cast< useconds_t >(val4);
44674   {
44675     try {
44676       result = Xapian::Remote::open((std::string const &)*arg1,arg2,arg3,arg4);
44677     } catch (...) {
44678       string msg;
44679       int code = XapianExceptionHandler(msg);
44680       SWIG_exception(code, msg.c_str());
44681     }
44682   }
44683   vresult = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN |  0 );
44684   if (SWIG_IsNewObj(res1)) delete arg1;
44685   return vresult;
44686 fail:
44687   if (SWIG_IsNewObj(res1)) delete arg1;
44688   return Qnil;
44689 }
44690 
44691 
44692 SWIGINTERN VALUE
_wrap_remote_open__SWIG_1(int argc,VALUE * argv,VALUE self)44693 _wrap_remote_open__SWIG_1(int argc, VALUE *argv, VALUE self) {
44694   std::string *arg1 = 0 ;
44695   unsigned int arg2 ;
44696   useconds_t arg3 ;
44697   int res1 = SWIG_OLDOBJ ;
44698   unsigned int val2 ;
44699   int ecode2 = 0 ;
44700   unsigned int val3 ;
44701   int ecode3 = 0 ;
44702   Xapian::Database result;
44703   VALUE vresult = Qnil;
44704 
44705   if ((argc < 3) || (argc > 3)) {
44706     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
44707   }
44708   {
44709     std::string *ptr = (std::string *)0;
44710     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
44711     if (!SWIG_IsOK(res1)) {
44712       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Remote::open", 1, argv[0] ));
44713     }
44714     if (!ptr) {
44715       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Remote::open", 1, argv[0]));
44716     }
44717     arg1 = ptr;
44718   }
44719   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
44720   if (!SWIG_IsOK(ecode2)) {
44721     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","Xapian::Remote::open", 2, argv[1] ));
44722   }
44723   arg2 = static_cast< unsigned int >(val2);
44724   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
44725   if (!SWIG_IsOK(ecode3)) {
44726     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "useconds_t","Xapian::Remote::open", 3, argv[2] ));
44727   }
44728   arg3 = static_cast< useconds_t >(val3);
44729   {
44730     try {
44731       result = Xapian::Remote::open((std::string const &)*arg1,arg2,arg3);
44732     } catch (...) {
44733       string msg;
44734       int code = XapianExceptionHandler(msg);
44735       SWIG_exception(code, msg.c_str());
44736     }
44737   }
44738   vresult = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN |  0 );
44739   if (SWIG_IsNewObj(res1)) delete arg1;
44740   return vresult;
44741 fail:
44742   if (SWIG_IsNewObj(res1)) delete arg1;
44743   return Qnil;
44744 }
44745 
44746 
44747 SWIGINTERN VALUE
_wrap_remote_open__SWIG_2(int argc,VALUE * argv,VALUE self)44748 _wrap_remote_open__SWIG_2(int argc, VALUE *argv, VALUE self) {
44749   std::string *arg1 = 0 ;
44750   unsigned int arg2 ;
44751   int res1 = SWIG_OLDOBJ ;
44752   unsigned int val2 ;
44753   int ecode2 = 0 ;
44754   Xapian::Database result;
44755   VALUE vresult = Qnil;
44756 
44757   if ((argc < 2) || (argc > 2)) {
44758     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
44759   }
44760   {
44761     std::string *ptr = (std::string *)0;
44762     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
44763     if (!SWIG_IsOK(res1)) {
44764       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Remote::open", 1, argv[0] ));
44765     }
44766     if (!ptr) {
44767       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Remote::open", 1, argv[0]));
44768     }
44769     arg1 = ptr;
44770   }
44771   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
44772   if (!SWIG_IsOK(ecode2)) {
44773     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","Xapian::Remote::open", 2, argv[1] ));
44774   }
44775   arg2 = static_cast< unsigned int >(val2);
44776   {
44777     try {
44778       result = Xapian::Remote::open((std::string const &)*arg1,arg2);
44779     } catch (...) {
44780       string msg;
44781       int code = XapianExceptionHandler(msg);
44782       SWIG_exception(code, msg.c_str());
44783     }
44784   }
44785   vresult = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN |  0 );
44786   if (SWIG_IsNewObj(res1)) delete arg1;
44787   return vresult;
44788 fail:
44789   if (SWIG_IsNewObj(res1)) delete arg1;
44790   return Qnil;
44791 }
44792 
44793 
44794 SWIGINTERN VALUE
_wrap_remote_open_writable__SWIG_0(int argc,VALUE * argv,VALUE self)44795 _wrap_remote_open_writable__SWIG_0(int argc, VALUE *argv, VALUE self) {
44796   std::string *arg1 = 0 ;
44797   unsigned int arg2 ;
44798   useconds_t arg3 ;
44799   useconds_t arg4 ;
44800   int arg5 ;
44801   int res1 = SWIG_OLDOBJ ;
44802   unsigned int val2 ;
44803   int ecode2 = 0 ;
44804   unsigned int val3 ;
44805   int ecode3 = 0 ;
44806   unsigned int val4 ;
44807   int ecode4 = 0 ;
44808   int val5 ;
44809   int ecode5 = 0 ;
44810   Xapian::WritableDatabase result;
44811   VALUE vresult = Qnil;
44812 
44813   if ((argc < 5) || (argc > 5)) {
44814     rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
44815   }
44816   {
44817     std::string *ptr = (std::string *)0;
44818     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
44819     if (!SWIG_IsOK(res1)) {
44820       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Remote::open_writable", 1, argv[0] ));
44821     }
44822     if (!ptr) {
44823       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Remote::open_writable", 1, argv[0]));
44824     }
44825     arg1 = ptr;
44826   }
44827   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
44828   if (!SWIG_IsOK(ecode2)) {
44829     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","Xapian::Remote::open_writable", 2, argv[1] ));
44830   }
44831   arg2 = static_cast< unsigned int >(val2);
44832   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
44833   if (!SWIG_IsOK(ecode3)) {
44834     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "useconds_t","Xapian::Remote::open_writable", 3, argv[2] ));
44835   }
44836   arg3 = static_cast< useconds_t >(val3);
44837   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[3], &val4);
44838   if (!SWIG_IsOK(ecode4)) {
44839     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "useconds_t","Xapian::Remote::open_writable", 4, argv[3] ));
44840   }
44841   arg4 = static_cast< useconds_t >(val4);
44842   ecode5 = SWIG_AsVal_int(argv[4], &val5);
44843   if (!SWIG_IsOK(ecode5)) {
44844     SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "int","Xapian::Remote::open_writable", 5, argv[4] ));
44845   }
44846   arg5 = static_cast< int >(val5);
44847   {
44848     try {
44849       result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,arg3,arg4,arg5);
44850     } catch (...) {
44851       string msg;
44852       int code = XapianExceptionHandler(msg);
44853       SWIG_exception(code, msg.c_str());
44854     }
44855   }
44856   vresult = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
44857   if (SWIG_IsNewObj(res1)) delete arg1;
44858   return vresult;
44859 fail:
44860   if (SWIG_IsNewObj(res1)) delete arg1;
44861   return Qnil;
44862 }
44863 
44864 
44865 SWIGINTERN VALUE
_wrap_remote_open_writable__SWIG_1(int argc,VALUE * argv,VALUE self)44866 _wrap_remote_open_writable__SWIG_1(int argc, VALUE *argv, VALUE self) {
44867   std::string *arg1 = 0 ;
44868   unsigned int arg2 ;
44869   useconds_t arg3 ;
44870   useconds_t arg4 ;
44871   int res1 = SWIG_OLDOBJ ;
44872   unsigned int val2 ;
44873   int ecode2 = 0 ;
44874   unsigned int val3 ;
44875   int ecode3 = 0 ;
44876   unsigned int val4 ;
44877   int ecode4 = 0 ;
44878   Xapian::WritableDatabase result;
44879   VALUE vresult = Qnil;
44880 
44881   if ((argc < 4) || (argc > 4)) {
44882     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
44883   }
44884   {
44885     std::string *ptr = (std::string *)0;
44886     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
44887     if (!SWIG_IsOK(res1)) {
44888       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Remote::open_writable", 1, argv[0] ));
44889     }
44890     if (!ptr) {
44891       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Remote::open_writable", 1, argv[0]));
44892     }
44893     arg1 = ptr;
44894   }
44895   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
44896   if (!SWIG_IsOK(ecode2)) {
44897     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","Xapian::Remote::open_writable", 2, argv[1] ));
44898   }
44899   arg2 = static_cast< unsigned int >(val2);
44900   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
44901   if (!SWIG_IsOK(ecode3)) {
44902     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "useconds_t","Xapian::Remote::open_writable", 3, argv[2] ));
44903   }
44904   arg3 = static_cast< useconds_t >(val3);
44905   ecode4 = SWIG_AsVal_unsigned_SS_int(argv[3], &val4);
44906   if (!SWIG_IsOK(ecode4)) {
44907     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "useconds_t","Xapian::Remote::open_writable", 4, argv[3] ));
44908   }
44909   arg4 = static_cast< useconds_t >(val4);
44910   {
44911     try {
44912       result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,arg3,arg4);
44913     } catch (...) {
44914       string msg;
44915       int code = XapianExceptionHandler(msg);
44916       SWIG_exception(code, msg.c_str());
44917     }
44918   }
44919   vresult = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
44920   if (SWIG_IsNewObj(res1)) delete arg1;
44921   return vresult;
44922 fail:
44923   if (SWIG_IsNewObj(res1)) delete arg1;
44924   return Qnil;
44925 }
44926 
44927 
44928 SWIGINTERN VALUE
_wrap_remote_open_writable__SWIG_2(int argc,VALUE * argv,VALUE self)44929 _wrap_remote_open_writable__SWIG_2(int argc, VALUE *argv, VALUE self) {
44930   std::string *arg1 = 0 ;
44931   unsigned int arg2 ;
44932   useconds_t arg3 ;
44933   int res1 = SWIG_OLDOBJ ;
44934   unsigned int val2 ;
44935   int ecode2 = 0 ;
44936   unsigned int val3 ;
44937   int ecode3 = 0 ;
44938   Xapian::WritableDatabase result;
44939   VALUE vresult = Qnil;
44940 
44941   if ((argc < 3) || (argc > 3)) {
44942     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
44943   }
44944   {
44945     std::string *ptr = (std::string *)0;
44946     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
44947     if (!SWIG_IsOK(res1)) {
44948       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Remote::open_writable", 1, argv[0] ));
44949     }
44950     if (!ptr) {
44951       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Remote::open_writable", 1, argv[0]));
44952     }
44953     arg1 = ptr;
44954   }
44955   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
44956   if (!SWIG_IsOK(ecode2)) {
44957     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","Xapian::Remote::open_writable", 2, argv[1] ));
44958   }
44959   arg2 = static_cast< unsigned int >(val2);
44960   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
44961   if (!SWIG_IsOK(ecode3)) {
44962     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "useconds_t","Xapian::Remote::open_writable", 3, argv[2] ));
44963   }
44964   arg3 = static_cast< useconds_t >(val3);
44965   {
44966     try {
44967       result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,arg3);
44968     } catch (...) {
44969       string msg;
44970       int code = XapianExceptionHandler(msg);
44971       SWIG_exception(code, msg.c_str());
44972     }
44973   }
44974   vresult = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
44975   if (SWIG_IsNewObj(res1)) delete arg1;
44976   return vresult;
44977 fail:
44978   if (SWIG_IsNewObj(res1)) delete arg1;
44979   return Qnil;
44980 }
44981 
44982 
44983 SWIGINTERN VALUE
_wrap_remote_open_writable__SWIG_3(int argc,VALUE * argv,VALUE self)44984 _wrap_remote_open_writable__SWIG_3(int argc, VALUE *argv, VALUE self) {
44985   std::string *arg1 = 0 ;
44986   unsigned int arg2 ;
44987   int res1 = SWIG_OLDOBJ ;
44988   unsigned int val2 ;
44989   int ecode2 = 0 ;
44990   Xapian::WritableDatabase result;
44991   VALUE vresult = Qnil;
44992 
44993   if ((argc < 2) || (argc > 2)) {
44994     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
44995   }
44996   {
44997     std::string *ptr = (std::string *)0;
44998     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
44999     if (!SWIG_IsOK(res1)) {
45000       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Remote::open_writable", 1, argv[0] ));
45001     }
45002     if (!ptr) {
45003       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Remote::open_writable", 1, argv[0]));
45004     }
45005     arg1 = ptr;
45006   }
45007   ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
45008   if (!SWIG_IsOK(ecode2)) {
45009     SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","Xapian::Remote::open_writable", 2, argv[1] ));
45010   }
45011   arg2 = static_cast< unsigned int >(val2);
45012   {
45013     try {
45014       result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2);
45015     } catch (...) {
45016       string msg;
45017       int code = XapianExceptionHandler(msg);
45018       SWIG_exception(code, msg.c_str());
45019     }
45020   }
45021   vresult = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
45022   if (SWIG_IsNewObj(res1)) delete arg1;
45023   return vresult;
45024 fail:
45025   if (SWIG_IsNewObj(res1)) delete arg1;
45026   return Qnil;
45027 }
45028 
45029 
45030 SWIGINTERN VALUE
_wrap_remote_open__SWIG_3(int argc,VALUE * argv,VALUE self)45031 _wrap_remote_open__SWIG_3(int argc, VALUE *argv, VALUE self) {
45032   std::string *arg1 = 0 ;
45033   std::string *arg2 = 0 ;
45034   useconds_t arg3 ;
45035   int res1 = SWIG_OLDOBJ ;
45036   int res2 = SWIG_OLDOBJ ;
45037   unsigned int val3 ;
45038   int ecode3 = 0 ;
45039   Xapian::Database result;
45040   VALUE vresult = Qnil;
45041 
45042   if ((argc < 3) || (argc > 3)) {
45043     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
45044   }
45045   {
45046     std::string *ptr = (std::string *)0;
45047     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
45048     if (!SWIG_IsOK(res1)) {
45049       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Remote::open", 1, argv[0] ));
45050     }
45051     if (!ptr) {
45052       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Remote::open", 1, argv[0]));
45053     }
45054     arg1 = ptr;
45055   }
45056   {
45057     std::string *ptr = (std::string *)0;
45058     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
45059     if (!SWIG_IsOK(res2)) {
45060       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","Xapian::Remote::open", 2, argv[1] ));
45061     }
45062     if (!ptr) {
45063       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Remote::open", 2, argv[1]));
45064     }
45065     arg2 = ptr;
45066   }
45067   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
45068   if (!SWIG_IsOK(ecode3)) {
45069     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "useconds_t","Xapian::Remote::open", 3, argv[2] ));
45070   }
45071   arg3 = static_cast< useconds_t >(val3);
45072   {
45073     try {
45074       result = Xapian::Remote::open((std::string const &)*arg1,(std::string const &)*arg2,arg3);
45075     } catch (...) {
45076       string msg;
45077       int code = XapianExceptionHandler(msg);
45078       SWIG_exception(code, msg.c_str());
45079     }
45080   }
45081   vresult = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN |  0 );
45082   if (SWIG_IsNewObj(res1)) delete arg1;
45083   if (SWIG_IsNewObj(res2)) delete arg2;
45084   return vresult;
45085 fail:
45086   if (SWIG_IsNewObj(res1)) delete arg1;
45087   if (SWIG_IsNewObj(res2)) delete arg2;
45088   return Qnil;
45089 }
45090 
45091 
45092 SWIGINTERN VALUE
_wrap_remote_open__SWIG_4(int argc,VALUE * argv,VALUE self)45093 _wrap_remote_open__SWIG_4(int argc, VALUE *argv, VALUE self) {
45094   std::string *arg1 = 0 ;
45095   std::string *arg2 = 0 ;
45096   int res1 = SWIG_OLDOBJ ;
45097   int res2 = SWIG_OLDOBJ ;
45098   Xapian::Database result;
45099   VALUE vresult = Qnil;
45100 
45101   if ((argc < 2) || (argc > 2)) {
45102     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
45103   }
45104   {
45105     std::string *ptr = (std::string *)0;
45106     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
45107     if (!SWIG_IsOK(res1)) {
45108       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Remote::open", 1, argv[0] ));
45109     }
45110     if (!ptr) {
45111       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Remote::open", 1, argv[0]));
45112     }
45113     arg1 = ptr;
45114   }
45115   {
45116     std::string *ptr = (std::string *)0;
45117     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
45118     if (!SWIG_IsOK(res2)) {
45119       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","Xapian::Remote::open", 2, argv[1] ));
45120     }
45121     if (!ptr) {
45122       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Remote::open", 2, argv[1]));
45123     }
45124     arg2 = ptr;
45125   }
45126   {
45127     try {
45128       result = Xapian::Remote::open((std::string const &)*arg1,(std::string const &)*arg2);
45129     } catch (...) {
45130       string msg;
45131       int code = XapianExceptionHandler(msg);
45132       SWIG_exception(code, msg.c_str());
45133     }
45134   }
45135   vresult = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN |  0 );
45136   if (SWIG_IsNewObj(res1)) delete arg1;
45137   if (SWIG_IsNewObj(res2)) delete arg2;
45138   return vresult;
45139 fail:
45140   if (SWIG_IsNewObj(res1)) delete arg1;
45141   if (SWIG_IsNewObj(res2)) delete arg2;
45142   return Qnil;
45143 }
45144 
45145 
_wrap_remote_open(int nargs,VALUE * args,VALUE self)45146 SWIGINTERN VALUE _wrap_remote_open(int nargs, VALUE *args, VALUE self) {
45147   int argc;
45148   VALUE argv[4];
45149   int ii;
45150 
45151   argc = nargs;
45152   if (argc > 4) SWIG_fail;
45153   for (ii = 0; (ii < argc); ++ii) {
45154     argv[ii] = args[ii];
45155   }
45156   if (argc == 2) {
45157     int _v;
45158     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
45159     _v = SWIG_CheckState(res);
45160     if (_v) {
45161       {
45162         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
45163         _v = SWIG_CheckState(res);
45164       }
45165       if (_v) {
45166         return _wrap_remote_open__SWIG_2(nargs, args, self);
45167       }
45168     }
45169   }
45170   if (argc == 2) {
45171     int _v;
45172     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
45173     _v = SWIG_CheckState(res);
45174     if (_v) {
45175       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
45176       _v = SWIG_CheckState(res);
45177       if (_v) {
45178         return _wrap_remote_open__SWIG_4(nargs, args, self);
45179       }
45180     }
45181   }
45182   if (argc == 3) {
45183     int _v;
45184     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
45185     _v = SWIG_CheckState(res);
45186     if (_v) {
45187       {
45188         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
45189         _v = SWIG_CheckState(res);
45190       }
45191       if (_v) {
45192         {
45193           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
45194           _v = SWIG_CheckState(res);
45195         }
45196         if (_v) {
45197           return _wrap_remote_open__SWIG_1(nargs, args, self);
45198         }
45199       }
45200     }
45201   }
45202   if (argc == 3) {
45203     int _v;
45204     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
45205     _v = SWIG_CheckState(res);
45206     if (_v) {
45207       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
45208       _v = SWIG_CheckState(res);
45209       if (_v) {
45210         {
45211           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
45212           _v = SWIG_CheckState(res);
45213         }
45214         if (_v) {
45215           return _wrap_remote_open__SWIG_3(nargs, args, self);
45216         }
45217       }
45218     }
45219   }
45220   if (argc == 4) {
45221     int _v;
45222     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
45223     _v = SWIG_CheckState(res);
45224     if (_v) {
45225       {
45226         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
45227         _v = SWIG_CheckState(res);
45228       }
45229       if (_v) {
45230         {
45231           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
45232           _v = SWIG_CheckState(res);
45233         }
45234         if (_v) {
45235           {
45236             int res = SWIG_AsVal_unsigned_SS_int(argv[3], NULL);
45237             _v = SWIG_CheckState(res);
45238           }
45239           if (_v) {
45240             return _wrap_remote_open__SWIG_0(nargs, args, self);
45241           }
45242         }
45243       }
45244     }
45245   }
45246 
45247 fail:
45248   Ruby_Format_OverloadedError( argc, 4, "remote_open",
45249     "    Xapian::Database remote_open(std::string const &host, unsigned int port, useconds_t timeout, useconds_t connect_timeout)\n"
45250     "    Xapian::Database remote_open(std::string const &host, unsigned int port, useconds_t timeout)\n"
45251     "    Xapian::Database remote_open(std::string const &host, unsigned int port)\n"
45252     "    Xapian::Database remote_open(std::string const &program, std::string const &args, useconds_t timeout)\n"
45253     "    Xapian::Database remote_open(std::string const &program, std::string const &args)\n");
45254 
45255   return Qnil;
45256 }
45257 
45258 
45259 SWIGINTERN VALUE
_wrap_remote_open_writable__SWIG_4(int argc,VALUE * argv,VALUE self)45260 _wrap_remote_open_writable__SWIG_4(int argc, VALUE *argv, VALUE self) {
45261   std::string *arg1 = 0 ;
45262   std::string *arg2 = 0 ;
45263   useconds_t arg3 ;
45264   int arg4 ;
45265   int res1 = SWIG_OLDOBJ ;
45266   int res2 = SWIG_OLDOBJ ;
45267   unsigned int val3 ;
45268   int ecode3 = 0 ;
45269   int val4 ;
45270   int ecode4 = 0 ;
45271   Xapian::WritableDatabase result;
45272   VALUE vresult = Qnil;
45273 
45274   if ((argc < 4) || (argc > 4)) {
45275     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
45276   }
45277   {
45278     std::string *ptr = (std::string *)0;
45279     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
45280     if (!SWIG_IsOK(res1)) {
45281       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Remote::open_writable", 1, argv[0] ));
45282     }
45283     if (!ptr) {
45284       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Remote::open_writable", 1, argv[0]));
45285     }
45286     arg1 = ptr;
45287   }
45288   {
45289     std::string *ptr = (std::string *)0;
45290     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
45291     if (!SWIG_IsOK(res2)) {
45292       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","Xapian::Remote::open_writable", 2, argv[1] ));
45293     }
45294     if (!ptr) {
45295       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Remote::open_writable", 2, argv[1]));
45296     }
45297     arg2 = ptr;
45298   }
45299   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
45300   if (!SWIG_IsOK(ecode3)) {
45301     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "useconds_t","Xapian::Remote::open_writable", 3, argv[2] ));
45302   }
45303   arg3 = static_cast< useconds_t >(val3);
45304   ecode4 = SWIG_AsVal_int(argv[3], &val4);
45305   if (!SWIG_IsOK(ecode4)) {
45306     SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","Xapian::Remote::open_writable", 4, argv[3] ));
45307   }
45308   arg4 = static_cast< int >(val4);
45309   {
45310     try {
45311       result = Xapian::Remote::open_writable((std::string const &)*arg1,(std::string const &)*arg2,arg3,arg4);
45312     } catch (...) {
45313       string msg;
45314       int code = XapianExceptionHandler(msg);
45315       SWIG_exception(code, msg.c_str());
45316     }
45317   }
45318   vresult = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
45319   if (SWIG_IsNewObj(res1)) delete arg1;
45320   if (SWIG_IsNewObj(res2)) delete arg2;
45321   return vresult;
45322 fail:
45323   if (SWIG_IsNewObj(res1)) delete arg1;
45324   if (SWIG_IsNewObj(res2)) delete arg2;
45325   return Qnil;
45326 }
45327 
45328 
45329 SWIGINTERN VALUE
_wrap_remote_open_writable__SWIG_5(int argc,VALUE * argv,VALUE self)45330 _wrap_remote_open_writable__SWIG_5(int argc, VALUE *argv, VALUE self) {
45331   std::string *arg1 = 0 ;
45332   std::string *arg2 = 0 ;
45333   useconds_t arg3 ;
45334   int res1 = SWIG_OLDOBJ ;
45335   int res2 = SWIG_OLDOBJ ;
45336   unsigned int val3 ;
45337   int ecode3 = 0 ;
45338   Xapian::WritableDatabase result;
45339   VALUE vresult = Qnil;
45340 
45341   if ((argc < 3) || (argc > 3)) {
45342     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
45343   }
45344   {
45345     std::string *ptr = (std::string *)0;
45346     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
45347     if (!SWIG_IsOK(res1)) {
45348       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Remote::open_writable", 1, argv[0] ));
45349     }
45350     if (!ptr) {
45351       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Remote::open_writable", 1, argv[0]));
45352     }
45353     arg1 = ptr;
45354   }
45355   {
45356     std::string *ptr = (std::string *)0;
45357     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
45358     if (!SWIG_IsOK(res2)) {
45359       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","Xapian::Remote::open_writable", 2, argv[1] ));
45360     }
45361     if (!ptr) {
45362       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Remote::open_writable", 2, argv[1]));
45363     }
45364     arg2 = ptr;
45365   }
45366   ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
45367   if (!SWIG_IsOK(ecode3)) {
45368     SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "useconds_t","Xapian::Remote::open_writable", 3, argv[2] ));
45369   }
45370   arg3 = static_cast< useconds_t >(val3);
45371   {
45372     try {
45373       result = Xapian::Remote::open_writable((std::string const &)*arg1,(std::string const &)*arg2,arg3);
45374     } catch (...) {
45375       string msg;
45376       int code = XapianExceptionHandler(msg);
45377       SWIG_exception(code, msg.c_str());
45378     }
45379   }
45380   vresult = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
45381   if (SWIG_IsNewObj(res1)) delete arg1;
45382   if (SWIG_IsNewObj(res2)) delete arg2;
45383   return vresult;
45384 fail:
45385   if (SWIG_IsNewObj(res1)) delete arg1;
45386   if (SWIG_IsNewObj(res2)) delete arg2;
45387   return Qnil;
45388 }
45389 
45390 
45391 SWIGINTERN VALUE
_wrap_remote_open_writable__SWIG_6(int argc,VALUE * argv,VALUE self)45392 _wrap_remote_open_writable__SWIG_6(int argc, VALUE *argv, VALUE self) {
45393   std::string *arg1 = 0 ;
45394   std::string *arg2 = 0 ;
45395   int res1 = SWIG_OLDOBJ ;
45396   int res2 = SWIG_OLDOBJ ;
45397   Xapian::WritableDatabase result;
45398   VALUE vresult = Qnil;
45399 
45400   if ((argc < 2) || (argc > 2)) {
45401     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
45402   }
45403   {
45404     std::string *ptr = (std::string *)0;
45405     res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
45406     if (!SWIG_IsOK(res1)) {
45407       SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Xapian::Remote::open_writable", 1, argv[0] ));
45408     }
45409     if (!ptr) {
45410       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Remote::open_writable", 1, argv[0]));
45411     }
45412     arg1 = ptr;
45413   }
45414   {
45415     std::string *ptr = (std::string *)0;
45416     res2 = SWIG_AsPtr_std_string(argv[1], &ptr);
45417     if (!SWIG_IsOK(res2)) {
45418       SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","Xapian::Remote::open_writable", 2, argv[1] ));
45419     }
45420     if (!ptr) {
45421       SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Xapian::Remote::open_writable", 2, argv[1]));
45422     }
45423     arg2 = ptr;
45424   }
45425   {
45426     try {
45427       result = Xapian::Remote::open_writable((std::string const &)*arg1,(std::string const &)*arg2);
45428     } catch (...) {
45429       string msg;
45430       int code = XapianExceptionHandler(msg);
45431       SWIG_exception(code, msg.c_str());
45432     }
45433   }
45434   vresult = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
45435   if (SWIG_IsNewObj(res1)) delete arg1;
45436   if (SWIG_IsNewObj(res2)) delete arg2;
45437   return vresult;
45438 fail:
45439   if (SWIG_IsNewObj(res1)) delete arg1;
45440   if (SWIG_IsNewObj(res2)) delete arg2;
45441   return Qnil;
45442 }
45443 
45444 
_wrap_remote_open_writable(int nargs,VALUE * args,VALUE self)45445 SWIGINTERN VALUE _wrap_remote_open_writable(int nargs, VALUE *args, VALUE self) {
45446   int argc;
45447   VALUE argv[5];
45448   int ii;
45449 
45450   argc = nargs;
45451   if (argc > 5) SWIG_fail;
45452   for (ii = 0; (ii < argc); ++ii) {
45453     argv[ii] = args[ii];
45454   }
45455   if (argc == 2) {
45456     int _v;
45457     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
45458     _v = SWIG_CheckState(res);
45459     if (_v) {
45460       {
45461         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
45462         _v = SWIG_CheckState(res);
45463       }
45464       if (_v) {
45465         return _wrap_remote_open_writable__SWIG_3(nargs, args, self);
45466       }
45467     }
45468   }
45469   if (argc == 2) {
45470     int _v;
45471     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
45472     _v = SWIG_CheckState(res);
45473     if (_v) {
45474       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
45475       _v = SWIG_CheckState(res);
45476       if (_v) {
45477         return _wrap_remote_open_writable__SWIG_6(nargs, args, self);
45478       }
45479     }
45480   }
45481   if (argc == 3) {
45482     int _v;
45483     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
45484     _v = SWIG_CheckState(res);
45485     if (_v) {
45486       {
45487         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
45488         _v = SWIG_CheckState(res);
45489       }
45490       if (_v) {
45491         {
45492           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
45493           _v = SWIG_CheckState(res);
45494         }
45495         if (_v) {
45496           return _wrap_remote_open_writable__SWIG_2(nargs, args, self);
45497         }
45498       }
45499     }
45500   }
45501   if (argc == 3) {
45502     int _v;
45503     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
45504     _v = SWIG_CheckState(res);
45505     if (_v) {
45506       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
45507       _v = SWIG_CheckState(res);
45508       if (_v) {
45509         {
45510           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
45511           _v = SWIG_CheckState(res);
45512         }
45513         if (_v) {
45514           return _wrap_remote_open_writable__SWIG_5(nargs, args, self);
45515         }
45516       }
45517     }
45518   }
45519   if (argc == 4) {
45520     int _v;
45521     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
45522     _v = SWIG_CheckState(res);
45523     if (_v) {
45524       {
45525         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
45526         _v = SWIG_CheckState(res);
45527       }
45528       if (_v) {
45529         {
45530           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
45531           _v = SWIG_CheckState(res);
45532         }
45533         if (_v) {
45534           {
45535             int res = SWIG_AsVal_unsigned_SS_int(argv[3], NULL);
45536             _v = SWIG_CheckState(res);
45537           }
45538           if (_v) {
45539             return _wrap_remote_open_writable__SWIG_1(nargs, args, self);
45540           }
45541         }
45542       }
45543     }
45544   }
45545   if (argc == 4) {
45546     int _v;
45547     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
45548     _v = SWIG_CheckState(res);
45549     if (_v) {
45550       int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
45551       _v = SWIG_CheckState(res);
45552       if (_v) {
45553         {
45554           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
45555           _v = SWIG_CheckState(res);
45556         }
45557         if (_v) {
45558           {
45559             int res = SWIG_AsVal_int(argv[3], NULL);
45560             _v = SWIG_CheckState(res);
45561           }
45562           if (_v) {
45563             return _wrap_remote_open_writable__SWIG_4(nargs, args, self);
45564           }
45565         }
45566       }
45567     }
45568   }
45569   if (argc == 5) {
45570     int _v;
45571     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
45572     _v = SWIG_CheckState(res);
45573     if (_v) {
45574       {
45575         int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
45576         _v = SWIG_CheckState(res);
45577       }
45578       if (_v) {
45579         {
45580           int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
45581           _v = SWIG_CheckState(res);
45582         }
45583         if (_v) {
45584           {
45585             int res = SWIG_AsVal_unsigned_SS_int(argv[3], NULL);
45586             _v = SWIG_CheckState(res);
45587           }
45588           if (_v) {
45589             {
45590               int res = SWIG_AsVal_int(argv[4], NULL);
45591               _v = SWIG_CheckState(res);
45592             }
45593             if (_v) {
45594               return _wrap_remote_open_writable__SWIG_0(nargs, args, self);
45595             }
45596           }
45597         }
45598       }
45599     }
45600   }
45601 
45602 fail:
45603   Ruby_Format_OverloadedError( argc, 5, "remote_open_writable",
45604     "    Xapian::WritableDatabase remote_open_writable(std::string const &host, unsigned int port, useconds_t timeout, useconds_t connect_timeout, int flags)\n"
45605     "    Xapian::WritableDatabase remote_open_writable(std::string const &host, unsigned int port, useconds_t timeout, useconds_t connect_timeout)\n"
45606     "    Xapian::WritableDatabase remote_open_writable(std::string const &host, unsigned int port, useconds_t timeout)\n"
45607     "    Xapian::WritableDatabase remote_open_writable(std::string const &host, unsigned int port)\n"
45608     "    Xapian::WritableDatabase remote_open_writable(std::string const &program, std::string const &args, useconds_t timeout, int flags)\n"
45609     "    Xapian::WritableDatabase remote_open_writable(std::string const &program, std::string const &args, useconds_t timeout)\n"
45610     "    Xapian::WritableDatabase remote_open_writable(std::string const &program, std::string const &args)\n");
45611 
45612   return Qnil;
45613 }
45614 
45615 
45616 
45617 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
45618 
_p_swig__IteratorTo_p_swig__ConstIterator(void * x,int * SWIGUNUSEDPARM (newmemory))45619 static void *_p_swig__IteratorTo_p_swig__ConstIterator(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45620     return (void *)((swig::ConstIterator *)  ((swig::Iterator *) x));
45621 }
_p_Xapian__WritableDatabaseTo_p_Xapian__Database(void * x,int * SWIGUNUSEDPARM (newmemory))45622 static void *_p_Xapian__WritableDatabaseTo_p_Xapian__Database(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45623     return (void *)((Xapian::Database *)  ((Xapian::WritableDatabase *) x));
45624 }
_p_Xapian__GreatCircleMetricTo_p_Xapian__LatLongMetric(void * x,int * SWIGUNUSEDPARM (newmemory))45625 static void *_p_Xapian__GreatCircleMetricTo_p_Xapian__LatLongMetric(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45626     return (void *)((Xapian::LatLongMetric *)  ((Xapian::GreatCircleMetric *) x));
45627 }
_p_Xapian__ExpandDeciderFilterPrefixTo_p_Xapian__ExpandDecider(void * x,int * SWIGUNUSEDPARM (newmemory))45628 static void *_p_Xapian__ExpandDeciderFilterPrefixTo_p_Xapian__ExpandDecider(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45629     return (void *)((Xapian::ExpandDecider *)  ((Xapian::ExpandDeciderFilterPrefix *) x));
45630 }
_p_Xapian__ExpandDeciderAndTo_p_Xapian__ExpandDecider(void * x,int * SWIGUNUSEDPARM (newmemory))45631 static void *_p_Xapian__ExpandDeciderAndTo_p_Xapian__ExpandDecider(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45632     return (void *)((Xapian::ExpandDecider *)  ((Xapian::ExpandDeciderAnd *) x));
45633 }
_p_Xapian__ExpandDeciderFilterTermsTo_p_Xapian__ExpandDecider(void * x,int * SWIGUNUSEDPARM (newmemory))45634 static void *_p_Xapian__ExpandDeciderFilterTermsTo_p_Xapian__ExpandDecider(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45635     return (void *)((Xapian::ExpandDecider *)  ((Xapian::ExpandDeciderFilterTerms *) x));
45636 }
_p_Xapian__ValueSetMatchDeciderTo_p_Xapian__MatchDecider(void * x,int * SWIGUNUSEDPARM (newmemory))45637 static void *_p_Xapian__ValueSetMatchDeciderTo_p_Xapian__MatchDecider(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45638     return (void *)((Xapian::MatchDecider *)  ((Xapian::ValueSetMatchDecider *) x));
45639 }
_p_Xapian__MultiValueKeyMakerTo_p_Xapian__KeyMaker(void * x,int * SWIGUNUSEDPARM (newmemory))45640 static void *_p_Xapian__MultiValueKeyMakerTo_p_Xapian__KeyMaker(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45641     return (void *)((Xapian::KeyMaker *)  ((Xapian::MultiValueKeyMaker *) x));
45642 }
_p_Xapian__LatLongDistanceKeyMakerTo_p_Xapian__KeyMaker(void * x,int * SWIGUNUSEDPARM (newmemory))45643 static void *_p_Xapian__LatLongDistanceKeyMakerTo_p_Xapian__KeyMaker(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45644     return (void *)((Xapian::KeyMaker *)  ((Xapian::LatLongDistanceKeyMaker *) x));
45645 }
_p_Xapian__ValuePostingSourceTo_p_Xapian__PostingSource(void * x,int * SWIGUNUSEDPARM (newmemory))45646 static void *_p_Xapian__ValuePostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45647     return (void *)((Xapian::PostingSource *)  ((Xapian::ValuePostingSource *) x));
45648 }
_p_Xapian__ValueWeightPostingSourceTo_p_Xapian__PostingSource(void * x,int * SWIGUNUSEDPARM (newmemory))45649 static void *_p_Xapian__ValueWeightPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45650     return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *) ((Xapian::ValueWeightPostingSource *) x));
45651 }
_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__PostingSource(void * x,int * SWIGUNUSEDPARM (newmemory))45652 static void *_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45653     return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *)(Xapian::ValueWeightPostingSource *) ((Xapian::DecreasingValueWeightPostingSource *) x));
45654 }
_p_Xapian__ValueMapPostingSourceTo_p_Xapian__PostingSource(void * x,int * SWIGUNUSEDPARM (newmemory))45655 static void *_p_Xapian__ValueMapPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45656     return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *) ((Xapian::ValueMapPostingSource *) x));
45657 }
_p_Xapian__FixedWeightPostingSourceTo_p_Xapian__PostingSource(void * x,int * SWIGUNUSEDPARM (newmemory))45658 static void *_p_Xapian__FixedWeightPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45659     return (void *)((Xapian::PostingSource *)  ((Xapian::FixedWeightPostingSource *) x));
45660 }
_p_Xapian__LatLongDistancePostingSourceTo_p_Xapian__PostingSource(void * x,int * SWIGUNUSEDPARM (newmemory))45661 static void *_p_Xapian__LatLongDistancePostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45662     return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *) ((Xapian::LatLongDistancePostingSource *) x));
45663 }
_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValueWeightPostingSource(void * x,int * SWIGUNUSEDPARM (newmemory))45664 static void *_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValueWeightPostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45665     return (void *)((Xapian::ValueWeightPostingSource *)  ((Xapian::DecreasingValueWeightPostingSource *) x));
45666 }
_p_Xapian__ValueWeightPostingSourceTo_p_Xapian__ValuePostingSource(void * x,int * SWIGUNUSEDPARM (newmemory))45667 static void *_p_Xapian__ValueWeightPostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45668     return (void *)((Xapian::ValuePostingSource *)  ((Xapian::ValueWeightPostingSource *) x));
45669 }
_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValuePostingSource(void * x,int * SWIGUNUSEDPARM (newmemory))45670 static void *_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45671     return (void *)((Xapian::ValuePostingSource *) (Xapian::ValueWeightPostingSource *) ((Xapian::DecreasingValueWeightPostingSource *) x));
45672 }
_p_Xapian__ValueMapPostingSourceTo_p_Xapian__ValuePostingSource(void * x,int * SWIGUNUSEDPARM (newmemory))45673 static void *_p_Xapian__ValueMapPostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45674     return (void *)((Xapian::ValuePostingSource *)  ((Xapian::ValueMapPostingSource *) x));
45675 }
_p_Xapian__LatLongDistancePostingSourceTo_p_Xapian__ValuePostingSource(void * x,int * SWIGUNUSEDPARM (newmemory))45676 static void *_p_Xapian__LatLongDistancePostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45677     return (void *)((Xapian::ValuePostingSource *)  ((Xapian::LatLongDistancePostingSource *) x));
45678 }
_p_Xapian__DPHWeightTo_p_Xapian__Weight(void * x,int * SWIGUNUSEDPARM (newmemory))45679 static void *_p_Xapian__DPHWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45680     return (void *)((Xapian::Weight *)  ((Xapian::DPHWeight *) x));
45681 }
_p_Xapian__PL2WeightTo_p_Xapian__Weight(void * x,int * SWIGUNUSEDPARM (newmemory))45682 static void *_p_Xapian__PL2WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45683     return (void *)((Xapian::Weight *)  ((Xapian::PL2Weight *) x));
45684 }
_p_Xapian__DLHWeightTo_p_Xapian__Weight(void * x,int * SWIGUNUSEDPARM (newmemory))45685 static void *_p_Xapian__DLHWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45686     return (void *)((Xapian::Weight *)  ((Xapian::DLHWeight *) x));
45687 }
_p_Xapian__BB2WeightTo_p_Xapian__Weight(void * x,int * SWIGUNUSEDPARM (newmemory))45688 static void *_p_Xapian__BB2WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45689     return (void *)((Xapian::Weight *)  ((Xapian::BB2Weight *) x));
45690 }
_p_Xapian__IneB2WeightTo_p_Xapian__Weight(void * x,int * SWIGUNUSEDPARM (newmemory))45691 static void *_p_Xapian__IneB2WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45692     return (void *)((Xapian::Weight *)  ((Xapian::IneB2Weight *) x));
45693 }
_p_Xapian__IfB2WeightTo_p_Xapian__Weight(void * x,int * SWIGUNUSEDPARM (newmemory))45694 static void *_p_Xapian__IfB2WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45695     return (void *)((Xapian::Weight *)  ((Xapian::IfB2Weight *) x));
45696 }
_p_Xapian__InL2WeightTo_p_Xapian__Weight(void * x,int * SWIGUNUSEDPARM (newmemory))45697 static void *_p_Xapian__InL2WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45698     return (void *)((Xapian::Weight *)  ((Xapian::InL2Weight *) x));
45699 }
_p_Xapian__TradWeightTo_p_Xapian__Weight(void * x,int * SWIGUNUSEDPARM (newmemory))45700 static void *_p_Xapian__TradWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45701     return (void *)((Xapian::Weight *)  ((Xapian::TradWeight *) x));
45702 }
_p_Xapian__TfIdfWeightTo_p_Xapian__Weight(void * x,int * SWIGUNUSEDPARM (newmemory))45703 static void *_p_Xapian__TfIdfWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45704     return (void *)((Xapian::Weight *)  ((Xapian::TfIdfWeight *) x));
45705 }
_p_Xapian__BoolWeightTo_p_Xapian__Weight(void * x,int * SWIGUNUSEDPARM (newmemory))45706 static void *_p_Xapian__BoolWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45707     return (void *)((Xapian::Weight *)  ((Xapian::BoolWeight *) x));
45708 }
_p_Xapian__CoordWeightTo_p_Xapian__Weight(void * x,int * SWIGUNUSEDPARM (newmemory))45709 static void *_p_Xapian__CoordWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45710     return (void *)((Xapian::Weight *)  ((Xapian::CoordWeight *) x));
45711 }
_p_Xapian__LMWeightTo_p_Xapian__Weight(void * x,int * SWIGUNUSEDPARM (newmemory))45712 static void *_p_Xapian__LMWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45713     return (void *)((Xapian::Weight *)  ((Xapian::LMWeight *) x));
45714 }
_p_Xapian__PL2PlusWeightTo_p_Xapian__Weight(void * x,int * SWIGUNUSEDPARM (newmemory))45715 static void *_p_Xapian__PL2PlusWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45716     return (void *)((Xapian::Weight *)  ((Xapian::PL2PlusWeight *) x));
45717 }
_p_Xapian__BM25PlusWeightTo_p_Xapian__Weight(void * x,int * SWIGUNUSEDPARM (newmemory))45718 static void *_p_Xapian__BM25PlusWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45719     return (void *)((Xapian::Weight *)  ((Xapian::BM25PlusWeight *) x));
45720 }
_p_Xapian__BM25WeightTo_p_Xapian__Weight(void * x,int * SWIGUNUSEDPARM (newmemory))45721 static void *_p_Xapian__BM25WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45722     return (void *)((Xapian::Weight *)  ((Xapian::BM25Weight *) x));
45723 }
_p_Xapian__ValueCountMatchSpyTo_p_Xapian__MatchSpy(void * x,int * SWIGUNUSEDPARM (newmemory))45724 static void *_p_Xapian__ValueCountMatchSpyTo_p_Xapian__MatchSpy(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45725     return (void *)((Xapian::MatchSpy *)  ((Xapian::ValueCountMatchSpy *) x));
45726 }
_p_Xapian__SimpleStopperTo_p_Xapian__Stopper(void * x,int * SWIGUNUSEDPARM (newmemory))45727 static void *_p_Xapian__SimpleStopperTo_p_Xapian__Stopper(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45728     return (void *)((Xapian::Stopper *)  ((Xapian::SimpleStopper *) x));
45729 }
_p_Xapian__DateValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor(void * x,int * SWIGUNUSEDPARM (newmemory))45730 static void *_p_Xapian__DateValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45731     return (void *)((Xapian::StringValueRangeProcessor *)  ((Xapian::DateValueRangeProcessor *) x));
45732 }
_p_Xapian__NumberValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor(void * x,int * SWIGUNUSEDPARM (newmemory))45733 static void *_p_Xapian__NumberValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45734     return (void *)((Xapian::StringValueRangeProcessor *)  ((Xapian::NumberValueRangeProcessor *) x));
45735 }
_p_Xapian__StringValueRangeProcessorTo_p_Xapian__ValueRangeProcessor(void * x,int * SWIGUNUSEDPARM (newmemory))45736 static void *_p_Xapian__StringValueRangeProcessorTo_p_Xapian__ValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45737     return (void *)((Xapian::ValueRangeProcessor *)  ((Xapian::StringValueRangeProcessor *) x));
45738 }
_p_Xapian__DateValueRangeProcessorTo_p_Xapian__ValueRangeProcessor(void * x,int * SWIGUNUSEDPARM (newmemory))45739 static void *_p_Xapian__DateValueRangeProcessorTo_p_Xapian__ValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45740     return (void *)((Xapian::ValueRangeProcessor *) (Xapian::StringValueRangeProcessor *) ((Xapian::DateValueRangeProcessor *) x));
45741 }
_p_Xapian__NumberValueRangeProcessorTo_p_Xapian__ValueRangeProcessor(void * x,int * SWIGUNUSEDPARM (newmemory))45742 static void *_p_Xapian__NumberValueRangeProcessorTo_p_Xapian__ValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45743     return (void *)((Xapian::ValueRangeProcessor *) (Xapian::StringValueRangeProcessor *) ((Xapian::NumberValueRangeProcessor *) x));
45744 }
_p_Xapian__DateRangeProcessorTo_p_Xapian__RangeProcessor(void * x,int * SWIGUNUSEDPARM (newmemory))45745 static void *_p_Xapian__DateRangeProcessorTo_p_Xapian__RangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45746     return (void *)((Xapian::RangeProcessor *)  ((Xapian::DateRangeProcessor *) x));
45747 }
_p_Xapian__NumberRangeProcessorTo_p_Xapian__RangeProcessor(void * x,int * SWIGUNUSEDPARM (newmemory))45748 static void *_p_Xapian__NumberRangeProcessorTo_p_Xapian__RangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
45749     return (void *)((Xapian::RangeProcessor *)  ((Xapian::NumberRangeProcessor *) x));
45750 }
45751 static swig_type_info _swigt__p_Xapian__BB2Weight = {"_p_Xapian__BB2Weight", "Xapian::BB2Weight *", 0, 0, (void*)0, 0};
45752 static swig_type_info _swigt__p_Xapian__BM25PlusWeight = {"_p_Xapian__BM25PlusWeight", "Xapian::BM25PlusWeight *", 0, 0, (void*)0, 0};
45753 static swig_type_info _swigt__p_Xapian__BM25Weight = {"_p_Xapian__BM25Weight", "Xapian::BM25Weight *", 0, 0, (void*)0, 0};
45754 static swig_type_info _swigt__p_Xapian__BoolWeight = {"_p_Xapian__BoolWeight", "Xapian::BoolWeight *", 0, 0, (void*)0, 0};
45755 static swig_type_info _swigt__p_Xapian__Compactor = {"_p_Xapian__Compactor", "Xapian::Compactor *", 0, 0, (void*)0, 0};
45756 static swig_type_info _swigt__p_Xapian__CoordWeight = {"_p_Xapian__CoordWeight", "Xapian::CoordWeight *", 0, 0, (void*)0, 0};
45757 static swig_type_info _swigt__p_Xapian__DLHWeight = {"_p_Xapian__DLHWeight", "Xapian::DLHWeight *", 0, 0, (void*)0, 0};
45758 static swig_type_info _swigt__p_Xapian__DPHWeight = {"_p_Xapian__DPHWeight", "Xapian::DPHWeight *", 0, 0, (void*)0, 0};
45759 static swig_type_info _swigt__p_Xapian__Database = {"_p_Xapian__Database", "Xapian::Database *", 0, 0, (void*)0, 0};
45760 static swig_type_info _swigt__p_Xapian__DateRangeProcessor = {"_p_Xapian__DateRangeProcessor", "Xapian::DateRangeProcessor *", 0, 0, (void*)0, 0};
45761 static swig_type_info _swigt__p_Xapian__DateValueRangeProcessor = {"_p_Xapian__DateValueRangeProcessor", "Xapian::DateValueRangeProcessor *", 0, 0, (void*)0, 0};
45762 static swig_type_info _swigt__p_Xapian__DecreasingValueWeightPostingSource = {"_p_Xapian__DecreasingValueWeightPostingSource", "Xapian::DecreasingValueWeightPostingSource *", 0, 0, (void*)0, 0};
45763 static swig_type_info _swigt__p_Xapian__Document = {"_p_Xapian__Document", "Xapian::Document *", 0, 0, (void*)0, 0};
45764 static swig_type_info _swigt__p_Xapian__ESet = {"_p_Xapian__ESet", "Xapian::ESet *", 0, 0, (void*)0, 0};
45765 static swig_type_info _swigt__p_Xapian__ESetIterator = {"_p_Xapian__ESetIterator", "Xapian::ESetIterator *", 0, 0, (void*)0, 0};
45766 static swig_type_info _swigt__p_Xapian__Enquire = {"_p_Xapian__Enquire", "Xapian::Enquire *", 0, 0, (void*)0, 0};
45767 static swig_type_info _swigt__p_Xapian__ExpandDecider = {"_p_Xapian__ExpandDecider", "Xapian::ExpandDecider *", 0, 0, (void*)0, 0};
45768 static swig_type_info _swigt__p_Xapian__ExpandDeciderFilterTerms = {"_p_Xapian__ExpandDeciderFilterTerms", 0, 0, 0, 0, 0};
45769 static swig_type_info _swigt__p_Xapian__ExpandDeciderAnd = {"_p_Xapian__ExpandDeciderAnd", "Xapian::ExpandDeciderAnd *", 0, 0, (void*)0, 0};
45770 static swig_type_info _swigt__p_Xapian__ExpandDeciderFilterPrefix = {"_p_Xapian__ExpandDeciderFilterPrefix", "Xapian::ExpandDeciderFilterPrefix *", 0, 0, (void*)0, 0};
45771 static swig_type_info _swigt__p_Xapian__FieldProcessor = {"_p_Xapian__FieldProcessor", "Xapian::FieldProcessor *", 0, 0, (void*)0, 0};
45772 static swig_type_info _swigt__p_Xapian__FixedWeightPostingSource = {"_p_Xapian__FixedWeightPostingSource", "Xapian::FixedWeightPostingSource *", 0, 0, (void*)0, 0};
45773 static swig_type_info _swigt__p_Xapian__GreatCircleMetric = {"_p_Xapian__GreatCircleMetric", "Xapian::GreatCircleMetric *", 0, 0, (void*)0, 0};
45774 static swig_type_info _swigt__p_Xapian__IfB2Weight = {"_p_Xapian__IfB2Weight", "Xapian::IfB2Weight *", 0, 0, (void*)0, 0};
45775 static swig_type_info _swigt__p_Xapian__InL2Weight = {"_p_Xapian__InL2Weight", "Xapian::InL2Weight *", 0, 0, (void*)0, 0};
45776 static swig_type_info _swigt__p_Xapian__IneB2Weight = {"_p_Xapian__IneB2Weight", "Xapian::IneB2Weight *", 0, 0, (void*)0, 0};
45777 static swig_type_info _swigt__p_Xapian__KeyMaker = {"_p_Xapian__KeyMaker", "Xapian::KeyMaker *", 0, 0, (void*)0, 0};
45778 static swig_type_info _swigt__p_Xapian__LMWeight = {"_p_Xapian__LMWeight", "Xapian::LMWeight *", 0, 0, (void*)0, 0};
45779 static swig_type_info _swigt__p_Xapian__LatLongCoord = {"_p_Xapian__LatLongCoord", "Xapian::LatLongCoord *", 0, 0, (void*)0, 0};
45780 static swig_type_info _swigt__p_Xapian__LatLongCoords = {"_p_Xapian__LatLongCoords", "Xapian::LatLongCoords *", 0, 0, (void*)0, 0};
45781 static swig_type_info _swigt__p_Xapian__LatLongCoordsIterator = {"_p_Xapian__LatLongCoordsIterator", "Xapian::LatLongCoordsIterator *", 0, 0, (void*)0, 0};
45782 static swig_type_info _swigt__p_Xapian__LatLongDistanceKeyMaker = {"_p_Xapian__LatLongDistanceKeyMaker", "Xapian::LatLongDistanceKeyMaker *", 0, 0, (void*)0, 0};
45783 static swig_type_info _swigt__p_Xapian__LatLongDistancePostingSource = {"_p_Xapian__LatLongDistancePostingSource", "Xapian::LatLongDistancePostingSource *", 0, 0, (void*)0, 0};
45784 static swig_type_info _swigt__p_Xapian__LatLongMetric = {"_p_Xapian__LatLongMetric", "Xapian::LatLongMetric *", 0, 0, (void*)0, 0};
45785 static swig_type_info _swigt__p_Xapian__MSet = {"_p_Xapian__MSet", "Xapian::MSet *", 0, 0, (void*)0, 0};
45786 static swig_type_info _swigt__p_Xapian__MSetIterator = {"_p_Xapian__MSetIterator", "Xapian::MSetIterator *", 0, 0, (void*)0, 0};
45787 static swig_type_info _swigt__p_Xapian__MatchDecider = {"_p_Xapian__MatchDecider", "Xapian::MatchDecider *", 0, 0, (void*)0, 0};
45788 static swig_type_info _swigt__p_Xapian__MatchSpy = {"_p_Xapian__MatchSpy", "Xapian::MatchSpy *", 0, 0, (void*)0, 0};
45789 static swig_type_info _swigt__p_Xapian__MultiValueKeyMaker = {"_p_Xapian__MultiValueKeyMaker", "Xapian::MultiValueKeyMaker *", 0, 0, (void*)0, 0};
45790 static swig_type_info _swigt__p_Xapian__NumberRangeProcessor = {"_p_Xapian__NumberRangeProcessor", "Xapian::NumberRangeProcessor *", 0, 0, (void*)0, 0};
45791 static swig_type_info _swigt__p_Xapian__NumberValueRangeProcessor = {"_p_Xapian__NumberValueRangeProcessor", "Xapian::NumberValueRangeProcessor *", 0, 0, (void*)0, 0};
45792 static swig_type_info _swigt__p_Xapian__PL2PlusWeight = {"_p_Xapian__PL2PlusWeight", "Xapian::PL2PlusWeight *", 0, 0, (void*)0, 0};
45793 static swig_type_info _swigt__p_Xapian__PL2Weight = {"_p_Xapian__PL2Weight", "Xapian::PL2Weight *", 0, 0, (void*)0, 0};
45794 static swig_type_info _swigt__p_Xapian__PositionIterator = {"_p_Xapian__PositionIterator", "Xapian::PositionIterator *", 0, 0, (void*)0, 0};
45795 static swig_type_info _swigt__p_Xapian__PostingIterator = {"_p_Xapian__PostingIterator", "Xapian::PostingIterator *", 0, 0, (void*)0, 0};
45796 static swig_type_info _swigt__p_Xapian__PostingSource = {"_p_Xapian__PostingSource", "Xapian::PostingSource *", 0, 0, (void*)0, 0};
45797 static swig_type_info _swigt__p_Xapian__Query = {"_p_Xapian__Query", "Xapian::Query *", 0, 0, (void*)0, 0};
45798 static swig_type_info _swigt__p_Xapian__QueryParser = {"_p_Xapian__QueryParser", "Xapian::QueryParser *", 0, 0, (void*)0, 0};
45799 static swig_type_info _swigt__p_Xapian__RSet = {"_p_Xapian__RSet", "Xapian::RSet *", 0, 0, (void*)0, 0};
45800 static swig_type_info _swigt__p_Xapian__RangeProcessor = {"_p_Xapian__RangeProcessor", "Xapian::RangeProcessor *", 0, 0, (void*)0, 0};
45801 static swig_type_info _swigt__p_Xapian__Registry = {"_p_Xapian__Registry", "Xapian::Registry *", 0, 0, (void*)0, 0};
45802 static swig_type_info _swigt__p_Xapian__SimpleStopper = {"_p_Xapian__SimpleStopper", "Xapian::SimpleStopper *", 0, 0, (void*)0, 0};
45803 static swig_type_info _swigt__p_Xapian__Stem = {"_p_Xapian__Stem", "Xapian::Stem *", 0, 0, (void*)0, 0};
45804 static swig_type_info _swigt__p_Xapian__StemImplementation = {"_p_Xapian__StemImplementation", "Xapian::StemImplementation *", 0, 0, (void*)0, 0};
45805 static swig_type_info _swigt__p_Xapian__Stopper = {"_p_Xapian__Stopper", "Xapian::Stopper *", 0, 0, (void*)0, 0};
45806 static swig_type_info _swigt__p_Xapian__StringValueRangeProcessor = {"_p_Xapian__StringValueRangeProcessor", "Xapian::StringValueRangeProcessor *", 0, 0, (void*)0, 0};
45807 static swig_type_info _swigt__p_Xapian__TermGenerator = {"_p_Xapian__TermGenerator", "Xapian::TermGenerator *", 0, 0, (void*)0, 0};
45808 static swig_type_info _swigt__p_Xapian__TermIterator = {"_p_Xapian__TermIterator", "Xapian::TermIterator *", 0, 0, (void*)0, 0};
45809 static swig_type_info _swigt__p_Xapian__TfIdfWeight = {"_p_Xapian__TfIdfWeight", "Xapian::TfIdfWeight *", 0, 0, (void*)0, 0};
45810 static swig_type_info _swigt__p_Xapian__TradWeight = {"_p_Xapian__TradWeight", "Xapian::TradWeight *", 0, 0, (void*)0, 0};
45811 static swig_type_info _swigt__p_Xapian__ValueCountMatchSpy = {"_p_Xapian__ValueCountMatchSpy", "Xapian::ValueCountMatchSpy *", 0, 0, (void*)0, 0};
45812 static swig_type_info _swigt__p_Xapian__ValueIterator = {"_p_Xapian__ValueIterator", "Xapian::ValueIterator *", 0, 0, (void*)0, 0};
45813 static swig_type_info _swigt__p_Xapian__ValueMapPostingSource = {"_p_Xapian__ValueMapPostingSource", "Xapian::ValueMapPostingSource *", 0, 0, (void*)0, 0};
45814 static swig_type_info _swigt__p_Xapian__ValuePostingSource = {"_p_Xapian__ValuePostingSource", "Xapian::ValuePostingSource *", 0, 0, (void*)0, 0};
45815 static swig_type_info _swigt__p_Xapian__ValueRangeProcessor = {"_p_Xapian__ValueRangeProcessor", "Xapian::ValueRangeProcessor *", 0, 0, (void*)0, 0};
45816 static swig_type_info _swigt__p_Xapian__ValueSetMatchDecider = {"_p_Xapian__ValueSetMatchDecider", "Xapian::ValueSetMatchDecider *", 0, 0, (void*)0, 0};
45817 static swig_type_info _swigt__p_Xapian__ValueWeightPostingSource = {"_p_Xapian__ValueWeightPostingSource", "Xapian::ValueWeightPostingSource *", 0, 0, (void*)0, 0};
45818 static swig_type_info _swigt__p_Xapian__Weight = {"_p_Xapian__Weight", "Xapian::Weight *", 0, 0, (void*)0, 0};
45819 static swig_type_info _swigt__p_Xapian__WritableDatabase = {"_p_Xapian__WritableDatabase", "Xapian::WritableDatabase *", 0, 0, (void*)0, 0};
45820 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
45821 static swig_type_info _swigt__p_compaction_level = {"_p_compaction_level", "compaction_level *", 0, 0, (void*)0, 0};
45822 static swig_type_info _swigt__p_docid_order = {"_p_docid_order", "docid_order *", 0, 0, (void*)0, 0};
45823 static swig_type_info _swigt__p_double = {"_p_double", "Xapian::doclength *|double *|Xapian::weight *", 0, 0, (void*)0, 0};
45824 static swig_type_info _swigt__p_feature_flag = {"_p_feature_flag", "feature_flag *", 0, 0, (void*)0, 0};
45825 static swig_type_info _swigt__p_flags = {"_p_flags", "flags *", 0, 0, (void*)0, 0};
45826 static swig_type_info _swigt__p_int = {"_p_int", "int *|Xapian::doccount_diff *|Xapian::termcount_diff *|Xapian::termpos_diff *|Xapian::valueno_diff *|Xapian::percent *", 0, 0, (void*)0, 0};
45827 static swig_type_info _swigt__p_std__string = {"_p_std__string", "std::string *", 0, 0, (void*)0, 0};
45828 static swig_type_info _swigt__p_stem_strategy = {"_p_stem_strategy", "stem_strategy *", 0, 0, (void*)0, 0};
45829 static swig_type_info _swigt__p_stop_strategy = {"_p_stop_strategy", "stop_strategy *", 0, 0, (void*)0, 0};
45830 static swig_type_info _swigt__p_swig__ConstIterator = {"_p_swig__ConstIterator", "swig::ConstIterator *", 0, 0, (void*)0, 0};
45831 static swig_type_info _swigt__p_swig__GC_VALUE = {"_p_swig__GC_VALUE", "swig::GC_VALUE *", 0, 0, (void*)0, 0};
45832 static swig_type_info _swigt__p_swig__Iterator = {"_p_swig__Iterator", "swig::Iterator *", 0, 0, (void*)0, 0};
45833 static swig_type_info _swigt__p_type_smoothing = {"_p_type_smoothing", "type_smoothing *", 0, 0, (void*)0, 0};
45834 static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "Xapian::timeout *|unsigned int *|Xapian::doccount *|Xapian::termcount *|Xapian::valueno *|Xapian::docid *|Xapian::termpos *", 0, 0, (void*)0, 0};
45835 static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "Xapian::rev *|unsigned long *|Xapian::totallength *", 0, 0, (void*)0, 0};
45836 static swig_type_info _swigt__p_void = {"_p_void", "VALUE|void *", 0, 0, (void*)0, 0};
45837 
45838 static swig_type_info *swig_type_initial[] = {
45839   &_swigt__p_Xapian__BB2Weight,
45840   &_swigt__p_Xapian__BM25PlusWeight,
45841   &_swigt__p_Xapian__BM25Weight,
45842   &_swigt__p_Xapian__BoolWeight,
45843   &_swigt__p_Xapian__Compactor,
45844   &_swigt__p_Xapian__CoordWeight,
45845   &_swigt__p_Xapian__DLHWeight,
45846   &_swigt__p_Xapian__DPHWeight,
45847   &_swigt__p_Xapian__Database,
45848   &_swigt__p_Xapian__DateRangeProcessor,
45849   &_swigt__p_Xapian__DateValueRangeProcessor,
45850   &_swigt__p_Xapian__DecreasingValueWeightPostingSource,
45851   &_swigt__p_Xapian__Document,
45852   &_swigt__p_Xapian__ESet,
45853   &_swigt__p_Xapian__ESetIterator,
45854   &_swigt__p_Xapian__Enquire,
45855   &_swigt__p_Xapian__ExpandDecider,
45856   &_swigt__p_Xapian__ExpandDeciderAnd,
45857   &_swigt__p_Xapian__ExpandDeciderFilterPrefix,
45858   &_swigt__p_Xapian__ExpandDeciderFilterTerms,
45859   &_swigt__p_Xapian__FieldProcessor,
45860   &_swigt__p_Xapian__FixedWeightPostingSource,
45861   &_swigt__p_Xapian__GreatCircleMetric,
45862   &_swigt__p_Xapian__IfB2Weight,
45863   &_swigt__p_Xapian__InL2Weight,
45864   &_swigt__p_Xapian__IneB2Weight,
45865   &_swigt__p_Xapian__KeyMaker,
45866   &_swigt__p_Xapian__LMWeight,
45867   &_swigt__p_Xapian__LatLongCoord,
45868   &_swigt__p_Xapian__LatLongCoords,
45869   &_swigt__p_Xapian__LatLongCoordsIterator,
45870   &_swigt__p_Xapian__LatLongDistanceKeyMaker,
45871   &_swigt__p_Xapian__LatLongDistancePostingSource,
45872   &_swigt__p_Xapian__LatLongMetric,
45873   &_swigt__p_Xapian__MSet,
45874   &_swigt__p_Xapian__MSetIterator,
45875   &_swigt__p_Xapian__MatchDecider,
45876   &_swigt__p_Xapian__MatchSpy,
45877   &_swigt__p_Xapian__MultiValueKeyMaker,
45878   &_swigt__p_Xapian__NumberRangeProcessor,
45879   &_swigt__p_Xapian__NumberValueRangeProcessor,
45880   &_swigt__p_Xapian__PL2PlusWeight,
45881   &_swigt__p_Xapian__PL2Weight,
45882   &_swigt__p_Xapian__PositionIterator,
45883   &_swigt__p_Xapian__PostingIterator,
45884   &_swigt__p_Xapian__PostingSource,
45885   &_swigt__p_Xapian__Query,
45886   &_swigt__p_Xapian__QueryParser,
45887   &_swigt__p_Xapian__RSet,
45888   &_swigt__p_Xapian__RangeProcessor,
45889   &_swigt__p_Xapian__Registry,
45890   &_swigt__p_Xapian__SimpleStopper,
45891   &_swigt__p_Xapian__Stem,
45892   &_swigt__p_Xapian__StemImplementation,
45893   &_swigt__p_Xapian__Stopper,
45894   &_swigt__p_Xapian__StringValueRangeProcessor,
45895   &_swigt__p_Xapian__TermGenerator,
45896   &_swigt__p_Xapian__TermIterator,
45897   &_swigt__p_Xapian__TfIdfWeight,
45898   &_swigt__p_Xapian__TradWeight,
45899   &_swigt__p_Xapian__ValueCountMatchSpy,
45900   &_swigt__p_Xapian__ValueIterator,
45901   &_swigt__p_Xapian__ValueMapPostingSource,
45902   &_swigt__p_Xapian__ValuePostingSource,
45903   &_swigt__p_Xapian__ValueRangeProcessor,
45904   &_swigt__p_Xapian__ValueSetMatchDecider,
45905   &_swigt__p_Xapian__ValueWeightPostingSource,
45906   &_swigt__p_Xapian__Weight,
45907   &_swigt__p_Xapian__WritableDatabase,
45908   &_swigt__p_char,
45909   &_swigt__p_compaction_level,
45910   &_swigt__p_docid_order,
45911   &_swigt__p_double,
45912   &_swigt__p_feature_flag,
45913   &_swigt__p_flags,
45914   &_swigt__p_int,
45915   &_swigt__p_std__string,
45916   &_swigt__p_stem_strategy,
45917   &_swigt__p_stop_strategy,
45918   &_swigt__p_swig__ConstIterator,
45919   &_swigt__p_swig__GC_VALUE,
45920   &_swigt__p_swig__Iterator,
45921   &_swigt__p_type_smoothing,
45922   &_swigt__p_unsigned_int,
45923   &_swigt__p_unsigned_long,
45924   &_swigt__p_void,
45925 };
45926 
45927 static swig_cast_info _swigc__p_Xapian__BB2Weight[] = {  {&_swigt__p_Xapian__BB2Weight, 0, 0, 0},{0, 0, 0, 0}};
45928 static swig_cast_info _swigc__p_Xapian__BM25PlusWeight[] = {  {&_swigt__p_Xapian__BM25PlusWeight, 0, 0, 0},{0, 0, 0, 0}};
45929 static swig_cast_info _swigc__p_Xapian__BM25Weight[] = {  {&_swigt__p_Xapian__BM25Weight, 0, 0, 0},{0, 0, 0, 0}};
45930 static swig_cast_info _swigc__p_Xapian__BoolWeight[] = {  {&_swigt__p_Xapian__BoolWeight, 0, 0, 0},{0, 0, 0, 0}};
45931 static swig_cast_info _swigc__p_Xapian__Compactor[] = {  {&_swigt__p_Xapian__Compactor, 0, 0, 0},{0, 0, 0, 0}};
45932 static swig_cast_info _swigc__p_Xapian__CoordWeight[] = {  {&_swigt__p_Xapian__CoordWeight, 0, 0, 0},{0, 0, 0, 0}};
45933 static swig_cast_info _swigc__p_Xapian__DLHWeight[] = {  {&_swigt__p_Xapian__DLHWeight, 0, 0, 0},{0, 0, 0, 0}};
45934 static swig_cast_info _swigc__p_Xapian__DPHWeight[] = {  {&_swigt__p_Xapian__DPHWeight, 0, 0, 0},{0, 0, 0, 0}};
45935 static swig_cast_info _swigc__p_Xapian__Database[] = {  {&_swigt__p_Xapian__Database, 0, 0, 0},  {&_swigt__p_Xapian__WritableDatabase, _p_Xapian__WritableDatabaseTo_p_Xapian__Database, 0, 0},{0, 0, 0, 0}};
45936 static swig_cast_info _swigc__p_Xapian__DateRangeProcessor[] = {  {&_swigt__p_Xapian__DateRangeProcessor, 0, 0, 0},{0, 0, 0, 0}};
45937 static swig_cast_info _swigc__p_Xapian__DateValueRangeProcessor[] = {  {&_swigt__p_Xapian__DateValueRangeProcessor, 0, 0, 0},{0, 0, 0, 0}};
45938 static swig_cast_info _swigc__p_Xapian__DecreasingValueWeightPostingSource[] = {  {&_swigt__p_Xapian__DecreasingValueWeightPostingSource, 0, 0, 0},{0, 0, 0, 0}};
45939 static swig_cast_info _swigc__p_Xapian__Document[] = {  {&_swigt__p_Xapian__Document, 0, 0, 0},{0, 0, 0, 0}};
45940 static swig_cast_info _swigc__p_Xapian__ESet[] = {  {&_swigt__p_Xapian__ESet, 0, 0, 0},{0, 0, 0, 0}};
45941 static swig_cast_info _swigc__p_Xapian__ESetIterator[] = {  {&_swigt__p_Xapian__ESetIterator, 0, 0, 0},{0, 0, 0, 0}};
45942 static swig_cast_info _swigc__p_Xapian__Enquire[] = {  {&_swigt__p_Xapian__Enquire, 0, 0, 0},{0, 0, 0, 0}};
45943 static swig_cast_info _swigc__p_Xapian__ExpandDeciderFilterTerms[] = {{&_swigt__p_Xapian__ExpandDeciderFilterTerms, 0, 0, 0},{0, 0, 0, 0}};
45944 static swig_cast_info _swigc__p_Xapian__ExpandDecider[] = {  {&_swigt__p_Xapian__ExpandDeciderFilterPrefix, _p_Xapian__ExpandDeciderFilterPrefixTo_p_Xapian__ExpandDecider, 0, 0},  {&_swigt__p_Xapian__ExpandDecider, 0, 0, 0},  {&_swigt__p_Xapian__ExpandDeciderAnd, _p_Xapian__ExpandDeciderAndTo_p_Xapian__ExpandDecider, 0, 0},  {&_swigt__p_Xapian__ExpandDeciderFilterTerms, _p_Xapian__ExpandDeciderFilterTermsTo_p_Xapian__ExpandDecider, 0, 0},{0, 0, 0, 0}};
45945 static swig_cast_info _swigc__p_Xapian__ExpandDeciderAnd[] = {  {&_swigt__p_Xapian__ExpandDeciderAnd, 0, 0, 0},{0, 0, 0, 0}};
45946 static swig_cast_info _swigc__p_Xapian__ExpandDeciderFilterPrefix[] = {  {&_swigt__p_Xapian__ExpandDeciderFilterPrefix, 0, 0, 0},{0, 0, 0, 0}};
45947 static swig_cast_info _swigc__p_Xapian__FieldProcessor[] = {  {&_swigt__p_Xapian__FieldProcessor, 0, 0, 0},{0, 0, 0, 0}};
45948 static swig_cast_info _swigc__p_Xapian__FixedWeightPostingSource[] = {  {&_swigt__p_Xapian__FixedWeightPostingSource, 0, 0, 0},{0, 0, 0, 0}};
45949 static swig_cast_info _swigc__p_Xapian__GreatCircleMetric[] = {  {&_swigt__p_Xapian__GreatCircleMetric, 0, 0, 0},{0, 0, 0, 0}};
45950 static swig_cast_info _swigc__p_Xapian__IfB2Weight[] = {  {&_swigt__p_Xapian__IfB2Weight, 0, 0, 0},{0, 0, 0, 0}};
45951 static swig_cast_info _swigc__p_Xapian__InL2Weight[] = {  {&_swigt__p_Xapian__InL2Weight, 0, 0, 0},{0, 0, 0, 0}};
45952 static swig_cast_info _swigc__p_Xapian__IneB2Weight[] = {  {&_swigt__p_Xapian__IneB2Weight, 0, 0, 0},{0, 0, 0, 0}};
45953 static swig_cast_info _swigc__p_Xapian__KeyMaker[] = {  {&_swigt__p_Xapian__KeyMaker, 0, 0, 0},  {&_swigt__p_Xapian__MultiValueKeyMaker, _p_Xapian__MultiValueKeyMakerTo_p_Xapian__KeyMaker, 0, 0},  {&_swigt__p_Xapian__LatLongDistanceKeyMaker, _p_Xapian__LatLongDistanceKeyMakerTo_p_Xapian__KeyMaker, 0, 0},{0, 0, 0, 0}};
45954 static swig_cast_info _swigc__p_Xapian__LMWeight[] = {  {&_swigt__p_Xapian__LMWeight, 0, 0, 0},{0, 0, 0, 0}};
45955 static swig_cast_info _swigc__p_Xapian__LatLongCoord[] = {  {&_swigt__p_Xapian__LatLongCoord, 0, 0, 0},{0, 0, 0, 0}};
45956 static swig_cast_info _swigc__p_Xapian__LatLongCoords[] = {  {&_swigt__p_Xapian__LatLongCoords, 0, 0, 0},{0, 0, 0, 0}};
45957 static swig_cast_info _swigc__p_Xapian__LatLongCoordsIterator[] = {  {&_swigt__p_Xapian__LatLongCoordsIterator, 0, 0, 0},{0, 0, 0, 0}};
45958 static swig_cast_info _swigc__p_Xapian__LatLongDistanceKeyMaker[] = {  {&_swigt__p_Xapian__LatLongDistanceKeyMaker, 0, 0, 0},{0, 0, 0, 0}};
45959 static swig_cast_info _swigc__p_Xapian__LatLongDistancePostingSource[] = {  {&_swigt__p_Xapian__LatLongDistancePostingSource, 0, 0, 0},{0, 0, 0, 0}};
45960 static swig_cast_info _swigc__p_Xapian__LatLongMetric[] = {  {&_swigt__p_Xapian__LatLongMetric, 0, 0, 0},  {&_swigt__p_Xapian__GreatCircleMetric, _p_Xapian__GreatCircleMetricTo_p_Xapian__LatLongMetric, 0, 0},{0, 0, 0, 0}};
45961 static swig_cast_info _swigc__p_Xapian__MSet[] = {  {&_swigt__p_Xapian__MSet, 0, 0, 0},{0, 0, 0, 0}};
45962 static swig_cast_info _swigc__p_Xapian__MSetIterator[] = {  {&_swigt__p_Xapian__MSetIterator, 0, 0, 0},{0, 0, 0, 0}};
45963 static swig_cast_info _swigc__p_Xapian__MatchDecider[] = {  {&_swigt__p_Xapian__MatchDecider, 0, 0, 0},  {&_swigt__p_Xapian__ValueSetMatchDecider, _p_Xapian__ValueSetMatchDeciderTo_p_Xapian__MatchDecider, 0, 0},{0, 0, 0, 0}};
45964 static swig_cast_info _swigc__p_Xapian__MatchSpy[] = {  {&_swigt__p_Xapian__MatchSpy, 0, 0, 0},  {&_swigt__p_Xapian__ValueCountMatchSpy, _p_Xapian__ValueCountMatchSpyTo_p_Xapian__MatchSpy, 0, 0},{0, 0, 0, 0}};
45965 static swig_cast_info _swigc__p_Xapian__MultiValueKeyMaker[] = {  {&_swigt__p_Xapian__MultiValueKeyMaker, 0, 0, 0},{0, 0, 0, 0}};
45966 static swig_cast_info _swigc__p_Xapian__NumberRangeProcessor[] = {  {&_swigt__p_Xapian__NumberRangeProcessor, 0, 0, 0},{0, 0, 0, 0}};
45967 static swig_cast_info _swigc__p_Xapian__NumberValueRangeProcessor[] = {  {&_swigt__p_Xapian__NumberValueRangeProcessor, 0, 0, 0},{0, 0, 0, 0}};
45968 static swig_cast_info _swigc__p_Xapian__PL2PlusWeight[] = {  {&_swigt__p_Xapian__PL2PlusWeight, 0, 0, 0},{0, 0, 0, 0}};
45969 static swig_cast_info _swigc__p_Xapian__PL2Weight[] = {  {&_swigt__p_Xapian__PL2Weight, 0, 0, 0},{0, 0, 0, 0}};
45970 static swig_cast_info _swigc__p_Xapian__PositionIterator[] = {  {&_swigt__p_Xapian__PositionIterator, 0, 0, 0},{0, 0, 0, 0}};
45971 static swig_cast_info _swigc__p_Xapian__PostingIterator[] = {  {&_swigt__p_Xapian__PostingIterator, 0, 0, 0},{0, 0, 0, 0}};
45972 static swig_cast_info _swigc__p_Xapian__PostingSource[] = {  {&_swigt__p_Xapian__PostingSource, 0, 0, 0},  {&_swigt__p_Xapian__ValuePostingSource, _p_Xapian__ValuePostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__ValueWeightPostingSource, _p_Xapian__ValueWeightPostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__DecreasingValueWeightPostingSource, _p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__ValueMapPostingSource, _p_Xapian__ValueMapPostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__LatLongDistancePostingSource, _p_Xapian__LatLongDistancePostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__FixedWeightPostingSource, _p_Xapian__FixedWeightPostingSourceTo_p_Xapian__PostingSource, 0, 0},{0, 0, 0, 0}};
45973 static swig_cast_info _swigc__p_Xapian__Query[] = {  {&_swigt__p_Xapian__Query, 0, 0, 0},{0, 0, 0, 0}};
45974 static swig_cast_info _swigc__p_Xapian__QueryParser[] = {  {&_swigt__p_Xapian__QueryParser, 0, 0, 0},{0, 0, 0, 0}};
45975 static swig_cast_info _swigc__p_Xapian__RSet[] = {  {&_swigt__p_Xapian__RSet, 0, 0, 0},{0, 0, 0, 0}};
45976 static swig_cast_info _swigc__p_Xapian__RangeProcessor[] = {  {&_swigt__p_Xapian__RangeProcessor, 0, 0, 0},  {&_swigt__p_Xapian__DateRangeProcessor, _p_Xapian__DateRangeProcessorTo_p_Xapian__RangeProcessor, 0, 0},  {&_swigt__p_Xapian__NumberRangeProcessor, _p_Xapian__NumberRangeProcessorTo_p_Xapian__RangeProcessor, 0, 0},{0, 0, 0, 0}};
45977 static swig_cast_info _swigc__p_Xapian__Registry[] = {  {&_swigt__p_Xapian__Registry, 0, 0, 0},{0, 0, 0, 0}};
45978 static swig_cast_info _swigc__p_Xapian__SimpleStopper[] = {  {&_swigt__p_Xapian__SimpleStopper, 0, 0, 0},{0, 0, 0, 0}};
45979 static swig_cast_info _swigc__p_Xapian__Stem[] = {  {&_swigt__p_Xapian__Stem, 0, 0, 0},{0, 0, 0, 0}};
45980 static swig_cast_info _swigc__p_Xapian__StemImplementation[] = {  {&_swigt__p_Xapian__StemImplementation, 0, 0, 0},{0, 0, 0, 0}};
45981 static swig_cast_info _swigc__p_Xapian__Stopper[] = {  {&_swigt__p_Xapian__Stopper, 0, 0, 0},  {&_swigt__p_Xapian__SimpleStopper, _p_Xapian__SimpleStopperTo_p_Xapian__Stopper, 0, 0},{0, 0, 0, 0}};
45982 static swig_cast_info _swigc__p_Xapian__StringValueRangeProcessor[] = {  {&_swigt__p_Xapian__StringValueRangeProcessor, 0, 0, 0},  {&_swigt__p_Xapian__DateValueRangeProcessor, _p_Xapian__DateValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor, 0, 0},  {&_swigt__p_Xapian__NumberValueRangeProcessor, _p_Xapian__NumberValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor, 0, 0},{0, 0, 0, 0}};
45983 static swig_cast_info _swigc__p_Xapian__TermGenerator[] = {  {&_swigt__p_Xapian__TermGenerator, 0, 0, 0},{0, 0, 0, 0}};
45984 static swig_cast_info _swigc__p_Xapian__TermIterator[] = {  {&_swigt__p_Xapian__TermIterator, 0, 0, 0},{0, 0, 0, 0}};
45985 static swig_cast_info _swigc__p_Xapian__TfIdfWeight[] = {  {&_swigt__p_Xapian__TfIdfWeight, 0, 0, 0},{0, 0, 0, 0}};
45986 static swig_cast_info _swigc__p_Xapian__TradWeight[] = {  {&_swigt__p_Xapian__TradWeight, 0, 0, 0},{0, 0, 0, 0}};
45987 static swig_cast_info _swigc__p_Xapian__ValueCountMatchSpy[] = {  {&_swigt__p_Xapian__ValueCountMatchSpy, 0, 0, 0},{0, 0, 0, 0}};
45988 static swig_cast_info _swigc__p_Xapian__ValueIterator[] = {  {&_swigt__p_Xapian__ValueIterator, 0, 0, 0},{0, 0, 0, 0}};
45989 static swig_cast_info _swigc__p_Xapian__ValueMapPostingSource[] = {  {&_swigt__p_Xapian__ValueMapPostingSource, 0, 0, 0},{0, 0, 0, 0}};
45990 static swig_cast_info _swigc__p_Xapian__ValuePostingSource[] = {  {&_swigt__p_Xapian__ValuePostingSource, 0, 0, 0},  {&_swigt__p_Xapian__ValueWeightPostingSource, _p_Xapian__ValueWeightPostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},  {&_swigt__p_Xapian__DecreasingValueWeightPostingSource, _p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},  {&_swigt__p_Xapian__ValueMapPostingSource, _p_Xapian__ValueMapPostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},  {&_swigt__p_Xapian__LatLongDistancePostingSource, _p_Xapian__LatLongDistancePostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},{0, 0, 0, 0}};
45991 static swig_cast_info _swigc__p_Xapian__ValueRangeProcessor[] = {  {&_swigt__p_Xapian__ValueRangeProcessor, 0, 0, 0},  {&_swigt__p_Xapian__StringValueRangeProcessor, _p_Xapian__StringValueRangeProcessorTo_p_Xapian__ValueRangeProcessor, 0, 0},  {&_swigt__p_Xapian__DateValueRangeProcessor, _p_Xapian__DateValueRangeProcessorTo_p_Xapian__ValueRangeProcessor, 0, 0},  {&_swigt__p_Xapian__NumberValueRangeProcessor, _p_Xapian__NumberValueRangeProcessorTo_p_Xapian__ValueRangeProcessor, 0, 0},{0, 0, 0, 0}};
45992 static swig_cast_info _swigc__p_Xapian__ValueSetMatchDecider[] = {  {&_swigt__p_Xapian__ValueSetMatchDecider, 0, 0, 0},{0, 0, 0, 0}};
45993 static swig_cast_info _swigc__p_Xapian__ValueWeightPostingSource[] = {  {&_swigt__p_Xapian__ValueWeightPostingSource, 0, 0, 0},  {&_swigt__p_Xapian__DecreasingValueWeightPostingSource, _p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValueWeightPostingSource, 0, 0},{0, 0, 0, 0}};
45994 static swig_cast_info _swigc__p_Xapian__Weight[] = {  {&_swigt__p_Xapian__DPHWeight, _p_Xapian__DPHWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__PL2Weight, _p_Xapian__PL2WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__DLHWeight, _p_Xapian__DLHWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__BB2Weight, _p_Xapian__BB2WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__IneB2Weight, _p_Xapian__IneB2WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__IfB2Weight, _p_Xapian__IfB2WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__InL2Weight, _p_Xapian__InL2WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__TradWeight, _p_Xapian__TradWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__TfIdfWeight, _p_Xapian__TfIdfWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__BoolWeight, _p_Xapian__BoolWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__CoordWeight, _p_Xapian__CoordWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__LMWeight, _p_Xapian__LMWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__PL2PlusWeight, _p_Xapian__PL2PlusWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__Weight, 0, 0, 0},  {&_swigt__p_Xapian__BM25PlusWeight, _p_Xapian__BM25PlusWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__BM25Weight, _p_Xapian__BM25WeightTo_p_Xapian__Weight, 0, 0},{0, 0, 0, 0}};
45995 static swig_cast_info _swigc__p_Xapian__WritableDatabase[] = {  {&_swigt__p_Xapian__WritableDatabase, 0, 0, 0},{0, 0, 0, 0}};
45996 static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
45997 static swig_cast_info _swigc__p_compaction_level[] = {  {&_swigt__p_compaction_level, 0, 0, 0},{0, 0, 0, 0}};
45998 static swig_cast_info _swigc__p_docid_order[] = {  {&_swigt__p_docid_order, 0, 0, 0},{0, 0, 0, 0}};
45999 static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
46000 static swig_cast_info _swigc__p_feature_flag[] = {  {&_swigt__p_feature_flag, 0, 0, 0},{0, 0, 0, 0}};
46001 static swig_cast_info _swigc__p_flags[] = {  {&_swigt__p_flags, 0, 0, 0},{0, 0, 0, 0}};
46002 static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
46003 static swig_cast_info _swigc__p_std__string[] = {  {&_swigt__p_std__string, 0, 0, 0},{0, 0, 0, 0}};
46004 static swig_cast_info _swigc__p_stem_strategy[] = {  {&_swigt__p_stem_strategy, 0, 0, 0},{0, 0, 0, 0}};
46005 static swig_cast_info _swigc__p_stop_strategy[] = {  {&_swigt__p_stop_strategy, 0, 0, 0},{0, 0, 0, 0}};
46006 static swig_cast_info _swigc__p_swig__ConstIterator[] = {  {&_swigt__p_swig__ConstIterator, 0, 0, 0},  {&_swigt__p_swig__Iterator, _p_swig__IteratorTo_p_swig__ConstIterator, 0, 0},{0, 0, 0, 0}};
46007 static swig_cast_info _swigc__p_swig__GC_VALUE[] = {  {&_swigt__p_swig__GC_VALUE, 0, 0, 0},{0, 0, 0, 0}};
46008 static swig_cast_info _swigc__p_swig__Iterator[] = {  {&_swigt__p_swig__Iterator, 0, 0, 0},{0, 0, 0, 0}};
46009 static swig_cast_info _swigc__p_type_smoothing[] = {  {&_swigt__p_type_smoothing, 0, 0, 0},{0, 0, 0, 0}};
46010 static swig_cast_info _swigc__p_unsigned_int[] = {  {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
46011 static swig_cast_info _swigc__p_unsigned_long[] = {  {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
46012 static swig_cast_info _swigc__p_void[] = {  {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
46013 
46014 static swig_cast_info *swig_cast_initial[] = {
46015   _swigc__p_Xapian__BB2Weight,
46016   _swigc__p_Xapian__BM25PlusWeight,
46017   _swigc__p_Xapian__BM25Weight,
46018   _swigc__p_Xapian__BoolWeight,
46019   _swigc__p_Xapian__Compactor,
46020   _swigc__p_Xapian__CoordWeight,
46021   _swigc__p_Xapian__DLHWeight,
46022   _swigc__p_Xapian__DPHWeight,
46023   _swigc__p_Xapian__Database,
46024   _swigc__p_Xapian__DateRangeProcessor,
46025   _swigc__p_Xapian__DateValueRangeProcessor,
46026   _swigc__p_Xapian__DecreasingValueWeightPostingSource,
46027   _swigc__p_Xapian__Document,
46028   _swigc__p_Xapian__ESet,
46029   _swigc__p_Xapian__ESetIterator,
46030   _swigc__p_Xapian__Enquire,
46031   _swigc__p_Xapian__ExpandDecider,
46032   _swigc__p_Xapian__ExpandDeciderAnd,
46033   _swigc__p_Xapian__ExpandDeciderFilterPrefix,
46034   _swigc__p_Xapian__ExpandDeciderFilterTerms,
46035   _swigc__p_Xapian__FieldProcessor,
46036   _swigc__p_Xapian__FixedWeightPostingSource,
46037   _swigc__p_Xapian__GreatCircleMetric,
46038   _swigc__p_Xapian__IfB2Weight,
46039   _swigc__p_Xapian__InL2Weight,
46040   _swigc__p_Xapian__IneB2Weight,
46041   _swigc__p_Xapian__KeyMaker,
46042   _swigc__p_Xapian__LMWeight,
46043   _swigc__p_Xapian__LatLongCoord,
46044   _swigc__p_Xapian__LatLongCoords,
46045   _swigc__p_Xapian__LatLongCoordsIterator,
46046   _swigc__p_Xapian__LatLongDistanceKeyMaker,
46047   _swigc__p_Xapian__LatLongDistancePostingSource,
46048   _swigc__p_Xapian__LatLongMetric,
46049   _swigc__p_Xapian__MSet,
46050   _swigc__p_Xapian__MSetIterator,
46051   _swigc__p_Xapian__MatchDecider,
46052   _swigc__p_Xapian__MatchSpy,
46053   _swigc__p_Xapian__MultiValueKeyMaker,
46054   _swigc__p_Xapian__NumberRangeProcessor,
46055   _swigc__p_Xapian__NumberValueRangeProcessor,
46056   _swigc__p_Xapian__PL2PlusWeight,
46057   _swigc__p_Xapian__PL2Weight,
46058   _swigc__p_Xapian__PositionIterator,
46059   _swigc__p_Xapian__PostingIterator,
46060   _swigc__p_Xapian__PostingSource,
46061   _swigc__p_Xapian__Query,
46062   _swigc__p_Xapian__QueryParser,
46063   _swigc__p_Xapian__RSet,
46064   _swigc__p_Xapian__RangeProcessor,
46065   _swigc__p_Xapian__Registry,
46066   _swigc__p_Xapian__SimpleStopper,
46067   _swigc__p_Xapian__Stem,
46068   _swigc__p_Xapian__StemImplementation,
46069   _swigc__p_Xapian__Stopper,
46070   _swigc__p_Xapian__StringValueRangeProcessor,
46071   _swigc__p_Xapian__TermGenerator,
46072   _swigc__p_Xapian__TermIterator,
46073   _swigc__p_Xapian__TfIdfWeight,
46074   _swigc__p_Xapian__TradWeight,
46075   _swigc__p_Xapian__ValueCountMatchSpy,
46076   _swigc__p_Xapian__ValueIterator,
46077   _swigc__p_Xapian__ValueMapPostingSource,
46078   _swigc__p_Xapian__ValuePostingSource,
46079   _swigc__p_Xapian__ValueRangeProcessor,
46080   _swigc__p_Xapian__ValueSetMatchDecider,
46081   _swigc__p_Xapian__ValueWeightPostingSource,
46082   _swigc__p_Xapian__Weight,
46083   _swigc__p_Xapian__WritableDatabase,
46084   _swigc__p_char,
46085   _swigc__p_compaction_level,
46086   _swigc__p_docid_order,
46087   _swigc__p_double,
46088   _swigc__p_feature_flag,
46089   _swigc__p_flags,
46090   _swigc__p_int,
46091   _swigc__p_std__string,
46092   _swigc__p_stem_strategy,
46093   _swigc__p_stop_strategy,
46094   _swigc__p_swig__ConstIterator,
46095   _swigc__p_swig__GC_VALUE,
46096   _swigc__p_swig__Iterator,
46097   _swigc__p_type_smoothing,
46098   _swigc__p_unsigned_int,
46099   _swigc__p_unsigned_long,
46100   _swigc__p_void,
46101 };
46102 
46103 
46104 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
46105 
46106 /* -----------------------------------------------------------------------------
46107  * Type initialization:
46108  * This problem is tough by the requirement that no dynamic
46109  * memory is used. Also, since swig_type_info structures store pointers to
46110  * swig_cast_info structures and swig_cast_info structures store pointers back
46111  * to swig_type_info structures, we need some lookup code at initialization.
46112  * The idea is that swig generates all the structures that are needed.
46113  * The runtime then collects these partially filled structures.
46114  * The SWIG_InitializeModule function takes these initial arrays out of
46115  * swig_module, and does all the lookup, filling in the swig_module.types
46116  * array with the correct data and linking the correct swig_cast_info
46117  * structures together.
46118  *
46119  * The generated swig_type_info structures are assigned statically to an initial
46120  * array. We just loop through that array, and handle each type individually.
46121  * First we lookup if this type has been already loaded, and if so, use the
46122  * loaded structure instead of the generated one. Then we have to fill in the
46123  * cast linked list. The cast data is initially stored in something like a
46124  * two-dimensional array. Each row corresponds to a type (there are the same
46125  * number of rows as there are in the swig_type_initial array). Each entry in
46126  * a column is one of the swig_cast_info structures for that type.
46127  * The cast_initial array is actually an array of arrays, because each row has
46128  * a variable number of columns. So to actually build the cast linked list,
46129  * we find the array of casts associated with the type, and loop through it
46130  * adding the casts to the list. The one last trick we need to do is making
46131  * sure the type pointer in the swig_cast_info struct is correct.
46132  *
46133  * First off, we lookup the cast->type name to see if it is already loaded.
46134  * There are three cases to handle:
46135  *  1) If the cast->type has already been loaded AND the type we are adding
46136  *     casting info to has not been loaded (it is in this module), THEN we
46137  *     replace the cast->type pointer with the type pointer that has already
46138  *     been loaded.
46139  *  2) If BOTH types (the one we are adding casting info to, and the
46140  *     cast->type) are loaded, THEN the cast info has already been loaded by
46141  *     the previous module so we just ignore it.
46142  *  3) Finally, if cast->type has not already been loaded, then we add that
46143  *     swig_cast_info to the linked list (because the cast->type) pointer will
46144  *     be correct.
46145  * ----------------------------------------------------------------------------- */
46146 
46147 #ifdef __cplusplus
46148 extern "C" {
46149 #if 0
46150 } /* c-mode */
46151 #endif
46152 #endif
46153 
46154 #if 0
46155 #define SWIGRUNTIME_DEBUG
46156 #endif
46157 
46158 
46159 SWIGRUNTIME void
SWIG_InitializeModule(void * clientdata)46160 SWIG_InitializeModule(void *clientdata) {
46161   size_t i;
46162   swig_module_info *module_head, *iter;
46163   int init;
46164 
46165   /* check to see if the circular list has been setup, if not, set it up */
46166   if (swig_module.next==0) {
46167     /* Initialize the swig_module */
46168     swig_module.type_initial = swig_type_initial;
46169     swig_module.cast_initial = swig_cast_initial;
46170     swig_module.next = &swig_module;
46171     init = 1;
46172   } else {
46173     init = 0;
46174   }
46175 
46176   /* Try and load any already created modules */
46177   module_head = SWIG_GetModule(clientdata);
46178   if (!module_head) {
46179     /* This is the first module loaded for this interpreter */
46180     /* so set the swig module into the interpreter */
46181     SWIG_SetModule(clientdata, &swig_module);
46182   } else {
46183     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
46184     iter=module_head;
46185     do {
46186       if (iter==&swig_module) {
46187         /* Our module is already in the list, so there's nothing more to do. */
46188         return;
46189       }
46190       iter=iter->next;
46191     } while (iter!= module_head);
46192 
46193     /* otherwise we must add our module into the list */
46194     swig_module.next = module_head->next;
46195     module_head->next = &swig_module;
46196   }
46197 
46198   /* When multiple interpreters are used, a module could have already been initialized in
46199      a different interpreter, but not yet have a pointer in this interpreter.
46200      In this case, we do not want to continue adding types... everything should be
46201      set up already */
46202   if (init == 0) return;
46203 
46204   /* Now work on filling in swig_module.types */
46205 #ifdef SWIGRUNTIME_DEBUG
46206   printf("SWIG_InitializeModule: size %d\n", swig_module.size);
46207 #endif
46208   for (i = 0; i < swig_module.size; ++i) {
46209     swig_type_info *type = 0;
46210     swig_type_info *ret;
46211     swig_cast_info *cast;
46212 
46213 #ifdef SWIGRUNTIME_DEBUG
46214     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
46215 #endif
46216 
46217     /* if there is another module already loaded */
46218     if (swig_module.next != &swig_module) {
46219       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
46220     }
46221     if (type) {
46222       /* Overwrite clientdata field */
46223 #ifdef SWIGRUNTIME_DEBUG
46224       printf("SWIG_InitializeModule: found type %s\n", type->name);
46225 #endif
46226       if (swig_module.type_initial[i]->clientdata) {
46227 	type->clientdata = swig_module.type_initial[i]->clientdata;
46228 #ifdef SWIGRUNTIME_DEBUG
46229       printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
46230 #endif
46231       }
46232     } else {
46233       type = swig_module.type_initial[i];
46234     }
46235 
46236     /* Insert casting types */
46237     cast = swig_module.cast_initial[i];
46238     while (cast->type) {
46239 
46240       /* Don't need to add information already in the list */
46241       ret = 0;
46242 #ifdef SWIGRUNTIME_DEBUG
46243       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
46244 #endif
46245       if (swig_module.next != &swig_module) {
46246         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
46247 #ifdef SWIGRUNTIME_DEBUG
46248 	if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
46249 #endif
46250       }
46251       if (ret) {
46252 	if (type == swig_module.type_initial[i]) {
46253 #ifdef SWIGRUNTIME_DEBUG
46254 	  printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
46255 #endif
46256 	  cast->type = ret;
46257 	  ret = 0;
46258 	} else {
46259 	  /* Check for casting already in the list */
46260 	  swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
46261 #ifdef SWIGRUNTIME_DEBUG
46262 	  if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
46263 #endif
46264 	  if (!ocast) ret = 0;
46265 	}
46266       }
46267 
46268       if (!ret) {
46269 #ifdef SWIGRUNTIME_DEBUG
46270 	printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
46271 #endif
46272         if (type->cast) {
46273           type->cast->prev = cast;
46274           cast->next = type->cast;
46275         }
46276         type->cast = cast;
46277       }
46278       cast++;
46279     }
46280     /* Set entry in modules->types array equal to the type */
46281     swig_module.types[i] = type;
46282   }
46283   swig_module.types[i] = 0;
46284 
46285 #ifdef SWIGRUNTIME_DEBUG
46286   printf("**** SWIG_InitializeModule: Cast List ******\n");
46287   for (i = 0; i < swig_module.size; ++i) {
46288     int j = 0;
46289     swig_cast_info *cast = swig_module.cast_initial[i];
46290     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
46291     while (cast->type) {
46292       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
46293       cast++;
46294       ++j;
46295     }
46296   printf("---- Total casts: %d\n",j);
46297   }
46298   printf("**** SWIG_InitializeModule: Cast List ******\n");
46299 #endif
46300 }
46301 
46302 /* This function will propagate the clientdata field of type to
46303 * any new swig_type_info structures that have been added into the list
46304 * of equivalent types.  It is like calling
46305 * SWIG_TypeClientData(type, clientdata) a second time.
46306 */
46307 SWIGRUNTIME void
SWIG_PropagateClientData(void)46308 SWIG_PropagateClientData(void) {
46309   size_t i;
46310   swig_cast_info *equiv;
46311   static int init_run = 0;
46312 
46313   if (init_run) return;
46314   init_run = 1;
46315 
46316   for (i = 0; i < swig_module.size; i++) {
46317     if (swig_module.types[i]->clientdata) {
46318       equiv = swig_module.types[i]->cast;
46319       while (equiv) {
46320         if (!equiv->converter) {
46321           if (equiv->type && !equiv->type->clientdata)
46322             SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
46323         }
46324         equiv = equiv->next;
46325       }
46326     }
46327   }
46328 }
46329 
46330 #ifdef __cplusplus
46331 #if 0
46332 { /* c-mode */
46333 #endif
46334 }
46335 #endif
46336 
46337 /*
46338 
46339 */
46340 #ifdef __cplusplus
46341 extern "C"
46342 #endif
Init__xapian(void)46343 SWIGEXPORT void Init__xapian(void) {
46344   size_t i;
46345 
46346   SWIG_InitRuntime();
46347   mXapian = rb_define_module("Xapian");
46348 
46349   SWIG_InitializeModule(0);
46350   for (i = 0; i < swig_module.size; i++) {
46351     SWIG_define_class(swig_module.types[i]);
46352   }
46353 
46354   SWIG_RubyInitializeTrackings();
46355 
46356   SwigClassGC_VALUE.klass = rb_define_class_under(mXapian, "GC_VALUE", rb_cObject);
46357   SWIG_TypeClientData(SWIGTYPE_p_swig__GC_VALUE, (void *) &SwigClassGC_VALUE);
46358   rb_undef_alloc_func(SwigClassGC_VALUE.klass);
46359   rb_define_method(SwigClassGC_VALUE.klass, "inspect", VALUEFUNC(_wrap_GC_VALUE_inspect), -1);
46360   rb_define_method(SwigClassGC_VALUE.klass, "to_s", VALUEFUNC(_wrap_GC_VALUE_to_s), -1);
46361   SwigClassGC_VALUE.mark = 0;
46362   SwigClassGC_VALUE.trackObjects = 0;
46363 
46364   swig::SwigGCReferences::initialize();
46365 
46366 
46367   SwigClassConstIterator.klass = rb_define_class_under(mXapian, "ConstIterator", rb_cObject);
46368   SWIG_TypeClientData(SWIGTYPE_p_swig__ConstIterator, (void *) &SwigClassConstIterator);
46369   rb_undef_alloc_func(SwigClassConstIterator.klass);
46370   rb_define_method(SwigClassConstIterator.klass, "value", VALUEFUNC(_wrap_ConstIterator_value), -1);
46371   rb_define_method(SwigClassConstIterator.klass, "dup", VALUEFUNC(_wrap_ConstIterator_dup), -1);
46372   rb_define_method(SwigClassConstIterator.klass, "inspect", VALUEFUNC(_wrap_ConstIterator_inspect), -1);
46373   rb_define_method(SwigClassConstIterator.klass, "to_s", VALUEFUNC(_wrap_ConstIterator_to_s), -1);
46374   rb_define_method(SwigClassConstIterator.klass, "next", VALUEFUNC(_wrap_ConstIterator_next), -1);
46375   rb_define_method(SwigClassConstIterator.klass, "previous", VALUEFUNC(_wrap_ConstIterator_previous), -1);
46376   rb_define_method(SwigClassConstIterator.klass, "==", VALUEFUNC(_wrap_ConstIterator___eq__), -1);
46377   rb_define_method(SwigClassConstIterator.klass, "+", VALUEFUNC(_wrap_ConstIterator___add__), -1);
46378   rb_define_method(SwigClassConstIterator.klass, "-", VALUEFUNC(_wrap_ConstIterator___sub__), -1);
46379   SwigClassConstIterator.mark = 0;
46380   SwigClassConstIterator.destroy = (void (*)(void *)) free_swig_ConstIterator;
46381   SwigClassConstIterator.trackObjects = 0;
46382 
46383   SwigClassIterator.klass = rb_define_class_under(mXapian, "Iterator", ((swig_class *) SWIGTYPE_p_swig__ConstIterator->clientdata)->klass);
46384   SWIG_TypeClientData(SWIGTYPE_p_swig__Iterator, (void *) &SwigClassIterator);
46385   rb_undef_alloc_func(SwigClassIterator.klass);
46386   rb_define_method(SwigClassIterator.klass, "value=", VALUEFUNC(_wrap_Iterator_valuee___), -1);
46387   rb_define_method(SwigClassIterator.klass, "dup", VALUEFUNC(_wrap_Iterator_dup), -1);
46388   rb_define_method(SwigClassIterator.klass, "next", VALUEFUNC(_wrap_Iterator_next), -1);
46389   rb_define_method(SwigClassIterator.klass, "previous", VALUEFUNC(_wrap_Iterator_previous), -1);
46390   rb_define_method(SwigClassIterator.klass, "inspect", VALUEFUNC(_wrap_Iterator_inspect), -1);
46391   rb_define_method(SwigClassIterator.klass, "to_s", VALUEFUNC(_wrap_Iterator_to_s), -1);
46392   rb_define_method(SwigClassIterator.klass, "==", VALUEFUNC(_wrap_Iterator___eq__), -1);
46393   rb_define_method(SwigClassIterator.klass, "+", VALUEFUNC(_wrap_Iterator___add__), -1);
46394   rb_define_method(SwigClassIterator.klass, "-", VALUEFUNC(_wrap_Iterator___sub__), -1);
46395   SwigClassIterator.mark = 0;
46396   SwigClassIterator.destroy = (void (*)(void *)) free_swig_Iterator;
46397   SwigClassIterator.trackObjects = 0;
46398   rb_define_module_function(mXapian, "version_string", VALUEFUNC(_wrap_version_string), -1);
46399   rb_define_module_function(mXapian, "major_version", VALUEFUNC(_wrap_major_version), -1);
46400   rb_define_module_function(mXapian, "minor_version", VALUEFUNC(_wrap_minor_version), -1);
46401   rb_define_module_function(mXapian, "revision", VALUEFUNC(_wrap_revision), -1);
46402   rb_define_const(mXapian, "BAD_VALUENO", SWIG_From_unsigned_SS_int(static_cast< unsigned int >(Xapian::BAD_VALUENO)));
46403   rb_define_const(mXapian, "DB_CREATE", SWIG_From_int(static_cast< int >(Xapian::DB_CREATE)));
46404   rb_define_const(mXapian, "DB_CREATE_OR_OPEN", SWIG_From_int(static_cast< int >(Xapian::DB_CREATE_OR_OPEN)));
46405   rb_define_const(mXapian, "DB_CREATE_OR_OVERWRITE", SWIG_From_int(static_cast< int >(Xapian::DB_CREATE_OR_OVERWRITE)));
46406   rb_define_const(mXapian, "DB_OPEN", SWIG_From_int(static_cast< int >(Xapian::DB_OPEN)));
46407   rb_define_const(mXapian, "DB_NO_SYNC", SWIG_From_int(static_cast< int >(Xapian::DB_NO_SYNC)));
46408   rb_define_const(mXapian, "DB_FULL_SYNC", SWIG_From_int(static_cast< int >(Xapian::DB_FULL_SYNC)));
46409   rb_define_const(mXapian, "DB_DANGEROUS", SWIG_From_int(static_cast< int >(Xapian::DB_DANGEROUS)));
46410   rb_define_const(mXapian, "DB_NO_TERMLIST", SWIG_From_int(static_cast< int >(Xapian::DB_NO_TERMLIST)));
46411   rb_define_const(mXapian, "DB_BACKEND_CHERT", SWIG_From_int(static_cast< int >(Xapian::DB_BACKEND_CHERT)));
46412   rb_define_const(mXapian, "DB_BACKEND_GLASS", SWIG_From_int(static_cast< int >(Xapian::DB_BACKEND_GLASS)));
46413   rb_define_const(mXapian, "DB_BACKEND_INMEMORY", SWIG_From_int(static_cast< int >(Xapian::DB_BACKEND_INMEMORY)));
46414   rb_define_const(mXapian, "DB_BACKEND_STUB", SWIG_From_int(static_cast< int >(Xapian::DB_BACKEND_STUB)));
46415   rb_define_const(mXapian, "DB_RETRY_LOCK", SWIG_From_int(static_cast< int >(Xapian::DB_RETRY_LOCK)));
46416   rb_define_const(mXapian, "DBCHECK_SHORT_TREE", SWIG_From_int(static_cast< int >(Xapian::DBCHECK_SHORT_TREE)));
46417   rb_define_const(mXapian, "DBCHECK_FULL_TREE", SWIG_From_int(static_cast< int >(Xapian::DBCHECK_FULL_TREE)));
46418   rb_define_const(mXapian, "DBCHECK_SHOW_FREELIST", SWIG_From_int(static_cast< int >(Xapian::DBCHECK_SHOW_FREELIST)));
46419   rb_define_const(mXapian, "DBCHECK_SHOW_STATS", SWIG_From_int(static_cast< int >(Xapian::DBCHECK_SHOW_STATS)));
46420   rb_define_const(mXapian, "DBCHECK_FIX", SWIG_From_int(static_cast< int >(Xapian::DBCHECK_FIX)));
46421   rb_define_const(mXapian, "DBCOMPACT_MULTIPASS", SWIG_From_int(static_cast< int >(Xapian::DBCOMPACT_MULTIPASS)));
46422   rb_define_const(mXapian, "DBCOMPACT_NO_RENUMBER", SWIG_From_int(static_cast< int >(Xapian::DBCOMPACT_NO_RENUMBER)));
46423   rb_define_const(mXapian, "DBCOMPACT_SINGLE_FILE", SWIG_From_int(static_cast< int >(Xapian::DBCOMPACT_SINGLE_FILE)));
46424   rb_define_const(mXapian, "DOC_ASSUME_VALID", SWIG_From_int(static_cast< int >(Xapian::DOC_ASSUME_VALID)));
46425 
46426   SwigClassPositionIterator.klass = rb_define_class_under(mXapian, "PositionIterator", rb_cObject);
46427   SWIG_TypeClientData(SWIGTYPE_p_Xapian__PositionIterator, (void *) &SwigClassPositionIterator);
46428   rb_define_alloc_func(SwigClassPositionIterator.klass, _wrap_PositionIterator_allocate);
46429   rb_define_method(SwigClassPositionIterator.klass, "initialize", VALUEFUNC(_wrap_new_PositionIterator), -1);
46430   rb_define_method(SwigClassPositionIterator.klass, "skip_to", VALUEFUNC(_wrap_PositionIterator_skip_to), -1);
46431   rb_define_method(SwigClassPositionIterator.klass, "description", VALUEFUNC(_wrap_PositionIterator_description), -1);
46432   rb_define_method(SwigClassPositionIterator.klass, "equals", VALUEFUNC(_wrap_PositionIterator_equals), -1);
46433   rb_define_method(SwigClassPositionIterator.klass, "termpos", VALUEFUNC(_wrap_PositionIterator_termpos), -1);
46434   rb_define_method(SwigClassPositionIterator.klass, "next", VALUEFUNC(_wrap_PositionIterator_next), -1);
46435   SwigClassPositionIterator.mark = 0;
46436   SwigClassPositionIterator.destroy = (void (*)(void *)) free_Xapian_PositionIterator;
46437   SwigClassPositionIterator.trackObjects = 0;
46438 
46439   SwigClassPostingIterator.klass = rb_define_class_under(mXapian, "PostingIterator", rb_cObject);
46440   SWIG_TypeClientData(SWIGTYPE_p_Xapian__PostingIterator, (void *) &SwigClassPostingIterator);
46441   rb_define_alloc_func(SwigClassPostingIterator.klass, _wrap_PostingIterator_allocate);
46442   rb_define_method(SwigClassPostingIterator.klass, "initialize", VALUEFUNC(_wrap_new_PostingIterator), -1);
46443   rb_define_method(SwigClassPostingIterator.klass, "wdf", VALUEFUNC(_wrap_PostingIterator_wdf), -1);
46444   rb_define_method(SwigClassPostingIterator.klass, "doclength", VALUEFUNC(_wrap_PostingIterator_doclength), -1);
46445   rb_define_method(SwigClassPostingIterator.klass, "get_unique_terms", VALUEFUNC(_wrap_PostingIterator_get_unique_terms), -1);
46446   rb_define_method(SwigClassPostingIterator.klass, "_dangerous_positionlist_begin", VALUEFUNC(_wrap_PostingIterator__dangerous_positionlist_begin), -1);
46447   rb_define_method(SwigClassPostingIterator.klass, "_dangerous_positionlist_end", VALUEFUNC(_wrap_PostingIterator__dangerous_positionlist_end), -1);
46448   rb_define_method(SwigClassPostingIterator.klass, "skip_to", VALUEFUNC(_wrap_PostingIterator_skip_to), -1);
46449   rb_define_method(SwigClassPostingIterator.klass, "description", VALUEFUNC(_wrap_PostingIterator_description), -1);
46450   rb_define_method(SwigClassPostingIterator.klass, "equals", VALUEFUNC(_wrap_PostingIterator_equals), -1);
46451   rb_define_method(SwigClassPostingIterator.klass, "docid", VALUEFUNC(_wrap_PostingIterator_docid), -1);
46452   rb_define_method(SwigClassPostingIterator.klass, "next", VALUEFUNC(_wrap_PostingIterator_next), -1);
46453   SwigClassPostingIterator.mark = 0;
46454   SwigClassPostingIterator.destroy = (void (*)(void *)) free_Xapian_PostingIterator;
46455   SwigClassPostingIterator.trackObjects = 0;
46456 
46457   SwigClassTermIterator.klass = rb_define_class_under(mXapian, "TermIterator", rb_cObject);
46458   SWIG_TypeClientData(SWIGTYPE_p_Xapian__TermIterator, (void *) &SwigClassTermIterator);
46459   rb_define_alloc_func(SwigClassTermIterator.klass, _wrap_TermIterator_allocate);
46460   rb_define_method(SwigClassTermIterator.klass, "initialize", VALUEFUNC(_wrap_new_TermIterator), -1);
46461   rb_define_method(SwigClassTermIterator.klass, "wdf", VALUEFUNC(_wrap_TermIterator_wdf), -1);
46462   rb_define_method(SwigClassTermIterator.klass, "termfreq", VALUEFUNC(_wrap_TermIterator_termfreq), -1);
46463   rb_define_method(SwigClassTermIterator.klass, "positionlist_count", VALUEFUNC(_wrap_TermIterator_positionlist_count), -1);
46464   rb_define_method(SwigClassTermIterator.klass, "_dangerous_positionlist_begin", VALUEFUNC(_wrap_TermIterator__dangerous_positionlist_begin), -1);
46465   rb_define_method(SwigClassTermIterator.klass, "_dangerous_positionlist_end", VALUEFUNC(_wrap_TermIterator__dangerous_positionlist_end), -1);
46466   rb_define_method(SwigClassTermIterator.klass, "skip_to", VALUEFUNC(_wrap_TermIterator_skip_to), -1);
46467   rb_define_method(SwigClassTermIterator.klass, "description", VALUEFUNC(_wrap_TermIterator_description), -1);
46468   rb_define_method(SwigClassTermIterator.klass, "equals", VALUEFUNC(_wrap_TermIterator_equals), -1);
46469   rb_define_method(SwigClassTermIterator.klass, "term", VALUEFUNC(_wrap_TermIterator_term), -1);
46470   rb_define_method(SwigClassTermIterator.klass, "next", VALUEFUNC(_wrap_TermIterator_next), -1);
46471   SwigClassTermIterator.mark = 0;
46472   SwigClassTermIterator.destroy = (void (*)(void *)) free_Xapian_TermIterator;
46473   SwigClassTermIterator.trackObjects = 0;
46474 
46475   SwigClassValueIterator.klass = rb_define_class_under(mXapian, "ValueIterator", rb_cObject);
46476   SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueIterator, (void *) &SwigClassValueIterator);
46477   rb_define_alloc_func(SwigClassValueIterator.klass, _wrap_ValueIterator_allocate);
46478   rb_define_method(SwigClassValueIterator.klass, "initialize", VALUEFUNC(_wrap_new_ValueIterator), -1);
46479   rb_define_method(SwigClassValueIterator.klass, "docid", VALUEFUNC(_wrap_ValueIterator_docid), -1);
46480   rb_define_method(SwigClassValueIterator.klass, "valueno", VALUEFUNC(_wrap_ValueIterator_valueno), -1);
46481   rb_define_method(SwigClassValueIterator.klass, "skip_to", VALUEFUNC(_wrap_ValueIterator_skip_to), -1);
46482   rb_define_method(SwigClassValueIterator.klass, "check", VALUEFUNC(_wrap_ValueIterator_check), -1);
46483   rb_define_method(SwigClassValueIterator.klass, "description", VALUEFUNC(_wrap_ValueIterator_description), -1);
46484   rb_define_method(SwigClassValueIterator.klass, "equals", VALUEFUNC(_wrap_ValueIterator_equals), -1);
46485   rb_define_method(SwigClassValueIterator.klass, "value", VALUEFUNC(_wrap_ValueIterator_value), -1);
46486   rb_define_method(SwigClassValueIterator.klass, "next", VALUEFUNC(_wrap_ValueIterator_next), -1);
46487   SwigClassValueIterator.mark = 0;
46488   SwigClassValueIterator.destroy = (void (*)(void *)) free_Xapian_ValueIterator;
46489   SwigClassValueIterator.trackObjects = 0;
46490 
46491   SwigClassDocument.klass = rb_define_class_under(mXapian, "Document", rb_cObject);
46492   SWIG_TypeClientData(SWIGTYPE_p_Xapian__Document, (void *) &SwigClassDocument);
46493   rb_define_alloc_func(SwigClassDocument.klass, _wrap_Document_allocate);
46494   rb_define_method(SwigClassDocument.klass, "initialize", VALUEFUNC(_wrap_new_Document), -1);
46495   rb_define_method(SwigClassDocument.klass, "value", VALUEFUNC(_wrap_Document_value), -1);
46496   rb_define_method(SwigClassDocument.klass, "add_value", VALUEFUNC(_wrap_Document_add_value), -1);
46497   rb_define_method(SwigClassDocument.klass, "remove_value", VALUEFUNC(_wrap_Document_remove_value), -1);
46498   rb_define_method(SwigClassDocument.klass, "clear_values", VALUEFUNC(_wrap_Document_clear_values), -1);
46499   rb_define_method(SwigClassDocument.klass, "data", VALUEFUNC(_wrap_Document_data), -1);
46500   rb_define_method(SwigClassDocument.klass, "data=", VALUEFUNC(_wrap_Document_datae___), -1);
46501   rb_define_method(SwigClassDocument.klass, "add_posting", VALUEFUNC(_wrap_Document_add_posting), -1);
46502   rb_define_method(SwigClassDocument.klass, "add_term", VALUEFUNC(_wrap_Document_add_term), -1);
46503   rb_define_method(SwigClassDocument.klass, "add_boolean_term", VALUEFUNC(_wrap_Document_add_boolean_term), -1);
46504   rb_define_method(SwigClassDocument.klass, "remove_posting", VALUEFUNC(_wrap_Document_remove_posting), -1);
46505   rb_define_method(SwigClassDocument.klass, "remove_postings", VALUEFUNC(_wrap_Document_remove_postings), -1);
46506   rb_define_method(SwigClassDocument.klass, "remove_term", VALUEFUNC(_wrap_Document_remove_term), -1);
46507   rb_define_method(SwigClassDocument.klass, "clear_terms", VALUEFUNC(_wrap_Document_clear_terms), -1);
46508   rb_define_method(SwigClassDocument.klass, "termlist_count", VALUEFUNC(_wrap_Document_termlist_count), -1);
46509   rb_define_method(SwigClassDocument.klass, "_dangerous_termlist_begin", VALUEFUNC(_wrap_Document__dangerous_termlist_begin), -1);
46510   rb_define_method(SwigClassDocument.klass, "_dangerous_termlist_end", VALUEFUNC(_wrap_Document__dangerous_termlist_end), -1);
46511   rb_define_method(SwigClassDocument.klass, "values_count", VALUEFUNC(_wrap_Document_values_count), -1);
46512   rb_define_method(SwigClassDocument.klass, "_dangerous_values_begin", VALUEFUNC(_wrap_Document__dangerous_values_begin), -1);
46513   rb_define_method(SwigClassDocument.klass, "_dangerous_values_end", VALUEFUNC(_wrap_Document__dangerous_values_end), -1);
46514   rb_define_method(SwigClassDocument.klass, "docid", VALUEFUNC(_wrap_Document_docid), -1);
46515   rb_define_method(SwigClassDocument.klass, "serialise", VALUEFUNC(_wrap_Document_serialise), -1);
46516   rb_define_singleton_method(SwigClassDocument.klass, "unserialise", VALUEFUNC(_wrap_Document_unserialise), -1);
46517   rb_define_method(SwigClassDocument.klass, "description", VALUEFUNC(_wrap_Document_description), -1);
46518   SwigClassDocument.mark = 0;
46519   SwigClassDocument.destroy = (void (*)(void *)) free_Xapian_Document;
46520   SwigClassDocument.trackObjects = 0;
46521 
46522   SwigClassRegistry.klass = rb_define_class_under(mXapian, "Registry", rb_cObject);
46523   SWIG_TypeClientData(SWIGTYPE_p_Xapian__Registry, (void *) &SwigClassRegistry);
46524   rb_define_alloc_func(SwigClassRegistry.klass, _wrap_Registry_allocate);
46525   rb_define_method(SwigClassRegistry.klass, "initialize", VALUEFUNC(_wrap_new_Registry), -1);
46526   rb_define_method(SwigClassRegistry.klass, "register_weighting_scheme", VALUEFUNC(_wrap_Registry_register_weighting_scheme), -1);
46527   rb_define_method(SwigClassRegistry.klass, "get_weighting_scheme", VALUEFUNC(_wrap_Registry_get_weighting_scheme), -1);
46528   rb_define_method(SwigClassRegistry.klass, "register_posting_source", VALUEFUNC(_wrap_Registry_register_posting_source), -1);
46529   rb_define_method(SwigClassRegistry.klass, "get_posting_source", VALUEFUNC(_wrap_Registry_get_posting_source), -1);
46530   rb_define_method(SwigClassRegistry.klass, "register_match_spy", VALUEFUNC(_wrap_Registry_register_match_spy), -1);
46531   rb_define_method(SwigClassRegistry.klass, "get_match_spy", VALUEFUNC(_wrap_Registry_get_match_spy), -1);
46532   rb_define_method(SwigClassRegistry.klass, "register_lat_long_metric", VALUEFUNC(_wrap_Registry_register_lat_long_metric), -1);
46533   rb_define_method(SwigClassRegistry.klass, "get_lat_long_metric", VALUEFUNC(_wrap_Registry_get_lat_long_metric), -1);
46534   SwigClassRegistry.mark = 0;
46535   SwigClassRegistry.destroy = (void (*)(void *)) free_Xapian_Registry;
46536   SwigClassRegistry.trackObjects = 0;
46537 
46538   SwigClassQuery.klass = rb_define_class_under(mXapian, "Query", rb_cObject);
46539   SWIG_TypeClientData(SWIGTYPE_p_Xapian__Query, (void *) &SwigClassQuery);
46540   rb_define_alloc_func(SwigClassQuery.klass, _wrap_Query_allocate);
46541   rb_define_method(SwigClassQuery.klass, "initialize", VALUEFUNC(_wrap_new_Query), -1);
46542   rb_define_const(SwigClassQuery.klass, "OP_AND", SWIG_From_int(static_cast< int >(Xapian::Query::OP_AND)));
46543   rb_define_const(SwigClassQuery.klass, "OP_OR", SWIG_From_int(static_cast< int >(Xapian::Query::OP_OR)));
46544   rb_define_const(SwigClassQuery.klass, "OP_AND_NOT", SWIG_From_int(static_cast< int >(Xapian::Query::OP_AND_NOT)));
46545   rb_define_const(SwigClassQuery.klass, "OP_XOR", SWIG_From_int(static_cast< int >(Xapian::Query::OP_XOR)));
46546   rb_define_const(SwigClassQuery.klass, "OP_AND_MAYBE", SWIG_From_int(static_cast< int >(Xapian::Query::OP_AND_MAYBE)));
46547   rb_define_const(SwigClassQuery.klass, "OP_FILTER", SWIG_From_int(static_cast< int >(Xapian::Query::OP_FILTER)));
46548   rb_define_const(SwigClassQuery.klass, "OP_NEAR", SWIG_From_int(static_cast< int >(Xapian::Query::OP_NEAR)));
46549   rb_define_const(SwigClassQuery.klass, "OP_PHRASE", SWIG_From_int(static_cast< int >(Xapian::Query::OP_PHRASE)));
46550   rb_define_const(SwigClassQuery.klass, "OP_VALUE_RANGE", SWIG_From_int(static_cast< int >(Xapian::Query::OP_VALUE_RANGE)));
46551   rb_define_const(SwigClassQuery.klass, "OP_SCALE_WEIGHT", SWIG_From_int(static_cast< int >(Xapian::Query::OP_SCALE_WEIGHT)));
46552   rb_define_const(SwigClassQuery.klass, "OP_ELITE_SET", SWIG_From_int(static_cast< int >(Xapian::Query::OP_ELITE_SET)));
46553   rb_define_const(SwigClassQuery.klass, "OP_VALUE_GE", SWIG_From_int(static_cast< int >(Xapian::Query::OP_VALUE_GE)));
46554   rb_define_const(SwigClassQuery.klass, "OP_VALUE_LE", SWIG_From_int(static_cast< int >(Xapian::Query::OP_VALUE_LE)));
46555   rb_define_const(SwigClassQuery.klass, "OP_SYNONYM", SWIG_From_int(static_cast< int >(Xapian::Query::OP_SYNONYM)));
46556   rb_define_const(SwigClassQuery.klass, "OP_MAX", SWIG_From_int(static_cast< int >(Xapian::Query::OP_MAX)));
46557   rb_define_const(SwigClassQuery.klass, "OP_WILDCARD", SWIG_From_int(static_cast< int >(Xapian::Query::OP_WILDCARD)));
46558   rb_define_const(SwigClassQuery.klass, "OP_INVALID", SWIG_From_int(static_cast< int >(Xapian::Query::OP_INVALID)));
46559   rb_define_const(SwigClassQuery.klass, "WILDCARD_LIMIT_ERROR", SWIG_From_int(static_cast< int >(Xapian::Query::WILDCARD_LIMIT_ERROR)));
46560   rb_define_const(SwigClassQuery.klass, "WILDCARD_LIMIT_FIRST", SWIG_From_int(static_cast< int >(Xapian::Query::WILDCARD_LIMIT_FIRST)));
46561   rb_define_const(SwigClassQuery.klass, "WILDCARD_LIMIT_MOST_FREQUENT", SWIG_From_int(static_cast< int >(Xapian::Query::WILDCARD_LIMIT_MOST_FREQUENT)));
46562   rb_define_method(SwigClassQuery.klass, "_dangerous_terms_begin", VALUEFUNC(_wrap_Query__dangerous_terms_begin), -1);
46563   rb_define_method(SwigClassQuery.klass, "_dangerous_terms_end", VALUEFUNC(_wrap_Query__dangerous_terms_end), -1);
46564   rb_define_method(SwigClassQuery.klass, "_dangerous_unique_terms_begin", VALUEFUNC(_wrap_Query__dangerous_unique_terms_begin), -1);
46565   rb_define_method(SwigClassQuery.klass, "_dangerous_unique_terms_end", VALUEFUNC(_wrap_Query__dangerous_unique_terms_end), -1);
46566   rb_define_method(SwigClassQuery.klass, "length", VALUEFUNC(_wrap_Query_length), -1);
46567   rb_define_method(SwigClassQuery.klass, "empty?", VALUEFUNC(_wrap_Query_emptyq___), -1);
46568   rb_define_method(SwigClassQuery.klass, "serialise", VALUEFUNC(_wrap_Query_serialise), -1);
46569   rb_define_singleton_method(SwigClassQuery.klass, "unserialise", VALUEFUNC(_wrap_Query_unserialise), -1);
46570   rb_define_method(SwigClassQuery.klass, "type", VALUEFUNC(_wrap_Query_type), -1);
46571   rb_define_method(SwigClassQuery.klass, "get_num_subqueries", VALUEFUNC(_wrap_Query_get_num_subqueries), -1);
46572   rb_define_method(SwigClassQuery.klass, "get_subquery", VALUEFUNC(_wrap_Query_get_subquery), -1);
46573   rb_define_method(SwigClassQuery.klass, "description", VALUEFUNC(_wrap_Query_description), -1);
46574   SwigClassQuery.mark = 0;
46575   SwigClassQuery.destroy = (void (*)(void *)) free_Xapian_Query;
46576   SwigClassQuery.trackObjects = 0;
46577   rb_define_module_function(mXapian, "disown_StemImplementation", VALUEFUNC(_wrap_disown_StemImplementation), -1);
46578 
46579   SwigClassStemImplementation.klass = rb_define_class_under(mXapian, "StemImplementation", rb_cObject);
46580   SWIG_TypeClientData(SWIGTYPE_p_Xapian__StemImplementation, (void *) &SwigClassStemImplementation);
46581   rb_define_alloc_func(SwigClassStemImplementation.klass, _wrap_StemImplementation_allocate);
46582   rb_define_method(SwigClassStemImplementation.klass, "initialize", VALUEFUNC(_wrap_new_StemImplementation), -1);
46583   rb_define_method(SwigClassStemImplementation.klass, "call", VALUEFUNC(_wrap_StemImplementation___call__), -1);
46584   rb_define_method(SwigClassStemImplementation.klass, "description", VALUEFUNC(_wrap_StemImplementation_description), -1);
46585   SwigClassStemImplementation.mark = 0;
46586   SwigClassStemImplementation.destroy = (void (*)(void *)) free_Xapian_StemImplementation;
46587   SwigClassStemImplementation.trackObjects = 0;
46588 
46589   SwigClassStem.klass = rb_define_class_under(mXapian, "Stem", rb_cObject);
46590   SWIG_TypeClientData(SWIGTYPE_p_Xapian__Stem, (void *) &SwigClassStem);
46591   rb_define_alloc_func(SwigClassStem.klass, _wrap_Stem_allocate);
46592   rb_define_method(SwigClassStem.klass, "initialize", VALUEFUNC(_wrap_new_Stem), -1);
46593   rb_define_method(SwigClassStem.klass, "call", VALUEFUNC(_wrap_Stem___call__), -1);
46594   rb_define_method(SwigClassStem.klass, "is_none", VALUEFUNC(_wrap_Stem_is_none), -1);
46595   rb_define_method(SwigClassStem.klass, "description", VALUEFUNC(_wrap_Stem_description), -1);
46596   rb_define_singleton_method(SwigClassStem.klass, "available_languages", VALUEFUNC(_wrap_Stem_available_languages), -1);
46597   SwigClassStem.mark = 0;
46598   SwigClassStem.destroy = (void (*)(void *)) free_Xapian_Stem;
46599   SwigClassStem.trackObjects = 0;
46600 
46601   SwigClassTermGenerator.klass = rb_define_class_under(mXapian, "TermGenerator", rb_cObject);
46602   SWIG_TypeClientData(SWIGTYPE_p_Xapian__TermGenerator, (void *) &SwigClassTermGenerator);
46603   rb_define_alloc_func(SwigClassTermGenerator.klass, _wrap_TermGenerator_allocate);
46604   rb_define_method(SwigClassTermGenerator.klass, "initialize", VALUEFUNC(_wrap_new_TermGenerator), -1);
46605   rb_define_method(SwigClassTermGenerator.klass, "stemmer=", VALUEFUNC(_wrap_TermGenerator_stemmere___), -1);
46606   rb_define_method(SwigClassTermGenerator.klass, "stopper=", VALUEFUNC(_wrap_TermGenerator_stoppere___), -1);
46607   rb_define_method(SwigClassTermGenerator.klass, "document=", VALUEFUNC(_wrap_TermGenerator_documente___), -1);
46608   rb_define_method(SwigClassTermGenerator.klass, "document", VALUEFUNC(_wrap_TermGenerator_document), -1);
46609   rb_define_method(SwigClassTermGenerator.klass, "database=", VALUEFUNC(_wrap_TermGenerator_databasee___), -1);
46610   rb_define_const(SwigClassTermGenerator.klass, "FLAG_SPELLING", SWIG_From_int(static_cast< int >(Xapian::TermGenerator::FLAG_SPELLING)));
46611   rb_define_const(SwigClassTermGenerator.klass, "FLAG_CJK_NGRAM", SWIG_From_int(static_cast< int >(Xapian::TermGenerator::FLAG_CJK_NGRAM)));
46612   rb_define_const(SwigClassTermGenerator.klass, "STEM_NONE", SWIG_From_int(static_cast< int >(Xapian::TermGenerator::STEM_NONE)));
46613   rb_define_const(SwigClassTermGenerator.klass, "STEM_SOME", SWIG_From_int(static_cast< int >(Xapian::TermGenerator::STEM_SOME)));
46614   rb_define_const(SwigClassTermGenerator.klass, "STEM_ALL", SWIG_From_int(static_cast< int >(Xapian::TermGenerator::STEM_ALL)));
46615   rb_define_const(SwigClassTermGenerator.klass, "STEM_ALL_Z", SWIG_From_int(static_cast< int >(Xapian::TermGenerator::STEM_ALL_Z)));
46616   rb_define_const(SwigClassTermGenerator.klass, "STEM_SOME_FULL_POS", SWIG_From_int(static_cast< int >(Xapian::TermGenerator::STEM_SOME_FULL_POS)));
46617   rb_define_const(SwigClassTermGenerator.klass, "STOP_NONE", SWIG_From_int(static_cast< int >(Xapian::TermGenerator::STOP_NONE)));
46618   rb_define_const(SwigClassTermGenerator.klass, "STOP_ALL", SWIG_From_int(static_cast< int >(Xapian::TermGenerator::STOP_ALL)));
46619   rb_define_const(SwigClassTermGenerator.klass, "STOP_STEMMED", SWIG_From_int(static_cast< int >(Xapian::TermGenerator::STOP_STEMMED)));
46620   rb_define_method(SwigClassTermGenerator.klass, "set_flags", VALUEFUNC(_wrap_TermGenerator_set_flags), -1);
46621   rb_define_method(SwigClassTermGenerator.klass, "stemming_strategy=", VALUEFUNC(_wrap_TermGenerator_stemming_strategye___), -1);
46622   rb_define_method(SwigClassTermGenerator.klass, "set_stopper_strategy", VALUEFUNC(_wrap_TermGenerator_set_stopper_strategy), -1);
46623   rb_define_method(SwigClassTermGenerator.klass, "set_max_word_length", VALUEFUNC(_wrap_TermGenerator_set_max_word_length), -1);
46624   rb_define_method(SwigClassTermGenerator.klass, "index_text", VALUEFUNC(_wrap_TermGenerator_index_text), -1);
46625   rb_define_method(SwigClassTermGenerator.klass, "index_text_without_positions", VALUEFUNC(_wrap_TermGenerator_index_text_without_positions), -1);
46626   rb_define_method(SwigClassTermGenerator.klass, "increase_termpos", VALUEFUNC(_wrap_TermGenerator_increase_termpos), -1);
46627   rb_define_method(SwigClassTermGenerator.klass, "termpos", VALUEFUNC(_wrap_TermGenerator_termpos), -1);
46628   rb_define_method(SwigClassTermGenerator.klass, "set_termpos", VALUEFUNC(_wrap_TermGenerator_set_termpos), -1);
46629   rb_define_method(SwigClassTermGenerator.klass, "description", VALUEFUNC(_wrap_TermGenerator_description), -1);
46630   SwigClassTermGenerator.mark = 0;
46631   SwigClassTermGenerator.destroy = (void (*)(void *)) free_Xapian_TermGenerator;
46632   SwigClassTermGenerator.trackObjects = 0;
46633 
46634   SwigClassMSet.klass = rb_define_class_under(mXapian, "MSet", rb_cObject);
46635   SWIG_TypeClientData(SWIGTYPE_p_Xapian__MSet, (void *) &SwigClassMSet);
46636   rb_define_alloc_func(SwigClassMSet.klass, _wrap_MSet_allocate);
46637   rb_define_method(SwigClassMSet.klass, "initialize", VALUEFUNC(_wrap_new_MSet), -1);
46638   rb_define_method(SwigClassMSet.klass, "convert_to_percent", VALUEFUNC(_wrap_MSet_convert_to_percent), -1);
46639   rb_define_method(SwigClassMSet.klass, "termfreq", VALUEFUNC(_wrap_MSet_termfreq), -1);
46640   rb_define_method(SwigClassMSet.klass, "termweight", VALUEFUNC(_wrap_MSet_termweight), -1);
46641   rb_define_method(SwigClassMSet.klass, "firstitem", VALUEFUNC(_wrap_MSet_firstitem), -1);
46642   rb_define_method(SwigClassMSet.klass, "matches_lower_bound", VALUEFUNC(_wrap_MSet_matches_lower_bound), -1);
46643   rb_define_method(SwigClassMSet.klass, "matches_estimated", VALUEFUNC(_wrap_MSet_matches_estimated), -1);
46644   rb_define_method(SwigClassMSet.klass, "matches_upper_bound", VALUEFUNC(_wrap_MSet_matches_upper_bound), -1);
46645   rb_define_method(SwigClassMSet.klass, "get_uncollapsed_matches_lower_bound", VALUEFUNC(_wrap_MSet_get_uncollapsed_matches_lower_bound), -1);
46646   rb_define_method(SwigClassMSet.klass, "get_uncollapsed_matches_estimated", VALUEFUNC(_wrap_MSet_get_uncollapsed_matches_estimated), -1);
46647   rb_define_method(SwigClassMSet.klass, "get_uncollapsed_matches_upper_bound", VALUEFUNC(_wrap_MSet_get_uncollapsed_matches_upper_bound), -1);
46648   rb_define_method(SwigClassMSet.klass, "max_attained", VALUEFUNC(_wrap_MSet_max_attained), -1);
46649   rb_define_method(SwigClassMSet.klass, "max_possible", VALUEFUNC(_wrap_MSet_max_possible), -1);
46650   rb_define_const(SwigClassMSet.klass, "SNIPPET_BACKGROUND_MODEL", SWIG_From_int(static_cast< int >(Xapian::MSet::SNIPPET_BACKGROUND_MODEL)));
46651   rb_define_const(SwigClassMSet.klass, "SNIPPET_EXHAUSTIVE", SWIG_From_int(static_cast< int >(Xapian::MSet::SNIPPET_EXHAUSTIVE)));
46652   rb_define_const(SwigClassMSet.klass, "SNIPPET_EMPTY_WITHOUT_MATCH", SWIG_From_int(static_cast< int >(Xapian::MSet::SNIPPET_EMPTY_WITHOUT_MATCH)));
46653   rb_define_const(SwigClassMSet.klass, "SNIPPET_CJK_NGRAM", SWIG_From_int(static_cast< int >(Xapian::MSet::SNIPPET_CJK_NGRAM)));
46654   rb_define_method(SwigClassMSet.klass, "snippet", VALUEFUNC(_wrap_MSet_snippet), -1);
46655   rb_define_method(SwigClassMSet.klass, "fetch", VALUEFUNC(_wrap_MSet_fetch), -1);
46656   rb_define_method(SwigClassMSet.klass, "size", VALUEFUNC(_wrap_MSet_size), -1);
46657   rb_define_method(SwigClassMSet.klass, "empty?", VALUEFUNC(_wrap_MSet_emptyq___), -1);
46658   rb_define_method(SwigClassMSet.klass, "_begin", VALUEFUNC(_wrap_MSet__begin), -1);
46659   rb_define_method(SwigClassMSet.klass, "_end", VALUEFUNC(_wrap_MSet__end), -1);
46660   rb_define_method(SwigClassMSet.klass, "_back", VALUEFUNC(_wrap_MSet__back), -1);
46661   rb_define_method(SwigClassMSet.klass, "description", VALUEFUNC(_wrap_MSet_description), -1);
46662   rb_define_method(SwigClassMSet.klass, "docid", VALUEFUNC(_wrap_MSet_docid), -1);
46663   rb_define_method(SwigClassMSet.klass, "document", VALUEFUNC(_wrap_MSet_document), -1);
46664   rb_define_method(SwigClassMSet.klass, "hit", VALUEFUNC(_wrap_MSet_hit), -1);
46665   rb_define_method(SwigClassMSet.klass, "document_percentage", VALUEFUNC(_wrap_MSet_document_percentage), -1);
46666   SwigClassMSet.mark = 0;
46667   SwigClassMSet.destroy = (void (*)(void *)) free_Xapian_MSet;
46668   SwigClassMSet.trackObjects = 0;
46669 
46670   SwigClassMSetIterator.klass = rb_define_class_under(mXapian, "MSetIterator", rb_cObject);
46671   SWIG_TypeClientData(SWIGTYPE_p_Xapian__MSetIterator, (void *) &SwigClassMSetIterator);
46672   rb_define_alloc_func(SwigClassMSetIterator.klass, _wrap_MSetIterator_allocate);
46673   rb_define_method(SwigClassMSetIterator.klass, "initialize", VALUEFUNC(_wrap_new_MSetIterator), -1);
46674   rb_define_method(SwigClassMSetIterator.klass, "mset=", VALUEFUNC(_wrap_MSetIterator_mset_set), -1);
46675   rb_define_method(SwigClassMSetIterator.klass, "mset", VALUEFUNC(_wrap_MSetIterator_mset_get), -1);
46676   rb_define_method(SwigClassMSetIterator.klass, "off_from_end=", VALUEFUNC(_wrap_MSetIterator_off_from_end_set), -1);
46677   rb_define_method(SwigClassMSetIterator.klass, "off_from_end", VALUEFUNC(_wrap_MSetIterator_off_from_end_get), -1);
46678   rb_define_method(SwigClassMSetIterator.klass, "rank", VALUEFUNC(_wrap_MSetIterator_rank), -1);
46679   rb_define_method(SwigClassMSetIterator.klass, "document", VALUEFUNC(_wrap_MSetIterator_document), -1);
46680   rb_define_method(SwigClassMSetIterator.klass, "weight", VALUEFUNC(_wrap_MSetIterator_weight), -1);
46681   rb_define_method(SwigClassMSetIterator.klass, "get_collapse_key", VALUEFUNC(_wrap_MSetIterator_get_collapse_key), -1);
46682   rb_define_method(SwigClassMSetIterator.klass, "collapse_count", VALUEFUNC(_wrap_MSetIterator_collapse_count), -1);
46683   rb_define_method(SwigClassMSetIterator.klass, "get_sort_key", VALUEFUNC(_wrap_MSetIterator_get_sort_key), -1);
46684   rb_define_method(SwigClassMSetIterator.klass, "percent", VALUEFUNC(_wrap_MSetIterator_percent), -1);
46685   rb_define_method(SwigClassMSetIterator.klass, "description", VALUEFUNC(_wrap_MSetIterator_description), -1);
46686   rb_define_method(SwigClassMSetIterator.klass, "equals", VALUEFUNC(_wrap_MSetIterator_equals), -1);
46687   rb_define_method(SwigClassMSetIterator.klass, "docid", VALUEFUNC(_wrap_MSetIterator_docid), -1);
46688   rb_define_method(SwigClassMSetIterator.klass, "next", VALUEFUNC(_wrap_MSetIterator_next), -1);
46689   rb_define_method(SwigClassMSetIterator.klass, "prev", VALUEFUNC(_wrap_MSetIterator_prev), -1);
46690   SwigClassMSetIterator.mark = 0;
46691   SwigClassMSetIterator.destroy = (void (*)(void *)) free_Xapian_MSetIterator;
46692   SwigClassMSetIterator.trackObjects = 0;
46693 
46694   SwigClassESet.klass = rb_define_class_under(mXapian, "ESet", rb_cObject);
46695   SWIG_TypeClientData(SWIGTYPE_p_Xapian__ESet, (void *) &SwigClassESet);
46696   rb_define_alloc_func(SwigClassESet.klass, _wrap_ESet_allocate);
46697   rb_define_method(SwigClassESet.klass, "initialize", VALUEFUNC(_wrap_new_ESet), -1);
46698   rb_define_method(SwigClassESet.klass, "size", VALUEFUNC(_wrap_ESet_size), -1);
46699   rb_define_method(SwigClassESet.klass, "empty?", VALUEFUNC(_wrap_ESet_emptyq___), -1);
46700   rb_define_method(SwigClassESet.klass, "ebound", VALUEFUNC(_wrap_ESet_ebound), -1);
46701   rb_define_method(SwigClassESet.klass, "_begin", VALUEFUNC(_wrap_ESet__begin), -1);
46702   rb_define_method(SwigClassESet.klass, "_end", VALUEFUNC(_wrap_ESet__end), -1);
46703   rb_define_method(SwigClassESet.klass, "_back", VALUEFUNC(_wrap_ESet__back), -1);
46704   rb_define_method(SwigClassESet.klass, "description", VALUEFUNC(_wrap_ESet_description), -1);
46705   SwigClassESet.mark = 0;
46706   SwigClassESet.destroy = (void (*)(void *)) free_Xapian_ESet;
46707   SwigClassESet.trackObjects = 0;
46708 
46709   SwigClassESetIterator.klass = rb_define_class_under(mXapian, "ESetIterator", rb_cObject);
46710   SWIG_TypeClientData(SWIGTYPE_p_Xapian__ESetIterator, (void *) &SwigClassESetIterator);
46711   rb_define_alloc_func(SwigClassESetIterator.klass, _wrap_ESetIterator_allocate);
46712   rb_define_method(SwigClassESetIterator.klass, "initialize", VALUEFUNC(_wrap_new_ESetIterator), -1);
46713   rb_define_method(SwigClassESetIterator.klass, "eset=", VALUEFUNC(_wrap_ESetIterator_eset_set), -1);
46714   rb_define_method(SwigClassESetIterator.klass, "eset", VALUEFUNC(_wrap_ESetIterator_eset_get), -1);
46715   rb_define_method(SwigClassESetIterator.klass, "off_from_end=", VALUEFUNC(_wrap_ESetIterator_off_from_end_set), -1);
46716   rb_define_method(SwigClassESetIterator.klass, "off_from_end", VALUEFUNC(_wrap_ESetIterator_off_from_end_get), -1);
46717   rb_define_method(SwigClassESetIterator.klass, "weight", VALUEFUNC(_wrap_ESetIterator_weight), -1);
46718   rb_define_method(SwigClassESetIterator.klass, "description", VALUEFUNC(_wrap_ESetIterator_description), -1);
46719   rb_define_method(SwigClassESetIterator.klass, "equals", VALUEFUNC(_wrap_ESetIterator_equals), -1);
46720   rb_define_method(SwigClassESetIterator.klass, "term", VALUEFUNC(_wrap_ESetIterator_term), -1);
46721   rb_define_method(SwigClassESetIterator.klass, "next", VALUEFUNC(_wrap_ESetIterator_next), -1);
46722   rb_define_method(SwigClassESetIterator.klass, "prev", VALUEFUNC(_wrap_ESetIterator_prev), -1);
46723   SwigClassESetIterator.mark = 0;
46724   SwigClassESetIterator.destroy = (void (*)(void *)) free_Xapian_ESetIterator;
46725   SwigClassESetIterator.trackObjects = 0;
46726   rb_define_module_function(mXapian, "==", VALUEFUNC(_wrap___eq__), -1);
46727   rb_define_module_function(mXapian, "<", VALUEFUNC(_wrap___lt__), -1);
46728   rb_define_module_function(mXapian, ">", VALUEFUNC(_wrap___gt__), -1);
46729   rb_define_module_function(mXapian, ">=", VALUEFUNC(_wrap___ge__), -1);
46730   rb_define_module_function(mXapian, "<=", VALUEFUNC(_wrap___le__), -1);
46731   rb_define_module_function(mXapian, "+", VALUEFUNC(_wrap___add__), -1);
46732 
46733   SwigClassRSet.klass = rb_define_class_under(mXapian, "RSet", rb_cObject);
46734   SWIG_TypeClientData(SWIGTYPE_p_Xapian__RSet, (void *) &SwigClassRSet);
46735   rb_define_alloc_func(SwigClassRSet.klass, _wrap_RSet_allocate);
46736   rb_define_method(SwigClassRSet.klass, "initialize", VALUEFUNC(_wrap_new_RSet), -1);
46737   rb_define_method(SwigClassRSet.klass, "size", VALUEFUNC(_wrap_RSet_size), -1);
46738   rb_define_method(SwigClassRSet.klass, "empty?", VALUEFUNC(_wrap_RSet_emptyq___), -1);
46739   rb_define_method(SwigClassRSet.klass, "add_document", VALUEFUNC(_wrap_RSet_add_document), -1);
46740   rb_define_method(SwigClassRSet.klass, "remove_document", VALUEFUNC(_wrap_RSet_remove_document), -1);
46741   rb_define_method(SwigClassRSet.klass, "contains", VALUEFUNC(_wrap_RSet_contains), -1);
46742   rb_define_method(SwigClassRSet.klass, "description", VALUEFUNC(_wrap_RSet_description), -1);
46743   SwigClassRSet.mark = 0;
46744   SwigClassRSet.destroy = (void (*)(void *)) free_Xapian_RSet;
46745   SwigClassRSet.trackObjects = 0;
46746   rb_define_module_function(mXapian, "disown_MatchDecider", VALUEFUNC(_wrap_disown_MatchDecider), -1);
46747 
46748   SwigClassMatchDecider.klass = rb_define_class_under(mXapian, "MatchDecider", rb_cObject);
46749   SWIG_TypeClientData(SWIGTYPE_p_Xapian__MatchDecider, (void *) &SwigClassMatchDecider);
46750   rb_define_alloc_func(SwigClassMatchDecider.klass, _wrap_MatchDecider_allocate);
46751   rb_define_method(SwigClassMatchDecider.klass, "initialize", VALUEFUNC(_wrap_new_MatchDecider), -1);
46752   rb_define_method(SwigClassMatchDecider.klass, "call", VALUEFUNC(_wrap_MatchDecider___call__), -1);
46753   SwigClassMatchDecider.mark = 0;
46754   SwigClassMatchDecider.destroy = (void (*)(void *)) free_Xapian_MatchDecider;
46755   SwigClassMatchDecider.trackObjects = 0;
46756 
46757   SwigClassEnquire.klass = rb_define_class_under(mXapian, "Enquire", rb_cObject);
46758   SWIG_TypeClientData(SWIGTYPE_p_Xapian__Enquire, (void *) &SwigClassEnquire);
46759   rb_define_alloc_func(SwigClassEnquire.klass, _wrap_Enquire_allocate);
46760   rb_define_method(SwigClassEnquire.klass, "initialize", VALUEFUNC(_wrap_new_Enquire), -1);
46761   rb_define_method(SwigClassEnquire.klass, "query!", VALUEFUNC(_wrap_Enquire_queryN___), -1);
46762   rb_define_method(SwigClassEnquire.klass, "query=", VALUEFUNC(_wrap_Enquire_querye___), -1);
46763   rb_define_method(SwigClassEnquire.klass, "query", VALUEFUNC(_wrap_Enquire_query), -1);
46764   rb_define_method(SwigClassEnquire.klass, "add_matchspy", VALUEFUNC(_wrap_Enquire_add_matchspy), -1);
46765   rb_define_method(SwigClassEnquire.klass, "clear_matchspies", VALUEFUNC(_wrap_Enquire_clear_matchspies), -1);
46766   rb_define_method(SwigClassEnquire.klass, "weighting_scheme=", VALUEFUNC(_wrap_Enquire_weighting_schemee___), -1);
46767   rb_define_method(SwigClassEnquire.klass, "set_expansion_scheme", VALUEFUNC(_wrap_Enquire_set_expansion_scheme), -1);
46768   rb_define_method(SwigClassEnquire.klass, "collapse_key=", VALUEFUNC(_wrap_Enquire_collapse_keye___), -1);
46769   rb_define_const(SwigClassEnquire.klass, "ASCENDING", SWIG_From_int(static_cast< int >(Xapian::Enquire::ASCENDING)));
46770   rb_define_const(SwigClassEnquire.klass, "DESCENDING", SWIG_From_int(static_cast< int >(Xapian::Enquire::DESCENDING)));
46771   rb_define_const(SwigClassEnquire.klass, "DONT_CARE", SWIG_From_int(static_cast< int >(Xapian::Enquire::DONT_CARE)));
46772   rb_define_method(SwigClassEnquire.klass, "docid_order=", VALUEFUNC(_wrap_Enquire_docid_ordere___), -1);
46773   rb_define_method(SwigClassEnquire.klass, "cutoff!", VALUEFUNC(_wrap_Enquire_cutoffN___), -1);
46774   rb_define_method(SwigClassEnquire.klass, "sort_by_relevance!", VALUEFUNC(_wrap_Enquire_sort_by_relevanceN___), -1);
46775   rb_define_method(SwigClassEnquire.klass, "sort_by_value!", VALUEFUNC(_wrap_Enquire_sort_by_valueN___), -1);
46776   rb_define_method(SwigClassEnquire.klass, "set_sort_by_key", VALUEFUNC(_wrap_Enquire_set_sort_by_key), -1);
46777   rb_define_method(SwigClassEnquire.klass, "sort_by_value_then_relevance!", VALUEFUNC(_wrap_Enquire_sort_by_value_then_relevanceN___), -1);
46778   rb_define_method(SwigClassEnquire.klass, "set_sort_by_key_then_relevance", VALUEFUNC(_wrap_Enquire_set_sort_by_key_then_relevance), -1);
46779   rb_define_method(SwigClassEnquire.klass, "sort_by_relevance_then_value!", VALUEFUNC(_wrap_Enquire_sort_by_relevance_then_valueN___), -1);
46780   rb_define_method(SwigClassEnquire.klass, "set_sort_by_relevance_then_key", VALUEFUNC(_wrap_Enquire_set_sort_by_relevance_then_key), -1);
46781   rb_define_method(SwigClassEnquire.klass, "set_time_limit", VALUEFUNC(_wrap_Enquire_set_time_limit), -1);
46782   rb_define_method(SwigClassEnquire.klass, "mset", VALUEFUNC(_wrap_Enquire_mset), -1);
46783   rb_define_const(SwigClassEnquire.klass, "INCLUDE_QUERY_TERMS", SWIG_From_int(static_cast< int >(Xapian::Enquire::INCLUDE_QUERY_TERMS)));
46784   rb_define_const(SwigClassEnquire.klass, "USE_EXACT_TERMFREQ", SWIG_From_int(static_cast< int >(Xapian::Enquire::USE_EXACT_TERMFREQ)));
46785   rb_define_method(SwigClassEnquire.klass, "eset", VALUEFUNC(_wrap_Enquire_eset), -1);
46786   rb_define_method(SwigClassEnquire.klass, "_dangerous_matching_terms_begin", VALUEFUNC(_wrap_Enquire__dangerous_matching_terms_begin), -1);
46787   rb_define_method(SwigClassEnquire.klass, "_dangerous_matching_terms_end", VALUEFUNC(_wrap_Enquire__dangerous_matching_terms_end), -1);
46788   rb_define_method(SwigClassEnquire.klass, "description", VALUEFUNC(_wrap_Enquire_description), -1);
46789   SwigClassEnquire.mark = 0;
46790   SwigClassEnquire.destroy = (void (*)(void *)) free_Xapian_Enquire;
46791   SwigClassEnquire.trackObjects = 0;
46792   rb_define_module_function(mXapian, "disown_ExpandDecider", VALUEFUNC(_wrap_disown_ExpandDecider), -1);
46793 
46794   SwigClassExpandDecider.klass = rb_define_class_under(mXapian, "ExpandDecider", rb_cObject);
46795   SWIG_TypeClientData(SWIGTYPE_p_Xapian__ExpandDecider, (void *) &SwigClassExpandDecider);
46796   rb_define_alloc_func(SwigClassExpandDecider.klass, _wrap_ExpandDecider_allocate);
46797   rb_define_method(SwigClassExpandDecider.klass, "initialize", VALUEFUNC(_wrap_new_ExpandDecider), -1);
46798   rb_define_method(SwigClassExpandDecider.klass, "call", VALUEFUNC(_wrap_ExpandDecider___call__), -1);
46799   rb_define_method(SwigClassExpandDecider.klass, "release", VALUEFUNC(_wrap_ExpandDecider_release), -1);
46800   SwigClassExpandDecider.mark = 0;
46801   SwigClassExpandDecider.destroy = (void (*)(void *)) free_Xapian_ExpandDecider;
46802   SwigClassExpandDecider.trackObjects = 0;
46803 
46804   SwigClassExpandDeciderAnd.klass = rb_define_class_under(mXapian, "ExpandDeciderAnd", ((swig_class *) SWIGTYPE_p_Xapian__ExpandDecider->clientdata)->klass);
46805   SWIG_TypeClientData(SWIGTYPE_p_Xapian__ExpandDeciderAnd, (void *) &SwigClassExpandDeciderAnd);
46806   rb_define_alloc_func(SwigClassExpandDeciderAnd.klass, _wrap_ExpandDeciderAnd_allocate);
46807   rb_define_method(SwigClassExpandDeciderAnd.klass, "initialize", VALUEFUNC(_wrap_new_ExpandDeciderAnd), -1);
46808   rb_define_method(SwigClassExpandDeciderAnd.klass, "call", VALUEFUNC(_wrap_ExpandDeciderAnd___call__), -1);
46809   SwigClassExpandDeciderAnd.mark = 0;
46810   SwigClassExpandDeciderAnd.destroy = (void (*)(void *)) free_Xapian_ExpandDeciderAnd;
46811   SwigClassExpandDeciderAnd.trackObjects = 0;
46812 
46813   SwigClassExpandDeciderFilterPrefix.klass = rb_define_class_under(mXapian, "ExpandDeciderFilterPrefix", ((swig_class *) SWIGTYPE_p_Xapian__ExpandDecider->clientdata)->klass);
46814   SWIG_TypeClientData(SWIGTYPE_p_Xapian__ExpandDeciderFilterPrefix, (void *) &SwigClassExpandDeciderFilterPrefix);
46815   rb_define_alloc_func(SwigClassExpandDeciderFilterPrefix.klass, _wrap_ExpandDeciderFilterPrefix_allocate);
46816   rb_define_method(SwigClassExpandDeciderFilterPrefix.klass, "initialize", VALUEFUNC(_wrap_new_ExpandDeciderFilterPrefix), -1);
46817   rb_define_method(SwigClassExpandDeciderFilterPrefix.klass, "call", VALUEFUNC(_wrap_ExpandDeciderFilterPrefix___call__), -1);
46818   SwigClassExpandDeciderFilterPrefix.mark = 0;
46819   SwigClassExpandDeciderFilterPrefix.destroy = (void (*)(void *)) free_Xapian_ExpandDeciderFilterPrefix;
46820   SwigClassExpandDeciderFilterPrefix.trackObjects = 0;
46821   rb_define_module_function(mXapian, "disown_KeyMaker", VALUEFUNC(_wrap_disown_KeyMaker), -1);
46822 
46823   SwigClassKeyMaker.klass = rb_define_class_under(mXapian, "KeyMaker", rb_cObject);
46824   SWIG_TypeClientData(SWIGTYPE_p_Xapian__KeyMaker, (void *) &SwigClassKeyMaker);
46825   rb_define_alloc_func(SwigClassKeyMaker.klass, _wrap_KeyMaker_allocate);
46826   rb_define_method(SwigClassKeyMaker.klass, "initialize", VALUEFUNC(_wrap_new_KeyMaker), -1);
46827   rb_define_method(SwigClassKeyMaker.klass, "call", VALUEFUNC(_wrap_KeyMaker___call__), -1);
46828   rb_define_method(SwigClassKeyMaker.klass, "release", VALUEFUNC(_wrap_KeyMaker_release), -1);
46829   SwigClassKeyMaker.mark = 0;
46830   SwigClassKeyMaker.destroy = (void (*)(void *)) free_Xapian_KeyMaker;
46831   SwigClassKeyMaker.trackObjects = 0;
46832 
46833   SwigClassMultiValueKeyMaker.klass = rb_define_class_under(mXapian, "MultiValueKeyMaker", ((swig_class *) SWIGTYPE_p_Xapian__KeyMaker->clientdata)->klass);
46834   SWIG_TypeClientData(SWIGTYPE_p_Xapian__MultiValueKeyMaker, (void *) &SwigClassMultiValueKeyMaker);
46835   rb_define_alloc_func(SwigClassMultiValueKeyMaker.klass, _wrap_MultiValueKeyMaker_allocate);
46836   rb_define_method(SwigClassMultiValueKeyMaker.klass, "initialize", VALUEFUNC(_wrap_new_MultiValueKeyMaker), -1);
46837   rb_define_method(SwigClassMultiValueKeyMaker.klass, "call", VALUEFUNC(_wrap_MultiValueKeyMaker___call__), -1);
46838   rb_define_method(SwigClassMultiValueKeyMaker.klass, "add_value", VALUEFUNC(_wrap_MultiValueKeyMaker_add_value), -1);
46839   SwigClassMultiValueKeyMaker.mark = 0;
46840   SwigClassMultiValueKeyMaker.destroy = (void (*)(void *)) free_Xapian_MultiValueKeyMaker;
46841   SwigClassMultiValueKeyMaker.trackObjects = 0;
46842   rb_define_const(mXapian, "RP_SUFFIX", SWIG_From_int(static_cast< int >(Xapian::RP_SUFFIX)));
46843   rb_define_const(mXapian, "RP_REPEATED", SWIG_From_int(static_cast< int >(Xapian::RP_REPEATED)));
46844   rb_define_const(mXapian, "RP_DATE_PREFER_MDY", SWIG_From_int(static_cast< int >(Xapian::RP_DATE_PREFER_MDY)));
46845   rb_define_module_function(mXapian, "disown_Stopper", VALUEFUNC(_wrap_disown_Stopper), -1);
46846 
46847   SwigClassStopper.klass = rb_define_class_under(mXapian, "Stopper", rb_cObject);
46848   SWIG_TypeClientData(SWIGTYPE_p_Xapian__Stopper, (void *) &SwigClassStopper);
46849   rb_define_alloc_func(SwigClassStopper.klass, _wrap_Stopper_allocate);
46850   rb_define_method(SwigClassStopper.klass, "initialize", VALUEFUNC(_wrap_new_Stopper), -1);
46851   rb_define_method(SwigClassStopper.klass, "call", VALUEFUNC(_wrap_Stopper___call__), -1);
46852   rb_define_method(SwigClassStopper.klass, "description", VALUEFUNC(_wrap_Stopper_description), -1);
46853   rb_define_method(SwigClassStopper.klass, "release", VALUEFUNC(_wrap_Stopper_release), -1);
46854   SwigClassStopper.mark = 0;
46855   SwigClassStopper.destroy = (void (*)(void *)) free_Xapian_Stopper;
46856   SwigClassStopper.trackObjects = 0;
46857 
46858   SwigClassSimpleStopper.klass = rb_define_class_under(mXapian, "SimpleStopper", ((swig_class *) SWIGTYPE_p_Xapian__Stopper->clientdata)->klass);
46859   SWIG_TypeClientData(SWIGTYPE_p_Xapian__SimpleStopper, (void *) &SwigClassSimpleStopper);
46860   rb_define_alloc_func(SwigClassSimpleStopper.klass, _wrap_SimpleStopper_allocate);
46861   rb_define_method(SwigClassSimpleStopper.klass, "initialize", VALUEFUNC(_wrap_new_SimpleStopper), -1);
46862   rb_define_method(SwigClassSimpleStopper.klass, "add", VALUEFUNC(_wrap_SimpleStopper_add), -1);
46863   rb_define_method(SwigClassSimpleStopper.klass, "call", VALUEFUNC(_wrap_SimpleStopper___call__), -1);
46864   rb_define_method(SwigClassSimpleStopper.klass, "description", VALUEFUNC(_wrap_SimpleStopper_description), -1);
46865   SwigClassSimpleStopper.mark = 0;
46866   SwigClassSimpleStopper.destroy = (void (*)(void *)) free_Xapian_SimpleStopper;
46867   SwigClassSimpleStopper.trackObjects = 0;
46868   rb_define_module_function(mXapian, "disown_RangeProcessor", VALUEFUNC(_wrap_disown_RangeProcessor), -1);
46869 
46870   SwigClassRangeProcessor.klass = rb_define_class_under(mXapian, "RangeProcessor", rb_cObject);
46871   SWIG_TypeClientData(SWIGTYPE_p_Xapian__RangeProcessor, (void *) &SwigClassRangeProcessor);
46872   rb_define_alloc_func(SwigClassRangeProcessor.klass, _wrap_RangeProcessor_allocate);
46873   rb_define_method(SwigClassRangeProcessor.klass, "initialize", VALUEFUNC(_wrap_new_RangeProcessor), -1);
46874   rb_define_method(SwigClassRangeProcessor.klass, "check_range", VALUEFUNC(_wrap_RangeProcessor_check_range), -1);
46875   rb_define_method(SwigClassRangeProcessor.klass, "call", VALUEFUNC(_wrap_RangeProcessor___call__), -1);
46876   rb_define_method(SwigClassRangeProcessor.klass, "release", VALUEFUNC(_wrap_RangeProcessor_release), -1);
46877   SwigClassRangeProcessor.mark = 0;
46878   SwigClassRangeProcessor.destroy = (void (*)(void *)) free_Xapian_RangeProcessor;
46879   SwigClassRangeProcessor.trackObjects = 0;
46880 
46881   SwigClassDateRangeProcessor.klass = rb_define_class_under(mXapian, "DateRangeProcessor", ((swig_class *) SWIGTYPE_p_Xapian__RangeProcessor->clientdata)->klass);
46882   SWIG_TypeClientData(SWIGTYPE_p_Xapian__DateRangeProcessor, (void *) &SwigClassDateRangeProcessor);
46883   rb_define_alloc_func(SwigClassDateRangeProcessor.klass, _wrap_DateRangeProcessor_allocate);
46884   rb_define_method(SwigClassDateRangeProcessor.klass, "initialize", VALUEFUNC(_wrap_new_DateRangeProcessor), -1);
46885   rb_define_method(SwigClassDateRangeProcessor.klass, "call", VALUEFUNC(_wrap_DateRangeProcessor___call__), -1);
46886   SwigClassDateRangeProcessor.mark = 0;
46887   SwigClassDateRangeProcessor.destroy = (void (*)(void *)) free_Xapian_DateRangeProcessor;
46888   SwigClassDateRangeProcessor.trackObjects = 0;
46889 
46890   SwigClassNumberRangeProcessor.klass = rb_define_class_under(mXapian, "NumberRangeProcessor", ((swig_class *) SWIGTYPE_p_Xapian__RangeProcessor->clientdata)->klass);
46891   SWIG_TypeClientData(SWIGTYPE_p_Xapian__NumberRangeProcessor, (void *) &SwigClassNumberRangeProcessor);
46892   rb_define_alloc_func(SwigClassNumberRangeProcessor.klass, _wrap_NumberRangeProcessor_allocate);
46893   rb_define_method(SwigClassNumberRangeProcessor.klass, "initialize", VALUEFUNC(_wrap_new_NumberRangeProcessor), -1);
46894   rb_define_method(SwigClassNumberRangeProcessor.klass, "call", VALUEFUNC(_wrap_NumberRangeProcessor___call__), -1);
46895   SwigClassNumberRangeProcessor.mark = 0;
46896   SwigClassNumberRangeProcessor.destroy = (void (*)(void *)) free_Xapian_NumberRangeProcessor;
46897   SwigClassNumberRangeProcessor.trackObjects = 0;
46898   rb_define_module_function(mXapian, "disown_ValueRangeProcessor", VALUEFUNC(_wrap_disown_ValueRangeProcessor), -1);
46899 
46900   SwigClassValueRangeProcessor.klass = rb_define_class_under(mXapian, "ValueRangeProcessor", rb_cObject);
46901   SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueRangeProcessor, (void *) &SwigClassValueRangeProcessor);
46902   rb_define_alloc_func(SwigClassValueRangeProcessor.klass, _wrap_ValueRangeProcessor_allocate);
46903   rb_define_method(SwigClassValueRangeProcessor.klass, "initialize", VALUEFUNC(_wrap_new_ValueRangeProcessor), -1);
46904   rb_define_method(SwigClassValueRangeProcessor.klass, "call", VALUEFUNC(_wrap_ValueRangeProcessor___call__), -1);
46905   rb_define_method(SwigClassValueRangeProcessor.klass, "release", VALUEFUNC(_wrap_ValueRangeProcessor_release), -1);
46906   SwigClassValueRangeProcessor.mark = 0;
46907   SwigClassValueRangeProcessor.destroy = (void (*)(void *)) free_Xapian_ValueRangeProcessor;
46908   SwigClassValueRangeProcessor.trackObjects = 0;
46909 
46910   SwigClassStringValueRangeProcessor.klass = rb_define_class_under(mXapian, "StringValueRangeProcessor", ((swig_class *) SWIGTYPE_p_Xapian__ValueRangeProcessor->clientdata)->klass);
46911   SWIG_TypeClientData(SWIGTYPE_p_Xapian__StringValueRangeProcessor, (void *) &SwigClassStringValueRangeProcessor);
46912   rb_define_alloc_func(SwigClassStringValueRangeProcessor.klass, _wrap_StringValueRangeProcessor_allocate);
46913   rb_define_method(SwigClassStringValueRangeProcessor.klass, "initialize", VALUEFUNC(_wrap_new_StringValueRangeProcessor), -1);
46914   rb_define_method(SwigClassStringValueRangeProcessor.klass, "call", VALUEFUNC(_wrap_StringValueRangeProcessor___call__), -1);
46915   SwigClassStringValueRangeProcessor.mark = 0;
46916   SwigClassStringValueRangeProcessor.destroy = (void (*)(void *)) free_Xapian_StringValueRangeProcessor;
46917   SwigClassStringValueRangeProcessor.trackObjects = 0;
46918 
46919   SwigClassDateValueRangeProcessor.klass = rb_define_class_under(mXapian, "DateValueRangeProcessor", ((swig_class *) SWIGTYPE_p_Xapian__StringValueRangeProcessor->clientdata)->klass);
46920   SWIG_TypeClientData(SWIGTYPE_p_Xapian__DateValueRangeProcessor, (void *) &SwigClassDateValueRangeProcessor);
46921   rb_define_alloc_func(SwigClassDateValueRangeProcessor.klass, _wrap_DateValueRangeProcessor_allocate);
46922   rb_define_method(SwigClassDateValueRangeProcessor.klass, "initialize", VALUEFUNC(_wrap_new_DateValueRangeProcessor), -1);
46923   rb_define_method(SwigClassDateValueRangeProcessor.klass, "call", VALUEFUNC(_wrap_DateValueRangeProcessor___call__), -1);
46924   SwigClassDateValueRangeProcessor.mark = 0;
46925   SwigClassDateValueRangeProcessor.destroy = (void (*)(void *)) free_Xapian_DateValueRangeProcessor;
46926   SwigClassDateValueRangeProcessor.trackObjects = 0;
46927 
46928   SwigClassNumberValueRangeProcessor.klass = rb_define_class_under(mXapian, "NumberValueRangeProcessor", ((swig_class *) SWIGTYPE_p_Xapian__StringValueRangeProcessor->clientdata)->klass);
46929   SWIG_TypeClientData(SWIGTYPE_p_Xapian__NumberValueRangeProcessor, (void *) &SwigClassNumberValueRangeProcessor);
46930   rb_define_alloc_func(SwigClassNumberValueRangeProcessor.klass, _wrap_NumberValueRangeProcessor_allocate);
46931   rb_define_method(SwigClassNumberValueRangeProcessor.klass, "initialize", VALUEFUNC(_wrap_new_NumberValueRangeProcessor), -1);
46932   rb_define_method(SwigClassNumberValueRangeProcessor.klass, "call", VALUEFUNC(_wrap_NumberValueRangeProcessor___call__), -1);
46933   SwigClassNumberValueRangeProcessor.mark = 0;
46934   SwigClassNumberValueRangeProcessor.destroy = (void (*)(void *)) free_Xapian_NumberValueRangeProcessor;
46935   SwigClassNumberValueRangeProcessor.trackObjects = 0;
46936   rb_define_module_function(mXapian, "disown_FieldProcessor", VALUEFUNC(_wrap_disown_FieldProcessor), -1);
46937 
46938   SwigClassFieldProcessor.klass = rb_define_class_under(mXapian, "FieldProcessor", rb_cObject);
46939   SWIG_TypeClientData(SWIGTYPE_p_Xapian__FieldProcessor, (void *) &SwigClassFieldProcessor);
46940   rb_define_alloc_func(SwigClassFieldProcessor.klass, _wrap_FieldProcessor_allocate);
46941   rb_define_method(SwigClassFieldProcessor.klass, "initialize", VALUEFUNC(_wrap_new_FieldProcessor), -1);
46942   rb_define_method(SwigClassFieldProcessor.klass, "call", VALUEFUNC(_wrap_FieldProcessor___call__), -1);
46943   rb_define_method(SwigClassFieldProcessor.klass, "release", VALUEFUNC(_wrap_FieldProcessor_release), -1);
46944   SwigClassFieldProcessor.mark = 0;
46945   SwigClassFieldProcessor.destroy = (void (*)(void *)) free_Xapian_FieldProcessor;
46946   SwigClassFieldProcessor.trackObjects = 0;
46947 
46948   SwigClassQueryParser.klass = rb_define_class_under(mXapian, "QueryParser", rb_cObject);
46949   SWIG_TypeClientData(SWIGTYPE_p_Xapian__QueryParser, (void *) &SwigClassQueryParser);
46950   rb_define_alloc_func(SwigClassQueryParser.klass, _wrap_QueryParser_allocate);
46951   rb_define_method(SwigClassQueryParser.klass, "initialize", VALUEFUNC(_wrap_new_QueryParser), -1);
46952   rb_define_const(SwigClassQueryParser.klass, "FLAG_BOOLEAN", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_BOOLEAN)));
46953   rb_define_const(SwigClassQueryParser.klass, "FLAG_PHRASE", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_PHRASE)));
46954   rb_define_const(SwigClassQueryParser.klass, "FLAG_LOVEHATE", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_LOVEHATE)));
46955   rb_define_const(SwigClassQueryParser.klass, "FLAG_BOOLEAN_ANY_CASE", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_BOOLEAN_ANY_CASE)));
46956   rb_define_const(SwigClassQueryParser.klass, "FLAG_WILDCARD", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_WILDCARD)));
46957   rb_define_const(SwigClassQueryParser.klass, "FLAG_PURE_NOT", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_PURE_NOT)));
46958   rb_define_const(SwigClassQueryParser.klass, "FLAG_PARTIAL", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_PARTIAL)));
46959   rb_define_const(SwigClassQueryParser.klass, "FLAG_SPELLING_CORRECTION", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_SPELLING_CORRECTION)));
46960   rb_define_const(SwigClassQueryParser.klass, "FLAG_SYNONYM", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_SYNONYM)));
46961   rb_define_const(SwigClassQueryParser.klass, "FLAG_AUTO_SYNONYMS", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_AUTO_SYNONYMS)));
46962   rb_define_const(SwigClassQueryParser.klass, "FLAG_AUTO_MULTIWORD_SYNONYMS", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_AUTO_MULTIWORD_SYNONYMS)));
46963   rb_define_const(SwigClassQueryParser.klass, "FLAG_CJK_NGRAM", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_CJK_NGRAM)));
46964   rb_define_const(SwigClassQueryParser.klass, "FLAG_ACCUMULATE", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_ACCUMULATE)));
46965   rb_define_const(SwigClassQueryParser.klass, "FLAG_DEFAULT", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_DEFAULT)));
46966   rb_define_const(SwigClassQueryParser.klass, "STEM_NONE", SWIG_From_int(static_cast< int >(Xapian::QueryParser::STEM_NONE)));
46967   rb_define_const(SwigClassQueryParser.klass, "STEM_SOME", SWIG_From_int(static_cast< int >(Xapian::QueryParser::STEM_SOME)));
46968   rb_define_const(SwigClassQueryParser.klass, "STEM_ALL", SWIG_From_int(static_cast< int >(Xapian::QueryParser::STEM_ALL)));
46969   rb_define_const(SwigClassQueryParser.klass, "STEM_ALL_Z", SWIG_From_int(static_cast< int >(Xapian::QueryParser::STEM_ALL_Z)));
46970   rb_define_const(SwigClassQueryParser.klass, "STEM_SOME_FULL_POS", SWIG_From_int(static_cast< int >(Xapian::QueryParser::STEM_SOME_FULL_POS)));
46971   rb_define_method(SwigClassQueryParser.klass, "stemmer=", VALUEFUNC(_wrap_QueryParser_stemmere___), -1);
46972   rb_define_method(SwigClassQueryParser.klass, "stemming_strategy=", VALUEFUNC(_wrap_QueryParser_stemming_strategye___), -1);
46973   rb_define_method(SwigClassQueryParser.klass, "stopper=", VALUEFUNC(_wrap_QueryParser_stoppere___), -1);
46974   rb_define_method(SwigClassQueryParser.klass, "default_op=", VALUEFUNC(_wrap_QueryParser_default_ope___), -1);
46975   rb_define_method(SwigClassQueryParser.klass, "default_op", VALUEFUNC(_wrap_QueryParser_default_op), -1);
46976   rb_define_method(SwigClassQueryParser.klass, "database=", VALUEFUNC(_wrap_QueryParser_databasee___), -1);
46977   rb_define_method(SwigClassQueryParser.klass, "set_max_expansion", VALUEFUNC(_wrap_QueryParser_set_max_expansion), -1);
46978   rb_define_method(SwigClassQueryParser.klass, "set_max_wildcard_expansion", VALUEFUNC(_wrap_QueryParser_set_max_wildcard_expansion), -1);
46979   rb_define_method(SwigClassQueryParser.klass, "parse_query", VALUEFUNC(_wrap_QueryParser_parse_query), -1);
46980   rb_define_method(SwigClassQueryParser.klass, "add_prefix", VALUEFUNC(_wrap_QueryParser_add_prefix), -1);
46981   rb_define_method(SwigClassQueryParser.klass, "add_boolean_prefix", VALUEFUNC(_wrap_QueryParser_add_boolean_prefix), -1);
46982   rb_define_method(SwigClassQueryParser.klass, "_dangerous_stoplist_begin", VALUEFUNC(_wrap_QueryParser__dangerous_stoplist_begin), -1);
46983   rb_define_method(SwigClassQueryParser.klass, "_dangerous_stoplist_end", VALUEFUNC(_wrap_QueryParser__dangerous_stoplist_end), -1);
46984   rb_define_method(SwigClassQueryParser.klass, "_dangerous_unstem_begin", VALUEFUNC(_wrap_QueryParser__dangerous_unstem_begin), -1);
46985   rb_define_method(SwigClassQueryParser.klass, "_dangerous_unstem_end", VALUEFUNC(_wrap_QueryParser__dangerous_unstem_end), -1);
46986   rb_define_method(SwigClassQueryParser.klass, "add_rangeprocessor", VALUEFUNC(_wrap_QueryParser_add_rangeprocessor), -1);
46987   rb_define_method(SwigClassQueryParser.klass, "add_valuerangeprocessor", VALUEFUNC(_wrap_QueryParser_add_valuerangeprocessor), -1);
46988   rb_define_method(SwigClassQueryParser.klass, "get_corrected_query_string", VALUEFUNC(_wrap_QueryParser_get_corrected_query_string), -1);
46989   rb_define_method(SwigClassQueryParser.klass, "description", VALUEFUNC(_wrap_QueryParser_description), -1);
46990   SwigClassQueryParser.mark = 0;
46991   SwigClassQueryParser.destroy = (void (*)(void *)) free_Xapian_QueryParser;
46992   SwigClassQueryParser.trackObjects = 0;
46993   rb_define_module_function(mXapian, "sortable_serialise", VALUEFUNC(_wrap_sortable_serialise), -1);
46994   rb_define_module_function(mXapian, "sortable_unserialise", VALUEFUNC(_wrap_sortable_unserialise), -1);
46995 
46996   SwigClassValueSetMatchDecider.klass = rb_define_class_under(mXapian, "ValueSetMatchDecider", ((swig_class *) SWIGTYPE_p_Xapian__MatchDecider->clientdata)->klass);
46997   SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueSetMatchDecider, (void *) &SwigClassValueSetMatchDecider);
46998   rb_define_alloc_func(SwigClassValueSetMatchDecider.klass, _wrap_ValueSetMatchDecider_allocate);
46999   rb_define_method(SwigClassValueSetMatchDecider.klass, "initialize", VALUEFUNC(_wrap_new_ValueSetMatchDecider), -1);
47000   rb_define_method(SwigClassValueSetMatchDecider.klass, "add_value", VALUEFUNC(_wrap_ValueSetMatchDecider_add_value), -1);
47001   rb_define_method(SwigClassValueSetMatchDecider.klass, "remove_value", VALUEFUNC(_wrap_ValueSetMatchDecider_remove_value), -1);
47002   rb_define_method(SwigClassValueSetMatchDecider.klass, "call", VALUEFUNC(_wrap_ValueSetMatchDecider___call__), -1);
47003   SwigClassValueSetMatchDecider.mark = 0;
47004   SwigClassValueSetMatchDecider.destroy = (void (*)(void *)) free_Xapian_ValueSetMatchDecider;
47005   SwigClassValueSetMatchDecider.trackObjects = 0;
47006 
47007   SwigClassWeight.klass = rb_define_class_under(mXapian, "Weight", rb_cObject);
47008   SWIG_TypeClientData(SWIGTYPE_p_Xapian__Weight, (void *) &SwigClassWeight);
47009   rb_undef_alloc_func(SwigClassWeight.klass);
47010   rb_define_const(SwigClassWeight.klass, "TWO_STAGE_SMOOTHING", SWIG_From_int(static_cast< int >(Xapian::Weight::TWO_STAGE_SMOOTHING)));
47011   rb_define_const(SwigClassWeight.klass, "DIRICHLET_SMOOTHING", SWIG_From_int(static_cast< int >(Xapian::Weight::DIRICHLET_SMOOTHING)));
47012   rb_define_const(SwigClassWeight.klass, "ABSOLUTE_DISCOUNT_SMOOTHING", SWIG_From_int(static_cast< int >(Xapian::Weight::ABSOLUTE_DISCOUNT_SMOOTHING)));
47013   rb_define_const(SwigClassWeight.klass, "JELINEK_MERCER_SMOOTHING", SWIG_From_int(static_cast< int >(Xapian::Weight::JELINEK_MERCER_SMOOTHING)));
47014   rb_define_const(SwigClassWeight.klass, "DIRICHLET_PLUS_SMOOTHING", SWIG_From_int(static_cast< int >(Xapian::Weight::DIRICHLET_PLUS_SMOOTHING)));
47015   rb_define_method(SwigClassWeight.klass, "name", VALUEFUNC(_wrap_Weight_name), -1);
47016   rb_define_method(SwigClassWeight.klass, "sumpart", VALUEFUNC(_wrap_Weight_sumpart), -1);
47017   rb_define_method(SwigClassWeight.klass, "maxpart", VALUEFUNC(_wrap_Weight_maxpart), -1);
47018   rb_define_method(SwigClassWeight.klass, "sumextra", VALUEFUNC(_wrap_Weight_sumextra), -1);
47019   rb_define_method(SwigClassWeight.klass, "maxextra", VALUEFUNC(_wrap_Weight_maxextra), -1);
47020   SwigClassWeight.mark = 0;
47021   SwigClassWeight.destroy = (void (*)(void *)) free_Xapian_Weight;
47022   SwigClassWeight.trackObjects = 0;
47023 
47024   SwigClassBoolWeight.klass = rb_define_class_under(mXapian, "BoolWeight", ((swig_class *) SWIGTYPE_p_Xapian__Weight->clientdata)->klass);
47025   SWIG_TypeClientData(SWIGTYPE_p_Xapian__BoolWeight, (void *) &SwigClassBoolWeight);
47026   rb_define_alloc_func(SwigClassBoolWeight.klass, _wrap_BoolWeight_allocate);
47027   rb_define_method(SwigClassBoolWeight.klass, "initialize", VALUEFUNC(_wrap_new_BoolWeight), -1);
47028   rb_define_method(SwigClassBoolWeight.klass, "name", VALUEFUNC(_wrap_BoolWeight_name), -1);
47029   rb_define_method(SwigClassBoolWeight.klass, "sumpart", VALUEFUNC(_wrap_BoolWeight_sumpart), -1);
47030   rb_define_method(SwigClassBoolWeight.klass, "maxpart", VALUEFUNC(_wrap_BoolWeight_maxpart), -1);
47031   rb_define_method(SwigClassBoolWeight.klass, "sumextra", VALUEFUNC(_wrap_BoolWeight_sumextra), -1);
47032   rb_define_method(SwigClassBoolWeight.klass, "maxextra", VALUEFUNC(_wrap_BoolWeight_maxextra), -1);
47033   SwigClassBoolWeight.mark = 0;
47034   SwigClassBoolWeight.destroy = (void (*)(void *)) free_Xapian_BoolWeight;
47035   SwigClassBoolWeight.trackObjects = 0;
47036 
47037   SwigClassTfIdfWeight.klass = rb_define_class_under(mXapian, "TfIdfWeight", ((swig_class *) SWIGTYPE_p_Xapian__Weight->clientdata)->klass);
47038   SWIG_TypeClientData(SWIGTYPE_p_Xapian__TfIdfWeight, (void *) &SwigClassTfIdfWeight);
47039   rb_define_alloc_func(SwigClassTfIdfWeight.klass, _wrap_TfIdfWeight_allocate);
47040   rb_define_method(SwigClassTfIdfWeight.klass, "initialize", VALUEFUNC(_wrap_new_TfIdfWeight), -1);
47041   rb_define_method(SwigClassTfIdfWeight.klass, "name", VALUEFUNC(_wrap_TfIdfWeight_name), -1);
47042   rb_define_method(SwigClassTfIdfWeight.klass, "sumpart", VALUEFUNC(_wrap_TfIdfWeight_sumpart), -1);
47043   rb_define_method(SwigClassTfIdfWeight.klass, "maxpart", VALUEFUNC(_wrap_TfIdfWeight_maxpart), -1);
47044   rb_define_method(SwigClassTfIdfWeight.klass, "sumextra", VALUEFUNC(_wrap_TfIdfWeight_sumextra), -1);
47045   rb_define_method(SwigClassTfIdfWeight.klass, "maxextra", VALUEFUNC(_wrap_TfIdfWeight_maxextra), -1);
47046   SwigClassTfIdfWeight.mark = 0;
47047   SwigClassTfIdfWeight.destroy = (void (*)(void *)) free_Xapian_TfIdfWeight;
47048   SwigClassTfIdfWeight.trackObjects = 0;
47049 
47050   SwigClassBM25Weight.klass = rb_define_class_under(mXapian, "BM25Weight", ((swig_class *) SWIGTYPE_p_Xapian__Weight->clientdata)->klass);
47051   SWIG_TypeClientData(SWIGTYPE_p_Xapian__BM25Weight, (void *) &SwigClassBM25Weight);
47052   rb_define_alloc_func(SwigClassBM25Weight.klass, _wrap_BM25Weight_allocate);
47053   rb_define_method(SwigClassBM25Weight.klass, "initialize", VALUEFUNC(_wrap_new_BM25Weight), -1);
47054   rb_define_method(SwigClassBM25Weight.klass, "name", VALUEFUNC(_wrap_BM25Weight_name), -1);
47055   rb_define_method(SwigClassBM25Weight.klass, "sumpart", VALUEFUNC(_wrap_BM25Weight_sumpart), -1);
47056   rb_define_method(SwigClassBM25Weight.klass, "maxpart", VALUEFUNC(_wrap_BM25Weight_maxpart), -1);
47057   rb_define_method(SwigClassBM25Weight.klass, "sumextra", VALUEFUNC(_wrap_BM25Weight_sumextra), -1);
47058   rb_define_method(SwigClassBM25Weight.klass, "maxextra", VALUEFUNC(_wrap_BM25Weight_maxextra), -1);
47059   SwigClassBM25Weight.mark = 0;
47060   SwigClassBM25Weight.destroy = (void (*)(void *)) free_Xapian_BM25Weight;
47061   SwigClassBM25Weight.trackObjects = 0;
47062 
47063   SwigClassBM25PlusWeight.klass = rb_define_class_under(mXapian, "BM25PlusWeight", ((swig_class *) SWIGTYPE_p_Xapian__Weight->clientdata)->klass);
47064   SWIG_TypeClientData(SWIGTYPE_p_Xapian__BM25PlusWeight, (void *) &SwigClassBM25PlusWeight);
47065   rb_define_alloc_func(SwigClassBM25PlusWeight.klass, _wrap_BM25PlusWeight_allocate);
47066   rb_define_method(SwigClassBM25PlusWeight.klass, "initialize", VALUEFUNC(_wrap_new_BM25PlusWeight), -1);
47067   rb_define_method(SwigClassBM25PlusWeight.klass, "name", VALUEFUNC(_wrap_BM25PlusWeight_name), -1);
47068   rb_define_method(SwigClassBM25PlusWeight.klass, "sumpart", VALUEFUNC(_wrap_BM25PlusWeight_sumpart), -1);
47069   rb_define_method(SwigClassBM25PlusWeight.klass, "maxpart", VALUEFUNC(_wrap_BM25PlusWeight_maxpart), -1);
47070   rb_define_method(SwigClassBM25PlusWeight.klass, "sumextra", VALUEFUNC(_wrap_BM25PlusWeight_sumextra), -1);
47071   rb_define_method(SwigClassBM25PlusWeight.klass, "maxextra", VALUEFUNC(_wrap_BM25PlusWeight_maxextra), -1);
47072   SwigClassBM25PlusWeight.mark = 0;
47073   SwigClassBM25PlusWeight.destroy = (void (*)(void *)) free_Xapian_BM25PlusWeight;
47074   SwigClassBM25PlusWeight.trackObjects = 0;
47075 
47076   SwigClassTradWeight.klass = rb_define_class_under(mXapian, "TradWeight", ((swig_class *) SWIGTYPE_p_Xapian__Weight->clientdata)->klass);
47077   SWIG_TypeClientData(SWIGTYPE_p_Xapian__TradWeight, (void *) &SwigClassTradWeight);
47078   rb_define_alloc_func(SwigClassTradWeight.klass, _wrap_TradWeight_allocate);
47079   rb_define_method(SwigClassTradWeight.klass, "initialize", VALUEFUNC(_wrap_new_TradWeight), -1);
47080   rb_define_method(SwigClassTradWeight.klass, "name", VALUEFUNC(_wrap_TradWeight_name), -1);
47081   rb_define_method(SwigClassTradWeight.klass, "sumpart", VALUEFUNC(_wrap_TradWeight_sumpart), -1);
47082   rb_define_method(SwigClassTradWeight.klass, "maxpart", VALUEFUNC(_wrap_TradWeight_maxpart), -1);
47083   rb_define_method(SwigClassTradWeight.klass, "sumextra", VALUEFUNC(_wrap_TradWeight_sumextra), -1);
47084   rb_define_method(SwigClassTradWeight.klass, "maxextra", VALUEFUNC(_wrap_TradWeight_maxextra), -1);
47085   SwigClassTradWeight.mark = 0;
47086   SwigClassTradWeight.destroy = (void (*)(void *)) free_Xapian_TradWeight;
47087   SwigClassTradWeight.trackObjects = 0;
47088 
47089   SwigClassInL2Weight.klass = rb_define_class_under(mXapian, "InL2Weight", ((swig_class *) SWIGTYPE_p_Xapian__Weight->clientdata)->klass);
47090   SWIG_TypeClientData(SWIGTYPE_p_Xapian__InL2Weight, (void *) &SwigClassInL2Weight);
47091   rb_define_alloc_func(SwigClassInL2Weight.klass, _wrap_InL2Weight_allocate);
47092   rb_define_method(SwigClassInL2Weight.klass, "initialize", VALUEFUNC(_wrap_new_InL2Weight), -1);
47093   rb_define_method(SwigClassInL2Weight.klass, "name", VALUEFUNC(_wrap_InL2Weight_name), -1);
47094   rb_define_method(SwigClassInL2Weight.klass, "sumpart", VALUEFUNC(_wrap_InL2Weight_sumpart), -1);
47095   rb_define_method(SwigClassInL2Weight.klass, "maxpart", VALUEFUNC(_wrap_InL2Weight_maxpart), -1);
47096   rb_define_method(SwigClassInL2Weight.klass, "sumextra", VALUEFUNC(_wrap_InL2Weight_sumextra), -1);
47097   rb_define_method(SwigClassInL2Weight.klass, "maxextra", VALUEFUNC(_wrap_InL2Weight_maxextra), -1);
47098   SwigClassInL2Weight.mark = 0;
47099   SwigClassInL2Weight.destroy = (void (*)(void *)) free_Xapian_InL2Weight;
47100   SwigClassInL2Weight.trackObjects = 0;
47101 
47102   SwigClassIfB2Weight.klass = rb_define_class_under(mXapian, "IfB2Weight", ((swig_class *) SWIGTYPE_p_Xapian__Weight->clientdata)->klass);
47103   SWIG_TypeClientData(SWIGTYPE_p_Xapian__IfB2Weight, (void *) &SwigClassIfB2Weight);
47104   rb_define_alloc_func(SwigClassIfB2Weight.klass, _wrap_IfB2Weight_allocate);
47105   rb_define_method(SwigClassIfB2Weight.klass, "initialize", VALUEFUNC(_wrap_new_IfB2Weight), -1);
47106   rb_define_method(SwigClassIfB2Weight.klass, "name", VALUEFUNC(_wrap_IfB2Weight_name), -1);
47107   rb_define_method(SwigClassIfB2Weight.klass, "sumpart", VALUEFUNC(_wrap_IfB2Weight_sumpart), -1);
47108   rb_define_method(SwigClassIfB2Weight.klass, "maxpart", VALUEFUNC(_wrap_IfB2Weight_maxpart), -1);
47109   rb_define_method(SwigClassIfB2Weight.klass, "sumextra", VALUEFUNC(_wrap_IfB2Weight_sumextra), -1);
47110   rb_define_method(SwigClassIfB2Weight.klass, "maxextra", VALUEFUNC(_wrap_IfB2Weight_maxextra), -1);
47111   SwigClassIfB2Weight.mark = 0;
47112   SwigClassIfB2Weight.destroy = (void (*)(void *)) free_Xapian_IfB2Weight;
47113   SwigClassIfB2Weight.trackObjects = 0;
47114 
47115   SwigClassIneB2Weight.klass = rb_define_class_under(mXapian, "IneB2Weight", ((swig_class *) SWIGTYPE_p_Xapian__Weight->clientdata)->klass);
47116   SWIG_TypeClientData(SWIGTYPE_p_Xapian__IneB2Weight, (void *) &SwigClassIneB2Weight);
47117   rb_define_alloc_func(SwigClassIneB2Weight.klass, _wrap_IneB2Weight_allocate);
47118   rb_define_method(SwigClassIneB2Weight.klass, "initialize", VALUEFUNC(_wrap_new_IneB2Weight), -1);
47119   rb_define_method(SwigClassIneB2Weight.klass, "name", VALUEFUNC(_wrap_IneB2Weight_name), -1);
47120   rb_define_method(SwigClassIneB2Weight.klass, "sumpart", VALUEFUNC(_wrap_IneB2Weight_sumpart), -1);
47121   rb_define_method(SwigClassIneB2Weight.klass, "maxpart", VALUEFUNC(_wrap_IneB2Weight_maxpart), -1);
47122   rb_define_method(SwigClassIneB2Weight.klass, "sumextra", VALUEFUNC(_wrap_IneB2Weight_sumextra), -1);
47123   rb_define_method(SwigClassIneB2Weight.klass, "maxextra", VALUEFUNC(_wrap_IneB2Weight_maxextra), -1);
47124   SwigClassIneB2Weight.mark = 0;
47125   SwigClassIneB2Weight.destroy = (void (*)(void *)) free_Xapian_IneB2Weight;
47126   SwigClassIneB2Weight.trackObjects = 0;
47127 
47128   SwigClassBB2Weight.klass = rb_define_class_under(mXapian, "BB2Weight", ((swig_class *) SWIGTYPE_p_Xapian__Weight->clientdata)->klass);
47129   SWIG_TypeClientData(SWIGTYPE_p_Xapian__BB2Weight, (void *) &SwigClassBB2Weight);
47130   rb_define_alloc_func(SwigClassBB2Weight.klass, _wrap_BB2Weight_allocate);
47131   rb_define_method(SwigClassBB2Weight.klass, "initialize", VALUEFUNC(_wrap_new_BB2Weight), -1);
47132   rb_define_method(SwigClassBB2Weight.klass, "name", VALUEFUNC(_wrap_BB2Weight_name), -1);
47133   rb_define_method(SwigClassBB2Weight.klass, "sumpart", VALUEFUNC(_wrap_BB2Weight_sumpart), -1);
47134   rb_define_method(SwigClassBB2Weight.klass, "maxpart", VALUEFUNC(_wrap_BB2Weight_maxpart), -1);
47135   rb_define_method(SwigClassBB2Weight.klass, "sumextra", VALUEFUNC(_wrap_BB2Weight_sumextra), -1);
47136   rb_define_method(SwigClassBB2Weight.klass, "maxextra", VALUEFUNC(_wrap_BB2Weight_maxextra), -1);
47137   SwigClassBB2Weight.mark = 0;
47138   SwigClassBB2Weight.destroy = (void (*)(void *)) free_Xapian_BB2Weight;
47139   SwigClassBB2Weight.trackObjects = 0;
47140 
47141   SwigClassDLHWeight.klass = rb_define_class_under(mXapian, "DLHWeight", ((swig_class *) SWIGTYPE_p_Xapian__Weight->clientdata)->klass);
47142   SWIG_TypeClientData(SWIGTYPE_p_Xapian__DLHWeight, (void *) &SwigClassDLHWeight);
47143   rb_define_alloc_func(SwigClassDLHWeight.klass, _wrap_DLHWeight_allocate);
47144   rb_define_method(SwigClassDLHWeight.klass, "initialize", VALUEFUNC(_wrap_new_DLHWeight), -1);
47145   rb_define_method(SwigClassDLHWeight.klass, "name", VALUEFUNC(_wrap_DLHWeight_name), -1);
47146   rb_define_method(SwigClassDLHWeight.klass, "sumpart", VALUEFUNC(_wrap_DLHWeight_sumpart), -1);
47147   rb_define_method(SwigClassDLHWeight.klass, "maxpart", VALUEFUNC(_wrap_DLHWeight_maxpart), -1);
47148   rb_define_method(SwigClassDLHWeight.klass, "sumextra", VALUEFUNC(_wrap_DLHWeight_sumextra), -1);
47149   rb_define_method(SwigClassDLHWeight.klass, "maxextra", VALUEFUNC(_wrap_DLHWeight_maxextra), -1);
47150   SwigClassDLHWeight.mark = 0;
47151   SwigClassDLHWeight.destroy = (void (*)(void *)) free_Xapian_DLHWeight;
47152   SwigClassDLHWeight.trackObjects = 0;
47153 
47154   SwigClassPL2Weight.klass = rb_define_class_under(mXapian, "PL2Weight", ((swig_class *) SWIGTYPE_p_Xapian__Weight->clientdata)->klass);
47155   SWIG_TypeClientData(SWIGTYPE_p_Xapian__PL2Weight, (void *) &SwigClassPL2Weight);
47156   rb_define_alloc_func(SwigClassPL2Weight.klass, _wrap_PL2Weight_allocate);
47157   rb_define_method(SwigClassPL2Weight.klass, "initialize", VALUEFUNC(_wrap_new_PL2Weight), -1);
47158   rb_define_method(SwigClassPL2Weight.klass, "name", VALUEFUNC(_wrap_PL2Weight_name), -1);
47159   rb_define_method(SwigClassPL2Weight.klass, "sumpart", VALUEFUNC(_wrap_PL2Weight_sumpart), -1);
47160   rb_define_method(SwigClassPL2Weight.klass, "maxpart", VALUEFUNC(_wrap_PL2Weight_maxpart), -1);
47161   rb_define_method(SwigClassPL2Weight.klass, "sumextra", VALUEFUNC(_wrap_PL2Weight_sumextra), -1);
47162   rb_define_method(SwigClassPL2Weight.klass, "maxextra", VALUEFUNC(_wrap_PL2Weight_maxextra), -1);
47163   SwigClassPL2Weight.mark = 0;
47164   SwigClassPL2Weight.destroy = (void (*)(void *)) free_Xapian_PL2Weight;
47165   SwigClassPL2Weight.trackObjects = 0;
47166 
47167   SwigClassPL2PlusWeight.klass = rb_define_class_under(mXapian, "PL2PlusWeight", ((swig_class *) SWIGTYPE_p_Xapian__Weight->clientdata)->klass);
47168   SWIG_TypeClientData(SWIGTYPE_p_Xapian__PL2PlusWeight, (void *) &SwigClassPL2PlusWeight);
47169   rb_define_alloc_func(SwigClassPL2PlusWeight.klass, _wrap_PL2PlusWeight_allocate);
47170   rb_define_method(SwigClassPL2PlusWeight.klass, "initialize", VALUEFUNC(_wrap_new_PL2PlusWeight), -1);
47171   rb_define_method(SwigClassPL2PlusWeight.klass, "name", VALUEFUNC(_wrap_PL2PlusWeight_name), -1);
47172   rb_define_method(SwigClassPL2PlusWeight.klass, "sumpart", VALUEFUNC(_wrap_PL2PlusWeight_sumpart), -1);
47173   rb_define_method(SwigClassPL2PlusWeight.klass, "maxpart", VALUEFUNC(_wrap_PL2PlusWeight_maxpart), -1);
47174   rb_define_method(SwigClassPL2PlusWeight.klass, "sumextra", VALUEFUNC(_wrap_PL2PlusWeight_sumextra), -1);
47175   rb_define_method(SwigClassPL2PlusWeight.klass, "maxextra", VALUEFUNC(_wrap_PL2PlusWeight_maxextra), -1);
47176   SwigClassPL2PlusWeight.mark = 0;
47177   SwigClassPL2PlusWeight.destroy = (void (*)(void *)) free_Xapian_PL2PlusWeight;
47178   SwigClassPL2PlusWeight.trackObjects = 0;
47179 
47180   SwigClassDPHWeight.klass = rb_define_class_under(mXapian, "DPHWeight", ((swig_class *) SWIGTYPE_p_Xapian__Weight->clientdata)->klass);
47181   SWIG_TypeClientData(SWIGTYPE_p_Xapian__DPHWeight, (void *) &SwigClassDPHWeight);
47182   rb_define_alloc_func(SwigClassDPHWeight.klass, _wrap_DPHWeight_allocate);
47183   rb_define_method(SwigClassDPHWeight.klass, "initialize", VALUEFUNC(_wrap_new_DPHWeight), -1);
47184   rb_define_method(SwigClassDPHWeight.klass, "name", VALUEFUNC(_wrap_DPHWeight_name), -1);
47185   rb_define_method(SwigClassDPHWeight.klass, "sumpart", VALUEFUNC(_wrap_DPHWeight_sumpart), -1);
47186   rb_define_method(SwigClassDPHWeight.klass, "maxpart", VALUEFUNC(_wrap_DPHWeight_maxpart), -1);
47187   rb_define_method(SwigClassDPHWeight.klass, "sumextra", VALUEFUNC(_wrap_DPHWeight_sumextra), -1);
47188   rb_define_method(SwigClassDPHWeight.klass, "maxextra", VALUEFUNC(_wrap_DPHWeight_maxextra), -1);
47189   SwigClassDPHWeight.mark = 0;
47190   SwigClassDPHWeight.destroy = (void (*)(void *)) free_Xapian_DPHWeight;
47191   SwigClassDPHWeight.trackObjects = 0;
47192 
47193   SwigClassLMWeight.klass = rb_define_class_under(mXapian, "LMWeight", ((swig_class *) SWIGTYPE_p_Xapian__Weight->clientdata)->klass);
47194   SWIG_TypeClientData(SWIGTYPE_p_Xapian__LMWeight, (void *) &SwigClassLMWeight);
47195   rb_define_alloc_func(SwigClassLMWeight.klass, _wrap_LMWeight_allocate);
47196   rb_define_method(SwigClassLMWeight.klass, "initialize", VALUEFUNC(_wrap_new_LMWeight), -1);
47197   rb_define_method(SwigClassLMWeight.klass, "name", VALUEFUNC(_wrap_LMWeight_name), -1);
47198   rb_define_method(SwigClassLMWeight.klass, "sumpart", VALUEFUNC(_wrap_LMWeight_sumpart), -1);
47199   rb_define_method(SwigClassLMWeight.klass, "maxpart", VALUEFUNC(_wrap_LMWeight_maxpart), -1);
47200   rb_define_method(SwigClassLMWeight.klass, "sumextra", VALUEFUNC(_wrap_LMWeight_sumextra), -1);
47201   rb_define_method(SwigClassLMWeight.klass, "maxextra", VALUEFUNC(_wrap_LMWeight_maxextra), -1);
47202   SwigClassLMWeight.mark = 0;
47203   SwigClassLMWeight.destroy = (void (*)(void *)) free_Xapian_LMWeight;
47204   SwigClassLMWeight.trackObjects = 0;
47205 
47206   SwigClassCoordWeight.klass = rb_define_class_under(mXapian, "CoordWeight", ((swig_class *) SWIGTYPE_p_Xapian__Weight->clientdata)->klass);
47207   SWIG_TypeClientData(SWIGTYPE_p_Xapian__CoordWeight, (void *) &SwigClassCoordWeight);
47208   rb_define_alloc_func(SwigClassCoordWeight.klass, _wrap_CoordWeight_allocate);
47209   rb_define_method(SwigClassCoordWeight.klass, "initialize", VALUEFUNC(_wrap_new_CoordWeight), -1);
47210   rb_define_method(SwigClassCoordWeight.klass, "init", VALUEFUNC(_wrap_CoordWeight_init), -1);
47211   rb_define_method(SwigClassCoordWeight.klass, "name", VALUEFUNC(_wrap_CoordWeight_name), -1);
47212   rb_define_method(SwigClassCoordWeight.klass, "sumpart", VALUEFUNC(_wrap_CoordWeight_sumpart), -1);
47213   rb_define_method(SwigClassCoordWeight.klass, "maxpart", VALUEFUNC(_wrap_CoordWeight_maxpart), -1);
47214   rb_define_method(SwigClassCoordWeight.klass, "sumextra", VALUEFUNC(_wrap_CoordWeight_sumextra), -1);
47215   rb_define_method(SwigClassCoordWeight.klass, "maxextra", VALUEFUNC(_wrap_CoordWeight_maxextra), -1);
47216   SwigClassCoordWeight.mark = 0;
47217   SwigClassCoordWeight.destroy = (void (*)(void *)) free_Xapian_CoordWeight;
47218   SwigClassCoordWeight.trackObjects = 0;
47219   rb_define_module_function(mXapian, "disown_Compactor", VALUEFUNC(_wrap_disown_Compactor), -1);
47220 
47221   SwigClassCompactor.klass = rb_define_class_under(mXapian, "Compactor", rb_cObject);
47222   SWIG_TypeClientData(SWIGTYPE_p_Xapian__Compactor, (void *) &SwigClassCompactor);
47223   rb_define_alloc_func(SwigClassCompactor.klass, _wrap_Compactor_allocate);
47224   rb_define_method(SwigClassCompactor.klass, "initialize", VALUEFUNC(_wrap_new_Compactor), -1);
47225   rb_define_const(SwigClassCompactor.klass, "STANDARD", SWIG_From_int(static_cast< int >(Xapian::Compactor::STANDARD)));
47226   rb_define_const(SwigClassCompactor.klass, "FULL", SWIG_From_int(static_cast< int >(Xapian::Compactor::FULL)));
47227   rb_define_const(SwigClassCompactor.klass, "FULLER", SWIG_From_int(static_cast< int >(Xapian::Compactor::FULLER)));
47228   rb_define_method(SwigClassCompactor.klass, "set_block_size", VALUEFUNC(_wrap_Compactor_set_block_size), -1);
47229   rb_define_method(SwigClassCompactor.klass, "set_renumber", VALUEFUNC(_wrap_Compactor_set_renumber), -1);
47230   rb_define_method(SwigClassCompactor.klass, "set_multipass", VALUEFUNC(_wrap_Compactor_set_multipass), -1);
47231   rb_define_method(SwigClassCompactor.klass, "set_compaction_level", VALUEFUNC(_wrap_Compactor_set_compaction_level), -1);
47232   rb_define_method(SwigClassCompactor.klass, "set_destdir", VALUEFUNC(_wrap_Compactor_set_destdir), -1);
47233   rb_define_method(SwigClassCompactor.klass, "add_source", VALUEFUNC(_wrap_Compactor_add_source), -1);
47234   rb_define_method(SwigClassCompactor.klass, "compact", VALUEFUNC(_wrap_Compactor_compact), -1);
47235   rb_define_method(SwigClassCompactor.klass, "set_status", VALUEFUNC(_wrap_Compactor_set_status), -1);
47236   rb_define_method(SwigClassCompactor.klass, "resolve_duplicate_metadata", VALUEFUNC(_wrap_Compactor_resolve_duplicate_metadata), -1);
47237   SwigClassCompactor.mark = 0;
47238   SwigClassCompactor.destroy = (void (*)(void *)) free_Xapian_Compactor;
47239   SwigClassCompactor.trackObjects = 0;
47240   rb_define_module_function(mXapian, "disown_PostingSource", VALUEFUNC(_wrap_disown_PostingSource), -1);
47241 
47242   SwigClassPostingSource.klass = rb_define_class_under(mXapian, "PostingSource", rb_cObject);
47243   SWIG_TypeClientData(SWIGTYPE_p_Xapian__PostingSource, (void *) &SwigClassPostingSource);
47244   rb_define_alloc_func(SwigClassPostingSource.klass, _wrap_PostingSource_allocate);
47245   rb_define_method(SwigClassPostingSource.klass, "initialize", VALUEFUNC(_wrap_new_PostingSource), -1);
47246   rb_define_method(SwigClassPostingSource.klass, "get_termfreq_min", VALUEFUNC(_wrap_PostingSource_get_termfreq_min), -1);
47247   rb_define_method(SwigClassPostingSource.klass, "get_termfreq_est", VALUEFUNC(_wrap_PostingSource_get_termfreq_est), -1);
47248   rb_define_method(SwigClassPostingSource.klass, "get_termfreq_max", VALUEFUNC(_wrap_PostingSource_get_termfreq_max), -1);
47249   rb_define_method(SwigClassPostingSource.klass, "set_maxweight", VALUEFUNC(_wrap_PostingSource_set_maxweight), -1);
47250   rb_define_method(SwigClassPostingSource.klass, "get_maxweight", VALUEFUNC(_wrap_PostingSource_get_maxweight), -1);
47251   rb_define_method(SwigClassPostingSource.klass, "weight", VALUEFUNC(_wrap_PostingSource_weight), -1);
47252   rb_define_method(SwigClassPostingSource.klass, "docid", VALUEFUNC(_wrap_PostingSource_docid), -1);
47253   rb_define_method(SwigClassPostingSource.klass, "next", VALUEFUNC(_wrap_PostingSource_next), -1);
47254   rb_define_method(SwigClassPostingSource.klass, "skip_to", VALUEFUNC(_wrap_PostingSource_skip_to), -1);
47255   rb_define_method(SwigClassPostingSource.klass, "check", VALUEFUNC(_wrap_PostingSource_check), -1);
47256   rb_define_method(SwigClassPostingSource.klass, "at_end", VALUEFUNC(_wrap_PostingSource_at_end), -1);
47257   rb_define_method(SwigClassPostingSource.klass, "name", VALUEFUNC(_wrap_PostingSource_name), -1);
47258   rb_define_method(SwigClassPostingSource.klass, "init", VALUEFUNC(_wrap_PostingSource_init), -1);
47259   rb_define_method(SwigClassPostingSource.klass, "description", VALUEFUNC(_wrap_PostingSource_description), -1);
47260   rb_define_method(SwigClassPostingSource.klass, "release", VALUEFUNC(_wrap_PostingSource_release), -1);
47261   SwigClassPostingSource.mark = 0;
47262   SwigClassPostingSource.destroy = (void (*)(void *)) free_Xapian_PostingSource;
47263   SwigClassPostingSource.trackObjects = 0;
47264   rb_define_module_function(mXapian, "disown_ValuePostingSource", VALUEFUNC(_wrap_disown_ValuePostingSource), -1);
47265 
47266   SwigClassValuePostingSource.klass = rb_define_class_under(mXapian, "ValuePostingSource", ((swig_class *) SWIGTYPE_p_Xapian__PostingSource->clientdata)->klass);
47267   SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValuePostingSource, (void *) &SwigClassValuePostingSource);
47268   rb_define_alloc_func(SwigClassValuePostingSource.klass, _wrap_ValuePostingSource_allocate);
47269   rb_define_method(SwigClassValuePostingSource.klass, "initialize", VALUEFUNC(_wrap_new_ValuePostingSource), -1);
47270   rb_define_method(SwigClassValuePostingSource.klass, "get_termfreq_min", VALUEFUNC(_wrap_ValuePostingSource_get_termfreq_min), -1);
47271   rb_define_method(SwigClassValuePostingSource.klass, "get_termfreq_est", VALUEFUNC(_wrap_ValuePostingSource_get_termfreq_est), -1);
47272   rb_define_method(SwigClassValuePostingSource.klass, "get_termfreq_max", VALUEFUNC(_wrap_ValuePostingSource_get_termfreq_max), -1);
47273   rb_define_method(SwigClassValuePostingSource.klass, "next", VALUEFUNC(_wrap_ValuePostingSource_next), -1);
47274   rb_define_method(SwigClassValuePostingSource.klass, "skip_to", VALUEFUNC(_wrap_ValuePostingSource_skip_to), -1);
47275   rb_define_method(SwigClassValuePostingSource.klass, "check", VALUEFUNC(_wrap_ValuePostingSource_check), -1);
47276   rb_define_method(SwigClassValuePostingSource.klass, "at_end", VALUEFUNC(_wrap_ValuePostingSource_at_end), -1);
47277   rb_define_method(SwigClassValuePostingSource.klass, "docid", VALUEFUNC(_wrap_ValuePostingSource_docid), -1);
47278   rb_define_method(SwigClassValuePostingSource.klass, "init", VALUEFUNC(_wrap_ValuePostingSource_init), -1);
47279   rb_define_method(SwigClassValuePostingSource.klass, "get_database", VALUEFUNC(_wrap_ValuePostingSource_get_database), -1);
47280   rb_define_method(SwigClassValuePostingSource.klass, "get_slot", VALUEFUNC(_wrap_ValuePostingSource_get_slot), -1);
47281   rb_define_method(SwigClassValuePostingSource.klass, "value", VALUEFUNC(_wrap_ValuePostingSource_value), -1);
47282   rb_define_method(SwigClassValuePostingSource.klass, "done", VALUEFUNC(_wrap_ValuePostingSource_done), -1);
47283   rb_define_method(SwigClassValuePostingSource.klass, "get_started", VALUEFUNC(_wrap_ValuePostingSource_get_started), -1);
47284   rb_define_method(SwigClassValuePostingSource.klass, "set_termfreq_min", VALUEFUNC(_wrap_ValuePostingSource_set_termfreq_min), -1);
47285   rb_define_method(SwigClassValuePostingSource.klass, "set_termfreq_est", VALUEFUNC(_wrap_ValuePostingSource_set_termfreq_est), -1);
47286   rb_define_method(SwigClassValuePostingSource.klass, "set_termfreq_max", VALUEFUNC(_wrap_ValuePostingSource_set_termfreq_max), -1);
47287   SwigClassValuePostingSource.mark = 0;
47288   SwigClassValuePostingSource.destroy = (void (*)(void *)) free_Xapian_ValuePostingSource;
47289   SwigClassValuePostingSource.trackObjects = 0;
47290   rb_define_module_function(mXapian, "disown_ValueWeightPostingSource", VALUEFUNC(_wrap_disown_ValueWeightPostingSource), -1);
47291 
47292   SwigClassValueWeightPostingSource.klass = rb_define_class_under(mXapian, "ValueWeightPostingSource", ((swig_class *) SWIGTYPE_p_Xapian__ValuePostingSource->clientdata)->klass);
47293   SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueWeightPostingSource, (void *) &SwigClassValueWeightPostingSource);
47294   rb_define_alloc_func(SwigClassValueWeightPostingSource.klass, _wrap_ValueWeightPostingSource_allocate);
47295   rb_define_method(SwigClassValueWeightPostingSource.klass, "initialize", VALUEFUNC(_wrap_new_ValueWeightPostingSource), -1);
47296   rb_define_method(SwigClassValueWeightPostingSource.klass, "weight", VALUEFUNC(_wrap_ValueWeightPostingSource_weight), -1);
47297   rb_define_method(SwigClassValueWeightPostingSource.klass, "name", VALUEFUNC(_wrap_ValueWeightPostingSource_name), -1);
47298   rb_define_method(SwigClassValueWeightPostingSource.klass, "init", VALUEFUNC(_wrap_ValueWeightPostingSource_init), -1);
47299   rb_define_method(SwigClassValueWeightPostingSource.klass, "description", VALUEFUNC(_wrap_ValueWeightPostingSource_description), -1);
47300   SwigClassValueWeightPostingSource.mark = 0;
47301   SwigClassValueWeightPostingSource.destroy = (void (*)(void *)) free_Xapian_ValueWeightPostingSource;
47302   SwigClassValueWeightPostingSource.trackObjects = 0;
47303 
47304   SwigClassDecreasingValueWeightPostingSource.klass = rb_define_class_under(mXapian, "DecreasingValueWeightPostingSource", ((swig_class *) SWIGTYPE_p_Xapian__ValueWeightPostingSource->clientdata)->klass);
47305   SWIG_TypeClientData(SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, (void *) &SwigClassDecreasingValueWeightPostingSource);
47306   rb_define_alloc_func(SwigClassDecreasingValueWeightPostingSource.klass, _wrap_DecreasingValueWeightPostingSource_allocate);
47307   rb_define_method(SwigClassDecreasingValueWeightPostingSource.klass, "initialize", VALUEFUNC(_wrap_new_DecreasingValueWeightPostingSource), -1);
47308   rb_define_method(SwigClassDecreasingValueWeightPostingSource.klass, "weight", VALUEFUNC(_wrap_DecreasingValueWeightPostingSource_weight), -1);
47309   rb_define_method(SwigClassDecreasingValueWeightPostingSource.klass, "name", VALUEFUNC(_wrap_DecreasingValueWeightPostingSource_name), -1);
47310   rb_define_method(SwigClassDecreasingValueWeightPostingSource.klass, "init", VALUEFUNC(_wrap_DecreasingValueWeightPostingSource_init), -1);
47311   rb_define_method(SwigClassDecreasingValueWeightPostingSource.klass, "next", VALUEFUNC(_wrap_DecreasingValueWeightPostingSource_next), -1);
47312   rb_define_method(SwigClassDecreasingValueWeightPostingSource.klass, "skip_to", VALUEFUNC(_wrap_DecreasingValueWeightPostingSource_skip_to), -1);
47313   rb_define_method(SwigClassDecreasingValueWeightPostingSource.klass, "check", VALUEFUNC(_wrap_DecreasingValueWeightPostingSource_check), -1);
47314   rb_define_method(SwigClassDecreasingValueWeightPostingSource.klass, "description", VALUEFUNC(_wrap_DecreasingValueWeightPostingSource_description), -1);
47315   SwigClassDecreasingValueWeightPostingSource.mark = 0;
47316   SwigClassDecreasingValueWeightPostingSource.destroy = (void (*)(void *)) free_Xapian_DecreasingValueWeightPostingSource;
47317   SwigClassDecreasingValueWeightPostingSource.trackObjects = 0;
47318 
47319   SwigClassValueMapPostingSource.klass = rb_define_class_under(mXapian, "ValueMapPostingSource", ((swig_class *) SWIGTYPE_p_Xapian__ValuePostingSource->clientdata)->klass);
47320   SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueMapPostingSource, (void *) &SwigClassValueMapPostingSource);
47321   rb_define_alloc_func(SwigClassValueMapPostingSource.klass, _wrap_ValueMapPostingSource_allocate);
47322   rb_define_method(SwigClassValueMapPostingSource.klass, "initialize", VALUEFUNC(_wrap_new_ValueMapPostingSource), -1);
47323   rb_define_method(SwigClassValueMapPostingSource.klass, "add_mapping", VALUEFUNC(_wrap_ValueMapPostingSource_add_mapping), -1);
47324   rb_define_method(SwigClassValueMapPostingSource.klass, "clear_mappings", VALUEFUNC(_wrap_ValueMapPostingSource_clear_mappings), -1);
47325   rb_define_method(SwigClassValueMapPostingSource.klass, "set_default_weight", VALUEFUNC(_wrap_ValueMapPostingSource_set_default_weight), -1);
47326   rb_define_method(SwigClassValueMapPostingSource.klass, "weight", VALUEFUNC(_wrap_ValueMapPostingSource_weight), -1);
47327   rb_define_method(SwigClassValueMapPostingSource.klass, "name", VALUEFUNC(_wrap_ValueMapPostingSource_name), -1);
47328   rb_define_method(SwigClassValueMapPostingSource.klass, "init", VALUEFUNC(_wrap_ValueMapPostingSource_init), -1);
47329   rb_define_method(SwigClassValueMapPostingSource.klass, "description", VALUEFUNC(_wrap_ValueMapPostingSource_description), -1);
47330   SwigClassValueMapPostingSource.mark = 0;
47331   SwigClassValueMapPostingSource.destroy = (void (*)(void *)) free_Xapian_ValueMapPostingSource;
47332   SwigClassValueMapPostingSource.trackObjects = 0;
47333 
47334   SwigClassFixedWeightPostingSource.klass = rb_define_class_under(mXapian, "FixedWeightPostingSource", ((swig_class *) SWIGTYPE_p_Xapian__PostingSource->clientdata)->klass);
47335   SWIG_TypeClientData(SWIGTYPE_p_Xapian__FixedWeightPostingSource, (void *) &SwigClassFixedWeightPostingSource);
47336   rb_define_alloc_func(SwigClassFixedWeightPostingSource.klass, _wrap_FixedWeightPostingSource_allocate);
47337   rb_define_method(SwigClassFixedWeightPostingSource.klass, "initialize", VALUEFUNC(_wrap_new_FixedWeightPostingSource), -1);
47338   rb_define_method(SwigClassFixedWeightPostingSource.klass, "get_termfreq_min", VALUEFUNC(_wrap_FixedWeightPostingSource_get_termfreq_min), -1);
47339   rb_define_method(SwigClassFixedWeightPostingSource.klass, "get_termfreq_est", VALUEFUNC(_wrap_FixedWeightPostingSource_get_termfreq_est), -1);
47340   rb_define_method(SwigClassFixedWeightPostingSource.klass, "get_termfreq_max", VALUEFUNC(_wrap_FixedWeightPostingSource_get_termfreq_max), -1);
47341   rb_define_method(SwigClassFixedWeightPostingSource.klass, "weight", VALUEFUNC(_wrap_FixedWeightPostingSource_weight), -1);
47342   rb_define_method(SwigClassFixedWeightPostingSource.klass, "next", VALUEFUNC(_wrap_FixedWeightPostingSource_next), -1);
47343   rb_define_method(SwigClassFixedWeightPostingSource.klass, "skip_to", VALUEFUNC(_wrap_FixedWeightPostingSource_skip_to), -1);
47344   rb_define_method(SwigClassFixedWeightPostingSource.klass, "check", VALUEFUNC(_wrap_FixedWeightPostingSource_check), -1);
47345   rb_define_method(SwigClassFixedWeightPostingSource.klass, "at_end", VALUEFUNC(_wrap_FixedWeightPostingSource_at_end), -1);
47346   rb_define_method(SwigClassFixedWeightPostingSource.klass, "docid", VALUEFUNC(_wrap_FixedWeightPostingSource_docid), -1);
47347   rb_define_method(SwigClassFixedWeightPostingSource.klass, "name", VALUEFUNC(_wrap_FixedWeightPostingSource_name), -1);
47348   rb_define_method(SwigClassFixedWeightPostingSource.klass, "init", VALUEFUNC(_wrap_FixedWeightPostingSource_init), -1);
47349   rb_define_method(SwigClassFixedWeightPostingSource.klass, "description", VALUEFUNC(_wrap_FixedWeightPostingSource_description), -1);
47350   SwigClassFixedWeightPostingSource.mark = 0;
47351   SwigClassFixedWeightPostingSource.destroy = (void (*)(void *)) free_Xapian_FixedWeightPostingSource;
47352   SwigClassFixedWeightPostingSource.trackObjects = 0;
47353   rb_define_module_function(mXapian, "disown_MatchSpy", VALUEFUNC(_wrap_disown_MatchSpy), -1);
47354 
47355   SwigClassMatchSpy.klass = rb_define_class_under(mXapian, "MatchSpy", rb_cObject);
47356   SWIG_TypeClientData(SWIGTYPE_p_Xapian__MatchSpy, (void *) &SwigClassMatchSpy);
47357   rb_define_alloc_func(SwigClassMatchSpy.klass, _wrap_MatchSpy_allocate);
47358   rb_define_method(SwigClassMatchSpy.klass, "initialize", VALUEFUNC(_wrap_new_MatchSpy), -1);
47359   rb_define_method(SwigClassMatchSpy.klass, "call", VALUEFUNC(_wrap_MatchSpy___call__), -1);
47360   rb_define_method(SwigClassMatchSpy.klass, "name", VALUEFUNC(_wrap_MatchSpy_name), -1);
47361   rb_define_method(SwigClassMatchSpy.klass, "merge_results", VALUEFUNC(_wrap_MatchSpy_merge_results), -1);
47362   rb_define_method(SwigClassMatchSpy.klass, "description", VALUEFUNC(_wrap_MatchSpy_description), -1);
47363   rb_define_method(SwigClassMatchSpy.klass, "release", VALUEFUNC(_wrap_MatchSpy_release), -1);
47364   SwigClassMatchSpy.mark = 0;
47365   SwigClassMatchSpy.destroy = (void (*)(void *)) free_Xapian_MatchSpy;
47366   SwigClassMatchSpy.trackObjects = 0;
47367 
47368   SwigClassValueCountMatchSpy.klass = rb_define_class_under(mXapian, "ValueCountMatchSpy", ((swig_class *) SWIGTYPE_p_Xapian__MatchSpy->clientdata)->klass);
47369   SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueCountMatchSpy, (void *) &SwigClassValueCountMatchSpy);
47370   rb_define_alloc_func(SwigClassValueCountMatchSpy.klass, _wrap_ValueCountMatchSpy_allocate);
47371   rb_define_method(SwigClassValueCountMatchSpy.klass, "initialize", VALUEFUNC(_wrap_new_ValueCountMatchSpy), -1);
47372   rb_define_method(SwigClassValueCountMatchSpy.klass, "get_total", VALUEFUNC(_wrap_ValueCountMatchSpy_get_total), -1);
47373   rb_define_method(SwigClassValueCountMatchSpy.klass, "_dangerous_values_begin", VALUEFUNC(_wrap_ValueCountMatchSpy__dangerous_values_begin), -1);
47374   rb_define_method(SwigClassValueCountMatchSpy.klass, "_dangerous_values_end", VALUEFUNC(_wrap_ValueCountMatchSpy__dangerous_values_end), -1);
47375   rb_define_method(SwigClassValueCountMatchSpy.klass, "_dangerous_top_values_begin", VALUEFUNC(_wrap_ValueCountMatchSpy__dangerous_top_values_begin), -1);
47376   rb_define_method(SwigClassValueCountMatchSpy.klass, "_dangerous_top_values_end", VALUEFUNC(_wrap_ValueCountMatchSpy__dangerous_top_values_end), -1);
47377   rb_define_method(SwigClassValueCountMatchSpy.klass, "call", VALUEFUNC(_wrap_ValueCountMatchSpy___call__), -1);
47378   rb_define_method(SwigClassValueCountMatchSpy.klass, "name", VALUEFUNC(_wrap_ValueCountMatchSpy_name), -1);
47379   rb_define_method(SwigClassValueCountMatchSpy.klass, "merge_results", VALUEFUNC(_wrap_ValueCountMatchSpy_merge_results), -1);
47380   rb_define_method(SwigClassValueCountMatchSpy.klass, "description", VALUEFUNC(_wrap_ValueCountMatchSpy_description), -1);
47381   SwigClassValueCountMatchSpy.mark = 0;
47382   SwigClassValueCountMatchSpy.destroy = (void (*)(void *)) free_Xapian_ValueCountMatchSpy;
47383   SwigClassValueCountMatchSpy.trackObjects = 0;
47384   rb_define_module_function(mXapian, "miles_to_metres", VALUEFUNC(_wrap_miles_to_metres), -1);
47385   rb_define_module_function(mXapian, "metres_to_miles", VALUEFUNC(_wrap_metres_to_miles), -1);
47386 
47387   SwigClassLatLongCoord.klass = rb_define_class_under(mXapian, "LatLongCoord", rb_cObject);
47388   SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongCoord, (void *) &SwigClassLatLongCoord);
47389   rb_define_alloc_func(SwigClassLatLongCoord.klass, _wrap_LatLongCoord_allocate);
47390   rb_define_method(SwigClassLatLongCoord.klass, "initialize", VALUEFUNC(_wrap_new_LatLongCoord), -1);
47391   rb_define_method(SwigClassLatLongCoord.klass, "latitude=", VALUEFUNC(_wrap_LatLongCoord_latitude_set), -1);
47392   rb_define_method(SwigClassLatLongCoord.klass, "latitude", VALUEFUNC(_wrap_LatLongCoord_latitude_get), -1);
47393   rb_define_method(SwigClassLatLongCoord.klass, "longitude=", VALUEFUNC(_wrap_LatLongCoord_longitude_set), -1);
47394   rb_define_method(SwigClassLatLongCoord.klass, "longitude", VALUEFUNC(_wrap_LatLongCoord_longitude_get), -1);
47395   rb_define_method(SwigClassLatLongCoord.klass, "unserialise", VALUEFUNC(_wrap_LatLongCoord_unserialise), -1);
47396   rb_define_method(SwigClassLatLongCoord.klass, "serialise", VALUEFUNC(_wrap_LatLongCoord_serialise), -1);
47397   rb_define_method(SwigClassLatLongCoord.klass, "description", VALUEFUNC(_wrap_LatLongCoord_description), -1);
47398   SwigClassLatLongCoord.mark = 0;
47399   SwigClassLatLongCoord.destroy = (void (*)(void *)) free_Xapian_LatLongCoord;
47400   SwigClassLatLongCoord.trackObjects = 0;
47401 
47402   SwigClassLatLongCoordsIterator.klass = rb_define_class_under(mXapian, "LatLongCoordsIterator", rb_cObject);
47403   SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongCoordsIterator, (void *) &SwigClassLatLongCoordsIterator);
47404   rb_define_alloc_func(SwigClassLatLongCoordsIterator.klass, _wrap_LatLongCoordsIterator_allocate);
47405   rb_define_method(SwigClassLatLongCoordsIterator.klass, "initialize", VALUEFUNC(_wrap_new_LatLongCoordsIterator), -1);
47406   rb_define_method(SwigClassLatLongCoordsIterator.klass, "==", VALUEFUNC(_wrap_LatLongCoordsIterator___eq__), -1);
47407   rb_define_method(SwigClassLatLongCoordsIterator.klass, "equals", VALUEFUNC(_wrap_LatLongCoordsIterator_equals), -1);
47408   rb_define_method(SwigClassLatLongCoordsIterator.klass, "get_coord", VALUEFUNC(_wrap_LatLongCoordsIterator_get_coord), -1);
47409   rb_define_method(SwigClassLatLongCoordsIterator.klass, "next", VALUEFUNC(_wrap_LatLongCoordsIterator_next), -1);
47410   SwigClassLatLongCoordsIterator.mark = 0;
47411   SwigClassLatLongCoordsIterator.destroy = (void (*)(void *)) free_Xapian_LatLongCoordsIterator;
47412   SwigClassLatLongCoordsIterator.trackObjects = 0;
47413 
47414   SwigClassLatLongCoords.klass = rb_define_class_under(mXapian, "LatLongCoords", rb_cObject);
47415   SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongCoords, (void *) &SwigClassLatLongCoords);
47416   rb_define_alloc_func(SwigClassLatLongCoords.klass, _wrap_LatLongCoords_allocate);
47417   rb_define_method(SwigClassLatLongCoords.klass, "initialize", VALUEFUNC(_wrap_new_LatLongCoords), -1);
47418   rb_define_method(SwigClassLatLongCoords.klass, "_begin", VALUEFUNC(_wrap_LatLongCoords__begin), -1);
47419   rb_define_method(SwigClassLatLongCoords.klass, "_end", VALUEFUNC(_wrap_LatLongCoords__end), -1);
47420   rb_define_method(SwigClassLatLongCoords.klass, "size", VALUEFUNC(_wrap_LatLongCoords_size), -1);
47421   rb_define_method(SwigClassLatLongCoords.klass, "empty?", VALUEFUNC(_wrap_LatLongCoords_emptyq___), -1);
47422   rb_define_method(SwigClassLatLongCoords.klass, "append", VALUEFUNC(_wrap_LatLongCoords_append), -1);
47423   rb_define_method(SwigClassLatLongCoords.klass, "unserialise", VALUEFUNC(_wrap_LatLongCoords_unserialise), -1);
47424   rb_define_method(SwigClassLatLongCoords.klass, "serialise", VALUEFUNC(_wrap_LatLongCoords_serialise), -1);
47425   rb_define_method(SwigClassLatLongCoords.klass, "description", VALUEFUNC(_wrap_LatLongCoords_description), -1);
47426   SwigClassLatLongCoords.mark = 0;
47427   SwigClassLatLongCoords.destroy = (void (*)(void *)) free_Xapian_LatLongCoords;
47428   SwigClassLatLongCoords.trackObjects = 0;
47429   rb_define_module_function(mXapian, "disown_LatLongMetric", VALUEFUNC(_wrap_disown_LatLongMetric), -1);
47430 
47431   SwigClassLatLongMetric.klass = rb_define_class_under(mXapian, "LatLongMetric", rb_cObject);
47432   SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongMetric, (void *) &SwigClassLatLongMetric);
47433   rb_define_alloc_func(SwigClassLatLongMetric.klass, _wrap_LatLongMetric_allocate);
47434   rb_define_method(SwigClassLatLongMetric.klass, "initialize", VALUEFUNC(_wrap_new_LatLongMetric), -1);
47435   rb_define_method(SwigClassLatLongMetric.klass, "pointwise_distance", VALUEFUNC(_wrap_LatLongMetric_pointwise_distance), -1);
47436   rb_define_method(SwigClassLatLongMetric.klass, "call", VALUEFUNC(_wrap_LatLongMetric___call__), -1);
47437   rb_define_method(SwigClassLatLongMetric.klass, "name", VALUEFUNC(_wrap_LatLongMetric_name), -1);
47438   SwigClassLatLongMetric.mark = 0;
47439   SwigClassLatLongMetric.destroy = (void (*)(void *)) free_Xapian_LatLongMetric;
47440   SwigClassLatLongMetric.trackObjects = 0;
47441 
47442   SwigClassGreatCircleMetric.klass = rb_define_class_under(mXapian, "GreatCircleMetric", ((swig_class *) SWIGTYPE_p_Xapian__LatLongMetric->clientdata)->klass);
47443   SWIG_TypeClientData(SWIGTYPE_p_Xapian__GreatCircleMetric, (void *) &SwigClassGreatCircleMetric);
47444   rb_define_alloc_func(SwigClassGreatCircleMetric.klass, _wrap_GreatCircleMetric_allocate);
47445   rb_define_method(SwigClassGreatCircleMetric.klass, "initialize", VALUEFUNC(_wrap_new_GreatCircleMetric), -1);
47446   rb_define_method(SwigClassGreatCircleMetric.klass, "pointwise_distance", VALUEFUNC(_wrap_GreatCircleMetric_pointwise_distance), -1);
47447   rb_define_method(SwigClassGreatCircleMetric.klass, "name", VALUEFUNC(_wrap_GreatCircleMetric_name), -1);
47448   SwigClassGreatCircleMetric.mark = 0;
47449   SwigClassGreatCircleMetric.destroy = (void (*)(void *)) free_Xapian_GreatCircleMetric;
47450   SwigClassGreatCircleMetric.trackObjects = 0;
47451 
47452   SwigClassLatLongDistancePostingSource.klass = rb_define_class_under(mXapian, "LatLongDistancePostingSource", ((swig_class *) SWIGTYPE_p_Xapian__ValuePostingSource->clientdata)->klass);
47453   SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongDistancePostingSource, (void *) &SwigClassLatLongDistancePostingSource);
47454   rb_define_alloc_func(SwigClassLatLongDistancePostingSource.klass, _wrap_LatLongDistancePostingSource_allocate);
47455   rb_define_method(SwigClassLatLongDistancePostingSource.klass, "initialize", VALUEFUNC(_wrap_new_LatLongDistancePostingSource), -1);
47456   rb_define_method(SwigClassLatLongDistancePostingSource.klass, "next", VALUEFUNC(_wrap_LatLongDistancePostingSource_next), -1);
47457   rb_define_method(SwigClassLatLongDistancePostingSource.klass, "skip_to", VALUEFUNC(_wrap_LatLongDistancePostingSource_skip_to), -1);
47458   rb_define_method(SwigClassLatLongDistancePostingSource.klass, "check", VALUEFUNC(_wrap_LatLongDistancePostingSource_check), -1);
47459   rb_define_method(SwigClassLatLongDistancePostingSource.klass, "weight", VALUEFUNC(_wrap_LatLongDistancePostingSource_weight), -1);
47460   rb_define_method(SwigClassLatLongDistancePostingSource.klass, "name", VALUEFUNC(_wrap_LatLongDistancePostingSource_name), -1);
47461   rb_define_method(SwigClassLatLongDistancePostingSource.klass, "init", VALUEFUNC(_wrap_LatLongDistancePostingSource_init), -1);
47462   rb_define_method(SwigClassLatLongDistancePostingSource.klass, "description", VALUEFUNC(_wrap_LatLongDistancePostingSource_description), -1);
47463   SwigClassLatLongDistancePostingSource.mark = 0;
47464   SwigClassLatLongDistancePostingSource.destroy = (void (*)(void *)) free_Xapian_LatLongDistancePostingSource;
47465   SwigClassLatLongDistancePostingSource.trackObjects = 0;
47466 
47467   SwigClassLatLongDistanceKeyMaker.klass = rb_define_class_under(mXapian, "LatLongDistanceKeyMaker", ((swig_class *) SWIGTYPE_p_Xapian__KeyMaker->clientdata)->klass);
47468   SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, (void *) &SwigClassLatLongDistanceKeyMaker);
47469   rb_define_alloc_func(SwigClassLatLongDistanceKeyMaker.klass, _wrap_LatLongDistanceKeyMaker_allocate);
47470   rb_define_method(SwigClassLatLongDistanceKeyMaker.klass, "initialize", VALUEFUNC(_wrap_new_LatLongDistanceKeyMaker), -1);
47471   rb_define_method(SwigClassLatLongDistanceKeyMaker.klass, "call", VALUEFUNC(_wrap_LatLongDistanceKeyMaker___call__), -1);
47472   SwigClassLatLongDistanceKeyMaker.mark = 0;
47473   SwigClassLatLongDistanceKeyMaker.destroy = (void (*)(void *)) free_Xapian_LatLongDistanceKeyMaker;
47474   SwigClassLatLongDistanceKeyMaker.trackObjects = 0;
47475 
47476   SwigClassDatabase.klass = rb_define_class_under(mXapian, "Database", rb_cObject);
47477   SWIG_TypeClientData(SWIGTYPE_p_Xapian__Database, (void *) &SwigClassDatabase);
47478   rb_define_alloc_func(SwigClassDatabase.klass, _wrap_Database_allocate);
47479   rb_define_method(SwigClassDatabase.klass, "initialize", VALUEFUNC(_wrap_new_Database), -1);
47480   rb_define_method(SwigClassDatabase.klass, "add_database", VALUEFUNC(_wrap_Database_add_database), -1);
47481   rb_define_method(SwigClassDatabase.klass, "size", VALUEFUNC(_wrap_Database_size), -1);
47482   rb_define_method(SwigClassDatabase.klass, "reopen", VALUEFUNC(_wrap_Database_reopen), -1);
47483   rb_define_method(SwigClassDatabase.klass, "close", VALUEFUNC(_wrap_Database_close), -1);
47484   rb_define_method(SwigClassDatabase.klass, "description", VALUEFUNC(_wrap_Database_description), -1);
47485   rb_define_method(SwigClassDatabase.klass, "_dangerous_postlist_begin", VALUEFUNC(_wrap_Database__dangerous_postlist_begin), -1);
47486   rb_define_method(SwigClassDatabase.klass, "_dangerous_postlist_end", VALUEFUNC(_wrap_Database__dangerous_postlist_end), -1);
47487   rb_define_method(SwigClassDatabase.klass, "_dangerous_termlist_begin", VALUEFUNC(_wrap_Database__dangerous_termlist_begin), -1);
47488   rb_define_method(SwigClassDatabase.klass, "_dangerous_termlist_end", VALUEFUNC(_wrap_Database__dangerous_termlist_end), -1);
47489   rb_define_method(SwigClassDatabase.klass, "has_positions", VALUEFUNC(_wrap_Database_has_positions), -1);
47490   rb_define_method(SwigClassDatabase.klass, "_dangerous_positionlist_begin", VALUEFUNC(_wrap_Database__dangerous_positionlist_begin), -1);
47491   rb_define_method(SwigClassDatabase.klass, "_dangerous_positionlist_end", VALUEFUNC(_wrap_Database__dangerous_positionlist_end), -1);
47492   rb_define_method(SwigClassDatabase.klass, "_dangerous_allterms_begin", VALUEFUNC(_wrap_Database__dangerous_allterms_begin), -1);
47493   rb_define_method(SwigClassDatabase.klass, "_dangerous_allterms_end", VALUEFUNC(_wrap_Database__dangerous_allterms_end), -1);
47494   rb_define_method(SwigClassDatabase.klass, "doccount", VALUEFUNC(_wrap_Database_doccount), -1);
47495   rb_define_method(SwigClassDatabase.klass, "lastdocid", VALUEFUNC(_wrap_Database_lastdocid), -1);
47496   rb_define_method(SwigClassDatabase.klass, "avlength", VALUEFUNC(_wrap_Database_avlength), -1);
47497   rb_define_method(SwigClassDatabase.klass, "get_average_length", VALUEFUNC(_wrap_Database_get_average_length), -1);
47498   rb_define_method(SwigClassDatabase.klass, "get_total_length", VALUEFUNC(_wrap_Database_get_total_length), -1);
47499   rb_define_method(SwigClassDatabase.klass, "termfreq", VALUEFUNC(_wrap_Database_termfreq), -1);
47500   rb_define_method(SwigClassDatabase.klass, "term_exists", VALUEFUNC(_wrap_Database_term_exists), -1);
47501   rb_define_method(SwigClassDatabase.klass, "collection_freq", VALUEFUNC(_wrap_Database_collection_freq), -1);
47502   rb_define_method(SwigClassDatabase.klass, "get_value_freq", VALUEFUNC(_wrap_Database_get_value_freq), -1);
47503   rb_define_method(SwigClassDatabase.klass, "get_value_lower_bound", VALUEFUNC(_wrap_Database_get_value_lower_bound), -1);
47504   rb_define_method(SwigClassDatabase.klass, "get_value_upper_bound", VALUEFUNC(_wrap_Database_get_value_upper_bound), -1);
47505   rb_define_method(SwigClassDatabase.klass, "get_doclength_lower_bound", VALUEFUNC(_wrap_Database_get_doclength_lower_bound), -1);
47506   rb_define_method(SwigClassDatabase.klass, "get_doclength_upper_bound", VALUEFUNC(_wrap_Database_get_doclength_upper_bound), -1);
47507   rb_define_method(SwigClassDatabase.klass, "get_wdf_upper_bound", VALUEFUNC(_wrap_Database_get_wdf_upper_bound), -1);
47508   rb_define_method(SwigClassDatabase.klass, "_dangerous_valuestream_begin", VALUEFUNC(_wrap_Database__dangerous_valuestream_begin), -1);
47509   rb_define_method(SwigClassDatabase.klass, "_dangerous_valuestream_end", VALUEFUNC(_wrap_Database__dangerous_valuestream_end), -1);
47510   rb_define_method(SwigClassDatabase.klass, "doclength", VALUEFUNC(_wrap_Database_doclength), -1);
47511   rb_define_method(SwigClassDatabase.klass, "get_unique_terms", VALUEFUNC(_wrap_Database_get_unique_terms), -1);
47512   rb_define_method(SwigClassDatabase.klass, "keep_alive", VALUEFUNC(_wrap_Database_keep_alive), -1);
47513   rb_define_method(SwigClassDatabase.klass, "document", VALUEFUNC(_wrap_Database_document), -1);
47514   rb_define_method(SwigClassDatabase.klass, "get_spelling_suggestion", VALUEFUNC(_wrap_Database_get_spelling_suggestion), -1);
47515   rb_define_method(SwigClassDatabase.klass, "_dangerous_spellings_begin", VALUEFUNC(_wrap_Database__dangerous_spellings_begin), -1);
47516   rb_define_method(SwigClassDatabase.klass, "_dangerous_spellings_end", VALUEFUNC(_wrap_Database__dangerous_spellings_end), -1);
47517   rb_define_method(SwigClassDatabase.klass, "_dangerous_synonyms_begin", VALUEFUNC(_wrap_Database__dangerous_synonyms_begin), -1);
47518   rb_define_method(SwigClassDatabase.klass, "_dangerous_synonyms_end", VALUEFUNC(_wrap_Database__dangerous_synonyms_end), -1);
47519   rb_define_method(SwigClassDatabase.klass, "_dangerous_synonym_keys_begin", VALUEFUNC(_wrap_Database__dangerous_synonym_keys_begin), -1);
47520   rb_define_method(SwigClassDatabase.klass, "_dangerous_synonym_keys_end", VALUEFUNC(_wrap_Database__dangerous_synonym_keys_end), -1);
47521   rb_define_method(SwigClassDatabase.klass, "get_metadata", VALUEFUNC(_wrap_Database_get_metadata), -1);
47522   rb_define_method(SwigClassDatabase.klass, "_dangerous_metadata_keys_begin", VALUEFUNC(_wrap_Database__dangerous_metadata_keys_begin), -1);
47523   rb_define_method(SwigClassDatabase.klass, "_dangerous_metadata_keys_end", VALUEFUNC(_wrap_Database__dangerous_metadata_keys_end), -1);
47524   rb_define_method(SwigClassDatabase.klass, "get_uuid", VALUEFUNC(_wrap_Database_get_uuid), -1);
47525   rb_define_method(SwigClassDatabase.klass, "locked", VALUEFUNC(_wrap_Database_locked), -1);
47526   rb_define_method(SwigClassDatabase.klass, "get_revision", VALUEFUNC(_wrap_Database_get_revision), -1);
47527   rb_define_singleton_method(SwigClassDatabase.klass, "check", VALUEFUNC(_wrap_Database_check), -1);
47528   rb_define_method(SwigClassDatabase.klass, "compact", VALUEFUNC(_wrap_Database_compact), -1);
47529   SwigClassDatabase.mark = 0;
47530   SwigClassDatabase.destroy = (void (*)(void *)) free_Xapian_Database;
47531   SwigClassDatabase.trackObjects = 0;
47532 
47533   SwigClassWritableDatabase.klass = rb_define_class_under(mXapian, "WritableDatabase", ((swig_class *) SWIGTYPE_p_Xapian__Database->clientdata)->klass);
47534   SWIG_TypeClientData(SWIGTYPE_p_Xapian__WritableDatabase, (void *) &SwigClassWritableDatabase);
47535   rb_define_alloc_func(SwigClassWritableDatabase.klass, _wrap_WritableDatabase_allocate);
47536   rb_define_method(SwigClassWritableDatabase.klass, "initialize", VALUEFUNC(_wrap_new_WritableDatabase), -1);
47537   rb_define_method(SwigClassWritableDatabase.klass, "commit", VALUEFUNC(_wrap_WritableDatabase_commit), -1);
47538   rb_define_method(SwigClassWritableDatabase.klass, "flush", VALUEFUNC(_wrap_WritableDatabase_flush), -1);
47539   rb_define_method(SwigClassWritableDatabase.klass, "begin_transaction", VALUEFUNC(_wrap_WritableDatabase_begin_transaction), -1);
47540   rb_define_method(SwigClassWritableDatabase.klass, "commit_transaction", VALUEFUNC(_wrap_WritableDatabase_commit_transaction), -1);
47541   rb_define_method(SwigClassWritableDatabase.klass, "cancel_transaction", VALUEFUNC(_wrap_WritableDatabase_cancel_transaction), -1);
47542   rb_define_method(SwigClassWritableDatabase.klass, "add_document", VALUEFUNC(_wrap_WritableDatabase_add_document), -1);
47543   rb_define_method(SwigClassWritableDatabase.klass, "delete_document", VALUEFUNC(_wrap_WritableDatabase_delete_document), -1);
47544   rb_define_method(SwigClassWritableDatabase.klass, "replace_document", VALUEFUNC(_wrap_WritableDatabase_replace_document), -1);
47545   rb_define_method(SwigClassWritableDatabase.klass, "add_spelling", VALUEFUNC(_wrap_WritableDatabase_add_spelling), -1);
47546   rb_define_method(SwigClassWritableDatabase.klass, "remove_spelling", VALUEFUNC(_wrap_WritableDatabase_remove_spelling), -1);
47547   rb_define_method(SwigClassWritableDatabase.klass, "add_synonym", VALUEFUNC(_wrap_WritableDatabase_add_synonym), -1);
47548   rb_define_method(SwigClassWritableDatabase.klass, "remove_synonym", VALUEFUNC(_wrap_WritableDatabase_remove_synonym), -1);
47549   rb_define_method(SwigClassWritableDatabase.klass, "clear_synonyms", VALUEFUNC(_wrap_WritableDatabase_clear_synonyms), -1);
47550   rb_define_method(SwigClassWritableDatabase.klass, "set_metadata", VALUEFUNC(_wrap_WritableDatabase_set_metadata), -1);
47551   rb_define_method(SwigClassWritableDatabase.klass, "description", VALUEFUNC(_wrap_WritableDatabase_description), -1);
47552   SwigClassWritableDatabase.mark = 0;
47553   SwigClassWritableDatabase.destroy = (void (*)(void *)) free_Xapian_WritableDatabase;
47554   SwigClassWritableDatabase.trackObjects = 0;
47555   rb_define_module_function(mXapian, "open_stub", VALUEFUNC(_wrap_open_stub), -1);
47556   rb_define_module_function(mXapian, "inmemory_open", VALUEFUNC(_wrap_inmemory_open), -1);
47557   rb_define_module_function(mXapian, "chert_open", VALUEFUNC(_wrap_chert_open), -1);
47558   rb_define_module_function(mXapian, "remote_open", VALUEFUNC(_wrap_remote_open), -1);
47559   rb_define_module_function(mXapian, "remote_open_writable", VALUEFUNC(_wrap_remote_open_writable), -1);
47560 
47561   // Define MatchAll and MatchNothing as constants in class Xapian::Query.
47562   rb_define_const(SwigClassQuery.klass, "MatchAll", SWIG_NewPointerObj(SWIG_as_voidptr(new Xapian::Query("")), SWIGTYPE_p_Xapian__Query, 0));;
47563   rb_define_const(SwigClassQuery.klass, "MatchNothing", SWIG_NewPointerObj(SWIG_as_voidptr(new Xapian::Query()), SWIGTYPE_p_Xapian__Query, 0));;
47564 
47565 }
47566 
47567