Main Page | Namespace List | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

HyperEstraier_wrap.cxx

Go to the documentation of this file.
00001 /* ----------------------------------------------------------------------------
00002  * This file was automatically generated by SWIG (http://www.swig.org).
00003  * Version 1.3.24
00004  * 
00005  * This file is not intended to be easily readable and contains a number of 
00006  * coding conventions designed to improve portability and efficiency. Do not make
00007  * changes to this file unless you know what you are doing--modify the SWIG 
00008  * interface file instead. 
00009  * ----------------------------------------------------------------------------- */
00010 
00011 
00012 #ifdef __cplusplus
00013 template<class T> class SwigValueWrapper {
00014     T *tt;
00015 public:
00016     SwigValueWrapper() : tt(0) { }
00017     SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
00018     SwigValueWrapper(const T& t) : tt(new T(t)) { }
00019     ~SwigValueWrapper() { delete tt; } 
00020     SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
00021     operator T&() const { return *tt; }
00022     T *operator&() { return tt; }
00023 private:
00024     SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
00025 };
00026 #endif
00027 
00028 
00029 #ifndef SWIG_TEMPLATE_DISAMBIGUATOR
00030 #  if defined(__SUNPRO_CC) 
00031 #    define SWIG_TEMPLATE_DISAMBIGUATOR template
00032 #  else
00033 #    define SWIG_TEMPLATE_DISAMBIGUATOR 
00034 #  endif
00035 #endif
00036 
00037 /* ruby.swg */
00038 /* Implementation : RUBY */
00039 #define SWIGRUBY 1
00040 
00041 #include "ruby.h"
00042 
00043 /* Flags for pointer conversion */
00044 #define SWIG_POINTER_EXCEPTION     0x1
00045 #define SWIG_POINTER_DISOWN        0x2
00046 
00047 #define NUM2USHRT(n) (\
00048     (0 <= NUM2UINT(n) && NUM2UINT(n) <= USHRT_MAX)\
00049     ? (unsigned short) NUM2UINT(n) \
00050     : (rb_raise(rb_eArgError, "integer %d out of range of `unsigned short'",\
00051                NUM2UINT(n)), (short)0)\
00052 )
00053 
00054 #define NUM2SHRT(n) (\
00055     (SHRT_MIN <= NUM2INT(n) && NUM2INT(n) <= SHRT_MAX)\
00056     ? (short)NUM2INT(n)\
00057     : (rb_raise(rb_eArgError, "integer %d out of range of `short'",\
00058                NUM2INT(n)), (short)0)\
00059 )
00060 
00061 /* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
00062 #ifndef NUM2LL
00063 #define NUM2LL(x) NUM2LONG((x))
00064 #endif
00065 #ifndef LL2NUM
00066 #define LL2NUM(x) INT2NUM((long) (x))
00067 #endif
00068 #ifndef ULL2NUM
00069 #define ULL2NUM(x) UINT2NUM((unsigned long) (x))
00070 #endif
00071 
00072 /* Ruby 1.7 doesn't (yet) define NUM2ULL() */
00073 #ifndef NUM2ULL
00074 #ifdef HAVE_LONG_LONG
00075 #define NUM2ULL(x) rb_num2ull((x))
00076 #else
00077 #define NUM2ULL(x) NUM2ULONG(x)
00078 #endif
00079 #endif
00080 
00081 /*
00082  * Need to be very careful about how these macros are defined, especially
00083  * when compiling C++ code or C code with an ANSI C compiler.
00084  *
00085  * VALUEFUNC(f) is a macro used to typecast a C function that implements
00086  * a Ruby method so that it can be passed as an argument to API functions
00087  * like rb_define_method() and rb_define_singleton_method().
00088  *
00089  * VOIDFUNC(f) is a macro used to typecast a C function that implements
00090  * either the "mark" or "free" stuff for a Ruby Data object, so that it
00091  * can be passed as an argument to API functions like Data_Wrap_Struct()
00092  * and Data_Make_Struct().
00093  */
00094  
00095 #ifdef __cplusplus
00096 #  ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
00097 #    define PROTECTFUNC(f) ((VALUE (*)()) f)
00098 #    define VALUEFUNC(f) ((VALUE (*)()) f)
00099 #    define VOIDFUNC(f)  ((void (*)()) f)
00100 #  else
00101 #    ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
00102 #      define PROTECTFUNC(f) ((VALUE (*)()) f)
00103 #      define VALUEFUNC(f) ((VALUE (*)()) f)
00104 #      define VOIDFUNC(f)  ((RUBY_DATA_FUNC) f)
00105 #    else /* These definitions should work for Ruby 1.7+ */
00106 #      define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
00107 #      define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
00108 #      define VOIDFUNC(f)  ((RUBY_DATA_FUNC) f)
00109 #    endif
00110 #  endif
00111 #else
00112 #  define VALUEFUNC(f) (f)
00113 #  define VOIDFUNC(f) (f)
00114 #endif
00115 
00116 typedef struct {
00117   VALUE klass;
00118   VALUE mImpl;
00119   void  (*mark)(void *);
00120   void  (*destroy)(void *);
00121 } swig_class;
00122 
00123 /* Don't use for expressions have side effect */
00124 #ifndef RB_STRING_VALUE
00125 #define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s)))
00126 #endif
00127 #ifndef StringValue
00128 #define StringValue(s) RB_STRING_VALUE(s)
00129 #endif
00130 #ifndef StringValuePtr
00131 #define StringValuePtr(s) RSTRING(RB_STRING_VALUE(s))->ptr
00132 #endif
00133 #ifndef StringValueLen
00134 #define StringValueLen(s) RSTRING(RB_STRING_VALUE(s))->len
00135 #endif
00136 #ifndef SafeStringValue
00137 #define SafeStringValue(v) do {\
00138     StringValue(v);\
00139     rb_check_safe_str(v);\
00140 } while (0)
00141 #endif
00142 
00143 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
00144 #define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1)
00145 #define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
00146 #endif
00147 
00148 /* Contract support */
00149 
00150 #define SWIG_contract_assert(expr, msg) if (!(expr)) { rb_raise(rb_eRuntimeError, (char *) msg ); } else
00151 
00152 
00153 /***********************************************************************
00154  * swigrun.swg
00155  *
00156  *     This file contains generic CAPI SWIG runtime support for pointer
00157  *     type checking.
00158  *
00159  ************************************************************************/
00160 
00161 /* This should only be incremented when either the layout of swig_type_info changes,
00162    or for whatever reason, the runtime changes incompatibly */
00163 #define SWIG_RUNTIME_VERSION "1"
00164 
00165 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
00166 #ifdef SWIG_TYPE_TABLE
00167 #define SWIG_QUOTE_STRING(x) #x
00168 #define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
00169 #define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
00170 #else
00171 #define SWIG_TYPE_TABLE_NAME
00172 #endif
00173 
00174 #include <string.h>
00175 
00176 #ifndef SWIGINLINE
00177 #if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
00178 #  define SWIGINLINE inline
00179 #else
00180 #  define SWIGINLINE
00181 #endif
00182 #endif
00183 
00184 /*
00185   You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
00186   creating a static or dynamic library from the swig runtime code.
00187   In 99.9% of the cases, swig just needs to declare them as 'static'.
00188   
00189   But only do this if is strictly necessary, ie, if you have problems
00190   with your compiler or so.
00191 */
00192 #ifndef SWIGRUNTIME
00193 #define SWIGRUNTIME static
00194 #endif
00195 #ifndef SWIGRUNTIMEINLINE
00196 #define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
00197 #endif
00198 
00199 #ifdef __cplusplus
00200 extern "C" {
00201 #endif
00202 
00203 typedef void *(*swig_converter_func)(void *);
00204 typedef struct swig_type_info *(*swig_dycast_func)(void **);
00205 
00206 typedef struct swig_type_info {
00207   const char             *name;
00208   swig_converter_func     converter;
00209   const char             *str;
00210   void                   *clientdata;
00211   swig_dycast_func        dcast;
00212   struct swig_type_info  *next;
00213   struct swig_type_info  *prev;
00214 } swig_type_info;
00215 
00216 /* 
00217   Compare two type names skipping the space characters, therefore
00218   "char*" == "char *" and "Class<int>" == "Class<int >", etc.
00219 
00220   Return 0 when the two name types are equivalent, as in
00221   strncmp, but skipping ' '.
00222 */
00223 SWIGRUNTIME int
00224 SWIG_TypeNameComp(const char *f1, const char *l1,
00225           const char *f2, const char *l2) {
00226   for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
00227     while ((*f1 == ' ') && (f1 != l1)) ++f1;
00228     while ((*f2 == ' ') && (f2 != l2)) ++f2;
00229     if (*f1 != *f2) return *f1 - *f2;
00230   }
00231   return (l1 - f1) - (l2 - f2);
00232 }
00233 
00234 /*
00235   Check type equivalence in a name list like <name1>|<name2>|...
00236 */
00237 SWIGRUNTIME int
00238 SWIG_TypeEquiv(const char *nb, const char *tb) {
00239   int equiv = 0;
00240   const char* te = tb + strlen(tb);
00241   const char* ne = nb;
00242   while (!equiv && *ne) {
00243     for (nb = ne; *ne; ++ne) {
00244       if (*ne == '|') break;
00245     }
00246     equiv = SWIG_TypeNameComp(nb, ne, tb, te) == 0;
00247     if (*ne) ++ne;
00248   }
00249   return equiv;
00250 }
00251 
00252 /*
00253   Register a type mapping with the type-checking
00254 */
00255 SWIGRUNTIME swig_type_info *
00256 SWIG_TypeRegisterTL(swig_type_info **tl, swig_type_info *ti) {
00257   swig_type_info *tc, *head, *ret, *next;
00258   /* Check to see if this type has already been registered */
00259   tc = *tl;
00260   while (tc) {
00261     /* check simple type equivalence */
00262     int typeequiv = (strcmp(tc->name, ti->name) == 0);   
00263     /* check full type equivalence, resolving typedefs */
00264     if (!typeequiv) {
00265       /* only if tc is not a typedef (no '|' on it) */
00266       if (tc->str && ti->str && !strstr(tc->str,"|")) {
00267     typeequiv = SWIG_TypeEquiv(ti->str,tc->str);
00268       }
00269     }
00270     if (typeequiv) {
00271       /* Already exists in the table.  Just add additional types to the list */
00272       if (ti->clientdata) tc->clientdata = ti->clientdata;
00273       head = tc;
00274       next = tc->next;
00275       goto l1;
00276     }
00277     tc = tc->prev;
00278   }
00279   head = ti;
00280   next = 0;
00281 
00282   /* Place in list */
00283   ti->prev = *tl;
00284   *tl = ti;
00285 
00286   /* Build linked lists */
00287   l1:
00288   ret = head;
00289   tc = ti + 1;
00290   /* Patch up the rest of the links */
00291   while (tc->name) {
00292     head->next = tc;
00293     tc->prev = head;
00294     head = tc;
00295     tc++;
00296   }
00297   if (next) next->prev = head;
00298   head->next = next;
00299 
00300   return ret;
00301 }
00302 
00303 /*
00304   Check the typename
00305 */
00306 SWIGRUNTIME swig_type_info *
00307 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
00308   swig_type_info *s;
00309   if (!ty) return 0;        /* Void pointer */
00310   s = ty->next;             /* First element always just a name */
00311   do {
00312     if (strcmp(s->name,c) == 0) {
00313       if (s == ty->next) return s;
00314       /* Move s to the top of the linked list */
00315       s->prev->next = s->next;
00316       if (s->next) {
00317         s->next->prev = s->prev;
00318       }
00319       /* Insert s as second element in the list */
00320       s->next = ty->next;
00321       if (ty->next) ty->next->prev = s;
00322       ty->next = s;
00323       s->prev = ty;
00324       return s;
00325     }
00326     s = s->next;
00327   } while (s && (s != ty->next));
00328   return 0;
00329 }
00330 
00331 /*
00332   Cast a pointer up an inheritance hierarchy
00333 */
00334 SWIGRUNTIMEINLINE void *
00335 SWIG_TypeCast(swig_type_info *ty, void *ptr) {
00336   return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
00337 }
00338 
00339 /* 
00340    Dynamic pointer casting. Down an inheritance hierarchy
00341 */
00342 SWIGRUNTIME swig_type_info *
00343 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
00344   swig_type_info *lastty = ty;
00345   if (!ty || !ty->dcast) return ty;
00346   while (ty && (ty->dcast)) {
00347     ty = (*ty->dcast)(ptr);
00348     if (ty) lastty = ty;
00349   }
00350   return lastty;
00351 }
00352 
00353 /*
00354   Return the name associated with this type
00355 */
00356 SWIGRUNTIMEINLINE const char *
00357 SWIG_TypeName(const swig_type_info *ty) {
00358   return ty->name;
00359 }
00360 
00361 /*
00362   Return the pretty name associated with this type,
00363   that is an unmangled type name in a form presentable to the user.
00364 */
00365 SWIGRUNTIME const char *
00366 SWIG_TypePrettyName(const swig_type_info *type) {
00367   /* The "str" field contains the equivalent pretty names of the
00368      type, separated by vertical-bar characters.  We choose
00369      to print the last name, as it is often (?) the most
00370      specific. */
00371   if (type->str != NULL) {
00372     const char *last_name = type->str;
00373     const char *s;
00374     for (s = type->str; *s; s++)
00375       if (*s == '|') last_name = s+1;
00376     return last_name;
00377   }
00378   else
00379     return type->name;
00380 }
00381 
00382 /*
00383   Search for a swig_type_info structure
00384 */
00385 SWIGRUNTIME swig_type_info *
00386 SWIG_TypeQueryTL(swig_type_info *tl, const char *name) {
00387   swig_type_info *ty = tl;
00388   while (ty) {
00389     if (ty->str && (SWIG_TypeEquiv(ty->str,name))) return ty;
00390     if (ty->name && (strcmp(name,ty->name) == 0)) return ty;
00391     ty = ty->prev;
00392   }
00393   return 0;
00394 }
00395 
00396 /* 
00397    Set the clientdata field for a type
00398 */
00399 SWIGRUNTIME void
00400 SWIG_TypeClientDataTL(swig_type_info *tl, swig_type_info *ti, void *clientdata) {
00401   swig_type_info *tc, *equiv;
00402   if (ti->clientdata) return;
00403   /* if (ti->clientdata == clientdata) return; */
00404   ti->clientdata = clientdata;
00405   equiv = ti->next;
00406   while (equiv) {
00407     if (!equiv->converter) {
00408       tc = tl;
00409       while (tc) {
00410         if ((strcmp(tc->name, equiv->name) == 0))
00411           SWIG_TypeClientDataTL(tl,tc,clientdata);
00412         tc = tc->prev;
00413       }
00414     }
00415     equiv = equiv->next;
00416   }
00417 }
00418 
00419 /* 
00420    Pack binary data into a string
00421 */
00422 SWIGRUNTIME char *
00423 SWIG_PackData(char *c, void *ptr, size_t sz) {
00424   static char hex[17] = "0123456789abcdef";
00425   unsigned char *u = (unsigned char *) ptr;
00426   const unsigned char *eu =  u + sz;
00427   register unsigned char uu;
00428   for (; u != eu; ++u) {
00429     uu = *u;
00430     *(c++) = hex[(uu & 0xf0) >> 4];
00431     *(c++) = hex[uu & 0xf];
00432   }
00433   return c;
00434 }
00435 
00436 /* 
00437    Unpack binary data from a string
00438 */
00439 SWIGRUNTIME const char *
00440 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
00441   register unsigned char *u = (unsigned char *) ptr;
00442   register const unsigned char *eu =  u + sz;
00443   for (; u != eu; ++u) {
00444     register int d = *(c++);
00445     register unsigned char uu = 0;
00446     if ((d >= '0') && (d <= '9'))
00447       uu = ((d - '0') << 4);
00448     else if ((d >= 'a') && (d <= 'f'))
00449       uu = ((d - ('a'-10)) << 4);
00450     else 
00451       return (char *) 0;
00452     d = *(c++);
00453     if ((d >= '0') && (d <= '9'))
00454       uu |= (d - '0');
00455     else if ((d >= 'a') && (d <= 'f'))
00456       uu |= (d - ('a'-10));
00457     else 
00458       return (char *) 0;
00459     *u = uu;
00460   }
00461   return c;
00462 }
00463 
00464 /*
00465   This function will propagate the clientdata field of type to any new
00466   swig_type_info structures that have been added into the list of
00467   equivalent types.  It is like calling SWIG_TypeClientData(type,
00468   clientdata) a second time.
00469 */
00470 SWIGRUNTIME void
00471 SWIG_PropagateClientDataTL(swig_type_info *tl, swig_type_info *type) {
00472   swig_type_info *equiv = type->next;
00473   swig_type_info *tc;
00474   if (!type->clientdata) return;
00475   while (equiv) {
00476     if (!equiv->converter) {
00477       tc = tl;
00478       while (tc) {
00479         if ((strcmp(tc->name, equiv->name) == 0) && !tc->clientdata)
00480           SWIG_TypeClientDataTL(tl,tc, type->clientdata);
00481         tc = tc->prev;
00482       }
00483     }
00484     equiv = equiv->next;
00485   }
00486 }
00487 
00488 /* 
00489    Pack 'void *' into a string buffer.
00490 */
00491 SWIGRUNTIME char *
00492 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
00493   char *r = buff;
00494   if ((2*sizeof(void *) + 2) > bsz) return 0;
00495   *(r++) = '_';
00496   r = SWIG_PackData(r,&ptr,sizeof(void *));
00497   if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
00498   strcpy(r,name);
00499   return buff;
00500 }
00501 
00502 SWIGRUNTIME const char *
00503 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
00504   if (*c != '_') {
00505     if (strcmp(c,"NULL") == 0) {
00506       *ptr = (void *) 0;
00507       return name;
00508     } else {
00509       return 0;
00510     }
00511   }
00512   return SWIG_UnpackData(++c,ptr,sizeof(void *));
00513 }
00514 
00515 SWIGRUNTIME char *
00516 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
00517   char *r = buff;
00518   size_t lname = (name ? strlen(name) : 0);
00519   if ((2*sz + 2 + lname) > bsz) return 0;
00520   *(r++) = '_';
00521   r = SWIG_PackData(r,ptr,sz);
00522   if (lname) {
00523     strncpy(r,name,lname+1);
00524   } else {
00525     *r = 0;
00526   }
00527   return buff;
00528 }
00529 
00530 SWIGRUNTIME const char *
00531 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
00532   if (*c != '_') {
00533     if (strcmp(c,"NULL") == 0) {
00534       memset(ptr,0,sz);
00535       return name;
00536     } else {
00537       return 0;
00538     }
00539   }
00540   return SWIG_UnpackData(++c,ptr,sz);
00541 }
00542 
00543 #ifdef __cplusplus
00544 }
00545 #endif
00546 
00547 /***********************************************************************
00548  * common.swg
00549  *
00550  *     This file contains generic SWIG runtime support for pointer
00551  *     type checking as well as a few commonly used macros to control
00552  *     external linkage.
00553  *
00554  * Author : David Beazley (beazley@cs.uchicago.edu)
00555  *
00556  * Copyright (c) 1999-2000, The University of Chicago
00557  * 
00558  * This file may be freely redistributed without license or fee provided
00559  * this copyright message remains intact.
00560  ************************************************************************/
00561 
00562 
00563 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
00564 #  if !defined(STATIC_LINKED)
00565 #    define SWIGEXPORT(a) __declspec(dllexport) a
00566 #  else
00567 #    define SWIGEXPORT(a) a
00568 #  endif
00569 #else
00570 #  define SWIGEXPORT(a) a
00571 #endif
00572 
00573 #ifdef __cplusplus
00574 extern "C" {
00575 #endif
00576 
00577 
00578 /*************************************************************************/
00579 
00580 
00581 /* The static type info list */
00582 
00583 static swig_type_info *swig_type_list = 0;
00584 static swig_type_info **swig_type_list_handle = &swig_type_list;
00585   
00586 
00587 /* Register a type mapping with the type-checking */
00588 static swig_type_info *
00589 SWIG_TypeRegister(swig_type_info *ti) {
00590   return SWIG_TypeRegisterTL(swig_type_list_handle, ti);
00591 }
00592 
00593 /* Search for a swig_type_info structure */
00594 static swig_type_info *
00595 SWIG_TypeQuery(const char *name) {
00596   return SWIG_TypeQueryTL(*swig_type_list_handle, name);
00597 }
00598 
00599 /* Set the clientdata field for a type */
00600 static void
00601 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
00602   SWIG_TypeClientDataTL(*swig_type_list_handle, ti, clientdata);
00603 }
00604 
00605 /* This function will propagate the clientdata field of type to
00606 * any new swig_type_info structures that have been added into the list
00607 * of equivalent types.  It is like calling
00608 * SWIG_TypeClientData(type, clientdata) a second time.
00609 */
00610 static void
00611 SWIG_PropagateClientData(swig_type_info *type) {
00612   SWIG_PropagateClientDataTL(*swig_type_list_handle, type);
00613 }
00614 
00615 #ifdef __cplusplus
00616 }
00617 #endif
00618 
00619 /* Common SWIG API */
00620 #define SWIG_ConvertPtr(obj, pp, type, flags) \
00621   SWIG_Ruby_ConvertPtr(obj, pp, type, flags)
00622 #define SWIG_NewPointerObj(p, type, flags) \
00623   SWIG_Ruby_NewPointerObj(p, type, flags)
00624 #define SWIG_MustGetPtr(p, type, argnum, flags) \
00625   SWIG_Ruby_MustGetPtr(p, type, argnum, flags)
00626 
00627 /* Ruby-specific SWIG API */
00628 
00629 #define SWIG_InitRuntime() \
00630   SWIG_Ruby_InitRuntime()
00631 #define SWIG_define_class(ty) \
00632   SWIG_Ruby_define_class(ty)
00633 #define SWIG_NewClassInstance(value, ty) \
00634   SWIG_Ruby_NewClassInstance(value, ty)
00635 #define SWIG_MangleStr(value) \
00636   SWIG_Ruby_MangleStr(value)
00637 #define SWIG_CheckConvert(value, ty) \
00638   SWIG_Ruby_CheckConvert(value, ty)
00639 #define SWIG_NewPackedObj(ptr, sz, ty) \
00640   SWIG_Ruby_NewPackedObj(ptr, sz, ty)
00641 #define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \
00642   SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
00643 
00644 /* rubydef.swg */
00645 #ifdef __cplusplus
00646 extern "C" {
00647 #endif
00648 
00649 static VALUE _mSWIG = Qnil;
00650 static VALUE _cSWIG_Pointer = Qnil;
00651 static VALUE swig_runtime_data_type_pointer = Qnil;
00652 
00653 /* Initialize Ruby runtime support */
00654 static void
00655 SWIG_Ruby_InitRuntime(void)
00656 {
00657     VALUE pointer;
00658     
00659     if (_mSWIG == Qnil) {
00660         _mSWIG = rb_define_module("SWIG");
00661     }
00662     
00663     /* first check if pointer already created */
00664     pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
00665     if (pointer != Qnil) {
00666       Data_Get_Struct(pointer, swig_type_info *, swig_type_list_handle);
00667     } else {
00668       /* register a new class */
00669       VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
00670       /* create and store the structure pointer to a global variable */
00671       swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, swig_type_list_handle);
00672       rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
00673     }
00674 }
00675 
00676 /* Define Ruby class for C type */
00677 static void
00678 SWIG_Ruby_define_class(swig_type_info *type)
00679 {
00680     VALUE klass;
00681     char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
00682     sprintf(klass_name, "TYPE%s", type->name);
00683     if (NIL_P(_cSWIG_Pointer)) {
00684     _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
00685     rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
00686     }
00687     klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
00688     free((void *) klass_name);
00689 }
00690 
00691 /* Create a new pointer object */
00692 static VALUE
00693 SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int own)
00694 {
00695     char *klass_name;
00696     swig_class *sklass;
00697     VALUE klass;
00698     VALUE obj;
00699     
00700     if (!ptr)
00701     return Qnil;
00702     
00703     if (type->clientdata) {
00704       sklass = (swig_class *) type->clientdata;
00705       obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), (own ? VOIDFUNC(sklass->destroy) : 0), ptr);
00706     } else {
00707       klass_name = (char *) malloc(4 + strlen(type->name) + 1);
00708       sprintf(klass_name, "TYPE%s", type->name);
00709       klass = rb_const_get(_mSWIG, rb_intern(klass_name));
00710       free((void *) klass_name);
00711       obj = Data_Wrap_Struct(klass, 0, 0, ptr);
00712     }
00713     rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
00714     return obj;
00715 }
00716 
00717 /* Create a new class instance (always owned) */
00718 static VALUE
00719 SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
00720 {
00721     VALUE obj;
00722     swig_class *sklass = (swig_class *) type->clientdata;
00723     obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
00724     rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
00725     return obj;
00726 }
00727 
00728 /* Get type mangle from class name */
00729 static SWIGINLINE char *
00730 SWIG_Ruby_MangleStr(VALUE obj)
00731 {
00732   VALUE stype = rb_iv_get(obj, "__swigtype__");
00733   return StringValuePtr(stype);
00734 }
00735 
00736 /* Convert a pointer value */
00737 static int
00738 SWIG_Ruby_ConvertPtr(VALUE obj, void **ptr, swig_type_info *ty, int flags)
00739 {
00740   char *c;
00741   swig_type_info *tc;
00742 
00743   /* Grab the pointer */
00744   if (NIL_P(obj)) {
00745     *ptr = 0;
00746     return 0;
00747   } else {
00748     Data_Get_Struct(obj, void, *ptr);
00749   }
00750   
00751   /* Do type-checking if type info was provided */
00752   if (ty) {
00753     if (ty->clientdata) {
00754         if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) {
00755           if (*ptr == 0)
00756             rb_raise(rb_eRuntimeError, "This %s already released", ty->str);
00757           return 0;
00758         }
00759     }
00760     if ((c = SWIG_MangleStr(obj)) == NULL) {
00761       if (flags & SWIG_POINTER_EXCEPTION)
00762         rb_raise(rb_eTypeError, "Expected %s", ty->str);
00763       else
00764         return -1;
00765     }
00766     tc = SWIG_TypeCheck(c, ty);
00767     if (!tc) {
00768       if (flags & SWIG_POINTER_EXCEPTION)
00769         rb_raise(rb_eTypeError, "Expected %s", ty->str);
00770       else
00771         return -1;
00772     }
00773     *ptr = SWIG_TypeCast(tc, *ptr);
00774   }
00775   return 0;
00776 }
00777 
00778 /* Convert a pointer value, signal an exception on a type mismatch */
00779 static SWIGINLINE void *
00780 SWIG_Ruby_MustGetPtr(VALUE obj, swig_type_info *ty, int argnum, int flags)
00781 {
00782   void *result;
00783   SWIG_ConvertPtr(obj, &result, ty, flags | SWIG_POINTER_EXCEPTION);
00784   return result;
00785 }
00786 
00787 /* Check convert */
00788 static SWIGINLINE int
00789 SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
00790 {
00791   char *c = SWIG_MangleStr(obj);
00792   if (!c)
00793     return 0;
00794   return SWIG_TypeCheck(c,ty) != 0;
00795 }
00796 
00797 static VALUE
00798 SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
00799   char result[1024];
00800   char *r = result;
00801   if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
00802   *(r++) = '_';
00803   r = SWIG_PackData(r, ptr, sz);
00804   strcpy(r, type->name);
00805   return rb_str_new2(result);
00806 }
00807 
00808 /* Convert a packed value value */
00809 static void
00810 SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty, int flags) {
00811   swig_type_info *tc;
00812   const char  *c;
00813 
00814   if (TYPE(obj) != T_STRING) goto type_error;
00815   c = StringValuePtr(obj);
00816   /* Pointer values must start with leading underscore */
00817   if (*c != '_') goto type_error;
00818   c++;
00819   c = SWIG_UnpackData(c, ptr, sz);
00820   if (ty) {
00821     tc = SWIG_TypeCheck(c, ty);
00822     if (!tc) goto type_error;
00823   }
00824   return;
00825 
00826 type_error:
00827 
00828   if (flags) {
00829     if (ty) {
00830       rb_raise(rb_eTypeError, "Type error. Expected %s", ty->name);
00831     } else {
00832       rb_raise(rb_eTypeError, "Expected a pointer");
00833     }
00834   }
00835 }
00836 
00837 #ifdef __cplusplus
00838 }
00839 #endif
00840 
00841 
00842 
00843 /* -------- TYPES TABLE (BEGIN) -------- */
00844 
00845 #define  SWIGTYPE_p_estraier__Condition swig_types[0] 
00846 #define  SWIGTYPE_p_ESTCOND swig_types[1] 
00847 #define  SWIGTYPE_p_estraier__Database swig_types[2] 
00848 #define  SWIGTYPE_p_unsigned_long swig_types[3] 
00849 #define  SWIGTYPE_p_ESTDOC swig_types[4] 
00850 #define  SWIGTYPE_p_std__vectorTstd__string_t swig_types[5] 
00851 #define  SWIGTYPE_p_std__mapTstd__string_std__string_t swig_types[6] 
00852 #define  SWIGTYPE_p_std__vectorTint_t swig_types[7] 
00853 #define  SWIGTYPE_p_estraier__Document swig_types[8] 
00854 static swig_type_info *swig_types[10];
00855 
00856 /* -------- TYPES TABLE (END) -------- */
00857 
00858 #define SWIG_init    Init_HyperEstraier
00859 #define SWIG_name    "HyperEstraier"
00860 
00861 static VALUE mHyperEstraier;
00862 
00863 static void SWIG_AsVal(VALUE obj, int *val)
00864 {
00865     *val = (int) NUM2INT(obj);
00866 }
00867 
00868 
00869 #define  SWIG_MemoryError    1
00870 #define  SWIG_IOError        2
00871 #define  SWIG_RuntimeError   3
00872 #define  SWIG_IndexError     4
00873 #define  SWIG_TypeError      5
00874 #define  SWIG_DivisionByZero 6
00875 #define  SWIG_OverflowError  7
00876 #define  SWIG_SyntaxError    8
00877 #define  SWIG_ValueError     9
00878 #define  SWIG_SystemError   10
00879 #define  SWIG_UnknownError  99
00880 
00881 
00882 static void SWIG_exception_(int code, const char *msg) {
00883     switch (code) {
00884         case SWIG_MemoryError:
00885             rb_raise(rb_eNoMemError, msg);
00886             break;
00887         case SWIG_IOError:
00888             rb_raise(rb_eIOError, msg);
00889             break;
00890         case SWIG_RuntimeError:
00891             rb_raise(rb_eRuntimeError, msg);
00892             break;
00893         case SWIG_IndexError:
00894             rb_raise(rb_eIndexError, msg);
00895             break;
00896         case SWIG_TypeError:
00897             rb_raise(rb_eTypeError, msg);
00898             break;
00899         case SWIG_DivisionByZero:
00900             rb_raise(rb_eZeroDivError, msg);
00901             break;
00902         case SWIG_OverflowError:
00903             rb_raise(rb_eRangeError, msg);
00904             break;
00905         case SWIG_SyntaxError:
00906             rb_raise(rb_eSyntaxError, msg);
00907             break;
00908         case SWIG_ValueError:
00909             rb_raise(rb_eArgError, msg);
00910             break;
00911         case SWIG_SystemError:
00912             rb_raise(rb_eFatal, msg);
00913             break;
00914         case SWIG_UnknownError:
00915             rb_raise(rb_eRuntimeError, msg);
00916             break;
00917         default:
00918             break;
00919     }
00920 }
00921 
00922 #define SWIG_exception(a, b) SWIG_exception_((a), (b))
00923 
00924 
00925 #include <stdexcept>
00926 
00927 
00928 #include <string>
00929 
00930 #define SWIG_FLOAT_P(x) ((TYPE(x) == T_FLOAT) || FIXNUM_P(x))
00931 
00932 bool SWIG_BOOL_P(VALUE) {
00933     // dummy test, RTEST should take care of everything
00934     return true;
00935 }
00936 bool SWIG_RB2BOOL(VALUE x) {
00937     return RTEST(x);
00938 }
00939 VALUE SWIG_BOOL2RB(bool b) {
00940     return b ? Qtrue : Qfalse;
00941 }
00942 double SWIG_NUM2DBL(VALUE x) {
00943     return (FIXNUM_P(x) ? FIX2INT(x) : NUM2DBL(x));
00944 }
00945 bool SWIG_STRING_P(VALUE x) {
00946     return TYPE(x) == T_STRING;
00947 }
00948 std::string SWIG_RB2STR(VALUE x) {
00949     return std::string(StringValuePtr(x));
00950 }
00951 VALUE SWIG_STR2RB(const std::string& s) {
00952     return rb_str_new2(s.c_str());
00953 }
00954 
00955 
00956 #include <string>
00957 
00958 
00959 #include <vector>
00960 #include <algorithm>
00961 #include <stdexcept>
00962 
00963 
00964 #include <map>
00965 #include <algorithm>
00966 #include <stdexcept>
00967 
00968 
00969 #include <utility>
00970 
00971 static std::string std_vector_Sl_std_string_Sg__pop(std::vector<std::string > *self){
00972                 if (self->size() == 0)
00973                     throw std::out_of_range("pop from empty vector");
00974                 std::string x = self->back();
00975                 self->pop_back();
00976                 return x;
00977             }
00978 static std::string std_vector_Sl_std_string_Sg____getitem__(std::vector<std::string > *self,int i){
00979                 int size = int(self->size());
00980                 if (i<0) i += size;
00981                 if (i>=0 && i<size)
00982                     return (*self)[i];
00983                 else
00984                     throw std::out_of_range("vector index out of range");
00985             }
00986 static void std_vector_Sl_std_string_Sg____setitem__(std::vector<std::string > *self,int i,std::string x){
00987                 int size = int(self->size());
00988                 if (i<0) i+= size;
00989                 if (i>=0 && i<size)
00990                     (*self)[i] = x;
00991                 else
00992                     throw std::out_of_range("vector index out of range");
00993             }
00994 static void std_vector_Sl_std_string_Sg__each(std::vector<std::string > *self){
00995                 for (unsigned int i=0; i<self->size(); i++)
00996                     rb_yield(SWIG_STR2RB((*self)[i]));
00997             }
00998 
00999 swig_class cStrVector;
01000 static void free_std_vector_Sl_std_string_Sg_(std::vector<std::string > *);
01001 static int std_vector_Sl_int_Sg__pop(std::vector<int > *self){
01002                 if (self->size() == 0)
01003                     throw std::out_of_range("pop from empty vector");
01004                 int x = self->back();
01005                 self->pop_back();
01006                 return x;
01007             }
01008 static int std_vector_Sl_int_Sg____getitem__(std::vector<int > *self,int i){
01009                 int size = int(self->size());
01010                 if (i<0) i += size;
01011                 if (i>=0 && i<size)
01012                     return (*self)[i];
01013                 else
01014                     throw std::out_of_range("vector index out of range");
01015             }
01016 static void std_vector_Sl_int_Sg____setitem__(std::vector<int > *self,int i,int x){
01017                 int size = int(self->size());
01018                 if (i<0) i+= size;
01019                 if (i>=0 && i<size)
01020                     (*self)[i] = x;
01021                 else
01022                     throw std::out_of_range("vector index out of range");
01023             }
01024 static void std_vector_Sl_int_Sg__each(std::vector<int > *self){
01025                 for (unsigned int i=0; i<self->size(); i++)
01026                     rb_yield(INT2NUM((*self)[i]));
01027             }
01028 
01029 swig_class cIntVector;
01030 static void free_std_vector_Sl_int_Sg_(std::vector<int > *);
01031 static std::string std_map_Sl_std_string_Sc_std_string_Sg____getitem__(std::map<std::string,std::string > *self,std::string key){
01032                 std::map<std::string,std::string >::iterator i = self->find(key);
01033                 if (i != self->end())
01034                     return i->second;
01035                 else
01036                     throw std::out_of_range("key not found");
01037             }
01038 static void std_map_Sl_std_string_Sc_std_string_Sg____setitem__(std::map<std::string,std::string > *self,std::string key,std::string x){
01039                 (*self)[key] = x;
01040             }
01041 static std::string std_map_Sl_std_string_Sc_std_string_Sg____delitem__(std::map<std::string,std::string > *self,std::string key){
01042                 std::map<std::string,std::string >::iterator i = self->find(key);
01043                 if (i != self->end()) {
01044                     std::string x = i->second;
01045                     self->erase(i);
01046                     return x;
01047                 } else
01048                     throw std::out_of_range("key not found");
01049             }
01050 static bool std_map_Sl_std_string_Sc_std_string_Sg__has_key(std::map<std::string,std::string > *self,std::string key){
01051                 std::map<std::string,std::string >::iterator i = self->find(key);
01052                 return i != self->end();
01053             }
01054 static VALUE std_map_Sl_std_string_Sc_std_string_Sg__keys(std::map<std::string,std::string > *self){
01055                 VALUE keyList = rb_ary_new2(self->size());
01056                 std::map<std::string,std::string >::iterator i;
01057                 unsigned int j;
01058                 for (i=self->begin(), j=0; i!=self->end(); ++i, ++j) {
01059                     rb_ary_store(keyList,j,
01060                                  SWIG_STR2RB(i->first));
01061                 }
01062                 return keyList;
01063             }
01064 static VALUE std_map_Sl_std_string_Sc_std_string_Sg__values(std::map<std::string,std::string > *self){
01065                 VALUE valueList = rb_ary_new2(self->size());
01066                 std::map<std::string,std::string >::iterator i;
01067                 unsigned int j;
01068                 for (i=self->begin(), j=0; i!=self->end(); ++i, ++j) {
01069                     rb_ary_store(valueList,j,
01070                                  SWIG_STR2RB(i->second));
01071                 }
01072                 return valueList;
01073             }
01074 static void std_map_Sl_std_string_Sc_std_string_Sg__each(std::map<std::string,std::string > *self){
01075                 std::map<std::string,std::string >::iterator i;
01076                 for (i=self->begin(); i!=self->end(); ++i) {
01077                     VALUE entry = rb_ary_new2(2);
01078                     rb_ary_store(entry,0,SWIG_STR2RB(i->first));
01079                     rb_ary_store(entry,1,SWIG_STR2RB(i->second));
01080                     rb_yield(entry);
01081                 }
01082             }
01083 
01084 swig_class cStrStrMap;
01085 static void free_std_map_Sl_std_string_Sc_std_string_Sg_(std::map<std::string,std::string > *);
01086 
01087 #include "HyperEstraierWrapper.cpp"
01088 
01089 
01090 swig_class cCondition;
01091 static void free_estraier_Condition(estraier::Condition *);
01092 
01093 swig_class cDocument;
01094 static void free_estraier_Document(estraier::Document *);
01095 
01096 swig_class cDatabase;
01097 static void free_estraier_Database(estraier::Database *);
01098 static VALUE
01099 _wrap_new_StrVector__SWIG_0(int argc, VALUE *argv, VALUE self) {
01100     unsigned int arg1 ;
01101     std::vector<std::string > *result;
01102     
01103     if ((argc < 1) || (argc > 1))
01104     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
01105     arg1 = NUM2UINT(argv[0]);
01106     {
01107         try {
01108             result = (std::vector<std::string > *)new std::vector<std::string >(arg1);
01109             DATA_PTR(self) = result;
01110         } catch (const char *msg) {
01111             SWIG_exception(SWIG_RuntimeError, msg);
01112         }
01113     }
01114     return self;
01115 }
01116 
01117 
01118 static VALUE
01119 _wrap_new_StrVector__SWIG_1(int argc, VALUE *argv, VALUE self) {
01120     std::vector<std::string > *result;
01121     
01122     if ((argc < 0) || (argc > 0))
01123     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
01124     {
01125         try {
01126             result = (std::vector<std::string > *)new std::vector<std::string >();
01127             DATA_PTR(self) = result;
01128         } catch (const char *msg) {
01129             SWIG_exception(SWIG_RuntimeError, msg);
01130         }
01131     }
01132     return self;
01133 }
01134 
01135 
01136 static VALUE
01137 _wrap_new_StrVector__SWIG_2(int argc, VALUE *argv, VALUE self) {
01138     unsigned int arg1 ;
01139     std::string *arg2 = 0 ;
01140     std::vector<std::string > *result;
01141     std::string temp2 ;
01142     
01143     if ((argc < 2) || (argc > 2))
01144     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
01145     arg1 = NUM2UINT(argv[0]);
01146     {
01147         if (TYPE(argv[1]) == T_STRING) {
01148             temp2 = std::string(StringValuePtr(argv[1]));
01149             arg2 = &temp2;
01150         } else {
01151             SWIG_exception(SWIG_TypeError, "not a string");
01152         }
01153     }
01154     {
01155         try {
01156             result = (std::vector<std::string > *)new std::vector<std::string >(arg1,(std::string const &)*arg2);
01157             DATA_PTR(self) = result;
01158         } catch (const char *msg) {
01159             SWIG_exception(SWIG_RuntimeError, msg);
01160         }
01161     }
01162     return self;
01163 }
01164 
01165 
01166 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
01167 static VALUE
01168 _wrap_StrVector_allocate(VALUE self) {
01169 #else
01170     static VALUE
01171     _wrap_StrVector_allocate(int argc, VALUE *argv, VALUE self) {
01172 #endif
01173         
01174         
01175         VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_std__vectorTstd__string_t);
01176 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
01177         rb_obj_call_init(vresult, argc, argv);
01178 #endif
01179         return vresult;
01180     }
01181     
01182 
01183 static VALUE
01184 _wrap_new_StrVector__SWIG_3(int argc, VALUE *argv, VALUE self) {
01185     std::vector<std::string > *arg1 = 0 ;
01186     std::vector<std::string > *result;
01187     std::vector<std::string > temp1 ;
01188     
01189     if ((argc < 1) || (argc > 1))
01190     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
01191     {
01192         if (rb_obj_is_kind_of(argv[0],rb_cArray)) {
01193             unsigned int size = RARRAY(argv[0])->len;
01194             temp1 = std::vector<std::string >(size);
01195             arg1 = &temp1;
01196             for (unsigned int i=0; i<size; i++) {
01197                 VALUE o = RARRAY(argv[0])->ptr[i];
01198                 if (SWIG_STRING_P(o))
01199                 temp1[i] = (std::string)(SWIG_RB2STR(o));
01200                 else
01201                 rb_raise(rb_eTypeError,
01202                 "wrong argument type"
01203                 " (expected vector<""std::string" ">)");
01204             }
01205         } else {
01206             SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_std__vectorTstd__string_t, 1);
01207         }
01208     }
01209     {
01210         try {
01211             result = (std::vector<std::string > *)new std::vector<std::string >((std::vector<std::string > const &)*arg1);
01212             DATA_PTR(self) = result;
01213         } catch (const char *msg) {
01214             SWIG_exception(SWIG_RuntimeError, msg);
01215         }
01216     }
01217     return self;
01218 }
01219 
01220 
01221 static VALUE _wrap_new_StrVector(int nargs, VALUE *args, VALUE self) {
01222     int argc;
01223     VALUE argv[2];
01224     int ii;
01225     
01226     argc = nargs;
01227     for (ii = 0; (ii < argc) && (ii < 2); ii++) {
01228         argv[ii] = args[ii];
01229     }
01230     if (argc == 0) {
01231         return _wrap_new_StrVector__SWIG_1(nargs, args, self);
01232     }
01233     if (argc == 1) {
01234         int _v;
01235         {
01236             _v = ((TYPE(argv[0]) == T_FIXNUM) || (TYPE(argv[0]) == T_BIGNUM)) ? 1 : 0;
01237         }
01238         if (_v) {
01239             return _wrap_new_StrVector__SWIG_0(nargs, args, self);
01240         }
01241     }
01242     if (argc == 1) {
01243         int _v;
01244         {
01245             /* native sequence? */
01246             if (rb_obj_is_kind_of(argv[0],rb_cArray)) {
01247                 unsigned int size = RARRAY(argv[0])->len;
01248                 if (size == 0) {
01249                     /* an empty sequence can be of any type */
01250                     _v = 1;
01251                 } else {
01252                     /* check the first element only */
01253                     VALUE o = RARRAY(argv[0])->ptr[0];
01254                     if (SWIG_STRING_P(o))
01255                     _v = 1;
01256                     else
01257                     _v = 0;
01258                 }
01259             } else {
01260                 /* wrapped vector? */
01261                 std::vector<std::string >* v;
01262                 if (SWIG_ConvertPtr(argv[0],(void **) &v, 
01263                 SWIGTYPE_p_std__vectorTstd__string_t,0) != -1)
01264                 _v = 1;
01265                 else
01266                 _v = 0;
01267             }
01268         }
01269         if (_v) {
01270             return _wrap_new_StrVector__SWIG_3(nargs, args, self);
01271         }
01272     }
01273     if (argc == 2) {
01274         int _v;
01275         {
01276             _v = ((TYPE(argv[0]) == T_FIXNUM) || (TYPE(argv[0]) == T_BIGNUM)) ? 1 : 0;
01277         }
01278         if (_v) {
01279             {
01280                 _v = (TYPE(argv[1]) == T_STRING) ? 1 : 0;
01281             }
01282             if (_v) {
01283                 return _wrap_new_StrVector__SWIG_2(nargs, args, self);
01284             }
01285         }
01286     }
01287     
01288     rb_raise(rb_eArgError, "No matching function for overloaded 'new_StrVector'");
01289     return Qnil;
01290 }
01291 
01292 
01293 static VALUE
01294 _wrap_StrVector___len__(int argc, VALUE *argv, VALUE self) {
01295     std::vector<std::string > *arg1 = (std::vector<std::string > *) 0 ;
01296     unsigned int result;
01297     std::vector<std::string > temp1 ;
01298     VALUE vresult = Qnil;
01299     
01300     if ((argc < 0) || (argc > 0))
01301     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
01302     {
01303         if (rb_obj_is_kind_of(self,rb_cArray)) {
01304             unsigned int size = RARRAY(self)->len;
01305             temp1 = std::vector<std::string >(size);
01306             arg1 = &temp1;
01307             for (unsigned int i=0; i<size; i++) {
01308                 VALUE o = RARRAY(self)->ptr[i];
01309                 if (SWIG_STRING_P(o))
01310                 temp1[i] = (std::string)(SWIG_RB2STR(o));
01311                 else
01312                 rb_raise(rb_eTypeError,
01313                 "wrong argument type"
01314                 " (expected vector<""std::string" ">)");
01315             }
01316         } else {
01317             SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__vectorTstd__string_t, 1);
01318         }
01319     }
01320     {
01321         try {
01322             result = (unsigned int)((std::vector<std::string > const *)arg1)->size();
01323             
01324         } catch (const char *msg) {
01325             SWIG_exception(SWIG_RuntimeError, msg);
01326         }
01327     }
01328     vresult = UINT2NUM(result);
01329     return vresult;
01330 }
01331 
01332 
01333 static VALUE
01334 _wrap_StrVector_emptyq___(int argc, VALUE *argv, VALUE self) {
01335     std::vector<std::string > *arg1 = (std::vector<std::string > *) 0 ;
01336     bool result;
01337     std::vector<std::string > temp1 ;
01338     VALUE vresult = Qnil;
01339     
01340     if ((argc < 0) || (argc > 0))
01341     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
01342     {
01343         if (rb_obj_is_kind_of(self,rb_cArray)) {
01344             unsigned int size = RARRAY(self)->len;
01345             temp1 = std::vector<std::string >(size);
01346             arg1 = &temp1;
01347             for (unsigned int i=0; i<size; i++) {
01348                 VALUE o = RARRAY(self)->ptr[i];
01349                 if (SWIG_STRING_P(o))
01350                 temp1[i] = (std::string)(SWIG_RB2STR(o));
01351                 else
01352                 rb_raise(rb_eTypeError,
01353                 "wrong argument type"
01354                 " (expected vector<""std::string" ">)");
01355             }
01356         } else {
01357             SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__vectorTstd__string_t, 1);
01358         }
01359     }
01360     {
01361         try {
01362             result = (bool)((std::vector<std::string > const *)arg1)->empty();
01363             
01364         } catch (const char *msg) {
01365             SWIG_exception(SWIG_RuntimeError, msg);
01366         }
01367     }
01368     vresult = result ? Qtrue : Qfalse;
01369     return vresult;
01370 }
01371 
01372 
01373 static VALUE
01374 _wrap_StrVector_clear(int argc, VALUE *argv, VALUE self) {
01375     std::vector<std::string > *arg1 = (std::vector<std::string > *) 0 ;
01376     
01377     if ((argc < 0) || (argc > 0))
01378     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
01379     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__vectorTstd__string_t, 1);
01380     {
01381         try {
01382             (arg1)->clear();
01383             
01384         } catch (const char *msg) {
01385             SWIG_exception(SWIG_RuntimeError, msg);
01386         }
01387     }
01388     return Qnil;
01389 }
01390 
01391 
01392 static VALUE
01393 _wrap_StrVector_push(int argc, VALUE *argv, VALUE self) {
01394     std::vector<std::string > *arg1 = (std::vector<std::string > *) 0 ;
01395     std::string arg2 ;
01396     
01397     if ((argc < 1) || (argc > 1))
01398     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
01399     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__vectorTstd__string_t, 1);
01400     {
01401         if (TYPE(argv[0]) == T_STRING) {
01402             arg2 = std::string(StringValuePtr(argv[0]));
01403         } else {
01404             SWIG_exception(SWIG_TypeError, "not a string");
01405         }
01406     }
01407     {
01408         try {
01409             (arg1)->push_back(arg2);
01410             
01411         } catch (const char *msg) {
01412             SWIG_exception(SWIG_RuntimeError, msg);
01413         }
01414     }
01415     return Qnil;
01416 }
01417 
01418 
01419 static VALUE
01420 _wrap_StrVector_pop(int argc, VALUE *argv, VALUE self) {
01421     std::vector<std::string > *arg1 = (std::vector<std::string > *) 0 ;
01422     std::string result;
01423     VALUE vresult = Qnil;
01424     
01425     if ((argc < 0) || (argc > 0))
01426     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
01427     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__vectorTstd__string_t, 1);
01428     {
01429         try {
01430             result = std_vector_Sl_std_string_Sg__pop(arg1);
01431             
01432         } catch (std::out_of_range& e) {
01433             SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
01434         }
01435     }
01436     {
01437         vresult = rb_str_new2((&result)->c_str());
01438     }
01439     return vresult;
01440 }
01441 
01442 
01443 static VALUE
01444 _wrap_StrVector___getitem__(int argc, VALUE *argv, VALUE self) {
01445     std::vector<std::string > *arg1 = (std::vector<std::string > *) 0 ;
01446     int arg2 ;
01447     std::string result;
01448     VALUE vresult = Qnil;
01449     
01450     if ((argc < 1) || (argc > 1))
01451     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
01452     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__vectorTstd__string_t, 1);
01453     arg2 = NUM2INT(argv[0]);
01454     {
01455         try {
01456             result = std_vector_Sl_std_string_Sg____getitem__(arg1,arg2);
01457             
01458         } catch (std::out_of_range& e) {
01459             SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
01460         }
01461     }
01462     {
01463         vresult = rb_str_new2((&result)->c_str());
01464     }
01465     return vresult;
01466 }
01467 
01468 
01469 static VALUE
01470 _wrap_StrVector___setitem__(int argc, VALUE *argv, VALUE self) {
01471     std::vector<std::string > *arg1 = (std::vector<std::string > *) 0 ;
01472     int arg2 ;
01473     std::string arg3 ;
01474     
01475     if ((argc < 2) || (argc > 2))
01476     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
01477     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__vectorTstd__string_t, 1);
01478     arg2 = NUM2INT(argv[0]);
01479     {
01480         if (TYPE(argv[1]) == T_STRING) {
01481             arg3 = std::string(StringValuePtr(argv[1]));
01482         } else {
01483             SWIG_exception(SWIG_TypeError, "not a string");
01484         }
01485     }
01486     {
01487         try {
01488             std_vector_Sl_std_string_Sg____setitem__(arg1,arg2,arg3);
01489             
01490         } catch (std::out_of_range& e) {
01491             SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
01492         }
01493     }
01494     return Qnil;
01495 }
01496 
01497 
01498 static VALUE
01499 _wrap_StrVector_each(int argc, VALUE *argv, VALUE self) {
01500     std::vector<std::string > *arg1 = (std::vector<std::string > *) 0 ;
01501     
01502     if ((argc < 0) || (argc > 0))
01503     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
01504     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__vectorTstd__string_t, 1);
01505     {
01506         try {
01507             std_vector_Sl_std_string_Sg__each(arg1);
01508             
01509         } catch (const char *msg) {
01510             SWIG_exception(SWIG_RuntimeError, msg);
01511         }
01512     }
01513     return Qnil;
01514 }
01515 
01516 
01517 static void
01518 free_std_vector_Sl_std_string_Sg_(std::vector<std::string > *arg1) {
01519     delete arg1;
01520 }
01521 static VALUE
01522 _wrap_new_IntVector__SWIG_0(int argc, VALUE *argv, VALUE self) {
01523     unsigned int arg1 ;
01524     std::vector<int > *result;
01525     
01526     if ((argc < 1) || (argc > 1))
01527     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
01528     arg1 = NUM2UINT(argv[0]);
01529     {
01530         try {
01531             result = (std::vector<int > *)new std::vector<int >(arg1);
01532             DATA_PTR(self) = result;
01533         } catch (const char *msg) {
01534             SWIG_exception(SWIG_RuntimeError, msg);
01535         }
01536     }
01537     return self;
01538 }
01539 
01540 
01541 static VALUE
01542 _wrap_new_IntVector__SWIG_1(int argc, VALUE *argv, VALUE self) {
01543     std::vector<int > *result;
01544     
01545     if ((argc < 0) || (argc > 0))
01546     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
01547     {
01548         try {
01549             result = (std::vector<int > *)new std::vector<int >();
01550             DATA_PTR(self) = result;
01551         } catch (const char *msg) {
01552             SWIG_exception(SWIG_RuntimeError, msg);
01553         }
01554     }
01555     return self;
01556 }
01557 
01558 
01559 static VALUE
01560 _wrap_new_IntVector__SWIG_2(int argc, VALUE *argv, VALUE self) {
01561     unsigned int arg1 ;
01562     int *arg2 = 0 ;
01563     std::vector<int > *result;
01564     int temp2 ;
01565     
01566     if ((argc < 2) || (argc > 2))
01567     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
01568     arg1 = NUM2UINT(argv[0]);
01569     temp2 = (int) NUM2INT(argv[1]);
01570     arg2 = &temp2;
01571     {
01572         try {
01573             result = (std::vector<int > *)new std::vector<int >(arg1,(int const &)*arg2);
01574             DATA_PTR(self) = result;
01575         } catch (const char *msg) {
01576             SWIG_exception(SWIG_RuntimeError, msg);
01577         }
01578     }
01579     return self;
01580 }
01581 
01582 
01583 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
01584 static VALUE
01585 _wrap_IntVector_allocate(VALUE self) {
01586 #else
01587     static VALUE
01588     _wrap_IntVector_allocate(int argc, VALUE *argv, VALUE self) {
01589 #endif
01590         
01591         
01592         VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_std__vectorTint_t);
01593 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
01594         rb_obj_call_init(vresult, argc, argv);
01595 #endif
01596         return vresult;
01597     }
01598     
01599 
01600 static VALUE
01601 _wrap_new_IntVector__SWIG_3(int argc, VALUE *argv, VALUE self) {
01602     std::vector<int > *arg1 = 0 ;
01603     std::vector<int > *result;
01604     std::vector<int > temp1 ;
01605     
01606     if ((argc < 1) || (argc > 1))
01607     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
01608     {
01609         if (rb_obj_is_kind_of(argv[0],rb_cArray)) {
01610             unsigned int size = RARRAY(argv[0])->len;
01611             temp1 = std::vector<int >(size);
01612             arg1 = &temp1;
01613             for (unsigned int i=0; i<size; i++) {
01614                 VALUE o = RARRAY(argv[0])->ptr[i];
01615                 if (FIXNUM_P(o))
01616                 temp1[i] = (int)(FIX2INT(o));
01617                 else
01618                 rb_raise(rb_eTypeError,
01619                 "wrong argument type"
01620                 " (expected vector<""int" ">)");
01621             }
01622         } else {
01623             SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_std__vectorTint_t, 1);
01624         }
01625     }
01626     {
01627         try {
01628             result = (std::vector<int > *)new std::vector<int >((std::vector<int > const &)*arg1);
01629             DATA_PTR(self) = result;
01630         } catch (const char *msg) {
01631             SWIG_exception(SWIG_RuntimeError, msg);
01632         }
01633     }
01634     return self;
01635 }
01636 
01637 
01638 static VALUE _wrap_new_IntVector(int nargs, VALUE *args, VALUE self) {
01639     int argc;
01640     VALUE argv[2];
01641     int ii;
01642     
01643     argc = nargs;
01644     for (ii = 0; (ii < argc) && (ii < 2); ii++) {
01645         argv[ii] = args[ii];
01646     }
01647     if (argc == 0) {
01648         return _wrap_new_IntVector__SWIG_1(nargs, args, self);
01649     }
01650     if (argc == 1) {
01651         int _v;
01652         {
01653             _v = ((TYPE(argv[0]) == T_FIXNUM) || (TYPE(argv[0]) == T_BIGNUM)) ? 1 : 0;
01654         }
01655         if (_v) {
01656             return _wrap_new_IntVector__SWIG_0(nargs, args, self);
01657         }
01658     }
01659     if (argc == 1) {
01660         int _v;
01661         {
01662             /* native sequence? */
01663             if (rb_obj_is_kind_of(argv[0],rb_cArray)) {
01664                 unsigned int size = RARRAY(argv[0])->len;
01665                 if (size == 0) {
01666                     /* an empty sequence can be of any type */
01667                     _v = 1;
01668                 } else {
01669                     /* check the first element only */
01670                     VALUE o = RARRAY(argv[0])->ptr[0];
01671                     if (FIXNUM_P(o))
01672                     _v = 1;
01673                     else
01674                     _v = 0;
01675                 }
01676             } else {
01677                 /* wrapped vector? */
01678                 std::vector<int >* v;
01679                 if (SWIG_ConvertPtr(argv[0],(void **) &v, 
01680                 SWIGTYPE_p_std__vectorTint_t,0) != -1)
01681                 _v = 1;
01682                 else
01683                 _v = 0;
01684             }
01685         }
01686         if (_v) {
01687             return _wrap_new_IntVector__SWIG_3(nargs, args, self);
01688         }
01689     }
01690     if (argc == 2) {
01691         int _v;
01692         {
01693             _v = ((TYPE(argv[0]) == T_FIXNUM) || (TYPE(argv[0]) == T_BIGNUM)) ? 1 : 0;
01694         }
01695         if (_v) {
01696             {
01697                 _v = ((TYPE(argv[1]) == T_FIXNUM) || (TYPE(argv[1]) == T_BIGNUM)) ? 1 : 0;
01698             }
01699             if (_v) {
01700                 return _wrap_new_IntVector__SWIG_2(nargs, args, self);
01701             }
01702         }
01703     }
01704     
01705     rb_raise(rb_eArgError, "No matching function for overloaded 'new_IntVector'");
01706     return Qnil;
01707 }
01708 
01709 
01710 static VALUE
01711 _wrap_IntVector___len__(int argc, VALUE *argv, VALUE self) {
01712     std::vector<int > *arg1 = (std::vector<int > *) 0 ;
01713     unsigned int result;
01714     std::vector<int > temp1 ;
01715     VALUE vresult = Qnil;
01716     
01717     if ((argc < 0) || (argc > 0))
01718     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
01719     {
01720         if (rb_obj_is_kind_of(self,rb_cArray)) {
01721             unsigned int size = RARRAY(self)->len;
01722             temp1 = std::vector<int >(size);
01723             arg1 = &temp1;
01724             for (unsigned int i=0; i<size; i++) {
01725                 VALUE o = RARRAY(self)->ptr[i];
01726                 if (FIXNUM_P(o))
01727                 temp1[i] = (int)(FIX2INT(o));
01728                 else
01729                 rb_raise(rb_eTypeError,
01730                 "wrong argument type"
01731                 " (expected vector<""int" ">)");
01732             }
01733         } else {
01734             SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__vectorTint_t, 1);
01735         }
01736     }
01737     {
01738         try {
01739             result = (unsigned int)((std::vector<int > const *)arg1)->size();
01740             
01741         } catch (const char *msg) {
01742             SWIG_exception(SWIG_RuntimeError, msg);
01743         }
01744     }
01745     vresult = UINT2NUM(result);
01746     return vresult;
01747 }
01748 
01749 
01750 static VALUE
01751 _wrap_IntVector_emptyq___(int argc, VALUE *argv, VALUE self) {
01752     std::vector<int > *arg1 = (std::vector<int > *) 0 ;
01753     bool result;
01754     std::vector<int > temp1 ;
01755     VALUE vresult = Qnil;
01756     
01757     if ((argc < 0) || (argc > 0))
01758     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
01759     {
01760         if (rb_obj_is_kind_of(self,rb_cArray)) {
01761             unsigned int size = RARRAY(self)->len;
01762             temp1 = std::vector<int >(size);
01763             arg1 = &temp1;
01764             for (unsigned int i=0; i<size; i++) {
01765                 VALUE o = RARRAY(self)->ptr[i];
01766                 if (FIXNUM_P(o))
01767                 temp1[i] = (int)(FIX2INT(o));
01768                 else
01769                 rb_raise(rb_eTypeError,
01770                 "wrong argument type"
01771                 " (expected vector<""int" ">)");
01772             }
01773         } else {
01774             SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__vectorTint_t, 1);
01775         }
01776     }
01777     {
01778         try {
01779             result = (bool)((std::vector<int > const *)arg1)->empty();
01780             
01781         } catch (const char *msg) {
01782             SWIG_exception(SWIG_RuntimeError, msg);
01783         }
01784     }
01785     vresult = result ? Qtrue : Qfalse;
01786     return vresult;
01787 }
01788 
01789 
01790 static VALUE
01791 _wrap_IntVector_clear(int argc, VALUE *argv, VALUE self) {
01792     std::vector<int > *arg1 = (std::vector<int > *) 0 ;
01793     
01794     if ((argc < 0) || (argc > 0))
01795     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
01796     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__vectorTint_t, 1);
01797     {
01798         try {
01799             (arg1)->clear();
01800             
01801         } catch (const char *msg) {
01802             SWIG_exception(SWIG_RuntimeError, msg);
01803         }
01804     }
01805     return Qnil;
01806 }
01807 
01808 
01809 static VALUE
01810 _wrap_IntVector_push(int argc, VALUE *argv, VALUE self) {
01811     std::vector<int > *arg1 = (std::vector<int > *) 0 ;
01812     int arg2 ;
01813     
01814     if ((argc < 1) || (argc > 1))
01815     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
01816     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__vectorTint_t, 1);
01817     arg2 = NUM2INT(argv[0]);
01818     {
01819         try {
01820             (arg1)->push_back(arg2);
01821             
01822         } catch (const char *msg) {
01823             SWIG_exception(SWIG_RuntimeError, msg);
01824         }
01825     }
01826     return Qnil;
01827 }
01828 
01829 
01830 static VALUE
01831 _wrap_IntVector_pop(int argc, VALUE *argv, VALUE self) {
01832     std::vector<int > *arg1 = (std::vector<int > *) 0 ;
01833     int result;
01834     VALUE vresult = Qnil;
01835     
01836     if ((argc < 0) || (argc > 0))
01837     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
01838     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__vectorTint_t, 1);
01839     {
01840         try {
01841             result = (int)std_vector_Sl_int_Sg__pop(arg1);
01842             
01843         } catch (std::out_of_range& e) {
01844             SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
01845         }
01846     }
01847     vresult = INT2NUM(result);
01848     return vresult;
01849 }
01850 
01851 
01852 static VALUE
01853 _wrap_IntVector___getitem__(int argc, VALUE *argv, VALUE self) {
01854     std::vector<int > *arg1 = (std::vector<int > *) 0 ;
01855     int arg2 ;
01856     int result;
01857     VALUE vresult = Qnil;
01858     
01859     if ((argc < 1) || (argc > 1))
01860     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
01861     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__vectorTint_t, 1);
01862     arg2 = NUM2INT(argv[0]);
01863     {
01864         try {
01865             result = (int)std_vector_Sl_int_Sg____getitem__(arg1,arg2);
01866             
01867         } catch (std::out_of_range& e) {
01868             SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
01869         }
01870     }
01871     vresult = INT2NUM(result);
01872     return vresult;
01873 }
01874 
01875 
01876 static VALUE
01877 _wrap_IntVector___setitem__(int argc, VALUE *argv, VALUE self) {
01878     std::vector<int > *arg1 = (std::vector<int > *) 0 ;
01879     int arg2 ;
01880     int arg3 ;
01881     
01882     if ((argc < 2) || (argc > 2))
01883     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
01884     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__vectorTint_t, 1);
01885     arg2 = NUM2INT(argv[0]);
01886     arg3 = NUM2INT(argv[1]);
01887     {
01888         try {
01889             std_vector_Sl_int_Sg____setitem__(arg1,arg2,arg3);
01890             
01891         } catch (std::out_of_range& e) {
01892             SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
01893         }
01894     }
01895     return Qnil;
01896 }
01897 
01898 
01899 static VALUE
01900 _wrap_IntVector_each(int argc, VALUE *argv, VALUE self) {
01901     std::vector<int > *arg1 = (std::vector<int > *) 0 ;
01902     
01903     if ((argc < 0) || (argc > 0))
01904     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
01905     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__vectorTint_t, 1);
01906     {
01907         try {
01908             std_vector_Sl_int_Sg__each(arg1);
01909             
01910         } catch (const char *msg) {
01911             SWIG_exception(SWIG_RuntimeError, msg);
01912         }
01913     }
01914     return Qnil;
01915 }
01916 
01917 
01918 static void
01919 free_std_vector_Sl_int_Sg_(std::vector<int > *arg1) {
01920     delete arg1;
01921 }
01922 static VALUE
01923 _wrap_new_StrStrMap__SWIG_0(int argc, VALUE *argv, VALUE self) {
01924     std::map<std::string,std::string > *result;
01925     
01926     if ((argc < 0) || (argc > 0))
01927     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
01928     {
01929         try {
01930             result = (std::map<std::string,std::string > *)new std::map<std::string,std::string >();
01931             DATA_PTR(self) = result;
01932         } catch (const char *msg) {
01933             SWIG_exception(SWIG_RuntimeError, msg);
01934         }
01935     }
01936     return self;
01937 }
01938 
01939 
01940 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
01941 static VALUE
01942 _wrap_StrStrMap_allocate(VALUE self) {
01943 #else
01944     static VALUE
01945     _wrap_StrStrMap_allocate(int argc, VALUE *argv, VALUE self) {
01946 #endif
01947         
01948         
01949         VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_std__mapTstd__string_std__string_t);
01950 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
01951         rb_obj_call_init(vresult, argc, argv);
01952 #endif
01953         return vresult;
01954     }
01955     
01956 
01957 static VALUE
01958 _wrap_new_StrStrMap__SWIG_1(int argc, VALUE *argv, VALUE self) {
01959     std::map<std::string,std::string > *arg1 = 0 ;
01960     std::map<std::string,std::string > *result;
01961     std::map<std::string,std::string > temp1 ;
01962     std::map<std::string,std::string > *m1 ;
01963     
01964     if ((argc < 1) || (argc > 1))
01965     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
01966     {
01967         if (rb_obj_is_kind_of(argv[0],rb_cHash)) {
01968             temp1 = std::map<std::string,std::string >();
01969             arg1 = &temp1;
01970             VALUE keys = rb_funcall(argv[0],rb_intern("keys"),0);
01971             unsigned int size = RARRAY(keys)->len;
01972             for (unsigned int i=0; i<size; i++) {
01973                 VALUE key = RARRAY(keys)->ptr[i];
01974                 VALUE val = rb_hash_aref(argv[0],key);
01975                 if (!(SWIG_STRING_P(key) && SWIG_STRING_P(val)))
01976                 rb_raise(rb_eTypeError,
01977                 "wrong argument type"
01978                 " (expected map<""std::string" ",""std::string" ">)");
01979                 temp1[SWIG_RB2STR(key)] = SWIG_RB2STR(val);
01980             }
01981         } else {
01982             SWIG_ConvertPtr(argv[0],(void **) &m1, SWIGTYPE_p_std__mapTstd__string_std__string_t,1);
01983             arg1 = m1;
01984         }
01985     }
01986     {
01987         try {
01988             result = (std::map<std::string,std::string > *)new std::map<std::string,std::string >((std::map<std::string,std::string > const &)*arg1);
01989             DATA_PTR(self) = result;
01990         } catch (const char *msg) {
01991             SWIG_exception(SWIG_RuntimeError, msg);
01992         }
01993     }
01994     return self;
01995 }
01996 
01997 
01998 static VALUE _wrap_new_StrStrMap(int nargs, VALUE *args, VALUE self) {
01999     int argc;
02000     VALUE argv[1];
02001     int ii;
02002     
02003     argc = nargs;
02004     for (ii = 0; (ii < argc) && (ii < 1); ii++) {
02005         argv[ii] = args[ii];
02006     }
02007     if (argc == 0) {
02008         return _wrap_new_StrStrMap__SWIG_0(nargs, args, self);
02009     }
02010     if (argc == 1) {
02011         int _v;
02012         {
02013             // native sequence?
02014             if (rb_obj_is_kind_of(argv[0],rb_cHash)) {
02015                 VALUE keys = rb_funcall(argv[0],rb_intern("keys"),0);
02016                 unsigned int size = RARRAY(keys)->len;
02017                 if (size == 0) {
02018                     // an empty dictionary can be of any type
02019                     _v = 1;
02020                 } else {
02021                     // check the first element only
02022                     VALUE key = RARRAY(keys)->ptr[0];
02023                     VALUE val = rb_hash_aref(argv[0],key);
02024                     if (SWIG_STRING_P(key) && SWIG_STRING_P(val))
02025                     _v = 1;
02026                     else
02027                     _v = 0;
02028                 }
02029             } else {
02030                 // wrapped map?
02031                 std::map<std::string,std::string >* m;
02032                 if (SWIG_ConvertPtr(argv[0],(void **) &m,
02033                 SWIGTYPE_p_std__mapTstd__string_std__string_t,0) != -1)
02034                 _v = 1;
02035                 else
02036                 _v = 0;
02037             }
02038         }
02039         if (_v) {
02040             return _wrap_new_StrStrMap__SWIG_1(nargs, args, self);
02041         }
02042     }
02043     
02044     rb_raise(rb_eArgError, "No matching function for overloaded 'new_StrStrMap'");
02045     return Qnil;
02046 }
02047 
02048 
02049 static VALUE
02050 _wrap_StrStrMap___len__(int argc, VALUE *argv, VALUE self) {
02051     std::map<std::string,std::string > *arg1 = (std::map<std::string,std::string > *) 0 ;
02052     unsigned int result;
02053     std::map<std::string,std::string > temp1 ;
02054     std::map<std::string,std::string > *m1 ;
02055     VALUE vresult = Qnil;
02056     
02057     if ((argc < 0) || (argc > 0))
02058     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
02059     {
02060         if (rb_obj_is_kind_of(self,rb_cHash)) {
02061             temp1 = std::map<std::string,std::string >();
02062             arg1 = &temp1;
02063             VALUE keys = rb_funcall(self,rb_intern("keys"),0);
02064             unsigned int size = RARRAY(keys)->len;
02065             for (unsigned int i=0; i<size; i++) {
02066                 VALUE key = RARRAY(keys)->ptr[i];
02067                 VALUE val = rb_hash_aref(self,key);
02068                 if (!(SWIG_STRING_P(key) && SWIG_STRING_P(val)))
02069                 rb_raise(rb_eTypeError,
02070                 "wrong argument type"
02071                 " (expected map<""std::string" ",""std::string" ">)");
02072                 temp1[SWIG_RB2STR(key)] = SWIG_RB2STR(val);
02073             }
02074         } else {
02075             SWIG_ConvertPtr(self,(void **) &m1, SWIGTYPE_p_std__mapTstd__string_std__string_t,1);
02076             arg1 = m1;
02077         }
02078     }
02079     {
02080         try {
02081             result = (unsigned int)((std::map<std::string,std::string > const *)arg1)->size();
02082             
02083         } catch (const char *msg) {
02084             SWIG_exception(SWIG_RuntimeError, msg);
02085         }
02086     }
02087     vresult = UINT2NUM(result);
02088     return vresult;
02089 }
02090 
02091 
02092 static VALUE
02093 _wrap_StrStrMap_emptyq___(int argc, VALUE *argv, VALUE self) {
02094     std::map<std::string,std::string > *arg1 = (std::map<std::string,std::string > *) 0 ;
02095     bool result;
02096     std::map<std::string,std::string > temp1 ;
02097     std::map<std::string,std::string > *m1 ;
02098     VALUE vresult = Qnil;
02099     
02100     if ((argc < 0) || (argc > 0))
02101     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
02102     {
02103         if (rb_obj_is_kind_of(self,rb_cHash)) {
02104             temp1 = std::map<std::string,std::string >();
02105             arg1 = &temp1;
02106             VALUE keys = rb_funcall(self,rb_intern("keys"),0);
02107             unsigned int size = RARRAY(keys)->len;
02108             for (unsigned int i=0; i<size; i++) {
02109                 VALUE key = RARRAY(keys)->ptr[i];
02110                 VALUE val = rb_hash_aref(self,key);
02111                 if (!(SWIG_STRING_P(key) && SWIG_STRING_P(val)))
02112                 rb_raise(rb_eTypeError,
02113                 "wrong argument type"
02114                 " (expected map<""std::string" ",""std::string" ">)");
02115                 temp1[SWIG_RB2STR(key)] = SWIG_RB2STR(val);
02116             }
02117         } else {
02118             SWIG_ConvertPtr(self,(void **) &m1, SWIGTYPE_p_std__mapTstd__string_std__string_t,1);
02119             arg1 = m1;
02120         }
02121     }
02122     {
02123         try {
02124             result = (bool)((std::map<std::string,std::string > const *)arg1)->empty();
02125             
02126         } catch (const char *msg) {
02127             SWIG_exception(SWIG_RuntimeError, msg);
02128         }
02129     }
02130     vresult = result ? Qtrue : Qfalse;
02131     return vresult;
02132 }
02133 
02134 
02135 static VALUE
02136 _wrap_StrStrMap_clear(int argc, VALUE *argv, VALUE self) {
02137     std::map<std::string,std::string > *arg1 = (std::map<std::string,std::string > *) 0 ;
02138     
02139     if ((argc < 0) || (argc > 0))
02140     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
02141     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__mapTstd__string_std__string_t, 1);
02142     {
02143         try {
02144             (arg1)->clear();
02145             
02146         } catch (const char *msg) {
02147             SWIG_exception(SWIG_RuntimeError, msg);
02148         }
02149     }
02150     return Qnil;
02151 }
02152 
02153 
02154 static VALUE
02155 _wrap_StrStrMap___getitem__(int argc, VALUE *argv, VALUE self) {
02156     std::map<std::string,std::string > *arg1 = (std::map<std::string,std::string > *) 0 ;
02157     std::string arg2 ;
02158     std::string result;
02159     VALUE vresult = Qnil;
02160     
02161     if ((argc < 1) || (argc > 1))
02162     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
02163     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__mapTstd__string_std__string_t, 1);
02164     {
02165         if (TYPE(argv[0]) == T_STRING) {
02166             arg2 = std::string(StringValuePtr(argv[0]));
02167         } else {
02168             SWIG_exception(SWIG_TypeError, "not a string");
02169         }
02170     }
02171     {
02172         try {
02173             result = std_map_Sl_std_string_Sc_std_string_Sg____getitem__(arg1,arg2);
02174             
02175         } catch (std::out_of_range& e) {
02176             SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
02177         }
02178     }
02179     {
02180         vresult = rb_str_new2((&result)->c_str());
02181     }
02182     return vresult;
02183 }
02184 
02185 
02186 static VALUE
02187 _wrap_StrStrMap___setitem__(int argc, VALUE *argv, VALUE self) {
02188     std::map<std::string,std::string > *arg1 = (std::map<std::string,std::string > *) 0 ;
02189     std::string arg2 ;
02190     std::string arg3 ;
02191     
02192     if ((argc < 2) || (argc > 2))
02193     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
02194     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__mapTstd__string_std__string_t, 1);
02195     {
02196         if (TYPE(argv[0]) == T_STRING) {
02197             arg2 = std::string(StringValuePtr(argv[0]));
02198         } else {
02199             SWIG_exception(SWIG_TypeError, "not a string");
02200         }
02201     }
02202     {
02203         if (TYPE(argv[1]) == T_STRING) {
02204             arg3 = std::string(StringValuePtr(argv[1]));
02205         } else {
02206             SWIG_exception(SWIG_TypeError, "not a string");
02207         }
02208     }
02209     {
02210         try {
02211             std_map_Sl_std_string_Sc_std_string_Sg____setitem__(arg1,arg2,arg3);
02212             
02213         } catch (const char *msg) {
02214             SWIG_exception(SWIG_RuntimeError, msg);
02215         }
02216     }
02217     return Qnil;
02218 }
02219 
02220 
02221 static VALUE
02222 _wrap_StrStrMap_delete(int argc, VALUE *argv, VALUE self) {
02223     std::map<std::string,std::string > *arg1 = (std::map<std::string,std::string > *) 0 ;
02224     std::string arg2 ;
02225     std::string result;
02226     VALUE vresult = Qnil;
02227     
02228     if ((argc < 1) || (argc > 1))
02229     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
02230     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__mapTstd__string_std__string_t, 1);
02231     {
02232         if (TYPE(argv[0]) == T_STRING) {
02233             arg2 = std::string(StringValuePtr(argv[0]));
02234         } else {
02235             SWIG_exception(SWIG_TypeError, "not a string");
02236         }
02237     }
02238     {
02239         try {
02240             result = std_map_Sl_std_string_Sc_std_string_Sg____delitem__(arg1,arg2);
02241             
02242         } catch (std::out_of_range& e) {
02243             SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
02244         }
02245     }
02246     {
02247         vresult = rb_str_new2((&result)->c_str());
02248     }
02249     return vresult;
02250 }
02251 
02252 
02253 static VALUE
02254 _wrap_StrStrMap_has_keyq___(int argc, VALUE *argv, VALUE self) {
02255     std::map<std::string,std::string > *arg1 = (std::map<std::string,std::string > *) 0 ;
02256     std::string arg2 ;
02257     bool result;
02258     VALUE vresult = Qnil;
02259     
02260     if ((argc < 1) || (argc > 1))
02261     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
02262     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__mapTstd__string_std__string_t, 1);
02263     {
02264         if (TYPE(argv[0]) == T_STRING) {
02265             arg2 = std::string(StringValuePtr(argv[0]));
02266         } else {
02267             SWIG_exception(SWIG_TypeError, "not a string");
02268         }
02269     }
02270     {
02271         try {
02272             result = (bool)std_map_Sl_std_string_Sc_std_string_Sg__has_key(arg1,arg2);
02273             
02274         } catch (const char *msg) {
02275             SWIG_exception(SWIG_RuntimeError, msg);
02276         }
02277     }
02278     vresult = result ? Qtrue : Qfalse;
02279     return vresult;
02280 }
02281 
02282 
02283 static VALUE
02284 _wrap_StrStrMap_keys(int argc, VALUE *argv, VALUE self) {
02285     std::map<std::string,std::string > *arg1 = (std::map<std::string,std::string > *) 0 ;
02286     VALUE result;
02287     VALUE vresult = Qnil;
02288     
02289     if ((argc < 0) || (argc > 0))
02290     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
02291     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__mapTstd__string_std__string_t, 1);
02292     {
02293         try {
02294             result = (VALUE)std_map_Sl_std_string_Sc_std_string_Sg__keys(arg1);
02295             
02296         } catch (const char *msg) {
02297             SWIG_exception(SWIG_RuntimeError, msg);
02298         }
02299     }
02300     vresult = result;
02301     return vresult;
02302 }
02303 
02304 
02305 static VALUE
02306 _wrap_StrStrMap_values(int argc, VALUE *argv, VALUE self) {
02307     std::map<std::string,std::string > *arg1 = (std::map<std::string,std::string > *) 0 ;
02308     VALUE result;
02309     VALUE vresult = Qnil;
02310     
02311     if ((argc < 0) || (argc > 0))
02312     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
02313     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__mapTstd__string_std__string_t, 1);
02314     {
02315         try {
02316             result = (VALUE)std_map_Sl_std_string_Sc_std_string_Sg__values(arg1);
02317             
02318         } catch (const char *msg) {
02319             SWIG_exception(SWIG_RuntimeError, msg);
02320         }
02321     }
02322     vresult = result;
02323     return vresult;
02324 }
02325 
02326 
02327 static VALUE
02328 _wrap_StrStrMap_each(int argc, VALUE *argv, VALUE self) {
02329     std::map<std::string,std::string > *arg1 = (std::map<std::string,std::string > *) 0 ;
02330     
02331     if ((argc < 0) || (argc > 0))
02332     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
02333     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_std__mapTstd__string_std__string_t, 1);
02334     {
02335         try {
02336             std_map_Sl_std_string_Sc_std_string_Sg__each(arg1);
02337             
02338         } catch (const char *msg) {
02339             SWIG_exception(SWIG_RuntimeError, msg);
02340         }
02341     }
02342     return Qnil;
02343 }
02344 
02345 
02346 static void
02347 free_std_map_Sl_std_string_Sc_std_string_Sg_(std::map<std::string,std::string > *arg1) {
02348     delete arg1;
02349 }
02350 static VALUE
02351 _wrap_Condition_cond_set(int argc, VALUE *argv, VALUE self) {
02352     estraier::Condition *arg1 = (estraier::Condition *) 0 ;
02353     ESTCOND *arg2 = (ESTCOND *) 0 ;
02354     
02355     if ((argc < 1) || (argc > 1))
02356     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
02357     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Condition, 1);
02358     SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_ESTCOND, 1);
02359     if (arg1) (arg1)->cond = arg2;
02360     
02361     return Qnil;
02362 }
02363 
02364 
02365 static VALUE
02366 _wrap_Condition_cond_get(int argc, VALUE *argv, VALUE self) {
02367     estraier::Condition *arg1 = (estraier::Condition *) 0 ;
02368     ESTCOND *result;
02369     VALUE vresult = Qnil;
02370     
02371     if ((argc < 0) || (argc > 0))
02372     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
02373     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Condition, 1);
02374     result = (ESTCOND *) ((arg1)->cond);
02375     
02376     vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_ESTCOND,0);
02377     return vresult;
02378 }
02379 
02380 
02381 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
02382 static VALUE
02383 _wrap_Condition_allocate(VALUE self) {
02384 #else
02385     static VALUE
02386     _wrap_Condition_allocate(int argc, VALUE *argv, VALUE self) {
02387 #endif
02388         
02389         
02390         VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_estraier__Condition);
02391 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
02392         rb_obj_call_init(vresult, argc, argv);
02393 #endif
02394         return vresult;
02395     }
02396     
02397 
02398 static VALUE
02399 _wrap_new_Condition(int argc, VALUE *argv, VALUE self) {
02400     estraier::Condition *result;
02401     
02402     if ((argc < 0) || (argc > 0))
02403     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
02404     {
02405         try {
02406             result = (estraier::Condition *)new estraier::Condition();
02407             DATA_PTR(self) = result;
02408         } catch (const char *msg) {
02409             SWIG_exception(SWIG_RuntimeError, msg);
02410         }
02411     }
02412     return self;
02413 }
02414 
02415 
02416 static void
02417 free_estraier_Condition(estraier::Condition *arg1) {
02418     delete arg1;
02419 }
02420 static VALUE
02421 _wrap_Condition_set_phrase(int argc, VALUE *argv, VALUE self) {
02422     estraier::Condition *arg1 = (estraier::Condition *) 0 ;
02423     char *arg2 = (char *) 0 ;
02424     
02425     if ((argc < 1) || (argc > 1))
02426     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
02427     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Condition, 1);
02428     arg2 = StringValuePtr(argv[0]);
02429     {
02430         try {
02431             (arg1)->set_phrase((char const *)arg2);
02432             
02433         } catch (const char *msg) {
02434             SWIG_exception(SWIG_RuntimeError, msg);
02435         }
02436     }
02437     return Qnil;
02438 }
02439 
02440 
02441 static VALUE
02442 _wrap_Condition_add_attr(int argc, VALUE *argv, VALUE self) {
02443     estraier::Condition *arg1 = (estraier::Condition *) 0 ;
02444     char *arg2 = (char *) 0 ;
02445     
02446     if ((argc < 1) || (argc > 1))
02447     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
02448     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Condition, 1);
02449     arg2 = StringValuePtr(argv[0]);
02450     {
02451         try {
02452             (arg1)->add_attr((char const *)arg2);
02453             
02454         } catch (const char *msg) {
02455             SWIG_exception(SWIG_RuntimeError, msg);
02456         }
02457     }
02458     return Qnil;
02459 }
02460 
02461 
02462 static VALUE
02463 _wrap_Condition_set_order(int argc, VALUE *argv, VALUE self) {
02464     estraier::Condition *arg1 = (estraier::Condition *) 0 ;
02465     char *arg2 = (char *) 0 ;
02466     
02467     if ((argc < 1) || (argc > 1))
02468     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
02469     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Condition, 1);
02470     arg2 = StringValuePtr(argv[0]);
02471     {
02472         try {
02473             (arg1)->set_order((char const *)arg2);
02474             
02475         } catch (const char *msg) {
02476             SWIG_exception(SWIG_RuntimeError, msg);
02477         }
02478     }
02479     return Qnil;
02480 }
02481 
02482 
02483 static VALUE
02484 _wrap_Condition_set_max(int argc, VALUE *argv, VALUE self) {
02485     estraier::Condition *arg1 = (estraier::Condition *) 0 ;
02486     int arg2 ;
02487     
02488     if ((argc < 1) || (argc > 1))
02489     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
02490     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Condition, 1);
02491     arg2 = NUM2INT(argv[0]);
02492     {
02493         try {
02494             (arg1)->set_max(arg2);
02495             
02496         } catch (const char *msg) {
02497             SWIG_exception(SWIG_RuntimeError, msg);
02498         }
02499     }
02500     return Qnil;
02501 }
02502 
02503 
02504 static VALUE
02505 _wrap_Condition_set_options(int argc, VALUE *argv, VALUE self) {
02506     estraier::Condition *arg1 = (estraier::Condition *) 0 ;
02507     int arg2 ;
02508     
02509     if ((argc < 1) || (argc > 1))
02510     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
02511     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Condition, 1);
02512     arg2 = NUM2INT(argv[0]);
02513     {
02514         try {
02515             (arg1)->set_options(arg2);
02516             
02517         } catch (const char *msg) {
02518             SWIG_exception(SWIG_RuntimeError, msg);
02519         }
02520     }
02521     return Qnil;
02522 }
02523 
02524 
02525 static VALUE
02526 _wrap_Document_doc_set(int argc, VALUE *argv, VALUE self) {
02527     estraier::Document *arg1 = (estraier::Document *) 0 ;
02528     ESTDOC *arg2 = (ESTDOC *) 0 ;
02529     
02530     if ((argc < 1) || (argc > 1))
02531     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
02532     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Document, 1);
02533     SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_ESTDOC, 1);
02534     if (arg1) (arg1)->doc = arg2;
02535     
02536     return Qnil;
02537 }
02538 
02539 
02540 static VALUE
02541 _wrap_Document_doc_get(int argc, VALUE *argv, VALUE self) {
02542     estraier::Document *arg1 = (estraier::Document *) 0 ;
02543     ESTDOC *result;
02544     VALUE vresult = Qnil;
02545     
02546     if ((argc < 0) || (argc > 0))
02547     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
02548     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Document, 1);
02549     result = (ESTDOC *) ((arg1)->doc);
02550     
02551     vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_ESTDOC,0);
02552     return vresult;
02553 }
02554 
02555 
02556 static VALUE
02557 _wrap_new_Document__SWIG_0(int argc, VALUE *argv, VALUE self) {
02558     estraier::Document *result;
02559     
02560     if ((argc < 0) || (argc > 0))
02561     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
02562     {
02563         try {
02564             result = (estraier::Document *)new estraier::Document();
02565             DATA_PTR(self) = result;
02566         } catch (const char *msg) {
02567             SWIG_exception(SWIG_RuntimeError, msg);
02568         }
02569     }
02570     return self;
02571 }
02572 
02573 
02574 static VALUE
02575 _wrap_new_Document__SWIG_1(int argc, VALUE *argv, VALUE self) {
02576     char *arg1 = (char *) 0 ;
02577     estraier::Document *result;
02578     
02579     if ((argc < 1) || (argc > 1))
02580     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
02581     arg1 = StringValuePtr(argv[0]);
02582     {
02583         try {
02584             result = (estraier::Document *)new estraier::Document((char const *)arg1);
02585             DATA_PTR(self) = result;
02586         } catch (const char *msg) {
02587             SWIG_exception(SWIG_RuntimeError, msg);
02588         }
02589     }
02590     return self;
02591 }
02592 
02593 
02594 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
02595 static VALUE
02596 _wrap_Document_allocate(VALUE self) {
02597 #else
02598     static VALUE
02599     _wrap_Document_allocate(int argc, VALUE *argv, VALUE self) {
02600 #endif
02601         
02602         
02603         VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_estraier__Document);
02604 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
02605         rb_obj_call_init(vresult, argc, argv);
02606 #endif
02607         return vresult;
02608     }
02609     
02610 
02611 static VALUE
02612 _wrap_new_Document__SWIG_2(int argc, VALUE *argv, VALUE self) {
02613     ESTDOC *arg1 = (ESTDOC *) 0 ;
02614     estraier::Document *result;
02615     
02616     if ((argc < 1) || (argc > 1))
02617     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
02618     SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_ESTDOC, 1);
02619     {
02620         try {
02621             result = (estraier::Document *)new estraier::Document(arg1);
02622             DATA_PTR(self) = result;
02623         } catch (const char *msg) {
02624             SWIG_exception(SWIG_RuntimeError, msg);
02625         }
02626     }
02627     return self;
02628 }
02629 
02630 
02631 static VALUE _wrap_new_Document(int nargs, VALUE *args, VALUE self) {
02632     int argc;
02633     VALUE argv[1];
02634     int ii;
02635     
02636     argc = nargs;
02637     for (ii = 0; (ii < argc) && (ii < 1); ii++) {
02638         argv[ii] = args[ii];
02639     }
02640     if (argc == 0) {
02641         return _wrap_new_Document__SWIG_0(nargs, args, self);
02642     }
02643     if (argc == 1) {
02644         int _v;
02645         {
02646             void *ptr;
02647             _v = (NIL_P(argv[0]) || (TYPE(argv[0]) == T_DATA && SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_ESTDOC, 0) != -1)) ? 1 : 0;
02648         }
02649         if (_v) {
02650             return _wrap_new_Document__SWIG_2(nargs, args, self);
02651         }
02652     }
02653     if (argc == 1) {
02654         int _v;
02655         {
02656             _v = (TYPE(argv[0]) == T_STRING) ? 1 : 0;
02657         }
02658         if (_v) {
02659             return _wrap_new_Document__SWIG_1(nargs, args, self);
02660         }
02661     }
02662     
02663     rb_raise(rb_eArgError, "No matching function for overloaded 'new_Document'");
02664     return Qnil;
02665 }
02666 
02667 
02668 static void
02669 free_estraier_Document(estraier::Document *arg1) {
02670     delete arg1;
02671 }
02672 static VALUE
02673 _wrap_Document_add_attr(int argc, VALUE *argv, VALUE self) {
02674     estraier::Document *arg1 = (estraier::Document *) 0 ;
02675     char *arg2 = (char *) 0 ;
02676     char *arg3 = (char *) 0 ;
02677     
02678     if ((argc < 2) || (argc > 2))
02679     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
02680     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Document, 1);
02681     arg2 = StringValuePtr(argv[0]);
02682     arg3 = StringValuePtr(argv[1]);
02683     {
02684         try {
02685             (arg1)->add_attr((char const *)arg2,(char const *)arg3);
02686             
02687         } catch (const char *msg) {
02688             SWIG_exception(SWIG_RuntimeError, msg);
02689         }
02690     }
02691     return Qnil;
02692 }
02693 
02694 
02695 static VALUE
02696 _wrap_Document_add_text(int argc, VALUE *argv, VALUE self) {
02697     estraier::Document *arg1 = (estraier::Document *) 0 ;
02698     char *arg2 = (char *) 0 ;
02699     
02700     if ((argc < 1) || (argc > 1))
02701     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
02702     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Document, 1);
02703     arg2 = StringValuePtr(argv[0]);
02704     {
02705         try {
02706             (arg1)->add_text((char const *)arg2);
02707             
02708         } catch (const char *msg) {
02709             SWIG_exception(SWIG_RuntimeError, msg);
02710         }
02711     }
02712     return Qnil;
02713 }
02714 
02715 
02716 static VALUE
02717 _wrap_Document_add_hidden_text(int argc, VALUE *argv, VALUE self) {
02718     estraier::Document *arg1 = (estraier::Document *) 0 ;
02719     char *arg2 = (char *) 0 ;
02720     
02721     if ((argc < 1) || (argc > 1))
02722     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
02723     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Document, 1);
02724     arg2 = StringValuePtr(argv[0]);
02725     {
02726         try {
02727             (arg1)->add_hidden_text((char const *)arg2);
02728             
02729         } catch (const char *msg) {
02730             SWIG_exception(SWIG_RuntimeError, msg);
02731         }
02732     }
02733     return Qnil;
02734 }
02735 
02736 
02737 static VALUE
02738 _wrap_Document_id(int argc, VALUE *argv, VALUE self) {
02739     estraier::Document *arg1 = (estraier::Document *) 0 ;
02740     int result;
02741     VALUE vresult = Qnil;
02742     
02743     if ((argc < 0) || (argc > 0))
02744     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
02745     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Document, 1);
02746     {
02747         try {
02748             result = (int)(arg1)->id();
02749             
02750         } catch (const char *msg) {
02751             SWIG_exception(SWIG_RuntimeError, msg);
02752         }
02753     }
02754     vresult = INT2NUM(result);
02755     return vresult;
02756 }
02757 
02758 
02759 static VALUE
02760 _wrap_Document_attr_names(int argc, VALUE *argv, VALUE self) {
02761     estraier::Document *arg1 = (estraier::Document *) 0 ;
02762     std::vector<std::string > *result;
02763     VALUE vresult = Qnil;
02764     
02765     if ((argc < 0) || (argc > 0))
02766     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
02767     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Document, 1);
02768     {
02769         try {
02770             result = (std::vector<std::string > *)(arg1)->attr_names();
02771             
02772         } catch (const char *msg) {
02773             SWIG_exception(SWIG_RuntimeError, msg);
02774         }
02775     }
02776     vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_std__vectorTstd__string_t,0);
02777     return vresult;
02778 }
02779 
02780 
02781 static VALUE
02782 _wrap_Document_attr(int argc, VALUE *argv, VALUE self) {
02783     estraier::Document *arg1 = (estraier::Document *) 0 ;
02784     char *arg2 = (char *) 0 ;
02785     char *result;
02786     VALUE vresult = Qnil;
02787     
02788     if ((argc < 1) || (argc > 1))
02789     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
02790     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Document, 1);
02791     arg2 = StringValuePtr(argv[0]);
02792     {
02793         try {
02794             result = (char *)(arg1)->attr((char const *)arg2);
02795             
02796         } catch (const char *msg) {
02797             SWIG_exception(SWIG_RuntimeError, msg);
02798         }
02799     }
02800     vresult = rb_str_new2(result);
02801     return vresult;
02802 }
02803 
02804 
02805 static VALUE
02806 _wrap_Document_cat_texts(int argc, VALUE *argv, VALUE self) {
02807     estraier::Document *arg1 = (estraier::Document *) 0 ;
02808     char *result;
02809     VALUE vresult = Qnil;
02810     
02811     if ((argc < 0) || (argc > 0))
02812     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
02813     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Document, 1);
02814     {
02815         try {
02816             result = (char *)(arg1)->cat_texts();
02817             
02818         } catch (const char *msg) {
02819             SWIG_exception(SWIG_RuntimeError, msg);
02820         }
02821     }
02822     vresult = rb_str_new2(result);
02823     return vresult;
02824 }
02825 
02826 
02827 static VALUE
02828 _wrap_Document_texts(int argc, VALUE *argv, VALUE self) {
02829     estraier::Document *arg1 = (estraier::Document *) 0 ;
02830     std::vector<std::string > *result;
02831     VALUE vresult = Qnil;
02832     
02833     if ((argc < 0) || (argc > 0))
02834     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
02835     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Document, 1);
02836     {
02837         try {
02838             result = (std::vector<std::string > *)(arg1)->texts();
02839             
02840         } catch (const char *msg) {
02841             SWIG_exception(SWIG_RuntimeError, msg);
02842         }
02843     }
02844     vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_std__vectorTstd__string_t,0);
02845     return vresult;
02846 }
02847 
02848 
02849 static VALUE
02850 _wrap_Document_dump_draft(int argc, VALUE *argv, VALUE self) {
02851     estraier::Document *arg1 = (estraier::Document *) 0 ;
02852     char *result;
02853     VALUE vresult = Qnil;
02854     
02855     if ((argc < 0) || (argc > 0))
02856     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
02857     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Document, 1);
02858     {
02859         try {
02860             result = (char *)(arg1)->dump_draft();
02861             
02862         } catch (const char *msg) {
02863             SWIG_exception(SWIG_RuntimeError, msg);
02864         }
02865     }
02866     vresult = rb_str_new2(result);
02867     return vresult;
02868 }
02869 
02870 
02871 static VALUE
02872 _wrap_Document_make_snippet(int argc, VALUE *argv, VALUE self) {
02873     estraier::Document *arg1 = (estraier::Document *) 0 ;
02874     std::vector<std::string > arg2 ;
02875     int arg3 ;
02876     int arg4 ;
02877     int arg5 ;
02878     char *result;
02879     VALUE vresult = Qnil;
02880     
02881     if ((argc < 4) || (argc > 4))
02882     rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc);
02883     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Document, 1);
02884     {
02885         if (rb_obj_is_kind_of(argv[0],rb_cArray)) {
02886             unsigned int size = RARRAY(argv[0])->len;
02887             arg2 = std::vector<std::string >(size);
02888             for (unsigned int i=0; i<size; i++) {
02889                 VALUE o = RARRAY(argv[0])->ptr[i];
02890                 if (SWIG_STRING_P(o))
02891                 ((std::vector<std::string > &)arg2)[i] = (std::string)(SWIG_RB2STR(o));
02892                 else
02893                 rb_raise(rb_eTypeError,
02894                 "wrong argument type"
02895                 " (expected vector<""std::string" ">)");
02896             }
02897         } else {
02898             void *ptr;
02899             SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_std__vectorTstd__string_t, 1);
02900             arg2 = *((std::vector<std::string > *) ptr);
02901         }
02902     }
02903     arg3 = NUM2INT(argv[1]);
02904     arg4 = NUM2INT(argv[2]);
02905     arg5 = NUM2INT(argv[3]);
02906     {
02907         try {
02908             result = (char *)(arg1)->make_snippet(arg2,arg3,arg4,arg5);
02909             
02910         } catch (const char *msg) {
02911             SWIG_exception(SWIG_RuntimeError, msg);
02912         }
02913     }
02914     vresult = rb_str_new2(result);
02915     return vresult;
02916 }
02917 
02918 
02919 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
02920 static VALUE
02921 _wrap_Database_allocate(VALUE self) {
02922 #else
02923     static VALUE
02924     _wrap_Database_allocate(int argc, VALUE *argv, VALUE self) {
02925 #endif
02926         
02927         
02928         VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_estraier__Database);
02929 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
02930         rb_obj_call_init(vresult, argc, argv);
02931 #endif
02932         return vresult;
02933     }
02934     
02935 
02936 static VALUE
02937 _wrap_new_Database(int argc, VALUE *argv, VALUE self) {
02938     estraier::Database *result;
02939     
02940     if ((argc < 0) || (argc > 0))
02941     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
02942     {
02943         try {
02944             result = (estraier::Database *)new estraier::Database();
02945             DATA_PTR(self) = result;
02946         } catch (const char *msg) {
02947             SWIG_exception(SWIG_RuntimeError, msg);
02948         }
02949     }
02950     return self;
02951 }
02952 
02953 
02954 static void
02955 free_estraier_Database(estraier::Database *arg1) {
02956     delete arg1;
02957 }
02958 static VALUE
02959 _wrap_Database_open(int argc, VALUE *argv, VALUE self) {
02960     estraier::Database *arg1 = (estraier::Database *) 0 ;
02961     char *arg2 = (char *) 0 ;
02962     int arg3 ;
02963     bool result;
02964     VALUE vresult = Qnil;
02965     
02966     if ((argc < 2) || (argc > 2))
02967     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
02968     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Database, 1);
02969     arg2 = StringValuePtr(argv[0]);
02970     arg3 = NUM2INT(argv[1]);
02971     {
02972         try {
02973             result = (bool)(arg1)->open((char const *)arg2,arg3);
02974             
02975         } catch (const char *msg) {
02976             SWIG_exception(SWIG_RuntimeError, msg);
02977         }
02978     }
02979     vresult = result ? Qtrue : Qfalse;
02980     return vresult;
02981 }
02982 
02983 
02984 static VALUE
02985 _wrap_Database_close(int argc, VALUE *argv, VALUE self) {
02986     estraier::Database *arg1 = (estraier::Database *) 0 ;
02987     bool result;
02988     VALUE vresult = Qnil;
02989     
02990     if ((argc < 0) || (argc > 0))
02991     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
02992     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Database, 1);
02993     {
02994         try {
02995             result = (bool)(arg1)->close();
02996             
02997         } catch (const char *msg) {
02998             SWIG_exception(SWIG_RuntimeError, msg);
02999         }
03000     }
03001     vresult = result ? Qtrue : Qfalse;
03002     return vresult;
03003 }
03004 
03005 
03006 static VALUE
03007 _wrap_Database_put_doc(int argc, VALUE *argv, VALUE self) {
03008     estraier::Database *arg1 = (estraier::Database *) 0 ;
03009     estraier::Document *arg2 = (estraier::Document *) 0 ;
03010     int arg3 ;
03011     bool result;
03012     VALUE vresult = Qnil;
03013     
03014     if ((argc < 2) || (argc > 2))
03015     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
03016     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Database, 1);
03017     SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_estraier__Document, 1);
03018     arg3 = NUM2INT(argv[1]);
03019     {
03020         try {
03021             result = (bool)(arg1)->put_doc(arg2,arg3);
03022             
03023         } catch (const char *msg) {
03024             SWIG_exception(SWIG_RuntimeError, msg);
03025         }
03026     }
03027     vresult = result ? Qtrue : Qfalse;
03028     return vresult;
03029 }
03030 
03031 
03032 static VALUE
03033 _wrap_Database_search(int argc, VALUE *argv, VALUE self) {
03034     estraier::Database *arg1 = (estraier::Database *) 0 ;
03035     estraier::Condition *arg2 = (estraier::Condition *) 0 ;
03036     int arg3 ;
03037     std::vector<int > *result;
03038     VALUE vresult = Qnil;
03039     
03040     if ((argc < 2) || (argc > 2))
03041     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
03042     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Database, 1);
03043     SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_estraier__Condition, 1);
03044     arg3 = NUM2INT(argv[1]);
03045     {
03046         try {
03047             result = (std::vector<int > *)(arg1)->search(arg2,arg3);
03048             
03049         } catch (const char *msg) {
03050             SWIG_exception(SWIG_RuntimeError, msg);
03051         }
03052     }
03053     vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_std__vectorTint_t,0);
03054     return vresult;
03055 }
03056 
03057 
03058 static VALUE
03059 _wrap_Database_err_msg(int argc, VALUE *argv, VALUE self) {
03060     int arg1 ;
03061     char *result;
03062     VALUE vresult = Qnil;
03063     
03064     if ((argc < 1) || (argc > 1))
03065     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
03066     arg1 = NUM2INT(argv[0]);
03067     {
03068         try {
03069             result = (char *)estraier::Database::err_msg(arg1);
03070             
03071         } catch (const char *msg) {
03072             SWIG_exception(SWIG_RuntimeError, msg);
03073         }
03074     }
03075     vresult = rb_str_new2(result);
03076     return vresult;
03077 }
03078 
03079 
03080 static VALUE
03081 _wrap_Database_error(int argc, VALUE *argv, VALUE self) {
03082     estraier::Database *arg1 = (estraier::Database *) 0 ;
03083     int result;
03084     VALUE vresult = Qnil;
03085     
03086     if ((argc < 0) || (argc > 0))
03087     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
03088     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Database, 1);
03089     {
03090         try {
03091             result = (int)(arg1)->error();
03092             
03093         } catch (const char *msg) {
03094             SWIG_exception(SWIG_RuntimeError, msg);
03095         }
03096     }
03097     vresult = INT2NUM(result);
03098     return vresult;
03099 }
03100 
03101 
03102 static VALUE
03103 _wrap_Database_fatal(int argc, VALUE *argv, VALUE self) {
03104     estraier::Database *arg1 = (estraier::Database *) 0 ;
03105     bool result;
03106     VALUE vresult = Qnil;
03107     
03108     if ((argc < 0) || (argc > 0))
03109     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
03110     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Database, 1);
03111     {
03112         try {
03113             result = (bool)(arg1)->fatal();
03114             
03115         } catch (const char *msg) {
03116             SWIG_exception(SWIG_RuntimeError, msg);
03117         }
03118     }
03119     vresult = result ? Qtrue : Qfalse;
03120     return vresult;
03121 }
03122 
03123 
03124 static VALUE
03125 _wrap_Database_flush(int argc, VALUE *argv, VALUE self) {
03126     estraier::Database *arg1 = (estraier::Database *) 0 ;
03127     int arg2 ;
03128     bool result;
03129     VALUE vresult = Qnil;
03130     
03131     if ((argc < 1) || (argc > 1))
03132     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
03133     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Database, 1);
03134     arg2 = NUM2INT(argv[0]);
03135     {
03136         try {
03137             result = (bool)(arg1)->flush(arg2);
03138             
03139         } catch (const char *msg) {
03140             SWIG_exception(SWIG_RuntimeError, msg);
03141         }
03142     }
03143     vresult = result ? Qtrue : Qfalse;
03144     return vresult;
03145 }
03146 
03147 
03148 static VALUE
03149 _wrap_Database_sync(int argc, VALUE *argv, VALUE self) {
03150     estraier::Database *arg1 = (estraier::Database *) 0 ;
03151     bool result;
03152     VALUE vresult = Qnil;
03153     
03154     if ((argc < 0) || (argc > 0))
03155     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
03156     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Database, 1);
03157     {
03158         try {
03159             result = (bool)(arg1)->sync();
03160             
03161         } catch (const char *msg) {
03162             SWIG_exception(SWIG_RuntimeError, msg);
03163         }
03164     }
03165     vresult = result ? Qtrue : Qfalse;
03166     return vresult;
03167 }
03168 
03169 
03170 static VALUE
03171 _wrap_Database_optimize(int argc, VALUE *argv, VALUE self) {
03172     estraier::Database *arg1 = (estraier::Database *) 0 ;
03173     int arg2 ;
03174     bool result;
03175     VALUE vresult = Qnil;
03176     
03177     if ((argc < 1) || (argc > 1))
03178     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
03179     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Database, 1);
03180     arg2 = NUM2INT(argv[0]);
03181     {
03182         try {
03183             result = (bool)(arg1)->optimize(arg2);
03184             
03185         } catch (const char *msg) {
03186             SWIG_exception(SWIG_RuntimeError, msg);
03187         }
03188     }
03189     vresult = result ? Qtrue : Qfalse;
03190     return vresult;
03191 }
03192 
03193 
03194 static VALUE
03195 _wrap_Database_out_doc(int argc, VALUE *argv, VALUE self) {
03196     estraier::Database *arg1 = (estraier::Database *) 0 ;
03197     int arg2 ;
03198     int arg3 ;
03199     bool result;
03200     VALUE vresult = Qnil;
03201     
03202     if ((argc < 2) || (argc > 2))
03203     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
03204     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Database, 1);
03205     arg2 = NUM2INT(argv[0]);
03206     arg3 = NUM2INT(argv[1]);
03207     {
03208         try {
03209             result = (bool)(arg1)->out_doc(arg2,arg3);
03210             
03211         } catch (const char *msg) {
03212             SWIG_exception(SWIG_RuntimeError, msg);
03213         }
03214     }
03215     vresult = result ? Qtrue : Qfalse;
03216     return vresult;
03217 }
03218 
03219 
03220 static VALUE
03221 _wrap_Database_get_doc(int argc, VALUE *argv, VALUE self) {
03222     estraier::Database *arg1 = (estraier::Database *) 0 ;
03223     int arg2 ;
03224     int arg3 ;
03225     estraier::Document *result;
03226     VALUE vresult = Qnil;
03227     
03228     if ((argc < 2) || (argc > 2))
03229     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
03230     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Database, 1);
03231     arg2 = NUM2INT(argv[0]);
03232     arg3 = NUM2INT(argv[1]);
03233     {
03234         try {
03235             result = (estraier::Document *)(arg1)->get_doc(arg2,arg3);
03236             
03237         } catch (const char *msg) {
03238             SWIG_exception(SWIG_RuntimeError, msg);
03239         }
03240     }
03241     vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_estraier__Document,0);
03242     return vresult;
03243 }
03244 
03245 
03246 static VALUE
03247 _wrap_Database_uri_to_id(int argc, VALUE *argv, VALUE self) {
03248     estraier::Database *arg1 = (estraier::Database *) 0 ;
03249     char *arg2 = (char *) 0 ;
03250     int result;
03251     VALUE vresult = Qnil;
03252     
03253     if ((argc < 1) || (argc > 1))
03254     rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
03255     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Database, 1);
03256     arg2 = StringValuePtr(argv[0]);
03257     {
03258         try {
03259             result = (int)(arg1)->uri_to_id((char const *)arg2);
03260             
03261         } catch (const char *msg) {
03262             SWIG_exception(SWIG_RuntimeError, msg);
03263         }
03264     }
03265     vresult = INT2NUM(result);
03266     return vresult;
03267 }
03268 
03269 
03270 static VALUE
03271 _wrap_Database_etch_doc(int argc, VALUE *argv, VALUE self) {
03272     estraier::Database *arg1 = (estraier::Database *) 0 ;
03273     estraier::Document *arg2 = (estraier::Document *) 0 ;
03274     int arg3 ;
03275     std::map<std::string,std::string > *result;
03276     VALUE vresult = Qnil;
03277     
03278     if ((argc < 2) || (argc > 2))
03279     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
03280     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Database, 1);
03281     SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_estraier__Document, 1);
03282     arg3 = NUM2INT(argv[1]);
03283     {
03284         try {
03285             result = (std::map<std::string,std::string > *)(arg1)->etch_doc(arg2,arg3);
03286             
03287         } catch (const char *msg) {
03288             SWIG_exception(SWIG_RuntimeError, msg);
03289         }
03290     }
03291     vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_std__mapTstd__string_std__string_t,0);
03292     return vresult;
03293 }
03294 
03295 
03296 static VALUE
03297 _wrap_Database_name(int argc, VALUE *argv, VALUE self) {
03298     estraier::Database *arg1 = (estraier::Database *) 0 ;
03299     char *result;
03300     VALUE vresult = Qnil;
03301     
03302     if ((argc < 0) || (argc > 0))
03303     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
03304     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Database, 1);
03305     {
03306         try {
03307             result = (char *)(arg1)->name();
03308             
03309         } catch (const char *msg) {
03310             SWIG_exception(SWIG_RuntimeError, msg);
03311         }
03312     }
03313     vresult = rb_str_new2(result);
03314     return vresult;
03315 }
03316 
03317 
03318 static VALUE
03319 _wrap_Database_doc_num(int argc, VALUE *argv, VALUE self) {
03320     estraier::Database *arg1 = (estraier::Database *) 0 ;
03321     int result;
03322     VALUE vresult = Qnil;
03323     
03324     if ((argc < 0) || (argc > 0))
03325     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
03326     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Database, 1);
03327     {
03328         try {
03329             result = (int)(arg1)->doc_num();
03330             
03331         } catch (const char *msg) {
03332             SWIG_exception(SWIG_RuntimeError, msg);
03333         }
03334     }
03335     vresult = INT2NUM(result);
03336     return vresult;
03337 }
03338 
03339 
03340 static VALUE
03341 _wrap_Database_word_num(int argc, VALUE *argv, VALUE self) {
03342     estraier::Database *arg1 = (estraier::Database *) 0 ;
03343     int result;
03344     VALUE vresult = Qnil;
03345     
03346     if ((argc < 0) || (argc > 0))
03347     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
03348     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Database, 1);
03349     {
03350         try {
03351             result = (int)(arg1)->word_num();
03352             
03353         } catch (const char *msg) {
03354             SWIG_exception(SWIG_RuntimeError, msg);
03355         }
03356     }
03357     vresult = INT2NUM(result);
03358     return vresult;
03359 }
03360 
03361 
03362 static VALUE
03363 _wrap_Database_size(int argc, VALUE *argv, VALUE self) {
03364     estraier::Database *arg1 = (estraier::Database *) 0 ;
03365     double result;
03366     VALUE vresult = Qnil;
03367     
03368     if ((argc < 0) || (argc > 0))
03369     rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
03370     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Database, 1);
03371     {
03372         try {
03373             result = (double)(arg1)->size();
03374             
03375         } catch (const char *msg) {
03376             SWIG_exception(SWIG_RuntimeError, msg);
03377         }
03378     }
03379     vresult = rb_float_new(result);
03380     return vresult;
03381 }
03382 
03383 
03384 static VALUE
03385 _wrap_Database_set_cache_size(int argc, VALUE *argv, VALUE self) {
03386     estraier::Database *arg1 = (estraier::Database *) 0 ;
03387     size_t arg2 ;
03388     int arg3 ;
03389     int arg4 ;
03390     
03391     if ((argc < 3) || (argc > 3))
03392     rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
03393     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Database, 1);
03394     arg2 = NUM2ULONG(argv[0]);
03395     arg3 = NUM2INT(argv[1]);
03396     arg4 = NUM2INT(argv[2]);
03397     {
03398         try {
03399             (arg1)->set_cache_size(arg2,arg3,arg4);
03400             
03401         } catch (const char *msg) {
03402             SWIG_exception(SWIG_RuntimeError, msg);
03403         }
03404     }
03405     return Qnil;
03406 }
03407 
03408 
03409 static VALUE
03410 _wrap_Database_set_special_cache(int argc, VALUE *argv, VALUE self) {
03411     estraier::Database *arg1 = (estraier::Database *) 0 ;
03412     char *arg2 = (char *) 0 ;
03413     int arg3 ;
03414     
03415     if ((argc < 2) || (argc > 2))
03416     rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
03417     SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_estraier__Database, 1);
03418     arg2 = StringValuePtr(argv[0]);
03419     arg3 = NUM2INT(argv[1]);
03420     {
03421         try {
03422             (arg1)->set_special_cache((char const *)arg2,arg3);
03423             
03424         } catch (const char *msg) {
03425             SWIG_exception(SWIG_RuntimeError, msg);
03426         }
03427     }
03428     return Qnil;
03429 }
03430 
03431 
03432 
03433 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
03434 
03435 static swig_type_info _swigt__p_estraier__Condition[] = {{"_p_estraier__Condition", 0, "estraier::Condition *", 0, 0, 0, 0},{"_p_estraier__Condition", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
03436 static swig_type_info _swigt__p_ESTCOND[] = {{"_p_ESTCOND", 0, "ESTCOND *", 0, 0, 0, 0},{"_p_ESTCOND", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
03437 static swig_type_info _swigt__p_estraier__Database[] = {{"_p_estraier__Database", 0, "estraier::Database *", 0, 0, 0, 0},{"_p_estraier__Database", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
03438 static swig_type_info _swigt__p_unsigned_long[] = {{"_p_unsigned_long", 0, "unsigned long *|VALUE *", 0, 0, 0, 0},{"_p_unsigned_long", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
03439 static swig_type_info _swigt__p_ESTDOC[] = {{"_p_ESTDOC", 0, "ESTDOC *", 0, 0, 0, 0},{"_p_ESTDOC", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
03440 static swig_type_info _swigt__p_std__vectorTstd__string_t[] = {{"_p_std__vectorTstd__string_t", 0, "std::vector<std::string > *", 0, 0, 0, 0},{"_p_std__vectorTstd__string_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
03441 static swig_type_info _swigt__p_std__mapTstd__string_std__string_t[] = {{"_p_std__mapTstd__string_std__string_t", 0, "std::map<std::string,std::string > *", 0, 0, 0, 0},{"_p_std__mapTstd__string_std__string_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
03442 static swig_type_info _swigt__p_std__vectorTint_t[] = {{"_p_std__vectorTint_t", 0, "std::vector<int > *", 0, 0, 0, 0},{"_p_std__vectorTint_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
03443 static swig_type_info _swigt__p_estraier__Document[] = {{"_p_estraier__Document", 0, "estraier::Document *", 0, 0, 0, 0},{"_p_estraier__Document", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
03444 
03445 static swig_type_info *swig_types_initial[] = {
03446 _swigt__p_estraier__Condition, 
03447 _swigt__p_ESTCOND, 
03448 _swigt__p_estraier__Database, 
03449 _swigt__p_unsigned_long, 
03450 _swigt__p_ESTDOC, 
03451 _swigt__p_std__vectorTstd__string_t, 
03452 _swigt__p_std__mapTstd__string_std__string_t, 
03453 _swigt__p_std__vectorTint_t, 
03454 _swigt__p_estraier__Document, 
03455 0
03456 };
03457 
03458 
03459 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
03460 
03461 
03462 #ifdef __cplusplus
03463 extern "C"
03464 #endif
03465 SWIGEXPORT(void) Init_HyperEstraier(void) {
03466     int i;
03467     
03468     SWIG_InitRuntime();
03469     mHyperEstraier = rb_define_module("HyperEstraier");
03470     
03471     for (i = 0; swig_types_initial[i]; i++) {
03472         swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
03473         SWIG_define_class(swig_types[i]);
03474     }
03475     
03476     
03477     cStrVector.klass = rb_define_class_under(mHyperEstraier, "StrVector", rb_cObject);
03478     SWIG_TypeClientData(SWIGTYPE_p_std__vectorTstd__string_t, (void *) &cStrVector);
03479     rb_include_module(cStrVector.klass, rb_eval_string("Enumerable"));
03480     rb_define_alloc_func(cStrVector.klass, _wrap_StrVector_allocate);
03481     rb_define_method(cStrVector.klass, "initialize", VALUEFUNC(_wrap_new_StrVector), -1);
03482     rb_define_method(cStrVector.klass, "length", VALUEFUNC(_wrap_StrVector___len__), -1);
03483     rb_define_method(cStrVector.klass, "empty?", VALUEFUNC(_wrap_StrVector_emptyq___), -1);
03484     rb_define_method(cStrVector.klass, "clear", VALUEFUNC(_wrap_StrVector_clear), -1);
03485     rb_define_method(cStrVector.klass, "push", VALUEFUNC(_wrap_StrVector_push), -1);
03486     rb_define_method(cStrVector.klass, "pop", VALUEFUNC(_wrap_StrVector_pop), -1);
03487     rb_define_method(cStrVector.klass, "[]", VALUEFUNC(_wrap_StrVector___getitem__), -1);
03488     rb_define_method(cStrVector.klass, "[]=", VALUEFUNC(_wrap_StrVector___setitem__), -1);
03489     rb_define_method(cStrVector.klass, "each", VALUEFUNC(_wrap_StrVector_each), -1);
03490     cStrVector.mark = 0;
03491     cStrVector.destroy = (void (*)(void *)) free_std_vector_Sl_std_string_Sg_;
03492     
03493     cIntVector.klass = rb_define_class_under(mHyperEstraier, "IntVector", rb_cObject);
03494     SWIG_TypeClientData(SWIGTYPE_p_std__vectorTint_t, (void *) &cIntVector);
03495     rb_include_module(cIntVector.klass, rb_eval_string("Enumerable"));
03496     rb_define_alloc_func(cIntVector.klass, _wrap_IntVector_allocate);
03497     rb_define_method(cIntVector.klass, "initialize", VALUEFUNC(_wrap_new_IntVector), -1);
03498     rb_define_method(cIntVector.klass, "length", VALUEFUNC(_wrap_IntVector___len__), -1);
03499     rb_define_method(cIntVector.klass, "empty?", VALUEFUNC(_wrap_IntVector_emptyq___), -1);
03500     rb_define_method(cIntVector.klass, "clear", VALUEFUNC(_wrap_IntVector_clear), -1);
03501     rb_define_method(cIntVector.klass, "push", VALUEFUNC(_wrap_IntVector_push), -1);
03502     rb_define_method(cIntVector.klass, "pop", VALUEFUNC(_wrap_IntVector_pop), -1);
03503     rb_define_method(cIntVector.klass, "[]", VALUEFUNC(_wrap_IntVector___getitem__), -1);
03504     rb_define_method(cIntVector.klass, "[]=", VALUEFUNC(_wrap_IntVector___setitem__), -1);
03505     rb_define_method(cIntVector.klass, "each", VALUEFUNC(_wrap_IntVector_each), -1);
03506     cIntVector.mark = 0;
03507     cIntVector.destroy = (void (*)(void *)) free_std_vector_Sl_int_Sg_;
03508     
03509     cStrStrMap.klass = rb_define_class_under(mHyperEstraier, "StrStrMap", rb_cObject);
03510     SWIG_TypeClientData(SWIGTYPE_p_std__mapTstd__string_std__string_t, (void *) &cStrStrMap);
03511     rb_include_module(cStrStrMap.klass, rb_eval_string("Enumerable"));
03512     rb_define_alloc_func(cStrStrMap.klass, _wrap_StrStrMap_allocate);
03513     rb_define_method(cStrStrMap.klass, "initialize", VALUEFUNC(_wrap_new_StrStrMap), -1);
03514     rb_define_method(cStrStrMap.klass, "length", VALUEFUNC(_wrap_StrStrMap___len__), -1);
03515     rb_define_method(cStrStrMap.klass, "empty?", VALUEFUNC(_wrap_StrStrMap_emptyq___), -1);
03516     rb_define_method(cStrStrMap.klass, "clear", VALUEFUNC(_wrap_StrStrMap_clear), -1);
03517     rb_define_method(cStrStrMap.klass, "[]", VALUEFUNC(_wrap_StrStrMap___getitem__), -1);
03518     rb_define_method(cStrStrMap.klass, "[]=", VALUEFUNC(_wrap_StrStrMap___setitem__), -1);
03519     rb_define_method(cStrStrMap.klass, "delete", VALUEFUNC(_wrap_StrStrMap_delete), -1);
03520     rb_define_method(cStrStrMap.klass, "has_key?", VALUEFUNC(_wrap_StrStrMap_has_keyq___), -1);
03521     rb_define_method(cStrStrMap.klass, "keys", VALUEFUNC(_wrap_StrStrMap_keys), -1);
03522     rb_define_method(cStrStrMap.klass, "values", VALUEFUNC(_wrap_StrStrMap_values), -1);
03523     rb_define_method(cStrStrMap.klass, "each", VALUEFUNC(_wrap_StrStrMap_each), -1);
03524     cStrStrMap.mark = 0;
03525     cStrStrMap.destroy = (void (*)(void *)) free_std_map_Sl_std_string_Sc_std_string_Sg_;
03526     
03527     cCondition.klass = rb_define_class_under(mHyperEstraier, "Condition", rb_cObject);
03528     SWIG_TypeClientData(SWIGTYPE_p_estraier__Condition, (void *) &cCondition);
03529     rb_define_alloc_func(cCondition.klass, _wrap_Condition_allocate);
03530     rb_define_method(cCondition.klass, "initialize", VALUEFUNC(_wrap_new_Condition), -1);
03531     rb_define_const(cCondition.klass,"SURE", INT2NUM(estraier::Condition::SURE));
03532     rb_define_const(cCondition.klass,"USUAL", INT2NUM(estraier::Condition::USUAL));
03533     rb_define_const(cCondition.klass,"FAST", INT2NUM(estraier::Condition::FAST));
03534     rb_define_const(cCondition.klass,"AGITO", INT2NUM(estraier::Condition::AGITO));
03535     rb_define_const(cCondition.klass,"NOIDF", INT2NUM(estraier::Condition::NOIDF));
03536     rb_define_const(cCondition.klass,"SIMPLE", INT2NUM(estraier::Condition::SIMPLE));
03537     rb_define_method(cCondition.klass, "cond=", VALUEFUNC(_wrap_Condition_cond_set), -1);
03538     rb_define_method(cCondition.klass, "cond", VALUEFUNC(_wrap_Condition_cond_get), -1);
03539     rb_define_method(cCondition.klass, "set_phrase", VALUEFUNC(_wrap_Condition_set_phrase), -1);
03540     rb_define_method(cCondition.klass, "add_attr", VALUEFUNC(_wrap_Condition_add_attr), -1);
03541     rb_define_method(cCondition.klass, "set_order", VALUEFUNC(_wrap_Condition_set_order), -1);
03542     rb_define_method(cCondition.klass, "set_max", VALUEFUNC(_wrap_Condition_set_max), -1);
03543     rb_define_method(cCondition.klass, "set_options", VALUEFUNC(_wrap_Condition_set_options), -1);
03544     cCondition.mark = 0;
03545     cCondition.destroy = (void (*)(void *)) free_estraier_Condition;
03546     
03547     cDocument.klass = rb_define_class_under(mHyperEstraier, "Document", rb_cObject);
03548     SWIG_TypeClientData(SWIGTYPE_p_estraier__Document, (void *) &cDocument);
03549     rb_define_alloc_func(cDocument.klass, _wrap_Document_allocate);
03550     rb_define_method(cDocument.klass, "initialize", VALUEFUNC(_wrap_new_Document), -1);
03551     rb_define_method(cDocument.klass, "doc=", VALUEFUNC(_wrap_Document_doc_set), -1);
03552     rb_define_method(cDocument.klass, "doc", VALUEFUNC(_wrap_Document_doc_get), -1);
03553     rb_define_method(cDocument.klass, "add_attr", VALUEFUNC(_wrap_Document_add_attr), -1);
03554     rb_define_method(cDocument.klass, "add_text", VALUEFUNC(_wrap_Document_add_text), -1);
03555     rb_define_method(cDocument.klass, "add_hidden_text", VALUEFUNC(_wrap_Document_add_hidden_text), -1);
03556     rb_define_method(cDocument.klass, "id", VALUEFUNC(_wrap_Document_id), -1);
03557     rb_define_method(cDocument.klass, "attr_names", VALUEFUNC(_wrap_Document_attr_names), -1);
03558     rb_define_method(cDocument.klass, "attr", VALUEFUNC(_wrap_Document_attr), -1);
03559     rb_define_method(cDocument.klass, "cat_texts", VALUEFUNC(_wrap_Document_cat_texts), -1);
03560     rb_define_method(cDocument.klass, "texts", VALUEFUNC(_wrap_Document_texts), -1);
03561     rb_define_method(cDocument.klass, "dump_draft", VALUEFUNC(_wrap_Document_dump_draft), -1);
03562     rb_define_method(cDocument.klass, "make_snippet", VALUEFUNC(_wrap_Document_make_snippet), -1);
03563     cDocument.mark = 0;
03564     cDocument.destroy = (void (*)(void *)) free_estraier_Document;
03565     
03566     cDatabase.klass = rb_define_class_under(mHyperEstraier, "Database", rb_cObject);
03567     SWIG_TypeClientData(SWIGTYPE_p_estraier__Database, (void *) &cDatabase);
03568     rb_define_alloc_func(cDatabase.klass, _wrap_Database_allocate);
03569     rb_define_method(cDatabase.klass, "initialize", VALUEFUNC(_wrap_new_Database), -1);
03570     rb_define_const(cDatabase.klass,"ERRNOERR", INT2NUM(estraier::Database::ERRNOERR));
03571     rb_define_const(cDatabase.klass,"ERRINVAL", INT2NUM(estraier::Database::ERRINVAL));
03572     rb_define_const(cDatabase.klass,"ERRACCES", INT2NUM(estraier::Database::ERRACCES));
03573     rb_define_const(cDatabase.klass,"ERRLOCK", INT2NUM(estraier::Database::ERRLOCK));
03574     rb_define_const(cDatabase.klass,"ERRDB", INT2NUM(estraier::Database::ERRDB));
03575     rb_define_const(cDatabase.klass,"ERRIO", INT2NUM(estraier::Database::ERRIO));
03576     rb_define_const(cDatabase.klass,"ERRNOITEM", INT2NUM(estraier::Database::ERRNOITEM));
03577     rb_define_const(cDatabase.klass,"ERRMISC", INT2NUM(estraier::Database::ERRMISC));
03578     rb_define_const(cDatabase.klass,"DBREADER", INT2NUM(estraier::Database::DBREADER));
03579     rb_define_const(cDatabase.klass,"DBWRITER", INT2NUM(estraier::Database::DBWRITER));
03580     rb_define_const(cDatabase.klass,"DBCREAT", INT2NUM(estraier::Database::DBCREAT));
03581     rb_define_const(cDatabase.klass,"DBTRUNC", INT2NUM(estraier::Database::DBTRUNC));
03582     rb_define_const(cDatabase.klass,"DBNOLCK", INT2NUM(estraier::Database::DBNOLCK));
03583     rb_define_const(cDatabase.klass,"DBLCKNB", INT2NUM(estraier::Database::DBLCKNB));
03584     rb_define_const(cDatabase.klass,"DBPERFNG", INT2NUM(estraier::Database::DBPERFNG));
03585     rb_define_const(cDatabase.klass,"PDCLEAN", INT2NUM(estraier::Database::PDCLEAN));
03586     rb_define_const(cDatabase.klass,"ODCLEAN", INT2NUM(estraier::Database::ODCLEAN));
03587     rb_define_const(cDatabase.klass,"OPTNOPURGE", INT2NUM(estraier::Database::OPTNOPURGE));
03588     rb_define_const(cDatabase.klass,"OPTNODBOPT", INT2NUM(estraier::Database::OPTNODBOPT));
03589     rb_define_const(cDatabase.klass,"GDNOATTR", INT2NUM(estraier::Database::GDNOATTR));
03590     rb_define_const(cDatabase.klass,"GDNOTEXT", INT2NUM(estraier::Database::GDNOTEXT));
03591     rb_define_method(cDatabase.klass, "open", VALUEFUNC(_wrap_Database_open), -1);
03592     rb_define_method(cDatabase.klass, "close", VALUEFUNC(_wrap_Database_close), -1);
03593     rb_define_method(cDatabase.klass, "put_doc", VALUEFUNC(_wrap_Database_put_doc), -1);
03594     rb_define_method(cDatabase.klass, "search", VALUEFUNC(_wrap_Database_search), -1);
03595     rb_define_singleton_method(cDatabase.klass, "err_msg", VALUEFUNC(_wrap_Database_err_msg), -1);
03596     rb_define_method(cDatabase.klass, "error", VALUEFUNC(_wrap_Database_error), -1);
03597     rb_define_method(cDatabase.klass, "fatal", VALUEFUNC(_wrap_Database_fatal), -1);
03598     rb_define_method(cDatabase.klass, "flush", VALUEFUNC(_wrap_Database_flush), -1);
03599     rb_define_method(cDatabase.klass, "sync", VALUEFUNC(_wrap_Database_sync), -1);
03600     rb_define_method(cDatabase.klass, "optimize", VALUEFUNC(_wrap_Database_optimize), -1);
03601     rb_define_method(cDatabase.klass, "out_doc", VALUEFUNC(_wrap_Database_out_doc), -1);
03602     rb_define_method(cDatabase.klass, "get_doc", VALUEFUNC(_wrap_Database_get_doc), -1);
03603     rb_define_method(cDatabase.klass, "uri_to_id", VALUEFUNC(_wrap_Database_uri_to_id), -1);
03604     rb_define_method(cDatabase.klass, "etch_doc", VALUEFUNC(_wrap_Database_etch_doc), -1);
03605     rb_define_method(cDatabase.klass, "name", VALUEFUNC(_wrap_Database_name), -1);
03606     rb_define_method(cDatabase.klass, "doc_num", VALUEFUNC(_wrap_Database_doc_num), -1);
03607     rb_define_method(cDatabase.klass, "word_num", VALUEFUNC(_wrap_Database_word_num), -1);
03608     rb_define_method(cDatabase.klass, "size", VALUEFUNC(_wrap_Database_size), -1);
03609     rb_define_method(cDatabase.klass, "set_cache_size", VALUEFUNC(_wrap_Database_set_cache_size), -1);
03610     rb_define_method(cDatabase.klass, "set_special_cache", VALUEFUNC(_wrap_Database_set_special_cache), -1);
03611     cDatabase.mark = 0;
03612     cDatabase.destroy = (void (*)(void *)) free_estraier_Database;
03613 }
03614 

Generated on Thu Sep 8 02:02:20 2005 for HyperEstraierWrapper by  doxygen 1.4.4