Line data Source code
1 : /* ----------------------------------------------------------------------------
2 : * This file was automatically generated by SWIG (http://www.swig.org).
3 : * Version 3.0.10
4 : *
5 : * This file is not intended to be easily readable and contains a number of
6 : * coding conventions designed to improve portability and efficiency. Do not make
7 : * changes to this file unless you know what you are doing--modify the SWIG
8 : * interface file instead.
9 : * ----------------------------------------------------------------------------- */
10 :
11 :
12 : #ifndef SWIGRUBY
13 : #define SWIGRUBY
14 : #endif
15 :
16 :
17 :
18 : #ifdef __cplusplus
19 : /* SwigValueWrapper is described in swig.swg */
20 : template<typename T> class SwigValueWrapper {
21 : struct SwigMovePointer {
22 : T *ptr;
23 : SwigMovePointer(T *p) : ptr(p) { }
24 : ~SwigMovePointer() { delete ptr; }
25 : SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
26 : } pointer;
27 : SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
28 : SwigValueWrapper(const SwigValueWrapper<T>& rhs);
29 : public:
30 : SwigValueWrapper() : pointer(0) { }
31 : SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
32 : operator T&() const { return *pointer.ptr; }
33 : T *operator&() { return pointer.ptr; }
34 : };
35 :
36 : template <typename T> T SwigValueInit() {
37 : return T();
38 : }
39 : #endif
40 :
41 : /* -----------------------------------------------------------------------------
42 : * This section contains generic SWIG labels for method/variable
43 : * declarations/attributes, and other compiler dependent labels.
44 : * ----------------------------------------------------------------------------- */
45 :
46 : /* template workaround for compilers that cannot correctly implement the C++ standard */
47 : #ifndef SWIGTEMPLATEDISAMBIGUATOR
48 : # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
49 : # define SWIGTEMPLATEDISAMBIGUATOR template
50 : # elif defined(__HP_aCC)
51 : /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
52 : /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
53 : # define SWIGTEMPLATEDISAMBIGUATOR template
54 : # else
55 : # define SWIGTEMPLATEDISAMBIGUATOR
56 : # endif
57 : #endif
58 :
59 : /* inline attribute */
60 : #ifndef SWIGINLINE
61 : # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
62 : # define SWIGINLINE inline
63 : # else
64 : # define SWIGINLINE
65 : # endif
66 : #endif
67 :
68 : /* attribute recognised by some compilers to avoid 'unused' warnings */
69 : #ifndef SWIGUNUSED
70 : # if defined(__GNUC__)
71 : # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
72 : # define SWIGUNUSED __attribute__ ((__unused__))
73 : # else
74 : # define SWIGUNUSED
75 : # endif
76 : # elif defined(__ICC)
77 : # define SWIGUNUSED __attribute__ ((__unused__))
78 : # else
79 : # define SWIGUNUSED
80 : # endif
81 : #endif
82 :
83 : #ifndef SWIG_MSC_UNSUPPRESS_4505
84 : # if defined(_MSC_VER)
85 : # pragma warning(disable : 4505) /* unreferenced local function has been removed */
86 : # endif
87 : #endif
88 :
89 : #ifndef SWIGUNUSEDPARM
90 : # ifdef __cplusplus
91 : # define SWIGUNUSEDPARM(p)
92 : # else
93 : # define SWIGUNUSEDPARM(p) p SWIGUNUSED
94 : # endif
95 : #endif
96 :
97 : /* internal SWIG method */
98 : #ifndef SWIGINTERN
99 : # define SWIGINTERN static SWIGUNUSED
100 : #endif
101 :
102 : /* internal inline SWIG method */
103 : #ifndef SWIGINTERNINLINE
104 : # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
105 : #endif
106 :
107 : /* exporting methods */
108 : #if defined(__GNUC__)
109 : # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
110 : # ifndef GCC_HASCLASSVISIBILITY
111 : # define GCC_HASCLASSVISIBILITY
112 : # endif
113 : # endif
114 : #endif
115 :
116 : #ifndef SWIGEXPORT
117 : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
118 : # if defined(STATIC_LINKED)
119 : # define SWIGEXPORT
120 : # else
121 : # define SWIGEXPORT __declspec(dllexport)
122 : # endif
123 : # else
124 : # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
125 : # define SWIGEXPORT __attribute__ ((visibility("default")))
126 : # else
127 : # define SWIGEXPORT
128 : # endif
129 : # endif
130 : #endif
131 :
132 : /* calling conventions for Windows */
133 : #ifndef SWIGSTDCALL
134 : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
135 : # define SWIGSTDCALL __stdcall
136 : # else
137 : # define SWIGSTDCALL
138 : # endif
139 : #endif
140 :
141 : /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
142 : #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
143 : # define _CRT_SECURE_NO_DEPRECATE
144 : #endif
145 :
146 : /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
147 : #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
148 : # define _SCL_SECURE_NO_DEPRECATE
149 : #endif
150 :
151 : /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
152 : #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
153 : # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
154 : #endif
155 :
156 : /* Intel's compiler complains if a variable which was never initialised is
157 : * cast to void, which is a common idiom which we use to indicate that we
158 : * are aware a variable isn't used. So we just silence that warning.
159 : * See: https://github.com/swig/swig/issues/192 for more discussion.
160 : */
161 : #ifdef __INTEL_COMPILER
162 : # pragma warning disable 592
163 : #endif
164 :
165 : /* -----------------------------------------------------------------------------
166 : * This section contains generic SWIG labels for method/variable
167 : * declarations/attributes, and other compiler dependent labels.
168 : * ----------------------------------------------------------------------------- */
169 :
170 : /* template workaround for compilers that cannot correctly implement the C++ standard */
171 : #ifndef SWIGTEMPLATEDISAMBIGUATOR
172 : # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
173 : # define SWIGTEMPLATEDISAMBIGUATOR template
174 : # elif defined(__HP_aCC)
175 : /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
176 : /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
177 : # define SWIGTEMPLATEDISAMBIGUATOR template
178 : # else
179 : # define SWIGTEMPLATEDISAMBIGUATOR
180 : # endif
181 : #endif
182 :
183 : /* inline attribute */
184 : #ifndef SWIGINLINE
185 : # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
186 : # define SWIGINLINE inline
187 : # else
188 : # define SWIGINLINE
189 : # endif
190 : #endif
191 :
192 : /* attribute recognised by some compilers to avoid 'unused' warnings */
193 : #ifndef SWIGUNUSED
194 : # if defined(__GNUC__)
195 : # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
196 : # define SWIGUNUSED __attribute__ ((__unused__))
197 : # else
198 : # define SWIGUNUSED
199 : # endif
200 : # elif defined(__ICC)
201 : # define SWIGUNUSED __attribute__ ((__unused__))
202 : # else
203 : # define SWIGUNUSED
204 : # endif
205 : #endif
206 :
207 : #ifndef SWIG_MSC_UNSUPPRESS_4505
208 : # if defined(_MSC_VER)
209 : # pragma warning(disable : 4505) /* unreferenced local function has been removed */
210 : # endif
211 : #endif
212 :
213 : #ifndef SWIGUNUSEDPARM
214 : # ifdef __cplusplus
215 : # define SWIGUNUSEDPARM(p)
216 : # else
217 : # define SWIGUNUSEDPARM(p) p SWIGUNUSED
218 : # endif
219 : #endif
220 :
221 : /* internal SWIG method */
222 : #ifndef SWIGINTERN
223 : # define SWIGINTERN static SWIGUNUSED
224 : #endif
225 :
226 : /* internal inline SWIG method */
227 : #ifndef SWIGINTERNINLINE
228 : # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
229 : #endif
230 :
231 : /* exporting methods */
232 : #if defined(__GNUC__)
233 : # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
234 : # ifndef GCC_HASCLASSVISIBILITY
235 : # define GCC_HASCLASSVISIBILITY
236 : # endif
237 : # endif
238 : #endif
239 :
240 : #ifndef SWIGEXPORT
241 : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
242 : # if defined(STATIC_LINKED)
243 : # define SWIGEXPORT
244 : # else
245 : # define SWIGEXPORT __declspec(dllexport)
246 : # endif
247 : # else
248 : # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
249 : # define SWIGEXPORT __attribute__ ((visibility("default")))
250 : # else
251 : # define SWIGEXPORT
252 : # endif
253 : # endif
254 : #endif
255 :
256 : /* calling conventions for Windows */
257 : #ifndef SWIGSTDCALL
258 : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
259 : # define SWIGSTDCALL __stdcall
260 : # else
261 : # define SWIGSTDCALL
262 : # endif
263 : #endif
264 :
265 : /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
266 : #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
267 : # define _CRT_SECURE_NO_DEPRECATE
268 : #endif
269 :
270 : /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
271 : #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
272 : # define _SCL_SECURE_NO_DEPRECATE
273 : #endif
274 :
275 : /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
276 : #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
277 : # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
278 : #endif
279 :
280 : /* Intel's compiler complains if a variable which was never initialised is
281 : * cast to void, which is a common idiom which we use to indicate that we
282 : * are aware a variable isn't used. So we just silence that warning.
283 : * See: https://github.com/swig/swig/issues/192 for more discussion.
284 : */
285 : #ifdef __INTEL_COMPILER
286 : # pragma warning disable 592
287 : #endif
288 :
289 : /* -----------------------------------------------------------------------------
290 : * swigrun.swg
291 : *
292 : * This file contains generic C API SWIG runtime support for pointer
293 : * type checking.
294 : * ----------------------------------------------------------------------------- */
295 :
296 : /* This should only be incremented when either the layout of swig_type_info changes,
297 : or for whatever reason, the runtime changes incompatibly */
298 : #define SWIG_RUNTIME_VERSION "4"
299 :
300 : /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
301 : #ifdef SWIG_TYPE_TABLE
302 : # define SWIG_QUOTE_STRING(x) #x
303 : # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
304 : # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
305 : #else
306 : # define SWIG_TYPE_TABLE_NAME
307 : #endif
308 :
309 : /*
310 : You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
311 : creating a static or dynamic library from the SWIG runtime code.
312 : In 99.9% of the cases, SWIG just needs to declare them as 'static'.
313 :
314 : But only do this if strictly necessary, ie, if you have problems
315 : with your compiler or suchlike.
316 : */
317 :
318 : #ifndef SWIGRUNTIME
319 : # define SWIGRUNTIME SWIGINTERN
320 : #endif
321 :
322 : #ifndef SWIGRUNTIMEINLINE
323 : # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
324 : #endif
325 :
326 : /* Generic buffer size */
327 : #ifndef SWIG_BUFFER_SIZE
328 : # define SWIG_BUFFER_SIZE 1024
329 : #endif
330 :
331 : /* Flags for pointer conversions */
332 : #define SWIG_POINTER_DISOWN 0x1
333 : #define SWIG_CAST_NEW_MEMORY 0x2
334 :
335 : /* Flags for new pointer objects */
336 : #define SWIG_POINTER_OWN 0x1
337 :
338 :
339 : /*
340 : Flags/methods for returning states.
341 :
342 : The SWIG conversion methods, as ConvertPtr, return an integer
343 : that tells if the conversion was successful or not. And if not,
344 : an error code can be returned (see swigerrors.swg for the codes).
345 :
346 : Use the following macros/flags to set or process the returning
347 : states.
348 :
349 : In old versions of SWIG, code such as the following was usually written:
350 :
351 : if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
352 : // success code
353 : } else {
354 : //fail code
355 : }
356 :
357 : Now you can be more explicit:
358 :
359 : int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
360 : if (SWIG_IsOK(res)) {
361 : // success code
362 : } else {
363 : // fail code
364 : }
365 :
366 : which is the same really, but now you can also do
367 :
368 : Type *ptr;
369 : int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
370 : if (SWIG_IsOK(res)) {
371 : // success code
372 : if (SWIG_IsNewObj(res) {
373 : ...
374 : delete *ptr;
375 : } else {
376 : ...
377 : }
378 : } else {
379 : // fail code
380 : }
381 :
382 : I.e., now SWIG_ConvertPtr can return new objects and you can
383 : identify the case and take care of the deallocation. Of course that
384 : also requires SWIG_ConvertPtr to return new result values, such as
385 :
386 : int SWIG_ConvertPtr(obj, ptr,...) {
387 : if (<obj is ok>) {
388 : if (<need new object>) {
389 : *ptr = <ptr to new allocated object>;
390 : return SWIG_NEWOBJ;
391 : } else {
392 : *ptr = <ptr to old object>;
393 : return SWIG_OLDOBJ;
394 : }
395 : } else {
396 : return SWIG_BADOBJ;
397 : }
398 : }
399 :
400 : Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
401 : more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
402 : SWIG errors code.
403 :
404 : Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
405 : allows to return the 'cast rank', for example, if you have this
406 :
407 : int food(double)
408 : int fooi(int);
409 :
410 : and you call
411 :
412 : food(1) // cast rank '1' (1 -> 1.0)
413 : fooi(1) // cast rank '0'
414 :
415 : just use the SWIG_AddCast()/SWIG_CheckState()
416 : */
417 :
418 : #define SWIG_OK (0)
419 : #define SWIG_ERROR (-1)
420 : #define SWIG_IsOK(r) (r >= 0)
421 : #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
422 :
423 : /* The CastRankLimit says how many bits are used for the cast rank */
424 : #define SWIG_CASTRANKLIMIT (1 << 8)
425 : /* The NewMask denotes the object was created (using new/malloc) */
426 : #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
427 : /* The TmpMask is for in/out typemaps that use temporal objects */
428 : #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
429 : /* Simple returning values */
430 : #define SWIG_BADOBJ (SWIG_ERROR)
431 : #define SWIG_OLDOBJ (SWIG_OK)
432 : #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
433 : #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
434 : /* Check, add and del mask methods */
435 : #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
436 : #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
437 : #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
438 : #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
439 : #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
440 : #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
441 :
442 : /* Cast-Rank Mode */
443 : #if defined(SWIG_CASTRANK_MODE)
444 : # ifndef SWIG_TypeRank
445 : # define SWIG_TypeRank unsigned long
446 : # endif
447 : # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
448 : # define SWIG_MAXCASTRANK (2)
449 : # endif
450 : # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
451 : # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
452 : SWIGINTERNINLINE int SWIG_AddCast(int r) {
453 : return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
454 : }
455 : SWIGINTERNINLINE int SWIG_CheckState(int r) {
456 : return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
457 : }
458 : #else /* no cast-rank mode */
459 : # define SWIG_AddCast(r) (r)
460 : # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
461 : #endif
462 :
463 :
464 : #include <string.h>
465 :
466 : #ifdef __cplusplus
467 : extern "C" {
468 : #endif
469 :
470 : typedef void *(*swig_converter_func)(void *, int *);
471 : typedef struct swig_type_info *(*swig_dycast_func)(void **);
472 :
473 : /* Structure to store information on one type */
474 : typedef struct swig_type_info {
475 : const char *name; /* mangled name of this type */
476 : const char *str; /* human readable name of this type */
477 : swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
478 : struct swig_cast_info *cast; /* linked list of types that can cast into this type */
479 : void *clientdata; /* language specific type data */
480 : int owndata; /* flag if the structure owns the clientdata */
481 : } swig_type_info;
482 :
483 : /* Structure to store a type and conversion function used for casting */
484 : typedef struct swig_cast_info {
485 : swig_type_info *type; /* pointer to type that is equivalent to this type */
486 : swig_converter_func converter; /* function to cast the void pointers */
487 : struct swig_cast_info *next; /* pointer to next cast in linked list */
488 : struct swig_cast_info *prev; /* pointer to the previous cast */
489 : } swig_cast_info;
490 :
491 : /* Structure used to store module information
492 : * Each module generates one structure like this, and the runtime collects
493 : * all of these structures and stores them in a circularly linked list.*/
494 : typedef struct swig_module_info {
495 : swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
496 : size_t size; /* Number of types in this module */
497 : struct swig_module_info *next; /* Pointer to next element in circularly linked list */
498 : swig_type_info **type_initial; /* Array of initially generated type structures */
499 : swig_cast_info **cast_initial; /* Array of initially generated casting structures */
500 : void *clientdata; /* Language specific module data */
501 : } swig_module_info;
502 :
503 : /*
504 : Compare two type names skipping the space characters, therefore
505 : "char*" == "char *" and "Class<int>" == "Class<int >", etc.
506 :
507 : Return 0 when the two name types are equivalent, as in
508 : strncmp, but skipping ' '.
509 : */
510 : SWIGRUNTIME int
511 0 : SWIG_TypeNameComp(const char *f1, const char *l1,
512 : const char *f2, const char *l2) {
513 0 : for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
514 0 : while ((*f1 == ' ') && (f1 != l1)) ++f1;
515 0 : while ((*f2 == ' ') && (f2 != l2)) ++f2;
516 0 : if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
517 : }
518 0 : return (int)((l1 - f1) - (l2 - f2));
519 : }
520 :
521 : /*
522 : Check type equivalence in a name list like <name1>|<name2>|...
523 : Return 0 if equal, -1 if nb < tb, 1 if nb > tb
524 : */
525 : SWIGRUNTIME int
526 0 : SWIG_TypeCmp(const char *nb, const char *tb) {
527 0 : int equiv = 1;
528 0 : const char* te = tb + strlen(tb);
529 0 : const char* ne = nb;
530 0 : while (equiv != 0 && *ne) {
531 0 : for (nb = ne; *ne; ++ne) {
532 0 : if (*ne == '|') break;
533 : }
534 0 : equiv = SWIG_TypeNameComp(nb, ne, tb, te);
535 0 : if (*ne) ++ne;
536 : }
537 0 : return equiv;
538 : }
539 :
540 : /*
541 : Check type equivalence in a name list like <name1>|<name2>|...
542 : Return 0 if not equal, 1 if equal
543 : */
544 : SWIGRUNTIME int
545 : SWIG_TypeEquiv(const char *nb, const char *tb) {
546 0 : return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
547 : }
548 :
549 : /*
550 : Check the typename
551 : */
552 : SWIGRUNTIME swig_cast_info *
553 1504 : SWIG_TypeCheck(const char *c, swig_type_info *ty) {
554 1504 : if (ty) {
555 1504 : swig_cast_info *iter = ty->cast;
556 1530 : while (iter) {
557 1504 : if (strcmp(iter->type->name, c) == 0) {
558 1491 : if (iter == ty->cast)
559 : return iter;
560 : /* Move iter to the top of the linked list */
561 0 : iter->prev->next = iter->next;
562 0 : if (iter->next)
563 0 : iter->next->prev = iter->prev;
564 0 : iter->next = ty->cast;
565 0 : iter->prev = 0;
566 0 : if (ty->cast) ty->cast->prev = iter;
567 0 : ty->cast = iter;
568 0 : return iter;
569 : }
570 13 : iter = iter->next;
571 : }
572 : }
573 : return 0;
574 : }
575 :
576 : /*
577 : Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
578 : */
579 : SWIGRUNTIME swig_cast_info *
580 : SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
581 : if (ty) {
582 : swig_cast_info *iter = ty->cast;
583 : while (iter) {
584 : if (iter->type == from) {
585 : if (iter == ty->cast)
586 : return iter;
587 : /* Move iter to the top of the linked list */
588 : iter->prev->next = iter->next;
589 : if (iter->next)
590 : iter->next->prev = iter->prev;
591 : iter->next = ty->cast;
592 : iter->prev = 0;
593 : if (ty->cast) ty->cast->prev = iter;
594 : ty->cast = iter;
595 : return iter;
596 : }
597 : iter = iter->next;
598 : }
599 : }
600 : return 0;
601 : }
602 :
603 : /*
604 : Cast a pointer up an inheritance hierarchy
605 : */
606 : SWIGRUNTIMEINLINE void *
607 : SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
608 0 : return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
609 : }
610 :
611 : /*
612 : Dynamic pointer casting. Down an inheritance hierarchy
613 : */
614 : SWIGRUNTIME swig_type_info *
615 : SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
616 : swig_type_info *lastty = ty;
617 : if (!ty || !ty->dcast) return ty;
618 : while (ty && (ty->dcast)) {
619 : ty = (*ty->dcast)(ptr);
620 : if (ty) lastty = ty;
621 : }
622 : return lastty;
623 : }
624 :
625 : /*
626 : Return the name associated with this type
627 : */
628 : SWIGRUNTIMEINLINE const char *
629 : SWIG_TypeName(const swig_type_info *ty) {
630 : return ty->name;
631 : }
632 :
633 : /*
634 : Return the pretty name associated with this type,
635 : that is an unmangled type name in a form presentable to the user.
636 : */
637 : SWIGRUNTIME const char *
638 : SWIG_TypePrettyName(const swig_type_info *type) {
639 : /* The "str" field contains the equivalent pretty names of the
640 : type, separated by vertical-bar characters. We choose
641 : to print the last name, as it is often (?) the most
642 : specific. */
643 : if (!type) return NULL;
644 : if (type->str != NULL) {
645 : const char *last_name = type->str;
646 : const char *s;
647 : for (s = type->str; *s; s++)
648 : if (*s == '|') last_name = s+1;
649 : return last_name;
650 : }
651 : else
652 : return type->name;
653 : }
654 :
655 : /*
656 : Set the clientdata field for a type
657 : */
658 : SWIGRUNTIME void
659 253 : SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
660 253 : swig_cast_info *cast = ti->cast;
661 : /* if (ti->clientdata == clientdata) return; */
662 253 : ti->clientdata = clientdata;
663 :
664 759 : while (cast) {
665 506 : if (!cast->converter) {
666 253 : swig_type_info *tc = cast->type;
667 253 : if (!tc->clientdata) {
668 0 : SWIG_TypeClientData(tc, clientdata);
669 : }
670 : }
671 506 : cast = cast->next;
672 : }
673 253 : }
674 : SWIGRUNTIME void
675 : SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
676 : SWIG_TypeClientData(ti, clientdata);
677 : ti->owndata = 1;
678 : }
679 :
680 : /*
681 : Search for a swig_type_info structure only by mangled name
682 : Search is a O(log #types)
683 :
684 : We start searching at module start, and finish searching when start == end.
685 : Note: if start == end at the beginning of the function, we go all the way around
686 : the circular list.
687 : */
688 : SWIGRUNTIME swig_type_info *
689 390 : SWIG_MangledTypeQueryModule(swig_module_info *start,
690 : swig_module_info *end,
691 : const char *name) {
692 390 : swig_module_info *iter = start;
693 : do {
694 390 : if (iter->size) {
695 390 : size_t l = 0;
696 390 : size_t r = iter->size - 1;
697 : do {
698 : /* since l+r >= 0, we can (>> 1) instead (/ 2) */
699 2598 : size_t i = (l + r) >> 1;
700 2598 : const char *iname = iter->types[i]->name;
701 2598 : if (iname) {
702 2598 : int compare = strcmp(name, iname);
703 2598 : if (compare == 0) {
704 : return iter->types[i];
705 2454 : } else if (compare < 0) {
706 1308 : if (i) {
707 1308 : r = i - 1;
708 : } else {
709 : break;
710 : }
711 1146 : } else if (compare > 0) {
712 1146 : l = i + 1;
713 : }
714 : } else {
715 : break; /* should never happen */
716 : }
717 2454 : } while (l <= r);
718 : }
719 246 : iter = iter->next;
720 246 : } while (iter != end);
721 : return 0;
722 : }
723 :
724 : /*
725 : Search for a swig_type_info structure for either a mangled name or a human readable name.
726 : It first searches the mangled names of the types, which is a O(log #types)
727 : If a type is not found it then searches the human readable names, which is O(#types).
728 :
729 : We start searching at module start, and finish searching when start == end.
730 : Note: if start == end at the beginning of the function, we go all the way around
731 : the circular list.
732 : */
733 : SWIGRUNTIME swig_type_info *
734 0 : SWIG_TypeQueryModule(swig_module_info *start,
735 : swig_module_info *end,
736 : const char *name) {
737 : /* STEP 1: Search the name field using binary search */
738 0 : swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
739 0 : if (ret) {
740 : return ret;
741 : } else {
742 : /* STEP 2: If the type hasn't been found, do a complete search
743 : of the str field (the human readable name) */
744 : swig_module_info *iter = start;
745 : do {
746 0 : size_t i = 0;
747 0 : for (; i < iter->size; ++i) {
748 0 : if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
749 : return iter->types[i];
750 : }
751 0 : iter = iter->next;
752 0 : } while (iter != end);
753 : }
754 :
755 : /* neither found a match */
756 : return 0;
757 : }
758 :
759 : /*
760 : Pack binary data into a string
761 : */
762 : SWIGRUNTIME char *
763 : SWIG_PackData(char *c, void *ptr, size_t sz) {
764 : static const char hex[17] = "0123456789abcdef";
765 : const unsigned char *u = (unsigned char *) ptr;
766 : const unsigned char *eu = u + sz;
767 : for (; u != eu; ++u) {
768 : unsigned char uu = *u;
769 : *(c++) = hex[(uu & 0xf0) >> 4];
770 : *(c++) = hex[uu & 0xf];
771 : }
772 : return c;
773 : }
774 :
775 : /*
776 : Unpack binary data from a string
777 : */
778 : SWIGRUNTIME const char *
779 : SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
780 : unsigned char *u = (unsigned char *) ptr;
781 : const unsigned char *eu = u + sz;
782 : for (; u != eu; ++u) {
783 : char d = *(c++);
784 : unsigned char uu;
785 : if ((d >= '0') && (d <= '9'))
786 : uu = (unsigned char)((d - '0') << 4);
787 : else if ((d >= 'a') && (d <= 'f'))
788 : uu = (unsigned char)((d - ('a'-10)) << 4);
789 : else
790 : return (char *) 0;
791 : d = *(c++);
792 : if ((d >= '0') && (d <= '9'))
793 : uu |= (unsigned char)(d - '0');
794 : else if ((d >= 'a') && (d <= 'f'))
795 : uu |= (unsigned char)(d - ('a'-10));
796 : else
797 : return (char *) 0;
798 : *u = uu;
799 : }
800 : return c;
801 : }
802 :
803 : /*
804 : Pack 'void *' into a string buffer.
805 : */
806 : SWIGRUNTIME char *
807 : SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
808 : char *r = buff;
809 : if ((2*sizeof(void *) + 2) > bsz) return 0;
810 : *(r++) = '_';
811 : r = SWIG_PackData(r,&ptr,sizeof(void *));
812 : if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
813 : strcpy(r,name);
814 : return buff;
815 : }
816 :
817 : SWIGRUNTIME const char *
818 : SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
819 : if (*c != '_') {
820 : if (strcmp(c,"NULL") == 0) {
821 : *ptr = (void *) 0;
822 : return name;
823 : } else {
824 : return 0;
825 : }
826 : }
827 : return SWIG_UnpackData(++c,ptr,sizeof(void *));
828 : }
829 :
830 : SWIGRUNTIME char *
831 : SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
832 : char *r = buff;
833 : size_t lname = (name ? strlen(name) : 0);
834 : if ((2*sz + 2 + lname) > bsz) return 0;
835 : *(r++) = '_';
836 : r = SWIG_PackData(r,ptr,sz);
837 : if (lname) {
838 : strncpy(r,name,lname+1);
839 : } else {
840 : *r = 0;
841 : }
842 : return buff;
843 : }
844 :
845 : SWIGRUNTIME const char *
846 : SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
847 : if (*c != '_') {
848 : if (strcmp(c,"NULL") == 0) {
849 : memset(ptr,0,sz);
850 : return name;
851 : } else {
852 : return 0;
853 : }
854 : }
855 : return SWIG_UnpackData(++c,ptr,sz);
856 : }
857 :
858 : #ifdef __cplusplus
859 : }
860 : #endif
861 :
862 : /* Errors in SWIG */
863 : #define SWIG_UnknownError -1
864 : #define SWIG_IOError -2
865 : #define SWIG_RuntimeError -3
866 : #define SWIG_IndexError -4
867 : #define SWIG_TypeError -5
868 : #define SWIG_DivisionByZero -6
869 : #define SWIG_OverflowError -7
870 : #define SWIG_SyntaxError -8
871 : #define SWIG_ValueError -9
872 : #define SWIG_SystemError -10
873 : #define SWIG_AttributeError -11
874 : #define SWIG_MemoryError -12
875 : #define SWIG_NullReferenceError -13
876 :
877 :
878 :
879 : #include <ruby.h>
880 :
881 : /* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which
882 : * breaks using rb_intern as an lvalue, as SWIG does. We work around this
883 : * issue for now by disabling this.
884 : * https://sourceforge.net/tracker/?func=detail&aid=2859614&group_id=1645&atid=101645
885 : */
886 : #ifdef rb_intern
887 : # undef rb_intern
888 : #endif
889 :
890 : /* Remove global macros defined in Ruby's win32.h */
891 : #ifdef write
892 : # undef write
893 : #endif
894 : #ifdef read
895 : # undef read
896 : #endif
897 : #ifdef bind
898 : # undef bind
899 : #endif
900 : #ifdef close
901 : # undef close
902 : #endif
903 : #ifdef connect
904 : # undef connect
905 : #endif
906 :
907 :
908 : /* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
909 : #ifndef NUM2LL
910 : #define NUM2LL(x) NUM2LONG((x))
911 : #endif
912 : #ifndef LL2NUM
913 : #define LL2NUM(x) INT2NUM((long) (x))
914 : #endif
915 : #ifndef ULL2NUM
916 : #define ULL2NUM(x) UINT2NUM((unsigned long) (x))
917 : #endif
918 :
919 : /* Ruby 1.7 doesn't (yet) define NUM2ULL() */
920 : #ifndef NUM2ULL
921 : #ifdef HAVE_LONG_LONG
922 : #define NUM2ULL(x) rb_num2ull((x))
923 : #else
924 : #define NUM2ULL(x) NUM2ULONG(x)
925 : #endif
926 : #endif
927 :
928 : /* RSTRING_LEN, etc are new in Ruby 1.9, but ->ptr and ->len no longer work */
929 : /* Define these for older versions so we can just write code the new way */
930 : #ifndef RSTRING_LEN
931 : # define RSTRING_LEN(x) RSTRING(x)->len
932 : #endif
933 : #ifndef RSTRING_PTR
934 : # define RSTRING_PTR(x) RSTRING(x)->ptr
935 : #endif
936 : #ifndef RSTRING_END
937 : # define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x))
938 : #endif
939 : #ifndef RARRAY_LEN
940 : # define RARRAY_LEN(x) RARRAY(x)->len
941 : #endif
942 : #ifndef RARRAY_PTR
943 : # define RARRAY_PTR(x) RARRAY(x)->ptr
944 : #endif
945 : #ifndef RFLOAT_VALUE
946 : # define RFLOAT_VALUE(x) RFLOAT(x)->value
947 : #endif
948 : #ifndef DOUBLE2NUM
949 : # define DOUBLE2NUM(x) rb_float_new(x)
950 : #endif
951 : #ifndef RHASH_TBL
952 : # define RHASH_TBL(x) (RHASH(x)->tbl)
953 : #endif
954 : #ifndef RHASH_ITER_LEV
955 : # define RHASH_ITER_LEV(x) (RHASH(x)->iter_lev)
956 : #endif
957 : #ifndef RHASH_IFNONE
958 : # define RHASH_IFNONE(x) (RHASH(x)->ifnone)
959 : #endif
960 : #ifndef RHASH_SIZE
961 : # define RHASH_SIZE(x) (RHASH(x)->tbl->num_entries)
962 : #endif
963 : #ifndef RHASH_EMPTY_P
964 : # define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0)
965 : #endif
966 : #ifndef RSTRUCT_LEN
967 : # define RSTRUCT_LEN(x) RSTRUCT(x)->len
968 : #endif
969 : #ifndef RSTRUCT_PTR
970 : # define RSTRUCT_PTR(x) RSTRUCT(x)->ptr
971 : #endif
972 :
973 :
974 :
975 : /*
976 : * Need to be very careful about how these macros are defined, especially
977 : * when compiling C++ code or C code with an ANSI C compiler.
978 : *
979 : * VALUEFUNC(f) is a macro used to typecast a C function that implements
980 : * a Ruby method so that it can be passed as an argument to API functions
981 : * like rb_define_method() and rb_define_singleton_method().
982 : *
983 : * VOIDFUNC(f) is a macro used to typecast a C function that implements
984 : * either the "mark" or "free" stuff for a Ruby Data object, so that it
985 : * can be passed as an argument to API functions like Data_Wrap_Struct()
986 : * and Data_Make_Struct().
987 : */
988 :
989 : #ifdef __cplusplus
990 : # ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
991 : # define PROTECTFUNC(f) ((VALUE (*)()) f)
992 : # define VALUEFUNC(f) ((VALUE (*)()) f)
993 : # define VOIDFUNC(f) ((void (*)()) f)
994 : # else
995 : # ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
996 : # define PROTECTFUNC(f) ((VALUE (*)()) f)
997 : # define VALUEFUNC(f) ((VALUE (*)()) f)
998 : # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
999 : # else /* These definitions should work for Ruby 1.7+ */
1000 : # define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
1001 : # define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
1002 : # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
1003 : # endif
1004 : # endif
1005 : #else
1006 : # define VALUEFUNC(f) (f)
1007 : # define VOIDFUNC(f) (f)
1008 : #endif
1009 :
1010 : /* Don't use for expressions have side effect */
1011 : #ifndef RB_STRING_VALUE
1012 : #define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s)))
1013 : #endif
1014 : #ifndef StringValue
1015 : #define StringValue(s) RB_STRING_VALUE(s)
1016 : #endif
1017 : #ifndef StringValuePtr
1018 : #define StringValuePtr(s) RSTRING_PTR(RB_STRING_VALUE(s))
1019 : #endif
1020 : #ifndef StringValueLen
1021 : #define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s))
1022 : #endif
1023 : #ifndef SafeStringValue
1024 : #define SafeStringValue(v) do {\
1025 : StringValue(v);\
1026 : rb_check_safe_str(v);\
1027 : } while (0)
1028 : #endif
1029 :
1030 : #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
1031 : #define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1)
1032 : #define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
1033 : #endif
1034 :
1035 : static VALUE _mSWIG = Qnil;
1036 :
1037 : /* -----------------------------------------------------------------------------
1038 : * error manipulation
1039 : * ----------------------------------------------------------------------------- */
1040 :
1041 :
1042 : /* Define some additional error types */
1043 : #define SWIG_ObjectPreviouslyDeletedError -100
1044 :
1045 :
1046 : /* Define custom exceptions for errors that do not map to existing Ruby
1047 : exceptions. Note this only works for C++ since a global cannot be
1048 : initialized by a function in C. For C, fallback to rb_eRuntimeError.*/
1049 :
1050 : SWIGINTERN VALUE
1051 0 : getNullReferenceError(void) {
1052 : static int init = 0;
1053 : static VALUE rb_eNullReferenceError ;
1054 0 : if (!init) {
1055 0 : init = 1;
1056 0 : rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError);
1057 : }
1058 0 : return rb_eNullReferenceError;
1059 : }
1060 :
1061 : SWIGINTERN VALUE
1062 0 : getObjectPreviouslyDeletedError(void) {
1063 : static int init = 0;
1064 : static VALUE rb_eObjectPreviouslyDeleted ;
1065 0 : if (!init) {
1066 0 : init = 1;
1067 0 : rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError);
1068 : }
1069 0 : return rb_eObjectPreviouslyDeleted;
1070 : }
1071 :
1072 :
1073 : SWIGINTERN VALUE
1074 0 : SWIG_Ruby_ErrorType(int SWIG_code) {
1075 : VALUE type;
1076 0 : switch (SWIG_code) {
1077 : case SWIG_MemoryError:
1078 0 : type = rb_eNoMemError;
1079 0 : break;
1080 : case SWIG_IOError:
1081 0 : type = rb_eIOError;
1082 0 : break;
1083 : case SWIG_RuntimeError:
1084 0 : type = rb_eRuntimeError;
1085 0 : break;
1086 : case SWIG_IndexError:
1087 0 : type = rb_eIndexError;
1088 0 : break;
1089 : case SWIG_TypeError:
1090 0 : type = rb_eTypeError;
1091 0 : break;
1092 : case SWIG_DivisionByZero:
1093 0 : type = rb_eZeroDivError;
1094 0 : break;
1095 : case SWIG_OverflowError:
1096 0 : type = rb_eRangeError;
1097 0 : break;
1098 : case SWIG_SyntaxError:
1099 0 : type = rb_eSyntaxError;
1100 0 : break;
1101 : case SWIG_ValueError:
1102 0 : type = rb_eArgError;
1103 0 : break;
1104 : case SWIG_SystemError:
1105 0 : type = rb_eFatal;
1106 0 : break;
1107 : case SWIG_AttributeError:
1108 0 : type = rb_eRuntimeError;
1109 0 : break;
1110 : case SWIG_NullReferenceError:
1111 0 : type = getNullReferenceError();
1112 0 : break;
1113 : case SWIG_ObjectPreviouslyDeletedError:
1114 0 : type = getObjectPreviouslyDeletedError();
1115 0 : break;
1116 : case SWIG_UnknownError:
1117 0 : type = rb_eRuntimeError;
1118 0 : break;
1119 : default:
1120 0 : type = rb_eRuntimeError;
1121 : }
1122 0 : return type;
1123 : }
1124 :
1125 :
1126 : /* This function is called when a user inputs a wrong argument to
1127 : a method.
1128 : */
1129 : SWIGINTERN
1130 0 : const char* Ruby_Format_TypeError( const char* msg,
1131 : const char* type,
1132 : const char* name,
1133 : const int argn,
1134 : VALUE input )
1135 : {
1136 : char buf[128];
1137 : VALUE str;
1138 : VALUE asStr;
1139 0 : if ( msg && *msg )
1140 : {
1141 0 : str = rb_str_new2(msg);
1142 : }
1143 : else
1144 : {
1145 0 : str = rb_str_new(NULL, 0);
1146 : }
1147 :
1148 0 : str = rb_str_cat2( str, "Expected argument " );
1149 0 : sprintf( buf, "%d of type ", argn-1 );
1150 0 : str = rb_str_cat2( str, buf );
1151 0 : str = rb_str_cat2( str, type );
1152 0 : str = rb_str_cat2( str, ", but got " );
1153 0 : str = rb_str_cat2( str, rb_obj_classname(input) );
1154 0 : str = rb_str_cat2( str, " " );
1155 0 : asStr = rb_inspect(input);
1156 0 : if ( RSTRING_LEN(asStr) > 30 )
1157 : {
1158 0 : str = rb_str_cat( str, StringValuePtr(asStr), 30 );
1159 0 : str = rb_str_cat2( str, "..." );
1160 : }
1161 : else
1162 : {
1163 0 : str = rb_str_append( str, asStr );
1164 : }
1165 :
1166 0 : if ( name )
1167 : {
1168 0 : str = rb_str_cat2( str, "\n\tin SWIG method '" );
1169 0 : str = rb_str_cat2( str, name );
1170 0 : str = rb_str_cat2( str, "'" );
1171 : }
1172 :
1173 0 : return StringValuePtr( str );
1174 : }
1175 :
1176 : /* This function is called when an overloaded method fails */
1177 : SWIGINTERN
1178 0 : void Ruby_Format_OverloadedError(
1179 : const int argc,
1180 : const int maxargs,
1181 : const char* method,
1182 : const char* prototypes
1183 : )
1184 : {
1185 0 : const char* msg = "Wrong # of arguments";
1186 0 : if ( argc <= maxargs ) msg = "Wrong arguments";
1187 : rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n"
1188 : "Possible C/C++ prototypes are:\n%s",
1189 0 : msg, method, prototypes);
1190 : }
1191 :
1192 : /* -----------------------------------------------------------------------------
1193 : * rubytracking.swg
1194 : *
1195 : * This file contains support for tracking mappings from
1196 : * Ruby objects to C++ objects. This functionality is needed
1197 : * to implement mark functions for Ruby's mark and sweep
1198 : * garbage collector.
1199 : * ----------------------------------------------------------------------------- */
1200 :
1201 : #ifdef __cplusplus
1202 : extern "C" {
1203 : #endif
1204 :
1205 : #if !defined(ST_DATA_T_DEFINED)
1206 : /* Needs to be explicitly included for Ruby 1.8 and earlier */
1207 : #include <st.h>
1208 : #endif
1209 :
1210 : /* Ruby 1.8 actually assumes the first case. */
1211 : #if SIZEOF_VOIDP == SIZEOF_LONG
1212 : # define SWIG2NUM(v) LONG2NUM((unsigned long)v)
1213 : # define NUM2SWIG(x) (unsigned long)NUM2LONG(x)
1214 : #elif SIZEOF_VOIDP == SIZEOF_LONG_LONG
1215 : # define SWIG2NUM(v) LL2NUM((unsigned long long)v)
1216 : # define NUM2SWIG(x) (unsigned long long)NUM2LL(x)
1217 : #else
1218 : # error sizeof(void*) is not the same as long or long long
1219 : #endif
1220 :
1221 : /* Global hash table to store Trackings from C/C++
1222 : structs to Ruby Objects.
1223 : */
1224 : static st_table* swig_ruby_trackings = NULL;
1225 :
1226 0 : static VALUE swig_ruby_trackings_count(ANYARGS) {
1227 0 : return SWIG2NUM(swig_ruby_trackings->num_entries);
1228 : }
1229 :
1230 :
1231 : /* Setup a hash table to store Trackings */
1232 23 : SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
1233 : /* Create a hash table to store Trackings from C++
1234 : objects to Ruby objects. */
1235 :
1236 : /* Try to see if some other .so has already created a
1237 : tracking hash table, which we keep hidden in an instance var
1238 : in the SWIG module.
1239 : This is done to allow multiple DSOs to share the same
1240 : tracking table.
1241 : */
1242 23 : VALUE trackings_value = Qnil;
1243 : /* change the variable name so that we can mix modules
1244 : compiled with older SWIG's - this used to be called "@__trackings__" */
1245 23 : ID trackings_id = rb_intern( "@__safetrackings__" );
1246 23 : VALUE verbose = rb_gv_get("VERBOSE");
1247 23 : rb_gv_set("VERBOSE", Qfalse);
1248 23 : trackings_value = rb_ivar_get( _mSWIG, trackings_id );
1249 23 : rb_gv_set("VERBOSE", verbose);
1250 :
1251 : /* The trick here is that we have to store the hash table
1252 : pointer in a Ruby variable. We do not want Ruby's GC to
1253 : treat this pointer as a Ruby object, so we convert it to
1254 : a Ruby numeric value. */
1255 23 : if (trackings_value == Qnil) {
1256 : /* No, it hasn't. Create one ourselves */
1257 17 : swig_ruby_trackings = st_init_numtable();
1258 34 : rb_ivar_set( _mSWIG, trackings_id, SWIG2NUM(swig_ruby_trackings) );
1259 : } else {
1260 6 : swig_ruby_trackings = (st_table*)NUM2SWIG(trackings_value);
1261 : }
1262 :
1263 23 : rb_define_virtual_variable("SWIG_TRACKINGS_COUNT", swig_ruby_trackings_count, NULL);
1264 23 : }
1265 :
1266 : /* Add a Tracking from a C/C++ struct to a Ruby object */
1267 : SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) {
1268 : /* Store the mapping to the global hash table. */
1269 0 : st_insert(swig_ruby_trackings, (st_data_t)ptr, object);
1270 : }
1271 :
1272 : /* Get the Ruby object that owns the specified C/C++ struct */
1273 : SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
1274 : /* Now lookup the value stored in the global hash table */
1275 : VALUE value;
1276 :
1277 0 : if (st_lookup(swig_ruby_trackings, (st_data_t)ptr, &value)) {
1278 0 : return value;
1279 : } else {
1280 : return Qnil;
1281 : }
1282 : }
1283 :
1284 : /* Remove a Tracking from a C/C++ struct to a Ruby object. It
1285 : is very important to remove objects once they are destroyed
1286 : since the same memory address may be reused later to create
1287 : a new object. */
1288 0 : SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
1289 : /* Delete the object from the hash table */
1290 0 : st_delete(swig_ruby_trackings, (st_data_t *)&ptr, NULL);
1291 0 : }
1292 :
1293 : /* This is a helper method that unlinks a Ruby object from its
1294 : underlying C++ object. This is needed if the lifetime of the
1295 : Ruby object is longer than the C++ object */
1296 : SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
1297 : VALUE object = SWIG_RubyInstanceFor(ptr);
1298 :
1299 : if (object != Qnil) {
1300 : if (TYPE(object) != T_DATA)
1301 : abort();
1302 : DATA_PTR(object) = 0;
1303 : }
1304 : }
1305 :
1306 : /* This is a helper method that iterates over all the trackings
1307 : passing the C++ object pointer and its related Ruby object
1308 : to the passed callback function. */
1309 :
1310 : /* Proxy method to abstract the internal trackings datatype */
1311 : static int swig_ruby_internal_iterate_callback(void* ptr, VALUE obj, void(*meth)(void* ptr, VALUE obj)) {
1312 : (*meth)(ptr, obj);
1313 : return ST_CONTINUE;
1314 : }
1315 :
1316 : SWIGRUNTIME void SWIG_RubyIterateTrackings( void(*meth)(void* ptr, VALUE obj) ) {
1317 : st_foreach(swig_ruby_trackings, (int (*)(ANYARGS))&swig_ruby_internal_iterate_callback, (st_data_t)meth);
1318 : }
1319 :
1320 : #ifdef __cplusplus
1321 : }
1322 : #endif
1323 :
1324 : /* -----------------------------------------------------------------------------
1325 : * Ruby API portion that goes into the runtime
1326 : * ----------------------------------------------------------------------------- */
1327 :
1328 : #ifdef __cplusplus
1329 : extern "C" {
1330 : #endif
1331 :
1332 : SWIGINTERN VALUE
1333 : SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
1334 : if (NIL_P(target)) {
1335 : target = o;
1336 : } else {
1337 : if (TYPE(target) != T_ARRAY) {
1338 : VALUE o2 = target;
1339 : target = rb_ary_new();
1340 : rb_ary_push(target, o2);
1341 : }
1342 : rb_ary_push(target, o);
1343 : }
1344 : return target;
1345 : }
1346 :
1347 : /* For ruby1.8.4 and earlier. */
1348 : #ifndef RUBY_INIT_STACK
1349 : RUBY_EXTERN void Init_stack(VALUE* addr);
1350 : # define RUBY_INIT_STACK \
1351 : VALUE variable_in_this_stack_frame; \
1352 : Init_stack(&variable_in_this_stack_frame);
1353 : #endif
1354 :
1355 :
1356 : #ifdef __cplusplus
1357 : }
1358 : #endif
1359 :
1360 :
1361 : /* -----------------------------------------------------------------------------
1362 : * rubyrun.swg
1363 : *
1364 : * This file contains the runtime support for Ruby modules
1365 : * and includes code for managing global variables and pointer
1366 : * type checking.
1367 : * ----------------------------------------------------------------------------- */
1368 :
1369 : /* For backward compatibility only */
1370 : #define SWIG_POINTER_EXCEPTION 0
1371 :
1372 : /* for raw pointers */
1373 : #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1374 : #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1375 : #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags)
1376 : #define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own)
1377 : #define swig_owntype swig_ruby_owntype
1378 :
1379 : /* for raw packed data */
1380 : #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
1381 : #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type)
1382 :
1383 : /* for class or struct pointers */
1384 : #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1385 : #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1386 :
1387 : /* for C or C++ function pointers */
1388 : #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0)
1389 : #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0)
1390 :
1391 : /* for C++ member pointers, ie, member methods */
1392 : #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty)
1393 : #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type)
1394 :
1395 :
1396 : /* Runtime API */
1397 :
1398 : #define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule(clientdata)
1399 : #define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer)
1400 :
1401 :
1402 : /* Error manipulation */
1403 :
1404 : #define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code)
1405 : #define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg)
1406 : #define SWIG_fail goto fail
1407 :
1408 :
1409 : /* Ruby-specific SWIG API */
1410 :
1411 : #define SWIG_InitRuntime() SWIG_Ruby_InitRuntime()
1412 : #define SWIG_define_class(ty) SWIG_Ruby_define_class(ty)
1413 : #define SWIG_NewClassInstance(value, ty) SWIG_Ruby_NewClassInstance(value, ty)
1414 : #define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value)
1415 : #define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty)
1416 :
1417 : #include "assert.h"
1418 :
1419 : /* -----------------------------------------------------------------------------
1420 : * pointers/data manipulation
1421 : * ----------------------------------------------------------------------------- */
1422 :
1423 : #ifdef __cplusplus
1424 : extern "C" {
1425 : #endif
1426 :
1427 : typedef struct {
1428 : VALUE klass;
1429 : VALUE mImpl;
1430 : void (*mark)(void *);
1431 : void (*destroy)(void *);
1432 : int trackObjects;
1433 : } swig_class;
1434 :
1435 :
1436 : /* Global pointer used to keep some internal SWIG stuff */
1437 : static VALUE _cSWIG_Pointer = Qnil;
1438 : static VALUE swig_runtime_data_type_pointer = Qnil;
1439 :
1440 : /* Global IDs used to keep some internal SWIG stuff */
1441 : static ID swig_arity_id = 0;
1442 : static ID swig_call_id = 0;
1443 :
1444 : /*
1445 : If your swig extension is to be run within an embedded ruby and has
1446 : director callbacks, you should set -DRUBY_EMBEDDED during compilation.
1447 : This will reset ruby's stack frame on each entry point from the main
1448 : program the first time a virtual director function is invoked (in a
1449 : non-recursive way).
1450 : If this is not done, you run the risk of Ruby trashing the stack.
1451 : */
1452 :
1453 : #ifdef RUBY_EMBEDDED
1454 :
1455 : # define SWIG_INIT_STACK \
1456 : if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \
1457 : ++swig_virtual_calls;
1458 : # define SWIG_RELEASE_STACK --swig_virtual_calls;
1459 : # define Ruby_DirectorTypeMismatchException(x) \
1460 : rb_raise( rb_eTypeError, "%s", x ); return c_result;
1461 :
1462 : static unsigned int swig_virtual_calls = 0;
1463 :
1464 : #else /* normal non-embedded extension */
1465 :
1466 : # define SWIG_INIT_STACK
1467 : # define SWIG_RELEASE_STACK
1468 : # define Ruby_DirectorTypeMismatchException(x) \
1469 : throw Swig::DirectorTypeMismatchException( x );
1470 :
1471 : #endif /* RUBY_EMBEDDED */
1472 :
1473 :
1474 : SWIGRUNTIME VALUE
1475 10 : getExceptionClass(void) {
1476 : static int init = 0;
1477 : static VALUE rubyExceptionClass ;
1478 10 : if (!init) {
1479 2 : init = 1;
1480 2 : rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception"));
1481 : }
1482 10 : return rubyExceptionClass;
1483 : }
1484 :
1485 : /* This code checks to see if the Ruby object being raised as part
1486 : of an exception inherits from the Ruby class Exception. If so,
1487 : the object is simply returned. If not, then a new Ruby exception
1488 : object is created and that will be returned to Ruby.*/
1489 : SWIGRUNTIME VALUE
1490 10 : SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) {
1491 10 : VALUE exceptionClass = getExceptionClass();
1492 10 : if (rb_obj_is_kind_of(obj, exceptionClass)) {
1493 : return obj;
1494 : } else {
1495 0 : return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj));
1496 : }
1497 : }
1498 :
1499 : /* Initialize Ruby runtime support */
1500 : SWIGRUNTIME void
1501 23 : SWIG_Ruby_InitRuntime(void)
1502 : {
1503 23 : if (_mSWIG == Qnil) {
1504 23 : _mSWIG = rb_define_module("SWIG");
1505 23 : swig_call_id = rb_intern("call");
1506 23 : swig_arity_id = rb_intern("arity");
1507 : }
1508 23 : }
1509 :
1510 : /* Define Ruby class for C type */
1511 : SWIGRUNTIME void
1512 529 : SWIG_Ruby_define_class(swig_type_info *type)
1513 : {
1514 529 : char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1515 529 : sprintf(klass_name, "TYPE%s", type->name);
1516 529 : if (NIL_P(_cSWIG_Pointer)) {
1517 23 : _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
1518 23 : rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
1519 : }
1520 529 : rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
1521 529 : free((void *) klass_name);
1522 529 : }
1523 :
1524 : /* Create a new pointer object */
1525 : SWIGRUNTIME VALUE
1526 374 : SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1527 : {
1528 397 : int own = flags & SWIG_POINTER_OWN;
1529 : int track;
1530 : char *klass_name;
1531 : swig_class *sklass;
1532 : VALUE klass;
1533 : VALUE obj;
1534 :
1535 374 : if (!ptr)
1536 : return Qnil;
1537 :
1538 374 : if (type->clientdata) {
1539 374 : sklass = (swig_class *) type->clientdata;
1540 :
1541 : /* Are we tracking this class and have we already returned this Ruby object? */
1542 374 : track = sklass->trackObjects;
1543 374 : if (track) {
1544 0 : obj = SWIG_RubyInstanceFor(ptr);
1545 :
1546 : /* Check the object's type and make sure it has the correct type.
1547 : It might not in cases where methods do things like
1548 : downcast methods. */
1549 0 : if (obj != Qnil) {
1550 0 : VALUE value = rb_iv_get(obj, "@__swigtype__");
1551 0 : const char* type_name = RSTRING_PTR(value);
1552 :
1553 0 : if (strcmp(type->name, type_name) == 0) {
1554 : return obj;
1555 : }
1556 : }
1557 : }
1558 :
1559 : /* Create a new Ruby object */
1560 374 : obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark),
1561 : ( own ? VOIDFUNC(sklass->destroy) :
1562 : (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )
1563 374 : ), ptr);
1564 :
1565 : /* If tracking is on for this class then track this object. */
1566 374 : if (track) {
1567 : SWIG_RubyAddTracking(ptr, obj);
1568 : }
1569 : } else {
1570 0 : klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1571 0 : sprintf(klass_name, "TYPE%s", type->name);
1572 0 : klass = rb_const_get(_mSWIG, rb_intern(klass_name));
1573 0 : free((void *) klass_name);
1574 0 : obj = Data_Wrap_Struct(klass, 0, 0, ptr);
1575 : }
1576 374 : rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
1577 :
1578 : return obj;
1579 : }
1580 :
1581 : /* Create a new class instance (always owned) */
1582 : SWIGRUNTIME VALUE
1583 289 : SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
1584 : {
1585 : VALUE obj;
1586 289 : swig_class *sklass = (swig_class *) type->clientdata;
1587 289 : obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
1588 289 : rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
1589 289 : return obj;
1590 : }
1591 :
1592 : /* Get type mangle from class name */
1593 : SWIGRUNTIMEINLINE char *
1594 1432 : SWIG_Ruby_MangleStr(VALUE obj)
1595 : {
1596 1432 : VALUE stype = rb_iv_get(obj, "@__swigtype__");
1597 1432 : return StringValuePtr(stype);
1598 : }
1599 :
1600 : /* Acquire a pointer value */
1601 : typedef struct {
1602 : void (*datafree)(void *);
1603 : int own;
1604 : } swig_ruby_owntype;
1605 :
1606 : SWIGRUNTIME swig_ruby_owntype
1607 : SWIG_Ruby_AcquirePtr(VALUE obj, swig_ruby_owntype own) {
1608 : swig_ruby_owntype oldown = {0, 0};
1609 : if (obj) {
1610 : oldown.datafree = RDATA(obj)->dfree;
1611 : RDATA(obj)->dfree = own.datafree;
1612 : }
1613 : return oldown;
1614 : }
1615 :
1616 : /* Convert a pointer value */
1617 : SWIGRUNTIME int
1618 1473 : SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, swig_ruby_owntype *own)
1619 : {
1620 : char *c;
1621 : swig_cast_info *tc;
1622 1473 : void *vptr = 0;
1623 :
1624 : /* Grab the pointer */
1625 1473 : if (NIL_P(obj)) {
1626 0 : if (ptr)
1627 0 : *ptr = 0;
1628 : return SWIG_OK;
1629 : } else {
1630 1473 : if (TYPE(obj) != T_DATA) {
1631 : return SWIG_ERROR;
1632 : }
1633 1432 : Data_Get_Struct(obj, void, vptr);
1634 : }
1635 :
1636 1432 : if (own) {
1637 0 : own->datafree = RDATA(obj)->dfree;
1638 0 : own->own = 0;
1639 : }
1640 :
1641 : /* Check to see if the input object is giving up ownership
1642 : of the underlying C struct or C++ object. If so then we
1643 : need to reset the destructor since the Ruby object no
1644 : longer owns the underlying C++ object.*/
1645 1432 : if (flags & SWIG_POINTER_DISOWN) {
1646 : /* Is tracking on for this class? */
1647 0 : int track = 0;
1648 0 : if (ty && ty->clientdata) {
1649 0 : swig_class *sklass = (swig_class *) ty->clientdata;
1650 0 : track = sklass->trackObjects;
1651 : }
1652 :
1653 0 : if (track) {
1654 : /* We are tracking objects for this class. Thus we change the destructor
1655 : * to SWIG_RubyRemoveTracking. This allows us to
1656 : * remove the mapping from the C++ to Ruby object
1657 : * when the Ruby object is garbage collected. If we don't
1658 : * do this, then it is possible we will return a reference
1659 : * to a Ruby object that no longer exists thereby crashing Ruby. */
1660 0 : RDATA(obj)->dfree = SWIG_RubyRemoveTracking;
1661 : } else {
1662 0 : RDATA(obj)->dfree = 0;
1663 : }
1664 : }
1665 :
1666 : /* Do type-checking if type info was provided */
1667 1432 : if (ty) {
1668 1432 : if (ty->clientdata) {
1669 1432 : if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) {
1670 1419 : if (vptr == 0) {
1671 : /* The object has already been deleted */
1672 : return SWIG_ObjectPreviouslyDeletedError;
1673 : }
1674 : }
1675 : }
1676 1432 : if ((c = SWIG_MangleStr(obj)) == NULL) {
1677 : return SWIG_ERROR;
1678 : }
1679 1432 : tc = SWIG_TypeCheck(c, ty);
1680 1432 : if (!tc) {
1681 : return SWIG_ERROR;
1682 : } else {
1683 1419 : if (ptr) {
1684 1419 : if (tc->type == ty) {
1685 1419 : *ptr = vptr;
1686 : } else {
1687 0 : int newmemory = 0;
1688 0 : *ptr = SWIG_TypeCast(tc, vptr, &newmemory);
1689 0 : if (newmemory == SWIG_CAST_NEW_MEMORY) {
1690 : assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
1691 0 : if (own)
1692 0 : own->own = own->own | SWIG_CAST_NEW_MEMORY;
1693 : }
1694 : }
1695 : }
1696 : }
1697 : } else {
1698 0 : if (ptr)
1699 0 : *ptr = vptr;
1700 : }
1701 :
1702 : return SWIG_OK;
1703 : }
1704 :
1705 : /* Check convert */
1706 : SWIGRUNTIMEINLINE int
1707 : SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
1708 : {
1709 : char *c = SWIG_MangleStr(obj);
1710 : if (!c) return 0;
1711 : return SWIG_TypeCheck(c,ty) != 0;
1712 : }
1713 :
1714 : SWIGRUNTIME VALUE
1715 : SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
1716 : char result[1024];
1717 : char *r = result;
1718 : if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
1719 : *(r++) = '_';
1720 : r = SWIG_PackData(r, ptr, sz);
1721 : strcpy(r, type->name);
1722 : return rb_str_new2(result);
1723 : }
1724 :
1725 : /* Convert a packed value value */
1726 : SWIGRUNTIME int
1727 : SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
1728 : swig_cast_info *tc;
1729 : const char *c;
1730 :
1731 : if (TYPE(obj) != T_STRING) goto type_error;
1732 : c = StringValuePtr(obj);
1733 : /* Pointer values must start with leading underscore */
1734 : if (*c != '_') goto type_error;
1735 : c++;
1736 : c = SWIG_UnpackData(c, ptr, sz);
1737 : if (ty) {
1738 : tc = SWIG_TypeCheck(c, ty);
1739 : if (!tc) goto type_error;
1740 : }
1741 : return SWIG_OK;
1742 :
1743 : type_error:
1744 : return SWIG_ERROR;
1745 : }
1746 :
1747 : SWIGRUNTIME swig_module_info *
1748 23 : SWIG_Ruby_GetModule(void *SWIGUNUSEDPARM(clientdata))
1749 : {
1750 : VALUE pointer;
1751 23 : swig_module_info *ret = 0;
1752 23 : VALUE verbose = rb_gv_get("VERBOSE");
1753 :
1754 : /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */
1755 23 : rb_gv_set("VERBOSE", Qfalse);
1756 :
1757 : /* first check if pointer already created */
1758 23 : pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1759 23 : if (pointer != Qnil) {
1760 6 : Data_Get_Struct(pointer, swig_module_info, ret);
1761 : }
1762 :
1763 : /* reinstate warnings */
1764 23 : rb_gv_set("VERBOSE", verbose);
1765 23 : return ret;
1766 : }
1767 :
1768 : SWIGRUNTIME void
1769 17 : SWIG_Ruby_SetModule(swig_module_info *pointer)
1770 : {
1771 : /* register a new class */
1772 17 : VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
1773 : /* create and store the structure pointer to a global variable */
1774 17 : swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
1775 17 : rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
1776 17 : }
1777 :
1778 : /* This function can be used to check whether a proc or method or similarly
1779 : callable function has been passed. Usually used in a %typecheck, like:
1780 :
1781 : %typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) {
1782 : $result = SWIG_Ruby_isCallable( $input );
1783 : }
1784 : */
1785 : SWIGINTERN
1786 : int SWIG_Ruby_isCallable( VALUE proc )
1787 : {
1788 : if ( rb_respond_to( proc, swig_call_id ) )
1789 : return 1;
1790 : return 0;
1791 : }
1792 :
1793 : /* This function can be used to check the arity (number of arguments)
1794 : a proc or method can take. Usually used in a %typecheck.
1795 : Valid arities will be that equal to minimal or those < 0
1796 : which indicate a variable number of parameters at the end.
1797 : */
1798 : SWIGINTERN
1799 : int SWIG_Ruby_arity( VALUE proc, int minimal )
1800 : {
1801 : if ( rb_respond_to( proc, swig_arity_id ) )
1802 : {
1803 : VALUE num = rb_funcall( proc, swig_arity_id, 0 );
1804 : int arity = NUM2INT(num);
1805 : if ( arity < 0 && (arity+1) < -minimal ) return 1;
1806 : if ( arity == minimal ) return 1;
1807 : return 1;
1808 : }
1809 : return 0;
1810 : }
1811 :
1812 :
1813 : #ifdef __cplusplus
1814 : }
1815 : #endif
1816 :
1817 :
1818 :
1819 : #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1820 :
1821 : #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1822 :
1823 :
1824 :
1825 : #define SWIG_exception(code, msg) do { SWIG_Error(code, msg);; } while(0)
1826 :
1827 :
1828 : /* -------- TYPES TABLE (BEGIN) -------- */
1829 :
1830 : #define SWIGTYPE_p_char swig_types[0]
1831 : #define SWIGTYPE_p_int swig_types[1]
1832 : #define SWIGTYPE_p_kdb__ContractException swig_types[2]
1833 : #define SWIGTYPE_p_kdb__Exception swig_types[3]
1834 : #define SWIGTYPE_p_kdb__KDB swig_types[4]
1835 : #define SWIGTYPE_p_kdb__KDBException swig_types[5]
1836 : #define SWIGTYPE_p_kdb__Key swig_types[6]
1837 : #define SWIGTYPE_p_kdb__KeyException swig_types[7]
1838 : #define SWIGTYPE_p_kdb__KeyInvalidName swig_types[8]
1839 : #define SWIGTYPE_p_kdb__KeyNotFoundException swig_types[9]
1840 : #define SWIGTYPE_p_kdb__KeySet swig_types[10]
1841 : #define SWIGTYPE_p_kdb__KeyTypeConversion swig_types[11]
1842 : #define SWIGTYPE_p_kdb__KeyTypeMismatch swig_types[12]
1843 : #define SWIGTYPE_p_long_long swig_types[13]
1844 : #define SWIGTYPE_p_short swig_types[14]
1845 : #define SWIGTYPE_p_signed_char swig_types[15]
1846 : #define SWIGTYPE_p_std__exception swig_types[16]
1847 : #define SWIGTYPE_p_unsigned_char swig_types[17]
1848 : #define SWIGTYPE_p_unsigned_int swig_types[18]
1849 : #define SWIGTYPE_p_unsigned_long_long swig_types[19]
1850 : #define SWIGTYPE_p_unsigned_short swig_types[20]
1851 : #define SWIGTYPE_p_va_list swig_types[21]
1852 : #define SWIGTYPE_p_void swig_types[22]
1853 : static swig_type_info *swig_types[24];
1854 : static swig_module_info swig_module = {swig_types, 23, 0, 0, 0, 0};
1855 : #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1856 : #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1857 :
1858 : /* -------- TYPES TABLE (END) -------- */
1859 :
1860 : #define SWIG_init Init__kdb
1861 : #define SWIG_name "Kdb"
1862 :
1863 : /*
1864 : Document-module: Kdb
1865 :
1866 : This module is a SWIG generated binding for KDB (https://www.libelektra.org),
1867 : therefore the module provides wrapper classes to KDBs C++ interface and is
1868 : mainly a 1 to 1 relation. However, to provide a more Ruby-style API to KDB,
1869 : this module differs to the C++ API in the following way:
1870 : * C++ iterators for Key/KeySet are excluded. Instead KeySet implements
1871 : a 'each' method and includes 'Enumerable'. Therefore it is very similar to
1872 : a Ruby-Array. However, the KeySet cursor methods are still available.
1873 : * Access to native C-level KDB structures (such as ckdb::Key) is not
1874 : possible, as this does not make much sense within Ruby.
1875 : * Method names are renamed to follow Ruby naming conventions
1876 : * Key and KeySet methods directly modify the underlying Key/KeySet
1877 :
1878 : Please note, this documentation will show C++ types too (e.g. std::string).
1879 :
1880 : */
1881 : static VALUE mKdb;
1882 :
1883 : #define SWIG_RUBY_THREAD_BEGIN_BLOCK
1884 : #define SWIG_RUBY_THREAD_END_BLOCK
1885 :
1886 :
1887 : #define SWIGVERSION 0x030010
1888 : #define SWIG_VERSION SWIGVERSION
1889 :
1890 :
1891 : #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
1892 : #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
1893 :
1894 :
1895 : #include <stdexcept>
1896 :
1897 :
1898 : #include <string>
1899 :
1900 :
1901 : #include <stdint.h> // Use the C99 official header
1902 :
1903 :
1904 : #include <stdexcept>
1905 :
1906 :
1907 : extern "C" {
1908 : #include "kdbconfig.h"
1909 : #include "kdb.h"
1910 : }
1911 :
1912 : #include "keyexcept.hpp"
1913 : #include "kdbexcept.hpp"
1914 : #include "key.hpp"
1915 : #include "keyset.hpp"
1916 : #include "kdb.hpp"
1917 : using namespace kdb;
1918 :
1919 :
1920 : SWIGINTERN swig_type_info*
1921 0 : SWIG_pchar_descriptor(void)
1922 : {
1923 : static int init = 0;
1924 : static swig_type_info* info = 0;
1925 0 : if (!init) {
1926 0 : info = SWIG_TypeQuery("_p_char");
1927 0 : init = 1;
1928 : }
1929 0 : return info;
1930 : }
1931 :
1932 :
1933 : SWIGINTERNINLINE VALUE
1934 318 : SWIG_FromCharPtrAndSize(const char* carray, size_t size)
1935 : {
1936 318 : if (carray) {
1937 318 : if (size > LONG_MAX) {
1938 0 : swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
1939 0 : return pchar_descriptor ?
1940 : SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : Qnil;
1941 : } else {
1942 318 : return rb_str_new(carray, static_cast< long >(size));
1943 : }
1944 : } else {
1945 : return Qnil;
1946 : }
1947 : }
1948 :
1949 :
1950 : SWIGINTERNINLINE VALUE
1951 0 : SWIG_FromCharPtr(const char *cptr)
1952 : {
1953 46 : return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
1954 : }
1955 :
1956 :
1957 : #include <limits.h>
1958 : #if !defined(SWIG_NO_LLONG_MAX)
1959 : # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
1960 : # define LLONG_MAX __LONG_LONG_MAX__
1961 : # define LLONG_MIN (-LLONG_MAX - 1LL)
1962 : # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
1963 : # endif
1964 : #endif
1965 :
1966 :
1967 : #define SWIG_From_long LONG2NUM
1968 :
1969 :
1970 : SWIGINTERNINLINE VALUE
1971 : SWIG_From_short (short value)
1972 : {
1973 69 : return SWIG_From_long (value);
1974 : }
1975 :
1976 :
1977 : SWIGINTERNINLINE VALUE
1978 : SWIG_From_int (int value)
1979 : {
1980 1158 : return SWIG_From_long (value);
1981 : }
1982 :
1983 :
1984 : SWIGINTERN int
1985 302 : SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
1986 : {
1987 302 : if (TYPE(obj) == T_STRING) {
1988 302 : char *cstr = StringValuePtr(obj);
1989 302 : size_t size = RSTRING_LEN(obj) + 1;
1990 302 : if (cptr) {
1991 302 : if (alloc) {
1992 302 : if (*alloc == SWIG_NEWOBJ) {
1993 0 : *cptr = reinterpret_cast< char* >(memcpy((new char[size]), cstr, sizeof(char)*(size)));
1994 : } else {
1995 302 : *cptr = cstr;
1996 302 : *alloc = SWIG_OLDOBJ;
1997 : }
1998 : }
1999 : }
2000 302 : if (psize) *psize = size;
2001 : return SWIG_OK;
2002 : } else {
2003 0 : swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
2004 0 : if (pchar_descriptor) {
2005 0 : void* vptr = 0;
2006 0 : if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
2007 0 : if (cptr) *cptr = (char *)vptr;
2008 0 : if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0;
2009 0 : if (alloc) *alloc = SWIG_OLDOBJ;
2010 0 : return SWIG_OK;
2011 : }
2012 : }
2013 : }
2014 : return SWIG_TypeError;
2015 : }
2016 :
2017 :
2018 : SWIGINTERN int
2019 265 : SWIG_AsPtr_std_string (VALUE obj, std::string **val)
2020 : {
2021 265 : char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
2022 265 : if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
2023 265 : if (buf) {
2024 1060 : if (val) *val = new std::string(buf, size - 1);
2025 265 : if (alloc == SWIG_NEWOBJ) delete[] buf;
2026 : return SWIG_NEWOBJ;
2027 : } else {
2028 0 : if (val) *val = 0;
2029 : return SWIG_OLDOBJ;
2030 : }
2031 : } else {
2032 : static int init = 0;
2033 : static swig_type_info* descriptor = 0;
2034 0 : if (!init) {
2035 0 : descriptor = SWIG_TypeQuery("std::string" " *");
2036 0 : init = 1;
2037 : }
2038 0 : if (descriptor) {
2039 : std::string *vptr;
2040 0 : int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0);
2041 0 : if (SWIG_IsOK(res) && val) *val = vptr;
2042 : return res;
2043 : }
2044 : }
2045 : return SWIG_ERROR;
2046 : }
2047 :
2048 :
2049 :
2050 :
2051 :
2052 : SWIGINTERNINLINE VALUE
2053 : SWIG_From_std_string (const std::string& s)
2054 : {
2055 544 : return SWIG_FromCharPtrAndSize(s.data(), s.size());
2056 : }
2057 :
2058 :
2059 : SWIGINTERNINLINE VALUE
2060 : SWIG_From_bool (bool value)
2061 : {
2062 103 : return value ? Qtrue : Qfalse;
2063 : }
2064 :
2065 :
2066 : SWIGINTERN VALUE
2067 0 : SWIG_ruby_failed(void)
2068 : {
2069 0 : return Qnil;
2070 : }
2071 :
2072 :
2073 : /*@SWIG:/usr/share/swig3.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2074 : SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
2075 : {
2076 : VALUE obj = args[0];
2077 : VALUE type = TYPE(obj);
2078 : unsigned long *res = (unsigned long *)(args[1]);
2079 : *res = type == T_FIXNUM ? NUM2ULONG(obj) : rb_big2ulong(obj);
2080 : return obj;
2081 : }
2082 : /*@SWIG@*/
2083 :
2084 : SWIGINTERN int
2085 : SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val)
2086 : {
2087 : VALUE type = TYPE(obj);
2088 : if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
2089 : unsigned long v;
2090 : VALUE a[2];
2091 : a[0] = obj;
2092 : a[1] = (VALUE)(&v);
2093 : if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
2094 : if (val) *val = v;
2095 : return SWIG_OK;
2096 : }
2097 : }
2098 : return SWIG_TypeError;
2099 : }
2100 :
2101 :
2102 : #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
2103 : # define SWIG_LONG_LONG_AVAILABLE
2104 : #endif
2105 :
2106 :
2107 : #ifdef SWIG_LONG_LONG_AVAILABLE
2108 : /*@SWIG:/usr/share/swig3.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2109 : SWIGINTERN VALUE SWIG_AUX_NUM2ULL(VALUE *args)
2110 : {
2111 : VALUE obj = args[0];
2112 : VALUE type = TYPE(obj);
2113 : long long *res = (long long *)(args[1]);
2114 : *res = type == T_FIXNUM ? NUM2ULL(obj) : rb_big2ull(obj);
2115 : return obj;
2116 : }
2117 : /*@SWIG@*/
2118 :
2119 : SWIGINTERN int
2120 : SWIG_AsVal_unsigned_SS_long_SS_long (VALUE obj, unsigned long long *val)
2121 : {
2122 : VALUE type = TYPE(obj);
2123 : if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
2124 : unsigned long long v;
2125 : VALUE a[2];
2126 : a[0] = obj;
2127 : a[1] = (VALUE)(&v);
2128 : if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
2129 : if (val) *val = v;
2130 : return SWIG_OK;
2131 : }
2132 : }
2133 : return SWIG_TypeError;
2134 : }
2135 : #endif
2136 :
2137 :
2138 : SWIGINTERNINLINE int
2139 : SWIG_AsVal_size_t (VALUE obj, size_t *val)
2140 : {
2141 : int res = SWIG_TypeError;
2142 : #ifdef SWIG_LONG_LONG_AVAILABLE
2143 : if (sizeof(size_t) <= sizeof(unsigned long)) {
2144 : #endif
2145 : unsigned long v;
2146 : res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
2147 : if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
2148 : #ifdef SWIG_LONG_LONG_AVAILABLE
2149 : } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
2150 : unsigned long long v;
2151 : res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
2152 : if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
2153 : }
2154 : #endif
2155 : return res;
2156 : }
2157 :
2158 12 : SWIGINTERN kdb::KeySet *kdb_Key_meta(kdb::Key *self){
2159 : /* create a new KeySet with all meta keys added */
2160 24 : kdb::KeySet* metaKeys = new kdb::KeySet();
2161 24 : kdb::Key curMeta;
2162 : self->rewindMeta();
2163 240 : while ((curMeta = self->nextMeta()) != nullptr) {
2164 : metaKeys->append(curMeta);
2165 : }
2166 :
2167 24 : return metaKeys;
2168 : }
2169 2 : SWIGINTERN kdb::Key *kdb_Key_clone(kdb::Key *self){
2170 : kdb::Key *k;
2171 4 : k = new kdb::Key();
2172 2 : k->copy(*self);
2173 2 : return k;
2174 : }
2175 : SWIGINTERN int kdb_Key_spaceship(kdb::Key *self,kdb::Key const &comp){
2176 42 : int ret = ckdb::keyCmp (self->getKey(), comp.getKey());
2177 21 : if (ret < 0) return -1;
2178 20 : if (ret > 0) return 1;
2179 : return 0;
2180 : }
2181 :
2182 : /*@SWIG:/usr/share/swig3.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2183 62 : SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
2184 : {
2185 62 : VALUE obj = args[0];
2186 62 : VALUE type = TYPE(obj);
2187 62 : long *res = (long *)(args[1]);
2188 62 : *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj);
2189 62 : return obj;
2190 : }
2191 : /*@SWIG@*/
2192 :
2193 : SWIGINTERN int
2194 62 : SWIG_AsVal_long (VALUE obj, long* val)
2195 : {
2196 62 : VALUE type = TYPE(obj);
2197 62 : if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
2198 : long v;
2199 : VALUE a[2];
2200 62 : a[0] = obj;
2201 62 : a[1] = (VALUE)(&v);
2202 62 : if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
2203 62 : if (val) *val = v;
2204 62 : return SWIG_OK;
2205 : }
2206 : }
2207 : return SWIG_TypeError;
2208 : }
2209 :
2210 :
2211 : SWIGINTERN int
2212 : SWIG_AsVal_int (VALUE obj, int *val)
2213 : {
2214 : long v;
2215 3 : int res = SWIG_AsVal_long (obj, &v);
2216 3 : if (SWIG_IsOK(res)) {
2217 3 : if ((v < INT_MIN || v > INT_MAX)) {
2218 : return SWIG_OverflowError;
2219 : } else {
2220 3 : if (val) *val = static_cast< int >(v);
2221 : }
2222 : }
2223 : return res;
2224 : }
2225 :
2226 5 : SWIGINTERN kdb::KeySet *new_kdb_KeySet__SWIG_2(kdb::Key *key){
2227 10 : KeySet* ks = new KeySet();
2228 5 : ks->append(*key);
2229 5 : return ks;
2230 : }
2231 31 : SWIGINTERN void kdb_KeySet_each(kdb::KeySet *self){
2232 31 : if (rb_block_given_p()) {
2233 31 : cursor_t cur_pos = self->getCursor();
2234 :
2235 877 : for ( self->rewind(); self->next(); ) {
2236 : VALUE cur;
2237 398 : Key * t = new Key(self->current());
2238 199 : cur = SWIG_NewPointerObj(t, SWIGTYPE_p_kdb__Key, 1);
2239 :
2240 199 : rb_yield(cur);
2241 : /* nothing to free here, Ruby is owner of the new Key obj, which
2242 : will be freed by the garbage collector */
2243 : }
2244 : /* restore current cursor position */
2245 : self->setCursor(cur_pos);
2246 : }
2247 28 : }
2248 : SWIGINTERN bool kdb_KeySet_operator_Se__Se_(kdb::KeySet *self,kdb::KeySet const &rhs){
2249 11 : return *self == rhs;
2250 : }
2251 4 : SWIGINTERN kdb::Key kdb_KeySet_delete_at(kdb::KeySet *self,cursor_t pos){
2252 4 : Key k = self->at(pos);
2253 4 : if (!k.isNull()) {
2254 6 : self->lookup(k, KDB_O_POP);
2255 : }
2256 4 : return k;
2257 : }
2258 3 : SWIGINTERN kdb::Key kdb_KeySet_delete___SWIG_0(kdb::KeySet *self,kdb::Key const &key){
2259 3 : return self->lookup(key, KDB_O_POP);
2260 : }
2261 3 : SWIGINTERN kdb::Key kdb_KeySet_delete___SWIG_1(kdb::KeySet *self,std::string const &name){
2262 3 : return self->lookup(name, KDB_O_POP);
2263 : }
2264 : SWIGINTERN bool kdb_KeySet_empty(kdb::KeySet *self){
2265 6 : return self->size() == 0;
2266 : }
2267 :
2268 : SWIGINTERN int
2269 0 : SWIG_AsVal_bool (VALUE obj, bool *val)
2270 : {
2271 0 : if (obj == Qtrue) {
2272 0 : if (val) *val = true;
2273 : return SWIG_OK;
2274 0 : } else if (obj == Qfalse) {
2275 0 : if (val) *val = false;
2276 : return SWIG_OK;
2277 : } else {
2278 0 : int res = 0;
2279 0 : if (SWIG_AsVal_int (obj, &res) == SWIG_OK) {
2280 0 : if (val) *val = res ? true : false;
2281 : return SWIG_OK;
2282 : }
2283 : }
2284 : return SWIG_TypeError;
2285 : }
2286 :
2287 :
2288 : /*
2289 : Document-class: Kdb::Exception
2290 :
2291 : Proxy of C++ Kdb::Exception class
2292 :
2293 :
2294 : */
2295 : static swig_class SwigClassException;
2296 :
2297 :
2298 : /*
2299 : Document-method: Kdb::Exception.to_s
2300 :
2301 : call-seq:
2302 : to_s -> char const *
2303 :
2304 : An instance method.
2305 :
2306 : */
2307 : SWIGINTERN VALUE
2308 0 : _wrap_Exception_to_s(int argc, VALUE *argv, VALUE self) {
2309 0 : kdb::Exception *arg1 = (kdb::Exception *) 0 ;
2310 0 : void *argp1 = 0 ;
2311 0 : int res1 = 0 ;
2312 0 : char *result = 0 ;
2313 0 : VALUE vresult = Qnil;
2314 :
2315 0 : if ((argc < 0) || (argc > 0)) {
2316 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2317 : }
2318 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Exception, 0 | 0 );
2319 0 : if (!SWIG_IsOK(res1)) {
2320 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Exception const *","what", 1, self ));
2321 : }
2322 0 : arg1 = reinterpret_cast< kdb::Exception * >(argp1);
2323 0 : result = (char *)((kdb::Exception const *)arg1)->what();
2324 0 : vresult = SWIG_FromCharPtr((const char *)result);
2325 : return vresult;
2326 : fail:
2327 : return Qnil;
2328 : }
2329 :
2330 :
2331 : SWIGINTERN VALUE
2332 : #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2333 0 : _wrap_Exception_allocate(VALUE self)
2334 : #else
2335 : _wrap_Exception_allocate(int argc, VALUE *argv, VALUE self)
2336 : #endif
2337 : {
2338 0 : VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_kdb__Exception);
2339 : #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2340 : rb_obj_call_init(vresult, argc, argv);
2341 : #endif
2342 0 : return vresult;
2343 : }
2344 :
2345 :
2346 :
2347 : /*
2348 : Document-method: Kdb::Exception.new
2349 :
2350 : call-seq:
2351 : Exception.new
2352 :
2353 : Class constructor.
2354 :
2355 : */
2356 : SWIGINTERN VALUE
2357 0 : _wrap_new_Exception(int argc, VALUE *argv, VALUE self) {
2358 0 : kdb::Exception *result = 0 ;
2359 :
2360 0 : if ((argc < 0) || (argc > 0)) {
2361 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2362 : }
2363 0 : result = (kdb::Exception *)new kdb::Exception();
2364 0 : DATA_PTR(self) = result;
2365 : return self;
2366 : fail:
2367 : return Qnil;
2368 : }
2369 :
2370 :
2371 : SWIGINTERN void
2372 0 : free_kdb_Exception(void *self) {
2373 0 : kdb::Exception *arg1 = (kdb::Exception *)self;
2374 0 : delete arg1;
2375 0 : }
2376 :
2377 :
2378 : /*
2379 : Document-class: Kdb::KeyException < Kdb::kdb::Exception
2380 :
2381 : Proxy of C++ Kdb::KeyException class
2382 :
2383 :
2384 : */
2385 : static swig_class SwigClassKeyException;
2386 :
2387 : SWIGINTERN VALUE
2388 : #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2389 0 : _wrap_KeyException_allocate(VALUE self)
2390 : #else
2391 : _wrap_KeyException_allocate(int argc, VALUE *argv, VALUE self)
2392 : #endif
2393 : {
2394 0 : VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_kdb__KeyException);
2395 : #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2396 : rb_obj_call_init(vresult, argc, argv);
2397 : #endif
2398 0 : return vresult;
2399 : }
2400 :
2401 :
2402 :
2403 : /*
2404 : Document-method: Kdb::KeyException.new
2405 :
2406 : call-seq:
2407 : KeyException.new
2408 :
2409 : Class constructor.
2410 :
2411 : */
2412 : SWIGINTERN VALUE
2413 0 : _wrap_new_KeyException(int argc, VALUE *argv, VALUE self) {
2414 0 : kdb::KeyException *result = 0 ;
2415 :
2416 0 : if ((argc < 0) || (argc > 0)) {
2417 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2418 : }
2419 0 : result = (kdb::KeyException *)new kdb::KeyException();
2420 0 : DATA_PTR(self) = result;
2421 : return self;
2422 : fail:
2423 : return Qnil;
2424 : }
2425 :
2426 :
2427 : SWIGINTERN void
2428 0 : free_kdb_KeyException(void *self) {
2429 0 : kdb::KeyException *arg1 = (kdb::KeyException *)self;
2430 0 : delete arg1;
2431 0 : }
2432 :
2433 :
2434 : /*
2435 : Document-class: Kdb::KeyNotFoundException < Kdb::kdb::Exception
2436 :
2437 : Proxy of C++ Kdb::KeyNotFoundException class
2438 :
2439 :
2440 : */
2441 : static swig_class SwigClassKeyNotFoundException;
2442 :
2443 : SWIGINTERN VALUE
2444 : #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2445 0 : _wrap_KeyNotFoundException_allocate(VALUE self)
2446 : #else
2447 : _wrap_KeyNotFoundException_allocate(int argc, VALUE *argv, VALUE self)
2448 : #endif
2449 : {
2450 0 : VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_kdb__KeyNotFoundException);
2451 : #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2452 : rb_obj_call_init(vresult, argc, argv);
2453 : #endif
2454 0 : return vresult;
2455 : }
2456 :
2457 :
2458 :
2459 : /*
2460 : Document-method: Kdb::KeyNotFoundException.new
2461 :
2462 : call-seq:
2463 : KeyNotFoundException.new(std::string message)
2464 :
2465 : Class constructor.
2466 :
2467 : */
2468 : SWIGINTERN VALUE
2469 0 : _wrap_new_KeyNotFoundException(int argc, VALUE *argv, VALUE self) {
2470 0 : std::string arg1 ;
2471 0 : kdb::KeyNotFoundException *result = 0 ;
2472 :
2473 0 : if ((argc < 1) || (argc > 1)) {
2474 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2475 : }
2476 : {
2477 0 : std::string *ptr = (std::string *)0;
2478 0 : int res = SWIG_AsPtr_std_string(argv[0], &ptr);
2479 0 : if (!SWIG_IsOK(res) || !ptr) {
2480 0 : SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::string","KeyNotFoundException", 1, argv[0] ));
2481 : }
2482 0 : arg1 = *ptr;
2483 0 : if (SWIG_IsNewObj(res)) delete ptr;
2484 : }
2485 0 : result = (kdb::KeyNotFoundException *)new kdb::KeyNotFoundException(arg1);
2486 0 : DATA_PTR(self) = result;
2487 0 : return self;
2488 : fail:
2489 : return Qnil;
2490 : }
2491 :
2492 :
2493 : SWIGINTERN void
2494 0 : free_kdb_KeyNotFoundException(void *self) {
2495 0 : kdb::KeyNotFoundException *arg1 = (kdb::KeyNotFoundException *)self;
2496 0 : delete arg1;
2497 0 : }
2498 :
2499 :
2500 : /*
2501 : Document-class: Kdb::KeyTypeMismatch < Kdb::kdb::KeyException
2502 :
2503 : Proxy of C++ Kdb::KeyTypeMismatch class
2504 :
2505 :
2506 : */
2507 : static swig_class SwigClassKeyTypeMismatch;
2508 :
2509 : SWIGINTERN VALUE
2510 : #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2511 0 : _wrap_KeyTypeMismatch_allocate(VALUE self)
2512 : #else
2513 : _wrap_KeyTypeMismatch_allocate(int argc, VALUE *argv, VALUE self)
2514 : #endif
2515 : {
2516 0 : VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_kdb__KeyTypeMismatch);
2517 : #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2518 : rb_obj_call_init(vresult, argc, argv);
2519 : #endif
2520 0 : return vresult;
2521 : }
2522 :
2523 :
2524 :
2525 : /*
2526 : Document-method: Kdb::KeyTypeMismatch.new
2527 :
2528 : call-seq:
2529 : KeyTypeMismatch.new
2530 :
2531 : Class constructor.
2532 :
2533 : */
2534 : SWIGINTERN VALUE
2535 0 : _wrap_new_KeyTypeMismatch(int argc, VALUE *argv, VALUE self) {
2536 0 : kdb::KeyTypeMismatch *result = 0 ;
2537 :
2538 0 : if ((argc < 0) || (argc > 0)) {
2539 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2540 : }
2541 0 : result = (kdb::KeyTypeMismatch *)new kdb::KeyTypeMismatch();
2542 0 : DATA_PTR(self) = result;
2543 : return self;
2544 : fail:
2545 : return Qnil;
2546 : }
2547 :
2548 :
2549 : SWIGINTERN void
2550 2 : free_kdb_KeyTypeMismatch(void *self) {
2551 2 : kdb::KeyTypeMismatch *arg1 = (kdb::KeyTypeMismatch *)self;
2552 2 : delete arg1;
2553 2 : }
2554 :
2555 :
2556 : /*
2557 : Document-class: Kdb::KeyTypeConversion < Kdb::kdb::KeyException
2558 :
2559 : Proxy of C++ Kdb::KeyTypeConversion class
2560 :
2561 :
2562 : */
2563 : static swig_class SwigClassKeyTypeConversion;
2564 :
2565 : SWIGINTERN VALUE
2566 : #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2567 0 : _wrap_KeyTypeConversion_allocate(VALUE self)
2568 : #else
2569 : _wrap_KeyTypeConversion_allocate(int argc, VALUE *argv, VALUE self)
2570 : #endif
2571 : {
2572 0 : VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_kdb__KeyTypeConversion);
2573 : #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2574 : rb_obj_call_init(vresult, argc, argv);
2575 : #endif
2576 0 : return vresult;
2577 : }
2578 :
2579 :
2580 :
2581 : /*
2582 : Document-method: Kdb::KeyTypeConversion.new
2583 :
2584 : call-seq:
2585 : KeyTypeConversion.new
2586 :
2587 : Class constructor.
2588 :
2589 : */
2590 : SWIGINTERN VALUE
2591 0 : _wrap_new_KeyTypeConversion(int argc, VALUE *argv, VALUE self) {
2592 0 : kdb::KeyTypeConversion *result = 0 ;
2593 :
2594 0 : if ((argc < 0) || (argc > 0)) {
2595 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2596 : }
2597 0 : result = (kdb::KeyTypeConversion *)new kdb::KeyTypeConversion();
2598 0 : DATA_PTR(self) = result;
2599 : return self;
2600 : fail:
2601 : return Qnil;
2602 : }
2603 :
2604 :
2605 : SWIGINTERN void
2606 0 : free_kdb_KeyTypeConversion(void *self) {
2607 0 : kdb::KeyTypeConversion *arg1 = (kdb::KeyTypeConversion *)self;
2608 0 : delete arg1;
2609 0 : }
2610 :
2611 :
2612 : /*
2613 : Document-class: Kdb::KeyInvalidName < Kdb::kdb::KeyException
2614 :
2615 : Proxy of C++ Kdb::KeyInvalidName class
2616 :
2617 :
2618 : */
2619 : static swig_class SwigClassKeyInvalidName;
2620 :
2621 : SWIGINTERN VALUE
2622 : #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2623 0 : _wrap_KeyInvalidName_allocate(VALUE self)
2624 : #else
2625 : _wrap_KeyInvalidName_allocate(int argc, VALUE *argv, VALUE self)
2626 : #endif
2627 : {
2628 0 : VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_kdb__KeyInvalidName);
2629 : #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2630 : rb_obj_call_init(vresult, argc, argv);
2631 : #endif
2632 0 : return vresult;
2633 : }
2634 :
2635 :
2636 :
2637 : /*
2638 : Document-method: Kdb::KeyInvalidName.new
2639 :
2640 : call-seq:
2641 : KeyInvalidName.new
2642 :
2643 : Class constructor.
2644 :
2645 : */
2646 : SWIGINTERN VALUE
2647 0 : _wrap_new_KeyInvalidName(int argc, VALUE *argv, VALUE self) {
2648 0 : kdb::KeyInvalidName *result = 0 ;
2649 :
2650 0 : if ((argc < 0) || (argc > 0)) {
2651 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2652 : }
2653 0 : result = (kdb::KeyInvalidName *)new kdb::KeyInvalidName();
2654 0 : DATA_PTR(self) = result;
2655 : return self;
2656 : fail:
2657 : return Qnil;
2658 : }
2659 :
2660 :
2661 : SWIGINTERN void
2662 4 : free_kdb_KeyInvalidName(void *self) {
2663 4 : kdb::KeyInvalidName *arg1 = (kdb::KeyInvalidName *)self;
2664 4 : delete arg1;
2665 4 : }
2666 :
2667 :
2668 : /*
2669 : Document-class: Kdb::Key
2670 :
2671 : call-seq:
2672 :
2673 :
2674 : Wrapper class for C++ kdb::Key, thus for a full
2675 : documentation see https://doc.libelektra.org/api/current/htmlKey.html.
2676 :
2677 : However, to allow a more Ruby way of programming this class differs from
2678 : the original C++ class in the following aspects:
2679 : - method names follow ruby naming conventions
2680 : - variable length argument list (`va_list`) is implemented using Rubys
2681 : parameter Hash method.
2682 : - getter methods to underlaying Elektra Key (C) are not included
2683 : - C++ Iterators for iterating over meta data are not included. Instaed use
2684 : Key.next_meta, Key.current_meta, Key.rewind_meta and Key.meta.
2685 : - Key.meta allows access to the meta data key set
2686 : - string length methods are not included (e.g. key.getNameSize())
2687 : .
2688 : */
2689 : static swig_class SwigClassKey;
2690 :
2691 :
2692 : /*
2693 : Document-method: Kdb::Key.new
2694 :
2695 : call-seq:
2696 :
2697 :
2698 :
2699 :
2700 : Allocate a new Key
2701 :
2702 : The following variants are available:
2703 :
2704 : call-seq:
2705 : Kdb::Key.new
2706 : Kdb::Key.new keyname
2707 : Kdb::Key.new keyname, options-Hash
2708 :
2709 : k = Kdb::Key.new
2710 :
2711 : k = Kdb::Key.new('user/myapp/config1',
2712 : value: 'hello',
2713 : owner: 'me',
2714 : meta-data1: 'meta')
2715 : .
2716 : */
2717 : SWIGINTERN VALUE
2718 7 : _wrap_new_Key__SWIG_0(int argc, VALUE *argv, VALUE self) {
2719 7 : kdb::Key *result = 0 ;
2720 :
2721 7 : if ((argc < 0) || (argc > 0)) {
2722 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2723 : }
2724 : try {
2725 14 : result = (kdb::Key *)new kdb::Key();
2726 7 : DATA_PTR(self) = result;
2727 : }
2728 0 : catch(std::bad_alloc &_e) {
2729 0 : SWIG_exception_fail(SWIG_MemoryError, (&_e)->what());
2730 : }
2731 :
2732 : return self;
2733 : fail:
2734 : return Qnil;
2735 : }
2736 :
2737 :
2738 : SWIGINTERN VALUE
2739 189 : _wrap_new_Key__SWIG_1(int argc, VALUE *argv, VALUE self) {
2740 378 : std::string arg1 ;
2741 189 : void *arg2 = 0 ;
2742 189 : kdb::Key *result = 0 ;
2743 :
2744 189 : if (argc < 1) {
2745 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2746 : }
2747 : {
2748 189 : std::string *ptr = (std::string *)0;
2749 189 : int res = SWIG_AsPtr_std_string(argv[0], &ptr);
2750 189 : if (!SWIG_IsOK(res) || !ptr) {
2751 0 : SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::string const","Key", 1, argv[0] ));
2752 : }
2753 378 : arg1 = *ptr;
2754 378 : if (SWIG_IsNewObj(res)) delete ptr;
2755 : }
2756 : try {
2757 378 : result = (kdb::Key *)new kdb::Key(arg1,arg2);
2758 189 : DATA_PTR(self) = result;
2759 : }
2760 0 : catch(std::bad_alloc &_e) {
2761 0 : SWIG_exception_fail(SWIG_MemoryError, (&_e)->what());
2762 : }
2763 :
2764 189 : return self;
2765 : fail:
2766 : return Qnil;
2767 : }
2768 :
2769 :
2770 : SWIGINTERN VALUE
2771 : #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2772 233 : _wrap_Key_allocate(VALUE self)
2773 : #else
2774 : _wrap_Key_allocate(int argc, VALUE *argv, VALUE self)
2775 : #endif
2776 : {
2777 233 : VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_kdb__Key);
2778 : #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2779 : rb_obj_call_init(vresult, argc, argv);
2780 : #endif
2781 233 : return vresult;
2782 : }
2783 :
2784 :
2785 : SWIGINTERN VALUE
2786 37 : _wrap_new_Key__SWIG_2(int argc, VALUE *argv, VALUE self) {
2787 37 : char *arg1 = (char *) 0 ;
2788 : va_list arg2 ;
2789 : int res1 ;
2790 37 : char *buf1 = 0 ;
2791 37 : int alloc1 = 0 ;
2792 37 : kdb::Key *result = 0 ;
2793 :
2794 37 : if ((argc < 2) || (argc > 2)) {
2795 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2796 : }
2797 37 : res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
2798 37 : if (!SWIG_IsOK(res1)) {
2799 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","Key", 1, argv[0] ));
2800 : }
2801 37 : arg1 = reinterpret_cast< char * >(buf1);
2802 : {
2803 : // we expect to be argv[1] to be a Ruby Hash
2804 37 : Check_Type(argv[1], T_HASH);
2805 : }
2806 : {
2807 : /* standard method invocation would be:
2808 : try {
2809 : result = (kdb::Key *)new kdb::Key((char const *)arg1,arg2);
2810 : DATA_PTR(self) = result;}
2811 : catch(std::bad_alloc &_e) {SWIG_exception_fail(SWIG_MemoryError, (&_e)->what());
2812 : }
2813 :
2814 : */
2815 : /* exception features do not have local variables,
2816 : so we define them our selfs */
2817 37 : int hash_size = 0;
2818 : VALUE keys_arr;
2819 : VALUE key;
2820 : VALUE val;
2821 : int i;
2822 37 : int flags = 0;
2823 :
2824 :
2825 : /* $input substitution does not here, so we have to reference
2826 : input variables directly */
2827 :
2828 37 : hash_size = NUM2INT(rb_funcall(argv[1], rb_intern("size"), 0, NULL));
2829 37 : keys_arr = rb_funcall(argv[1], rb_intern("keys"), 0, NULL);
2830 37 : if (hash_size > 0) {
2831 : /* first we check if we can find the "flags" key.
2832 : this has to be passed to the kdb::Key constructor already */
2833 173 : for (i = 0; i < hash_size; i++) {
2834 68 : key = rb_ary_entry(keys_arr, i);
2835 68 : val = rb_hash_aref(argv[1], key);
2836 : /* convert key to String, in case of being a Symbol */
2837 68 : key = rb_funcall(key, rb_intern("to_s"), 0, NULL);
2838 : /* check for flags and extract them */
2839 68 : if (strcmp("flags", StringValueCStr(key)) == 0) {
2840 6 : Check_Type(val, T_FIXNUM);
2841 6 : flags = NUM2INT(val);
2842 : //printf("got flags: %d\n", flags);
2843 : }
2844 : }
2845 : }
2846 : /* invoke method
2847 : since we can't use arg2 here (is of type va_list)
2848 : we have to do it ourself (not very portable)
2849 : */
2850 : try {
2851 37 : result = (kdb::Key *)new kdb::Key((char const *)arg1,
2852 : KEY_FLAGS, flags,
2853 37 : KEY_END);
2854 0 : } catch (std::bad_alloc &_e) {
2855 0 : SWIG_exception_fail(SWIG_MemoryError, (&_e)->what());
2856 : }
2857 37 : DATA_PTR(self) = result;
2858 :
2859 37 : if (hash_size > 0) {
2860 : /* now treat (nearly) all key-value pairs as meta data, thus
2861 : assign it to the newly created kdb::Key object */
2862 173 : for (i = 0; i < hash_size; i++) {
2863 68 : key = rb_ary_entry(keys_arr, i);
2864 68 : val = rb_hash_aref(argv[1], key);
2865 68 : key = rb_funcall(key, rb_intern("to_s"), 0, NULL);
2866 68 : val = rb_funcall(val, rb_intern("to_s"), 0, NULL);
2867 : /* ignore certain keys */
2868 68 : if (strcmp("flags", StringValueCStr(key)) == 0) continue;
2869 : /* 'value' has also a special meaning */
2870 62 : if (strcmp("value", StringValueCStr(key)) == 0) {
2871 33 : if (flags & KEY_BINARY) {
2872 4 : result->setBinary(StringValuePtr(val), RSTRING_LEN(val));
2873 : } else {
2874 145 : result->setString(StringValueCStr(val));
2875 : }
2876 : } else {
2877 116 : result->setMeta(StringValueCStr(key), StringValueCStr(val));
2878 : }
2879 : }
2880 : }
2881 :
2882 : }
2883 37 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
2884 : return self;
2885 : fail:
2886 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
2887 : return Qnil;
2888 : }
2889 :
2890 :
2891 233 : SWIGINTERN VALUE _wrap_new_Key(int nargs, VALUE *args, VALUE self) {
2892 : int argc;
2893 : VALUE argv[2];
2894 : int ii;
2895 :
2896 233 : argc = nargs;
2897 233 : if (argc > 2) SWIG_fail;
2898 : for (ii = 0; (ii < argc); ++ii) {
2899 : argv[ii] = args[ii];
2900 : }
2901 233 : if (argc == 0) {
2902 7 : return _wrap_new_Key__SWIG_0(nargs, args, self);
2903 : }
2904 226 : if (argc == 1) {
2905 189 : return _wrap_new_Key__SWIG_1(nargs, args, self);
2906 : }
2907 37 : if (argc == 2) {
2908 37 : return _wrap_new_Key__SWIG_2(nargs, args, self);
2909 : }
2910 :
2911 : fail:
2912 : Ruby_Format_OverloadedError( argc, 2, "Key.new",
2913 : " Key.new()\n"
2914 : " Key.new(std::string const keyName, ...)\n"
2915 0 : " Key.new(char const *keyName, va_list ap)\n");
2916 :
2917 : return Qnil;
2918 : }
2919 :
2920 :
2921 :
2922 : /*
2923 : Document-method: Kdb::Key.get_reference_counter
2924 :
2925 : call-seq:
2926 : get_reference_counter -> ssize_t
2927 :
2928 : An instance method.
2929 :
2930 : */
2931 : SWIGINTERN VALUE
2932 0 : _wrap_Key_get_reference_counter(int argc, VALUE *argv, VALUE self) {
2933 0 : kdb::Key *arg1 = (kdb::Key *) 0 ;
2934 0 : void *argp1 = 0 ;
2935 0 : int res1 = 0 ;
2936 : ssize_t result;
2937 0 : VALUE vresult = Qnil;
2938 :
2939 0 : if ((argc < 0) || (argc > 0)) {
2940 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2941 : }
2942 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
2943 0 : if (!SWIG_IsOK(res1)) {
2944 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","getReferenceCounter", 1, self ));
2945 : }
2946 0 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
2947 0 : result = ((kdb::Key const *)arg1)->getReferenceCounter();
2948 0 : vresult = SWIG_From_long(static_cast< long >(result));
2949 : return vresult;
2950 : fail:
2951 : return Qnil;
2952 : }
2953 :
2954 :
2955 :
2956 : /*
2957 : Document-method: Kdb::Key.clear
2958 :
2959 : call-seq:
2960 : clear
2961 :
2962 : An instance method.
2963 :
2964 : */
2965 : SWIGINTERN VALUE
2966 0 : _wrap_Key_clear(int argc, VALUE *argv, VALUE self) {
2967 0 : kdb::Key *arg1 = (kdb::Key *) 0 ;
2968 0 : void *argp1 = 0 ;
2969 0 : int res1 = 0 ;
2970 :
2971 0 : if ((argc < 0) || (argc > 0)) {
2972 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2973 : }
2974 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
2975 0 : if (!SWIG_IsOK(res1)) {
2976 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key *","clear", 1, self ));
2977 : }
2978 0 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
2979 0 : (arg1)->clear();
2980 : return Qnil;
2981 : fail:
2982 : return Qnil;
2983 : }
2984 :
2985 :
2986 : SWIGINTERN void
2987 572 : free_kdb_Key(void *self) {
2988 572 : kdb::Key *arg1 = (kdb::Key *)self;
2989 1144 : delete arg1;
2990 572 : }
2991 :
2992 :
2993 : /*
2994 : Document-method: Kdb::Key.name
2995 :
2996 : call-seq:
2997 : name -> std::string
2998 :
2999 : An instance method.
3000 :
3001 : */
3002 : SWIGINTERN VALUE
3003 129 : _wrap_Key_name(int argc, VALUE *argv, VALUE self) {
3004 129 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3005 129 : void *argp1 = 0 ;
3006 129 : int res1 = 0 ;
3007 258 : std::string result;
3008 129 : VALUE vresult = Qnil;
3009 :
3010 129 : if ((argc < 0) || (argc > 0)) {
3011 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3012 : }
3013 129 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3014 129 : if (!SWIG_IsOK(res1)) {
3015 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","getName", 1, self ));
3016 : }
3017 129 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3018 : try {
3019 258 : result = ((kdb::Key const *)arg1)->getName();
3020 : }
3021 0 : catch(kdb::KeyException &_e) {
3022 0 : rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_kdb__KeyException, SWIG_NewPointerObj((new kdb::KeyException(static_cast< const kdb::KeyException& >(_e))),SWIGTYPE_p_kdb__KeyException,SWIG_POINTER_OWN))); SWIG_fail;
3023 : }
3024 :
3025 387 : vresult = SWIG_From_std_string(static_cast< std::string >(result));
3026 129 : return vresult;
3027 : fail:
3028 : return Qnil;
3029 : }
3030 :
3031 :
3032 :
3033 : /*
3034 : Document-method: Kdb::Key.basename
3035 :
3036 : call-seq:
3037 : basename -> std::string
3038 :
3039 : An instance method.
3040 :
3041 : */
3042 : SWIGINTERN VALUE
3043 8 : _wrap_Key_basename(int argc, VALUE *argv, VALUE self) {
3044 8 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3045 8 : void *argp1 = 0 ;
3046 8 : int res1 = 0 ;
3047 16 : std::string result;
3048 8 : VALUE vresult = Qnil;
3049 :
3050 8 : if ((argc < 0) || (argc > 0)) {
3051 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3052 : }
3053 8 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3054 8 : if (!SWIG_IsOK(res1)) {
3055 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","getBaseName", 1, self ));
3056 : }
3057 8 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3058 16 : result = ((kdb::Key const *)arg1)->getBaseName();
3059 24 : vresult = SWIG_From_std_string(static_cast< std::string >(result));
3060 8 : return vresult;
3061 : fail:
3062 : return Qnil;
3063 : }
3064 :
3065 :
3066 :
3067 : /*
3068 : Document-method: Kdb::Key.name=
3069 :
3070 : call-seq:
3071 : name=(std::string const & newName)
3072 :
3073 : An instance method.
3074 :
3075 : */
3076 : SWIGINTERN VALUE
3077 5 : _wrap_Key_namee___(int argc, VALUE *argv, VALUE self) {
3078 5 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3079 5 : std::string *arg2 = 0 ;
3080 5 : void *argp1 = 0 ;
3081 5 : int res1 = 0 ;
3082 5 : int res2 = SWIG_OLDOBJ ;
3083 :
3084 5 : if ((argc < 1) || (argc > 1)) {
3085 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3086 : }
3087 5 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3088 5 : if (!SWIG_IsOK(res1)) {
3089 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key *","setName", 1, self ));
3090 : }
3091 5 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3092 : {
3093 5 : std::string *ptr = (std::string *)0;
3094 5 : res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
3095 5 : if (!SWIG_IsOK(res2)) {
3096 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","setName", 2, argv[0] ));
3097 : }
3098 5 : if (!ptr) {
3099 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","setName", 2, argv[0]));
3100 : }
3101 5 : arg2 = ptr;
3102 : }
3103 : try {
3104 5 : (arg1)->setName((std::string const &)*arg2);
3105 : }
3106 1 : catch(kdb::KeyInvalidName &_e) {
3107 2 : rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_kdb__KeyInvalidName, SWIG_NewPointerObj((new kdb::KeyInvalidName(static_cast< const kdb::KeyInvalidName& >(_e))),SWIGTYPE_p_kdb__KeyInvalidName,SWIG_POINTER_OWN))); SWIG_fail;
3108 : }
3109 :
3110 8 : if (SWIG_IsNewObj(res2)) delete arg2;
3111 : return Qnil;
3112 : fail:
3113 : if (SWIG_IsNewObj(res2)) delete arg2;
3114 : return Qnil;
3115 : }
3116 :
3117 :
3118 :
3119 : /*
3120 : Document-method: Kdb::Key.add_name
3121 :
3122 : call-seq:
3123 : add_name(std::string const & addedName)
3124 :
3125 : An instance method.
3126 :
3127 : */
3128 : SWIGINTERN VALUE
3129 4 : _wrap_Key_add_name(int argc, VALUE *argv, VALUE self) {
3130 4 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3131 4 : std::string *arg2 = 0 ;
3132 4 : void *argp1 = 0 ;
3133 4 : int res1 = 0 ;
3134 4 : int res2 = SWIG_OLDOBJ ;
3135 :
3136 4 : if ((argc < 1) || (argc > 1)) {
3137 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3138 : }
3139 4 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3140 4 : if (!SWIG_IsOK(res1)) {
3141 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key *","addName", 1, self ));
3142 : }
3143 4 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3144 : {
3145 4 : std::string *ptr = (std::string *)0;
3146 4 : res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
3147 4 : if (!SWIG_IsOK(res2)) {
3148 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","addName", 2, argv[0] ));
3149 : }
3150 4 : if (!ptr) {
3151 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","addName", 2, argv[0]));
3152 : }
3153 4 : arg2 = ptr;
3154 : }
3155 : try {
3156 4 : (arg1)->addName((std::string const &)*arg2);
3157 : }
3158 1 : catch(kdb::KeyInvalidName &_e) {
3159 2 : rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_kdb__KeyInvalidName, SWIG_NewPointerObj((new kdb::KeyInvalidName(static_cast< const kdb::KeyInvalidName& >(_e))),SWIGTYPE_p_kdb__KeyInvalidName,SWIG_POINTER_OWN))); SWIG_fail;
3160 : }
3161 :
3162 6 : if (SWIG_IsNewObj(res2)) delete arg2;
3163 : return Qnil;
3164 : fail:
3165 : if (SWIG_IsNewObj(res2)) delete arg2;
3166 : return Qnil;
3167 : }
3168 :
3169 :
3170 :
3171 : /*
3172 : Document-method: Kdb::Key.basename=
3173 :
3174 : call-seq:
3175 : basename=(std::string const & baseName)
3176 :
3177 : An instance method.
3178 :
3179 : */
3180 : SWIGINTERN VALUE
3181 1 : _wrap_Key_basenamee___(int argc, VALUE *argv, VALUE self) {
3182 1 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3183 1 : std::string *arg2 = 0 ;
3184 1 : void *argp1 = 0 ;
3185 1 : int res1 = 0 ;
3186 1 : int res2 = SWIG_OLDOBJ ;
3187 :
3188 1 : if ((argc < 1) || (argc > 1)) {
3189 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3190 : }
3191 1 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3192 1 : if (!SWIG_IsOK(res1)) {
3193 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key *","setBaseName", 1, self ));
3194 : }
3195 1 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3196 : {
3197 1 : std::string *ptr = (std::string *)0;
3198 1 : res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
3199 1 : if (!SWIG_IsOK(res2)) {
3200 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","setBaseName", 2, argv[0] ));
3201 : }
3202 1 : if (!ptr) {
3203 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","setBaseName", 2, argv[0]));
3204 : }
3205 1 : arg2 = ptr;
3206 : }
3207 : try {
3208 1 : (arg1)->setBaseName((std::string const &)*arg2);
3209 : }
3210 1 : catch(kdb::KeyInvalidName &_e) {
3211 2 : rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_kdb__KeyInvalidName, SWIG_NewPointerObj((new kdb::KeyInvalidName(static_cast< const kdb::KeyInvalidName& >(_e))),SWIGTYPE_p_kdb__KeyInvalidName,SWIG_POINTER_OWN))); SWIG_fail;
3212 : }
3213 :
3214 0 : if (SWIG_IsNewObj(res2)) delete arg2;
3215 : return Qnil;
3216 : fail:
3217 : if (SWIG_IsNewObj(res2)) delete arg2;
3218 : return Qnil;
3219 : }
3220 :
3221 :
3222 :
3223 : /*
3224 : Document-method: Kdb::Key.add_basename
3225 :
3226 : call-seq:
3227 : add_basename(std::string const & baseName)
3228 :
3229 : An instance method.
3230 :
3231 : */
3232 : SWIGINTERN VALUE
3233 13 : _wrap_Key_add_basename(int argc, VALUE *argv, VALUE self) {
3234 13 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3235 13 : std::string *arg2 = 0 ;
3236 13 : void *argp1 = 0 ;
3237 13 : int res1 = 0 ;
3238 13 : int res2 = SWIG_OLDOBJ ;
3239 :
3240 13 : if ((argc < 1) || (argc > 1)) {
3241 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3242 : }
3243 13 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3244 13 : if (!SWIG_IsOK(res1)) {
3245 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key *","addBaseName", 1, self ));
3246 : }
3247 13 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3248 : {
3249 13 : std::string *ptr = (std::string *)0;
3250 13 : res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
3251 13 : if (!SWIG_IsOK(res2)) {
3252 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","addBaseName", 2, argv[0] ));
3253 : }
3254 13 : if (!ptr) {
3255 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","addBaseName", 2, argv[0]));
3256 : }
3257 13 : arg2 = ptr;
3258 : }
3259 : try {
3260 13 : (arg1)->addBaseName((std::string const &)*arg2);
3261 : }
3262 1 : catch(kdb::KeyInvalidName &_e) {
3263 2 : rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_kdb__KeyInvalidName, SWIG_NewPointerObj((new kdb::KeyInvalidName(static_cast< const kdb::KeyInvalidName& >(_e))),SWIGTYPE_p_kdb__KeyInvalidName,SWIG_POINTER_OWN))); SWIG_fail;
3264 : }
3265 :
3266 24 : if (SWIG_IsNewObj(res2)) delete arg2;
3267 : return Qnil;
3268 : fail:
3269 : if (SWIG_IsNewObj(res2)) delete arg2;
3270 : return Qnil;
3271 : }
3272 :
3273 :
3274 :
3275 : /*
3276 : Document-method: Kdb::Key.del_base_name
3277 :
3278 : call-seq:
3279 : del_base_name
3280 :
3281 : An instance method.
3282 :
3283 : */
3284 : SWIGINTERN VALUE
3285 0 : _wrap_Key_del_base_name(int argc, VALUE *argv, VALUE self) {
3286 0 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3287 0 : void *argp1 = 0 ;
3288 0 : int res1 = 0 ;
3289 :
3290 0 : if ((argc < 0) || (argc > 0)) {
3291 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3292 : }
3293 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3294 0 : if (!SWIG_IsOK(res1)) {
3295 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key *","delBaseName", 1, self ));
3296 : }
3297 0 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3298 0 : (arg1)->delBaseName();
3299 : return Qnil;
3300 : fail:
3301 : return Qnil;
3302 : }
3303 :
3304 :
3305 :
3306 : /*
3307 : Document-method: Kdb::Key.fullname
3308 :
3309 : call-seq:
3310 : fullname -> std::string
3311 :
3312 : An instance method.
3313 :
3314 : */
3315 : SWIGINTERN VALUE
3316 5 : _wrap_Key_fullname(int argc, VALUE *argv, VALUE self) {
3317 5 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3318 5 : void *argp1 = 0 ;
3319 5 : int res1 = 0 ;
3320 10 : std::string result;
3321 5 : VALUE vresult = Qnil;
3322 :
3323 5 : if ((argc < 0) || (argc > 0)) {
3324 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3325 : }
3326 5 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3327 5 : if (!SWIG_IsOK(res1)) {
3328 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","getFullName", 1, self ));
3329 : }
3330 5 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3331 : try {
3332 10 : result = ((kdb::Key const *)arg1)->getFullName();
3333 : }
3334 0 : catch(kdb::KeyException &_e) {
3335 0 : rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_kdb__KeyException, SWIG_NewPointerObj((new kdb::KeyException(static_cast< const kdb::KeyException& >(_e))),SWIGTYPE_p_kdb__KeyException,SWIG_POINTER_OWN))); SWIG_fail;
3336 : }
3337 :
3338 15 : vresult = SWIG_From_std_string(static_cast< std::string >(result));
3339 5 : return vresult;
3340 : fail:
3341 : return Qnil;
3342 : }
3343 :
3344 :
3345 :
3346 : /*
3347 : Document-method: Kdb::Key.==
3348 :
3349 : call-seq:
3350 : ==(k) -> bool
3351 :
3352 : Equality comparison operator.
3353 : */
3354 : SWIGINTERN VALUE
3355 82 : _wrap_Key___eq__(int argc, VALUE *argv, VALUE self) {
3356 82 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3357 82 : kdb::Key *arg2 = 0 ;
3358 82 : void *argp1 = 0 ;
3359 82 : int res1 = 0 ;
3360 : void *argp2 ;
3361 82 : int res2 = 0 ;
3362 : bool result;
3363 82 : VALUE vresult = Qnil;
3364 :
3365 82 : if ((argc < 1) || (argc > 1)) {
3366 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3367 : }
3368 82 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3369 82 : if (!SWIG_IsOK(res1)) {
3370 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","operator ==", 1, self ));
3371 : }
3372 82 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3373 82 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__Key, 0 );
3374 82 : if (!SWIG_IsOK(res2)) {
3375 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::Key const &","operator ==", 2, argv[0] ));
3376 : }
3377 82 : if (!argp2) {
3378 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key const &","operator ==", 2, argv[0]));
3379 : }
3380 82 : arg2 = reinterpret_cast< kdb::Key * >(argp2);
3381 82 : result = (bool)((kdb::Key const *)arg1)->operator ==((kdb::Key const &)*arg2);
3382 82 : vresult = SWIG_From_bool(static_cast< bool >(result));
3383 : return vresult;
3384 : fail:
3385 : return Qnil;
3386 : }
3387 :
3388 :
3389 :
3390 : /*
3391 : Document-method: Kdb::Key.<
3392 :
3393 : call-seq:
3394 : <(other) -> bool
3395 :
3396 : Lower than comparison operator.
3397 : */
3398 : SWIGINTERN VALUE
3399 1 : _wrap_Key___lt__(int argc, VALUE *argv, VALUE self) {
3400 1 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3401 1 : kdb::Key *arg2 = 0 ;
3402 1 : void *argp1 = 0 ;
3403 1 : int res1 = 0 ;
3404 : void *argp2 ;
3405 1 : int res2 = 0 ;
3406 : bool result;
3407 1 : VALUE vresult = Qnil;
3408 :
3409 1 : if ((argc < 1) || (argc > 1)) {
3410 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3411 : }
3412 1 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3413 1 : if (!SWIG_IsOK(res1)) {
3414 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","operator <", 1, self ));
3415 : }
3416 1 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3417 1 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__Key, 0 );
3418 1 : if (!SWIG_IsOK(res2)) {
3419 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::Key const &","operator <", 2, argv[0] ));
3420 : }
3421 1 : if (!argp2) {
3422 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key const &","operator <", 2, argv[0]));
3423 : }
3424 1 : arg2 = reinterpret_cast< kdb::Key * >(argp2);
3425 1 : result = (bool)((kdb::Key const *)arg1)->operator <((kdb::Key const &)*arg2);
3426 1 : vresult = SWIG_From_bool(static_cast< bool >(result));
3427 : return vresult;
3428 : fail:
3429 : return Qnil;
3430 : }
3431 :
3432 :
3433 :
3434 : /*
3435 : Document-method: Kdb::Key.<=
3436 :
3437 : call-seq:
3438 : <=(other) -> bool
3439 :
3440 : Lower or equal comparison operator.
3441 : */
3442 : SWIGINTERN VALUE
3443 1 : _wrap_Key___le__(int argc, VALUE *argv, VALUE self) {
3444 1 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3445 1 : kdb::Key *arg2 = 0 ;
3446 1 : void *argp1 = 0 ;
3447 1 : int res1 = 0 ;
3448 : void *argp2 ;
3449 1 : int res2 = 0 ;
3450 : bool result;
3451 1 : VALUE vresult = Qnil;
3452 :
3453 1 : if ((argc < 1) || (argc > 1)) {
3454 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3455 : }
3456 1 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3457 1 : if (!SWIG_IsOK(res1)) {
3458 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","operator <=", 1, self ));
3459 : }
3460 1 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3461 1 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__Key, 0 );
3462 1 : if (!SWIG_IsOK(res2)) {
3463 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::Key const &","operator <=", 2, argv[0] ));
3464 : }
3465 1 : if (!argp2) {
3466 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key const &","operator <=", 2, argv[0]));
3467 : }
3468 1 : arg2 = reinterpret_cast< kdb::Key * >(argp2);
3469 1 : result = (bool)((kdb::Key const *)arg1)->operator <=((kdb::Key const &)*arg2);
3470 1 : vresult = SWIG_From_bool(static_cast< bool >(result));
3471 : return vresult;
3472 : fail:
3473 : return Qnil;
3474 : }
3475 :
3476 :
3477 :
3478 : /*
3479 : Document-method: Kdb::Key.>
3480 :
3481 : call-seq:
3482 : >(other) -> bool
3483 :
3484 : Higher than comparison operator.
3485 : */
3486 : SWIGINTERN VALUE
3487 1 : _wrap_Key___gt__(int argc, VALUE *argv, VALUE self) {
3488 1 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3489 1 : kdb::Key *arg2 = 0 ;
3490 1 : void *argp1 = 0 ;
3491 1 : int res1 = 0 ;
3492 : void *argp2 ;
3493 1 : int res2 = 0 ;
3494 : bool result;
3495 1 : VALUE vresult = Qnil;
3496 :
3497 1 : if ((argc < 1) || (argc > 1)) {
3498 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3499 : }
3500 1 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3501 1 : if (!SWIG_IsOK(res1)) {
3502 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","operator >", 1, self ));
3503 : }
3504 1 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3505 1 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__Key, 0 );
3506 1 : if (!SWIG_IsOK(res2)) {
3507 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::Key const &","operator >", 2, argv[0] ));
3508 : }
3509 1 : if (!argp2) {
3510 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key const &","operator >", 2, argv[0]));
3511 : }
3512 1 : arg2 = reinterpret_cast< kdb::Key * >(argp2);
3513 1 : result = (bool)((kdb::Key const *)arg1)->operator >((kdb::Key const &)*arg2);
3514 1 : vresult = SWIG_From_bool(static_cast< bool >(result));
3515 : return vresult;
3516 : fail:
3517 : return Qnil;
3518 : }
3519 :
3520 :
3521 :
3522 : /*
3523 : Document-method: Kdb::Key.>=
3524 :
3525 : call-seq:
3526 : >=(other) -> bool
3527 :
3528 : Higher or equal comparison operator.
3529 : */
3530 : SWIGINTERN VALUE
3531 1 : _wrap_Key___ge__(int argc, VALUE *argv, VALUE self) {
3532 1 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3533 1 : kdb::Key *arg2 = 0 ;
3534 1 : void *argp1 = 0 ;
3535 1 : int res1 = 0 ;
3536 : void *argp2 ;
3537 1 : int res2 = 0 ;
3538 : bool result;
3539 1 : VALUE vresult = Qnil;
3540 :
3541 1 : if ((argc < 1) || (argc > 1)) {
3542 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3543 : }
3544 1 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3545 1 : if (!SWIG_IsOK(res1)) {
3546 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","operator >=", 1, self ));
3547 : }
3548 1 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3549 1 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__Key, 0 );
3550 1 : if (!SWIG_IsOK(res2)) {
3551 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::Key const &","operator >=", 2, argv[0] ));
3552 : }
3553 1 : if (!argp2) {
3554 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key const &","operator >=", 2, argv[0]));
3555 : }
3556 1 : arg2 = reinterpret_cast< kdb::Key * >(argp2);
3557 1 : result = (bool)((kdb::Key const *)arg1)->operator >=((kdb::Key const &)*arg2);
3558 1 : vresult = SWIG_From_bool(static_cast< bool >(result));
3559 : return vresult;
3560 : fail:
3561 : return Qnil;
3562 : }
3563 :
3564 :
3565 :
3566 : /*
3567 : Document-method: Kdb::Key.is_null
3568 :
3569 : call-seq:
3570 : is_null -> bool
3571 :
3572 : An instance method.
3573 :
3574 : */
3575 : SWIGINTERN VALUE
3576 1 : _wrap_Key_is_nullq___(int argc, VALUE *argv, VALUE self) {
3577 1 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3578 1 : void *argp1 = 0 ;
3579 1 : int res1 = 0 ;
3580 : bool result;
3581 1 : VALUE vresult = Qnil;
3582 :
3583 1 : if ((argc < 0) || (argc > 0)) {
3584 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3585 : }
3586 1 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3587 1 : if (!SWIG_IsOK(res1)) {
3588 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","isNull", 1, self ));
3589 : }
3590 1 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3591 1 : result = (bool)((kdb::Key const *)arg1)->isNull();
3592 1 : vresult = (result ? Qtrue : Qfalse);
3593 : return vresult;
3594 : fail:
3595 : return Qnil;
3596 : }
3597 :
3598 :
3599 :
3600 : /*
3601 : Document-method: Kdb::Key.need_sync
3602 :
3603 : call-seq:
3604 : need_sync -> bool
3605 :
3606 : An instance method.
3607 :
3608 : */
3609 : SWIGINTERN VALUE
3610 0 : _wrap_Key_need_syncq___(int argc, VALUE *argv, VALUE self) {
3611 0 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3612 0 : void *argp1 = 0 ;
3613 0 : int res1 = 0 ;
3614 : bool result;
3615 0 : VALUE vresult = Qnil;
3616 :
3617 0 : if ((argc < 0) || (argc > 0)) {
3618 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3619 : }
3620 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3621 0 : if (!SWIG_IsOK(res1)) {
3622 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","needSync", 1, self ));
3623 : }
3624 0 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3625 0 : result = (bool)((kdb::Key const *)arg1)->needSync();
3626 0 : vresult = (result ? Qtrue : Qfalse);
3627 : return vresult;
3628 : fail:
3629 : return Qnil;
3630 : }
3631 :
3632 :
3633 :
3634 : /*
3635 : Document-method: Kdb::Key.get_string
3636 :
3637 : call-seq:
3638 : get_string -> std::string
3639 :
3640 : An instance method.
3641 :
3642 : */
3643 : SWIGINTERN VALUE
3644 5 : _wrap_Key_get_string(int argc, VALUE *argv, VALUE self) {
3645 5 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3646 5 : void *argp1 = 0 ;
3647 5 : int res1 = 0 ;
3648 9 : std::string result;
3649 5 : VALUE vresult = Qnil;
3650 :
3651 5 : if ((argc < 0) || (argc > 0)) {
3652 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3653 : }
3654 5 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3655 5 : if (!SWIG_IsOK(res1)) {
3656 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","getString", 1, self ));
3657 : }
3658 5 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3659 : try {
3660 9 : result = ((kdb::Key const *)arg1)->getString();
3661 : }
3662 1 : catch(kdb::KeyTypeMismatch &_e) {
3663 2 : rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_kdb__KeyTypeMismatch, SWIG_NewPointerObj((new kdb::KeyTypeMismatch(static_cast< const kdb::KeyTypeMismatch& >(_e))),SWIGTYPE_p_kdb__KeyTypeMismatch,SWIG_POINTER_OWN))); SWIG_fail;
3664 : }
3665 0 : catch(kdb::KeyException &_e) {
3666 0 : rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_kdb__KeyException, SWIG_NewPointerObj((new kdb::KeyException(static_cast< const kdb::KeyException& >(_e))),SWIGTYPE_p_kdb__KeyException,SWIG_POINTER_OWN))); SWIG_fail;
3667 : }
3668 :
3669 12 : vresult = SWIG_From_std_string(static_cast< std::string >(result));
3670 4 : return vresult;
3671 : fail:
3672 : return Qnil;
3673 : }
3674 :
3675 :
3676 :
3677 : /*
3678 : Document-method: Kdb::Key.set_string
3679 :
3680 : call-seq:
3681 : set_string(std::string newString)
3682 :
3683 : An instance method.
3684 :
3685 : */
3686 : SWIGINTERN VALUE
3687 2 : _wrap_Key_set_string(int argc, VALUE *argv, VALUE self) {
3688 2 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3689 4 : std::string arg2 ;
3690 2 : void *argp1 = 0 ;
3691 2 : int res1 = 0 ;
3692 :
3693 2 : if ((argc < 1) || (argc > 1)) {
3694 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3695 : }
3696 2 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3697 2 : if (!SWIG_IsOK(res1)) {
3698 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key *","setString", 1, self ));
3699 : }
3700 2 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3701 : {
3702 2 : std::string *ptr = (std::string *)0;
3703 2 : int res = SWIG_AsPtr_std_string(argv[0], &ptr);
3704 2 : if (!SWIG_IsOK(res) || !ptr) {
3705 0 : SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::string","setString", 2, argv[0] ));
3706 : }
3707 4 : arg2 = *ptr;
3708 4 : if (SWIG_IsNewObj(res)) delete ptr;
3709 : }
3710 6 : (arg1)->setString(arg2);
3711 2 : return Qnil;
3712 : fail:
3713 : return Qnil;
3714 : }
3715 :
3716 :
3717 :
3718 : /*
3719 : Document-method: Kdb::Key.get_value
3720 :
3721 : call-seq:
3722 : get_value -> void const *
3723 :
3724 : An instance method.
3725 :
3726 : */
3727 : SWIGINTERN VALUE
3728 0 : _wrap_Key_get_value(int argc, VALUE *argv, VALUE self) {
3729 0 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3730 0 : void *argp1 = 0 ;
3731 0 : int res1 = 0 ;
3732 0 : void *result = 0 ;
3733 0 : VALUE vresult = Qnil;
3734 :
3735 0 : if ((argc < 0) || (argc > 0)) {
3736 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3737 : }
3738 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3739 0 : if (!SWIG_IsOK(res1)) {
3740 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","getValue", 1, self ));
3741 : }
3742 0 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3743 0 : result = (void *)((kdb::Key const *)arg1)->getValue();
3744 0 : vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 );
3745 : return vresult;
3746 : fail:
3747 : return Qnil;
3748 : }
3749 :
3750 :
3751 :
3752 : /*
3753 : Document-method: Kdb::Key.get_binary
3754 :
3755 : call-seq:
3756 : get_binary -> std::string
3757 :
3758 : An instance method.
3759 :
3760 : */
3761 : SWIGINTERN VALUE
3762 5 : _wrap_Key_get_binary(int argc, VALUE *argv, VALUE self) {
3763 5 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3764 5 : void *argp1 = 0 ;
3765 5 : int res1 = 0 ;
3766 9 : std::string result;
3767 5 : VALUE vresult = Qnil;
3768 :
3769 5 : if ((argc < 0) || (argc > 0)) {
3770 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3771 : }
3772 5 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3773 5 : if (!SWIG_IsOK(res1)) {
3774 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","getBinary", 1, self ));
3775 : }
3776 5 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3777 : try {
3778 9 : result = ((kdb::Key const *)arg1)->getBinary();
3779 : }
3780 1 : catch(kdb::KeyTypeMismatch &_e) {
3781 2 : rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_kdb__KeyTypeMismatch, SWIG_NewPointerObj((new kdb::KeyTypeMismatch(static_cast< const kdb::KeyTypeMismatch& >(_e))),SWIGTYPE_p_kdb__KeyTypeMismatch,SWIG_POINTER_OWN))); SWIG_fail;
3782 : }
3783 0 : catch(kdb::KeyException &_e) {
3784 0 : rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_kdb__KeyException, SWIG_NewPointerObj((new kdb::KeyException(static_cast< const kdb::KeyException& >(_e))),SWIGTYPE_p_kdb__KeyException,SWIG_POINTER_OWN))); SWIG_fail;
3785 : }
3786 :
3787 12 : vresult = SWIG_From_std_string(static_cast< std::string >(result));
3788 4 : return vresult;
3789 : fail:
3790 : return Qnil;
3791 : }
3792 :
3793 :
3794 :
3795 : /*
3796 : Document-method: Kdb::Key.get_binary_size
3797 :
3798 : call-seq:
3799 : get_binary_size -> ssize_t
3800 :
3801 : An instance method.
3802 :
3803 : */
3804 : SWIGINTERN VALUE
3805 0 : _wrap_Key_get_binary_size(int argc, VALUE *argv, VALUE self) {
3806 0 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3807 0 : void *argp1 = 0 ;
3808 0 : int res1 = 0 ;
3809 : ssize_t result;
3810 0 : VALUE vresult = Qnil;
3811 :
3812 0 : if ((argc < 0) || (argc > 0)) {
3813 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3814 : }
3815 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3816 0 : if (!SWIG_IsOK(res1)) {
3817 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","getBinarySize", 1, self ));
3818 : }
3819 0 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3820 0 : result = ((kdb::Key const *)arg1)->getBinarySize();
3821 0 : vresult = SWIG_From_long(static_cast< long >(result));
3822 : return vresult;
3823 : fail:
3824 : return Qnil;
3825 : }
3826 :
3827 :
3828 :
3829 : /*
3830 : Document-method: Kdb::Key.set_binary
3831 :
3832 : call-seq:
3833 : set_binary(void const * newBinary) -> ssize_t
3834 :
3835 : An instance method.
3836 :
3837 : */
3838 : SWIGINTERN VALUE
3839 4 : _wrap_Key_set_binary(int argc, VALUE *argv, VALUE self) {
3840 4 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3841 4 : void *arg2 = (void *) 0 ;
3842 : size_t arg3 ;
3843 4 : void *argp1 = 0 ;
3844 4 : int res1 = 0 ;
3845 : ssize_t result;
3846 4 : VALUE vresult = Qnil;
3847 :
3848 4 : if ((argc < 1) || (argc > 1)) {
3849 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3850 : }
3851 4 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3852 4 : if (!SWIG_IsOK(res1)) {
3853 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key *","setBinary", 1, self ));
3854 : }
3855 4 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3856 : {
3857 4 : arg2 = (void *) StringValuePtr(argv[0]);
3858 4 : arg3 = RSTRING_LEN(argv[0]);
3859 : }
3860 4 : result = (arg1)->setBinary((void const *)arg2,arg3);
3861 4 : vresult = SWIG_From_long(static_cast< long >(result));
3862 : return vresult;
3863 : fail:
3864 : return Qnil;
3865 : }
3866 :
3867 :
3868 :
3869 : /*
3870 : Document-method: Kdb::Key.has_meta
3871 :
3872 : call-seq:
3873 : has_meta(std::string const & metaName) -> bool
3874 :
3875 : An instance method.
3876 :
3877 : */
3878 : SWIGINTERN VALUE
3879 41 : _wrap_Key_has_metaq___(int argc, VALUE *argv, VALUE self) {
3880 41 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3881 41 : std::string *arg2 = 0 ;
3882 41 : void *argp1 = 0 ;
3883 41 : int res1 = 0 ;
3884 : bool result;
3885 41 : VALUE vresult = Qnil;
3886 :
3887 41 : if ((argc < 1) || (argc > 1)) {
3888 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3889 : }
3890 41 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3891 41 : if (!SWIG_IsOK(res1)) {
3892 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","hasMeta", 1, self ));
3893 : }
3894 41 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3895 : {
3896 : // typemap in for getMeta
3897 41 : argv[0] = rb_funcall(argv[0], rb_intern("to_s"), 0, NULL);
3898 123 : arg2 = new std::string(StringValueCStr(argv[0]));
3899 : }
3900 41 : result = (bool)((kdb::Key const *)arg1)->hasMeta((std::string const &)*arg2);
3901 41 : vresult = (result ? Qtrue : Qfalse);
3902 : {
3903 : // typemap in for getMeta
3904 82 : delete arg2;
3905 : }
3906 : return vresult;
3907 : fail:
3908 : {
3909 : // typemap in for getMeta
3910 : delete arg2;
3911 : }
3912 : return Qnil;
3913 : }
3914 :
3915 :
3916 :
3917 : /*
3918 : Document-method: Kdb::Key.del_meta
3919 :
3920 : call-seq:
3921 : del_meta(std::string const & metaName)
3922 :
3923 : An instance method.
3924 :
3925 : */
3926 : SWIGINTERN VALUE
3927 1 : _wrap_Key_del_meta(int argc, VALUE *argv, VALUE self) {
3928 1 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3929 1 : std::string *arg2 = 0 ;
3930 1 : void *argp1 = 0 ;
3931 1 : int res1 = 0 ;
3932 :
3933 1 : if ((argc < 1) || (argc > 1)) {
3934 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3935 : }
3936 1 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3937 1 : if (!SWIG_IsOK(res1)) {
3938 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key *","delMeta", 1, self ));
3939 : }
3940 1 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3941 : {
3942 : // typemap in for getMeta
3943 1 : argv[0] = rb_funcall(argv[0], rb_intern("to_s"), 0, NULL);
3944 3 : arg2 = new std::string(StringValueCStr(argv[0]));
3945 : }
3946 1 : (arg1)->delMeta((std::string const &)*arg2);
3947 : {
3948 : // typemap in for getMeta
3949 2 : delete arg2;
3950 : }
3951 : return Qnil;
3952 : fail:
3953 : {
3954 : // typemap in for getMeta
3955 : delete arg2;
3956 : }
3957 : return Qnil;
3958 : }
3959 :
3960 :
3961 :
3962 : /*
3963 : Document-method: Kdb::Key.copy_meta
3964 :
3965 : call-seq:
3966 : copy_meta(Key other, std::string const & metaName)
3967 :
3968 : An instance method.
3969 :
3970 : */
3971 : SWIGINTERN VALUE
3972 0 : _wrap_Key_copy_meta(int argc, VALUE *argv, VALUE self) {
3973 0 : kdb::Key *arg1 = (kdb::Key *) 0 ;
3974 0 : kdb::Key *arg2 = 0 ;
3975 0 : std::string *arg3 = 0 ;
3976 0 : void *argp1 = 0 ;
3977 0 : int res1 = 0 ;
3978 : void *argp2 ;
3979 0 : int res2 = 0 ;
3980 :
3981 0 : if ((argc < 2) || (argc > 2)) {
3982 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3983 : }
3984 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
3985 0 : if (!SWIG_IsOK(res1)) {
3986 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key *","copyMeta", 1, self ));
3987 : }
3988 0 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
3989 0 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__Key, 0 );
3990 0 : if (!SWIG_IsOK(res2)) {
3991 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::Key const &","copyMeta", 2, argv[0] ));
3992 : }
3993 0 : if (!argp2) {
3994 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key const &","copyMeta", 2, argv[0]));
3995 : }
3996 0 : arg2 = reinterpret_cast< kdb::Key * >(argp2);
3997 : {
3998 : // typemap in for getMeta
3999 0 : argv[1] = rb_funcall(argv[1], rb_intern("to_s"), 0, NULL);
4000 0 : arg3 = new std::string(StringValueCStr(argv[1]));
4001 : }
4002 0 : (arg1)->copyMeta((kdb::Key const &)*arg2,(std::string const &)*arg3);
4003 : {
4004 : // typemap in for getMeta
4005 0 : delete arg3;
4006 : }
4007 : return Qnil;
4008 : fail:
4009 : {
4010 : // typemap in for getMeta
4011 : delete arg3;
4012 : }
4013 : return Qnil;
4014 : }
4015 :
4016 :
4017 :
4018 : /*
4019 : Document-method: Kdb::Key.copy_all_meta
4020 :
4021 : call-seq:
4022 : copy_all_meta(Key other)
4023 :
4024 : An instance method.
4025 :
4026 : */
4027 : SWIGINTERN VALUE
4028 0 : _wrap_Key_copy_all_meta(int argc, VALUE *argv, VALUE self) {
4029 0 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4030 0 : kdb::Key *arg2 = 0 ;
4031 0 : void *argp1 = 0 ;
4032 0 : int res1 = 0 ;
4033 : void *argp2 ;
4034 0 : int res2 = 0 ;
4035 :
4036 0 : if ((argc < 1) || (argc > 1)) {
4037 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4038 : }
4039 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4040 0 : if (!SWIG_IsOK(res1)) {
4041 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key *","copyAllMeta", 1, self ));
4042 : }
4043 0 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4044 0 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__Key, 0 );
4045 0 : if (!SWIG_IsOK(res2)) {
4046 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::Key const &","copyAllMeta", 2, argv[0] ));
4047 : }
4048 0 : if (!argp2) {
4049 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key const &","copyAllMeta", 2, argv[0]));
4050 : }
4051 0 : arg2 = reinterpret_cast< kdb::Key * >(argp2);
4052 0 : (arg1)->copyAllMeta((kdb::Key const &)*arg2);
4053 : return Qnil;
4054 : fail:
4055 : return Qnil;
4056 : }
4057 :
4058 :
4059 :
4060 : /*
4061 : Document-method: Kdb::Key.rewind_meta
4062 :
4063 : call-seq:
4064 : rewind_meta
4065 :
4066 : An instance method.
4067 :
4068 : */
4069 : SWIGINTERN VALUE
4070 1 : _wrap_Key_rewind_meta(int argc, VALUE *argv, VALUE self) {
4071 1 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4072 1 : void *argp1 = 0 ;
4073 1 : int res1 = 0 ;
4074 :
4075 1 : if ((argc < 0) || (argc > 0)) {
4076 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4077 : }
4078 1 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4079 1 : if (!SWIG_IsOK(res1)) {
4080 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key *","rewindMeta", 1, self ));
4081 : }
4082 1 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4083 1 : (arg1)->rewindMeta();
4084 : return Qnil;
4085 : fail:
4086 : return Qnil;
4087 : }
4088 :
4089 :
4090 :
4091 : /*
4092 : Document-method: Kdb::Key.next_meta
4093 :
4094 : call-seq:
4095 : next_meta -> Key
4096 :
4097 : An instance method.
4098 :
4099 : */
4100 : SWIGINTERN VALUE
4101 5 : _wrap_Key_next_meta(int argc, VALUE *argv, VALUE self) {
4102 5 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4103 5 : void *argp1 = 0 ;
4104 5 : int res1 = 0 ;
4105 10 : kdb::Key result;
4106 5 : VALUE vresult = Qnil;
4107 :
4108 5 : if ((argc < 0) || (argc > 0)) {
4109 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4110 : }
4111 5 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4112 5 : if (!SWIG_IsOK(res1)) {
4113 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key *","nextMeta", 1, self ));
4114 : }
4115 5 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4116 15 : result = (arg1)->nextMeta();
4117 : {
4118 5 : if ((&result)->isNull()) {
4119 : vresult = Qnil;
4120 : } else {
4121 8 : vresult = SWIG_NewPointerObj(new kdb::Key(result),
4122 : SWIGTYPE_p_kdb__Key,
4123 4 : SWIG_POINTER_OWN | 0);
4124 : }
4125 : }
4126 5 : return vresult;
4127 : fail:
4128 : return Qnil;
4129 : }
4130 :
4131 :
4132 :
4133 : /*
4134 : Document-method: Kdb::Key.current_meta
4135 :
4136 : call-seq:
4137 : current_meta -> Key
4138 :
4139 : An instance method.
4140 :
4141 : */
4142 : SWIGINTERN VALUE
4143 11 : _wrap_Key_current_meta(int argc, VALUE *argv, VALUE self) {
4144 11 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4145 11 : void *argp1 = 0 ;
4146 11 : int res1 = 0 ;
4147 22 : kdb::Key result;
4148 11 : VALUE vresult = Qnil;
4149 :
4150 11 : if ((argc < 0) || (argc > 0)) {
4151 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4152 : }
4153 11 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4154 11 : if (!SWIG_IsOK(res1)) {
4155 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","currentMeta", 1, self ));
4156 : }
4157 11 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4158 33 : result = ((kdb::Key const *)arg1)->currentMeta();
4159 : {
4160 11 : if ((&result)->isNull()) {
4161 : vresult = Qnil;
4162 : } else {
4163 16 : vresult = SWIG_NewPointerObj(new kdb::Key(result),
4164 : SWIGTYPE_p_kdb__Key,
4165 8 : SWIG_POINTER_OWN | 0);
4166 : }
4167 : }
4168 11 : return vresult;
4169 : fail:
4170 : return Qnil;
4171 : }
4172 :
4173 :
4174 :
4175 : /*
4176 : Document-method: Kdb::Key.is_valid
4177 :
4178 : call-seq:
4179 : is_valid -> bool
4180 :
4181 : An instance method.
4182 :
4183 : */
4184 : SWIGINTERN VALUE
4185 27 : _wrap_Key_is_validq___(int argc, VALUE *argv, VALUE self) {
4186 27 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4187 27 : void *argp1 = 0 ;
4188 27 : int res1 = 0 ;
4189 : bool result;
4190 27 : VALUE vresult = Qnil;
4191 :
4192 27 : if ((argc < 0) || (argc > 0)) {
4193 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4194 : }
4195 27 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4196 27 : if (!SWIG_IsOK(res1)) {
4197 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","isValid", 1, self ));
4198 : }
4199 27 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4200 27 : result = (bool)((kdb::Key const *)arg1)->isValid();
4201 27 : vresult = (result ? Qtrue : Qfalse);
4202 : return vresult;
4203 : fail:
4204 : return Qnil;
4205 : }
4206 :
4207 :
4208 :
4209 : /*
4210 : Document-method: Kdb::Key.namespace
4211 :
4212 : call-seq:
4213 : namespace -> std::string
4214 :
4215 : An instance method.
4216 :
4217 : */
4218 : SWIGINTERN VALUE
4219 11 : _wrap_Key_namespace(int argc, VALUE *argv, VALUE self) {
4220 11 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4221 11 : void *argp1 = 0 ;
4222 11 : int res1 = 0 ;
4223 22 : std::string result;
4224 11 : VALUE vresult = Qnil;
4225 :
4226 11 : if ((argc < 0) || (argc > 0)) {
4227 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4228 : }
4229 11 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4230 11 : if (!SWIG_IsOK(res1)) {
4231 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","getNamespace", 1, self ));
4232 : }
4233 11 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4234 22 : result = ((kdb::Key const *)arg1)->getNamespace();
4235 33 : vresult = SWIG_From_std_string(static_cast< std::string >(result));
4236 11 : return vresult;
4237 : fail:
4238 : return Qnil;
4239 : }
4240 :
4241 :
4242 :
4243 : /*
4244 : Document-method: Kdb::Key.is_cascading
4245 :
4246 : call-seq:
4247 : is_cascading -> bool
4248 :
4249 : An instance method.
4250 :
4251 : */
4252 : SWIGINTERN VALUE
4253 0 : _wrap_Key_is_cascadingq___(int argc, VALUE *argv, VALUE self) {
4254 0 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4255 0 : void *argp1 = 0 ;
4256 0 : int res1 = 0 ;
4257 : bool result;
4258 0 : VALUE vresult = Qnil;
4259 :
4260 0 : if ((argc < 0) || (argc > 0)) {
4261 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4262 : }
4263 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4264 0 : if (!SWIG_IsOK(res1)) {
4265 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","isCascading", 1, self ));
4266 : }
4267 0 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4268 0 : result = (bool)((kdb::Key const *)arg1)->isCascading();
4269 0 : vresult = (result ? Qtrue : Qfalse);
4270 : return vresult;
4271 : fail:
4272 : return Qnil;
4273 : }
4274 :
4275 :
4276 :
4277 : /*
4278 : Document-method: Kdb::Key.is_spec
4279 :
4280 : call-seq:
4281 : is_spec -> bool
4282 :
4283 : An instance method.
4284 :
4285 : */
4286 : SWIGINTERN VALUE
4287 0 : _wrap_Key_is_specq___(int argc, VALUE *argv, VALUE self) {
4288 0 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4289 0 : void *argp1 = 0 ;
4290 0 : int res1 = 0 ;
4291 : bool result;
4292 0 : VALUE vresult = Qnil;
4293 :
4294 0 : if ((argc < 0) || (argc > 0)) {
4295 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4296 : }
4297 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4298 0 : if (!SWIG_IsOK(res1)) {
4299 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","isSpec", 1, self ));
4300 : }
4301 0 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4302 0 : result = (bool)((kdb::Key const *)arg1)->isSpec();
4303 0 : vresult = (result ? Qtrue : Qfalse);
4304 : return vresult;
4305 : fail:
4306 : return Qnil;
4307 : }
4308 :
4309 :
4310 :
4311 : /*
4312 : Document-method: Kdb::Key.is_proc
4313 :
4314 : call-seq:
4315 : is_proc -> bool
4316 :
4317 : An instance method.
4318 :
4319 : */
4320 : SWIGINTERN VALUE
4321 0 : _wrap_Key_is_procq___(int argc, VALUE *argv, VALUE self) {
4322 0 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4323 0 : void *argp1 = 0 ;
4324 0 : int res1 = 0 ;
4325 : bool result;
4326 0 : VALUE vresult = Qnil;
4327 :
4328 0 : if ((argc < 0) || (argc > 0)) {
4329 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4330 : }
4331 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4332 0 : if (!SWIG_IsOK(res1)) {
4333 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","isProc", 1, self ));
4334 : }
4335 0 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4336 0 : result = (bool)((kdb::Key const *)arg1)->isProc();
4337 0 : vresult = (result ? Qtrue : Qfalse);
4338 : return vresult;
4339 : fail:
4340 : return Qnil;
4341 : }
4342 :
4343 :
4344 :
4345 : /*
4346 : Document-method: Kdb::Key.is_dir
4347 :
4348 : call-seq:
4349 : is_dir -> bool
4350 :
4351 : An instance method.
4352 :
4353 : */
4354 : SWIGINTERN VALUE
4355 0 : _wrap_Key_is_dirq___(int argc, VALUE *argv, VALUE self) {
4356 0 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4357 0 : void *argp1 = 0 ;
4358 0 : int res1 = 0 ;
4359 : bool result;
4360 0 : VALUE vresult = Qnil;
4361 :
4362 0 : if ((argc < 0) || (argc > 0)) {
4363 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4364 : }
4365 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4366 0 : if (!SWIG_IsOK(res1)) {
4367 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","isDir", 1, self ));
4368 : }
4369 0 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4370 0 : result = (bool)((kdb::Key const *)arg1)->isDir();
4371 0 : vresult = (result ? Qtrue : Qfalse);
4372 : return vresult;
4373 : fail:
4374 : return Qnil;
4375 : }
4376 :
4377 :
4378 :
4379 : /*
4380 : Document-method: Kdb::Key.is_user
4381 :
4382 : call-seq:
4383 : is_user -> bool
4384 :
4385 : An instance method.
4386 :
4387 : */
4388 : SWIGINTERN VALUE
4389 0 : _wrap_Key_is_userq___(int argc, VALUE *argv, VALUE self) {
4390 0 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4391 0 : void *argp1 = 0 ;
4392 0 : int res1 = 0 ;
4393 : bool result;
4394 0 : VALUE vresult = Qnil;
4395 :
4396 0 : if ((argc < 0) || (argc > 0)) {
4397 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4398 : }
4399 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4400 0 : if (!SWIG_IsOK(res1)) {
4401 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","isUser", 1, self ));
4402 : }
4403 0 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4404 0 : result = (bool)((kdb::Key const *)arg1)->isUser();
4405 0 : vresult = (result ? Qtrue : Qfalse);
4406 : return vresult;
4407 : fail:
4408 : return Qnil;
4409 : }
4410 :
4411 :
4412 :
4413 : /*
4414 : Document-method: Kdb::Key.is_system
4415 :
4416 : call-seq:
4417 : is_system -> bool
4418 :
4419 : An instance method.
4420 :
4421 : */
4422 : SWIGINTERN VALUE
4423 0 : _wrap_Key_is_systemq___(int argc, VALUE *argv, VALUE self) {
4424 0 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4425 0 : void *argp1 = 0 ;
4426 0 : int res1 = 0 ;
4427 : bool result;
4428 0 : VALUE vresult = Qnil;
4429 :
4430 0 : if ((argc < 0) || (argc > 0)) {
4431 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4432 : }
4433 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4434 0 : if (!SWIG_IsOK(res1)) {
4435 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","isSystem", 1, self ));
4436 : }
4437 0 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4438 0 : result = (bool)((kdb::Key const *)arg1)->isSystem();
4439 0 : vresult = (result ? Qtrue : Qfalse);
4440 : return vresult;
4441 : fail:
4442 : return Qnil;
4443 : }
4444 :
4445 :
4446 :
4447 : /*
4448 : Document-method: Kdb::Key.is_string
4449 :
4450 : call-seq:
4451 : is_string -> bool
4452 :
4453 : An instance method.
4454 :
4455 : */
4456 : SWIGINTERN VALUE
4457 10 : _wrap_Key_is_stringq___(int argc, VALUE *argv, VALUE self) {
4458 10 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4459 10 : void *argp1 = 0 ;
4460 10 : int res1 = 0 ;
4461 : bool result;
4462 10 : VALUE vresult = Qnil;
4463 :
4464 10 : if ((argc < 0) || (argc > 0)) {
4465 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4466 : }
4467 10 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4468 10 : if (!SWIG_IsOK(res1)) {
4469 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","isString", 1, self ));
4470 : }
4471 10 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4472 10 : result = (bool)((kdb::Key const *)arg1)->isString();
4473 10 : vresult = (result ? Qtrue : Qfalse);
4474 : return vresult;
4475 : fail:
4476 : return Qnil;
4477 : }
4478 :
4479 :
4480 :
4481 : /*
4482 : Document-method: Kdb::Key.is_binary
4483 :
4484 : call-seq:
4485 : is_binary -> bool
4486 :
4487 : An instance method.
4488 :
4489 : */
4490 : SWIGINTERN VALUE
4491 35 : _wrap_Key_is_binaryq___(int argc, VALUE *argv, VALUE self) {
4492 35 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4493 35 : void *argp1 = 0 ;
4494 35 : int res1 = 0 ;
4495 : bool result;
4496 35 : VALUE vresult = Qnil;
4497 :
4498 35 : if ((argc < 0) || (argc > 0)) {
4499 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4500 : }
4501 35 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4502 35 : if (!SWIG_IsOK(res1)) {
4503 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","isBinary", 1, self ));
4504 : }
4505 35 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4506 35 : result = (bool)((kdb::Key const *)arg1)->isBinary();
4507 35 : vresult = (result ? Qtrue : Qfalse);
4508 : return vresult;
4509 : fail:
4510 : return Qnil;
4511 : }
4512 :
4513 :
4514 :
4515 : /*
4516 : Document-method: Kdb::Key.is_inactive
4517 :
4518 : call-seq:
4519 : is_inactive -> bool
4520 :
4521 : An instance method.
4522 :
4523 : */
4524 : SWIGINTERN VALUE
4525 0 : _wrap_Key_is_inactiveq___(int argc, VALUE *argv, VALUE self) {
4526 0 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4527 0 : void *argp1 = 0 ;
4528 0 : int res1 = 0 ;
4529 : bool result;
4530 0 : VALUE vresult = Qnil;
4531 :
4532 0 : if ((argc < 0) || (argc > 0)) {
4533 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4534 : }
4535 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4536 0 : if (!SWIG_IsOK(res1)) {
4537 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","isInactive", 1, self ));
4538 : }
4539 0 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4540 0 : result = (bool)((kdb::Key const *)arg1)->isInactive();
4541 0 : vresult = (result ? Qtrue : Qfalse);
4542 : return vresult;
4543 : fail:
4544 : return Qnil;
4545 : }
4546 :
4547 :
4548 :
4549 : /*
4550 : Document-method: Kdb::Key.is_below
4551 :
4552 : call-seq:
4553 : is_below(Key k) -> bool
4554 :
4555 : An instance method.
4556 :
4557 : */
4558 : SWIGINTERN VALUE
4559 1 : _wrap_Key_is_belowq___(int argc, VALUE *argv, VALUE self) {
4560 1 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4561 1 : kdb::Key *arg2 = 0 ;
4562 1 : void *argp1 = 0 ;
4563 1 : int res1 = 0 ;
4564 : void *argp2 ;
4565 1 : int res2 = 0 ;
4566 : bool result;
4567 1 : VALUE vresult = Qnil;
4568 :
4569 1 : if ((argc < 1) || (argc > 1)) {
4570 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4571 : }
4572 1 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4573 1 : if (!SWIG_IsOK(res1)) {
4574 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","isBelow", 1, self ));
4575 : }
4576 1 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4577 1 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__Key, 0 );
4578 1 : if (!SWIG_IsOK(res2)) {
4579 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::Key const &","isBelow", 2, argv[0] ));
4580 : }
4581 1 : if (!argp2) {
4582 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key const &","isBelow", 2, argv[0]));
4583 : }
4584 1 : arg2 = reinterpret_cast< kdb::Key * >(argp2);
4585 1 : result = (bool)((kdb::Key const *)arg1)->isBelow((kdb::Key const &)*arg2);
4586 1 : vresult = (result ? Qtrue : Qfalse);
4587 : return vresult;
4588 : fail:
4589 : return Qnil;
4590 : }
4591 :
4592 :
4593 :
4594 : /*
4595 : Document-method: Kdb::Key.is_below_or_same
4596 :
4597 : call-seq:
4598 : is_below_or_same(Key k) -> bool
4599 :
4600 : An instance method.
4601 :
4602 : */
4603 : SWIGINTERN VALUE
4604 0 : _wrap_Key_is_below_or_sameq___(int argc, VALUE *argv, VALUE self) {
4605 0 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4606 0 : kdb::Key *arg2 = 0 ;
4607 0 : void *argp1 = 0 ;
4608 0 : int res1 = 0 ;
4609 : void *argp2 ;
4610 0 : int res2 = 0 ;
4611 : bool result;
4612 0 : VALUE vresult = Qnil;
4613 :
4614 0 : if ((argc < 1) || (argc > 1)) {
4615 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4616 : }
4617 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4618 0 : if (!SWIG_IsOK(res1)) {
4619 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","isBelowOrSame", 1, self ));
4620 : }
4621 0 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4622 0 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__Key, 0 );
4623 0 : if (!SWIG_IsOK(res2)) {
4624 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::Key const &","isBelowOrSame", 2, argv[0] ));
4625 : }
4626 0 : if (!argp2) {
4627 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key const &","isBelowOrSame", 2, argv[0]));
4628 : }
4629 0 : arg2 = reinterpret_cast< kdb::Key * >(argp2);
4630 0 : result = (bool)((kdb::Key const *)arg1)->isBelowOrSame((kdb::Key const &)*arg2);
4631 0 : vresult = (result ? Qtrue : Qfalse);
4632 : return vresult;
4633 : fail:
4634 : return Qnil;
4635 : }
4636 :
4637 :
4638 :
4639 : /*
4640 : Document-method: Kdb::Key.is_direct_below
4641 :
4642 : call-seq:
4643 : is_direct_below(Key k) -> bool
4644 :
4645 : An instance method.
4646 :
4647 : */
4648 : SWIGINTERN VALUE
4649 1 : _wrap_Key_is_direct_belowq___(int argc, VALUE *argv, VALUE self) {
4650 1 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4651 1 : kdb::Key *arg2 = 0 ;
4652 1 : void *argp1 = 0 ;
4653 1 : int res1 = 0 ;
4654 : void *argp2 ;
4655 1 : int res2 = 0 ;
4656 : bool result;
4657 1 : VALUE vresult = Qnil;
4658 :
4659 1 : if ((argc < 1) || (argc > 1)) {
4660 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4661 : }
4662 1 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4663 1 : if (!SWIG_IsOK(res1)) {
4664 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","isDirectBelow", 1, self ));
4665 : }
4666 1 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4667 1 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__Key, 0 );
4668 1 : if (!SWIG_IsOK(res2)) {
4669 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::Key const &","isDirectBelow", 2, argv[0] ));
4670 : }
4671 1 : if (!argp2) {
4672 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key const &","isDirectBelow", 2, argv[0]));
4673 : }
4674 1 : arg2 = reinterpret_cast< kdb::Key * >(argp2);
4675 1 : result = (bool)((kdb::Key const *)arg1)->isDirectBelow((kdb::Key const &)*arg2);
4676 1 : vresult = (result ? Qtrue : Qfalse);
4677 : return vresult;
4678 : fail:
4679 : return Qnil;
4680 : }
4681 :
4682 :
4683 :
4684 : /*
4685 : Document-method: Kdb::Key.meta
4686 :
4687 : call-seq:
4688 : meta -> KeySet
4689 :
4690 : allows access to the meta data keyset of the
4691 : underlaying key, which allows a Ruby-style iteration over metadata:
4692 : k.meta.each { |m| puts 'meta data: %s: %s' % [m.name, m.value] }
4693 : .
4694 : */
4695 : SWIGINTERN VALUE
4696 12 : _wrap_Key_meta(int argc, VALUE *argv, VALUE self) {
4697 12 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4698 12 : void *argp1 = 0 ;
4699 12 : int res1 = 0 ;
4700 12 : kdb::KeySet *result = 0 ;
4701 12 : VALUE vresult = Qnil;
4702 :
4703 12 : if ((argc < 0) || (argc > 0)) {
4704 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4705 : }
4706 12 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4707 12 : if (!SWIG_IsOK(res1)) {
4708 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key *","meta", 1, self ));
4709 : }
4710 12 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4711 12 : result = (kdb::KeySet *)kdb_Key_meta(arg1);
4712 12 : vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_kdb__KeySet, SWIG_POINTER_OWN | 0 );
4713 : return vresult;
4714 : fail:
4715 : return Qnil;
4716 : }
4717 :
4718 :
4719 :
4720 : /*
4721 : Document-method: Kdb::Key.clone
4722 :
4723 : call-seq:
4724 : clone -> Key
4725 :
4726 : Create a duplicate of the class.
4727 : */
4728 : SWIGINTERN VALUE
4729 2 : _wrap_Key_clone(int argc, VALUE *argv, VALUE self) {
4730 2 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4731 2 : void *argp1 = 0 ;
4732 2 : int res1 = 0 ;
4733 2 : kdb::Key *result = 0 ;
4734 2 : VALUE vresult = Qnil;
4735 :
4736 2 : if ((argc < 0) || (argc > 0)) {
4737 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4738 : }
4739 2 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4740 2 : if (!SWIG_IsOK(res1)) {
4741 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key *","clone", 1, self ));
4742 : }
4743 2 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4744 2 : result = (kdb::Key *)kdb_Key_clone(arg1);
4745 2 : vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_kdb__Key, SWIG_POINTER_OWN | 0 );
4746 : return vresult;
4747 : fail:
4748 : return Qnil;
4749 : }
4750 :
4751 :
4752 :
4753 : /*
4754 : Document-method: Kdb::Key.spaceship
4755 :
4756 : call-seq:
4757 : spaceship(comp) -> int
4758 :
4759 : <=>(Key comp) -> int
4760 :
4761 : aliased to '<=>', implemented for sorting operations.
4762 : k1 < k2 : -1
4763 : k1 == k2 : 0
4764 : k1 > k2 : 1
4765 : .
4766 : */
4767 : SWIGINTERN VALUE
4768 21 : _wrap_Key_spaceship(int argc, VALUE *argv, VALUE self) {
4769 21 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4770 21 : kdb::Key *arg2 = 0 ;
4771 21 : void *argp1 = 0 ;
4772 21 : int res1 = 0 ;
4773 : void *argp2 ;
4774 21 : int res2 = 0 ;
4775 : int result;
4776 21 : VALUE vresult = Qnil;
4777 :
4778 21 : if ((argc < 1) || (argc > 1)) {
4779 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4780 : }
4781 21 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4782 21 : if (!SWIG_IsOK(res1)) {
4783 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key *","spaceship", 1, self ));
4784 : }
4785 21 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4786 21 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__Key, 0 );
4787 21 : if (!SWIG_IsOK(res2)) {
4788 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::Key const &","spaceship", 2, argv[0] ));
4789 : }
4790 21 : if (!argp2) {
4791 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key const &","spaceship", 2, argv[0]));
4792 : }
4793 21 : arg2 = reinterpret_cast< kdb::Key * >(argp2);
4794 21 : result = (int)kdb_Key_spaceship(arg1,(kdb::Key const &)*arg2);
4795 21 : vresult = SWIG_From_int(static_cast< int >(result));
4796 : return vresult;
4797 : fail:
4798 : return Qnil;
4799 : }
4800 :
4801 :
4802 :
4803 : /*
4804 : Document-method: Kdb::Key.get
4805 :
4806 : call-seq:
4807 : get -> std::string
4808 :
4809 : An instance method.
4810 :
4811 : */
4812 : SWIGINTERN VALUE
4813 60 : _wrap_Key_get(int argc, VALUE *argv, VALUE self) {
4814 60 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4815 60 : void *argp1 = 0 ;
4816 60 : int res1 = 0 ;
4817 120 : std::string result;
4818 60 : VALUE vresult = Qnil;
4819 :
4820 60 : if ((argc < 0) || (argc > 0)) {
4821 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4822 : }
4823 60 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4824 60 : if (!SWIG_IsOK(res1)) {
4825 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","get<(std::string)>", 1, self ));
4826 : }
4827 60 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4828 : {
4829 : // redefine our Key::get
4830 : /*
4831 : result = ((kdb::Key const *)arg1)->SWIGTEMPLATEDISAMBIGUATOR get< std::string >();
4832 : */
4833 60 : if (((kdb::Key const *)arg1)->isBinary()) {
4834 28 : result = ((kdb::Key const *)arg1)->getBinary();
4835 : } else {
4836 92 : result = ((kdb::Key const *)arg1)->getString();
4837 : }
4838 : }
4839 180 : vresult = SWIG_From_std_string(static_cast< std::string >(result));
4840 60 : return vresult;
4841 : fail:
4842 : return Qnil;
4843 : }
4844 :
4845 :
4846 :
4847 : /*
4848 : Document-method: Kdb::Key.set
4849 :
4850 : call-seq:
4851 : set(std::string x)
4852 :
4853 : An instance method.
4854 :
4855 : */
4856 : SWIGINTERN VALUE
4857 16 : _wrap_Key_set(int argc, VALUE *argv, VALUE self) {
4858 16 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4859 32 : std::string arg2 ;
4860 16 : void *argp1 = 0 ;
4861 16 : int res1 = 0 ;
4862 :
4863 16 : if ((argc < 1) || (argc > 1)) {
4864 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4865 : }
4866 16 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4867 16 : if (!SWIG_IsOK(res1)) {
4868 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key *","set<(std::string)>", 1, self ));
4869 : }
4870 16 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4871 : {
4872 16 : std::string *ptr = (std::string *)0;
4873 16 : int res = SWIG_AsPtr_std_string(argv[0], &ptr);
4874 16 : if (!SWIG_IsOK(res) || !ptr) {
4875 0 : SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::string","set<(std::string)>", 2, argv[0] ));
4876 : }
4877 32 : arg2 = *ptr;
4878 32 : if (SWIG_IsNewObj(res)) delete ptr;
4879 : }
4880 : {
4881 : // redefine our Key::set
4882 : /*
4883 : (arg1)->SWIGTEMPLATEDISAMBIGUATOR set< std::string >(arg2);
4884 : */
4885 16 : if (((kdb::Key const *)arg1)->isBinary()) {
4886 4 : arg1->setBinary(StringValuePtr(argv[0]),
4887 4 : RSTRING_LEN(argv[0]));
4888 : } else {
4889 70 : arg1->setString(StringValueCStr(argv[0]));
4890 : }
4891 : }
4892 16 : return Qnil;
4893 : fail:
4894 : return Qnil;
4895 : }
4896 :
4897 :
4898 :
4899 : /*
4900 : Document-method: Kdb::Key.set_meta
4901 :
4902 : call-seq:
4903 : set_meta(std::string const & metaName, std::string x)
4904 :
4905 : An instance method.
4906 :
4907 : */
4908 : SWIGINTERN VALUE
4909 17 : _wrap_Key_set_meta(int argc, VALUE *argv, VALUE self) {
4910 17 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4911 17 : std::string *arg2 = 0 ;
4912 34 : std::string arg3 ;
4913 17 : void *argp1 = 0 ;
4914 17 : int res1 = 0 ;
4915 :
4916 17 : if ((argc < 2) || (argc > 2)) {
4917 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4918 : }
4919 17 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4920 17 : if (!SWIG_IsOK(res1)) {
4921 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key *","setMeta<(std::string)>", 1, self ));
4922 : }
4923 17 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4924 : {
4925 : // typemap in for getMeta
4926 17 : argv[0] = rb_funcall(argv[0], rb_intern("to_s"), 0, NULL);
4927 51 : arg2 = new std::string(StringValueCStr(argv[0]));
4928 : }
4929 : {
4930 17 : std::string *ptr = (std::string *)0;
4931 17 : int res = SWIG_AsPtr_std_string(argv[1], &ptr);
4932 17 : if (!SWIG_IsOK(res) || !ptr) {
4933 0 : SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::string","setMeta<(std::string)>", 3, argv[1] ));
4934 : }
4935 34 : arg3 = *ptr;
4936 34 : if (SWIG_IsNewObj(res)) delete ptr;
4937 : }
4938 34 : (arg1)->SWIGTEMPLATEDISAMBIGUATOR setMeta< std::string >((std::string const &)*arg2,arg3);
4939 : {
4940 : // typemap in for getMeta
4941 34 : delete arg2;
4942 : }
4943 17 : return Qnil;
4944 : fail:
4945 : {
4946 : // typemap in for getMeta
4947 : delete arg2;
4948 : }
4949 : return Qnil;
4950 : }
4951 :
4952 :
4953 :
4954 : /*
4955 : Document-method: Kdb::Key.get_meta
4956 :
4957 : call-seq:
4958 : get_meta(std::string const & metaName) -> std::string
4959 :
4960 : An instance method.
4961 :
4962 : */
4963 : SWIGINTERN VALUE
4964 51 : _wrap_Key_get_meta(int argc, VALUE *argv, VALUE self) {
4965 51 : kdb::Key *arg1 = (kdb::Key *) 0 ;
4966 51 : std::string *arg2 = 0 ;
4967 51 : void *argp1 = 0 ;
4968 51 : int res1 = 0 ;
4969 102 : std::string result;
4970 51 : VALUE vresult = Qnil;
4971 :
4972 51 : if ((argc < 1) || (argc > 1)) {
4973 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4974 : }
4975 51 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__Key, 0 | 0 );
4976 51 : if (!SWIG_IsOK(res1)) {
4977 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key const *","getMeta<(std::string)>", 1, self ));
4978 : }
4979 51 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
4980 : {
4981 : // typemap in for getMeta
4982 51 : argv[0] = rb_funcall(argv[0], rb_intern("to_s"), 0, NULL);
4983 153 : arg2 = new std::string(StringValueCStr(argv[0]));
4984 : }
4985 102 : result = ((kdb::Key const *)arg1)->SWIGTEMPLATEDISAMBIGUATOR getMeta< std::string >((std::string const &)*arg2);
4986 153 : vresult = SWIG_From_std_string(static_cast< std::string >(result));
4987 : {
4988 : // typemap in for getMeta
4989 102 : delete arg2;
4990 : }
4991 51 : return vresult;
4992 : fail:
4993 : {
4994 : // typemap in for getMeta
4995 : delete arg2;
4996 : }
4997 : return Qnil;
4998 : }
4999 :
5000 :
5001 :
5002 : /*
5003 : Document-class: Kdb::KeySet
5004 :
5005 : Proxy of C++ Kdb::KeySet class
5006 :
5007 :
5008 : */
5009 : static swig_class SwigClassKeySet;
5010 :
5011 :
5012 : /*
5013 : Document-method: Kdb::KeySet.new
5014 :
5015 : call-seq:
5016 : KeySet.new
5017 : KeySet.new(KeySet other)
5018 : KeySet.new(Key key)
5019 :
5020 : Class constructor.
5021 :
5022 : */
5023 : SWIGINTERN VALUE
5024 27 : _wrap_new_KeySet__SWIG_0(int argc, VALUE *argv, VALUE self) {
5025 27 : kdb::KeySet *result = 0 ;
5026 :
5027 27 : if ((argc < 0) || (argc > 0)) {
5028 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5029 : }
5030 54 : result = (kdb::KeySet *)new kdb::KeySet();
5031 27 : DATA_PTR(self) = result;
5032 : return self;
5033 : fail:
5034 : return Qnil;
5035 : }
5036 :
5037 :
5038 : SWIGINTERN VALUE
5039 1 : _wrap_new_KeySet__SWIG_1(int argc, VALUE *argv, VALUE self) {
5040 1 : kdb::KeySet *arg1 = 0 ;
5041 : void *argp1 ;
5042 1 : int res1 = 0 ;
5043 1 : kdb::KeySet *result = 0 ;
5044 :
5045 1 : if ((argc < 1) || (argc > 1)) {
5046 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5047 : }
5048 1 : res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_kdb__KeySet, 0 );
5049 1 : if (!SWIG_IsOK(res1)) {
5050 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet const &","KeySet", 1, argv[0] ));
5051 : }
5052 1 : if (!argp1) {
5053 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::KeySet const &","KeySet", 1, argv[0]));
5054 : }
5055 1 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5056 2 : result = (kdb::KeySet *)new kdb::KeySet((kdb::KeySet const &)*arg1);
5057 1 : DATA_PTR(self) = result;
5058 : return self;
5059 : fail:
5060 : return Qnil;
5061 : }
5062 :
5063 :
5064 : SWIGINTERN void
5065 65 : free_kdb_KeySet(void *self) {
5066 65 : kdb::KeySet *arg1 = (kdb::KeySet *)self;
5067 130 : delete arg1;
5068 65 : }
5069 :
5070 :
5071 : /*
5072 : Document-method: Kdb::KeySet.size
5073 :
5074 : call-seq:
5075 : size -> ssize_t
5076 :
5077 : Size or Length of the KeySet.
5078 : */
5079 : SWIGINTERN VALUE
5080 107 : _wrap_KeySet_size(int argc, VALUE *argv, VALUE self) {
5081 107 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
5082 107 : void *argp1 = 0 ;
5083 107 : int res1 = 0 ;
5084 : ssize_t result;
5085 107 : VALUE vresult = Qnil;
5086 :
5087 107 : if ((argc < 0) || (argc > 0)) {
5088 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5089 : }
5090 107 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
5091 107 : if (!SWIG_IsOK(res1)) {
5092 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet const *","size", 1, self ));
5093 : }
5094 107 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5095 107 : result = ((kdb::KeySet const *)arg1)->size();
5096 107 : vresult = SWIG_From_long(static_cast< long >(result));
5097 : return vresult;
5098 : fail:
5099 : return Qnil;
5100 : }
5101 :
5102 :
5103 :
5104 : /*
5105 : Document-method: Kdb::KeySet.dup
5106 :
5107 : call-seq:
5108 : dup -> ckdb::KeySet *
5109 :
5110 : Create a duplicate of the class and unfreeze it if needed.
5111 : */
5112 : SWIGINTERN VALUE
5113 1 : _wrap_KeySet_dup(int argc, VALUE *argv, VALUE self) {
5114 1 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
5115 1 : void *argp1 = 0 ;
5116 1 : int res1 = 0 ;
5117 1 : ckdb::KeySet *result = 0 ;
5118 1 : VALUE vresult = Qnil;
5119 :
5120 1 : if ((argc < 0) || (argc > 0)) {
5121 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5122 : }
5123 1 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
5124 1 : if (!SWIG_IsOK(res1)) {
5125 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet const *","dup", 1, self ));
5126 : }
5127 1 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5128 1 : result = (ckdb::KeySet *)((kdb::KeySet const *)arg1)->dup();
5129 : {
5130 2 : vresult = SWIG_NewPointerObj(new KeySet(result),
5131 : SWIGTYPE_p_kdb__KeySet,
5132 1 : SWIG_POINTER_OWN | 0);
5133 : }
5134 : return vresult;
5135 : fail:
5136 : return Qnil;
5137 : }
5138 :
5139 :
5140 :
5141 : /*
5142 : Document-method: Kdb::KeySet.copy
5143 :
5144 : call-seq:
5145 : copy(KeySet other)
5146 :
5147 : An instance method.
5148 :
5149 : */
5150 : SWIGINTERN VALUE
5151 0 : _wrap_KeySet_copy(int argc, VALUE *argv, VALUE self) {
5152 0 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
5153 0 : kdb::KeySet *arg2 = 0 ;
5154 0 : void *argp1 = 0 ;
5155 0 : int res1 = 0 ;
5156 : void *argp2 ;
5157 0 : int res2 = 0 ;
5158 :
5159 0 : if ((argc < 1) || (argc > 1)) {
5160 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5161 : }
5162 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
5163 0 : if (!SWIG_IsOK(res1)) {
5164 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet *","copy", 1, self ));
5165 : }
5166 0 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5167 0 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__KeySet, 0 );
5168 0 : if (!SWIG_IsOK(res2)) {
5169 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::KeySet const &","copy", 2, argv[0] ));
5170 : }
5171 0 : if (!argp2) {
5172 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::KeySet const &","copy", 2, argv[0]));
5173 : }
5174 0 : arg2 = reinterpret_cast< kdb::KeySet * >(argp2);
5175 0 : (arg1)->copy((kdb::KeySet const &)*arg2);
5176 : return Qnil;
5177 : fail:
5178 : return Qnil;
5179 : }
5180 :
5181 :
5182 :
5183 : /*
5184 : Document-method: Kdb::KeySet.clear
5185 :
5186 : call-seq:
5187 : clear
5188 :
5189 : An instance method.
5190 :
5191 : */
5192 : SWIGINTERN VALUE
5193 0 : _wrap_KeySet_clear(int argc, VALUE *argv, VALUE self) {
5194 0 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
5195 0 : void *argp1 = 0 ;
5196 0 : int res1 = 0 ;
5197 :
5198 0 : if ((argc < 0) || (argc > 0)) {
5199 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5200 : }
5201 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
5202 0 : if (!SWIG_IsOK(res1)) {
5203 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet *","clear", 1, self ));
5204 : }
5205 0 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5206 0 : (arg1)->clear();
5207 : return Qnil;
5208 : fail:
5209 : return Qnil;
5210 : }
5211 :
5212 :
5213 :
5214 : /*
5215 : Document-method: Kdb::KeySet.append
5216 :
5217 : call-seq:
5218 : append(Key toAppend) -> ssize_t
5219 : append(KeySet toAppend) -> ssize_t
5220 :
5221 : An instance method.
5222 :
5223 : */
5224 : SWIGINTERN VALUE
5225 59 : _wrap_KeySet_append__SWIG_0(int argc, VALUE *argv, VALUE self) {
5226 59 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
5227 59 : kdb::Key *arg2 = 0 ;
5228 59 : void *argp1 = 0 ;
5229 59 : int res1 = 0 ;
5230 : void *argp2 ;
5231 59 : int res2 = 0 ;
5232 : ssize_t result;
5233 59 : VALUE vresult = Qnil;
5234 :
5235 59 : if ((argc < 1) || (argc > 1)) {
5236 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5237 : }
5238 59 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
5239 59 : if (!SWIG_IsOK(res1)) {
5240 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet *","append", 1, self ));
5241 : }
5242 59 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5243 59 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__Key, 0 );
5244 59 : if (!SWIG_IsOK(res2)) {
5245 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::Key const &","append", 2, argv[0] ));
5246 : }
5247 59 : if (!argp2) {
5248 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key const &","append", 2, argv[0]));
5249 : }
5250 59 : arg2 = reinterpret_cast< kdb::Key * >(argp2);
5251 59 : result = (arg1)->append((kdb::Key const &)*arg2);
5252 59 : vresult = SWIG_From_long(static_cast< long >(result));
5253 : return vresult;
5254 : fail:
5255 : return Qnil;
5256 : }
5257 :
5258 :
5259 : SWIGINTERN VALUE
5260 13 : _wrap_KeySet_append__SWIG_1(int argc, VALUE *argv, VALUE self) {
5261 13 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
5262 13 : kdb::KeySet *arg2 = 0 ;
5263 13 : void *argp1 = 0 ;
5264 13 : int res1 = 0 ;
5265 : ssize_t result;
5266 13 : VALUE vresult = Qnil;
5267 :
5268 13 : if ((argc < 1) || (argc > 1)) {
5269 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5270 : }
5271 13 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
5272 13 : if (!SWIG_IsOK(res1)) {
5273 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet *","append", 1, self ));
5274 : }
5275 13 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5276 : {
5277 : /* in case we have an array, append each element and return */
5278 13 : if (RB_TYPE_P(argv[0], T_ARRAY)) {
5279 8 : int size = RARRAY_LEN(argv[0]);
5280 : /* ELEKTRA_LOG_DEBUG("append Array of Keys of len %d", size); private API */
5281 13 : for ( int i = 0; i < size; ++i) {
5282 : Key* k;
5283 10 : int reskey = 0;
5284 10 : reskey = SWIG_ConvertPtr(
5285 10 : rb_ary_entry(argv[0], i), (void**)&k, SWIGTYPE_p_kdb__Key, 0);
5286 10 : if (!SWIG_IsOK(reskey)) {
5287 : rb_raise(rb_eArgError,
5288 1 : "Array element at index %d is not of Type Kdb::Key", i);
5289 : SWIG_fail;
5290 : }
5291 18 : arg1->append(*k);
5292 : }
5293 : /* return within the typemap. not the best way, but can be considered
5294 : to be an optimization */
5295 3 : return SWIG_From_long(arg1->size());
5296 :
5297 : } else {
5298 : /* standard case for KeySet, just convert and check for correct type */
5299 : /* ELEKTRA_LOG_DEBUG("append KeySet"); private API */
5300 9 : if (!SWIG_IsOK(
5301 : SWIG_ConvertPtr(argv[0], (void**)&arg2, SWIGTYPE_p_kdb__KeySet, 0))) {
5302 : rb_raise(rb_eArgError,
5303 1 : "Argument not of Type Kdb::KeySet");
5304 : SWIG_fail;
5305 : }
5306 : }
5307 : }
5308 16 : result = (arg1)->append((kdb::KeySet const &)*arg2);
5309 : vresult = SWIG_From_long(static_cast< long >(result));
5310 : return vresult;
5311 : fail:
5312 : return Qnil;
5313 : }
5314 :
5315 :
5316 72 : SWIGINTERN VALUE _wrap_KeySet_append(int nargs, VALUE *args, VALUE self) {
5317 : int argc;
5318 : VALUE argv[3];
5319 : int ii;
5320 :
5321 72 : argc = nargs + 1;
5322 : argv[0] = self;
5323 72 : if (argc > 3) SWIG_fail;
5324 216 : for (ii = 1; (ii < argc); ++ii) {
5325 72 : argv[ii] = args[ii-1];
5326 : }
5327 72 : if (argc == 2) {
5328 72 : int _v = 0;
5329 : {
5330 72 : void *vptr = 0;
5331 72 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_kdb__Key, 0);
5332 72 : _v = SWIG_CheckState(res);
5333 : }
5334 72 : if (!_v) goto check_1;
5335 59 : return _wrap_KeySet_append__SWIG_0(nargs, args, self);
5336 : }
5337 : check_1:
5338 :
5339 13 : if (argc == 2) {
5340 13 : return _wrap_KeySet_append__SWIG_1(nargs, args, self);
5341 : }
5342 :
5343 : fail:
5344 : Ruby_Format_OverloadedError( argc, 3, "KeySet.append",
5345 : " ssize_t KeySet.append(kdb::Key const &toAppend)\n"
5346 0 : " ssize_t KeySet.append(kdb::KeySet const &toAppend)\n");
5347 :
5348 : return Qnil;
5349 : }
5350 :
5351 :
5352 :
5353 : /*
5354 : Document-method: Kdb::KeySet.head
5355 :
5356 : call-seq:
5357 : head -> Key
5358 :
5359 : An instance method.
5360 :
5361 : */
5362 : SWIGINTERN VALUE
5363 11 : _wrap_KeySet_head(int argc, VALUE *argv, VALUE self) {
5364 11 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
5365 11 : void *argp1 = 0 ;
5366 11 : int res1 = 0 ;
5367 22 : kdb::Key result;
5368 11 : VALUE vresult = Qnil;
5369 :
5370 11 : if ((argc < 0) || (argc > 0)) {
5371 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5372 : }
5373 11 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
5374 11 : if (!SWIG_IsOK(res1)) {
5375 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet const *","head", 1, self ));
5376 : }
5377 11 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5378 33 : result = ((kdb::KeySet const *)arg1)->head();
5379 : {
5380 11 : if ((&result)->isNull()) {
5381 : vresult = Qnil;
5382 : } else {
5383 20 : vresult = SWIG_NewPointerObj(new kdb::Key(result),
5384 : SWIGTYPE_p_kdb__Key,
5385 10 : SWIG_POINTER_OWN | 0);
5386 : }
5387 : }
5388 11 : return vresult;
5389 : fail:
5390 : return Qnil;
5391 : }
5392 :
5393 :
5394 :
5395 : /*
5396 : Document-method: Kdb::KeySet.tail
5397 :
5398 : call-seq:
5399 : tail -> Key
5400 :
5401 : An instance method.
5402 :
5403 : */
5404 : SWIGINTERN VALUE
5405 19 : _wrap_KeySet_tail(int argc, VALUE *argv, VALUE self) {
5406 19 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
5407 19 : void *argp1 = 0 ;
5408 19 : int res1 = 0 ;
5409 38 : kdb::Key result;
5410 19 : VALUE vresult = Qnil;
5411 :
5412 19 : if ((argc < 0) || (argc > 0)) {
5413 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5414 : }
5415 19 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
5416 19 : if (!SWIG_IsOK(res1)) {
5417 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet const *","tail", 1, self ));
5418 : }
5419 19 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5420 57 : result = ((kdb::KeySet const *)arg1)->tail();
5421 : {
5422 19 : if ((&result)->isNull()) {
5423 : vresult = Qnil;
5424 : } else {
5425 34 : vresult = SWIG_NewPointerObj(new kdb::Key(result),
5426 : SWIGTYPE_p_kdb__Key,
5427 17 : SWIG_POINTER_OWN | 0);
5428 : }
5429 : }
5430 19 : return vresult;
5431 : fail:
5432 : return Qnil;
5433 : }
5434 :
5435 :
5436 :
5437 : /*
5438 : Document-method: Kdb::KeySet.rewind
5439 :
5440 : call-seq:
5441 : rewind
5442 :
5443 : An instance method.
5444 :
5445 : */
5446 : SWIGINTERN VALUE
5447 2 : _wrap_KeySet_rewind(int argc, VALUE *argv, VALUE self) {
5448 2 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
5449 2 : void *argp1 = 0 ;
5450 2 : int res1 = 0 ;
5451 :
5452 2 : if ((argc < 0) || (argc > 0)) {
5453 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5454 : }
5455 2 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
5456 2 : if (!SWIG_IsOK(res1)) {
5457 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet const *","rewind", 1, self ));
5458 : }
5459 2 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5460 2 : ((kdb::KeySet const *)arg1)->rewind();
5461 : return Qnil;
5462 : fail:
5463 : return Qnil;
5464 : }
5465 :
5466 :
5467 :
5468 : /*
5469 : Document-method: Kdb::KeySet.next
5470 :
5471 : call-seq:
5472 : next -> Key
5473 :
5474 : An instance method.
5475 :
5476 : */
5477 : SWIGINTERN VALUE
5478 13 : _wrap_KeySet_next(int argc, VALUE *argv, VALUE self) {
5479 13 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
5480 13 : void *argp1 = 0 ;
5481 13 : int res1 = 0 ;
5482 26 : kdb::Key result;
5483 13 : VALUE vresult = Qnil;
5484 :
5485 13 : if ((argc < 0) || (argc > 0)) {
5486 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5487 : }
5488 13 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
5489 13 : if (!SWIG_IsOK(res1)) {
5490 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet const *","next", 1, self ));
5491 : }
5492 13 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5493 39 : result = ((kdb::KeySet const *)arg1)->next();
5494 : {
5495 13 : if ((&result)->isNull()) {
5496 : vresult = Qnil;
5497 : } else {
5498 24 : vresult = SWIG_NewPointerObj(new kdb::Key(result),
5499 : SWIGTYPE_p_kdb__Key,
5500 12 : SWIG_POINTER_OWN | 0);
5501 : }
5502 : }
5503 13 : return vresult;
5504 : fail:
5505 : return Qnil;
5506 : }
5507 :
5508 :
5509 :
5510 : /*
5511 : Document-method: Kdb::KeySet.current
5512 :
5513 : call-seq:
5514 : current -> Key
5515 :
5516 : An instance method.
5517 :
5518 : */
5519 : SWIGINTERN VALUE
5520 12 : _wrap_KeySet_current(int argc, VALUE *argv, VALUE self) {
5521 12 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
5522 12 : void *argp1 = 0 ;
5523 12 : int res1 = 0 ;
5524 24 : kdb::Key result;
5525 12 : VALUE vresult = Qnil;
5526 :
5527 12 : if ((argc < 0) || (argc > 0)) {
5528 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5529 : }
5530 12 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
5531 12 : if (!SWIG_IsOK(res1)) {
5532 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet const *","current", 1, self ));
5533 : }
5534 12 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5535 36 : result = ((kdb::KeySet const *)arg1)->current();
5536 : {
5537 12 : if ((&result)->isNull()) {
5538 : vresult = Qnil;
5539 : } else {
5540 20 : vresult = SWIG_NewPointerObj(new kdb::Key(result),
5541 : SWIGTYPE_p_kdb__Key,
5542 10 : SWIG_POINTER_OWN | 0);
5543 : }
5544 : }
5545 12 : return vresult;
5546 : fail:
5547 : return Qnil;
5548 : }
5549 :
5550 :
5551 :
5552 : /*
5553 : Document-method: Kdb::KeySet.cursor=
5554 :
5555 : call-seq:
5556 : cursor=(cursor_t cursor)
5557 :
5558 : An instance method.
5559 :
5560 : */
5561 : SWIGINTERN VALUE
5562 1 : _wrap_KeySet_cursore___(int argc, VALUE *argv, VALUE self) {
5563 1 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
5564 : cursor_t arg2 ;
5565 1 : void *argp1 = 0 ;
5566 1 : int res1 = 0 ;
5567 : long val2 ;
5568 1 : int ecode2 = 0 ;
5569 :
5570 1 : if ((argc < 1) || (argc > 1)) {
5571 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5572 : }
5573 1 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
5574 1 : if (!SWIG_IsOK(res1)) {
5575 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet const *","setCursor", 1, self ));
5576 : }
5577 1 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5578 1 : ecode2 = SWIG_AsVal_long(argv[0], &val2);
5579 1 : if (!SWIG_IsOK(ecode2)) {
5580 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "cursor_t","setCursor", 2, argv[0] ));
5581 : }
5582 1 : arg2 = static_cast< cursor_t >(val2);
5583 1 : ((kdb::KeySet const *)arg1)->setCursor(arg2);
5584 : return Qnil;
5585 : fail:
5586 : return Qnil;
5587 : }
5588 :
5589 :
5590 :
5591 : /*
5592 : Document-method: Kdb::KeySet.cursor
5593 :
5594 : call-seq:
5595 : cursor -> cursor_t
5596 :
5597 : An instance method.
5598 :
5599 : */
5600 : SWIGINTERN VALUE
5601 19 : _wrap_KeySet_cursor(int argc, VALUE *argv, VALUE self) {
5602 19 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
5603 19 : void *argp1 = 0 ;
5604 19 : int res1 = 0 ;
5605 : cursor_t result;
5606 19 : VALUE vresult = Qnil;
5607 :
5608 19 : if ((argc < 0) || (argc > 0)) {
5609 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5610 : }
5611 19 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
5612 19 : if (!SWIG_IsOK(res1)) {
5613 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet const *","getCursor", 1, self ));
5614 : }
5615 19 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5616 19 : result = ((kdb::KeySet const *)arg1)->getCursor();
5617 19 : vresult = SWIG_From_long(static_cast< long >(result));
5618 : return vresult;
5619 : fail:
5620 : return Qnil;
5621 : }
5622 :
5623 :
5624 :
5625 : /*
5626 : Document-method: Kdb::KeySet.pop
5627 :
5628 : call-seq:
5629 : pop -> Key
5630 :
5631 : Remove and return element at the end of the KeySet.
5632 : */
5633 : SWIGINTERN VALUE
5634 27 : _wrap_KeySet_pop(int argc, VALUE *argv, VALUE self) {
5635 27 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
5636 27 : void *argp1 = 0 ;
5637 27 : int res1 = 0 ;
5638 54 : kdb::Key result;
5639 27 : VALUE vresult = Qnil;
5640 :
5641 27 : if ((argc < 0) || (argc > 0)) {
5642 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5643 : }
5644 27 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
5645 27 : if (!SWIG_IsOK(res1)) {
5646 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet *","pop", 1, self ));
5647 : }
5648 27 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5649 81 : result = (arg1)->pop();
5650 : {
5651 27 : if ((&result)->isNull()) {
5652 : vresult = Qnil;
5653 : } else {
5654 46 : vresult = SWIG_NewPointerObj(new kdb::Key(result),
5655 : SWIGTYPE_p_kdb__Key,
5656 23 : SWIG_POINTER_OWN | 0);
5657 : }
5658 : }
5659 27 : return vresult;
5660 : fail:
5661 : return Qnil;
5662 : }
5663 :
5664 :
5665 :
5666 : /*
5667 : Document-method: Kdb::KeySet.at
5668 :
5669 : call-seq:
5670 : at(pos) -> Key
5671 :
5672 : Return element at a certain index.
5673 : */
5674 : SWIGINTERN VALUE
5675 54 : _wrap_KeySet_at(int argc, VALUE *argv, VALUE self) {
5676 54 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
5677 : cursor_t arg2 ;
5678 54 : void *argp1 = 0 ;
5679 54 : int res1 = 0 ;
5680 : long val2 ;
5681 54 : int ecode2 = 0 ;
5682 108 : kdb::Key result;
5683 54 : VALUE vresult = Qnil;
5684 :
5685 54 : if ((argc < 1) || (argc > 1)) {
5686 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5687 : }
5688 54 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
5689 54 : if (!SWIG_IsOK(res1)) {
5690 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet const *","at", 1, self ));
5691 : }
5692 54 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5693 54 : ecode2 = SWIG_AsVal_long(argv[0], &val2);
5694 54 : if (!SWIG_IsOK(ecode2)) {
5695 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "cursor_t","at", 2, argv[0] ));
5696 : }
5697 54 : arg2 = static_cast< cursor_t >(val2);
5698 162 : result = ((kdb::KeySet const *)arg1)->at(arg2);
5699 : {
5700 54 : if ((&result)->isNull()) {
5701 : vresult = Qnil;
5702 : } else {
5703 102 : vresult = SWIG_NewPointerObj(new kdb::Key(result),
5704 : SWIGTYPE_p_kdb__Key,
5705 51 : SWIG_POINTER_OWN | 0);
5706 : }
5707 : }
5708 54 : return vresult;
5709 : fail:
5710 : return Qnil;
5711 : }
5712 :
5713 :
5714 :
5715 : /*
5716 : Document-method: Kdb::KeySet.cut
5717 :
5718 : call-seq:
5719 : cut(Key k) -> KeySet
5720 :
5721 : An instance method.
5722 :
5723 : */
5724 : SWIGINTERN VALUE
5725 2 : _wrap_KeySet_cut(int argc, VALUE *argv, VALUE self) {
5726 2 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
5727 4 : kdb::Key arg2 ;
5728 2 : void *argp1 = 0 ;
5729 2 : int res1 = 0 ;
5730 : void *argp2 ;
5731 2 : int res2 = 0 ;
5732 4 : kdb::KeySet result;
5733 2 : VALUE vresult = Qnil;
5734 :
5735 2 : if ((argc < 1) || (argc > 1)) {
5736 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5737 : }
5738 2 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
5739 2 : if (!SWIG_IsOK(res1)) {
5740 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet *","cut", 1, self ));
5741 : }
5742 2 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5743 : {
5744 2 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__Key, 0 );
5745 2 : if (!SWIG_IsOK(res2)) {
5746 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::Key","cut", 2, argv[0] ));
5747 : }
5748 2 : if (!argp2) {
5749 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key","cut", 2, argv[0]));
5750 : } else {
5751 4 : arg2 = *(reinterpret_cast< kdb::Key * >(argp2));
5752 : }
5753 : }
5754 10 : result = (arg1)->cut(arg2);
5755 4 : vresult = SWIG_NewPointerObj((new kdb::KeySet(static_cast< const kdb::KeySet& >(result))), SWIGTYPE_p_kdb__KeySet, SWIG_POINTER_OWN | 0 );
5756 2 : return vresult;
5757 : fail:
5758 : return Qnil;
5759 : }
5760 :
5761 :
5762 :
5763 : /*
5764 : Document-method: Kdb::KeySet.lookup
5765 :
5766 : call-seq:
5767 : lookup(Key k, option_t const options=KDB_O_NONE) -> Key
5768 : lookup(Key k) -> Key
5769 : lookup(std::string const & name, option_t const options=KDB_O_NONE) -> Key
5770 : lookup(std::string const & name) -> Key
5771 :
5772 : An instance method.
5773 :
5774 : */
5775 : SWIGINTERN VALUE
5776 1 : _wrap_KeySet_lookup__SWIG_0(int argc, VALUE *argv, VALUE self) {
5777 1 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
5778 1 : kdb::Key *arg2 = 0 ;
5779 : option_t arg3 ;
5780 1 : void *argp1 = 0 ;
5781 1 : int res1 = 0 ;
5782 : void *argp2 ;
5783 1 : int res2 = 0 ;
5784 : int val3 ;
5785 1 : int ecode3 = 0 ;
5786 2 : kdb::Key result;
5787 1 : VALUE vresult = Qnil;
5788 :
5789 1 : if ((argc < 2) || (argc > 2)) {
5790 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5791 : }
5792 1 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
5793 1 : if (!SWIG_IsOK(res1)) {
5794 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet const *","lookup", 1, self ));
5795 : }
5796 1 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5797 1 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__Key, 0 );
5798 1 : if (!SWIG_IsOK(res2)) {
5799 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::Key const &","lookup", 2, argv[0] ));
5800 : }
5801 1 : if (!argp2) {
5802 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key const &","lookup", 2, argv[0]));
5803 : }
5804 1 : arg2 = reinterpret_cast< kdb::Key * >(argp2);
5805 2 : ecode3 = SWIG_AsVal_int(argv[1], &val3);
5806 1 : if (!SWIG_IsOK(ecode3)) {
5807 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "option_t","lookup", 3, argv[1] ));
5808 : }
5809 1 : arg3 = static_cast< option_t >(val3);
5810 3 : result = ((kdb::KeySet const *)arg1)->lookup((kdb::Key const &)*arg2,arg3);
5811 : {
5812 1 : if ((&result)->isNull()) {
5813 : vresult = Qnil;
5814 : } else {
5815 2 : vresult = SWIG_NewPointerObj(new kdb::Key(result),
5816 : SWIGTYPE_p_kdb__Key,
5817 1 : SWIG_POINTER_OWN | 0);
5818 : }
5819 : }
5820 1 : return vresult;
5821 : fail:
5822 : return Qnil;
5823 : }
5824 :
5825 :
5826 : SWIGINTERN VALUE
5827 3 : _wrap_KeySet_lookup__SWIG_1(int argc, VALUE *argv, VALUE self) {
5828 3 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
5829 3 : kdb::Key *arg2 = 0 ;
5830 3 : void *argp1 = 0 ;
5831 3 : int res1 = 0 ;
5832 : void *argp2 ;
5833 3 : int res2 = 0 ;
5834 6 : kdb::Key result;
5835 3 : VALUE vresult = Qnil;
5836 :
5837 3 : if ((argc < 1) || (argc > 1)) {
5838 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5839 : }
5840 3 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
5841 3 : if (!SWIG_IsOK(res1)) {
5842 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet const *","lookup", 1, self ));
5843 : }
5844 3 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5845 3 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__Key, 0 );
5846 3 : if (!SWIG_IsOK(res2)) {
5847 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::Key const &","lookup", 2, argv[0] ));
5848 : }
5849 3 : if (!argp2) {
5850 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key const &","lookup", 2, argv[0]));
5851 : }
5852 3 : arg2 = reinterpret_cast< kdb::Key * >(argp2);
5853 9 : result = ((kdb::KeySet const *)arg1)->lookup((kdb::Key const &)*arg2);
5854 : {
5855 3 : if ((&result)->isNull()) {
5856 : vresult = Qnil;
5857 : } else {
5858 2 : vresult = SWIG_NewPointerObj(new kdb::Key(result),
5859 : SWIGTYPE_p_kdb__Key,
5860 1 : SWIG_POINTER_OWN | 0);
5861 : }
5862 : }
5863 3 : return vresult;
5864 : fail:
5865 : return Qnil;
5866 : }
5867 :
5868 :
5869 : SWIGINTERN VALUE
5870 2 : _wrap_KeySet_lookup__SWIG_2(int argc, VALUE *argv, VALUE self) {
5871 2 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
5872 2 : std::string *arg2 = 0 ;
5873 : option_t arg3 ;
5874 2 : void *argp1 = 0 ;
5875 2 : int res1 = 0 ;
5876 2 : int res2 = SWIG_OLDOBJ ;
5877 : int val3 ;
5878 2 : int ecode3 = 0 ;
5879 4 : kdb::Key result;
5880 2 : VALUE vresult = Qnil;
5881 :
5882 2 : if ((argc < 2) || (argc > 2)) {
5883 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5884 : }
5885 2 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
5886 2 : if (!SWIG_IsOK(res1)) {
5887 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet const *","lookup", 1, self ));
5888 : }
5889 2 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5890 : {
5891 2 : std::string *ptr = (std::string *)0;
5892 2 : res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
5893 2 : if (!SWIG_IsOK(res2)) {
5894 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","lookup", 2, argv[0] ));
5895 : }
5896 2 : if (!ptr) {
5897 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","lookup", 2, argv[0]));
5898 : }
5899 2 : arg2 = ptr;
5900 : }
5901 4 : ecode3 = SWIG_AsVal_int(argv[1], &val3);
5902 2 : if (!SWIG_IsOK(ecode3)) {
5903 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "option_t","lookup", 3, argv[1] ));
5904 : }
5905 2 : arg3 = static_cast< option_t >(val3);
5906 6 : result = ((kdb::KeySet const *)arg1)->lookup((std::string const &)*arg2,arg3);
5907 : {
5908 2 : if ((&result)->isNull()) {
5909 : vresult = Qnil;
5910 : } else {
5911 4 : vresult = SWIG_NewPointerObj(new kdb::Key(result),
5912 : SWIGTYPE_p_kdb__Key,
5913 2 : SWIG_POINTER_OWN | 0);
5914 : }
5915 : }
5916 4 : if (SWIG_IsNewObj(res2)) delete arg2;
5917 2 : return vresult;
5918 : fail:
5919 : if (SWIG_IsNewObj(res2)) delete arg2;
5920 : return Qnil;
5921 : }
5922 :
5923 :
5924 : SWIGINTERN VALUE
5925 3 : _wrap_KeySet_lookup__SWIG_3(int argc, VALUE *argv, VALUE self) {
5926 3 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
5927 3 : std::string *arg2 = 0 ;
5928 3 : void *argp1 = 0 ;
5929 3 : int res1 = 0 ;
5930 3 : int res2 = SWIG_OLDOBJ ;
5931 6 : kdb::Key result;
5932 3 : VALUE vresult = Qnil;
5933 :
5934 3 : if ((argc < 1) || (argc > 1)) {
5935 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5936 : }
5937 3 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
5938 3 : if (!SWIG_IsOK(res1)) {
5939 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet const *","lookup", 1, self ));
5940 : }
5941 3 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
5942 : {
5943 3 : std::string *ptr = (std::string *)0;
5944 3 : res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
5945 3 : if (!SWIG_IsOK(res2)) {
5946 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","lookup", 2, argv[0] ));
5947 : }
5948 3 : if (!ptr) {
5949 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","lookup", 2, argv[0]));
5950 : }
5951 3 : arg2 = ptr;
5952 : }
5953 9 : result = ((kdb::KeySet const *)arg1)->lookup((std::string const &)*arg2);
5954 : {
5955 3 : if ((&result)->isNull()) {
5956 : vresult = Qnil;
5957 : } else {
5958 4 : vresult = SWIG_NewPointerObj(new kdb::Key(result),
5959 : SWIGTYPE_p_kdb__Key,
5960 2 : SWIG_POINTER_OWN | 0);
5961 : }
5962 : }
5963 6 : if (SWIG_IsNewObj(res2)) delete arg2;
5964 3 : return vresult;
5965 : fail:
5966 : if (SWIG_IsNewObj(res2)) delete arg2;
5967 : return Qnil;
5968 : }
5969 :
5970 :
5971 9 : SWIGINTERN VALUE _wrap_KeySet_lookup(int nargs, VALUE *args, VALUE self) {
5972 : int argc;
5973 : VALUE argv[4];
5974 : int ii;
5975 :
5976 9 : argc = nargs + 1;
5977 : argv[0] = self;
5978 9 : if (argc > 4) SWIG_fail;
5979 33 : for (ii = 1; (ii < argc); ++ii) {
5980 12 : argv[ii] = args[ii-1];
5981 : }
5982 9 : if (argc == 2) {
5983 6 : int _v = 0;
5984 : {
5985 6 : void *vptr = 0;
5986 6 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_kdb__Key, 0);
5987 6 : _v = SWIG_CheckState(res);
5988 : }
5989 6 : if (!_v) goto check_1;
5990 3 : return _wrap_KeySet_lookup__SWIG_1(nargs, args, self);
5991 : }
5992 : check_1:
5993 :
5994 6 : if (argc == 2) {
5995 3 : return _wrap_KeySet_lookup__SWIG_3(nargs, args, self);
5996 : }
5997 3 : if (argc == 3) {
5998 3 : int _v = 0;
5999 : {
6000 3 : void *vptr = 0;
6001 3 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_kdb__Key, 0);
6002 3 : _v = SWIG_CheckState(res);
6003 : }
6004 3 : if (!_v) goto check_3;
6005 1 : return _wrap_KeySet_lookup__SWIG_0(nargs, args, self);
6006 : }
6007 : check_3:
6008 :
6009 2 : if (argc == 3) {
6010 2 : return _wrap_KeySet_lookup__SWIG_2(nargs, args, self);
6011 : }
6012 :
6013 : fail:
6014 : Ruby_Format_OverloadedError( argc, 4, "KeySet.lookup",
6015 : " kdb::Key KeySet.lookup(kdb::Key const &k, option_t const options)\n"
6016 : " kdb::Key KeySet.lookup(kdb::Key const &k)\n"
6017 : " kdb::Key KeySet.lookup(std::string const &name, option_t const options)\n"
6018 0 : " kdb::Key KeySet.lookup(std::string const &name)\n");
6019 :
6020 : return Qnil;
6021 : }
6022 :
6023 :
6024 : SWIGINTERN VALUE
6025 : #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
6026 47 : _wrap_KeySet_allocate(VALUE self)
6027 : #else
6028 : _wrap_KeySet_allocate(int argc, VALUE *argv, VALUE self)
6029 : #endif
6030 : {
6031 47 : VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_kdb__KeySet);
6032 : #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
6033 : rb_obj_call_init(vresult, argc, argv);
6034 : #endif
6035 47 : return vresult;
6036 : }
6037 :
6038 :
6039 :
6040 : /*
6041 : Document-method: Kdb::KeySet.new
6042 :
6043 : call-seq:
6044 : KeySet.new
6045 : KeySet.new(KeySet other)
6046 : KeySet.new(Key key)
6047 :
6048 : Class constructor.
6049 :
6050 : */
6051 : SWIGINTERN VALUE
6052 19 : _wrap_new_KeySet__SWIG_2(int argc, VALUE *argv, VALUE self) {
6053 19 : kdb::Key *arg1 = (kdb::Key *) 0 ;
6054 19 : kdb::KeySet *result = 0 ;
6055 :
6056 19 : if ((argc < 1) || (argc > 1)) {
6057 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6058 : }
6059 : {
6060 : arg1 = NULL;
6061 19 : if (!RB_TYPE_P(argv[0], T_ARRAY)){
6062 6 : if (SWIG_ConvertPtr(argv[0], (void**)&arg1, SWIGTYPE_p_kdb__Key, 0) == -1) {
6063 1 : rb_raise(rb_eArgError, "Argument has to be of Type Kdb::Key or Array");
6064 : SWIG_fail;
6065 : }
6066 : }
6067 : }
6068 : {
6069 18 : if (arg1 != NULL) {
6070 : /* we got a kdb::Key argument (see corresponding typemap)
6071 : so simply use our custom constructor*/
6072 5 : result = (kdb::KeySet *)new_kdb_KeySet__SWIG_2(arg1);
6073 5 : DATA_PTR(self) = result;
6074 : } else {
6075 : /* Ruby-Array */
6076 26 : result = (kdb::KeySet *)new kdb::KeySet();
6077 :
6078 : /* append each array element, while checking if we really got a Key */
6079 260 : for (int i = 0; i < RARRAY_LEN(argv[0]); i++) {
6080 : VALUE e;
6081 118 : kdb::Key *ek = NULL;
6082 118 : e = rb_ary_entry(argv[0], i);
6083 118 : if (SWIG_ConvertPtr(e, (void**)&ek, SWIGTYPE_p_kdb__Key, 0) == -1) {
6084 : /* delete the new KeySet first, rb_raise will not return */
6085 2 : delete result;
6086 : rb_raise(rb_eArgError,
6087 1 : "Array element at index %d is not of Type Kdb::Key", i);
6088 : SWIG_fail;
6089 : }
6090 234 : result->append(*ek);
6091 : }
6092 12 : DATA_PTR(self) = result;
6093 : }
6094 : }
6095 : return self;
6096 : fail:
6097 : return Qnil;
6098 : }
6099 :
6100 :
6101 47 : SWIGINTERN VALUE _wrap_new_KeySet(int nargs, VALUE *args, VALUE self) {
6102 : int argc;
6103 : VALUE argv[1];
6104 : int ii;
6105 :
6106 47 : argc = nargs;
6107 47 : if (argc > 1) SWIG_fail;
6108 87 : for (ii = 0; (ii < argc); ++ii) {
6109 20 : argv[ii] = args[ii];
6110 : }
6111 47 : if (argc == 0) {
6112 27 : return _wrap_new_KeySet__SWIG_0(nargs, args, self);
6113 : }
6114 20 : if (argc == 1) {
6115 20 : int _v = 0;
6116 : {
6117 20 : void *vptr = 0;
6118 20 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_kdb__KeySet, 0);
6119 20 : _v = SWIG_CheckState(res);
6120 : }
6121 20 : if (!_v) goto check_2;
6122 1 : return _wrap_new_KeySet__SWIG_1(nargs, args, self);
6123 : }
6124 : check_2:
6125 :
6126 19 : if (argc == 1) {
6127 19 : return _wrap_new_KeySet__SWIG_2(nargs, args, self);
6128 : }
6129 :
6130 : fail:
6131 : Ruby_Format_OverloadedError( argc, 1, "KeySet.new",
6132 : " KeySet.new()\n"
6133 : " KeySet.new(kdb::KeySet const &other)\n"
6134 0 : " KeySet.new(kdb::Key *key)\n");
6135 :
6136 : return Qnil;
6137 : }
6138 :
6139 :
6140 :
6141 : /*
6142 : Document-method: Kdb::KeySet.each
6143 :
6144 : call-seq:
6145 : each
6146 :
6147 : Iterate thru each element in the KeySet. A block must be provided.
6148 : */
6149 : SWIGINTERN VALUE
6150 31 : _wrap_KeySet_each(int argc, VALUE *argv, VALUE self) {
6151 31 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
6152 31 : void *argp1 = 0 ;
6153 31 : int res1 = 0 ;
6154 :
6155 31 : if ((argc < 0) || (argc > 0)) {
6156 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6157 : }
6158 31 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
6159 31 : if (!SWIG_IsOK(res1)) {
6160 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet *","each", 1, self ));
6161 : }
6162 31 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
6163 31 : kdb_KeySet_each(arg1);
6164 : return Qnil;
6165 : fail:
6166 : return Qnil;
6167 : }
6168 :
6169 :
6170 :
6171 : /*
6172 : Document-method: Kdb::KeySet.==
6173 :
6174 : call-seq:
6175 : ==(rhs) -> bool
6176 :
6177 : Equality comparison operator.
6178 : */
6179 : SWIGINTERN VALUE
6180 11 : _wrap_KeySet___eq__(int argc, VALUE *argv, VALUE self) {
6181 11 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
6182 11 : kdb::KeySet *arg2 = 0 ;
6183 11 : void *argp1 = 0 ;
6184 11 : int res1 = 0 ;
6185 : void *argp2 ;
6186 11 : int res2 = 0 ;
6187 : bool result;
6188 11 : VALUE vresult = Qnil;
6189 :
6190 11 : if ((argc < 1) || (argc > 1)) {
6191 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6192 : }
6193 11 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
6194 11 : if (!SWIG_IsOK(res1)) {
6195 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet *","operator ==", 1, self ));
6196 : }
6197 11 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
6198 11 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__KeySet, 0 );
6199 11 : if (!SWIG_IsOK(res2)) {
6200 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::KeySet const &","operator ==", 2, argv[0] ));
6201 : }
6202 11 : if (!argp2) {
6203 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::KeySet const &","operator ==", 2, argv[0]));
6204 : }
6205 11 : arg2 = reinterpret_cast< kdb::KeySet * >(argp2);
6206 11 : result = (bool)kdb_KeySet_operator_Se__Se_(arg1,(kdb::KeySet const &)*arg2);
6207 11 : vresult = SWIG_From_bool(static_cast< bool >(result));
6208 : return vresult;
6209 : fail:
6210 : return Qnil;
6211 : }
6212 :
6213 :
6214 :
6215 : /*
6216 : Document-method: Kdb::KeySet.delete_at
6217 :
6218 : call-seq:
6219 : delete_at(pos) -> Key
6220 :
6221 : Delete an element at a certain index.
6222 : */
6223 : SWIGINTERN VALUE
6224 4 : _wrap_KeySet_delete_at(int argc, VALUE *argv, VALUE self) {
6225 4 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
6226 : cursor_t arg2 ;
6227 4 : void *argp1 = 0 ;
6228 4 : int res1 = 0 ;
6229 : long val2 ;
6230 4 : int ecode2 = 0 ;
6231 8 : kdb::Key result;
6232 4 : VALUE vresult = Qnil;
6233 :
6234 4 : if ((argc < 1) || (argc > 1)) {
6235 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6236 : }
6237 4 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
6238 4 : if (!SWIG_IsOK(res1)) {
6239 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet *","delete_at", 1, self ));
6240 : }
6241 4 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
6242 4 : ecode2 = SWIG_AsVal_long(argv[0], &val2);
6243 4 : if (!SWIG_IsOK(ecode2)) {
6244 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "cursor_t","delete_at", 2, argv[0] ));
6245 : }
6246 4 : arg2 = static_cast< cursor_t >(val2);
6247 12 : result = kdb_KeySet_delete_at(arg1,arg2);
6248 : {
6249 4 : if ((&result)->isNull()) {
6250 : vresult = Qnil;
6251 : } else {
6252 6 : vresult = SWIG_NewPointerObj(new kdb::Key(result),
6253 : SWIGTYPE_p_kdb__Key,
6254 3 : SWIG_POINTER_OWN | 0);
6255 : }
6256 : }
6257 4 : return vresult;
6258 : fail:
6259 : return Qnil;
6260 : }
6261 :
6262 :
6263 :
6264 : /*
6265 : Document-method: Kdb::KeySet.delete
6266 :
6267 : call-seq:
6268 : delete(Key key) -> Key
6269 : delete(std::string const & name) -> Key
6270 :
6271 : An instance method.
6272 :
6273 : */
6274 : SWIGINTERN VALUE
6275 3 : _wrap_KeySet_delete__SWIG_0(int argc, VALUE *argv, VALUE self) {
6276 3 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
6277 3 : kdb::Key *arg2 = 0 ;
6278 3 : void *argp1 = 0 ;
6279 3 : int res1 = 0 ;
6280 : void *argp2 ;
6281 3 : int res2 = 0 ;
6282 6 : kdb::Key result;
6283 3 : VALUE vresult = Qnil;
6284 :
6285 3 : if ((argc < 1) || (argc > 1)) {
6286 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6287 : }
6288 3 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
6289 3 : if (!SWIG_IsOK(res1)) {
6290 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet *","delete_", 1, self ));
6291 : }
6292 3 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
6293 3 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__Key, 0 );
6294 3 : if (!SWIG_IsOK(res2)) {
6295 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::Key const &","delete_", 2, argv[0] ));
6296 : }
6297 3 : if (!argp2) {
6298 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key const &","delete_", 2, argv[0]));
6299 : }
6300 3 : arg2 = reinterpret_cast< kdb::Key * >(argp2);
6301 9 : result = kdb_KeySet_delete___SWIG_0(arg1,(kdb::Key const &)*arg2);
6302 : {
6303 3 : if ((&result)->isNull()) {
6304 : vresult = Qnil;
6305 : } else {
6306 4 : vresult = SWIG_NewPointerObj(new kdb::Key(result),
6307 : SWIGTYPE_p_kdb__Key,
6308 2 : SWIG_POINTER_OWN | 0);
6309 : }
6310 : }
6311 3 : return vresult;
6312 : fail:
6313 : return Qnil;
6314 : }
6315 :
6316 :
6317 : SWIGINTERN VALUE
6318 3 : _wrap_KeySet_delete__SWIG_1(int argc, VALUE *argv, VALUE self) {
6319 3 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
6320 3 : std::string *arg2 = 0 ;
6321 3 : void *argp1 = 0 ;
6322 3 : int res1 = 0 ;
6323 3 : int res2 = SWIG_OLDOBJ ;
6324 6 : kdb::Key result;
6325 3 : VALUE vresult = Qnil;
6326 :
6327 3 : if ((argc < 1) || (argc > 1)) {
6328 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6329 : }
6330 3 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
6331 3 : if (!SWIG_IsOK(res1)) {
6332 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet *","delete_", 1, self ));
6333 : }
6334 3 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
6335 : {
6336 3 : std::string *ptr = (std::string *)0;
6337 3 : res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
6338 3 : if (!SWIG_IsOK(res2)) {
6339 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","delete_", 2, argv[0] ));
6340 : }
6341 3 : if (!ptr) {
6342 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","delete_", 2, argv[0]));
6343 : }
6344 3 : arg2 = ptr;
6345 : }
6346 9 : result = kdb_KeySet_delete___SWIG_1(arg1,(std::string const &)*arg2);
6347 : {
6348 3 : if ((&result)->isNull()) {
6349 : vresult = Qnil;
6350 : } else {
6351 4 : vresult = SWIG_NewPointerObj(new kdb::Key(result),
6352 : SWIGTYPE_p_kdb__Key,
6353 2 : SWIG_POINTER_OWN | 0);
6354 : }
6355 : }
6356 6 : if (SWIG_IsNewObj(res2)) delete arg2;
6357 3 : return vresult;
6358 : fail:
6359 : if (SWIG_IsNewObj(res2)) delete arg2;
6360 : return Qnil;
6361 : }
6362 :
6363 :
6364 6 : SWIGINTERN VALUE _wrap_KeySet_delete(int nargs, VALUE *args, VALUE self) {
6365 : int argc;
6366 : VALUE argv[3];
6367 : int ii;
6368 :
6369 6 : argc = nargs + 1;
6370 : argv[0] = self;
6371 6 : if (argc > 3) SWIG_fail;
6372 18 : for (ii = 1; (ii < argc); ++ii) {
6373 6 : argv[ii] = args[ii-1];
6374 : }
6375 6 : if (argc == 2) {
6376 6 : int _v = 0;
6377 : {
6378 6 : void *vptr = 0;
6379 6 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_kdb__Key, 0);
6380 6 : _v = SWIG_CheckState(res);
6381 : }
6382 6 : if (!_v) goto check_1;
6383 3 : return _wrap_KeySet_delete__SWIG_0(nargs, args, self);
6384 : }
6385 : check_1:
6386 :
6387 3 : if (argc == 2) {
6388 3 : return _wrap_KeySet_delete__SWIG_1(nargs, args, self);
6389 : }
6390 :
6391 : fail:
6392 : Ruby_Format_OverloadedError( argc, 3, "delete",
6393 : " kdb::Key delete(kdb::Key const &key)\n"
6394 0 : " kdb::Key delete(std::string const &name)\n");
6395 :
6396 : return Qnil;
6397 : }
6398 :
6399 :
6400 :
6401 : /*
6402 : Document-method: Kdb::KeySet.empty?
6403 :
6404 : call-seq:
6405 : empty? -> bool
6406 :
6407 : Check if KeySet is empty.
6408 : */
6409 : SWIGINTERN VALUE
6410 6 : _wrap_KeySet_emptyq___(int argc, VALUE *argv, VALUE self) {
6411 6 : kdb::KeySet *arg1 = (kdb::KeySet *) 0 ;
6412 6 : void *argp1 = 0 ;
6413 6 : int res1 = 0 ;
6414 : bool result;
6415 6 : VALUE vresult = Qnil;
6416 :
6417 6 : if ((argc < 0) || (argc > 0)) {
6418 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6419 : }
6420 6 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KeySet, 0 | 0 );
6421 6 : if (!SWIG_IsOK(res1)) {
6422 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KeySet *","empty", 1, self ));
6423 : }
6424 6 : arg1 = reinterpret_cast< kdb::KeySet * >(argp1);
6425 6 : result = (bool)kdb_KeySet_empty(arg1);
6426 6 : vresult = SWIG_From_bool(static_cast< bool >(result));
6427 : return vresult;
6428 : fail:
6429 : return Qnil;
6430 : }
6431 :
6432 :
6433 :
6434 : /*
6435 : Document-class: Kdb::KDBException < Kdb::kdb::Exception
6436 :
6437 : Proxy of C++ Kdb::KDBException class
6438 :
6439 :
6440 : */
6441 : static swig_class SwigClassKDBException;
6442 :
6443 : SWIGINTERN VALUE
6444 : #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
6445 0 : _wrap_KDBException_allocate(VALUE self)
6446 : #else
6447 : _wrap_KDBException_allocate(int argc, VALUE *argv, VALUE self)
6448 : #endif
6449 : {
6450 0 : VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_kdb__KDBException);
6451 : #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
6452 : rb_obj_call_init(vresult, argc, argv);
6453 : #endif
6454 0 : return vresult;
6455 : }
6456 :
6457 :
6458 :
6459 : /*
6460 : Document-method: Kdb::KDBException.new
6461 :
6462 : call-seq:
6463 : KDBException.new(Key key)
6464 :
6465 : Class constructor.
6466 :
6467 : */
6468 : SWIGINTERN VALUE
6469 0 : _wrap_new_KDBException(int argc, VALUE *argv, VALUE self) {
6470 0 : kdb::Key arg1 ;
6471 : void *argp1 ;
6472 0 : int res1 = 0 ;
6473 0 : kdb::KDBException *result = 0 ;
6474 :
6475 0 : if ((argc < 1) || (argc > 1)) {
6476 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6477 : }
6478 : {
6479 0 : res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_kdb__Key, 0 );
6480 0 : if (!SWIG_IsOK(res1)) {
6481 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key","KDBException", 1, argv[0] ));
6482 : }
6483 0 : if (!argp1) {
6484 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key","KDBException", 1, argv[0]));
6485 : } else {
6486 0 : arg1 = *(reinterpret_cast< kdb::Key * >(argp1));
6487 : }
6488 : }
6489 0 : result = (kdb::KDBException *)new kdb::KDBException(arg1);
6490 0 : DATA_PTR(self) = result;
6491 0 : return self;
6492 : fail:
6493 : return Qnil;
6494 : }
6495 :
6496 :
6497 : SWIGINTERN void
6498 4 : free_kdb_KDBException(void *self) {
6499 4 : kdb::KDBException *arg1 = (kdb::KDBException *)self;
6500 4 : delete arg1;
6501 4 : }
6502 :
6503 :
6504 : /*
6505 : Document-method: Kdb::KDBException.what_with_arguments
6506 :
6507 : call-seq:
6508 : what_with_arguments(bool printVerbose, bool printDebug) -> char const *
6509 :
6510 : An instance method.
6511 :
6512 : */
6513 : SWIGINTERN VALUE
6514 0 : _wrap_KDBException_what_with_arguments(int argc, VALUE *argv, VALUE self) {
6515 0 : kdb::KDBException *arg1 = (kdb::KDBException *) 0 ;
6516 : bool arg2 ;
6517 : bool arg3 ;
6518 0 : void *argp1 = 0 ;
6519 0 : int res1 = 0 ;
6520 : bool val2 ;
6521 0 : int ecode2 = 0 ;
6522 : bool val3 ;
6523 0 : int ecode3 = 0 ;
6524 0 : char *result = 0 ;
6525 0 : VALUE vresult = Qnil;
6526 :
6527 0 : if ((argc < 2) || (argc > 2)) {
6528 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6529 : }
6530 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KDBException, 0 | 0 );
6531 0 : if (!SWIG_IsOK(res1)) {
6532 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KDBException const *","whatWithArguments", 1, self ));
6533 : }
6534 0 : arg1 = reinterpret_cast< kdb::KDBException * >(argp1);
6535 0 : ecode2 = SWIG_AsVal_bool(argv[0], &val2);
6536 0 : if (!SWIG_IsOK(ecode2)) {
6537 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","whatWithArguments", 2, argv[0] ));
6538 : }
6539 0 : arg2 = static_cast< bool >(val2);
6540 0 : ecode3 = SWIG_AsVal_bool(argv[1], &val3);
6541 0 : if (!SWIG_IsOK(ecode3)) {
6542 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","whatWithArguments", 3, argv[1] ));
6543 : }
6544 0 : arg3 = static_cast< bool >(val3);
6545 0 : result = (char *)((kdb::KDBException const *)arg1)->whatWithArguments(arg2,arg3);
6546 0 : vresult = SWIG_FromCharPtr((const char *)result);
6547 : return vresult;
6548 : fail:
6549 : return Qnil;
6550 : }
6551 :
6552 :
6553 :
6554 : /*
6555 : Document-class: Kdb::ContractException < Kdb::kdb::KDBException
6556 :
6557 : Proxy of C++ Kdb::ContractException class
6558 :
6559 :
6560 : */
6561 : static swig_class SwigClassContractException;
6562 :
6563 : SWIGINTERN VALUE
6564 : #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
6565 0 : _wrap_ContractException_allocate(VALUE self)
6566 : #else
6567 : _wrap_ContractException_allocate(int argc, VALUE *argv, VALUE self)
6568 : #endif
6569 : {
6570 0 : VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_kdb__ContractException);
6571 : #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
6572 : rb_obj_call_init(vresult, argc, argv);
6573 : #endif
6574 0 : return vresult;
6575 : }
6576 :
6577 :
6578 :
6579 : /*
6580 : Document-method: Kdb::ContractException.new
6581 :
6582 : call-seq:
6583 : ContractException.new(Key key)
6584 :
6585 : Class constructor.
6586 :
6587 : */
6588 : SWIGINTERN VALUE
6589 0 : _wrap_new_ContractException(int argc, VALUE *argv, VALUE self) {
6590 0 : kdb::Key arg1 ;
6591 : void *argp1 ;
6592 0 : int res1 = 0 ;
6593 0 : kdb::ContractException *result = 0 ;
6594 :
6595 0 : if ((argc < 1) || (argc > 1)) {
6596 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6597 : }
6598 : {
6599 0 : res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_kdb__Key, 0 );
6600 0 : if (!SWIG_IsOK(res1)) {
6601 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key","ContractException", 1, argv[0] ));
6602 : }
6603 0 : if (!argp1) {
6604 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key","ContractException", 1, argv[0]));
6605 : } else {
6606 0 : arg1 = *(reinterpret_cast< kdb::Key * >(argp1));
6607 : }
6608 : }
6609 0 : result = (kdb::ContractException *)new kdb::ContractException(arg1);
6610 0 : DATA_PTR(self) = result;
6611 0 : return self;
6612 : fail:
6613 : return Qnil;
6614 : }
6615 :
6616 :
6617 : SWIGINTERN void
6618 0 : free_kdb_ContractException(void *self) {
6619 0 : kdb::ContractException *arg1 = (kdb::ContractException *)self;
6620 0 : delete arg1;
6621 0 : }
6622 :
6623 :
6624 : /*
6625 : Document-class: Kdb::KDB
6626 :
6627 : Proxy of C++ Kdb::KDB class
6628 :
6629 :
6630 : */
6631 : static swig_class SwigClassKDB;
6632 :
6633 :
6634 : /*
6635 : Document-method: Kdb::KDB.new
6636 :
6637 : call-seq:
6638 : KDB.new
6639 : KDB.new(Key errorKey)
6640 :
6641 : Class constructor.
6642 :
6643 : */
6644 : SWIGINTERN VALUE
6645 7 : _wrap_new_KDB__SWIG_0(int argc, VALUE *argv, VALUE self) {
6646 7 : kdb::KDB *result = 0 ;
6647 :
6648 7 : if ((argc < 0) || (argc > 0)) {
6649 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6650 : }
6651 : try {
6652 7 : result = (kdb::KDB *)new kdb::KDB();
6653 7 : DATA_PTR(self) = result;
6654 : }
6655 0 : catch(kdb::KDBException &_e) {
6656 0 : rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_kdb__KDBException, SWIG_NewPointerObj((new kdb::KDBException(static_cast< const kdb::KDBException& >(_e))),SWIGTYPE_p_kdb__KDBException,SWIG_POINTER_OWN))); SWIG_fail;
6657 : }
6658 :
6659 : return self;
6660 : fail:
6661 : return Qnil;
6662 : }
6663 :
6664 :
6665 : SWIGINTERN VALUE
6666 : #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
6667 9 : _wrap_KDB_allocate(VALUE self)
6668 : #else
6669 : _wrap_KDB_allocate(int argc, VALUE *argv, VALUE self)
6670 : #endif
6671 : {
6672 9 : VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_kdb__KDB);
6673 : #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
6674 : rb_obj_call_init(vresult, argc, argv);
6675 : #endif
6676 9 : return vresult;
6677 : }
6678 :
6679 :
6680 : SWIGINTERN VALUE
6681 2 : _wrap_new_KDB__SWIG_1(int argc, VALUE *argv, VALUE self) {
6682 2 : kdb::Key *arg1 = 0 ;
6683 2 : void *argp1 = 0 ;
6684 2 : int res1 = 0 ;
6685 2 : kdb::KDB *result = 0 ;
6686 :
6687 2 : if ((argc < 1) || (argc > 1)) {
6688 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6689 : }
6690 2 : res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_kdb__Key, 0 );
6691 2 : if (!SWIG_IsOK(res1)) {
6692 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::Key &","KDB", 1, argv[0] ));
6693 : }
6694 2 : if (!argp1) {
6695 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key &","KDB", 1, argv[0]));
6696 : }
6697 2 : arg1 = reinterpret_cast< kdb::Key * >(argp1);
6698 : try {
6699 4 : result = (kdb::KDB *)new kdb::KDB(*arg1);
6700 2 : DATA_PTR(self) = result;
6701 : }
6702 0 : catch(kdb::KDBException &_e) {
6703 0 : rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_kdb__KDBException, SWIG_NewPointerObj((new kdb::KDBException(static_cast< const kdb::KDBException& >(_e))),SWIGTYPE_p_kdb__KDBException,SWIG_POINTER_OWN))); SWIG_fail;
6704 : }
6705 :
6706 : return self;
6707 : fail:
6708 : return Qnil;
6709 : }
6710 :
6711 :
6712 9 : SWIGINTERN VALUE _wrap_new_KDB(int nargs, VALUE *args, VALUE self) {
6713 : int argc;
6714 : VALUE argv[1];
6715 : int ii;
6716 :
6717 9 : argc = nargs;
6718 9 : if (argc > 1) SWIG_fail;
6719 : for (ii = 0; (ii < argc); ++ii) {
6720 : argv[ii] = args[ii];
6721 : }
6722 9 : if (argc == 0) {
6723 7 : return _wrap_new_KDB__SWIG_0(nargs, args, self);
6724 : }
6725 2 : if (argc == 1) {
6726 2 : return _wrap_new_KDB__SWIG_1(nargs, args, self);
6727 : }
6728 :
6729 : fail:
6730 : Ruby_Format_OverloadedError( argc, 1, "KDB.new",
6731 : " KDB.new()\n"
6732 0 : " KDB.new(kdb::Key &errorKey)\n");
6733 :
6734 : return Qnil;
6735 : }
6736 :
6737 :
6738 : SWIGINTERN void
6739 9 : free_kdb_KDB(void *self) {
6740 9 : kdb::KDB *arg1 = (kdb::KDB *)self;
6741 9 : delete arg1;
6742 9 : }
6743 :
6744 :
6745 : /*
6746 : Document-method: Kdb::KDB.open
6747 :
6748 : call-seq:
6749 : open(Key errorKey)
6750 :
6751 : An instance method.
6752 :
6753 : */
6754 : SWIGINTERN VALUE
6755 0 : _wrap_KDB_open(int argc, VALUE *argv, VALUE self) {
6756 0 : kdb::KDB *arg1 = (kdb::KDB *) 0 ;
6757 0 : kdb::Key *arg2 = 0 ;
6758 0 : void *argp1 = 0 ;
6759 0 : int res1 = 0 ;
6760 0 : void *argp2 = 0 ;
6761 0 : int res2 = 0 ;
6762 :
6763 0 : if ((argc < 1) || (argc > 1)) {
6764 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6765 : }
6766 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KDB, 0 | 0 );
6767 0 : if (!SWIG_IsOK(res1)) {
6768 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KDB *","open", 1, self ));
6769 : }
6770 0 : arg1 = reinterpret_cast< kdb::KDB * >(argp1);
6771 0 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__Key, 0 );
6772 0 : if (!SWIG_IsOK(res2)) {
6773 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::Key &","open", 2, argv[0] ));
6774 : }
6775 0 : if (!argp2) {
6776 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key &","open", 2, argv[0]));
6777 : }
6778 0 : arg2 = reinterpret_cast< kdb::Key * >(argp2);
6779 : try {
6780 0 : (arg1)->open(*arg2);
6781 : }
6782 0 : catch(kdb::KDBException &_e) {
6783 0 : rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_kdb__KDBException, SWIG_NewPointerObj((new kdb::KDBException(static_cast< const kdb::KDBException& >(_e))),SWIGTYPE_p_kdb__KDBException,SWIG_POINTER_OWN))); SWIG_fail;
6784 : }
6785 :
6786 : return Qnil;
6787 : fail:
6788 : return Qnil;
6789 : }
6790 :
6791 :
6792 :
6793 : /*
6794 : Document-method: Kdb::KDB.close
6795 :
6796 : call-seq:
6797 : close
6798 : close(Key errorKey)
6799 :
6800 : An instance method.
6801 :
6802 : */
6803 : SWIGINTERN VALUE
6804 4 : _wrap_KDB_close__SWIG_0(int argc, VALUE *argv, VALUE self) {
6805 4 : kdb::KDB *arg1 = (kdb::KDB *) 0 ;
6806 4 : void *argp1 = 0 ;
6807 4 : int res1 = 0 ;
6808 :
6809 4 : if ((argc < 0) || (argc > 0)) {
6810 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6811 : }
6812 4 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KDB, 0 | 0 );
6813 4 : if (!SWIG_IsOK(res1)) {
6814 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KDB *","close", 1, self ));
6815 : }
6816 4 : arg1 = reinterpret_cast< kdb::KDB * >(argp1);
6817 4 : (arg1)->close();
6818 : return Qnil;
6819 : fail:
6820 : return Qnil;
6821 : }
6822 :
6823 :
6824 : SWIGINTERN VALUE
6825 0 : _wrap_KDB_close__SWIG_1(int argc, VALUE *argv, VALUE self) {
6826 0 : kdb::KDB *arg1 = (kdb::KDB *) 0 ;
6827 0 : kdb::Key *arg2 = 0 ;
6828 0 : void *argp1 = 0 ;
6829 0 : int res1 = 0 ;
6830 0 : void *argp2 = 0 ;
6831 0 : int res2 = 0 ;
6832 :
6833 0 : if ((argc < 1) || (argc > 1)) {
6834 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6835 : }
6836 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KDB, 0 | 0 );
6837 0 : if (!SWIG_IsOK(res1)) {
6838 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KDB *","close", 1, self ));
6839 : }
6840 0 : arg1 = reinterpret_cast< kdb::KDB * >(argp1);
6841 0 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__Key, 0 );
6842 0 : if (!SWIG_IsOK(res2)) {
6843 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::Key &","close", 2, argv[0] ));
6844 : }
6845 0 : if (!argp2) {
6846 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key &","close", 2, argv[0]));
6847 : }
6848 0 : arg2 = reinterpret_cast< kdb::Key * >(argp2);
6849 0 : (arg1)->close(*arg2);
6850 : return Qnil;
6851 : fail:
6852 : return Qnil;
6853 : }
6854 :
6855 :
6856 4 : SWIGINTERN VALUE _wrap_KDB_close(int nargs, VALUE *args, VALUE self) {
6857 : int argc;
6858 : VALUE argv[3];
6859 : int ii;
6860 :
6861 4 : argc = nargs + 1;
6862 : argv[0] = self;
6863 4 : if (argc > 3) SWIG_fail;
6864 : for (ii = 1; (ii < argc); ++ii) {
6865 : argv[ii] = args[ii-1];
6866 : }
6867 4 : if (argc == 1) {
6868 4 : return _wrap_KDB_close__SWIG_0(nargs, args, self);
6869 : }
6870 0 : if (argc == 2) {
6871 0 : return _wrap_KDB_close__SWIG_1(nargs, args, self);
6872 : }
6873 :
6874 : fail:
6875 : Ruby_Format_OverloadedError( argc, 3, "KDB.close",
6876 : " void KDB.close()\n"
6877 0 : " void KDB.close(kdb::Key &errorKey)\n");
6878 :
6879 : return Qnil;
6880 : }
6881 :
6882 :
6883 :
6884 : /*
6885 : Document-method: Kdb::KDB.get
6886 :
6887 : call-seq:
6888 : get(KeySet returned, std::string const & keyname) -> int
6889 : get(KeySet returned, Key parentKey) -> int
6890 :
6891 : An instance method.
6892 :
6893 : */
6894 : SWIGINTERN VALUE
6895 6 : _wrap_KDB_get__SWIG_0(int argc, VALUE *argv, VALUE self) {
6896 6 : kdb::KDB *arg1 = (kdb::KDB *) 0 ;
6897 6 : kdb::KeySet *arg2 = 0 ;
6898 6 : std::string *arg3 = 0 ;
6899 6 : void *argp1 = 0 ;
6900 6 : int res1 = 0 ;
6901 6 : void *argp2 = 0 ;
6902 6 : int res2 = 0 ;
6903 6 : int res3 = SWIG_OLDOBJ ;
6904 : int result;
6905 6 : VALUE vresult = Qnil;
6906 :
6907 6 : if ((argc < 2) || (argc > 2)) {
6908 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6909 : }
6910 6 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KDB, 0 | 0 );
6911 6 : if (!SWIG_IsOK(res1)) {
6912 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KDB *","get", 1, self ));
6913 : }
6914 6 : arg1 = reinterpret_cast< kdb::KDB * >(argp1);
6915 6 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__KeySet, 0 );
6916 6 : if (!SWIG_IsOK(res2)) {
6917 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::KeySet &","get", 2, argv[0] ));
6918 : }
6919 6 : if (!argp2) {
6920 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::KeySet &","get", 2, argv[0]));
6921 : }
6922 6 : arg2 = reinterpret_cast< kdb::KeySet * >(argp2);
6923 : {
6924 6 : std::string *ptr = (std::string *)0;
6925 6 : res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
6926 6 : if (!SWIG_IsOK(res3)) {
6927 0 : SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","get", 3, argv[1] ));
6928 : }
6929 6 : if (!ptr) {
6930 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","get", 3, argv[1]));
6931 : }
6932 6 : arg3 = ptr;
6933 : }
6934 : try {
6935 6 : result = (int)(arg1)->get(*arg2,(std::string const &)*arg3);
6936 : }
6937 2 : catch(kdb::KDBException &_e) {
6938 2 : rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_kdb__KDBException, SWIG_NewPointerObj((new kdb::KDBException(static_cast< const kdb::KDBException& >(_e))),SWIGTYPE_p_kdb__KDBException,SWIG_POINTER_OWN))); SWIG_fail;
6939 : }
6940 :
6941 4 : vresult = SWIG_From_int(static_cast< int >(result));
6942 8 : if (SWIG_IsNewObj(res3)) delete arg3;
6943 : return vresult;
6944 : fail:
6945 : if (SWIG_IsNewObj(res3)) delete arg3;
6946 : return Qnil;
6947 : }
6948 :
6949 :
6950 : SWIGINTERN VALUE
6951 0 : _wrap_KDB_get__SWIG_1(int argc, VALUE *argv, VALUE self) {
6952 0 : kdb::KDB *arg1 = (kdb::KDB *) 0 ;
6953 0 : kdb::KeySet *arg2 = 0 ;
6954 0 : kdb::Key *arg3 = 0 ;
6955 0 : void *argp1 = 0 ;
6956 0 : int res1 = 0 ;
6957 0 : void *argp2 = 0 ;
6958 0 : int res2 = 0 ;
6959 0 : void *argp3 = 0 ;
6960 0 : int res3 = 0 ;
6961 : int result;
6962 0 : VALUE vresult = Qnil;
6963 :
6964 0 : if ((argc < 2) || (argc > 2)) {
6965 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6966 : }
6967 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KDB, 0 | 0 );
6968 0 : if (!SWIG_IsOK(res1)) {
6969 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KDB *","get", 1, self ));
6970 : }
6971 0 : arg1 = reinterpret_cast< kdb::KDB * >(argp1);
6972 0 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__KeySet, 0 );
6973 0 : if (!SWIG_IsOK(res2)) {
6974 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::KeySet &","get", 2, argv[0] ));
6975 : }
6976 0 : if (!argp2) {
6977 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::KeySet &","get", 2, argv[0]));
6978 : }
6979 0 : arg2 = reinterpret_cast< kdb::KeySet * >(argp2);
6980 0 : res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_kdb__Key, 0 );
6981 0 : if (!SWIG_IsOK(res3)) {
6982 0 : SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "kdb::Key &","get", 3, argv[1] ));
6983 : }
6984 0 : if (!argp3) {
6985 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key &","get", 3, argv[1]));
6986 : }
6987 0 : arg3 = reinterpret_cast< kdb::Key * >(argp3);
6988 : try {
6989 0 : result = (int)(arg1)->get(*arg2,*arg3);
6990 : }
6991 0 : catch(kdb::KDBException &_e) {
6992 0 : rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_kdb__KDBException, SWIG_NewPointerObj((new kdb::KDBException(static_cast< const kdb::KDBException& >(_e))),SWIGTYPE_p_kdb__KDBException,SWIG_POINTER_OWN))); SWIG_fail;
6993 : }
6994 :
6995 0 : vresult = SWIG_From_int(static_cast< int >(result));
6996 : return vresult;
6997 : fail:
6998 : return Qnil;
6999 : }
7000 :
7001 :
7002 6 : SWIGINTERN VALUE _wrap_KDB_get(int nargs, VALUE *args, VALUE self) {
7003 : int argc;
7004 : VALUE argv[4];
7005 : int ii;
7006 :
7007 6 : argc = nargs + 1;
7008 : argv[0] = self;
7009 6 : if (argc > 4) SWIG_fail;
7010 30 : for (ii = 1; (ii < argc); ++ii) {
7011 12 : argv[ii] = args[ii-1];
7012 : }
7013 6 : if (argc == 3) {
7014 6 : int _v = 0;
7015 : {
7016 6 : void *vptr = 0;
7017 6 : int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_kdb__Key, 0);
7018 6 : _v = SWIG_CheckState(res);
7019 : }
7020 6 : if (!_v) goto check_1;
7021 0 : return _wrap_KDB_get__SWIG_1(nargs, args, self);
7022 : }
7023 : check_1:
7024 :
7025 6 : if (argc == 3) {
7026 6 : return _wrap_KDB_get__SWIG_0(nargs, args, self);
7027 : }
7028 :
7029 : fail:
7030 : Ruby_Format_OverloadedError( argc, 4, "KDB.get",
7031 : " int KDB.get(kdb::KeySet &returned, std::string const &keyname)\n"
7032 0 : " int KDB.get(kdb::KeySet &returned, kdb::Key &parentKey)\n");
7033 :
7034 : return Qnil;
7035 : }
7036 :
7037 :
7038 :
7039 : /*
7040 : Document-method: Kdb::KDB.set
7041 :
7042 : call-seq:
7043 : set(KeySet returned, std::string const & keyname) -> int
7044 : set(KeySet returned, Key parentKey) -> int
7045 :
7046 : An instance method.
7047 :
7048 : */
7049 : SWIGINTERN VALUE
7050 4 : _wrap_KDB_set__SWIG_0(int argc, VALUE *argv, VALUE self) {
7051 4 : kdb::KDB *arg1 = (kdb::KDB *) 0 ;
7052 4 : kdb::KeySet *arg2 = 0 ;
7053 4 : std::string *arg3 = 0 ;
7054 4 : void *argp1 = 0 ;
7055 4 : int res1 = 0 ;
7056 4 : void *argp2 = 0 ;
7057 4 : int res2 = 0 ;
7058 4 : int res3 = SWIG_OLDOBJ ;
7059 : int result;
7060 4 : VALUE vresult = Qnil;
7061 :
7062 4 : if ((argc < 2) || (argc > 2)) {
7063 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
7064 : }
7065 4 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KDB, 0 | 0 );
7066 4 : if (!SWIG_IsOK(res1)) {
7067 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KDB *","set", 1, self ));
7068 : }
7069 4 : arg1 = reinterpret_cast< kdb::KDB * >(argp1);
7070 4 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__KeySet, 0 );
7071 4 : if (!SWIG_IsOK(res2)) {
7072 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::KeySet &","set", 2, argv[0] ));
7073 : }
7074 4 : if (!argp2) {
7075 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::KeySet &","set", 2, argv[0]));
7076 : }
7077 4 : arg2 = reinterpret_cast< kdb::KeySet * >(argp2);
7078 : {
7079 4 : std::string *ptr = (std::string *)0;
7080 4 : res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
7081 4 : if (!SWIG_IsOK(res3)) {
7082 0 : SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","set", 3, argv[1] ));
7083 : }
7084 4 : if (!ptr) {
7085 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","set", 3, argv[1]));
7086 : }
7087 4 : arg3 = ptr;
7088 : }
7089 : try {
7090 4 : result = (int)(arg1)->set(*arg2,(std::string const &)*arg3);
7091 : }
7092 2 : catch(kdb::KDBException &_e) {
7093 2 : rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_kdb__KDBException, SWIG_NewPointerObj((new kdb::KDBException(static_cast< const kdb::KDBException& >(_e))),SWIGTYPE_p_kdb__KDBException,SWIG_POINTER_OWN))); SWIG_fail;
7094 : }
7095 :
7096 2 : vresult = SWIG_From_int(static_cast< int >(result));
7097 4 : if (SWIG_IsNewObj(res3)) delete arg3;
7098 : return vresult;
7099 : fail:
7100 : if (SWIG_IsNewObj(res3)) delete arg3;
7101 : return Qnil;
7102 : }
7103 :
7104 :
7105 : SWIGINTERN VALUE
7106 0 : _wrap_KDB_set__SWIG_1(int argc, VALUE *argv, VALUE self) {
7107 0 : kdb::KDB *arg1 = (kdb::KDB *) 0 ;
7108 0 : kdb::KeySet *arg2 = 0 ;
7109 0 : kdb::Key *arg3 = 0 ;
7110 0 : void *argp1 = 0 ;
7111 0 : int res1 = 0 ;
7112 0 : void *argp2 = 0 ;
7113 0 : int res2 = 0 ;
7114 0 : void *argp3 = 0 ;
7115 0 : int res3 = 0 ;
7116 : int result;
7117 0 : VALUE vresult = Qnil;
7118 :
7119 0 : if ((argc < 2) || (argc > 2)) {
7120 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
7121 : }
7122 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KDB, 0 | 0 );
7123 0 : if (!SWIG_IsOK(res1)) {
7124 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KDB *","set", 1, self ));
7125 : }
7126 0 : arg1 = reinterpret_cast< kdb::KDB * >(argp1);
7127 0 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__KeySet, 0 );
7128 0 : if (!SWIG_IsOK(res2)) {
7129 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::KeySet &","set", 2, argv[0] ));
7130 : }
7131 0 : if (!argp2) {
7132 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::KeySet &","set", 2, argv[0]));
7133 : }
7134 0 : arg2 = reinterpret_cast< kdb::KeySet * >(argp2);
7135 0 : res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_kdb__Key, 0 );
7136 0 : if (!SWIG_IsOK(res3)) {
7137 0 : SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "kdb::Key &","set", 3, argv[1] ));
7138 : }
7139 0 : if (!argp3) {
7140 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key &","set", 3, argv[1]));
7141 : }
7142 0 : arg3 = reinterpret_cast< kdb::Key * >(argp3);
7143 : try {
7144 0 : result = (int)(arg1)->set(*arg2,*arg3);
7145 : }
7146 0 : catch(kdb::KDBException &_e) {
7147 0 : rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_kdb__KDBException, SWIG_NewPointerObj((new kdb::KDBException(static_cast< const kdb::KDBException& >(_e))),SWIGTYPE_p_kdb__KDBException,SWIG_POINTER_OWN))); SWIG_fail;
7148 : }
7149 :
7150 0 : vresult = SWIG_From_int(static_cast< int >(result));
7151 : return vresult;
7152 : fail:
7153 : return Qnil;
7154 : }
7155 :
7156 :
7157 4 : SWIGINTERN VALUE _wrap_KDB_set(int nargs, VALUE *args, VALUE self) {
7158 : int argc;
7159 : VALUE argv[4];
7160 : int ii;
7161 :
7162 4 : argc = nargs + 1;
7163 : argv[0] = self;
7164 4 : if (argc > 4) SWIG_fail;
7165 20 : for (ii = 1; (ii < argc); ++ii) {
7166 8 : argv[ii] = args[ii-1];
7167 : }
7168 4 : if (argc == 3) {
7169 4 : int _v = 0;
7170 : {
7171 4 : void *vptr = 0;
7172 4 : int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_kdb__Key, 0);
7173 4 : _v = SWIG_CheckState(res);
7174 : }
7175 4 : if (!_v) goto check_1;
7176 0 : return _wrap_KDB_set__SWIG_1(nargs, args, self);
7177 : }
7178 : check_1:
7179 :
7180 4 : if (argc == 3) {
7181 4 : return _wrap_KDB_set__SWIG_0(nargs, args, self);
7182 : }
7183 :
7184 : fail:
7185 : Ruby_Format_OverloadedError( argc, 4, "KDB.set",
7186 : " int KDB.set(kdb::KeySet &returned, std::string const &keyname)\n"
7187 0 : " int KDB.set(kdb::KeySet &returned, kdb::Key &parentKey)\n");
7188 :
7189 : return Qnil;
7190 : }
7191 :
7192 :
7193 :
7194 : /*
7195 : Document-method: Kdb::KDB.ensure
7196 :
7197 : call-seq:
7198 : ensure(KeySet contract, Key parentKey) -> int
7199 :
7200 : An instance method.
7201 :
7202 : */
7203 : SWIGINTERN VALUE
7204 0 : _wrap_KDB_ensure(int argc, VALUE *argv, VALUE self) {
7205 0 : kdb::KDB *arg1 = (kdb::KDB *) 0 ;
7206 0 : kdb::KeySet *arg2 = 0 ;
7207 0 : kdb::Key *arg3 = 0 ;
7208 0 : void *argp1 = 0 ;
7209 0 : int res1 = 0 ;
7210 : void *argp2 ;
7211 0 : int res2 = 0 ;
7212 0 : void *argp3 = 0 ;
7213 0 : int res3 = 0 ;
7214 : int result;
7215 0 : VALUE vresult = Qnil;
7216 :
7217 0 : if ((argc < 2) || (argc > 2)) {
7218 0 : rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
7219 : }
7220 0 : res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kdb__KDB, 0 | 0 );
7221 0 : if (!SWIG_IsOK(res1)) {
7222 0 : SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kdb::KDB *","ensure", 1, self ));
7223 : }
7224 0 : arg1 = reinterpret_cast< kdb::KDB * >(argp1);
7225 0 : res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_kdb__KeySet, 0 );
7226 0 : if (!SWIG_IsOK(res2)) {
7227 0 : SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kdb::KeySet const &","ensure", 2, argv[0] ));
7228 : }
7229 0 : if (!argp2) {
7230 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::KeySet const &","ensure", 2, argv[0]));
7231 : }
7232 0 : arg2 = reinterpret_cast< kdb::KeySet * >(argp2);
7233 0 : res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_kdb__Key, 0 );
7234 0 : if (!SWIG_IsOK(res3)) {
7235 0 : SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "kdb::Key &","ensure", 3, argv[1] ));
7236 : }
7237 0 : if (!argp3) {
7238 0 : SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kdb::Key &","ensure", 3, argv[1]));
7239 : }
7240 0 : arg3 = reinterpret_cast< kdb::Key * >(argp3);
7241 0 : result = (int)(arg1)->ensure((kdb::KeySet const &)*arg2,*arg3);
7242 0 : vresult = SWIG_From_int(static_cast< int >(result));
7243 : return vresult;
7244 : fail:
7245 : return Qnil;
7246 : }
7247 :
7248 :
7249 :
7250 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
7251 :
7252 0 : static void *_p_kdb__ContractExceptionTo_p_kdb__KDBException(void *x, int *SWIGUNUSEDPARM(newmemory)) {
7253 0 : return (void *)((kdb::KDBException *) ((kdb::ContractException *) x));
7254 : }
7255 0 : static void *_p_kdb__KeyTypeMismatchTo_p_kdb__KeyException(void *x, int *SWIGUNUSEDPARM(newmemory)) {
7256 0 : return (void *)((kdb::KeyException *) ((kdb::KeyTypeMismatch *) x));
7257 : }
7258 0 : static void *_p_kdb__KeyTypeConversionTo_p_kdb__KeyException(void *x, int *SWIGUNUSEDPARM(newmemory)) {
7259 0 : return (void *)((kdb::KeyException *) ((kdb::KeyTypeConversion *) x));
7260 : }
7261 0 : static void *_p_kdb__KeyInvalidNameTo_p_kdb__KeyException(void *x, int *SWIGUNUSEDPARM(newmemory)) {
7262 0 : return (void *)((kdb::KeyException *) ((kdb::KeyInvalidName *) x));
7263 : }
7264 0 : static void *_p_kdb__KeyExceptionTo_p_kdb__Exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
7265 0 : return (void *)((kdb::Exception *) ((kdb::KeyException *) x));
7266 : }
7267 0 : static void *_p_kdb__KeyNotFoundExceptionTo_p_kdb__Exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
7268 0 : return (void *)((kdb::Exception *) ((kdb::KeyNotFoundException *) x));
7269 : }
7270 0 : static void *_p_kdb__KeyTypeMismatchTo_p_kdb__Exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
7271 0 : return (void *)((kdb::Exception *) (kdb::KeyException *) ((kdb::KeyTypeMismatch *) x));
7272 : }
7273 0 : static void *_p_kdb__KDBExceptionTo_p_kdb__Exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
7274 0 : return (void *)((kdb::Exception *) ((kdb::KDBException *) x));
7275 : }
7276 0 : static void *_p_kdb__ContractExceptionTo_p_kdb__Exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
7277 0 : return (void *)((kdb::Exception *) (kdb::KDBException *) ((kdb::ContractException *) x));
7278 : }
7279 0 : static void *_p_kdb__KeyTypeConversionTo_p_kdb__Exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
7280 0 : return (void *)((kdb::Exception *) (kdb::KeyException *) ((kdb::KeyTypeConversion *) x));
7281 : }
7282 0 : static void *_p_kdb__KeyInvalidNameTo_p_kdb__Exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
7283 0 : return (void *)((kdb::Exception *) (kdb::KeyException *) ((kdb::KeyInvalidName *) x));
7284 : }
7285 0 : static void *_p_kdb__ExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
7286 0 : return (void *)((std::exception *) ((kdb::Exception *) x));
7287 : }
7288 0 : static void *_p_kdb__KeyExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
7289 0 : return (void *)((std::exception *) (kdb::Exception *) ((kdb::KeyException *) x));
7290 : }
7291 0 : static void *_p_kdb__KeyNotFoundExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
7292 0 : return (void *)((std::exception *) (kdb::Exception *) ((kdb::KeyNotFoundException *) x));
7293 : }
7294 0 : static void *_p_kdb__KeyTypeMismatchTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
7295 0 : return (void *)((std::exception *) (kdb::Exception *)(kdb::KeyException *) ((kdb::KeyTypeMismatch *) x));
7296 : }
7297 0 : static void *_p_kdb__KDBExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
7298 0 : return (void *)((std::exception *) (kdb::Exception *) ((kdb::KDBException *) x));
7299 : }
7300 0 : static void *_p_kdb__ContractExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
7301 0 : return (void *)((std::exception *) (kdb::Exception *)(kdb::KDBException *) ((kdb::ContractException *) x));
7302 : }
7303 0 : static void *_p_kdb__KeyTypeConversionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
7304 0 : return (void *)((std::exception *) (kdb::Exception *)(kdb::KeyException *) ((kdb::KeyTypeConversion *) x));
7305 : }
7306 0 : static void *_p_kdb__KeyInvalidNameTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
7307 0 : return (void *)((std::exception *) (kdb::Exception *)(kdb::KeyException *) ((kdb::KeyInvalidName *) x));
7308 : }
7309 : static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
7310 : static swig_type_info _swigt__p_int = {"_p_int", "intptr_t *|int *|int_least32_t *|int_fast32_t *|int32_t *|int_fast16_t *", 0, 0, (void*)0, 0};
7311 : static swig_type_info _swigt__p_kdb__ContractException = {"_p_kdb__ContractException", "kdb::ContractException *", 0, 0, (void*)0, 0};
7312 : static swig_type_info _swigt__p_kdb__Exception = {"_p_kdb__Exception", "kdb::Exception *", 0, 0, (void*)0, 0};
7313 : static swig_type_info _swigt__p_kdb__KDB = {"_p_kdb__KDB", "kdb::KDB *", 0, 0, (void*)0, 0};
7314 : static swig_type_info _swigt__p_kdb__KDBException = {"_p_kdb__KDBException", "kdb::KDBException *", 0, 0, (void*)0, 0};
7315 : static swig_type_info _swigt__p_kdb__Key = {"_p_kdb__Key", "kdb::Key *", 0, 0, (void*)0, 0};
7316 : static swig_type_info _swigt__p_kdb__KeyException = {"_p_kdb__KeyException", "kdb::KeyException *", 0, 0, (void*)0, 0};
7317 : static swig_type_info _swigt__p_kdb__KeyInvalidName = {"_p_kdb__KeyInvalidName", "kdb::KeyInvalidName *", 0, 0, (void*)0, 0};
7318 : static swig_type_info _swigt__p_kdb__KeyNotFoundException = {"_p_kdb__KeyNotFoundException", "kdb::KeyNotFoundException *", 0, 0, (void*)0, 0};
7319 : static swig_type_info _swigt__p_kdb__KeySet = {"_p_kdb__KeySet", "kdb::KeySet *", 0, 0, (void*)0, 0};
7320 : static swig_type_info _swigt__p_kdb__KeyTypeConversion = {"_p_kdb__KeyTypeConversion", "kdb::KeyTypeConversion *", 0, 0, (void*)0, 0};
7321 : static swig_type_info _swigt__p_kdb__KeyTypeMismatch = {"_p_kdb__KeyTypeMismatch", "kdb::KeyTypeMismatch *", 0, 0, (void*)0, 0};
7322 : static swig_type_info _swigt__p_long_long = {"_p_long_long", "int_least64_t *|int_fast64_t *|int64_t *|long long *|intmax_t *", 0, 0, (void*)0, 0};
7323 : static swig_type_info _swigt__p_short = {"_p_short", "short *|int_least16_t *|int16_t *", 0, 0, (void*)0, 0};
7324 : static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|int_least8_t *|int_fast8_t *|int8_t *", 0, 0, (void*)0, 0};
7325 : static swig_type_info _swigt__p_std__exception = {"_p_std__exception", "std::exception *", 0, 0, (void*)0, 0};
7326 : static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint_least8_t *|uint_fast8_t *|uint8_t *", 0, 0, (void*)0, 0};
7327 : static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uintptr_t *|uint_least32_t *|uint_fast32_t *|uint32_t *|unsigned int *|uint_fast16_t *", 0, 0, (void*)0, 0};
7328 : static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "uint_least64_t *|uint_fast64_t *|uint64_t *|unsigned long long *|uintmax_t *", 0, 0, (void*)0, 0};
7329 : static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint_least16_t *|uint16_t *", 0, 0, (void*)0, 0};
7330 : static swig_type_info _swigt__p_va_list = {"_p_va_list", "va_list *", 0, 0, (void*)0, 0};
7331 : static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
7332 :
7333 : static swig_type_info *swig_type_initial[] = {
7334 : &_swigt__p_char,
7335 : &_swigt__p_int,
7336 : &_swigt__p_kdb__ContractException,
7337 : &_swigt__p_kdb__Exception,
7338 : &_swigt__p_kdb__KDB,
7339 : &_swigt__p_kdb__KDBException,
7340 : &_swigt__p_kdb__Key,
7341 : &_swigt__p_kdb__KeyException,
7342 : &_swigt__p_kdb__KeyInvalidName,
7343 : &_swigt__p_kdb__KeyNotFoundException,
7344 : &_swigt__p_kdb__KeySet,
7345 : &_swigt__p_kdb__KeyTypeConversion,
7346 : &_swigt__p_kdb__KeyTypeMismatch,
7347 : &_swigt__p_long_long,
7348 : &_swigt__p_short,
7349 : &_swigt__p_signed_char,
7350 : &_swigt__p_std__exception,
7351 : &_swigt__p_unsigned_char,
7352 : &_swigt__p_unsigned_int,
7353 : &_swigt__p_unsigned_long_long,
7354 : &_swigt__p_unsigned_short,
7355 : &_swigt__p_va_list,
7356 : &_swigt__p_void,
7357 : };
7358 :
7359 : static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
7360 : static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
7361 : static swig_cast_info _swigc__p_kdb__ContractException[] = { {&_swigt__p_kdb__ContractException, 0, 0, 0},{0, 0, 0, 0}};
7362 : static swig_cast_info _swigc__p_kdb__Exception[] = { {&_swigt__p_kdb__Exception, 0, 0, 0}, {&_swigt__p_kdb__KeyException, _p_kdb__KeyExceptionTo_p_kdb__Exception, 0, 0}, {&_swigt__p_kdb__KeyTypeMismatch, _p_kdb__KeyTypeMismatchTo_p_kdb__Exception, 0, 0}, {&_swigt__p_kdb__KeyNotFoundException, _p_kdb__KeyNotFoundExceptionTo_p_kdb__Exception, 0, 0}, {&_swigt__p_kdb__KDBException, _p_kdb__KDBExceptionTo_p_kdb__Exception, 0, 0}, {&_swigt__p_kdb__ContractException, _p_kdb__ContractExceptionTo_p_kdb__Exception, 0, 0}, {&_swigt__p_kdb__KeyTypeConversion, _p_kdb__KeyTypeConversionTo_p_kdb__Exception, 0, 0}, {&_swigt__p_kdb__KeyInvalidName, _p_kdb__KeyInvalidNameTo_p_kdb__Exception, 0, 0},{0, 0, 0, 0}};
7363 : static swig_cast_info _swigc__p_kdb__KDB[] = { {&_swigt__p_kdb__KDB, 0, 0, 0},{0, 0, 0, 0}};
7364 : static swig_cast_info _swigc__p_kdb__KDBException[] = { {&_swigt__p_kdb__KDBException, 0, 0, 0}, {&_swigt__p_kdb__ContractException, _p_kdb__ContractExceptionTo_p_kdb__KDBException, 0, 0},{0, 0, 0, 0}};
7365 : static swig_cast_info _swigc__p_kdb__Key[] = { {&_swigt__p_kdb__Key, 0, 0, 0},{0, 0, 0, 0}};
7366 : static swig_cast_info _swigc__p_kdb__KeyException[] = { {&_swigt__p_kdb__KeyException, 0, 0, 0}, {&_swigt__p_kdb__KeyTypeMismatch, _p_kdb__KeyTypeMismatchTo_p_kdb__KeyException, 0, 0}, {&_swigt__p_kdb__KeyTypeConversion, _p_kdb__KeyTypeConversionTo_p_kdb__KeyException, 0, 0}, {&_swigt__p_kdb__KeyInvalidName, _p_kdb__KeyInvalidNameTo_p_kdb__KeyException, 0, 0},{0, 0, 0, 0}};
7367 : static swig_cast_info _swigc__p_kdb__KeyInvalidName[] = { {&_swigt__p_kdb__KeyInvalidName, 0, 0, 0},{0, 0, 0, 0}};
7368 : static swig_cast_info _swigc__p_kdb__KeyNotFoundException[] = { {&_swigt__p_kdb__KeyNotFoundException, 0, 0, 0},{0, 0, 0, 0}};
7369 : static swig_cast_info _swigc__p_kdb__KeySet[] = { {&_swigt__p_kdb__KeySet, 0, 0, 0},{0, 0, 0, 0}};
7370 : static swig_cast_info _swigc__p_kdb__KeyTypeConversion[] = { {&_swigt__p_kdb__KeyTypeConversion, 0, 0, 0},{0, 0, 0, 0}};
7371 : static swig_cast_info _swigc__p_kdb__KeyTypeMismatch[] = { {&_swigt__p_kdb__KeyTypeMismatch, 0, 0, 0},{0, 0, 0, 0}};
7372 : static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
7373 : static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
7374 : static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
7375 : static swig_cast_info _swigc__p_std__exception[] = { {&_swigt__p_std__exception, 0, 0, 0}, {&_swigt__p_kdb__Exception, _p_kdb__ExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_kdb__KeyException, _p_kdb__KeyExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_kdb__KeyTypeMismatch, _p_kdb__KeyTypeMismatchTo_p_std__exception, 0, 0}, {&_swigt__p_kdb__KeyNotFoundException, _p_kdb__KeyNotFoundExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_kdb__KDBException, _p_kdb__KDBExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_kdb__ContractException, _p_kdb__ContractExceptionTo_p_std__exception, 0, 0}, {&_swigt__p_kdb__KeyTypeConversion, _p_kdb__KeyTypeConversionTo_p_std__exception, 0, 0}, {&_swigt__p_kdb__KeyInvalidName, _p_kdb__KeyInvalidNameTo_p_std__exception, 0, 0},{0, 0, 0, 0}};
7376 : static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
7377 : static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
7378 : static swig_cast_info _swigc__p_unsigned_long_long[] = { {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}};
7379 : static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
7380 : static swig_cast_info _swigc__p_va_list[] = { {&_swigt__p_va_list, 0, 0, 0},{0, 0, 0, 0}};
7381 : static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
7382 :
7383 : static swig_cast_info *swig_cast_initial[] = {
7384 : _swigc__p_char,
7385 : _swigc__p_int,
7386 : _swigc__p_kdb__ContractException,
7387 : _swigc__p_kdb__Exception,
7388 : _swigc__p_kdb__KDB,
7389 : _swigc__p_kdb__KDBException,
7390 : _swigc__p_kdb__Key,
7391 : _swigc__p_kdb__KeyException,
7392 : _swigc__p_kdb__KeyInvalidName,
7393 : _swigc__p_kdb__KeyNotFoundException,
7394 : _swigc__p_kdb__KeySet,
7395 : _swigc__p_kdb__KeyTypeConversion,
7396 : _swigc__p_kdb__KeyTypeMismatch,
7397 : _swigc__p_long_long,
7398 : _swigc__p_short,
7399 : _swigc__p_signed_char,
7400 : _swigc__p_std__exception,
7401 : _swigc__p_unsigned_char,
7402 : _swigc__p_unsigned_int,
7403 : _swigc__p_unsigned_long_long,
7404 : _swigc__p_unsigned_short,
7405 : _swigc__p_va_list,
7406 : _swigc__p_void,
7407 : };
7408 :
7409 :
7410 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
7411 :
7412 : /* -----------------------------------------------------------------------------
7413 : * Type initialization:
7414 : * This problem is tough by the requirement that no dynamic
7415 : * memory is used. Also, since swig_type_info structures store pointers to
7416 : * swig_cast_info structures and swig_cast_info structures store pointers back
7417 : * to swig_type_info structures, we need some lookup code at initialization.
7418 : * The idea is that swig generates all the structures that are needed.
7419 : * The runtime then collects these partially filled structures.
7420 : * The SWIG_InitializeModule function takes these initial arrays out of
7421 : * swig_module, and does all the lookup, filling in the swig_module.types
7422 : * array with the correct data and linking the correct swig_cast_info
7423 : * structures together.
7424 : *
7425 : * The generated swig_type_info structures are assigned statically to an initial
7426 : * array. We just loop through that array, and handle each type individually.
7427 : * First we lookup if this type has been already loaded, and if so, use the
7428 : * loaded structure instead of the generated one. Then we have to fill in the
7429 : * cast linked list. The cast data is initially stored in something like a
7430 : * two-dimensional array. Each row corresponds to a type (there are the same
7431 : * number of rows as there are in the swig_type_initial array). Each entry in
7432 : * a column is one of the swig_cast_info structures for that type.
7433 : * The cast_initial array is actually an array of arrays, because each row has
7434 : * a variable number of columns. So to actually build the cast linked list,
7435 : * we find the array of casts associated with the type, and loop through it
7436 : * adding the casts to the list. The one last trick we need to do is making
7437 : * sure the type pointer in the swig_cast_info struct is correct.
7438 : *
7439 : * First off, we lookup the cast->type name to see if it is already loaded.
7440 : * There are three cases to handle:
7441 : * 1) If the cast->type has already been loaded AND the type we are adding
7442 : * casting info to has not been loaded (it is in this module), THEN we
7443 : * replace the cast->type pointer with the type pointer that has already
7444 : * been loaded.
7445 : * 2) If BOTH types (the one we are adding casting info to, and the
7446 : * cast->type) are loaded, THEN the cast info has already been loaded by
7447 : * the previous module so we just ignore it.
7448 : * 3) Finally, if cast->type has not already been loaded, then we add that
7449 : * swig_cast_info to the linked list (because the cast->type) pointer will
7450 : * be correct.
7451 : * ----------------------------------------------------------------------------- */
7452 :
7453 : #ifdef __cplusplus
7454 : extern "C" {
7455 : #if 0
7456 : } /* c-mode */
7457 : #endif
7458 : #endif
7459 :
7460 : #if 0
7461 : #define SWIGRUNTIME_DEBUG
7462 : #endif
7463 :
7464 :
7465 : SWIGRUNTIME void
7466 23 : SWIG_InitializeModule(void *clientdata) {
7467 : size_t i;
7468 : swig_module_info *module_head, *iter;
7469 : int init;
7470 :
7471 : /* check to see if the circular list has been setup, if not, set it up */
7472 23 : if (swig_module.next==0) {
7473 : /* Initialize the swig_module */
7474 23 : swig_module.type_initial = swig_type_initial;
7475 23 : swig_module.cast_initial = swig_cast_initial;
7476 23 : swig_module.next = &swig_module;
7477 23 : init = 1;
7478 : } else {
7479 : init = 0;
7480 : }
7481 :
7482 : /* Try and load any already created modules */
7483 23 : module_head = SWIG_GetModule(clientdata);
7484 23 : if (!module_head) {
7485 : /* This is the first module loaded for this interpreter */
7486 : /* so set the swig module into the interpreter */
7487 17 : SWIG_SetModule(clientdata, &swig_module);
7488 : } else {
7489 : /* the interpreter has loaded a SWIG module, but has it loaded this one? */
7490 : iter=module_head;
7491 : do {
7492 6 : if (iter==&swig_module) {
7493 : /* Our module is already in the list, so there's nothing more to do. */
7494 : return;
7495 : }
7496 6 : iter=iter->next;
7497 6 : } while (iter!= module_head);
7498 :
7499 : /* otherwise we must add our module into the list */
7500 6 : swig_module.next = module_head->next;
7501 6 : module_head->next = &swig_module;
7502 : }
7503 :
7504 : /* When multiple interpreters are used, a module could have already been initialized in
7505 : a different interpreter, but not yet have a pointer in this interpreter.
7506 : In this case, we do not want to continue adding types... everything should be
7507 : set up already */
7508 23 : if (init == 0) return;
7509 :
7510 : /* Now work on filling in swig_module.types */
7511 : #ifdef SWIGRUNTIME_DEBUG
7512 : printf("SWIG_InitializeModule: size %d\n", swig_module.size);
7513 : #endif
7514 1081 : for (i = 0; i < swig_module.size; ++i) {
7515 529 : swig_type_info *type = 0;
7516 : swig_type_info *ret;
7517 : swig_cast_info *cast;
7518 :
7519 : #ifdef SWIGRUNTIME_DEBUG
7520 : printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
7521 : #endif
7522 :
7523 : /* if there is another module already loaded */
7524 529 : if (swig_module.next != &swig_module) {
7525 138 : type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
7526 : }
7527 529 : if (type) {
7528 : /* Overwrite clientdata field */
7529 : #ifdef SWIGRUNTIME_DEBUG
7530 : printf("SWIG_InitializeModule: found type %s\n", type->name);
7531 : #endif
7532 72 : if (swig_module.type_initial[i]->clientdata) {
7533 0 : type->clientdata = swig_module.type_initial[i]->clientdata;
7534 : #ifdef SWIGRUNTIME_DEBUG
7535 : printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
7536 : #endif
7537 : }
7538 : } else {
7539 457 : type = swig_module.type_initial[i];
7540 : }
7541 :
7542 : /* Insert casting types */
7543 529 : cast = swig_module.cast_initial[i];
7544 1495 : while (cast->type) {
7545 :
7546 : /* Don't need to add information already in the list */
7547 966 : ret = 0;
7548 : #ifdef SWIGRUNTIME_DEBUG
7549 : printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
7550 : #endif
7551 966 : if (swig_module.next != &swig_module) {
7552 252 : ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
7553 : #ifdef SWIGRUNTIME_DEBUG
7554 : if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
7555 : #endif
7556 : }
7557 966 : if (ret) {
7558 72 : if (type == swig_module.type_initial[i]) {
7559 : #ifdef SWIGRUNTIME_DEBUG
7560 : printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
7561 : #endif
7562 0 : cast->type = ret;
7563 0 : ret = 0;
7564 : } else {
7565 : /* Check for casting already in the list */
7566 72 : swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
7567 : #ifdef SWIGRUNTIME_DEBUG
7568 : if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
7569 : #endif
7570 72 : if (!ocast) ret = 0;
7571 : }
7572 : }
7573 :
7574 966 : if (!ret) {
7575 : #ifdef SWIGRUNTIME_DEBUG
7576 : printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
7577 : #endif
7578 894 : if (type->cast) {
7579 437 : type->cast->prev = cast;
7580 437 : cast->next = type->cast;
7581 : }
7582 894 : type->cast = cast;
7583 : }
7584 966 : cast++;
7585 : }
7586 : /* Set entry in modules->types array equal to the type */
7587 529 : swig_module.types[i] = type;
7588 : }
7589 23 : swig_module.types[i] = 0;
7590 :
7591 : #ifdef SWIGRUNTIME_DEBUG
7592 : printf("**** SWIG_InitializeModule: Cast List ******\n");
7593 : for (i = 0; i < swig_module.size; ++i) {
7594 : int j = 0;
7595 : swig_cast_info *cast = swig_module.cast_initial[i];
7596 : printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
7597 : while (cast->type) {
7598 : printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
7599 : cast++;
7600 : ++j;
7601 : }
7602 : printf("---- Total casts: %d\n",j);
7603 : }
7604 : printf("**** SWIG_InitializeModule: Cast List ******\n");
7605 : #endif
7606 : }
7607 :
7608 : /* This function will propagate the clientdata field of type to
7609 : * any new swig_type_info structures that have been added into the list
7610 : * of equivalent types. It is like calling
7611 : * SWIG_TypeClientData(type, clientdata) a second time.
7612 : */
7613 : SWIGRUNTIME void
7614 : SWIG_PropagateClientData(void) {
7615 : size_t i;
7616 : swig_cast_info *equiv;
7617 : static int init_run = 0;
7618 :
7619 : if (init_run) return;
7620 : init_run = 1;
7621 :
7622 : for (i = 0; i < swig_module.size; i++) {
7623 : if (swig_module.types[i]->clientdata) {
7624 : equiv = swig_module.types[i]->cast;
7625 : while (equiv) {
7626 : if (!equiv->converter) {
7627 : if (equiv->type && !equiv->type->clientdata)
7628 : SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
7629 : }
7630 : equiv = equiv->next;
7631 : }
7632 : }
7633 : }
7634 : }
7635 :
7636 : #ifdef __cplusplus
7637 : #if 0
7638 : { /* c-mode */
7639 : #endif
7640 : }
7641 : #endif
7642 :
7643 : /*
7644 :
7645 : */
7646 : #ifdef __cplusplus
7647 : extern "C"
7648 : #endif
7649 23 : SWIGEXPORT void Init__kdb(void) {
7650 : size_t i;
7651 :
7652 23 : SWIG_InitRuntime();
7653 23 : mKdb = rb_define_module("Kdb");
7654 :
7655 23 : SWIG_InitializeModule(0);
7656 552 : for (i = 0; i < swig_module.size; i++) {
7657 529 : SWIG_define_class(swig_module.types[i]);
7658 : }
7659 :
7660 23 : SWIG_RubyInitializeTrackings();
7661 46 : rb_define_const(mKdb, "KS_END", SWIG_NewPointerObj(SWIG_as_voidptr(KS_END),SWIGTYPE_p_void, 0 ));
7662 23 : rb_define_const(mKdb, "VERSION", SWIG_FromCharPtr(KDB_VERSION));
7663 23 : rb_define_const(mKdb, "VERSION_MAJOR", SWIG_From_short(static_cast< short >(KDB_VERSION_MAJOR)));
7664 23 : rb_define_const(mKdb, "VERSION_MINOR", SWIG_From_short(static_cast< short >(KDB_VERSION_MINOR)));
7665 23 : rb_define_const(mKdb, "VERSION_MICRO", SWIG_From_short(static_cast< short >(KDB_VERSION_MICRO)));
7666 23 : rb_define_const(mKdb, "KDB_VERSION", SWIG_FromCharPtr("0.9.0"));
7667 23 : rb_define_const(mKdb, "KDB_VERSION_MAJOR", SWIG_From_int(static_cast< int >(0)));
7668 23 : rb_define_const(mKdb, "KDB_VERSION_MINOR", SWIG_From_int(static_cast< int >(9)));
7669 23 : rb_define_const(mKdb, "KDB_VERSION_MICRO", SWIG_From_int(static_cast< int >(0)));
7670 23 : rb_define_const(mKdb, "KEY_NAME", SWIG_From_int(static_cast< int >(KEY_NAME)));
7671 23 : rb_define_const(mKdb, "KEY_VALUE", SWIG_From_int(static_cast< int >(KEY_VALUE)));
7672 23 : rb_define_const(mKdb, "KEY_FLAGS", SWIG_From_int(static_cast< int >(KEY_FLAGS)));
7673 23 : rb_define_const(mKdb, "KEY_OWNER", SWIG_From_int(static_cast< int >(KEY_OWNER)));
7674 23 : rb_define_const(mKdb, "KEY_COMMENT", SWIG_From_int(static_cast< int >(KEY_COMMENT)));
7675 23 : rb_define_const(mKdb, "KEY_BINARY", SWIG_From_int(static_cast< int >(KEY_BINARY)));
7676 23 : rb_define_const(mKdb, "KEY_UID", SWIG_From_int(static_cast< int >(KEY_UID)));
7677 23 : rb_define_const(mKdb, "KEY_GID", SWIG_From_int(static_cast< int >(KEY_GID)));
7678 23 : rb_define_const(mKdb, "KEY_MODE", SWIG_From_int(static_cast< int >(KEY_MODE)));
7679 23 : rb_define_const(mKdb, "KEY_ATIME", SWIG_From_int(static_cast< int >(KEY_ATIME)));
7680 23 : rb_define_const(mKdb, "KEY_MTIME", SWIG_From_int(static_cast< int >(KEY_MTIME)));
7681 23 : rb_define_const(mKdb, "KEY_CTIME", SWIG_From_int(static_cast< int >(KEY_CTIME)));
7682 23 : rb_define_const(mKdb, "KEY_SIZE", SWIG_From_int(static_cast< int >(KEY_SIZE)));
7683 23 : rb_define_const(mKdb, "KEY_FUNC", SWIG_From_int(static_cast< int >(KEY_FUNC)));
7684 23 : rb_define_const(mKdb, "KEY_DIR", SWIG_From_int(static_cast< int >(KEY_DIR)));
7685 23 : rb_define_const(mKdb, "KEY_META", SWIG_From_int(static_cast< int >(KEY_META)));
7686 23 : rb_define_const(mKdb, "KEY_NULL", SWIG_From_int(static_cast< int >(KEY_NULL)));
7687 23 : rb_define_const(mKdb, "KEY_CASCADING_NAME", SWIG_From_int(static_cast< int >(KEY_CASCADING_NAME)));
7688 23 : rb_define_const(mKdb, "KEY_META_NAME", SWIG_From_int(static_cast< int >(KEY_META_NAME)));
7689 23 : rb_define_const(mKdb, "KEY_END", SWIG_From_int(static_cast< int >(KEY_END)));
7690 23 : rb_define_const(mKdb, "KDB_O_NONE", SWIG_From_int(static_cast< int >(KDB_O_NONE)));
7691 23 : rb_define_const(mKdb, "KDB_O_DEL", SWIG_From_int(static_cast< int >(KDB_O_DEL)));
7692 23 : rb_define_const(mKdb, "KDB_O_POP", SWIG_From_int(static_cast< int >(KDB_O_POP)));
7693 23 : rb_define_const(mKdb, "KDB_O_NODIR", SWIG_From_int(static_cast< int >(KDB_O_NODIR)));
7694 23 : rb_define_const(mKdb, "KDB_O_DIRONLY", SWIG_From_int(static_cast< int >(KDB_O_DIRONLY)));
7695 23 : rb_define_const(mKdb, "KDB_O_NOREMOVE", SWIG_From_int(static_cast< int >(KDB_O_NOREMOVE)));
7696 23 : rb_define_const(mKdb, "KDB_O_REMOVEONLY", SWIG_From_int(static_cast< int >(KDB_O_REMOVEONLY)));
7697 23 : rb_define_const(mKdb, "KDB_O_INACTIVE", SWIG_From_int(static_cast< int >(KDB_O_INACTIVE)));
7698 23 : rb_define_const(mKdb, "KDB_O_SYNC", SWIG_From_int(static_cast< int >(KDB_O_SYNC)));
7699 23 : rb_define_const(mKdb, "KDB_O_SORT", SWIG_From_int(static_cast< int >(KDB_O_SORT)));
7700 23 : rb_define_const(mKdb, "KDB_O_NORECURSIVE", SWIG_From_int(static_cast< int >(KDB_O_NORECURSIVE)));
7701 23 : rb_define_const(mKdb, "KDB_O_NOCASE", SWIG_From_int(static_cast< int >(KDB_O_NOCASE)));
7702 23 : rb_define_const(mKdb, "KDB_O_WITHOWNER", SWIG_From_int(static_cast< int >(KDB_O_WITHOWNER)));
7703 23 : rb_define_const(mKdb, "KDB_O_NOALL", SWIG_From_int(static_cast< int >(KDB_O_NOALL)));
7704 23 : rb_define_const(mKdb, "KEY_NS_NONE", SWIG_From_int(static_cast< int >(KEY_NS_NONE)));
7705 23 : rb_define_const(mKdb, "KEY_NS_EMPTY", SWIG_From_int(static_cast< int >(KEY_NS_EMPTY)));
7706 23 : rb_define_const(mKdb, "KEY_NS_META", SWIG_From_int(static_cast< int >(KEY_NS_META)));
7707 23 : rb_define_const(mKdb, "KEY_NS_CASCADING", SWIG_From_int(static_cast< int >(KEY_NS_CASCADING)));
7708 23 : rb_define_const(mKdb, "KEY_NS_FIRST", SWIG_From_int(static_cast< int >(KEY_NS_FIRST)));
7709 23 : rb_define_const(mKdb, "KEY_NS_SPEC", SWIG_From_int(static_cast< int >(KEY_NS_SPEC)));
7710 23 : rb_define_const(mKdb, "KEY_NS_PROC", SWIG_From_int(static_cast< int >(KEY_NS_PROC)));
7711 23 : rb_define_const(mKdb, "KEY_NS_DIR", SWIG_From_int(static_cast< int >(KEY_NS_DIR)));
7712 23 : rb_define_const(mKdb, "KEY_NS_USER", SWIG_From_int(static_cast< int >(KEY_NS_USER)));
7713 23 : rb_define_const(mKdb, "KEY_NS_SYSTEM", SWIG_From_int(static_cast< int >(KEY_NS_SYSTEM)));
7714 23 : rb_define_const(mKdb, "KEY_NS_LAST", SWIG_From_int(static_cast< int >(KEY_NS_LAST)));
7715 :
7716 23 : SwigClassException.klass = rb_define_class_under(mKdb, "Exception", rb_eRuntimeError);
7717 23 : SWIG_TypeClientData(SWIGTYPE_p_kdb__Exception, (void *) &SwigClassException);
7718 23 : rb_define_alloc_func(SwigClassException.klass, _wrap_Exception_allocate);
7719 23 : rb_define_method(SwigClassException.klass, "initialize", VALUEFUNC(_wrap_new_Exception), -1);
7720 23 : rb_define_method(SwigClassException.klass, "to_s", VALUEFUNC(_wrap_Exception_to_s), -1);
7721 23 : SwigClassException.mark = 0;
7722 23 : SwigClassException.destroy = (void (*)(void *)) free_kdb_Exception;
7723 23 : SwigClassException.trackObjects = 0;
7724 :
7725 23 : SwigClassKeyException.klass = rb_define_class_under(mKdb, "KeyException", ((swig_class *) SWIGTYPE_p_kdb__Exception->clientdata)->klass);
7726 23 : SWIG_TypeClientData(SWIGTYPE_p_kdb__KeyException, (void *) &SwigClassKeyException);
7727 23 : rb_define_alloc_func(SwigClassKeyException.klass, _wrap_KeyException_allocate);
7728 23 : rb_define_method(SwigClassKeyException.klass, "initialize", VALUEFUNC(_wrap_new_KeyException), -1);
7729 23 : SwigClassKeyException.mark = 0;
7730 23 : SwigClassKeyException.destroy = (void (*)(void *)) free_kdb_KeyException;
7731 23 : SwigClassKeyException.trackObjects = 0;
7732 :
7733 23 : SwigClassKeyNotFoundException.klass = rb_define_class_under(mKdb, "KeyNotFoundException", ((swig_class *) SWIGTYPE_p_kdb__Exception->clientdata)->klass);
7734 23 : SWIG_TypeClientData(SWIGTYPE_p_kdb__KeyNotFoundException, (void *) &SwigClassKeyNotFoundException);
7735 23 : rb_define_alloc_func(SwigClassKeyNotFoundException.klass, _wrap_KeyNotFoundException_allocate);
7736 23 : rb_define_method(SwigClassKeyNotFoundException.klass, "initialize", VALUEFUNC(_wrap_new_KeyNotFoundException), -1);
7737 23 : SwigClassKeyNotFoundException.mark = 0;
7738 23 : SwigClassKeyNotFoundException.destroy = (void (*)(void *)) free_kdb_KeyNotFoundException;
7739 23 : SwigClassKeyNotFoundException.trackObjects = 0;
7740 :
7741 23 : SwigClassKeyTypeMismatch.klass = rb_define_class_under(mKdb, "KeyTypeMismatch", ((swig_class *) SWIGTYPE_p_kdb__KeyException->clientdata)->klass);
7742 23 : SWIG_TypeClientData(SWIGTYPE_p_kdb__KeyTypeMismatch, (void *) &SwigClassKeyTypeMismatch);
7743 23 : rb_define_alloc_func(SwigClassKeyTypeMismatch.klass, _wrap_KeyTypeMismatch_allocate);
7744 23 : rb_define_method(SwigClassKeyTypeMismatch.klass, "initialize", VALUEFUNC(_wrap_new_KeyTypeMismatch), -1);
7745 23 : SwigClassKeyTypeMismatch.mark = 0;
7746 23 : SwigClassKeyTypeMismatch.destroy = (void (*)(void *)) free_kdb_KeyTypeMismatch;
7747 23 : SwigClassKeyTypeMismatch.trackObjects = 0;
7748 :
7749 23 : SwigClassKeyTypeConversion.klass = rb_define_class_under(mKdb, "KeyTypeConversion", ((swig_class *) SWIGTYPE_p_kdb__KeyException->clientdata)->klass);
7750 23 : SWIG_TypeClientData(SWIGTYPE_p_kdb__KeyTypeConversion, (void *) &SwigClassKeyTypeConversion);
7751 23 : rb_define_alloc_func(SwigClassKeyTypeConversion.klass, _wrap_KeyTypeConversion_allocate);
7752 23 : rb_define_method(SwigClassKeyTypeConversion.klass, "initialize", VALUEFUNC(_wrap_new_KeyTypeConversion), -1);
7753 23 : SwigClassKeyTypeConversion.mark = 0;
7754 23 : SwigClassKeyTypeConversion.destroy = (void (*)(void *)) free_kdb_KeyTypeConversion;
7755 23 : SwigClassKeyTypeConversion.trackObjects = 0;
7756 :
7757 23 : SwigClassKeyInvalidName.klass = rb_define_class_under(mKdb, "KeyInvalidName", ((swig_class *) SWIGTYPE_p_kdb__KeyException->clientdata)->klass);
7758 23 : SWIG_TypeClientData(SWIGTYPE_p_kdb__KeyInvalidName, (void *) &SwigClassKeyInvalidName);
7759 23 : rb_define_alloc_func(SwigClassKeyInvalidName.klass, _wrap_KeyInvalidName_allocate);
7760 23 : rb_define_method(SwigClassKeyInvalidName.klass, "initialize", VALUEFUNC(_wrap_new_KeyInvalidName), -1);
7761 23 : SwigClassKeyInvalidName.mark = 0;
7762 23 : SwigClassKeyInvalidName.destroy = (void (*)(void *)) free_kdb_KeyInvalidName;
7763 23 : SwigClassKeyInvalidName.trackObjects = 0;
7764 :
7765 23 : SwigClassKey.klass = rb_define_class_under(mKdb, "Key", rb_cObject);
7766 23 : SWIG_TypeClientData(SWIGTYPE_p_kdb__Key, (void *) &SwigClassKey);
7767 23 : rb_define_alloc_func(SwigClassKey.klass, _wrap_Key_allocate);
7768 23 : rb_define_method(SwigClassKey.klass, "initialize", VALUEFUNC(_wrap_new_Key), -1);
7769 23 : rb_define_method(SwigClassKey.klass, "get_reference_counter", VALUEFUNC(_wrap_Key_get_reference_counter), -1);
7770 23 : rb_define_method(SwigClassKey.klass, "clear", VALUEFUNC(_wrap_Key_clear), -1);
7771 23 : rb_define_method(SwigClassKey.klass, "name", VALUEFUNC(_wrap_Key_name), -1);
7772 23 : rb_define_method(SwigClassKey.klass, "basename", VALUEFUNC(_wrap_Key_basename), -1);
7773 23 : rb_define_method(SwigClassKey.klass, "name=", VALUEFUNC(_wrap_Key_namee___), -1);
7774 23 : rb_define_method(SwigClassKey.klass, "add_name", VALUEFUNC(_wrap_Key_add_name), -1);
7775 23 : rb_define_method(SwigClassKey.klass, "basename=", VALUEFUNC(_wrap_Key_basenamee___), -1);
7776 23 : rb_define_method(SwigClassKey.klass, "add_basename", VALUEFUNC(_wrap_Key_add_basename), -1);
7777 23 : rb_define_method(SwigClassKey.klass, "del_base_name", VALUEFUNC(_wrap_Key_del_base_name), -1);
7778 23 : rb_define_method(SwigClassKey.klass, "fullname", VALUEFUNC(_wrap_Key_fullname), -1);
7779 23 : rb_define_method(SwigClassKey.klass, "==", VALUEFUNC(_wrap_Key___eq__), -1);
7780 23 : rb_define_method(SwigClassKey.klass, "<", VALUEFUNC(_wrap_Key___lt__), -1);
7781 23 : rb_define_method(SwigClassKey.klass, "<=", VALUEFUNC(_wrap_Key___le__), -1);
7782 23 : rb_define_method(SwigClassKey.klass, ">", VALUEFUNC(_wrap_Key___gt__), -1);
7783 23 : rb_define_method(SwigClassKey.klass, ">=", VALUEFUNC(_wrap_Key___ge__), -1);
7784 23 : rb_define_method(SwigClassKey.klass, "is_null?", VALUEFUNC(_wrap_Key_is_nullq___), -1);
7785 23 : rb_define_method(SwigClassKey.klass, "need_sync?", VALUEFUNC(_wrap_Key_need_syncq___), -1);
7786 23 : rb_define_method(SwigClassKey.klass, "get_string", VALUEFUNC(_wrap_Key_get_string), -1);
7787 23 : rb_define_method(SwigClassKey.klass, "set_string", VALUEFUNC(_wrap_Key_set_string), -1);
7788 23 : rb_define_method(SwigClassKey.klass, "get_value", VALUEFUNC(_wrap_Key_get_value), -1);
7789 23 : rb_define_method(SwigClassKey.klass, "get_binary", VALUEFUNC(_wrap_Key_get_binary), -1);
7790 23 : rb_define_method(SwigClassKey.klass, "get_binary_size", VALUEFUNC(_wrap_Key_get_binary_size), -1);
7791 23 : rb_define_method(SwigClassKey.klass, "set_binary", VALUEFUNC(_wrap_Key_set_binary), -1);
7792 23 : rb_define_method(SwigClassKey.klass, "has_meta?", VALUEFUNC(_wrap_Key_has_metaq___), -1);
7793 23 : rb_define_method(SwigClassKey.klass, "del_meta", VALUEFUNC(_wrap_Key_del_meta), -1);
7794 23 : rb_define_method(SwigClassKey.klass, "copy_meta", VALUEFUNC(_wrap_Key_copy_meta), -1);
7795 23 : rb_define_method(SwigClassKey.klass, "copy_all_meta", VALUEFUNC(_wrap_Key_copy_all_meta), -1);
7796 23 : rb_define_method(SwigClassKey.klass, "rewind_meta", VALUEFUNC(_wrap_Key_rewind_meta), -1);
7797 23 : rb_define_method(SwigClassKey.klass, "next_meta", VALUEFUNC(_wrap_Key_next_meta), -1);
7798 23 : rb_define_method(SwigClassKey.klass, "current_meta", VALUEFUNC(_wrap_Key_current_meta), -1);
7799 23 : rb_define_method(SwigClassKey.klass, "is_valid?", VALUEFUNC(_wrap_Key_is_validq___), -1);
7800 23 : rb_define_method(SwigClassKey.klass, "namespace", VALUEFUNC(_wrap_Key_namespace), -1);
7801 23 : rb_define_method(SwigClassKey.klass, "is_cascading?", VALUEFUNC(_wrap_Key_is_cascadingq___), -1);
7802 23 : rb_define_method(SwigClassKey.klass, "is_spec?", VALUEFUNC(_wrap_Key_is_specq___), -1);
7803 23 : rb_define_method(SwigClassKey.klass, "is_proc?", VALUEFUNC(_wrap_Key_is_procq___), -1);
7804 23 : rb_define_method(SwigClassKey.klass, "is_dir?", VALUEFUNC(_wrap_Key_is_dirq___), -1);
7805 23 : rb_define_method(SwigClassKey.klass, "is_user?", VALUEFUNC(_wrap_Key_is_userq___), -1);
7806 23 : rb_define_method(SwigClassKey.klass, "is_system?", VALUEFUNC(_wrap_Key_is_systemq___), -1);
7807 23 : rb_define_method(SwigClassKey.klass, "is_string?", VALUEFUNC(_wrap_Key_is_stringq___), -1);
7808 23 : rb_define_method(SwigClassKey.klass, "is_binary?", VALUEFUNC(_wrap_Key_is_binaryq___), -1);
7809 23 : rb_define_method(SwigClassKey.klass, "is_inactive?", VALUEFUNC(_wrap_Key_is_inactiveq___), -1);
7810 23 : rb_define_method(SwigClassKey.klass, "is_below?", VALUEFUNC(_wrap_Key_is_belowq___), -1);
7811 23 : rb_define_method(SwigClassKey.klass, "is_below_or_same?", VALUEFUNC(_wrap_Key_is_below_or_sameq___), -1);
7812 23 : rb_define_method(SwigClassKey.klass, "is_direct_below?", VALUEFUNC(_wrap_Key_is_direct_belowq___), -1);
7813 23 : rb_define_method(SwigClassKey.klass, "meta", VALUEFUNC(_wrap_Key_meta), -1);
7814 23 : rb_define_method(SwigClassKey.klass, "clone", VALUEFUNC(_wrap_Key_clone), -1);
7815 23 : rb_define_alias(SwigClassKey.klass, "dup", "clone");
7816 23 : rb_define_method(SwigClassKey.klass, "spaceship", VALUEFUNC(_wrap_Key_spaceship), -1);
7817 23 : rb_define_alias(SwigClassKey.klass, "<=>", "spaceship");
7818 23 : rb_define_method(SwigClassKey.klass, "get", VALUEFUNC(_wrap_Key_get), -1);
7819 23 : rb_define_alias(SwigClassKey.klass, "value", "get");
7820 23 : rb_define_method(SwigClassKey.klass, "set", VALUEFUNC(_wrap_Key_set), -1);
7821 23 : rb_define_alias(SwigClassKey.klass, "value=", "set");
7822 23 : rb_define_method(SwigClassKey.klass, "set_meta", VALUEFUNC(_wrap_Key_set_meta), -1);
7823 23 : rb_define_alias(SwigClassKey.klass, "[]=", "set_meta");
7824 23 : rb_define_method(SwigClassKey.klass, "get_meta", VALUEFUNC(_wrap_Key_get_meta), -1);
7825 23 : rb_define_alias(SwigClassKey.klass, "[]", "get_meta");
7826 23 : SwigClassKey.mark = 0;
7827 23 : SwigClassKey.destroy = (void (*)(void *)) free_kdb_Key;
7828 23 : SwigClassKey.trackObjects = 0;
7829 :
7830 23 : SwigClassKeySet.klass = rb_define_class_under(mKdb, "KeySet", rb_cObject);
7831 23 : SWIG_TypeClientData(SWIGTYPE_p_kdb__KeySet, (void *) &SwigClassKeySet);
7832 23 : rb_include_module(SwigClassKeySet.klass, rb_eval_string("Enumerable"));
7833 23 : rb_define_alloc_func(SwigClassKeySet.klass, _wrap_KeySet_allocate);
7834 23 : rb_define_method(SwigClassKeySet.klass, "initialize", VALUEFUNC(_wrap_new_KeySet), -1);
7835 23 : rb_define_method(SwigClassKeySet.klass, "size", VALUEFUNC(_wrap_KeySet_size), -1);
7836 23 : rb_define_alias(SwigClassKeySet.klass, "length", "size");
7837 23 : rb_define_method(SwigClassKeySet.klass, "dup", VALUEFUNC(_wrap_KeySet_dup), -1);
7838 23 : rb_define_alias(SwigClassKeySet.klass, "clone", "dup");
7839 23 : rb_define_method(SwigClassKeySet.klass, "copy", VALUEFUNC(_wrap_KeySet_copy), -1);
7840 23 : rb_define_method(SwigClassKeySet.klass, "clear", VALUEFUNC(_wrap_KeySet_clear), -1);
7841 23 : rb_define_method(SwigClassKeySet.klass, "append", VALUEFUNC(_wrap_KeySet_append), -1);
7842 23 : rb_define_alias(SwigClassKeySet.klass, "<<", "append");
7843 23 : rb_define_method(SwigClassKeySet.klass, "head", VALUEFUNC(_wrap_KeySet_head), -1);
7844 23 : rb_define_method(SwigClassKeySet.klass, "tail", VALUEFUNC(_wrap_KeySet_tail), -1);
7845 23 : rb_define_method(SwigClassKeySet.klass, "rewind", VALUEFUNC(_wrap_KeySet_rewind), -1);
7846 23 : rb_define_method(SwigClassKeySet.klass, "next", VALUEFUNC(_wrap_KeySet_next), -1);
7847 23 : rb_define_method(SwigClassKeySet.klass, "current", VALUEFUNC(_wrap_KeySet_current), -1);
7848 23 : rb_define_method(SwigClassKeySet.klass, "cursor=", VALUEFUNC(_wrap_KeySet_cursore___), -1);
7849 23 : rb_define_method(SwigClassKeySet.klass, "cursor", VALUEFUNC(_wrap_KeySet_cursor), -1);
7850 23 : rb_define_method(SwigClassKeySet.klass, "pop", VALUEFUNC(_wrap_KeySet_pop), -1);
7851 23 : rb_define_method(SwigClassKeySet.klass, "at", VALUEFUNC(_wrap_KeySet_at), -1);
7852 23 : rb_define_alias(SwigClassKeySet.klass, "[]", "at");
7853 23 : rb_define_method(SwigClassKeySet.klass, "cut", VALUEFUNC(_wrap_KeySet_cut), -1);
7854 23 : rb_define_method(SwigClassKeySet.klass, "lookup", VALUEFUNC(_wrap_KeySet_lookup), -1);
7855 23 : rb_define_method(SwigClassKeySet.klass, "each", VALUEFUNC(_wrap_KeySet_each), -1);
7856 23 : rb_define_method(SwigClassKeySet.klass, "==", VALUEFUNC(_wrap_KeySet___eq__), -1);
7857 23 : rb_define_alias(SwigClassKeySet.klass, "eql?", "==");
7858 23 : rb_define_method(SwigClassKeySet.klass, "delete_at", VALUEFUNC(_wrap_KeySet_delete_at), -1);
7859 23 : rb_define_method(SwigClassKeySet.klass, "delete", VALUEFUNC(_wrap_KeySet_delete), -1);
7860 23 : rb_define_method(SwigClassKeySet.klass, "empty?", VALUEFUNC(_wrap_KeySet_emptyq___), -1);
7861 23 : SwigClassKeySet.mark = 0;
7862 23 : SwigClassKeySet.destroy = (void (*)(void *)) free_kdb_KeySet;
7863 23 : SwigClassKeySet.trackObjects = 0;
7864 :
7865 23 : SwigClassKDBException.klass = rb_define_class_under(mKdb, "KDBException", ((swig_class *) SWIGTYPE_p_kdb__Exception->clientdata)->klass);
7866 23 : SWIG_TypeClientData(SWIGTYPE_p_kdb__KDBException, (void *) &SwigClassKDBException);
7867 23 : rb_define_alloc_func(SwigClassKDBException.klass, _wrap_KDBException_allocate);
7868 23 : rb_define_method(SwigClassKDBException.klass, "initialize", VALUEFUNC(_wrap_new_KDBException), -1);
7869 23 : rb_define_method(SwigClassKDBException.klass, "what_with_arguments", VALUEFUNC(_wrap_KDBException_what_with_arguments), -1);
7870 23 : SwigClassKDBException.mark = 0;
7871 23 : SwigClassKDBException.destroy = (void (*)(void *)) free_kdb_KDBException;
7872 23 : SwigClassKDBException.trackObjects = 0;
7873 :
7874 23 : SwigClassContractException.klass = rb_define_class_under(mKdb, "ContractException", ((swig_class *) SWIGTYPE_p_kdb__KDBException->clientdata)->klass);
7875 23 : SWIG_TypeClientData(SWIGTYPE_p_kdb__ContractException, (void *) &SwigClassContractException);
7876 23 : rb_define_alloc_func(SwigClassContractException.klass, _wrap_ContractException_allocate);
7877 23 : rb_define_method(SwigClassContractException.klass, "initialize", VALUEFUNC(_wrap_new_ContractException), -1);
7878 23 : SwigClassContractException.mark = 0;
7879 23 : SwigClassContractException.destroy = (void (*)(void *)) free_kdb_ContractException;
7880 23 : SwigClassContractException.trackObjects = 0;
7881 :
7882 23 : SwigClassKDB.klass = rb_define_class_under(mKdb, "KDB", rb_cObject);
7883 23 : SWIG_TypeClientData(SWIGTYPE_p_kdb__KDB, (void *) &SwigClassKDB);
7884 23 : rb_define_alloc_func(SwigClassKDB.klass, _wrap_KDB_allocate);
7885 23 : rb_define_method(SwigClassKDB.klass, "initialize", VALUEFUNC(_wrap_new_KDB), -1);
7886 23 : rb_define_method(SwigClassKDB.klass, "open", VALUEFUNC(_wrap_KDB_open), -1);
7887 23 : rb_define_method(SwigClassKDB.klass, "close", VALUEFUNC(_wrap_KDB_close), -1);
7888 23 : rb_define_method(SwigClassKDB.klass, "get", VALUEFUNC(_wrap_KDB_get), -1);
7889 23 : rb_define_method(SwigClassKDB.klass, "set", VALUEFUNC(_wrap_KDB_set), -1);
7890 23 : rb_define_method(SwigClassKDB.klass, "ensure", VALUEFUNC(_wrap_KDB_ensure), -1);
7891 23 : SwigClassKDB.mark = 0;
7892 23 : SwigClassKDB.destroy = (void (*)(void *)) free_kdb_KDB;
7893 23 : SwigClassKDB.trackObjects = 0;
7894 23 : }
7895 :
|