oboe-heroku 0.8.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4859 @@
1
+ /* ----------------------------------------------------------------------------
2
+ * This file was automatically generated by SWIG (http://www.swig.org).
3
+ * Version 2.0.4
4
+ *
5
+ * This file is not intended to be easily readable and contains a number of
6
+ * coding conventions designed to improve portability and efficiency. Do not make
7
+ * changes to this file unless you know what you are doing--modify the SWIG
8
+ * interface file instead.
9
+ * ----------------------------------------------------------------------------- */
10
+
11
+ #define SWIGRUBY
12
+
13
+
14
+ #ifdef __cplusplus
15
+ /* SwigValueWrapper is described in swig.swg */
16
+ template<typename T> class SwigValueWrapper {
17
+ struct SwigMovePointer {
18
+ T *ptr;
19
+ SwigMovePointer(T *p) : ptr(p) { }
20
+ ~SwigMovePointer() { delete ptr; }
21
+ SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
22
+ } pointer;
23
+ SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
24
+ SwigValueWrapper(const SwigValueWrapper<T>& rhs);
25
+ public:
26
+ SwigValueWrapper() : pointer(0) { }
27
+ SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
28
+ operator T&() const { return *pointer.ptr; }
29
+ T *operator&() { return pointer.ptr; }
30
+ };
31
+
32
+ template <typename T> T SwigValueInit() {
33
+ return T();
34
+ }
35
+ #endif
36
+
37
+ /* -----------------------------------------------------------------------------
38
+ * This section contains generic SWIG labels for method/variable
39
+ * declarations/attributes, and other compiler dependent labels.
40
+ * ----------------------------------------------------------------------------- */
41
+
42
+ /* template workaround for compilers that cannot correctly implement the C++ standard */
43
+ #ifndef SWIGTEMPLATEDISAMBIGUATOR
44
+ # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
45
+ # define SWIGTEMPLATEDISAMBIGUATOR template
46
+ # elif defined(__HP_aCC)
47
+ /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
48
+ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
49
+ # define SWIGTEMPLATEDISAMBIGUATOR template
50
+ # else
51
+ # define SWIGTEMPLATEDISAMBIGUATOR
52
+ # endif
53
+ #endif
54
+
55
+ /* inline attribute */
56
+ #ifndef SWIGINLINE
57
+ # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
58
+ # define SWIGINLINE inline
59
+ # else
60
+ # define SWIGINLINE
61
+ # endif
62
+ #endif
63
+
64
+ /* attribute recognised by some compilers to avoid 'unused' warnings */
65
+ #ifndef SWIGUNUSED
66
+ # if defined(__GNUC__)
67
+ # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
68
+ # define SWIGUNUSED __attribute__ ((__unused__))
69
+ # else
70
+ # define SWIGUNUSED
71
+ # endif
72
+ # elif defined(__ICC)
73
+ # define SWIGUNUSED __attribute__ ((__unused__))
74
+ # else
75
+ # define SWIGUNUSED
76
+ # endif
77
+ #endif
78
+
79
+ #ifndef SWIG_MSC_UNSUPPRESS_4505
80
+ # if defined(_MSC_VER)
81
+ # pragma warning(disable : 4505) /* unreferenced local function has been removed */
82
+ # endif
83
+ #endif
84
+
85
+ #ifndef SWIGUNUSEDPARM
86
+ # ifdef __cplusplus
87
+ # define SWIGUNUSEDPARM(p)
88
+ # else
89
+ # define SWIGUNUSEDPARM(p) p SWIGUNUSED
90
+ # endif
91
+ #endif
92
+
93
+ /* internal SWIG method */
94
+ #ifndef SWIGINTERN
95
+ # define SWIGINTERN static SWIGUNUSED
96
+ #endif
97
+
98
+ /* internal inline SWIG method */
99
+ #ifndef SWIGINTERNINLINE
100
+ # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
101
+ #endif
102
+
103
+ /* exporting methods */
104
+ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
105
+ # ifndef GCC_HASCLASSVISIBILITY
106
+ # define GCC_HASCLASSVISIBILITY
107
+ # endif
108
+ #endif
109
+
110
+ #ifndef SWIGEXPORT
111
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
112
+ # if defined(STATIC_LINKED)
113
+ # define SWIGEXPORT
114
+ # else
115
+ # define SWIGEXPORT __declspec(dllexport)
116
+ # endif
117
+ # else
118
+ # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
119
+ # define SWIGEXPORT __attribute__ ((visibility("default")))
120
+ # else
121
+ # define SWIGEXPORT
122
+ # endif
123
+ # endif
124
+ #endif
125
+
126
+ /* calling conventions for Windows */
127
+ #ifndef SWIGSTDCALL
128
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
129
+ # define SWIGSTDCALL __stdcall
130
+ # else
131
+ # define SWIGSTDCALL
132
+ # endif
133
+ #endif
134
+
135
+ /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
136
+ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
137
+ # define _CRT_SECURE_NO_DEPRECATE
138
+ #endif
139
+
140
+ /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
141
+ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
142
+ # define _SCL_SECURE_NO_DEPRECATE
143
+ #endif
144
+
145
+
146
+ /* -----------------------------------------------------------------------------
147
+ * This section contains generic SWIG labels for method/variable
148
+ * declarations/attributes, and other compiler dependent labels.
149
+ * ----------------------------------------------------------------------------- */
150
+
151
+ /* template workaround for compilers that cannot correctly implement the C++ standard */
152
+ #ifndef SWIGTEMPLATEDISAMBIGUATOR
153
+ # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
154
+ # define SWIGTEMPLATEDISAMBIGUATOR template
155
+ # elif defined(__HP_aCC)
156
+ /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
157
+ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
158
+ # define SWIGTEMPLATEDISAMBIGUATOR template
159
+ # else
160
+ # define SWIGTEMPLATEDISAMBIGUATOR
161
+ # endif
162
+ #endif
163
+
164
+ /* inline attribute */
165
+ #ifndef SWIGINLINE
166
+ # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
167
+ # define SWIGINLINE inline
168
+ # else
169
+ # define SWIGINLINE
170
+ # endif
171
+ #endif
172
+
173
+ /* attribute recognised by some compilers to avoid 'unused' warnings */
174
+ #ifndef SWIGUNUSED
175
+ # if defined(__GNUC__)
176
+ # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
177
+ # define SWIGUNUSED __attribute__ ((__unused__))
178
+ # else
179
+ # define SWIGUNUSED
180
+ # endif
181
+ # elif defined(__ICC)
182
+ # define SWIGUNUSED __attribute__ ((__unused__))
183
+ # else
184
+ # define SWIGUNUSED
185
+ # endif
186
+ #endif
187
+
188
+ #ifndef SWIG_MSC_UNSUPPRESS_4505
189
+ # if defined(_MSC_VER)
190
+ # pragma warning(disable : 4505) /* unreferenced local function has been removed */
191
+ # endif
192
+ #endif
193
+
194
+ #ifndef SWIGUNUSEDPARM
195
+ # ifdef __cplusplus
196
+ # define SWIGUNUSEDPARM(p)
197
+ # else
198
+ # define SWIGUNUSEDPARM(p) p SWIGUNUSED
199
+ # endif
200
+ #endif
201
+
202
+ /* internal SWIG method */
203
+ #ifndef SWIGINTERN
204
+ # define SWIGINTERN static SWIGUNUSED
205
+ #endif
206
+
207
+ /* internal inline SWIG method */
208
+ #ifndef SWIGINTERNINLINE
209
+ # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
210
+ #endif
211
+
212
+ /* exporting methods */
213
+ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
214
+ # ifndef GCC_HASCLASSVISIBILITY
215
+ # define GCC_HASCLASSVISIBILITY
216
+ # endif
217
+ #endif
218
+
219
+ #ifndef SWIGEXPORT
220
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
221
+ # if defined(STATIC_LINKED)
222
+ # define SWIGEXPORT
223
+ # else
224
+ # define SWIGEXPORT __declspec(dllexport)
225
+ # endif
226
+ # else
227
+ # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
228
+ # define SWIGEXPORT __attribute__ ((visibility("default")))
229
+ # else
230
+ # define SWIGEXPORT
231
+ # endif
232
+ # endif
233
+ #endif
234
+
235
+ /* calling conventions for Windows */
236
+ #ifndef SWIGSTDCALL
237
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
238
+ # define SWIGSTDCALL __stdcall
239
+ # else
240
+ # define SWIGSTDCALL
241
+ # endif
242
+ #endif
243
+
244
+ /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
245
+ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
246
+ # define _CRT_SECURE_NO_DEPRECATE
247
+ #endif
248
+
249
+ /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
250
+ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
251
+ # define _SCL_SECURE_NO_DEPRECATE
252
+ #endif
253
+
254
+
255
+ /* -----------------------------------------------------------------------------
256
+ * swigrun.swg
257
+ *
258
+ * This file contains generic C API SWIG runtime support for pointer
259
+ * type checking.
260
+ * ----------------------------------------------------------------------------- */
261
+
262
+ /* This should only be incremented when either the layout of swig_type_info changes,
263
+ or for whatever reason, the runtime changes incompatibly */
264
+ #define SWIG_RUNTIME_VERSION "4"
265
+
266
+ /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
267
+ #ifdef SWIG_TYPE_TABLE
268
+ # define SWIG_QUOTE_STRING(x) #x
269
+ # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
270
+ # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
271
+ #else
272
+ # define SWIG_TYPE_TABLE_NAME
273
+ #endif
274
+
275
+ /*
276
+ You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
277
+ creating a static or dynamic library from the SWIG runtime code.
278
+ In 99.9% of the cases, SWIG just needs to declare them as 'static'.
279
+
280
+ But only do this if strictly necessary, ie, if you have problems
281
+ with your compiler or suchlike.
282
+ */
283
+
284
+ #ifndef SWIGRUNTIME
285
+ # define SWIGRUNTIME SWIGINTERN
286
+ #endif
287
+
288
+ #ifndef SWIGRUNTIMEINLINE
289
+ # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
290
+ #endif
291
+
292
+ /* Generic buffer size */
293
+ #ifndef SWIG_BUFFER_SIZE
294
+ # define SWIG_BUFFER_SIZE 1024
295
+ #endif
296
+
297
+ /* Flags for pointer conversions */
298
+ #define SWIG_POINTER_DISOWN 0x1
299
+ #define SWIG_CAST_NEW_MEMORY 0x2
300
+
301
+ /* Flags for new pointer objects */
302
+ #define SWIG_POINTER_OWN 0x1
303
+
304
+
305
+ /*
306
+ Flags/methods for returning states.
307
+
308
+ The SWIG conversion methods, as ConvertPtr, return an integer
309
+ that tells if the conversion was successful or not. And if not,
310
+ an error code can be returned (see swigerrors.swg for the codes).
311
+
312
+ Use the following macros/flags to set or process the returning
313
+ states.
314
+
315
+ In old versions of SWIG, code such as the following was usually written:
316
+
317
+ if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
318
+ // success code
319
+ } else {
320
+ //fail code
321
+ }
322
+
323
+ Now you can be more explicit:
324
+
325
+ int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
326
+ if (SWIG_IsOK(res)) {
327
+ // success code
328
+ } else {
329
+ // fail code
330
+ }
331
+
332
+ which is the same really, but now you can also do
333
+
334
+ Type *ptr;
335
+ int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
336
+ if (SWIG_IsOK(res)) {
337
+ // success code
338
+ if (SWIG_IsNewObj(res) {
339
+ ...
340
+ delete *ptr;
341
+ } else {
342
+ ...
343
+ }
344
+ } else {
345
+ // fail code
346
+ }
347
+
348
+ I.e., now SWIG_ConvertPtr can return new objects and you can
349
+ identify the case and take care of the deallocation. Of course that
350
+ also requires SWIG_ConvertPtr to return new result values, such as
351
+
352
+ int SWIG_ConvertPtr(obj, ptr,...) {
353
+ if (<obj is ok>) {
354
+ if (<need new object>) {
355
+ *ptr = <ptr to new allocated object>;
356
+ return SWIG_NEWOBJ;
357
+ } else {
358
+ *ptr = <ptr to old object>;
359
+ return SWIG_OLDOBJ;
360
+ }
361
+ } else {
362
+ return SWIG_BADOBJ;
363
+ }
364
+ }
365
+
366
+ Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
367
+ more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
368
+ SWIG errors code.
369
+
370
+ Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
371
+ allows to return the 'cast rank', for example, if you have this
372
+
373
+ int food(double)
374
+ int fooi(int);
375
+
376
+ and you call
377
+
378
+ food(1) // cast rank '1' (1 -> 1.0)
379
+ fooi(1) // cast rank '0'
380
+
381
+ just use the SWIG_AddCast()/SWIG_CheckState()
382
+ */
383
+
384
+ #define SWIG_OK (0)
385
+ #define SWIG_ERROR (-1)
386
+ #define SWIG_IsOK(r) (r >= 0)
387
+ #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
388
+
389
+ /* The CastRankLimit says how many bits are used for the cast rank */
390
+ #define SWIG_CASTRANKLIMIT (1 << 8)
391
+ /* The NewMask denotes the object was created (using new/malloc) */
392
+ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
393
+ /* The TmpMask is for in/out typemaps that use temporal objects */
394
+ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
395
+ /* Simple returning values */
396
+ #define SWIG_BADOBJ (SWIG_ERROR)
397
+ #define SWIG_OLDOBJ (SWIG_OK)
398
+ #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
399
+ #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
400
+ /* Check, add and del mask methods */
401
+ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
402
+ #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
403
+ #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
404
+ #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
405
+ #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
406
+ #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
407
+
408
+ /* Cast-Rank Mode */
409
+ #if defined(SWIG_CASTRANK_MODE)
410
+ # ifndef SWIG_TypeRank
411
+ # define SWIG_TypeRank unsigned long
412
+ # endif
413
+ # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
414
+ # define SWIG_MAXCASTRANK (2)
415
+ # endif
416
+ # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
417
+ # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
418
+ SWIGINTERNINLINE int SWIG_AddCast(int r) {
419
+ return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
420
+ }
421
+ SWIGINTERNINLINE int SWIG_CheckState(int r) {
422
+ return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
423
+ }
424
+ #else /* no cast-rank mode */
425
+ # define SWIG_AddCast
426
+ # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
427
+ #endif
428
+
429
+
430
+ #include <string.h>
431
+
432
+ #ifdef __cplusplus
433
+ extern "C" {
434
+ #endif
435
+
436
+ typedef void *(*swig_converter_func)(void *, int *);
437
+ typedef struct swig_type_info *(*swig_dycast_func)(void **);
438
+
439
+ /* Structure to store information on one type */
440
+ typedef struct swig_type_info {
441
+ const char *name; /* mangled name of this type */
442
+ const char *str; /* human readable name of this type */
443
+ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
444
+ struct swig_cast_info *cast; /* linked list of types that can cast into this type */
445
+ void *clientdata; /* language specific type data */
446
+ int owndata; /* flag if the structure owns the clientdata */
447
+ } swig_type_info;
448
+
449
+ /* Structure to store a type and conversion function used for casting */
450
+ typedef struct swig_cast_info {
451
+ swig_type_info *type; /* pointer to type that is equivalent to this type */
452
+ swig_converter_func converter; /* function to cast the void pointers */
453
+ struct swig_cast_info *next; /* pointer to next cast in linked list */
454
+ struct swig_cast_info *prev; /* pointer to the previous cast */
455
+ } swig_cast_info;
456
+
457
+ /* Structure used to store module information
458
+ * Each module generates one structure like this, and the runtime collects
459
+ * all of these structures and stores them in a circularly linked list.*/
460
+ typedef struct swig_module_info {
461
+ swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
462
+ size_t size; /* Number of types in this module */
463
+ struct swig_module_info *next; /* Pointer to next element in circularly linked list */
464
+ swig_type_info **type_initial; /* Array of initially generated type structures */
465
+ swig_cast_info **cast_initial; /* Array of initially generated casting structures */
466
+ void *clientdata; /* Language specific module data */
467
+ } swig_module_info;
468
+
469
+ /*
470
+ Compare two type names skipping the space characters, therefore
471
+ "char*" == "char *" and "Class<int>" == "Class<int >", etc.
472
+
473
+ Return 0 when the two name types are equivalent, as in
474
+ strncmp, but skipping ' '.
475
+ */
476
+ SWIGRUNTIME int
477
+ SWIG_TypeNameComp(const char *f1, const char *l1,
478
+ const char *f2, const char *l2) {
479
+ for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
480
+ while ((*f1 == ' ') && (f1 != l1)) ++f1;
481
+ while ((*f2 == ' ') && (f2 != l2)) ++f2;
482
+ if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
483
+ }
484
+ return (int)((l1 - f1) - (l2 - f2));
485
+ }
486
+
487
+ /*
488
+ Check type equivalence in a name list like <name1>|<name2>|...
489
+ Return 0 if not equal, 1 if equal
490
+ */
491
+ SWIGRUNTIME int
492
+ SWIG_TypeEquiv(const char *nb, const char *tb) {
493
+ int equiv = 0;
494
+ const char* te = tb + strlen(tb);
495
+ const char* ne = nb;
496
+ while (!equiv && *ne) {
497
+ for (nb = ne; *ne; ++ne) {
498
+ if (*ne == '|') break;
499
+ }
500
+ equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
501
+ if (*ne) ++ne;
502
+ }
503
+ return equiv;
504
+ }
505
+
506
+ /*
507
+ Check type equivalence in a name list like <name1>|<name2>|...
508
+ Return 0 if equal, -1 if nb < tb, 1 if nb > tb
509
+ */
510
+ SWIGRUNTIME int
511
+ SWIG_TypeCompare(const char *nb, const char *tb) {
512
+ int equiv = 0;
513
+ const char* te = tb + strlen(tb);
514
+ const char* ne = nb;
515
+ while (!equiv && *ne) {
516
+ for (nb = ne; *ne; ++ne) {
517
+ if (*ne == '|') break;
518
+ }
519
+ equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
520
+ if (*ne) ++ne;
521
+ }
522
+ return equiv;
523
+ }
524
+
525
+
526
+ /*
527
+ Check the typename
528
+ */
529
+ SWIGRUNTIME swig_cast_info *
530
+ SWIG_TypeCheck(const char *c, swig_type_info *ty) {
531
+ if (ty) {
532
+ swig_cast_info *iter = ty->cast;
533
+ while (iter) {
534
+ if (strcmp(iter->type->name, c) == 0) {
535
+ if (iter == ty->cast)
536
+ return iter;
537
+ /* Move iter to the top of the linked list */
538
+ iter->prev->next = iter->next;
539
+ if (iter->next)
540
+ iter->next->prev = iter->prev;
541
+ iter->next = ty->cast;
542
+ iter->prev = 0;
543
+ if (ty->cast) ty->cast->prev = iter;
544
+ ty->cast = iter;
545
+ return iter;
546
+ }
547
+ iter = iter->next;
548
+ }
549
+ }
550
+ return 0;
551
+ }
552
+
553
+ /*
554
+ Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
555
+ */
556
+ SWIGRUNTIME swig_cast_info *
557
+ SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
558
+ if (ty) {
559
+ swig_cast_info *iter = ty->cast;
560
+ while (iter) {
561
+ if (iter->type == from) {
562
+ if (iter == ty->cast)
563
+ return iter;
564
+ /* Move iter to the top of the linked list */
565
+ iter->prev->next = iter->next;
566
+ if (iter->next)
567
+ iter->next->prev = iter->prev;
568
+ iter->next = ty->cast;
569
+ iter->prev = 0;
570
+ if (ty->cast) ty->cast->prev = iter;
571
+ ty->cast = iter;
572
+ return iter;
573
+ }
574
+ iter = iter->next;
575
+ }
576
+ }
577
+ return 0;
578
+ }
579
+
580
+ /*
581
+ Cast a pointer up an inheritance hierarchy
582
+ */
583
+ SWIGRUNTIMEINLINE void *
584
+ SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
585
+ return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
586
+ }
587
+
588
+ /*
589
+ Dynamic pointer casting. Down an inheritance hierarchy
590
+ */
591
+ SWIGRUNTIME swig_type_info *
592
+ SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
593
+ swig_type_info *lastty = ty;
594
+ if (!ty || !ty->dcast) return ty;
595
+ while (ty && (ty->dcast)) {
596
+ ty = (*ty->dcast)(ptr);
597
+ if (ty) lastty = ty;
598
+ }
599
+ return lastty;
600
+ }
601
+
602
+ /*
603
+ Return the name associated with this type
604
+ */
605
+ SWIGRUNTIMEINLINE const char *
606
+ SWIG_TypeName(const swig_type_info *ty) {
607
+ return ty->name;
608
+ }
609
+
610
+ /*
611
+ Return the pretty name associated with this type,
612
+ that is an unmangled type name in a form presentable to the user.
613
+ */
614
+ SWIGRUNTIME const char *
615
+ SWIG_TypePrettyName(const swig_type_info *type) {
616
+ /* The "str" field contains the equivalent pretty names of the
617
+ type, separated by vertical-bar characters. We choose
618
+ to print the last name, as it is often (?) the most
619
+ specific. */
620
+ if (!type) return NULL;
621
+ if (type->str != NULL) {
622
+ const char *last_name = type->str;
623
+ const char *s;
624
+ for (s = type->str; *s; s++)
625
+ if (*s == '|') last_name = s+1;
626
+ return last_name;
627
+ }
628
+ else
629
+ return type->name;
630
+ }
631
+
632
+ /*
633
+ Set the clientdata field for a type
634
+ */
635
+ SWIGRUNTIME void
636
+ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
637
+ swig_cast_info *cast = ti->cast;
638
+ /* if (ti->clientdata == clientdata) return; */
639
+ ti->clientdata = clientdata;
640
+
641
+ while (cast) {
642
+ if (!cast->converter) {
643
+ swig_type_info *tc = cast->type;
644
+ if (!tc->clientdata) {
645
+ SWIG_TypeClientData(tc, clientdata);
646
+ }
647
+ }
648
+ cast = cast->next;
649
+ }
650
+ }
651
+ SWIGRUNTIME void
652
+ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
653
+ SWIG_TypeClientData(ti, clientdata);
654
+ ti->owndata = 1;
655
+ }
656
+
657
+ /*
658
+ Search for a swig_type_info structure only by mangled name
659
+ Search is a O(log #types)
660
+
661
+ We start searching at module start, and finish searching when start == end.
662
+ Note: if start == end at the beginning of the function, we go all the way around
663
+ the circular list.
664
+ */
665
+ SWIGRUNTIME swig_type_info *
666
+ SWIG_MangledTypeQueryModule(swig_module_info *start,
667
+ swig_module_info *end,
668
+ const char *name) {
669
+ swig_module_info *iter = start;
670
+ do {
671
+ if (iter->size) {
672
+ register size_t l = 0;
673
+ register size_t r = iter->size - 1;
674
+ do {
675
+ /* since l+r >= 0, we can (>> 1) instead (/ 2) */
676
+ register size_t i = (l + r) >> 1;
677
+ const char *iname = iter->types[i]->name;
678
+ if (iname) {
679
+ register int compare = strcmp(name, iname);
680
+ if (compare == 0) {
681
+ return iter->types[i];
682
+ } else if (compare < 0) {
683
+ if (i) {
684
+ r = i - 1;
685
+ } else {
686
+ break;
687
+ }
688
+ } else if (compare > 0) {
689
+ l = i + 1;
690
+ }
691
+ } else {
692
+ break; /* should never happen */
693
+ }
694
+ } while (l <= r);
695
+ }
696
+ iter = iter->next;
697
+ } while (iter != end);
698
+ return 0;
699
+ }
700
+
701
+ /*
702
+ Search for a swig_type_info structure for either a mangled name or a human readable name.
703
+ It first searches the mangled names of the types, which is a O(log #types)
704
+ If a type is not found it then searches the human readable names, which is O(#types).
705
+
706
+ We start searching at module start, and finish searching when start == end.
707
+ Note: if start == end at the beginning of the function, we go all the way around
708
+ the circular list.
709
+ */
710
+ SWIGRUNTIME swig_type_info *
711
+ SWIG_TypeQueryModule(swig_module_info *start,
712
+ swig_module_info *end,
713
+ const char *name) {
714
+ /* STEP 1: Search the name field using binary search */
715
+ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
716
+ if (ret) {
717
+ return ret;
718
+ } else {
719
+ /* STEP 2: If the type hasn't been found, do a complete search
720
+ of the str field (the human readable name) */
721
+ swig_module_info *iter = start;
722
+ do {
723
+ register size_t i = 0;
724
+ for (; i < iter->size; ++i) {
725
+ if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
726
+ return iter->types[i];
727
+ }
728
+ iter = iter->next;
729
+ } while (iter != end);
730
+ }
731
+
732
+ /* neither found a match */
733
+ return 0;
734
+ }
735
+
736
+ /*
737
+ Pack binary data into a string
738
+ */
739
+ SWIGRUNTIME char *
740
+ SWIG_PackData(char *c, void *ptr, size_t sz) {
741
+ static const char hex[17] = "0123456789abcdef";
742
+ register const unsigned char *u = (unsigned char *) ptr;
743
+ register const unsigned char *eu = u + sz;
744
+ for (; u != eu; ++u) {
745
+ register unsigned char uu = *u;
746
+ *(c++) = hex[(uu & 0xf0) >> 4];
747
+ *(c++) = hex[uu & 0xf];
748
+ }
749
+ return c;
750
+ }
751
+
752
+ /*
753
+ Unpack binary data from a string
754
+ */
755
+ SWIGRUNTIME const char *
756
+ SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
757
+ register unsigned char *u = (unsigned char *) ptr;
758
+ register const unsigned char *eu = u + sz;
759
+ for (; u != eu; ++u) {
760
+ register char d = *(c++);
761
+ register unsigned char uu;
762
+ if ((d >= '0') && (d <= '9'))
763
+ uu = ((d - '0') << 4);
764
+ else if ((d >= 'a') && (d <= 'f'))
765
+ uu = ((d - ('a'-10)) << 4);
766
+ else
767
+ return (char *) 0;
768
+ d = *(c++);
769
+ if ((d >= '0') && (d <= '9'))
770
+ uu |= (d - '0');
771
+ else if ((d >= 'a') && (d <= 'f'))
772
+ uu |= (d - ('a'-10));
773
+ else
774
+ return (char *) 0;
775
+ *u = uu;
776
+ }
777
+ return c;
778
+ }
779
+
780
+ /*
781
+ Pack 'void *' into a string buffer.
782
+ */
783
+ SWIGRUNTIME char *
784
+ SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
785
+ char *r = buff;
786
+ if ((2*sizeof(void *) + 2) > bsz) return 0;
787
+ *(r++) = '_';
788
+ r = SWIG_PackData(r,&ptr,sizeof(void *));
789
+ if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
790
+ strcpy(r,name);
791
+ return buff;
792
+ }
793
+
794
+ SWIGRUNTIME const char *
795
+ SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
796
+ if (*c != '_') {
797
+ if (strcmp(c,"NULL") == 0) {
798
+ *ptr = (void *) 0;
799
+ return name;
800
+ } else {
801
+ return 0;
802
+ }
803
+ }
804
+ return SWIG_UnpackData(++c,ptr,sizeof(void *));
805
+ }
806
+
807
+ SWIGRUNTIME char *
808
+ SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
809
+ char *r = buff;
810
+ size_t lname = (name ? strlen(name) : 0);
811
+ if ((2*sz + 2 + lname) > bsz) return 0;
812
+ *(r++) = '_';
813
+ r = SWIG_PackData(r,ptr,sz);
814
+ if (lname) {
815
+ strncpy(r,name,lname+1);
816
+ } else {
817
+ *r = 0;
818
+ }
819
+ return buff;
820
+ }
821
+
822
+ SWIGRUNTIME const char *
823
+ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
824
+ if (*c != '_') {
825
+ if (strcmp(c,"NULL") == 0) {
826
+ memset(ptr,0,sz);
827
+ return name;
828
+ } else {
829
+ return 0;
830
+ }
831
+ }
832
+ return SWIG_UnpackData(++c,ptr,sz);
833
+ }
834
+
835
+ #ifdef __cplusplus
836
+ }
837
+ #endif
838
+
839
+ /* Errors in SWIG */
840
+ #define SWIG_UnknownError -1
841
+ #define SWIG_IOError -2
842
+ #define SWIG_RuntimeError -3
843
+ #define SWIG_IndexError -4
844
+ #define SWIG_TypeError -5
845
+ #define SWIG_DivisionByZero -6
846
+ #define SWIG_OverflowError -7
847
+ #define SWIG_SyntaxError -8
848
+ #define SWIG_ValueError -9
849
+ #define SWIG_SystemError -10
850
+ #define SWIG_AttributeError -11
851
+ #define SWIG_MemoryError -12
852
+ #define SWIG_NullReferenceError -13
853
+
854
+
855
+
856
+ #include <ruby.h>
857
+
858
+ /* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which
859
+ * breaks using rb_intern as an lvalue, as SWIG does. We work around this
860
+ * issue for now by disabling this.
861
+ * https://sourceforge.net/tracker/?func=detail&aid=2859614&group_id=1645&atid=101645
862
+ */
863
+ #ifdef rb_intern
864
+ # undef rb_intern
865
+ #endif
866
+
867
+ /* Remove global macros defined in Ruby's win32.h */
868
+ #ifdef write
869
+ # undef write
870
+ #endif
871
+ #ifdef read
872
+ # undef read
873
+ #endif
874
+ #ifdef bind
875
+ # undef bind
876
+ #endif
877
+ #ifdef close
878
+ # undef close
879
+ #endif
880
+ #ifdef connect
881
+ # undef connect
882
+ #endif
883
+
884
+
885
+ /* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
886
+ #ifndef NUM2LL
887
+ #define NUM2LL(x) NUM2LONG((x))
888
+ #endif
889
+ #ifndef LL2NUM
890
+ #define LL2NUM(x) INT2NUM((long) (x))
891
+ #endif
892
+ #ifndef ULL2NUM
893
+ #define ULL2NUM(x) UINT2NUM((unsigned long) (x))
894
+ #endif
895
+
896
+ /* Ruby 1.7 doesn't (yet) define NUM2ULL() */
897
+ #ifndef NUM2ULL
898
+ #ifdef HAVE_LONG_LONG
899
+ #define NUM2ULL(x) rb_num2ull((x))
900
+ #else
901
+ #define NUM2ULL(x) NUM2ULONG(x)
902
+ #endif
903
+ #endif
904
+
905
+ /* RSTRING_LEN, etc are new in Ruby 1.9, but ->ptr and ->len no longer work */
906
+ /* Define these for older versions so we can just write code the new way */
907
+ #ifndef RSTRING_LEN
908
+ # define RSTRING_LEN(x) RSTRING(x)->len
909
+ #endif
910
+ #ifndef RSTRING_PTR
911
+ # define RSTRING_PTR(x) RSTRING(x)->ptr
912
+ #endif
913
+ #ifndef RSTRING_END
914
+ # define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x))
915
+ #endif
916
+ #ifndef RARRAY_LEN
917
+ # define RARRAY_LEN(x) RARRAY(x)->len
918
+ #endif
919
+ #ifndef RARRAY_PTR
920
+ # define RARRAY_PTR(x) RARRAY(x)->ptr
921
+ #endif
922
+ #ifndef RFLOAT_VALUE
923
+ # define RFLOAT_VALUE(x) RFLOAT(x)->value
924
+ #endif
925
+ #ifndef DOUBLE2NUM
926
+ # define DOUBLE2NUM(x) rb_float_new(x)
927
+ #endif
928
+ #ifndef RHASH_TBL
929
+ # define RHASH_TBL(x) (RHASH(x)->tbl)
930
+ #endif
931
+ #ifndef RHASH_ITER_LEV
932
+ # define RHASH_ITER_LEV(x) (RHASH(x)->iter_lev)
933
+ #endif
934
+ #ifndef RHASH_IFNONE
935
+ # define RHASH_IFNONE(x) (RHASH(x)->ifnone)
936
+ #endif
937
+ #ifndef RHASH_SIZE
938
+ # define RHASH_SIZE(x) (RHASH(x)->tbl->num_entries)
939
+ #endif
940
+ #ifndef RHASH_EMPTY_P
941
+ # define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0)
942
+ #endif
943
+ #ifndef RSTRUCT_LEN
944
+ # define RSTRUCT_LEN(x) RSTRUCT(x)->len
945
+ #endif
946
+ #ifndef RSTRUCT_PTR
947
+ # define RSTRUCT_PTR(x) RSTRUCT(x)->ptr
948
+ #endif
949
+
950
+
951
+
952
+ /*
953
+ * Need to be very careful about how these macros are defined, especially
954
+ * when compiling C++ code or C code with an ANSI C compiler.
955
+ *
956
+ * VALUEFUNC(f) is a macro used to typecast a C function that implements
957
+ * a Ruby method so that it can be passed as an argument to API functions
958
+ * like rb_define_method() and rb_define_singleton_method().
959
+ *
960
+ * VOIDFUNC(f) is a macro used to typecast a C function that implements
961
+ * either the "mark" or "free" stuff for a Ruby Data object, so that it
962
+ * can be passed as an argument to API functions like Data_Wrap_Struct()
963
+ * and Data_Make_Struct().
964
+ */
965
+
966
+ #ifdef __cplusplus
967
+ # ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
968
+ # define PROTECTFUNC(f) ((VALUE (*)()) f)
969
+ # define VALUEFUNC(f) ((VALUE (*)()) f)
970
+ # define VOIDFUNC(f) ((void (*)()) f)
971
+ # else
972
+ # ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
973
+ # define PROTECTFUNC(f) ((VALUE (*)()) f)
974
+ # define VALUEFUNC(f) ((VALUE (*)()) f)
975
+ # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
976
+ # else /* These definitions should work for Ruby 1.7+ */
977
+ # define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
978
+ # define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
979
+ # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
980
+ # endif
981
+ # endif
982
+ #else
983
+ # define VALUEFUNC(f) (f)
984
+ # define VOIDFUNC(f) (f)
985
+ #endif
986
+
987
+ /* Don't use for expressions have side effect */
988
+ #ifndef RB_STRING_VALUE
989
+ #define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s)))
990
+ #endif
991
+ #ifndef StringValue
992
+ #define StringValue(s) RB_STRING_VALUE(s)
993
+ #endif
994
+ #ifndef StringValuePtr
995
+ #define StringValuePtr(s) RSTRING_PTR(RB_STRING_VALUE(s))
996
+ #endif
997
+ #ifndef StringValueLen
998
+ #define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s))
999
+ #endif
1000
+ #ifndef SafeStringValue
1001
+ #define SafeStringValue(v) do {\
1002
+ StringValue(v);\
1003
+ rb_check_safe_str(v);\
1004
+ } while (0)
1005
+ #endif
1006
+
1007
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
1008
+ #define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1)
1009
+ #define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
1010
+ #endif
1011
+
1012
+ static VALUE _mSWIG = Qnil;
1013
+
1014
+ /* -----------------------------------------------------------------------------
1015
+ * error manipulation
1016
+ * ----------------------------------------------------------------------------- */
1017
+
1018
+
1019
+ /* Define some additional error types */
1020
+ #define SWIG_ObjectPreviouslyDeletedError -100
1021
+
1022
+
1023
+ /* Define custom exceptions for errors that do not map to existing Ruby
1024
+ exceptions. Note this only works for C++ since a global cannot be
1025
+ initialized by a function in C. For C, fallback to rb_eRuntimeError.*/
1026
+
1027
+ SWIGINTERN VALUE
1028
+ getNullReferenceError(void) {
1029
+ static int init = 0;
1030
+ static VALUE rb_eNullReferenceError ;
1031
+ if (!init) {
1032
+ init = 1;
1033
+ rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError);
1034
+ }
1035
+ return rb_eNullReferenceError;
1036
+ }
1037
+
1038
+ SWIGINTERN VALUE
1039
+ getObjectPreviouslyDeletedError(void) {
1040
+ static int init = 0;
1041
+ static VALUE rb_eObjectPreviouslyDeleted ;
1042
+ if (!init) {
1043
+ init = 1;
1044
+ rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError);
1045
+ }
1046
+ return rb_eObjectPreviouslyDeleted;
1047
+ }
1048
+
1049
+
1050
+ SWIGINTERN VALUE
1051
+ SWIG_Ruby_ErrorType(int SWIG_code) {
1052
+ VALUE type;
1053
+ switch (SWIG_code) {
1054
+ case SWIG_MemoryError:
1055
+ type = rb_eNoMemError;
1056
+ break;
1057
+ case SWIG_IOError:
1058
+ type = rb_eIOError;
1059
+ break;
1060
+ case SWIG_RuntimeError:
1061
+ type = rb_eRuntimeError;
1062
+ break;
1063
+ case SWIG_IndexError:
1064
+ type = rb_eIndexError;
1065
+ break;
1066
+ case SWIG_TypeError:
1067
+ type = rb_eTypeError;
1068
+ break;
1069
+ case SWIG_DivisionByZero:
1070
+ type = rb_eZeroDivError;
1071
+ break;
1072
+ case SWIG_OverflowError:
1073
+ type = rb_eRangeError;
1074
+ break;
1075
+ case SWIG_SyntaxError:
1076
+ type = rb_eSyntaxError;
1077
+ break;
1078
+ case SWIG_ValueError:
1079
+ type = rb_eArgError;
1080
+ break;
1081
+ case SWIG_SystemError:
1082
+ type = rb_eFatal;
1083
+ break;
1084
+ case SWIG_AttributeError:
1085
+ type = rb_eRuntimeError;
1086
+ break;
1087
+ case SWIG_NullReferenceError:
1088
+ type = getNullReferenceError();
1089
+ break;
1090
+ case SWIG_ObjectPreviouslyDeletedError:
1091
+ type = getObjectPreviouslyDeletedError();
1092
+ break;
1093
+ case SWIG_UnknownError:
1094
+ type = rb_eRuntimeError;
1095
+ break;
1096
+ default:
1097
+ type = rb_eRuntimeError;
1098
+ }
1099
+ return type;
1100
+ }
1101
+
1102
+
1103
+ /* This function is called when a user inputs a wrong argument to
1104
+ a method.
1105
+ */
1106
+ SWIGINTERN
1107
+ const char* Ruby_Format_TypeError( const char* msg,
1108
+ const char* type,
1109
+ const char* name,
1110
+ const int argn,
1111
+ VALUE input )
1112
+ {
1113
+ char buf[128];
1114
+ VALUE str;
1115
+ VALUE asStr;
1116
+ if ( msg && *msg )
1117
+ {
1118
+ str = rb_str_new2(msg);
1119
+ }
1120
+ else
1121
+ {
1122
+ str = rb_str_new(NULL, 0);
1123
+ }
1124
+
1125
+ str = rb_str_cat2( str, "Expected argument " );
1126
+ sprintf( buf, "%d of type ", argn-1 );
1127
+ str = rb_str_cat2( str, buf );
1128
+ str = rb_str_cat2( str, type );
1129
+ str = rb_str_cat2( str, ", but got " );
1130
+ str = rb_str_cat2( str, rb_obj_classname(input) );
1131
+ str = rb_str_cat2( str, " " );
1132
+ asStr = rb_inspect(input);
1133
+ if ( RSTRING_LEN(asStr) > 30 )
1134
+ {
1135
+ str = rb_str_cat( str, StringValuePtr(asStr), 30 );
1136
+ str = rb_str_cat2( str, "..." );
1137
+ }
1138
+ else
1139
+ {
1140
+ str = rb_str_append( str, asStr );
1141
+ }
1142
+
1143
+ if ( name )
1144
+ {
1145
+ str = rb_str_cat2( str, "\n\tin SWIG method '" );
1146
+ str = rb_str_cat2( str, name );
1147
+ str = rb_str_cat2( str, "'" );
1148
+ }
1149
+
1150
+ return StringValuePtr( str );
1151
+ }
1152
+
1153
+ /* This function is called when an overloaded method fails */
1154
+ SWIGINTERN
1155
+ void Ruby_Format_OverloadedError(
1156
+ const int argc,
1157
+ const int maxargs,
1158
+ const char* method,
1159
+ const char* prototypes
1160
+ )
1161
+ {
1162
+ const char* msg = "Wrong # of arguments";
1163
+ if ( argc <= maxargs ) msg = "Wrong arguments";
1164
+ rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n"
1165
+ "Possible C/C++ prototypes are:\n%s",
1166
+ msg, method, prototypes);
1167
+ }
1168
+
1169
+ /* -----------------------------------------------------------------------------
1170
+ * rubytracking.swg
1171
+ *
1172
+ * This file contains support for tracking mappings from
1173
+ * Ruby objects to C++ objects. This functionality is needed
1174
+ * to implement mark functions for Ruby's mark and sweep
1175
+ * garbage collector.
1176
+ * ----------------------------------------------------------------------------- */
1177
+
1178
+ #ifdef __cplusplus
1179
+ extern "C" {
1180
+ #endif
1181
+
1182
+ /* Ruby 1.8 actually assumes the first case. */
1183
+ #if SIZEOF_VOIDP == SIZEOF_LONG
1184
+ # define SWIG2NUM(v) LONG2NUM((unsigned long)v)
1185
+ # define NUM2SWIG(x) (unsigned long)NUM2LONG(x)
1186
+ #elif SIZEOF_VOIDP == SIZEOF_LONG_LONG
1187
+ # define SWIG2NUM(v) LL2NUM((unsigned long long)v)
1188
+ # define NUM2SWIG(x) (unsigned long long)NUM2LL(x)
1189
+ #else
1190
+ # error sizeof(void*) is not the same as long or long long
1191
+ #endif
1192
+
1193
+
1194
+ /* Global Ruby hash table to store Trackings from C/C++
1195
+ structs to Ruby Objects.
1196
+ */
1197
+ static VALUE swig_ruby_trackings = Qnil;
1198
+
1199
+ /* Global variable that stores a reference to the ruby
1200
+ hash table delete function. */
1201
+ static ID swig_ruby_hash_delete;
1202
+
1203
+ /* Setup a Ruby hash table to store Trackings */
1204
+ SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
1205
+ /* Create a ruby hash table to store Trackings from C++
1206
+ objects to Ruby objects. */
1207
+
1208
+ /* Try to see if some other .so has already created a
1209
+ tracking hash table, which we keep hidden in an instance var
1210
+ in the SWIG module.
1211
+ This is done to allow multiple DSOs to share the same
1212
+ tracking table.
1213
+ */
1214
+ ID trackings_id = rb_intern( "@__trackings__" );
1215
+ VALUE verbose = rb_gv_get("VERBOSE");
1216
+ rb_gv_set("VERBOSE", Qfalse);
1217
+ swig_ruby_trackings = rb_ivar_get( _mSWIG, trackings_id );
1218
+ rb_gv_set("VERBOSE", verbose);
1219
+
1220
+ /* No, it hasn't. Create one ourselves */
1221
+ if ( swig_ruby_trackings == Qnil )
1222
+ {
1223
+ swig_ruby_trackings = rb_hash_new();
1224
+ rb_ivar_set( _mSWIG, trackings_id, swig_ruby_trackings );
1225
+ }
1226
+
1227
+ /* Now store a reference to the hash table delete function
1228
+ so that we only have to look it up once.*/
1229
+ swig_ruby_hash_delete = rb_intern("delete");
1230
+ }
1231
+
1232
+ /* Get a Ruby number to reference a pointer */
1233
+ SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) {
1234
+ /* We cast the pointer to an unsigned long
1235
+ and then store a reference to it using
1236
+ a Ruby number object. */
1237
+
1238
+ /* Convert the pointer to a Ruby number */
1239
+ return SWIG2NUM(ptr);
1240
+ }
1241
+
1242
+ /* Get a Ruby number to reference an object */
1243
+ SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) {
1244
+ /* We cast the object to an unsigned long
1245
+ and then store a reference to it using
1246
+ a Ruby number object. */
1247
+
1248
+ /* Convert the Object to a Ruby number */
1249
+ return SWIG2NUM(object);
1250
+ }
1251
+
1252
+ /* Get a Ruby object from a previously stored reference */
1253
+ SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) {
1254
+ /* The provided Ruby number object is a reference
1255
+ to the Ruby object we want.*/
1256
+
1257
+ /* Convert the Ruby number to a Ruby object */
1258
+ return NUM2SWIG(reference);
1259
+ }
1260
+
1261
+ /* Add a Tracking from a C/C++ struct to a Ruby object */
1262
+ SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) {
1263
+ /* In a Ruby hash table we store the pointer and
1264
+ the associated Ruby object. The trick here is
1265
+ that we cannot store the Ruby object directly - if
1266
+ we do then it cannot be garbage collected. So
1267
+ instead we typecast it as a unsigned long and
1268
+ convert it to a Ruby number object.*/
1269
+
1270
+ /* Get a reference to the pointer as a Ruby number */
1271
+ VALUE key = SWIG_RubyPtrToReference(ptr);
1272
+
1273
+ /* Get a reference to the Ruby object as a Ruby number */
1274
+ VALUE value = SWIG_RubyObjectToReference(object);
1275
+
1276
+ /* Store the mapping to the global hash table. */
1277
+ rb_hash_aset(swig_ruby_trackings, key, value);
1278
+ }
1279
+
1280
+ /* Get the Ruby object that owns the specified C/C++ struct */
1281
+ SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
1282
+ /* Get a reference to the pointer as a Ruby number */
1283
+ VALUE key = SWIG_RubyPtrToReference(ptr);
1284
+
1285
+ /* Now lookup the value stored in the global hash table */
1286
+ VALUE value = rb_hash_aref(swig_ruby_trackings, key);
1287
+
1288
+ if (value == Qnil) {
1289
+ /* No object exists - return nil. */
1290
+ return Qnil;
1291
+ }
1292
+ else {
1293
+ /* Convert this value to Ruby object */
1294
+ return SWIG_RubyReferenceToObject(value);
1295
+ }
1296
+ }
1297
+
1298
+ /* Remove a Tracking from a C/C++ struct to a Ruby object. It
1299
+ is very important to remove objects once they are destroyed
1300
+ since the same memory address may be reused later to create
1301
+ a new object. */
1302
+ SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
1303
+ /* Get a reference to the pointer as a Ruby number */
1304
+ VALUE key = SWIG_RubyPtrToReference(ptr);
1305
+
1306
+ /* Delete the object from the hash table by calling Ruby's
1307
+ do this we need to call the Hash.delete method.*/
1308
+ rb_funcall(swig_ruby_trackings, swig_ruby_hash_delete, 1, key);
1309
+ }
1310
+
1311
+ /* This is a helper method that unlinks a Ruby object from its
1312
+ underlying C++ object. This is needed if the lifetime of the
1313
+ Ruby object is longer than the C++ object */
1314
+ SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
1315
+ VALUE object = SWIG_RubyInstanceFor(ptr);
1316
+
1317
+ if (object != Qnil) {
1318
+ DATA_PTR(object) = 0;
1319
+ }
1320
+ }
1321
+
1322
+
1323
+ #ifdef __cplusplus
1324
+ }
1325
+ #endif
1326
+
1327
+ /* -----------------------------------------------------------------------------
1328
+ * Ruby API portion that goes into the runtime
1329
+ * ----------------------------------------------------------------------------- */
1330
+
1331
+ #ifdef __cplusplus
1332
+ extern "C" {
1333
+ #endif
1334
+
1335
+ SWIGINTERN VALUE
1336
+ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
1337
+ if (NIL_P(target)) {
1338
+ target = o;
1339
+ } else {
1340
+ if (TYPE(target) != T_ARRAY) {
1341
+ VALUE o2 = target;
1342
+ target = rb_ary_new();
1343
+ rb_ary_push(target, o2);
1344
+ }
1345
+ rb_ary_push(target, o);
1346
+ }
1347
+ return target;
1348
+ }
1349
+
1350
+ /* For ruby1.8.4 and earlier. */
1351
+ #ifndef RUBY_INIT_STACK
1352
+ RUBY_EXTERN void Init_stack(VALUE* addr);
1353
+ # define RUBY_INIT_STACK \
1354
+ VALUE variable_in_this_stack_frame; \
1355
+ Init_stack(&variable_in_this_stack_frame);
1356
+ #endif
1357
+
1358
+
1359
+ #ifdef __cplusplus
1360
+ }
1361
+ #endif
1362
+
1363
+
1364
+ /* -----------------------------------------------------------------------------
1365
+ * rubyrun.swg
1366
+ *
1367
+ * This file contains the runtime support for Ruby modules
1368
+ * and includes code for managing global variables and pointer
1369
+ * type checking.
1370
+ * ----------------------------------------------------------------------------- */
1371
+
1372
+ /* For backward compatibility only */
1373
+ #define SWIG_POINTER_EXCEPTION 0
1374
+
1375
+ /* for raw pointers */
1376
+ #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1377
+ #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1378
+ #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags)
1379
+ #define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own)
1380
+ #define swig_owntype ruby_owntype
1381
+
1382
+ /* for raw packed data */
1383
+ #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
1384
+ #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type)
1385
+
1386
+ /* for class or struct pointers */
1387
+ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1388
+ #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1389
+
1390
+ /* for C or C++ function pointers */
1391
+ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0)
1392
+ #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0)
1393
+
1394
+ /* for C++ member pointers, ie, member methods */
1395
+ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty)
1396
+ #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type)
1397
+
1398
+
1399
+ /* Runtime API */
1400
+
1401
+ #define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule()
1402
+ #define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer)
1403
+
1404
+
1405
+ /* Error manipulation */
1406
+
1407
+ #define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code)
1408
+ #define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg)
1409
+ #define SWIG_fail goto fail
1410
+
1411
+
1412
+ /* Ruby-specific SWIG API */
1413
+
1414
+ #define SWIG_InitRuntime() SWIG_Ruby_InitRuntime()
1415
+ #define SWIG_define_class(ty) SWIG_Ruby_define_class(ty)
1416
+ #define SWIG_NewClassInstance(value, ty) SWIG_Ruby_NewClassInstance(value, ty)
1417
+ #define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value)
1418
+ #define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty)
1419
+
1420
+ #include "assert.h"
1421
+
1422
+ /* -----------------------------------------------------------------------------
1423
+ * pointers/data manipulation
1424
+ * ----------------------------------------------------------------------------- */
1425
+
1426
+ #ifdef __cplusplus
1427
+ extern "C" {
1428
+ #endif
1429
+
1430
+ typedef struct {
1431
+ VALUE klass;
1432
+ VALUE mImpl;
1433
+ void (*mark)(void *);
1434
+ void (*destroy)(void *);
1435
+ int trackObjects;
1436
+ } swig_class;
1437
+
1438
+
1439
+ /* Global pointer used to keep some internal SWIG stuff */
1440
+ static VALUE _cSWIG_Pointer = Qnil;
1441
+ static VALUE swig_runtime_data_type_pointer = Qnil;
1442
+
1443
+ /* Global IDs used to keep some internal SWIG stuff */
1444
+ static ID swig_arity_id = 0;
1445
+ static ID swig_call_id = 0;
1446
+
1447
+ /*
1448
+ If your swig extension is to be run within an embedded ruby and has
1449
+ director callbacks, you should set -DRUBY_EMBEDDED during compilation.
1450
+ This will reset ruby's stack frame on each entry point from the main
1451
+ program the first time a virtual director function is invoked (in a
1452
+ non-recursive way).
1453
+ If this is not done, you run the risk of Ruby trashing the stack.
1454
+ */
1455
+
1456
+ #ifdef RUBY_EMBEDDED
1457
+
1458
+ # define SWIG_INIT_STACK \
1459
+ if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \
1460
+ ++swig_virtual_calls;
1461
+ # define SWIG_RELEASE_STACK --swig_virtual_calls;
1462
+ # define Ruby_DirectorTypeMismatchException(x) \
1463
+ rb_raise( rb_eTypeError, "%s", x ); return c_result;
1464
+
1465
+ static unsigned int swig_virtual_calls = 0;
1466
+
1467
+ #else /* normal non-embedded extension */
1468
+
1469
+ # define SWIG_INIT_STACK
1470
+ # define SWIG_RELEASE_STACK
1471
+ # define Ruby_DirectorTypeMismatchException(x) \
1472
+ throw Swig::DirectorTypeMismatchException( x );
1473
+
1474
+ #endif /* RUBY_EMBEDDED */
1475
+
1476
+
1477
+ SWIGRUNTIME VALUE
1478
+ getExceptionClass(void) {
1479
+ static int init = 0;
1480
+ static VALUE rubyExceptionClass ;
1481
+ if (!init) {
1482
+ init = 1;
1483
+ rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception"));
1484
+ }
1485
+ return rubyExceptionClass;
1486
+ }
1487
+
1488
+ /* This code checks to see if the Ruby object being raised as part
1489
+ of an exception inherits from the Ruby class Exception. If so,
1490
+ the object is simply returned. If not, then a new Ruby exception
1491
+ object is created and that will be returned to Ruby.*/
1492
+ SWIGRUNTIME VALUE
1493
+ SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) {
1494
+ VALUE exceptionClass = getExceptionClass();
1495
+ if (rb_obj_is_kind_of(obj, exceptionClass)) {
1496
+ return obj;
1497
+ } else {
1498
+ return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj));
1499
+ }
1500
+ }
1501
+
1502
+ /* Initialize Ruby runtime support */
1503
+ SWIGRUNTIME void
1504
+ SWIG_Ruby_InitRuntime(void)
1505
+ {
1506
+ if (_mSWIG == Qnil) {
1507
+ _mSWIG = rb_define_module("SWIG");
1508
+ swig_call_id = rb_intern("call");
1509
+ swig_arity_id = rb_intern("arity");
1510
+ }
1511
+ }
1512
+
1513
+ /* Define Ruby class for C type */
1514
+ SWIGRUNTIME void
1515
+ SWIG_Ruby_define_class(swig_type_info *type)
1516
+ {
1517
+ VALUE klass;
1518
+ char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1519
+ sprintf(klass_name, "TYPE%s", type->name);
1520
+ if (NIL_P(_cSWIG_Pointer)) {
1521
+ _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
1522
+ rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
1523
+ }
1524
+ klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
1525
+ free((void *) klass_name);
1526
+ }
1527
+
1528
+ /* Create a new pointer object */
1529
+ SWIGRUNTIME VALUE
1530
+ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1531
+ {
1532
+ int own = flags & SWIG_POINTER_OWN;
1533
+ int track;
1534
+ char *klass_name;
1535
+ swig_class *sklass;
1536
+ VALUE klass;
1537
+ VALUE obj;
1538
+
1539
+ if (!ptr)
1540
+ return Qnil;
1541
+
1542
+ if (type->clientdata) {
1543
+ sklass = (swig_class *) type->clientdata;
1544
+
1545
+ /* Are we tracking this class and have we already returned this Ruby object? */
1546
+ track = sklass->trackObjects;
1547
+ if (track) {
1548
+ obj = SWIG_RubyInstanceFor(ptr);
1549
+
1550
+ /* Check the object's type and make sure it has the correct type.
1551
+ It might not in cases where methods do things like
1552
+ downcast methods. */
1553
+ if (obj != Qnil) {
1554
+ VALUE value = rb_iv_get(obj, "@__swigtype__");
1555
+ char* type_name = RSTRING_PTR(value);
1556
+
1557
+ if (strcmp(type->name, type_name) == 0) {
1558
+ return obj;
1559
+ }
1560
+ }
1561
+ }
1562
+
1563
+ /* Create a new Ruby object */
1564
+ obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark),
1565
+ ( own ? VOIDFUNC(sklass->destroy) :
1566
+ (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )
1567
+ ), ptr);
1568
+
1569
+ /* If tracking is on for this class then track this object. */
1570
+ if (track) {
1571
+ SWIG_RubyAddTracking(ptr, obj);
1572
+ }
1573
+ } else {
1574
+ klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1575
+ sprintf(klass_name, "TYPE%s", type->name);
1576
+ klass = rb_const_get(_mSWIG, rb_intern(klass_name));
1577
+ free((void *) klass_name);
1578
+ obj = Data_Wrap_Struct(klass, 0, 0, ptr);
1579
+ }
1580
+ rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
1581
+
1582
+ return obj;
1583
+ }
1584
+
1585
+ /* Create a new class instance (always owned) */
1586
+ SWIGRUNTIME VALUE
1587
+ SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
1588
+ {
1589
+ VALUE obj;
1590
+ swig_class *sklass = (swig_class *) type->clientdata;
1591
+ obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
1592
+ rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
1593
+ return obj;
1594
+ }
1595
+
1596
+ /* Get type mangle from class name */
1597
+ SWIGRUNTIMEINLINE char *
1598
+ SWIG_Ruby_MangleStr(VALUE obj)
1599
+ {
1600
+ VALUE stype = rb_iv_get(obj, "@__swigtype__");
1601
+ return StringValuePtr(stype);
1602
+ }
1603
+
1604
+ /* Acquire a pointer value */
1605
+ typedef void (*ruby_owntype)(void*);
1606
+
1607
+ SWIGRUNTIME ruby_owntype
1608
+ SWIG_Ruby_AcquirePtr(VALUE obj, ruby_owntype own) {
1609
+ if (obj) {
1610
+ ruby_owntype oldown = RDATA(obj)->dfree;
1611
+ RDATA(obj)->dfree = own;
1612
+ return oldown;
1613
+ } else {
1614
+ return 0;
1615
+ }
1616
+ }
1617
+
1618
+ /* Convert a pointer value */
1619
+ SWIGRUNTIME int
1620
+ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, ruby_owntype *own)
1621
+ {
1622
+ char *c;
1623
+ swig_cast_info *tc;
1624
+ void *vptr = 0;
1625
+
1626
+ /* Grab the pointer */
1627
+ if (NIL_P(obj)) {
1628
+ *ptr = 0;
1629
+ return SWIG_OK;
1630
+ } else {
1631
+ if (TYPE(obj) != T_DATA) {
1632
+ return SWIG_ERROR;
1633
+ }
1634
+ Data_Get_Struct(obj, void, vptr);
1635
+ }
1636
+
1637
+ if (own) *own = RDATA(obj)->dfree;
1638
+
1639
+ /* Check to see if the input object is giving up ownership
1640
+ of the underlying C struct or C++ object. If so then we
1641
+ need to reset the destructor since the Ruby object no
1642
+ longer owns the underlying C++ object.*/
1643
+ if (flags & SWIG_POINTER_DISOWN) {
1644
+ /* Is tracking on for this class? */
1645
+ int track = 0;
1646
+ if (ty && ty->clientdata) {
1647
+ swig_class *sklass = (swig_class *) ty->clientdata;
1648
+ track = sklass->trackObjects;
1649
+ }
1650
+
1651
+ if (track) {
1652
+ /* We are tracking objects for this class. Thus we change the destructor
1653
+ * to SWIG_RubyRemoveTracking. This allows us to
1654
+ * remove the mapping from the C++ to Ruby object
1655
+ * when the Ruby object is garbage collected. If we don't
1656
+ * do this, then it is possible we will return a reference
1657
+ * to a Ruby object that no longer exists thereby crashing Ruby. */
1658
+ RDATA(obj)->dfree = SWIG_RubyRemoveTracking;
1659
+ } else {
1660
+ RDATA(obj)->dfree = 0;
1661
+ }
1662
+ }
1663
+
1664
+ /* Do type-checking if type info was provided */
1665
+ if (ty) {
1666
+ if (ty->clientdata) {
1667
+ if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) {
1668
+ if (vptr == 0) {
1669
+ /* The object has already been deleted */
1670
+ return SWIG_ObjectPreviouslyDeletedError;
1671
+ }
1672
+ *ptr = vptr;
1673
+ return SWIG_OK;
1674
+ }
1675
+ }
1676
+ if ((c = SWIG_MangleStr(obj)) == NULL) {
1677
+ return SWIG_ERROR;
1678
+ }
1679
+ tc = SWIG_TypeCheck(c, ty);
1680
+ if (!tc) {
1681
+ return SWIG_ERROR;
1682
+ } else {
1683
+ int newmemory = 0;
1684
+ *ptr = SWIG_TypeCast(tc, vptr, &newmemory);
1685
+ assert(!newmemory); /* newmemory handling not yet implemented */
1686
+ }
1687
+ } else {
1688
+ *ptr = vptr;
1689
+ }
1690
+
1691
+ return SWIG_OK;
1692
+ }
1693
+
1694
+ /* Check convert */
1695
+ SWIGRUNTIMEINLINE int
1696
+ SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
1697
+ {
1698
+ char *c = SWIG_MangleStr(obj);
1699
+ if (!c) return 0;
1700
+ return SWIG_TypeCheck(c,ty) != 0;
1701
+ }
1702
+
1703
+ SWIGRUNTIME VALUE
1704
+ SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
1705
+ char result[1024];
1706
+ char *r = result;
1707
+ if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
1708
+ *(r++) = '_';
1709
+ r = SWIG_PackData(r, ptr, sz);
1710
+ strcpy(r, type->name);
1711
+ return rb_str_new2(result);
1712
+ }
1713
+
1714
+ /* Convert a packed value value */
1715
+ SWIGRUNTIME int
1716
+ SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
1717
+ swig_cast_info *tc;
1718
+ const char *c;
1719
+
1720
+ if (TYPE(obj) != T_STRING) goto type_error;
1721
+ c = StringValuePtr(obj);
1722
+ /* Pointer values must start with leading underscore */
1723
+ if (*c != '_') goto type_error;
1724
+ c++;
1725
+ c = SWIG_UnpackData(c, ptr, sz);
1726
+ if (ty) {
1727
+ tc = SWIG_TypeCheck(c, ty);
1728
+ if (!tc) goto type_error;
1729
+ }
1730
+ return SWIG_OK;
1731
+
1732
+ type_error:
1733
+ return SWIG_ERROR;
1734
+ }
1735
+
1736
+ SWIGRUNTIME swig_module_info *
1737
+ SWIG_Ruby_GetModule(void)
1738
+ {
1739
+ VALUE pointer;
1740
+ swig_module_info *ret = 0;
1741
+ VALUE verbose = rb_gv_get("VERBOSE");
1742
+
1743
+ /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */
1744
+ rb_gv_set("VERBOSE", Qfalse);
1745
+
1746
+ /* first check if pointer already created */
1747
+ pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1748
+ if (pointer != Qnil) {
1749
+ Data_Get_Struct(pointer, swig_module_info, ret);
1750
+ }
1751
+
1752
+ /* reinstate warnings */
1753
+ rb_gv_set("VERBOSE", verbose);
1754
+ return ret;
1755
+ }
1756
+
1757
+ SWIGRUNTIME void
1758
+ SWIG_Ruby_SetModule(swig_module_info *pointer)
1759
+ {
1760
+ /* register a new class */
1761
+ VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
1762
+ /* create and store the structure pointer to a global variable */
1763
+ swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
1764
+ rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
1765
+ }
1766
+
1767
+ /* This function can be used to check whether a proc or method or similarly
1768
+ callable function has been passed. Usually used in a %typecheck, like:
1769
+
1770
+ %typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) {
1771
+ $result = SWIG_Ruby_isCallable( $input );
1772
+ }
1773
+ */
1774
+ SWIGINTERN
1775
+ int SWIG_Ruby_isCallable( VALUE proc )
1776
+ {
1777
+ if ( rb_respond_to( proc, swig_call_id ) == Qtrue )
1778
+ return 1;
1779
+ return 0;
1780
+ }
1781
+
1782
+ /* This function can be used to check the arity (number of arguments)
1783
+ a proc or method can take. Usually used in a %typecheck.
1784
+ Valid arities will be that equal to minimal or those < 0
1785
+ which indicate a variable number of parameters at the end.
1786
+ */
1787
+ SWIGINTERN
1788
+ int SWIG_Ruby_arity( VALUE proc, int minimal )
1789
+ {
1790
+ if ( rb_respond_to( proc, swig_arity_id ) == Qtrue )
1791
+ {
1792
+ VALUE num = rb_funcall( proc, swig_arity_id, 0 );
1793
+ int arity = NUM2INT(num);
1794
+ if ( arity < 0 && (arity+1) < -minimal ) return 1;
1795
+ if ( arity == minimal ) return 1;
1796
+ return 1;
1797
+ }
1798
+ return 0;
1799
+ }
1800
+
1801
+
1802
+ #ifdef __cplusplus
1803
+ }
1804
+ #endif
1805
+
1806
+
1807
+
1808
+ #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1809
+
1810
+ #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1811
+
1812
+
1813
+
1814
+ /* -------- TYPES TABLE (BEGIN) -------- */
1815
+
1816
+ #define SWIGTYPE_p_Config swig_types[0]
1817
+ #define SWIGTYPE_p_Context swig_types[1]
1818
+ #define SWIGTYPE_p_DebugLog swig_types[2]
1819
+ #define SWIGTYPE_p_DebugLogger swig_types[3]
1820
+ #define SWIGTYPE_p_Event swig_types[4]
1821
+ #define SWIGTYPE_p_FILE swig_types[5]
1822
+ #define SWIGTYPE_p_FileReporter swig_types[6]
1823
+ #define SWIGTYPE_p_Metadata swig_types[7]
1824
+ #define SWIGTYPE_p_Reporter swig_types[8]
1825
+ #define SWIGTYPE_p_SslReporter swig_types[9]
1826
+ #define SWIGTYPE_p_UdpReporter swig_types[10]
1827
+ #define SWIGTYPE_p_char swig_types[11]
1828
+ #define SWIGTYPE_p_oboe_metadata_t swig_types[12]
1829
+ static swig_type_info *swig_types[14];
1830
+ static swig_module_info swig_module = {swig_types, 13, 0, 0, 0, 0};
1831
+ #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1832
+ #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1833
+
1834
+ /* -------- TYPES TABLE (END) -------- */
1835
+
1836
+ #define SWIG_init Init_oboe_metal
1837
+ #define SWIG_name "Oboe_metal"
1838
+
1839
+ static VALUE mOboe_metal;
1840
+
1841
+ #define SWIG_RUBY_THREAD_BEGIN_BLOCK
1842
+ #define SWIG_RUBY_THREAD_END_BLOCK
1843
+
1844
+
1845
+ #define SWIGVERSION 0x020004
1846
+ #define SWIG_VERSION SWIGVERSION
1847
+
1848
+
1849
+ #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
1850
+ #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
1851
+
1852
+
1853
+ #include <stdexcept>
1854
+
1855
+
1856
+ #include "oboe.hpp"
1857
+
1858
+
1859
+ #include <limits.h>
1860
+ #if !defined(SWIG_NO_LLONG_MAX)
1861
+ # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
1862
+ # define LLONG_MAX __LONG_LONG_MAX__
1863
+ # define LLONG_MIN (-LLONG_MAX - 1LL)
1864
+ # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
1865
+ # endif
1866
+ #endif
1867
+
1868
+
1869
+ #define SWIG_From_long LONG2NUM
1870
+
1871
+
1872
+ SWIGINTERNINLINE VALUE
1873
+ SWIG_From_int (int value)
1874
+ {
1875
+ return SWIG_From_long (value);
1876
+ }
1877
+
1878
+
1879
+ #include <string>
1880
+
1881
+
1882
+ SWIGINTERN swig_type_info*
1883
+ SWIG_pchar_descriptor(void)
1884
+ {
1885
+ static int init = 0;
1886
+ static swig_type_info* info = 0;
1887
+ if (!init) {
1888
+ info = SWIG_TypeQuery("_p_char");
1889
+ init = 1;
1890
+ }
1891
+ return info;
1892
+ }
1893
+
1894
+
1895
+ SWIGINTERN int
1896
+ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
1897
+ {
1898
+ if (TYPE(obj) == T_STRING) {
1899
+ #if defined(StringValuePtr)
1900
+ char *cstr = StringValuePtr(obj);
1901
+ #else
1902
+ char *cstr = STR2CSTR(obj);
1903
+ #endif
1904
+ size_t size = RSTRING_LEN(obj) + 1;
1905
+ if (cptr) {
1906
+ if (alloc) {
1907
+ if (*alloc == SWIG_NEWOBJ) {
1908
+ *cptr = reinterpret_cast< char* >(memcpy((new char[size]), cstr, sizeof(char)*(size)));
1909
+ } else {
1910
+ *cptr = cstr;
1911
+ *alloc = SWIG_OLDOBJ;
1912
+ }
1913
+ }
1914
+ }
1915
+ if (psize) *psize = size;
1916
+ return SWIG_OK;
1917
+ } else {
1918
+ swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
1919
+ if (pchar_descriptor) {
1920
+ void* vptr = 0;
1921
+ if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
1922
+ if (cptr) *cptr = (char *)vptr;
1923
+ if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0;
1924
+ if (alloc) *alloc = SWIG_OLDOBJ;
1925
+ return SWIG_OK;
1926
+ }
1927
+ }
1928
+ }
1929
+ return SWIG_TypeError;
1930
+ }
1931
+
1932
+
1933
+ SWIGINTERN int
1934
+ SWIG_AsPtr_std_string (VALUE obj, std::string **val)
1935
+ {
1936
+ char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
1937
+ if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
1938
+ if (buf) {
1939
+ if (val) *val = new std::string(buf, size - 1);
1940
+ if (alloc == SWIG_NEWOBJ) delete[] buf;
1941
+ return SWIG_NEWOBJ;
1942
+ } else {
1943
+ if (val) *val = 0;
1944
+ return SWIG_OLDOBJ;
1945
+ }
1946
+ } else {
1947
+ static int init = 0;
1948
+ static swig_type_info* descriptor = 0;
1949
+ if (!init) {
1950
+ descriptor = SWIG_TypeQuery("std::string" " *");
1951
+ init = 1;
1952
+ }
1953
+ if (descriptor) {
1954
+ std::string *vptr;
1955
+ int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0);
1956
+ if (SWIG_IsOK(res) && val) *val = vptr;
1957
+ return res;
1958
+ }
1959
+ }
1960
+ return SWIG_ERROR;
1961
+ }
1962
+
1963
+
1964
+ SWIGINTERNINLINE VALUE
1965
+ SWIG_From_bool (bool value)
1966
+ {
1967
+ return value ? Qtrue : Qfalse;
1968
+ }
1969
+
1970
+
1971
+ SWIGINTERNINLINE VALUE
1972
+ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
1973
+ {
1974
+ if (carray) {
1975
+ if (size > LONG_MAX) {
1976
+ swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
1977
+ return pchar_descriptor ?
1978
+ SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : Qnil;
1979
+ } else {
1980
+ return rb_str_new(carray, static_cast< long >(size));
1981
+ }
1982
+ } else {
1983
+ return Qnil;
1984
+ }
1985
+ }
1986
+
1987
+
1988
+ SWIGINTERNINLINE VALUE
1989
+ SWIG_From_std_string (const std::string& s)
1990
+ {
1991
+ return SWIG_FromCharPtrAndSize(s.data(), s.size());
1992
+ }
1993
+
1994
+
1995
+ SWIGINTERN VALUE
1996
+ SWIG_ruby_failed(void)
1997
+ {
1998
+ return Qnil;
1999
+ }
2000
+
2001
+
2002
+ /*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2003
+ SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
2004
+ {
2005
+ VALUE obj = args[0];
2006
+ VALUE type = TYPE(obj);
2007
+ long *res = (long *)(args[1]);
2008
+ *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj);
2009
+ return obj;
2010
+ }
2011
+ /*@SWIG@*/
2012
+
2013
+ SWIGINTERN int
2014
+ SWIG_AsVal_long (VALUE obj, long* val)
2015
+ {
2016
+ VALUE type = TYPE(obj);
2017
+ if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
2018
+ long v;
2019
+ VALUE a[2];
2020
+ a[0] = obj;
2021
+ a[1] = (VALUE)(&v);
2022
+ if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
2023
+ if (val) *val = v;
2024
+ return SWIG_OK;
2025
+ }
2026
+ }
2027
+ return SWIG_TypeError;
2028
+ }
2029
+
2030
+
2031
+ SWIGINTERN int
2032
+ SWIG_AsVal_int (VALUE obj, int *val)
2033
+ {
2034
+ long v;
2035
+ int res = SWIG_AsVal_long (obj, &v);
2036
+ if (SWIG_IsOK(res)) {
2037
+ if ((v < INT_MIN || v > INT_MAX)) {
2038
+ return SWIG_OverflowError;
2039
+ } else {
2040
+ if (val) *val = static_cast< int >(v);
2041
+ }
2042
+ }
2043
+ return res;
2044
+ }
2045
+
2046
+
2047
+
2048
+
2049
+
2050
+ /*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2051
+ SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
2052
+ {
2053
+ VALUE obj = args[0];
2054
+ VALUE type = TYPE(obj);
2055
+ double *res = (double *)(args[1]);
2056
+ *res = NUM2DBL(obj);
2057
+ return obj;
2058
+ }
2059
+ /*@SWIG@*/
2060
+
2061
+ SWIGINTERN int
2062
+ SWIG_AsVal_double (VALUE obj, double *val)
2063
+ {
2064
+ VALUE type = TYPE(obj);
2065
+ if ((type == T_FLOAT) || (type == T_FIXNUM) || (type == T_BIGNUM)) {
2066
+ double v;
2067
+ VALUE a[2];
2068
+ a[0] = obj;
2069
+ a[1] = (VALUE)(&v);
2070
+ if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2DBL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
2071
+ if (val) *val = v;
2072
+ return SWIG_OK;
2073
+ }
2074
+ }
2075
+ return SWIG_TypeError;
2076
+ }
2077
+
2078
+ swig_class SwigClassMetadata;
2079
+
2080
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2081
+ SWIGINTERN VALUE
2082
+ _wrap_Metadata_allocate(VALUE self) {
2083
+ #else
2084
+ SWIGINTERN VALUE
2085
+ _wrap_Metadata_allocate(int argc, VALUE *argv, VALUE self) {
2086
+ #endif
2087
+
2088
+
2089
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Metadata);
2090
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2091
+ rb_obj_call_init(vresult, argc, argv);
2092
+ #endif
2093
+ return vresult;
2094
+ }
2095
+
2096
+
2097
+ SWIGINTERN VALUE
2098
+ _wrap_new_Metadata(int argc, VALUE *argv, VALUE self) {
2099
+ oboe_metadata_t *arg1 = (oboe_metadata_t *) 0 ;
2100
+ void *argp1 = 0 ;
2101
+ int res1 = 0 ;
2102
+ Metadata *result = 0 ;
2103
+
2104
+ if ((argc < 1) || (argc > 1)) {
2105
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2106
+ }
2107
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_oboe_metadata_t, 0 | 0 );
2108
+ if (!SWIG_IsOK(res1)) {
2109
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "oboe_metadata_t *","Metadata", 1, argv[0] ));
2110
+ }
2111
+ arg1 = reinterpret_cast< oboe_metadata_t * >(argp1);
2112
+ result = (Metadata *)new Metadata(arg1);
2113
+ DATA_PTR(self) = result;
2114
+ return self;
2115
+ fail:
2116
+ return Qnil;
2117
+ }
2118
+
2119
+
2120
+ SWIGINTERN void
2121
+ free_Metadata(Metadata *arg1) {
2122
+ delete arg1;
2123
+ }
2124
+
2125
+ SWIGINTERN VALUE
2126
+ _wrap_Metadata_fromString(int argc, VALUE *argv, VALUE self) {
2127
+ std::string arg1 ;
2128
+ Metadata *result = 0 ;
2129
+ VALUE vresult = Qnil;
2130
+
2131
+ if ((argc < 1) || (argc > 1)) {
2132
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2133
+ }
2134
+ {
2135
+ std::string *ptr = (std::string *)0;
2136
+ int res = SWIG_AsPtr_std_string(argv[0], &ptr);
2137
+ if (!SWIG_IsOK(res) || !ptr) {
2138
+ SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::string","Metadata::fromString", 1, argv[0] ));
2139
+ }
2140
+ arg1 = *ptr;
2141
+ if (SWIG_IsNewObj(res)) delete ptr;
2142
+ }
2143
+ result = (Metadata *)Metadata::fromString(arg1);
2144
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Metadata, SWIG_POINTER_OWN | 0 );
2145
+ return vresult;
2146
+ fail:
2147
+ return Qnil;
2148
+ }
2149
+
2150
+
2151
+ SWIGINTERN VALUE
2152
+ _wrap_Metadata_createEvent(int argc, VALUE *argv, VALUE self) {
2153
+ Metadata *arg1 = (Metadata *) 0 ;
2154
+ void *argp1 = 0 ;
2155
+ int res1 = 0 ;
2156
+ Event *result = 0 ;
2157
+ VALUE vresult = Qnil;
2158
+
2159
+ if ((argc < 0) || (argc > 0)) {
2160
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2161
+ }
2162
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Metadata, 0 | 0 );
2163
+ if (!SWIG_IsOK(res1)) {
2164
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Metadata *","createEvent", 1, self ));
2165
+ }
2166
+ arg1 = reinterpret_cast< Metadata * >(argp1);
2167
+ result = (Event *)(arg1)->createEvent();
2168
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_OWN | 0 );
2169
+ return vresult;
2170
+ fail:
2171
+ return Qnil;
2172
+ }
2173
+
2174
+
2175
+ SWIGINTERN VALUE
2176
+ _wrap_Metadata_makeRandom(int argc, VALUE *argv, VALUE self) {
2177
+ Metadata *result = 0 ;
2178
+ VALUE vresult = Qnil;
2179
+
2180
+ if ((argc < 0) || (argc > 0)) {
2181
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2182
+ }
2183
+ result = (Metadata *)Metadata::makeRandom();
2184
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Metadata, SWIG_POINTER_OWN | 0 );
2185
+ return vresult;
2186
+ fail:
2187
+ return Qnil;
2188
+ }
2189
+
2190
+
2191
+ SWIGINTERN VALUE
2192
+ _wrap_Metadata_copy(int argc, VALUE *argv, VALUE self) {
2193
+ Metadata *arg1 = (Metadata *) 0 ;
2194
+ void *argp1 = 0 ;
2195
+ int res1 = 0 ;
2196
+ Metadata *result = 0 ;
2197
+ VALUE vresult = Qnil;
2198
+
2199
+ if ((argc < 0) || (argc > 0)) {
2200
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2201
+ }
2202
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Metadata, 0 | 0 );
2203
+ if (!SWIG_IsOK(res1)) {
2204
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Metadata *","copy", 1, self ));
2205
+ }
2206
+ arg1 = reinterpret_cast< Metadata * >(argp1);
2207
+ result = (Metadata *)(arg1)->copy();
2208
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Metadata, SWIG_POINTER_OWN | 0 );
2209
+ return vresult;
2210
+ fail:
2211
+ return Qnil;
2212
+ }
2213
+
2214
+
2215
+ SWIGINTERN VALUE
2216
+ _wrap_Metadata_isValid(int argc, VALUE *argv, VALUE self) {
2217
+ Metadata *arg1 = (Metadata *) 0 ;
2218
+ void *argp1 = 0 ;
2219
+ int res1 = 0 ;
2220
+ bool result;
2221
+ VALUE vresult = Qnil;
2222
+
2223
+ if ((argc < 0) || (argc > 0)) {
2224
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2225
+ }
2226
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Metadata, 0 | 0 );
2227
+ if (!SWIG_IsOK(res1)) {
2228
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Metadata *","isValid", 1, self ));
2229
+ }
2230
+ arg1 = reinterpret_cast< Metadata * >(argp1);
2231
+ result = (bool)(arg1)->isValid();
2232
+ vresult = SWIG_From_bool(static_cast< bool >(result));
2233
+ return vresult;
2234
+ fail:
2235
+ return Qnil;
2236
+ }
2237
+
2238
+
2239
+ SWIGINTERN VALUE
2240
+ _wrap_Metadata_toString(int argc, VALUE *argv, VALUE self) {
2241
+ Metadata *arg1 = (Metadata *) 0 ;
2242
+ void *argp1 = 0 ;
2243
+ int res1 = 0 ;
2244
+ std::string result;
2245
+ VALUE vresult = Qnil;
2246
+
2247
+ if ((argc < 0) || (argc > 0)) {
2248
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2249
+ }
2250
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Metadata, 0 | 0 );
2251
+ if (!SWIG_IsOK(res1)) {
2252
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Metadata *","toString", 1, self ));
2253
+ }
2254
+ arg1 = reinterpret_cast< Metadata * >(argp1);
2255
+ result = (arg1)->toString();
2256
+ vresult = SWIG_From_std_string(static_cast< std::string >(result));
2257
+ return vresult;
2258
+ fail:
2259
+ return Qnil;
2260
+ }
2261
+
2262
+
2263
+ swig_class SwigClassContext;
2264
+
2265
+ SWIGINTERN VALUE
2266
+ _wrap_Context_setTracingMode(int argc, VALUE *argv, VALUE self) {
2267
+ int arg1 ;
2268
+ int val1 ;
2269
+ int ecode1 = 0 ;
2270
+
2271
+ if ((argc < 1) || (argc > 1)) {
2272
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2273
+ }
2274
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2275
+ if (!SWIG_IsOK(ecode1)) {
2276
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Context::setTracingMode", 1, argv[0] ));
2277
+ }
2278
+ arg1 = static_cast< int >(val1);
2279
+ Context::setTracingMode(arg1);
2280
+ return Qnil;
2281
+ fail:
2282
+ return Qnil;
2283
+ }
2284
+
2285
+
2286
+ SWIGINTERN VALUE
2287
+ _wrap_Context_setDefaultSampleRate(int argc, VALUE *argv, VALUE self) {
2288
+ int arg1 ;
2289
+ int val1 ;
2290
+ int ecode1 = 0 ;
2291
+
2292
+ if ((argc < 1) || (argc > 1)) {
2293
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2294
+ }
2295
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2296
+ if (!SWIG_IsOK(ecode1)) {
2297
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Context::setDefaultSampleRate", 1, argv[0] ));
2298
+ }
2299
+ arg1 = static_cast< int >(val1);
2300
+ Context::setDefaultSampleRate(arg1);
2301
+ return Qnil;
2302
+ fail:
2303
+ return Qnil;
2304
+ }
2305
+
2306
+
2307
+ SWIGINTERN VALUE
2308
+ _wrap_Context_sampleRequest(int argc, VALUE *argv, VALUE self) {
2309
+ std::string arg1 ;
2310
+ std::string arg2 ;
2311
+ std::string arg3 ;
2312
+ bool result;
2313
+ VALUE vresult = Qnil;
2314
+
2315
+ if ((argc < 3) || (argc > 3)) {
2316
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
2317
+ }
2318
+ {
2319
+ std::string *ptr = (std::string *)0;
2320
+ int res = SWIG_AsPtr_std_string(argv[0], &ptr);
2321
+ if (!SWIG_IsOK(res) || !ptr) {
2322
+ SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::string","Context::sampleRequest", 1, argv[0] ));
2323
+ }
2324
+ arg1 = *ptr;
2325
+ if (SWIG_IsNewObj(res)) delete ptr;
2326
+ }
2327
+ {
2328
+ std::string *ptr = (std::string *)0;
2329
+ int res = SWIG_AsPtr_std_string(argv[1], &ptr);
2330
+ if (!SWIG_IsOK(res) || !ptr) {
2331
+ SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::string","Context::sampleRequest", 2, argv[1] ));
2332
+ }
2333
+ arg2 = *ptr;
2334
+ if (SWIG_IsNewObj(res)) delete ptr;
2335
+ }
2336
+ {
2337
+ std::string *ptr = (std::string *)0;
2338
+ int res = SWIG_AsPtr_std_string(argv[2], &ptr);
2339
+ if (!SWIG_IsOK(res) || !ptr) {
2340
+ SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::string","Context::sampleRequest", 3, argv[2] ));
2341
+ }
2342
+ arg3 = *ptr;
2343
+ if (SWIG_IsNewObj(res)) delete ptr;
2344
+ }
2345
+ result = (bool)Context::sampleRequest(arg1,arg2,arg3);
2346
+ vresult = SWIG_From_bool(static_cast< bool >(result));
2347
+ return vresult;
2348
+ fail:
2349
+ return Qnil;
2350
+ }
2351
+
2352
+
2353
+ SWIGINTERN VALUE
2354
+ _wrap_Context_get(int argc, VALUE *argv, VALUE self) {
2355
+ oboe_metadata_t *result = 0 ;
2356
+ VALUE vresult = Qnil;
2357
+
2358
+ if ((argc < 0) || (argc > 0)) {
2359
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2360
+ }
2361
+ result = (oboe_metadata_t *)Context::get();
2362
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_oboe_metadata_t, 0 | 0 );
2363
+ return vresult;
2364
+ fail:
2365
+ return Qnil;
2366
+ }
2367
+
2368
+
2369
+ SWIGINTERN VALUE
2370
+ _wrap_Context_toString(int argc, VALUE *argv, VALUE self) {
2371
+ std::string result;
2372
+ VALUE vresult = Qnil;
2373
+
2374
+ if ((argc < 0) || (argc > 0)) {
2375
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2376
+ }
2377
+ result = Context::toString();
2378
+ vresult = SWIG_From_std_string(static_cast< std::string >(result));
2379
+ return vresult;
2380
+ fail:
2381
+ return Qnil;
2382
+ }
2383
+
2384
+
2385
+ SWIGINTERN VALUE
2386
+ _wrap_Context_set(int argc, VALUE *argv, VALUE self) {
2387
+ oboe_metadata_t *arg1 = (oboe_metadata_t *) 0 ;
2388
+ void *argp1 = 0 ;
2389
+ int res1 = 0 ;
2390
+
2391
+ if ((argc < 1) || (argc > 1)) {
2392
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2393
+ }
2394
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_oboe_metadata_t, 0 | 0 );
2395
+ if (!SWIG_IsOK(res1)) {
2396
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "oboe_metadata_t *","Context::set", 1, argv[0] ));
2397
+ }
2398
+ arg1 = reinterpret_cast< oboe_metadata_t * >(argp1);
2399
+ Context::set(arg1);
2400
+ return Qnil;
2401
+ fail:
2402
+ return Qnil;
2403
+ }
2404
+
2405
+
2406
+ SWIGINTERN VALUE
2407
+ _wrap_Context_fromString(int argc, VALUE *argv, VALUE self) {
2408
+ std::string arg1 ;
2409
+
2410
+ if ((argc < 1) || (argc > 1)) {
2411
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2412
+ }
2413
+ {
2414
+ std::string *ptr = (std::string *)0;
2415
+ int res = SWIG_AsPtr_std_string(argv[0], &ptr);
2416
+ if (!SWIG_IsOK(res) || !ptr) {
2417
+ SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::string","Context::fromString", 1, argv[0] ));
2418
+ }
2419
+ arg1 = *ptr;
2420
+ if (SWIG_IsNewObj(res)) delete ptr;
2421
+ }
2422
+ Context::fromString(arg1);
2423
+ return Qnil;
2424
+ fail:
2425
+ return Qnil;
2426
+ }
2427
+
2428
+
2429
+ SWIGINTERN VALUE
2430
+ _wrap_Context_copy(int argc, VALUE *argv, VALUE self) {
2431
+ Metadata *result = 0 ;
2432
+ VALUE vresult = Qnil;
2433
+
2434
+ if ((argc < 0) || (argc > 0)) {
2435
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2436
+ }
2437
+ result = (Metadata *)Context::copy();
2438
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Metadata, SWIG_POINTER_OWN | 0 );
2439
+ return vresult;
2440
+ fail:
2441
+ return Qnil;
2442
+ }
2443
+
2444
+
2445
+ SWIGINTERN VALUE
2446
+ _wrap_Context_clear(int argc, VALUE *argv, VALUE self) {
2447
+ if ((argc < 0) || (argc > 0)) {
2448
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2449
+ }
2450
+ Context::clear();
2451
+ return Qnil;
2452
+ fail:
2453
+ return Qnil;
2454
+ }
2455
+
2456
+
2457
+ SWIGINTERN VALUE
2458
+ _wrap_Context_isValid(int argc, VALUE *argv, VALUE self) {
2459
+ bool result;
2460
+ VALUE vresult = Qnil;
2461
+
2462
+ if ((argc < 0) || (argc > 0)) {
2463
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2464
+ }
2465
+ result = (bool)Context::isValid();
2466
+ vresult = SWIG_From_bool(static_cast< bool >(result));
2467
+ return vresult;
2468
+ fail:
2469
+ return Qnil;
2470
+ }
2471
+
2472
+
2473
+ SWIGINTERN VALUE
2474
+ _wrap_Context_init(int argc, VALUE *argv, VALUE self) {
2475
+ if ((argc < 0) || (argc > 0)) {
2476
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2477
+ }
2478
+ Context::init();
2479
+ return Qnil;
2480
+ fail:
2481
+ return Qnil;
2482
+ }
2483
+
2484
+
2485
+ SWIGINTERN VALUE
2486
+ _wrap_Context_disconnect(int argc, VALUE *argv, VALUE self) {
2487
+ Reporter *arg1 = (Reporter *) 0 ;
2488
+ void *argp1 = 0 ;
2489
+ int res1 = 0 ;
2490
+
2491
+ if ((argc < 1) || (argc > 1)) {
2492
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2493
+ }
2494
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Reporter, 0 | 0 );
2495
+ if (!SWIG_IsOK(res1)) {
2496
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Reporter *","Context::disconnect", 1, argv[0] ));
2497
+ }
2498
+ arg1 = reinterpret_cast< Reporter * >(argp1);
2499
+ Context::disconnect(arg1);
2500
+ return Qnil;
2501
+ fail:
2502
+ return Qnil;
2503
+ }
2504
+
2505
+
2506
+ SWIGINTERN VALUE
2507
+ _wrap_Context_reconnect(int argc, VALUE *argv, VALUE self) {
2508
+ Reporter *arg1 = (Reporter *) 0 ;
2509
+ void *argp1 = 0 ;
2510
+ int res1 = 0 ;
2511
+
2512
+ if ((argc < 1) || (argc > 1)) {
2513
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2514
+ }
2515
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Reporter, 0 | 0 );
2516
+ if (!SWIG_IsOK(res1)) {
2517
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Reporter *","Context::reconnect", 1, argv[0] ));
2518
+ }
2519
+ arg1 = reinterpret_cast< Reporter * >(argp1);
2520
+ Context::reconnect(arg1);
2521
+ return Qnil;
2522
+ fail:
2523
+ return Qnil;
2524
+ }
2525
+
2526
+
2527
+ SWIGINTERN VALUE
2528
+ _wrap_Context_shutdown(int argc, VALUE *argv, VALUE self) {
2529
+ if ((argc < 0) || (argc > 0)) {
2530
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2531
+ }
2532
+ Context::shutdown();
2533
+ return Qnil;
2534
+ fail:
2535
+ return Qnil;
2536
+ }
2537
+
2538
+
2539
+ SWIGINTERN VALUE
2540
+ _wrap_Context_createEvent(int argc, VALUE *argv, VALUE self) {
2541
+ Event *result = 0 ;
2542
+ VALUE vresult = Qnil;
2543
+
2544
+ if ((argc < 0) || (argc > 0)) {
2545
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2546
+ }
2547
+ result = (Event *)Context::createEvent();
2548
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_OWN | 0 );
2549
+ return vresult;
2550
+ fail:
2551
+ return Qnil;
2552
+ }
2553
+
2554
+
2555
+ SWIGINTERN VALUE
2556
+ _wrap_Context_startTrace(int argc, VALUE *argv, VALUE self) {
2557
+ Event *result = 0 ;
2558
+ VALUE vresult = Qnil;
2559
+
2560
+ if ((argc < 0) || (argc > 0)) {
2561
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2562
+ }
2563
+ result = (Event *)Context::startTrace();
2564
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_OWN | 0 );
2565
+ return vresult;
2566
+ fail:
2567
+ return Qnil;
2568
+ }
2569
+
2570
+
2571
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2572
+ SWIGINTERN VALUE
2573
+ _wrap_Context_allocate(VALUE self) {
2574
+ #else
2575
+ SWIGINTERN VALUE
2576
+ _wrap_Context_allocate(int argc, VALUE *argv, VALUE self) {
2577
+ #endif
2578
+
2579
+
2580
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Context);
2581
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2582
+ rb_obj_call_init(vresult, argc, argv);
2583
+ #endif
2584
+ return vresult;
2585
+ }
2586
+
2587
+
2588
+ SWIGINTERN VALUE
2589
+ _wrap_new_Context(int argc, VALUE *argv, VALUE self) {
2590
+ Context *result = 0 ;
2591
+
2592
+ if ((argc < 0) || (argc > 0)) {
2593
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2594
+ }
2595
+ result = (Context *)new Context();
2596
+ DATA_PTR(self) = result;
2597
+ return self;
2598
+ fail:
2599
+ return Qnil;
2600
+ }
2601
+
2602
+
2603
+ SWIGINTERN void
2604
+ free_Context(Context *arg1) {
2605
+ delete arg1;
2606
+ }
2607
+
2608
+ swig_class SwigClassEvent;
2609
+
2610
+ SWIGINTERN void
2611
+ free_Event(Event *arg1) {
2612
+ delete arg1;
2613
+ }
2614
+
2615
+ SWIGINTERN VALUE
2616
+ _wrap_Event_addInfo__SWIG_0(int argc, VALUE *argv, VALUE self) {
2617
+ Event *arg1 = (Event *) 0 ;
2618
+ char *arg2 = (char *) 0 ;
2619
+ void *arg3 = (void *) 0 ;
2620
+ void *argp1 = 0 ;
2621
+ int res1 = 0 ;
2622
+ int res2 ;
2623
+ char *buf2 = 0 ;
2624
+ int alloc2 = 0 ;
2625
+ int res3 ;
2626
+ bool result;
2627
+ VALUE vresult = Qnil;
2628
+
2629
+ if ((argc < 2) || (argc > 2)) {
2630
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2631
+ }
2632
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Event, 0 | 0 );
2633
+ if (!SWIG_IsOK(res1)) {
2634
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Event *","addInfo", 1, self ));
2635
+ }
2636
+ arg1 = reinterpret_cast< Event * >(argp1);
2637
+ res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
2638
+ if (!SWIG_IsOK(res2)) {
2639
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","addInfo", 2, argv[0] ));
2640
+ }
2641
+ arg2 = reinterpret_cast< char * >(buf2);
2642
+ res3 = SWIG_ConvertPtr(argv[1],SWIG_as_voidptrptr(&arg3), 0, 0);
2643
+ if (!SWIG_IsOK(res3)) {
2644
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","addInfo", 3, argv[1] ));
2645
+ }
2646
+ result = (bool)(arg1)->addInfo(arg2,arg3);
2647
+ vresult = SWIG_From_bool(static_cast< bool >(result));
2648
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
2649
+ return vresult;
2650
+ fail:
2651
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
2652
+ return Qnil;
2653
+ }
2654
+
2655
+
2656
+ SWIGINTERN VALUE
2657
+ _wrap_Event_addInfo__SWIG_1(int argc, VALUE *argv, VALUE self) {
2658
+ Event *arg1 = (Event *) 0 ;
2659
+ char *arg2 = (char *) 0 ;
2660
+ std::string *arg3 = 0 ;
2661
+ void *argp1 = 0 ;
2662
+ int res1 = 0 ;
2663
+ int res2 ;
2664
+ char *buf2 = 0 ;
2665
+ int alloc2 = 0 ;
2666
+ int res3 = SWIG_OLDOBJ ;
2667
+ bool result;
2668
+ VALUE vresult = Qnil;
2669
+
2670
+ if ((argc < 2) || (argc > 2)) {
2671
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2672
+ }
2673
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Event, 0 | 0 );
2674
+ if (!SWIG_IsOK(res1)) {
2675
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Event *","addInfo", 1, self ));
2676
+ }
2677
+ arg1 = reinterpret_cast< Event * >(argp1);
2678
+ res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
2679
+ if (!SWIG_IsOK(res2)) {
2680
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","addInfo", 2, argv[0] ));
2681
+ }
2682
+ arg2 = reinterpret_cast< char * >(buf2);
2683
+ {
2684
+ std::string *ptr = (std::string *)0;
2685
+ res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
2686
+ if (!SWIG_IsOK(res3)) {
2687
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","addInfo", 3, argv[1] ));
2688
+ }
2689
+ if (!ptr) {
2690
+ SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","addInfo", 3, argv[1]));
2691
+ }
2692
+ arg3 = ptr;
2693
+ }
2694
+ result = (bool)(arg1)->addInfo(arg2,(std::string const &)*arg3);
2695
+ vresult = SWIG_From_bool(static_cast< bool >(result));
2696
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
2697
+ if (SWIG_IsNewObj(res3)) delete arg3;
2698
+ return vresult;
2699
+ fail:
2700
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
2701
+ if (SWIG_IsNewObj(res3)) delete arg3;
2702
+ return Qnil;
2703
+ }
2704
+
2705
+
2706
+ SWIGINTERN VALUE
2707
+ _wrap_Event_addInfo__SWIG_2(int argc, VALUE *argv, VALUE self) {
2708
+ Event *arg1 = (Event *) 0 ;
2709
+ char *arg2 = (char *) 0 ;
2710
+ long arg3 ;
2711
+ void *argp1 = 0 ;
2712
+ int res1 = 0 ;
2713
+ int res2 ;
2714
+ char *buf2 = 0 ;
2715
+ int alloc2 = 0 ;
2716
+ long val3 ;
2717
+ int ecode3 = 0 ;
2718
+ bool result;
2719
+ VALUE vresult = Qnil;
2720
+
2721
+ if ((argc < 2) || (argc > 2)) {
2722
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2723
+ }
2724
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Event, 0 | 0 );
2725
+ if (!SWIG_IsOK(res1)) {
2726
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Event *","addInfo", 1, self ));
2727
+ }
2728
+ arg1 = reinterpret_cast< Event * >(argp1);
2729
+ res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
2730
+ if (!SWIG_IsOK(res2)) {
2731
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","addInfo", 2, argv[0] ));
2732
+ }
2733
+ arg2 = reinterpret_cast< char * >(buf2);
2734
+ ecode3 = SWIG_AsVal_long(argv[1], &val3);
2735
+ if (!SWIG_IsOK(ecode3)) {
2736
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "long","addInfo", 3, argv[1] ));
2737
+ }
2738
+ arg3 = static_cast< long >(val3);
2739
+ result = (bool)(arg1)->addInfo(arg2,arg3);
2740
+ vresult = SWIG_From_bool(static_cast< bool >(result));
2741
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
2742
+ return vresult;
2743
+ fail:
2744
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
2745
+ return Qnil;
2746
+ }
2747
+
2748
+
2749
+ SWIGINTERN VALUE
2750
+ _wrap_Event_addInfo__SWIG_3(int argc, VALUE *argv, VALUE self) {
2751
+ Event *arg1 = (Event *) 0 ;
2752
+ char *arg2 = (char *) 0 ;
2753
+ double arg3 ;
2754
+ void *argp1 = 0 ;
2755
+ int res1 = 0 ;
2756
+ int res2 ;
2757
+ char *buf2 = 0 ;
2758
+ int alloc2 = 0 ;
2759
+ double val3 ;
2760
+ int ecode3 = 0 ;
2761
+ bool result;
2762
+ VALUE vresult = Qnil;
2763
+
2764
+ if ((argc < 2) || (argc > 2)) {
2765
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2766
+ }
2767
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Event, 0 | 0 );
2768
+ if (!SWIG_IsOK(res1)) {
2769
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Event *","addInfo", 1, self ));
2770
+ }
2771
+ arg1 = reinterpret_cast< Event * >(argp1);
2772
+ res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
2773
+ if (!SWIG_IsOK(res2)) {
2774
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","addInfo", 2, argv[0] ));
2775
+ }
2776
+ arg2 = reinterpret_cast< char * >(buf2);
2777
+ ecode3 = SWIG_AsVal_double(argv[1], &val3);
2778
+ if (!SWIG_IsOK(ecode3)) {
2779
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","addInfo", 3, argv[1] ));
2780
+ }
2781
+ arg3 = static_cast< double >(val3);
2782
+ result = (bool)(arg1)->addInfo(arg2,arg3);
2783
+ vresult = SWIG_From_bool(static_cast< bool >(result));
2784
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
2785
+ return vresult;
2786
+ fail:
2787
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
2788
+ return Qnil;
2789
+ }
2790
+
2791
+
2792
+ SWIGINTERN VALUE _wrap_Event_addInfo(int nargs, VALUE *args, VALUE self) {
2793
+ int argc;
2794
+ VALUE argv[4];
2795
+ int ii;
2796
+
2797
+ argc = nargs + 1;
2798
+ argv[0] = self;
2799
+ if (argc > 4) SWIG_fail;
2800
+ for (ii = 1; (ii < argc); ++ii) {
2801
+ argv[ii] = args[ii-1];
2802
+ }
2803
+ if (argc == 3) {
2804
+ int _v;
2805
+ void *vptr = 0;
2806
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Event, 0);
2807
+ _v = SWIG_CheckState(res);
2808
+ if (_v) {
2809
+ int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
2810
+ _v = SWIG_CheckState(res);
2811
+ if (_v) {
2812
+ void *ptr = 0;
2813
+ int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
2814
+ _v = SWIG_CheckState(res);
2815
+ if (_v) {
2816
+ return _wrap_Event_addInfo__SWIG_0(nargs, args, self);
2817
+ }
2818
+ }
2819
+ }
2820
+ }
2821
+ if (argc == 3) {
2822
+ int _v;
2823
+ void *vptr = 0;
2824
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Event, 0);
2825
+ _v = SWIG_CheckState(res);
2826
+ if (_v) {
2827
+ int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
2828
+ _v = SWIG_CheckState(res);
2829
+ if (_v) {
2830
+ {
2831
+ int res = SWIG_AsVal_long(argv[2], NULL);
2832
+ _v = SWIG_CheckState(res);
2833
+ }
2834
+ if (_v) {
2835
+ return _wrap_Event_addInfo__SWIG_2(nargs, args, self);
2836
+ }
2837
+ }
2838
+ }
2839
+ }
2840
+ if (argc == 3) {
2841
+ int _v;
2842
+ void *vptr = 0;
2843
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Event, 0);
2844
+ _v = SWIG_CheckState(res);
2845
+ if (_v) {
2846
+ int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
2847
+ _v = SWIG_CheckState(res);
2848
+ if (_v) {
2849
+ {
2850
+ int res = SWIG_AsVal_double(argv[2], NULL);
2851
+ _v = SWIG_CheckState(res);
2852
+ }
2853
+ if (_v) {
2854
+ return _wrap_Event_addInfo__SWIG_3(nargs, args, self);
2855
+ }
2856
+ }
2857
+ }
2858
+ }
2859
+ if (argc == 3) {
2860
+ int _v;
2861
+ void *vptr = 0;
2862
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Event, 0);
2863
+ _v = SWIG_CheckState(res);
2864
+ if (_v) {
2865
+ int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
2866
+ _v = SWIG_CheckState(res);
2867
+ if (_v) {
2868
+ int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
2869
+ _v = SWIG_CheckState(res);
2870
+ if (_v) {
2871
+ return _wrap_Event_addInfo__SWIG_1(nargs, args, self);
2872
+ }
2873
+ }
2874
+ }
2875
+ }
2876
+
2877
+ fail:
2878
+ Ruby_Format_OverloadedError( argc, 4, "Event.addInfo",
2879
+ " bool Event.addInfo(char *key, void *val)\n"
2880
+ " bool Event.addInfo(char *key, std::string const &val)\n"
2881
+ " bool Event.addInfo(char *key, long val)\n"
2882
+ " bool Event.addInfo(char *key, double val)\n");
2883
+
2884
+ return Qnil;
2885
+ }
2886
+
2887
+
2888
+ SWIGINTERN VALUE
2889
+ _wrap_Event_addEdge(int argc, VALUE *argv, VALUE self) {
2890
+ Event *arg1 = (Event *) 0 ;
2891
+ oboe_metadata_t *arg2 = (oboe_metadata_t *) 0 ;
2892
+ void *argp1 = 0 ;
2893
+ int res1 = 0 ;
2894
+ void *argp2 = 0 ;
2895
+ int res2 = 0 ;
2896
+ bool result;
2897
+ VALUE vresult = Qnil;
2898
+
2899
+ if ((argc < 1) || (argc > 1)) {
2900
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2901
+ }
2902
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Event, 0 | 0 );
2903
+ if (!SWIG_IsOK(res1)) {
2904
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Event *","addEdge", 1, self ));
2905
+ }
2906
+ arg1 = reinterpret_cast< Event * >(argp1);
2907
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_oboe_metadata_t, 0 | 0 );
2908
+ if (!SWIG_IsOK(res2)) {
2909
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "oboe_metadata_t *","addEdge", 2, argv[0] ));
2910
+ }
2911
+ arg2 = reinterpret_cast< oboe_metadata_t * >(argp2);
2912
+ result = (bool)(arg1)->addEdge(arg2);
2913
+ vresult = SWIG_From_bool(static_cast< bool >(result));
2914
+ return vresult;
2915
+ fail:
2916
+ return Qnil;
2917
+ }
2918
+
2919
+
2920
+ SWIGINTERN VALUE
2921
+ _wrap_Event_addEdgeStr(int argc, VALUE *argv, VALUE self) {
2922
+ Event *arg1 = (Event *) 0 ;
2923
+ std::string *arg2 = 0 ;
2924
+ void *argp1 = 0 ;
2925
+ int res1 = 0 ;
2926
+ int res2 = SWIG_OLDOBJ ;
2927
+ bool result;
2928
+ VALUE vresult = Qnil;
2929
+
2930
+ if ((argc < 1) || (argc > 1)) {
2931
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2932
+ }
2933
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Event, 0 | 0 );
2934
+ if (!SWIG_IsOK(res1)) {
2935
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Event *","addEdgeStr", 1, self ));
2936
+ }
2937
+ arg1 = reinterpret_cast< Event * >(argp1);
2938
+ {
2939
+ std::string *ptr = (std::string *)0;
2940
+ res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
2941
+ if (!SWIG_IsOK(res2)) {
2942
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","addEdgeStr", 2, argv[0] ));
2943
+ }
2944
+ if (!ptr) {
2945
+ SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","addEdgeStr", 2, argv[0]));
2946
+ }
2947
+ arg2 = ptr;
2948
+ }
2949
+ result = (bool)(arg1)->addEdgeStr((std::string const &)*arg2);
2950
+ vresult = SWIG_From_bool(static_cast< bool >(result));
2951
+ if (SWIG_IsNewObj(res2)) delete arg2;
2952
+ return vresult;
2953
+ fail:
2954
+ if (SWIG_IsNewObj(res2)) delete arg2;
2955
+ return Qnil;
2956
+ }
2957
+
2958
+
2959
+ SWIGINTERN VALUE
2960
+ _wrap_Event_getMetadata(int argc, VALUE *argv, VALUE self) {
2961
+ Event *arg1 = (Event *) 0 ;
2962
+ void *argp1 = 0 ;
2963
+ int res1 = 0 ;
2964
+ Metadata *result = 0 ;
2965
+ VALUE vresult = Qnil;
2966
+
2967
+ if ((argc < 0) || (argc > 0)) {
2968
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2969
+ }
2970
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Event, 0 | 0 );
2971
+ if (!SWIG_IsOK(res1)) {
2972
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Event *","getMetadata", 1, self ));
2973
+ }
2974
+ arg1 = reinterpret_cast< Event * >(argp1);
2975
+ result = (Metadata *)(arg1)->getMetadata();
2976
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Metadata, SWIG_POINTER_OWN | 0 );
2977
+ return vresult;
2978
+ fail:
2979
+ return Qnil;
2980
+ }
2981
+
2982
+
2983
+ SWIGINTERN VALUE
2984
+ _wrap_Event_metadataString(int argc, VALUE *argv, VALUE self) {
2985
+ Event *arg1 = (Event *) 0 ;
2986
+ void *argp1 = 0 ;
2987
+ int res1 = 0 ;
2988
+ std::string result;
2989
+ VALUE vresult = Qnil;
2990
+
2991
+ if ((argc < 0) || (argc > 0)) {
2992
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2993
+ }
2994
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Event, 0 | 0 );
2995
+ if (!SWIG_IsOK(res1)) {
2996
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Event *","metadataString", 1, self ));
2997
+ }
2998
+ arg1 = reinterpret_cast< Event * >(argp1);
2999
+ result = (arg1)->metadataString();
3000
+ vresult = SWIG_From_std_string(static_cast< std::string >(result));
3001
+ return vresult;
3002
+ fail:
3003
+ return Qnil;
3004
+ }
3005
+
3006
+
3007
+ SWIGINTERN VALUE
3008
+ _wrap_Event_send(int argc, VALUE *argv, VALUE self) {
3009
+ Event *arg1 = (Event *) 0 ;
3010
+ void *argp1 = 0 ;
3011
+ int res1 = 0 ;
3012
+ bool result;
3013
+ VALUE vresult = Qnil;
3014
+
3015
+ if ((argc < 0) || (argc > 0)) {
3016
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3017
+ }
3018
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Event, 0 | 0 );
3019
+ if (!SWIG_IsOK(res1)) {
3020
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Event *","send", 1, self ));
3021
+ }
3022
+ arg1 = reinterpret_cast< Event * >(argp1);
3023
+ result = (bool)(arg1)->send();
3024
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3025
+ return vresult;
3026
+ fail:
3027
+ return Qnil;
3028
+ }
3029
+
3030
+
3031
+ SWIGINTERN VALUE
3032
+ _wrap_Event_startTrace(int argc, VALUE *argv, VALUE self) {
3033
+ oboe_metadata_t *arg1 = (oboe_metadata_t *) 0 ;
3034
+ void *argp1 = 0 ;
3035
+ int res1 = 0 ;
3036
+ Event *result = 0 ;
3037
+ VALUE vresult = Qnil;
3038
+
3039
+ if ((argc < 1) || (argc > 1)) {
3040
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3041
+ }
3042
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_oboe_metadata_t, 0 | 0 );
3043
+ if (!SWIG_IsOK(res1)) {
3044
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "oboe_metadata_t const *","Event::startTrace", 1, argv[0] ));
3045
+ }
3046
+ arg1 = reinterpret_cast< oboe_metadata_t * >(argp1);
3047
+ result = (Event *)Event::startTrace((oboe_metadata_t const *)arg1);
3048
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_OWN | 0 );
3049
+ return vresult;
3050
+ fail:
3051
+ return Qnil;
3052
+ }
3053
+
3054
+
3055
+ swig_class SwigClassReporter;
3056
+
3057
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
3058
+ SWIGINTERN VALUE
3059
+ _wrap_Reporter_allocate(VALUE self) {
3060
+ #else
3061
+ SWIGINTERN VALUE
3062
+ _wrap_Reporter_allocate(int argc, VALUE *argv, VALUE self) {
3063
+ #endif
3064
+
3065
+
3066
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Reporter);
3067
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
3068
+ rb_obj_call_init(vresult, argc, argv);
3069
+ #endif
3070
+ return vresult;
3071
+ }
3072
+
3073
+
3074
+ SWIGINTERN VALUE
3075
+ _wrap_new_Reporter(int argc, VALUE *argv, VALUE self) {
3076
+ char *arg1 = (char *) 0 ;
3077
+ char *arg2 = (char *) 0 ;
3078
+ int res1 ;
3079
+ char *buf1 = 0 ;
3080
+ int alloc1 = 0 ;
3081
+ int res2 ;
3082
+ char *buf2 = 0 ;
3083
+ int alloc2 = 0 ;
3084
+ Reporter *result = 0 ;
3085
+
3086
+ if ((argc < 2) || (argc > 2)) {
3087
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3088
+ }
3089
+ res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
3090
+ if (!SWIG_IsOK(res1)) {
3091
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","Reporter", 1, argv[0] ));
3092
+ }
3093
+ arg1 = reinterpret_cast< char * >(buf1);
3094
+ res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
3095
+ if (!SWIG_IsOK(res2)) {
3096
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Reporter", 2, argv[1] ));
3097
+ }
3098
+ arg2 = reinterpret_cast< char * >(buf2);
3099
+ result = (Reporter *)new Reporter((char const *)arg1,(char const *)arg2);
3100
+ DATA_PTR(self) = result;
3101
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3102
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
3103
+ return self;
3104
+ fail:
3105
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3106
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
3107
+ return Qnil;
3108
+ }
3109
+
3110
+
3111
+ SWIGINTERN void
3112
+ free_Reporter(Reporter *arg1) {
3113
+ delete arg1;
3114
+ }
3115
+
3116
+ SWIGINTERN VALUE
3117
+ _wrap_Reporter_sendReport__SWIG_0(int argc, VALUE *argv, VALUE self) {
3118
+ Reporter *arg1 = (Reporter *) 0 ;
3119
+ Event *arg2 = (Event *) 0 ;
3120
+ void *argp1 = 0 ;
3121
+ int res1 = 0 ;
3122
+ void *argp2 = 0 ;
3123
+ int res2 = 0 ;
3124
+ bool result;
3125
+ VALUE vresult = Qnil;
3126
+
3127
+ if ((argc < 1) || (argc > 1)) {
3128
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3129
+ }
3130
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Reporter, 0 | 0 );
3131
+ if (!SWIG_IsOK(res1)) {
3132
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Reporter *","sendReport", 1, self ));
3133
+ }
3134
+ arg1 = reinterpret_cast< Reporter * >(argp1);
3135
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Event, 0 | 0 );
3136
+ if (!SWIG_IsOK(res2)) {
3137
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Event *","sendReport", 2, argv[0] ));
3138
+ }
3139
+ arg2 = reinterpret_cast< Event * >(argp2);
3140
+ result = (bool)(arg1)->sendReport(arg2);
3141
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3142
+ return vresult;
3143
+ fail:
3144
+ return Qnil;
3145
+ }
3146
+
3147
+
3148
+ SWIGINTERN VALUE
3149
+ _wrap_Reporter_sendReport__SWIG_1(int argc, VALUE *argv, VALUE self) {
3150
+ Reporter *arg1 = (Reporter *) 0 ;
3151
+ Event *arg2 = (Event *) 0 ;
3152
+ oboe_metadata_t *arg3 = (oboe_metadata_t *) 0 ;
3153
+ void *argp1 = 0 ;
3154
+ int res1 = 0 ;
3155
+ void *argp2 = 0 ;
3156
+ int res2 = 0 ;
3157
+ void *argp3 = 0 ;
3158
+ int res3 = 0 ;
3159
+ bool result;
3160
+ VALUE vresult = Qnil;
3161
+
3162
+ if ((argc < 2) || (argc > 2)) {
3163
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3164
+ }
3165
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Reporter, 0 | 0 );
3166
+ if (!SWIG_IsOK(res1)) {
3167
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Reporter *","sendReport", 1, self ));
3168
+ }
3169
+ arg1 = reinterpret_cast< Reporter * >(argp1);
3170
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Event, 0 | 0 );
3171
+ if (!SWIG_IsOK(res2)) {
3172
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Event *","sendReport", 2, argv[0] ));
3173
+ }
3174
+ arg2 = reinterpret_cast< Event * >(argp2);
3175
+ res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_oboe_metadata_t, 0 | 0 );
3176
+ if (!SWIG_IsOK(res3)) {
3177
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "oboe_metadata_t *","sendReport", 3, argv[1] ));
3178
+ }
3179
+ arg3 = reinterpret_cast< oboe_metadata_t * >(argp3);
3180
+ result = (bool)(arg1)->sendReport(arg2,arg3);
3181
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3182
+ return vresult;
3183
+ fail:
3184
+ return Qnil;
3185
+ }
3186
+
3187
+
3188
+ SWIGINTERN VALUE _wrap_Reporter_sendReport(int nargs, VALUE *args, VALUE self) {
3189
+ int argc;
3190
+ VALUE argv[4];
3191
+ int ii;
3192
+
3193
+ argc = nargs + 1;
3194
+ argv[0] = self;
3195
+ if (argc > 4) SWIG_fail;
3196
+ for (ii = 1; (ii < argc); ++ii) {
3197
+ argv[ii] = args[ii-1];
3198
+ }
3199
+ if (argc == 2) {
3200
+ int _v;
3201
+ void *vptr = 0;
3202
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Reporter, 0);
3203
+ _v = SWIG_CheckState(res);
3204
+ if (_v) {
3205
+ void *vptr = 0;
3206
+ int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Event, 0);
3207
+ _v = SWIG_CheckState(res);
3208
+ if (_v) {
3209
+ return _wrap_Reporter_sendReport__SWIG_0(nargs, args, self);
3210
+ }
3211
+ }
3212
+ }
3213
+ if (argc == 3) {
3214
+ int _v;
3215
+ void *vptr = 0;
3216
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Reporter, 0);
3217
+ _v = SWIG_CheckState(res);
3218
+ if (_v) {
3219
+ void *vptr = 0;
3220
+ int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Event, 0);
3221
+ _v = SWIG_CheckState(res);
3222
+ if (_v) {
3223
+ void *vptr = 0;
3224
+ int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_oboe_metadata_t, 0);
3225
+ _v = SWIG_CheckState(res);
3226
+ if (_v) {
3227
+ return _wrap_Reporter_sendReport__SWIG_1(nargs, args, self);
3228
+ }
3229
+ }
3230
+ }
3231
+ }
3232
+
3233
+ fail:
3234
+ Ruby_Format_OverloadedError( argc, 4, "Reporter.sendReport",
3235
+ " bool Reporter.sendReport(Event *evt)\n"
3236
+ " bool Reporter.sendReport(Event *evt, oboe_metadata_t *md)\n");
3237
+
3238
+ return Qnil;
3239
+ }
3240
+
3241
+
3242
+ swig_class SwigClassSslReporter;
3243
+
3244
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
3245
+ SWIGINTERN VALUE
3246
+ _wrap_SslReporter_allocate(VALUE self) {
3247
+ #else
3248
+ SWIGINTERN VALUE
3249
+ _wrap_SslReporter_allocate(int argc, VALUE *argv, VALUE self) {
3250
+ #endif
3251
+
3252
+
3253
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_SslReporter);
3254
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
3255
+ rb_obj_call_init(vresult, argc, argv);
3256
+ #endif
3257
+ return vresult;
3258
+ }
3259
+
3260
+
3261
+ SWIGINTERN VALUE
3262
+ _wrap_new_SslReporter(int argc, VALUE *argv, VALUE self) {
3263
+ char *arg1 = (char *) 0 ;
3264
+ int res1 ;
3265
+ char *buf1 = 0 ;
3266
+ int alloc1 = 0 ;
3267
+ SslReporter *result = 0 ;
3268
+
3269
+ if ((argc < 1) || (argc > 1)) {
3270
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3271
+ }
3272
+ res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
3273
+ if (!SWIG_IsOK(res1)) {
3274
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","SslReporter", 1, argv[0] ));
3275
+ }
3276
+ arg1 = reinterpret_cast< char * >(buf1);
3277
+ result = (SslReporter *)new SslReporter((char const *)arg1);
3278
+ DATA_PTR(self) = result;
3279
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3280
+ return self;
3281
+ fail:
3282
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3283
+ return Qnil;
3284
+ }
3285
+
3286
+
3287
+ SWIGINTERN void
3288
+ free_SslReporter(SslReporter *arg1) {
3289
+ delete arg1;
3290
+ }
3291
+
3292
+ SWIGINTERN VALUE
3293
+ _wrap_SslReporter_sendReport__SWIG_0(int argc, VALUE *argv, VALUE self) {
3294
+ SslReporter *arg1 = (SslReporter *) 0 ;
3295
+ Event *arg2 = (Event *) 0 ;
3296
+ void *argp1 = 0 ;
3297
+ int res1 = 0 ;
3298
+ void *argp2 = 0 ;
3299
+ int res2 = 0 ;
3300
+ bool result;
3301
+ VALUE vresult = Qnil;
3302
+
3303
+ if ((argc < 1) || (argc > 1)) {
3304
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3305
+ }
3306
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SslReporter, 0 | 0 );
3307
+ if (!SWIG_IsOK(res1)) {
3308
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "SslReporter *","sendReport", 1, self ));
3309
+ }
3310
+ arg1 = reinterpret_cast< SslReporter * >(argp1);
3311
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Event, 0 | 0 );
3312
+ if (!SWIG_IsOK(res2)) {
3313
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Event *","sendReport", 2, argv[0] ));
3314
+ }
3315
+ arg2 = reinterpret_cast< Event * >(argp2);
3316
+ result = (bool)(arg1)->sendReport(arg2);
3317
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3318
+ return vresult;
3319
+ fail:
3320
+ return Qnil;
3321
+ }
3322
+
3323
+
3324
+ SWIGINTERN VALUE
3325
+ _wrap_SslReporter_sendReport__SWIG_1(int argc, VALUE *argv, VALUE self) {
3326
+ SslReporter *arg1 = (SslReporter *) 0 ;
3327
+ Event *arg2 = (Event *) 0 ;
3328
+ oboe_metadata_t *arg3 = (oboe_metadata_t *) 0 ;
3329
+ void *argp1 = 0 ;
3330
+ int res1 = 0 ;
3331
+ void *argp2 = 0 ;
3332
+ int res2 = 0 ;
3333
+ void *argp3 = 0 ;
3334
+ int res3 = 0 ;
3335
+ bool result;
3336
+ VALUE vresult = Qnil;
3337
+
3338
+ if ((argc < 2) || (argc > 2)) {
3339
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3340
+ }
3341
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SslReporter, 0 | 0 );
3342
+ if (!SWIG_IsOK(res1)) {
3343
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "SslReporter *","sendReport", 1, self ));
3344
+ }
3345
+ arg1 = reinterpret_cast< SslReporter * >(argp1);
3346
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Event, 0 | 0 );
3347
+ if (!SWIG_IsOK(res2)) {
3348
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Event *","sendReport", 2, argv[0] ));
3349
+ }
3350
+ arg2 = reinterpret_cast< Event * >(argp2);
3351
+ res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_oboe_metadata_t, 0 | 0 );
3352
+ if (!SWIG_IsOK(res3)) {
3353
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "oboe_metadata_t *","sendReport", 3, argv[1] ));
3354
+ }
3355
+ arg3 = reinterpret_cast< oboe_metadata_t * >(argp3);
3356
+ result = (bool)(arg1)->sendReport(arg2,arg3);
3357
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3358
+ return vresult;
3359
+ fail:
3360
+ return Qnil;
3361
+ }
3362
+
3363
+
3364
+ SWIGINTERN VALUE _wrap_SslReporter_sendReport(int nargs, VALUE *args, VALUE self) {
3365
+ int argc;
3366
+ VALUE argv[4];
3367
+ int ii;
3368
+
3369
+ argc = nargs + 1;
3370
+ argv[0] = self;
3371
+ if (argc > 4) SWIG_fail;
3372
+ for (ii = 1; (ii < argc); ++ii) {
3373
+ argv[ii] = args[ii-1];
3374
+ }
3375
+ if (argc == 2) {
3376
+ int _v;
3377
+ void *vptr = 0;
3378
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SslReporter, 0);
3379
+ _v = SWIG_CheckState(res);
3380
+ if (_v) {
3381
+ void *vptr = 0;
3382
+ int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Event, 0);
3383
+ _v = SWIG_CheckState(res);
3384
+ if (_v) {
3385
+ return _wrap_SslReporter_sendReport__SWIG_0(nargs, args, self);
3386
+ }
3387
+ }
3388
+ }
3389
+ if (argc == 3) {
3390
+ int _v;
3391
+ void *vptr = 0;
3392
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SslReporter, 0);
3393
+ _v = SWIG_CheckState(res);
3394
+ if (_v) {
3395
+ void *vptr = 0;
3396
+ int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Event, 0);
3397
+ _v = SWIG_CheckState(res);
3398
+ if (_v) {
3399
+ void *vptr = 0;
3400
+ int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_oboe_metadata_t, 0);
3401
+ _v = SWIG_CheckState(res);
3402
+ if (_v) {
3403
+ return _wrap_SslReporter_sendReport__SWIG_1(nargs, args, self);
3404
+ }
3405
+ }
3406
+ }
3407
+ }
3408
+
3409
+ fail:
3410
+ Ruby_Format_OverloadedError( argc, 4, "SslReporter.sendReport",
3411
+ " bool SslReporter.sendReport(Event *evt)\n"
3412
+ " bool SslReporter.sendReport(Event *evt, oboe_metadata_t *md)\n");
3413
+
3414
+ return Qnil;
3415
+ }
3416
+
3417
+
3418
+ swig_class SwigClassUdpReporter;
3419
+
3420
+ SWIGINTERN VALUE
3421
+ _wrap_new_UdpReporter__SWIG_0(int argc, VALUE *argv, VALUE self) {
3422
+ char *arg1 = (char *) 0 ;
3423
+ char *arg2 = (char *) 0 ;
3424
+ int res1 ;
3425
+ char *buf1 = 0 ;
3426
+ int alloc1 = 0 ;
3427
+ int res2 ;
3428
+ char *buf2 = 0 ;
3429
+ int alloc2 = 0 ;
3430
+ UdpReporter *result = 0 ;
3431
+
3432
+ if ((argc < 2) || (argc > 2)) {
3433
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3434
+ }
3435
+ res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
3436
+ if (!SWIG_IsOK(res1)) {
3437
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","UdpReporter", 1, argv[0] ));
3438
+ }
3439
+ arg1 = reinterpret_cast< char * >(buf1);
3440
+ res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
3441
+ if (!SWIG_IsOK(res2)) {
3442
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","UdpReporter", 2, argv[1] ));
3443
+ }
3444
+ arg2 = reinterpret_cast< char * >(buf2);
3445
+ result = (UdpReporter *)new UdpReporter((char const *)arg1,(char const *)arg2);
3446
+ DATA_PTR(self) = result;
3447
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3448
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
3449
+ return self;
3450
+ fail:
3451
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3452
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
3453
+ return Qnil;
3454
+ }
3455
+
3456
+
3457
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
3458
+ SWIGINTERN VALUE
3459
+ _wrap_UdpReporter_allocate(VALUE self) {
3460
+ #else
3461
+ SWIGINTERN VALUE
3462
+ _wrap_UdpReporter_allocate(int argc, VALUE *argv, VALUE self) {
3463
+ #endif
3464
+
3465
+
3466
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_UdpReporter);
3467
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
3468
+ rb_obj_call_init(vresult, argc, argv);
3469
+ #endif
3470
+ return vresult;
3471
+ }
3472
+
3473
+
3474
+ SWIGINTERN VALUE
3475
+ _wrap_new_UdpReporter__SWIG_1(int argc, VALUE *argv, VALUE self) {
3476
+ char *arg1 = (char *) 0 ;
3477
+ int res1 ;
3478
+ char *buf1 = 0 ;
3479
+ int alloc1 = 0 ;
3480
+ UdpReporter *result = 0 ;
3481
+
3482
+ if ((argc < 1) || (argc > 1)) {
3483
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3484
+ }
3485
+ res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
3486
+ if (!SWIG_IsOK(res1)) {
3487
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","UdpReporter", 1, argv[0] ));
3488
+ }
3489
+ arg1 = reinterpret_cast< char * >(buf1);
3490
+ result = (UdpReporter *)new UdpReporter((char const *)arg1);
3491
+ DATA_PTR(self) = result;
3492
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3493
+ return self;
3494
+ fail:
3495
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3496
+ return Qnil;
3497
+ }
3498
+
3499
+
3500
+ SWIGINTERN VALUE _wrap_new_UdpReporter(int nargs, VALUE *args, VALUE self) {
3501
+ int argc;
3502
+ VALUE argv[2];
3503
+ int ii;
3504
+
3505
+ argc = nargs;
3506
+ if (argc > 2) SWIG_fail;
3507
+ for (ii = 0; (ii < argc); ++ii) {
3508
+ argv[ii] = args[ii];
3509
+ }
3510
+ if (argc == 1) {
3511
+ int _v;
3512
+ int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
3513
+ _v = SWIG_CheckState(res);
3514
+ if (_v) {
3515
+ return _wrap_new_UdpReporter__SWIG_1(nargs, args, self);
3516
+ }
3517
+ }
3518
+ if (argc == 2) {
3519
+ int _v;
3520
+ int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
3521
+ _v = SWIG_CheckState(res);
3522
+ if (_v) {
3523
+ int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
3524
+ _v = SWIG_CheckState(res);
3525
+ if (_v) {
3526
+ return _wrap_new_UdpReporter__SWIG_0(nargs, args, self);
3527
+ }
3528
+ }
3529
+ }
3530
+
3531
+ fail:
3532
+ Ruby_Format_OverloadedError( argc, 2, "UdpReporter.new",
3533
+ " UdpReporter.new(char const *addr, char const *port)\n"
3534
+ " UdpReporter.new(char const *addr)\n");
3535
+
3536
+ return Qnil;
3537
+ }
3538
+
3539
+
3540
+ SWIGINTERN void
3541
+ free_UdpReporter(UdpReporter *arg1) {
3542
+ delete arg1;
3543
+ }
3544
+
3545
+ SWIGINTERN VALUE
3546
+ _wrap_UdpReporter_sendReport__SWIG_0(int argc, VALUE *argv, VALUE self) {
3547
+ UdpReporter *arg1 = (UdpReporter *) 0 ;
3548
+ Event *arg2 = (Event *) 0 ;
3549
+ void *argp1 = 0 ;
3550
+ int res1 = 0 ;
3551
+ void *argp2 = 0 ;
3552
+ int res2 = 0 ;
3553
+ bool result;
3554
+ VALUE vresult = Qnil;
3555
+
3556
+ if ((argc < 1) || (argc > 1)) {
3557
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3558
+ }
3559
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_UdpReporter, 0 | 0 );
3560
+ if (!SWIG_IsOK(res1)) {
3561
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "UdpReporter *","sendReport", 1, self ));
3562
+ }
3563
+ arg1 = reinterpret_cast< UdpReporter * >(argp1);
3564
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Event, 0 | 0 );
3565
+ if (!SWIG_IsOK(res2)) {
3566
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Event *","sendReport", 2, argv[0] ));
3567
+ }
3568
+ arg2 = reinterpret_cast< Event * >(argp2);
3569
+ result = (bool)(arg1)->sendReport(arg2);
3570
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3571
+ return vresult;
3572
+ fail:
3573
+ return Qnil;
3574
+ }
3575
+
3576
+
3577
+ SWIGINTERN VALUE
3578
+ _wrap_UdpReporter_sendReport__SWIG_1(int argc, VALUE *argv, VALUE self) {
3579
+ UdpReporter *arg1 = (UdpReporter *) 0 ;
3580
+ Event *arg2 = (Event *) 0 ;
3581
+ oboe_metadata_t *arg3 = (oboe_metadata_t *) 0 ;
3582
+ void *argp1 = 0 ;
3583
+ int res1 = 0 ;
3584
+ void *argp2 = 0 ;
3585
+ int res2 = 0 ;
3586
+ void *argp3 = 0 ;
3587
+ int res3 = 0 ;
3588
+ bool result;
3589
+ VALUE vresult = Qnil;
3590
+
3591
+ if ((argc < 2) || (argc > 2)) {
3592
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3593
+ }
3594
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_UdpReporter, 0 | 0 );
3595
+ if (!SWIG_IsOK(res1)) {
3596
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "UdpReporter *","sendReport", 1, self ));
3597
+ }
3598
+ arg1 = reinterpret_cast< UdpReporter * >(argp1);
3599
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Event, 0 | 0 );
3600
+ if (!SWIG_IsOK(res2)) {
3601
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Event *","sendReport", 2, argv[0] ));
3602
+ }
3603
+ arg2 = reinterpret_cast< Event * >(argp2);
3604
+ res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_oboe_metadata_t, 0 | 0 );
3605
+ if (!SWIG_IsOK(res3)) {
3606
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "oboe_metadata_t *","sendReport", 3, argv[1] ));
3607
+ }
3608
+ arg3 = reinterpret_cast< oboe_metadata_t * >(argp3);
3609
+ result = (bool)(arg1)->sendReport(arg2,arg3);
3610
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3611
+ return vresult;
3612
+ fail:
3613
+ return Qnil;
3614
+ }
3615
+
3616
+
3617
+ SWIGINTERN VALUE _wrap_UdpReporter_sendReport(int nargs, VALUE *args, VALUE self) {
3618
+ int argc;
3619
+ VALUE argv[4];
3620
+ int ii;
3621
+
3622
+ argc = nargs + 1;
3623
+ argv[0] = self;
3624
+ if (argc > 4) SWIG_fail;
3625
+ for (ii = 1; (ii < argc); ++ii) {
3626
+ argv[ii] = args[ii-1];
3627
+ }
3628
+ if (argc == 2) {
3629
+ int _v;
3630
+ void *vptr = 0;
3631
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UdpReporter, 0);
3632
+ _v = SWIG_CheckState(res);
3633
+ if (_v) {
3634
+ void *vptr = 0;
3635
+ int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Event, 0);
3636
+ _v = SWIG_CheckState(res);
3637
+ if (_v) {
3638
+ return _wrap_UdpReporter_sendReport__SWIG_0(nargs, args, self);
3639
+ }
3640
+ }
3641
+ }
3642
+ if (argc == 3) {
3643
+ int _v;
3644
+ void *vptr = 0;
3645
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UdpReporter, 0);
3646
+ _v = SWIG_CheckState(res);
3647
+ if (_v) {
3648
+ void *vptr = 0;
3649
+ int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Event, 0);
3650
+ _v = SWIG_CheckState(res);
3651
+ if (_v) {
3652
+ void *vptr = 0;
3653
+ int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_oboe_metadata_t, 0);
3654
+ _v = SWIG_CheckState(res);
3655
+ if (_v) {
3656
+ return _wrap_UdpReporter_sendReport__SWIG_1(nargs, args, self);
3657
+ }
3658
+ }
3659
+ }
3660
+ }
3661
+
3662
+ fail:
3663
+ Ruby_Format_OverloadedError( argc, 4, "UdpReporter.sendReport",
3664
+ " bool UdpReporter.sendReport(Event *evt)\n"
3665
+ " bool UdpReporter.sendReport(Event *evt, oboe_metadata_t *md)\n");
3666
+
3667
+ return Qnil;
3668
+ }
3669
+
3670
+
3671
+ swig_class SwigClassFileReporter;
3672
+
3673
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
3674
+ SWIGINTERN VALUE
3675
+ _wrap_FileReporter_allocate(VALUE self) {
3676
+ #else
3677
+ SWIGINTERN VALUE
3678
+ _wrap_FileReporter_allocate(int argc, VALUE *argv, VALUE self) {
3679
+ #endif
3680
+
3681
+
3682
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_FileReporter);
3683
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
3684
+ rb_obj_call_init(vresult, argc, argv);
3685
+ #endif
3686
+ return vresult;
3687
+ }
3688
+
3689
+
3690
+ SWIGINTERN VALUE
3691
+ _wrap_new_FileReporter(int argc, VALUE *argv, VALUE self) {
3692
+ char *arg1 = (char *) 0 ;
3693
+ int res1 ;
3694
+ char *buf1 = 0 ;
3695
+ int alloc1 = 0 ;
3696
+ FileReporter *result = 0 ;
3697
+
3698
+ if ((argc < 1) || (argc > 1)) {
3699
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3700
+ }
3701
+ res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
3702
+ if (!SWIG_IsOK(res1)) {
3703
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","FileReporter", 1, argv[0] ));
3704
+ }
3705
+ arg1 = reinterpret_cast< char * >(buf1);
3706
+ result = (FileReporter *)new FileReporter((char const *)arg1);
3707
+ DATA_PTR(self) = result;
3708
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3709
+ return self;
3710
+ fail:
3711
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3712
+ return Qnil;
3713
+ }
3714
+
3715
+
3716
+ SWIGINTERN void
3717
+ free_FileReporter(FileReporter *arg1) {
3718
+ delete arg1;
3719
+ }
3720
+
3721
+ SWIGINTERN VALUE
3722
+ _wrap_FileReporter_sendReport__SWIG_0(int argc, VALUE *argv, VALUE self) {
3723
+ FileReporter *arg1 = (FileReporter *) 0 ;
3724
+ Event *arg2 = (Event *) 0 ;
3725
+ void *argp1 = 0 ;
3726
+ int res1 = 0 ;
3727
+ void *argp2 = 0 ;
3728
+ int res2 = 0 ;
3729
+ bool result;
3730
+ VALUE vresult = Qnil;
3731
+
3732
+ if ((argc < 1) || (argc > 1)) {
3733
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3734
+ }
3735
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FileReporter, 0 | 0 );
3736
+ if (!SWIG_IsOK(res1)) {
3737
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FileReporter *","sendReport", 1, self ));
3738
+ }
3739
+ arg1 = reinterpret_cast< FileReporter * >(argp1);
3740
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Event, 0 | 0 );
3741
+ if (!SWIG_IsOK(res2)) {
3742
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Event *","sendReport", 2, argv[0] ));
3743
+ }
3744
+ arg2 = reinterpret_cast< Event * >(argp2);
3745
+ result = (bool)(arg1)->sendReport(arg2);
3746
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3747
+ return vresult;
3748
+ fail:
3749
+ return Qnil;
3750
+ }
3751
+
3752
+
3753
+ SWIGINTERN VALUE
3754
+ _wrap_FileReporter_sendReport__SWIG_1(int argc, VALUE *argv, VALUE self) {
3755
+ FileReporter *arg1 = (FileReporter *) 0 ;
3756
+ Event *arg2 = (Event *) 0 ;
3757
+ oboe_metadata_t *arg3 = (oboe_metadata_t *) 0 ;
3758
+ void *argp1 = 0 ;
3759
+ int res1 = 0 ;
3760
+ void *argp2 = 0 ;
3761
+ int res2 = 0 ;
3762
+ void *argp3 = 0 ;
3763
+ int res3 = 0 ;
3764
+ bool result;
3765
+ VALUE vresult = Qnil;
3766
+
3767
+ if ((argc < 2) || (argc > 2)) {
3768
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3769
+ }
3770
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FileReporter, 0 | 0 );
3771
+ if (!SWIG_IsOK(res1)) {
3772
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FileReporter *","sendReport", 1, self ));
3773
+ }
3774
+ arg1 = reinterpret_cast< FileReporter * >(argp1);
3775
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Event, 0 | 0 );
3776
+ if (!SWIG_IsOK(res2)) {
3777
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Event *","sendReport", 2, argv[0] ));
3778
+ }
3779
+ arg2 = reinterpret_cast< Event * >(argp2);
3780
+ res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_oboe_metadata_t, 0 | 0 );
3781
+ if (!SWIG_IsOK(res3)) {
3782
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "oboe_metadata_t *","sendReport", 3, argv[1] ));
3783
+ }
3784
+ arg3 = reinterpret_cast< oboe_metadata_t * >(argp3);
3785
+ result = (bool)(arg1)->sendReport(arg2,arg3);
3786
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3787
+ return vresult;
3788
+ fail:
3789
+ return Qnil;
3790
+ }
3791
+
3792
+
3793
+ SWIGINTERN VALUE _wrap_FileReporter_sendReport(int nargs, VALUE *args, VALUE self) {
3794
+ int argc;
3795
+ VALUE argv[4];
3796
+ int ii;
3797
+
3798
+ argc = nargs + 1;
3799
+ argv[0] = self;
3800
+ if (argc > 4) SWIG_fail;
3801
+ for (ii = 1; (ii < argc); ++ii) {
3802
+ argv[ii] = args[ii-1];
3803
+ }
3804
+ if (argc == 2) {
3805
+ int _v;
3806
+ void *vptr = 0;
3807
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FileReporter, 0);
3808
+ _v = SWIG_CheckState(res);
3809
+ if (_v) {
3810
+ void *vptr = 0;
3811
+ int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Event, 0);
3812
+ _v = SWIG_CheckState(res);
3813
+ if (_v) {
3814
+ return _wrap_FileReporter_sendReport__SWIG_0(nargs, args, self);
3815
+ }
3816
+ }
3817
+ }
3818
+ if (argc == 3) {
3819
+ int _v;
3820
+ void *vptr = 0;
3821
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FileReporter, 0);
3822
+ _v = SWIG_CheckState(res);
3823
+ if (_v) {
3824
+ void *vptr = 0;
3825
+ int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Event, 0);
3826
+ _v = SWIG_CheckState(res);
3827
+ if (_v) {
3828
+ void *vptr = 0;
3829
+ int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_oboe_metadata_t, 0);
3830
+ _v = SWIG_CheckState(res);
3831
+ if (_v) {
3832
+ return _wrap_FileReporter_sendReport__SWIG_1(nargs, args, self);
3833
+ }
3834
+ }
3835
+ }
3836
+ }
3837
+
3838
+ fail:
3839
+ Ruby_Format_OverloadedError( argc, 4, "FileReporter.sendReport",
3840
+ " bool FileReporter.sendReport(Event *evt)\n"
3841
+ " bool FileReporter.sendReport(Event *evt, oboe_metadata_t *md)\n");
3842
+
3843
+ return Qnil;
3844
+ }
3845
+
3846
+
3847
+ swig_class SwigClassDebugLogger;
3848
+
3849
+ SWIGINTERN VALUE
3850
+ _wrap_DebugLogger_log(int argc, VALUE *argv, VALUE self) {
3851
+ DebugLogger *arg1 = (DebugLogger *) 0 ;
3852
+ int arg2 ;
3853
+ int arg3 ;
3854
+ char *arg4 = (char *) 0 ;
3855
+ int arg5 ;
3856
+ char *arg6 = (char *) 0 ;
3857
+ void *argp1 = 0 ;
3858
+ int res1 = 0 ;
3859
+ int val2 ;
3860
+ int ecode2 = 0 ;
3861
+ int val3 ;
3862
+ int ecode3 = 0 ;
3863
+ int res4 ;
3864
+ char *buf4 = 0 ;
3865
+ int alloc4 = 0 ;
3866
+ int val5 ;
3867
+ int ecode5 = 0 ;
3868
+ int res6 ;
3869
+ char *buf6 = 0 ;
3870
+ int alloc6 = 0 ;
3871
+
3872
+ if ((argc < 5) || (argc > 5)) {
3873
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
3874
+ }
3875
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_DebugLogger, 0 | 0 );
3876
+ if (!SWIG_IsOK(res1)) {
3877
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "DebugLogger *","log", 1, self ));
3878
+ }
3879
+ arg1 = reinterpret_cast< DebugLogger * >(argp1);
3880
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
3881
+ if (!SWIG_IsOK(ecode2)) {
3882
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","log", 2, argv[0] ));
3883
+ }
3884
+ arg2 = static_cast< int >(val2);
3885
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
3886
+ if (!SWIG_IsOK(ecode3)) {
3887
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","log", 3, argv[1] ));
3888
+ }
3889
+ arg3 = static_cast< int >(val3);
3890
+ res4 = SWIG_AsCharPtrAndSize(argv[2], &buf4, NULL, &alloc4);
3891
+ if (!SWIG_IsOK(res4)) {
3892
+ SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","log", 4, argv[2] ));
3893
+ }
3894
+ arg4 = reinterpret_cast< char * >(buf4);
3895
+ ecode5 = SWIG_AsVal_int(argv[3], &val5);
3896
+ if (!SWIG_IsOK(ecode5)) {
3897
+ SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "int","log", 5, argv[3] ));
3898
+ }
3899
+ arg5 = static_cast< int >(val5);
3900
+ res6 = SWIG_AsCharPtrAndSize(argv[4], &buf6, NULL, &alloc6);
3901
+ if (!SWIG_IsOK(res6)) {
3902
+ SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "char const *","log", 6, argv[4] ));
3903
+ }
3904
+ arg6 = reinterpret_cast< char * >(buf6);
3905
+ (arg1)->log(arg2,arg3,(char const *)arg4,arg5,(char const *)arg6);
3906
+ if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
3907
+ if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
3908
+ return Qnil;
3909
+ fail:
3910
+ if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
3911
+ if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
3912
+ return Qnil;
3913
+ }
3914
+
3915
+
3916
+ SWIGINTERN void
3917
+ free_DebugLogger(DebugLogger *arg1) {
3918
+ delete arg1;
3919
+ }
3920
+
3921
+ SWIGINTERN VALUE
3922
+ _wrap_oboe_debug_log_handler(int argc, VALUE *argv, VALUE self) {
3923
+ void *arg1 = (void *) 0 ;
3924
+ int arg2 ;
3925
+ int arg3 ;
3926
+ char *arg4 = (char *) 0 ;
3927
+ int arg5 ;
3928
+ char *arg6 = (char *) 0 ;
3929
+ int res1 ;
3930
+ int val2 ;
3931
+ int ecode2 = 0 ;
3932
+ int val3 ;
3933
+ int ecode3 = 0 ;
3934
+ int res4 ;
3935
+ char *buf4 = 0 ;
3936
+ int alloc4 = 0 ;
3937
+ int val5 ;
3938
+ int ecode5 = 0 ;
3939
+ int res6 ;
3940
+ char *buf6 = 0 ;
3941
+ int alloc6 = 0 ;
3942
+
3943
+ if ((argc < 6) || (argc > 6)) {
3944
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
3945
+ }
3946
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3947
+ if (!SWIG_IsOK(res1)) {
3948
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "void *","oboe_debug_log_handler", 1, argv[0] ));
3949
+ }
3950
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3951
+ if (!SWIG_IsOK(ecode2)) {
3952
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","oboe_debug_log_handler", 2, argv[1] ));
3953
+ }
3954
+ arg2 = static_cast< int >(val2);
3955
+ ecode3 = SWIG_AsVal_int(argv[2], &val3);
3956
+ if (!SWIG_IsOK(ecode3)) {
3957
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","oboe_debug_log_handler", 3, argv[2] ));
3958
+ }
3959
+ arg3 = static_cast< int >(val3);
3960
+ res4 = SWIG_AsCharPtrAndSize(argv[3], &buf4, NULL, &alloc4);
3961
+ if (!SWIG_IsOK(res4)) {
3962
+ SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","oboe_debug_log_handler", 4, argv[3] ));
3963
+ }
3964
+ arg4 = reinterpret_cast< char * >(buf4);
3965
+ ecode5 = SWIG_AsVal_int(argv[4], &val5);
3966
+ if (!SWIG_IsOK(ecode5)) {
3967
+ SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "int","oboe_debug_log_handler", 5, argv[4] ));
3968
+ }
3969
+ arg5 = static_cast< int >(val5);
3970
+ res6 = SWIG_AsCharPtrAndSize(argv[5], &buf6, NULL, &alloc6);
3971
+ if (!SWIG_IsOK(res6)) {
3972
+ SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "char const *","oboe_debug_log_handler", 6, argv[5] ));
3973
+ }
3974
+ arg6 = reinterpret_cast< char * >(buf6);
3975
+ oboe_debug_log_handler(arg1,arg2,arg3,(char const *)arg4,arg5,(char const *)arg6);
3976
+ if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
3977
+ if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
3978
+ return Qnil;
3979
+ fail:
3980
+ if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
3981
+ if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
3982
+ return Qnil;
3983
+ }
3984
+
3985
+
3986
+ swig_class SwigClassDebugLog;
3987
+
3988
+ SWIGINTERN VALUE
3989
+ _wrap_DebugLog_getLevelName(int argc, VALUE *argv, VALUE self) {
3990
+ int arg1 ;
3991
+ int val1 ;
3992
+ int ecode1 = 0 ;
3993
+ std::string result;
3994
+ VALUE vresult = Qnil;
3995
+
3996
+ if ((argc < 1) || (argc > 1)) {
3997
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3998
+ }
3999
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
4000
+ if (!SWIG_IsOK(ecode1)) {
4001
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","DebugLog::getLevelName", 1, argv[0] ));
4002
+ }
4003
+ arg1 = static_cast< int >(val1);
4004
+ result = DebugLog::getLevelName(arg1);
4005
+ vresult = SWIG_From_std_string(static_cast< std::string >(result));
4006
+ return vresult;
4007
+ fail:
4008
+ return Qnil;
4009
+ }
4010
+
4011
+
4012
+ SWIGINTERN VALUE
4013
+ _wrap_DebugLog_getModuleName(int argc, VALUE *argv, VALUE self) {
4014
+ int arg1 ;
4015
+ int val1 ;
4016
+ int ecode1 = 0 ;
4017
+ std::string result;
4018
+ VALUE vresult = Qnil;
4019
+
4020
+ if ((argc < 1) || (argc > 1)) {
4021
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4022
+ }
4023
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
4024
+ if (!SWIG_IsOK(ecode1)) {
4025
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","DebugLog::getModuleName", 1, argv[0] ));
4026
+ }
4027
+ arg1 = static_cast< int >(val1);
4028
+ result = DebugLog::getModuleName(arg1);
4029
+ vresult = SWIG_From_std_string(static_cast< std::string >(result));
4030
+ return vresult;
4031
+ fail:
4032
+ return Qnil;
4033
+ }
4034
+
4035
+
4036
+ SWIGINTERN VALUE
4037
+ _wrap_DebugLog_getLevel(int argc, VALUE *argv, VALUE self) {
4038
+ int arg1 ;
4039
+ int val1 ;
4040
+ int ecode1 = 0 ;
4041
+ int result;
4042
+ VALUE vresult = Qnil;
4043
+
4044
+ if ((argc < 1) || (argc > 1)) {
4045
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4046
+ }
4047
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
4048
+ if (!SWIG_IsOK(ecode1)) {
4049
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","DebugLog::getLevel", 1, argv[0] ));
4050
+ }
4051
+ arg1 = static_cast< int >(val1);
4052
+ result = (int)DebugLog::getLevel(arg1);
4053
+ vresult = SWIG_From_int(static_cast< int >(result));
4054
+ return vresult;
4055
+ fail:
4056
+ return Qnil;
4057
+ }
4058
+
4059
+
4060
+ SWIGINTERN VALUE
4061
+ _wrap_DebugLog_setLevel(int argc, VALUE *argv, VALUE self) {
4062
+ int arg1 ;
4063
+ int arg2 ;
4064
+ int val1 ;
4065
+ int ecode1 = 0 ;
4066
+ int val2 ;
4067
+ int ecode2 = 0 ;
4068
+
4069
+ if ((argc < 2) || (argc > 2)) {
4070
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4071
+ }
4072
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
4073
+ if (!SWIG_IsOK(ecode1)) {
4074
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","DebugLog::setLevel", 1, argv[0] ));
4075
+ }
4076
+ arg1 = static_cast< int >(val1);
4077
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
4078
+ if (!SWIG_IsOK(ecode2)) {
4079
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","DebugLog::setLevel", 2, argv[1] ));
4080
+ }
4081
+ arg2 = static_cast< int >(val2);
4082
+ DebugLog::setLevel(arg1,arg2);
4083
+ return Qnil;
4084
+ fail:
4085
+ return Qnil;
4086
+ }
4087
+
4088
+
4089
+ SWIGINTERN VALUE
4090
+ _wrap_DebugLog_setOutputStream(int argc, VALUE *argv, VALUE self) {
4091
+ FILE *arg1 = (FILE *) 0 ;
4092
+ void *argp1 = 0 ;
4093
+ int res1 = 0 ;
4094
+ int result;
4095
+ VALUE vresult = Qnil;
4096
+
4097
+ if ((argc < 1) || (argc > 1)) {
4098
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4099
+ }
4100
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_FILE, 0 | 0 );
4101
+ if (!SWIG_IsOK(res1)) {
4102
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FILE *","DebugLog::setOutputStream", 1, argv[0] ));
4103
+ }
4104
+ arg1 = reinterpret_cast< FILE * >(argp1);
4105
+ result = (int)DebugLog::setOutputStream(arg1);
4106
+ vresult = SWIG_From_int(static_cast< int >(result));
4107
+ return vresult;
4108
+ fail:
4109
+ return Qnil;
4110
+ }
4111
+
4112
+
4113
+ SWIGINTERN VALUE
4114
+ _wrap_DebugLog_setOutputFile(int argc, VALUE *argv, VALUE self) {
4115
+ char *arg1 = (char *) 0 ;
4116
+ int res1 ;
4117
+ char *buf1 = 0 ;
4118
+ int alloc1 = 0 ;
4119
+ int result;
4120
+ VALUE vresult = Qnil;
4121
+
4122
+ if ((argc < 1) || (argc > 1)) {
4123
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4124
+ }
4125
+ res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
4126
+ if (!SWIG_IsOK(res1)) {
4127
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","DebugLog::setOutputFile", 1, argv[0] ));
4128
+ }
4129
+ arg1 = reinterpret_cast< char * >(buf1);
4130
+ result = (int)DebugLog::setOutputFile((char const *)arg1);
4131
+ vresult = SWIG_From_int(static_cast< int >(result));
4132
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4133
+ return vresult;
4134
+ fail:
4135
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4136
+ return Qnil;
4137
+ }
4138
+
4139
+
4140
+ SWIGINTERN VALUE
4141
+ _wrap_DebugLog_addDebugLogger(int argc, VALUE *argv, VALUE self) {
4142
+ DebugLogger *arg1 = (DebugLogger *) 0 ;
4143
+ int arg2 ;
4144
+ void *argp1 = 0 ;
4145
+ int res1 = 0 ;
4146
+ int val2 ;
4147
+ int ecode2 = 0 ;
4148
+ int result;
4149
+ VALUE vresult = Qnil;
4150
+
4151
+ if ((argc < 2) || (argc > 2)) {
4152
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4153
+ }
4154
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_DebugLogger, 0 | 0 );
4155
+ if (!SWIG_IsOK(res1)) {
4156
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "DebugLogger *","DebugLog::addDebugLogger", 1, argv[0] ));
4157
+ }
4158
+ arg1 = reinterpret_cast< DebugLogger * >(argp1);
4159
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
4160
+ if (!SWIG_IsOK(ecode2)) {
4161
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","DebugLog::addDebugLogger", 2, argv[1] ));
4162
+ }
4163
+ arg2 = static_cast< int >(val2);
4164
+ result = (int)DebugLog::addDebugLogger(arg1,arg2);
4165
+ vresult = SWIG_From_int(static_cast< int >(result));
4166
+ return vresult;
4167
+ fail:
4168
+ return Qnil;
4169
+ }
4170
+
4171
+
4172
+ SWIGINTERN VALUE
4173
+ _wrap_DebugLog_removeDebugLogger(int argc, VALUE *argv, VALUE self) {
4174
+ DebugLogger *arg1 = (DebugLogger *) 0 ;
4175
+ void *argp1 = 0 ;
4176
+ int res1 = 0 ;
4177
+ int result;
4178
+ VALUE vresult = Qnil;
4179
+
4180
+ if ((argc < 1) || (argc > 1)) {
4181
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4182
+ }
4183
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_DebugLogger, 0 | 0 );
4184
+ if (!SWIG_IsOK(res1)) {
4185
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "DebugLogger *","DebugLog::removeDebugLogger", 1, argv[0] ));
4186
+ }
4187
+ arg1 = reinterpret_cast< DebugLogger * >(argp1);
4188
+ result = (int)DebugLog::removeDebugLogger(arg1);
4189
+ vresult = SWIG_From_int(static_cast< int >(result));
4190
+ return vresult;
4191
+ fail:
4192
+ return Qnil;
4193
+ }
4194
+
4195
+
4196
+ SWIGINTERN VALUE
4197
+ _wrap_DebugLog_logMessage(int argc, VALUE *argv, VALUE self) {
4198
+ int arg1 ;
4199
+ int arg2 ;
4200
+ char *arg3 = (char *) 0 ;
4201
+ int arg4 ;
4202
+ char *arg5 = (char *) 0 ;
4203
+ int val1 ;
4204
+ int ecode1 = 0 ;
4205
+ int val2 ;
4206
+ int ecode2 = 0 ;
4207
+ int res3 ;
4208
+ char *buf3 = 0 ;
4209
+ int alloc3 = 0 ;
4210
+ int val4 ;
4211
+ int ecode4 = 0 ;
4212
+ int res5 ;
4213
+ char *buf5 = 0 ;
4214
+ int alloc5 = 0 ;
4215
+
4216
+ if ((argc < 5) || (argc > 5)) {
4217
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
4218
+ }
4219
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
4220
+ if (!SWIG_IsOK(ecode1)) {
4221
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","DebugLog::logMessage", 1, argv[0] ));
4222
+ }
4223
+ arg1 = static_cast< int >(val1);
4224
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
4225
+ if (!SWIG_IsOK(ecode2)) {
4226
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","DebugLog::logMessage", 2, argv[1] ));
4227
+ }
4228
+ arg2 = static_cast< int >(val2);
4229
+ res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
4230
+ if (!SWIG_IsOK(res3)) {
4231
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","DebugLog::logMessage", 3, argv[2] ));
4232
+ }
4233
+ arg3 = reinterpret_cast< char * >(buf3);
4234
+ ecode4 = SWIG_AsVal_int(argv[3], &val4);
4235
+ if (!SWIG_IsOK(ecode4)) {
4236
+ SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","DebugLog::logMessage", 4, argv[3] ));
4237
+ }
4238
+ arg4 = static_cast< int >(val4);
4239
+ res5 = SWIG_AsCharPtrAndSize(argv[4], &buf5, NULL, &alloc5);
4240
+ if (!SWIG_IsOK(res5)) {
4241
+ SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "char const *","DebugLog::logMessage", 5, argv[4] ));
4242
+ }
4243
+ arg5 = reinterpret_cast< char * >(buf5);
4244
+ DebugLog::logMessage(arg1,arg2,(char const *)arg3,arg4,(char const *)arg5);
4245
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4246
+ if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
4247
+ return Qnil;
4248
+ fail:
4249
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4250
+ if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
4251
+ return Qnil;
4252
+ }
4253
+
4254
+
4255
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
4256
+ SWIGINTERN VALUE
4257
+ _wrap_DebugLog_allocate(VALUE self) {
4258
+ #else
4259
+ SWIGINTERN VALUE
4260
+ _wrap_DebugLog_allocate(int argc, VALUE *argv, VALUE self) {
4261
+ #endif
4262
+
4263
+
4264
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_DebugLog);
4265
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
4266
+ rb_obj_call_init(vresult, argc, argv);
4267
+ #endif
4268
+ return vresult;
4269
+ }
4270
+
4271
+
4272
+ SWIGINTERN VALUE
4273
+ _wrap_new_DebugLog(int argc, VALUE *argv, VALUE self) {
4274
+ DebugLog *result = 0 ;
4275
+
4276
+ if ((argc < 0) || (argc > 0)) {
4277
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4278
+ }
4279
+ result = (DebugLog *)new DebugLog();
4280
+ DATA_PTR(self) = result;
4281
+ return self;
4282
+ fail:
4283
+ return Qnil;
4284
+ }
4285
+
4286
+
4287
+ SWIGINTERN void
4288
+ free_DebugLog(DebugLog *arg1) {
4289
+ delete arg1;
4290
+ }
4291
+
4292
+ swig_class SwigClassConfig;
4293
+
4294
+ SWIGINTERN VALUE
4295
+ _wrap_Config_checkVersion(int argc, VALUE *argv, VALUE self) {
4296
+ int arg1 ;
4297
+ int arg2 ;
4298
+ int val1 ;
4299
+ int ecode1 = 0 ;
4300
+ int val2 ;
4301
+ int ecode2 = 0 ;
4302
+ bool result;
4303
+ VALUE vresult = Qnil;
4304
+
4305
+ if ((argc < 2) || (argc > 2)) {
4306
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4307
+ }
4308
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
4309
+ if (!SWIG_IsOK(ecode1)) {
4310
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Config::checkVersion", 1, argv[0] ));
4311
+ }
4312
+ arg1 = static_cast< int >(val1);
4313
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
4314
+ if (!SWIG_IsOK(ecode2)) {
4315
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Config::checkVersion", 2, argv[1] ));
4316
+ }
4317
+ arg2 = static_cast< int >(val2);
4318
+ result = (bool)Config::checkVersion(arg1,arg2);
4319
+ vresult = SWIG_From_bool(static_cast< bool >(result));
4320
+ return vresult;
4321
+ fail:
4322
+ return Qnil;
4323
+ }
4324
+
4325
+
4326
+ SWIGINTERN VALUE
4327
+ _wrap_Config_getVersion(int argc, VALUE *argv, VALUE self) {
4328
+ int result;
4329
+ VALUE vresult = Qnil;
4330
+
4331
+ if ((argc < 0) || (argc > 0)) {
4332
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4333
+ }
4334
+ result = (int)Config::getVersion();
4335
+ vresult = SWIG_From_int(static_cast< int >(result));
4336
+ return vresult;
4337
+ fail:
4338
+ return Qnil;
4339
+ }
4340
+
4341
+
4342
+ SWIGINTERN VALUE
4343
+ _wrap_Config_getRevision(int argc, VALUE *argv, VALUE self) {
4344
+ int result;
4345
+ VALUE vresult = Qnil;
4346
+
4347
+ if ((argc < 0) || (argc > 0)) {
4348
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4349
+ }
4350
+ result = (int)Config::getRevision();
4351
+ vresult = SWIG_From_int(static_cast< int >(result));
4352
+ return vresult;
4353
+ fail:
4354
+ return Qnil;
4355
+ }
4356
+
4357
+
4358
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
4359
+ SWIGINTERN VALUE
4360
+ _wrap_Config_allocate(VALUE self) {
4361
+ #else
4362
+ SWIGINTERN VALUE
4363
+ _wrap_Config_allocate(int argc, VALUE *argv, VALUE self) {
4364
+ #endif
4365
+
4366
+
4367
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Config);
4368
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
4369
+ rb_obj_call_init(vresult, argc, argv);
4370
+ #endif
4371
+ return vresult;
4372
+ }
4373
+
4374
+
4375
+ SWIGINTERN VALUE
4376
+ _wrap_new_Config(int argc, VALUE *argv, VALUE self) {
4377
+ Config *result = 0 ;
4378
+
4379
+ if ((argc < 0) || (argc > 0)) {
4380
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4381
+ }
4382
+ result = (Config *)new Config();
4383
+ DATA_PTR(self) = result;
4384
+ return self;
4385
+ fail:
4386
+ return Qnil;
4387
+ }
4388
+
4389
+
4390
+ SWIGINTERN void
4391
+ free_Config(Config *arg1) {
4392
+ delete arg1;
4393
+ }
4394
+
4395
+
4396
+ /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
4397
+
4398
+ static void *_p_MetadataTo_p_oboe_metadata_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
4399
+ return (void *)((oboe_metadata_t *) ((Metadata *) x));
4400
+ }
4401
+ static swig_type_info _swigt__p_Config = {"_p_Config", "Config *", 0, 0, (void*)0, 0};
4402
+ static swig_type_info _swigt__p_Context = {"_p_Context", "Context *", 0, 0, (void*)0, 0};
4403
+ static swig_type_info _swigt__p_DebugLog = {"_p_DebugLog", "DebugLog *", 0, 0, (void*)0, 0};
4404
+ static swig_type_info _swigt__p_DebugLogger = {"_p_DebugLogger", "DebugLogger *", 0, 0, (void*)0, 0};
4405
+ static swig_type_info _swigt__p_Event = {"_p_Event", "Event *", 0, 0, (void*)0, 0};
4406
+ static swig_type_info _swigt__p_FILE = {"_p_FILE", "FILE *", 0, 0, (void*)0, 0};
4407
+ static swig_type_info _swigt__p_FileReporter = {"_p_FileReporter", "FileReporter *", 0, 0, (void*)0, 0};
4408
+ static swig_type_info _swigt__p_Metadata = {"_p_Metadata", "Metadata *", 0, 0, (void*)0, 0};
4409
+ static swig_type_info _swigt__p_Reporter = {"_p_Reporter", "Reporter *", 0, 0, (void*)0, 0};
4410
+ static swig_type_info _swigt__p_SslReporter = {"_p_SslReporter", "SslReporter *", 0, 0, (void*)0, 0};
4411
+ static swig_type_info _swigt__p_UdpReporter = {"_p_UdpReporter", "UdpReporter *", 0, 0, (void*)0, 0};
4412
+ static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
4413
+ static swig_type_info _swigt__p_oboe_metadata_t = {"_p_oboe_metadata_t", "oboe_metadata_t *", 0, 0, (void*)0, 0};
4414
+
4415
+ static swig_type_info *swig_type_initial[] = {
4416
+ &_swigt__p_Config,
4417
+ &_swigt__p_Context,
4418
+ &_swigt__p_DebugLog,
4419
+ &_swigt__p_DebugLogger,
4420
+ &_swigt__p_Event,
4421
+ &_swigt__p_FILE,
4422
+ &_swigt__p_FileReporter,
4423
+ &_swigt__p_Metadata,
4424
+ &_swigt__p_Reporter,
4425
+ &_swigt__p_SslReporter,
4426
+ &_swigt__p_UdpReporter,
4427
+ &_swigt__p_char,
4428
+ &_swigt__p_oboe_metadata_t,
4429
+ };
4430
+
4431
+ static swig_cast_info _swigc__p_Config[] = { {&_swigt__p_Config, 0, 0, 0},{0, 0, 0, 0}};
4432
+ static swig_cast_info _swigc__p_Context[] = { {&_swigt__p_Context, 0, 0, 0},{0, 0, 0, 0}};
4433
+ static swig_cast_info _swigc__p_DebugLog[] = { {&_swigt__p_DebugLog, 0, 0, 0},{0, 0, 0, 0}};
4434
+ static swig_cast_info _swigc__p_DebugLogger[] = { {&_swigt__p_DebugLogger, 0, 0, 0},{0, 0, 0, 0}};
4435
+ static swig_cast_info _swigc__p_Event[] = { {&_swigt__p_Event, 0, 0, 0},{0, 0, 0, 0}};
4436
+ static swig_cast_info _swigc__p_FILE[] = { {&_swigt__p_FILE, 0, 0, 0},{0, 0, 0, 0}};
4437
+ static swig_cast_info _swigc__p_FileReporter[] = { {&_swigt__p_FileReporter, 0, 0, 0},{0, 0, 0, 0}};
4438
+ static swig_cast_info _swigc__p_Metadata[] = { {&_swigt__p_Metadata, 0, 0, 0},{0, 0, 0, 0}};
4439
+ static swig_cast_info _swigc__p_Reporter[] = { {&_swigt__p_Reporter, 0, 0, 0},{0, 0, 0, 0}};
4440
+ static swig_cast_info _swigc__p_SslReporter[] = { {&_swigt__p_SslReporter, 0, 0, 0},{0, 0, 0, 0}};
4441
+ static swig_cast_info _swigc__p_UdpReporter[] = { {&_swigt__p_UdpReporter, 0, 0, 0},{0, 0, 0, 0}};
4442
+ static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
4443
+ static swig_cast_info _swigc__p_oboe_metadata_t[] = { {&_swigt__p_Metadata, _p_MetadataTo_p_oboe_metadata_t, 0, 0}, {&_swigt__p_oboe_metadata_t, 0, 0, 0},{0, 0, 0, 0}};
4444
+
4445
+ static swig_cast_info *swig_cast_initial[] = {
4446
+ _swigc__p_Config,
4447
+ _swigc__p_Context,
4448
+ _swigc__p_DebugLog,
4449
+ _swigc__p_DebugLogger,
4450
+ _swigc__p_Event,
4451
+ _swigc__p_FILE,
4452
+ _swigc__p_FileReporter,
4453
+ _swigc__p_Metadata,
4454
+ _swigc__p_Reporter,
4455
+ _swigc__p_SslReporter,
4456
+ _swigc__p_UdpReporter,
4457
+ _swigc__p_char,
4458
+ _swigc__p_oboe_metadata_t,
4459
+ };
4460
+
4461
+
4462
+ /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
4463
+
4464
+ /* -----------------------------------------------------------------------------
4465
+ * Type initialization:
4466
+ * This problem is tough by the requirement that no dynamic
4467
+ * memory is used. Also, since swig_type_info structures store pointers to
4468
+ * swig_cast_info structures and swig_cast_info structures store pointers back
4469
+ * to swig_type_info structures, we need some lookup code at initialization.
4470
+ * The idea is that swig generates all the structures that are needed.
4471
+ * The runtime then collects these partially filled structures.
4472
+ * The SWIG_InitializeModule function takes these initial arrays out of
4473
+ * swig_module, and does all the lookup, filling in the swig_module.types
4474
+ * array with the correct data and linking the correct swig_cast_info
4475
+ * structures together.
4476
+ *
4477
+ * The generated swig_type_info structures are assigned staticly to an initial
4478
+ * array. We just loop through that array, and handle each type individually.
4479
+ * First we lookup if this type has been already loaded, and if so, use the
4480
+ * loaded structure instead of the generated one. Then we have to fill in the
4481
+ * cast linked list. The cast data is initially stored in something like a
4482
+ * two-dimensional array. Each row corresponds to a type (there are the same
4483
+ * number of rows as there are in the swig_type_initial array). Each entry in
4484
+ * a column is one of the swig_cast_info structures for that type.
4485
+ * The cast_initial array is actually an array of arrays, because each row has
4486
+ * a variable number of columns. So to actually build the cast linked list,
4487
+ * we find the array of casts associated with the type, and loop through it
4488
+ * adding the casts to the list. The one last trick we need to do is making
4489
+ * sure the type pointer in the swig_cast_info struct is correct.
4490
+ *
4491
+ * First off, we lookup the cast->type name to see if it is already loaded.
4492
+ * There are three cases to handle:
4493
+ * 1) If the cast->type has already been loaded AND the type we are adding
4494
+ * casting info to has not been loaded (it is in this module), THEN we
4495
+ * replace the cast->type pointer with the type pointer that has already
4496
+ * been loaded.
4497
+ * 2) If BOTH types (the one we are adding casting info to, and the
4498
+ * cast->type) are loaded, THEN the cast info has already been loaded by
4499
+ * the previous module so we just ignore it.
4500
+ * 3) Finally, if cast->type has not already been loaded, then we add that
4501
+ * swig_cast_info to the linked list (because the cast->type) pointer will
4502
+ * be correct.
4503
+ * ----------------------------------------------------------------------------- */
4504
+
4505
+ #ifdef __cplusplus
4506
+ extern "C" {
4507
+ #if 0
4508
+ } /* c-mode */
4509
+ #endif
4510
+ #endif
4511
+
4512
+ #if 0
4513
+ #define SWIGRUNTIME_DEBUG
4514
+ #endif
4515
+
4516
+
4517
+ SWIGRUNTIME void
4518
+ SWIG_InitializeModule(void *clientdata) {
4519
+ size_t i;
4520
+ swig_module_info *module_head, *iter;
4521
+ int found, init;
4522
+
4523
+ clientdata = clientdata;
4524
+
4525
+ /* check to see if the circular list has been setup, if not, set it up */
4526
+ if (swig_module.next==0) {
4527
+ /* Initialize the swig_module */
4528
+ swig_module.type_initial = swig_type_initial;
4529
+ swig_module.cast_initial = swig_cast_initial;
4530
+ swig_module.next = &swig_module;
4531
+ init = 1;
4532
+ } else {
4533
+ init = 0;
4534
+ }
4535
+
4536
+ /* Try and load any already created modules */
4537
+ module_head = SWIG_GetModule(clientdata);
4538
+ if (!module_head) {
4539
+ /* This is the first module loaded for this interpreter */
4540
+ /* so set the swig module into the interpreter */
4541
+ SWIG_SetModule(clientdata, &swig_module);
4542
+ module_head = &swig_module;
4543
+ } else {
4544
+ /* the interpreter has loaded a SWIG module, but has it loaded this one? */
4545
+ found=0;
4546
+ iter=module_head;
4547
+ do {
4548
+ if (iter==&swig_module) {
4549
+ found=1;
4550
+ break;
4551
+ }
4552
+ iter=iter->next;
4553
+ } while (iter!= module_head);
4554
+
4555
+ /* if the is found in the list, then all is done and we may leave */
4556
+ if (found) return;
4557
+ /* otherwise we must add out module into the list */
4558
+ swig_module.next = module_head->next;
4559
+ module_head->next = &swig_module;
4560
+ }
4561
+
4562
+ /* When multiple interpeters are used, a module could have already been initialized in
4563
+ a different interpreter, but not yet have a pointer in this interpreter.
4564
+ In this case, we do not want to continue adding types... everything should be
4565
+ set up already */
4566
+ if (init == 0) return;
4567
+
4568
+ /* Now work on filling in swig_module.types */
4569
+ #ifdef SWIGRUNTIME_DEBUG
4570
+ printf("SWIG_InitializeModule: size %d\n", swig_module.size);
4571
+ #endif
4572
+ for (i = 0; i < swig_module.size; ++i) {
4573
+ swig_type_info *type = 0;
4574
+ swig_type_info *ret;
4575
+ swig_cast_info *cast;
4576
+
4577
+ #ifdef SWIGRUNTIME_DEBUG
4578
+ printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
4579
+ #endif
4580
+
4581
+ /* if there is another module already loaded */
4582
+ if (swig_module.next != &swig_module) {
4583
+ type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
4584
+ }
4585
+ if (type) {
4586
+ /* Overwrite clientdata field */
4587
+ #ifdef SWIGRUNTIME_DEBUG
4588
+ printf("SWIG_InitializeModule: found type %s\n", type->name);
4589
+ #endif
4590
+ if (swig_module.type_initial[i]->clientdata) {
4591
+ type->clientdata = swig_module.type_initial[i]->clientdata;
4592
+ #ifdef SWIGRUNTIME_DEBUG
4593
+ printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
4594
+ #endif
4595
+ }
4596
+ } else {
4597
+ type = swig_module.type_initial[i];
4598
+ }
4599
+
4600
+ /* Insert casting types */
4601
+ cast = swig_module.cast_initial[i];
4602
+ while (cast->type) {
4603
+
4604
+ /* Don't need to add information already in the list */
4605
+ ret = 0;
4606
+ #ifdef SWIGRUNTIME_DEBUG
4607
+ printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
4608
+ #endif
4609
+ if (swig_module.next != &swig_module) {
4610
+ ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
4611
+ #ifdef SWIGRUNTIME_DEBUG
4612
+ if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
4613
+ #endif
4614
+ }
4615
+ if (ret) {
4616
+ if (type == swig_module.type_initial[i]) {
4617
+ #ifdef SWIGRUNTIME_DEBUG
4618
+ printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
4619
+ #endif
4620
+ cast->type = ret;
4621
+ ret = 0;
4622
+ } else {
4623
+ /* Check for casting already in the list */
4624
+ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
4625
+ #ifdef SWIGRUNTIME_DEBUG
4626
+ if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
4627
+ #endif
4628
+ if (!ocast) ret = 0;
4629
+ }
4630
+ }
4631
+
4632
+ if (!ret) {
4633
+ #ifdef SWIGRUNTIME_DEBUG
4634
+ printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
4635
+ #endif
4636
+ if (type->cast) {
4637
+ type->cast->prev = cast;
4638
+ cast->next = type->cast;
4639
+ }
4640
+ type->cast = cast;
4641
+ }
4642
+ cast++;
4643
+ }
4644
+ /* Set entry in modules->types array equal to the type */
4645
+ swig_module.types[i] = type;
4646
+ }
4647
+ swig_module.types[i] = 0;
4648
+
4649
+ #ifdef SWIGRUNTIME_DEBUG
4650
+ printf("**** SWIG_InitializeModule: Cast List ******\n");
4651
+ for (i = 0; i < swig_module.size; ++i) {
4652
+ int j = 0;
4653
+ swig_cast_info *cast = swig_module.cast_initial[i];
4654
+ printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
4655
+ while (cast->type) {
4656
+ printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
4657
+ cast++;
4658
+ ++j;
4659
+ }
4660
+ printf("---- Total casts: %d\n",j);
4661
+ }
4662
+ printf("**** SWIG_InitializeModule: Cast List ******\n");
4663
+ #endif
4664
+ }
4665
+
4666
+ /* This function will propagate the clientdata field of type to
4667
+ * any new swig_type_info structures that have been added into the list
4668
+ * of equivalent types. It is like calling
4669
+ * SWIG_TypeClientData(type, clientdata) a second time.
4670
+ */
4671
+ SWIGRUNTIME void
4672
+ SWIG_PropagateClientData(void) {
4673
+ size_t i;
4674
+ swig_cast_info *equiv;
4675
+ static int init_run = 0;
4676
+
4677
+ if (init_run) return;
4678
+ init_run = 1;
4679
+
4680
+ for (i = 0; i < swig_module.size; i++) {
4681
+ if (swig_module.types[i]->clientdata) {
4682
+ equiv = swig_module.types[i]->cast;
4683
+ while (equiv) {
4684
+ if (!equiv->converter) {
4685
+ if (equiv->type && !equiv->type->clientdata)
4686
+ SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
4687
+ }
4688
+ equiv = equiv->next;
4689
+ }
4690
+ }
4691
+ }
4692
+ }
4693
+
4694
+ #ifdef __cplusplus
4695
+ #if 0
4696
+ { /* c-mode */
4697
+ #endif
4698
+ }
4699
+ #endif
4700
+
4701
+ /*
4702
+
4703
+ */
4704
+ #ifdef __cplusplus
4705
+ extern "C"
4706
+ #endif
4707
+ SWIGEXPORT void Init_oboe_metal(void) {
4708
+ size_t i;
4709
+
4710
+ SWIG_InitRuntime();
4711
+ mOboe_metal = rb_define_module("Oboe_metal");
4712
+
4713
+ SWIG_InitializeModule(0);
4714
+ for (i = 0; i < swig_module.size; i++) {
4715
+ SWIG_define_class(swig_module.types[i]);
4716
+ }
4717
+
4718
+ SWIG_RubyInitializeTrackings();
4719
+ rb_define_const(mOboe_metal, "OBOE_DEBUG_FATAL", SWIG_From_int(static_cast< int >(OBOE_DEBUG_FATAL)));
4720
+ rb_define_const(mOboe_metal, "OBOE_DEBUG_ERROR", SWIG_From_int(static_cast< int >(OBOE_DEBUG_ERROR)));
4721
+ rb_define_const(mOboe_metal, "OBOE_DEBUG_WARNING", SWIG_From_int(static_cast< int >(OBOE_DEBUG_WARNING)));
4722
+ rb_define_const(mOboe_metal, "OBOE_DEBUG_INFO", SWIG_From_int(static_cast< int >(OBOE_DEBUG_INFO)));
4723
+ rb_define_const(mOboe_metal, "OBOE_DEBUG_LOW", SWIG_From_int(static_cast< int >(OBOE_DEBUG_LOW)));
4724
+ rb_define_const(mOboe_metal, "OBOE_DEBUG_MEDIUM", SWIG_From_int(static_cast< int >(OBOE_DEBUG_MEDIUM)));
4725
+ rb_define_const(mOboe_metal, "OBOE_DEBUG_HIGH", SWIG_From_int(static_cast< int >(OBOE_DEBUG_HIGH)));
4726
+ rb_define_const(mOboe_metal, "OBOE_MODULE_ALL", SWIG_From_int(static_cast< int >(OBOE_MODULE_ALL)));
4727
+ rb_define_const(mOboe_metal, "OBOE_MODULE_UNDEF", SWIG_From_int(static_cast< int >(OBOE_MODULE_UNDEF)));
4728
+ rb_define_const(mOboe_metal, "OBOE_MODULE_LIBOBOE", SWIG_From_int(static_cast< int >(OBOE_MODULE_LIBOBOE)));
4729
+ rb_define_const(mOboe_metal, "OBOE_MODULE_SETTINGS", SWIG_From_int(static_cast< int >(OBOE_MODULE_SETTINGS)));
4730
+ rb_define_const(mOboe_metal, "OBOE_MODULE_REPORTER_FILE", SWIG_From_int(static_cast< int >(OBOE_MODULE_REPORTER_FILE)));
4731
+ rb_define_const(mOboe_metal, "OBOE_MODULE_REPORTER_UDP", SWIG_From_int(static_cast< int >(OBOE_MODULE_REPORTER_UDP)));
4732
+ rb_define_const(mOboe_metal, "OBOE_MODULE_REPORTER_SSL", SWIG_From_int(static_cast< int >(OBOE_MODULE_REPORTER_SSL)));
4733
+
4734
+ SwigClassMetadata.klass = rb_define_class_under(mOboe_metal, "Metadata", rb_cObject);
4735
+ SWIG_TypeClientData(SWIGTYPE_p_Metadata, (void *) &SwigClassMetadata);
4736
+ rb_define_alloc_func(SwigClassMetadata.klass, _wrap_Metadata_allocate);
4737
+ rb_define_method(SwigClassMetadata.klass, "initialize", VALUEFUNC(_wrap_new_Metadata), -1);
4738
+ rb_define_singleton_method(SwigClassMetadata.klass, "fromString", VALUEFUNC(_wrap_Metadata_fromString), -1);
4739
+ rb_define_method(SwigClassMetadata.klass, "createEvent", VALUEFUNC(_wrap_Metadata_createEvent), -1);
4740
+ rb_define_singleton_method(SwigClassMetadata.klass, "makeRandom", VALUEFUNC(_wrap_Metadata_makeRandom), -1);
4741
+ rb_define_method(SwigClassMetadata.klass, "copy", VALUEFUNC(_wrap_Metadata_copy), -1);
4742
+ rb_define_method(SwigClassMetadata.klass, "isValid", VALUEFUNC(_wrap_Metadata_isValid), -1);
4743
+ rb_define_method(SwigClassMetadata.klass, "toString", VALUEFUNC(_wrap_Metadata_toString), -1);
4744
+ SwigClassMetadata.mark = 0;
4745
+ SwigClassMetadata.destroy = (void (*)(void *)) free_Metadata;
4746
+ SwigClassMetadata.trackObjects = 0;
4747
+
4748
+ SwigClassContext.klass = rb_define_class_under(mOboe_metal, "Context", rb_cObject);
4749
+ SWIG_TypeClientData(SWIGTYPE_p_Context, (void *) &SwigClassContext);
4750
+ rb_define_alloc_func(SwigClassContext.klass, _wrap_Context_allocate);
4751
+ rb_define_method(SwigClassContext.klass, "initialize", VALUEFUNC(_wrap_new_Context), -1);
4752
+ rb_define_singleton_method(SwigClassContext.klass, "setTracingMode", VALUEFUNC(_wrap_Context_setTracingMode), -1);
4753
+ rb_define_singleton_method(SwigClassContext.klass, "setDefaultSampleRate", VALUEFUNC(_wrap_Context_setDefaultSampleRate), -1);
4754
+ rb_define_singleton_method(SwigClassContext.klass, "sampleRequest", VALUEFUNC(_wrap_Context_sampleRequest), -1);
4755
+ rb_define_singleton_method(SwigClassContext.klass, "get", VALUEFUNC(_wrap_Context_get), -1);
4756
+ rb_define_singleton_method(SwigClassContext.klass, "toString", VALUEFUNC(_wrap_Context_toString), -1);
4757
+ rb_define_singleton_method(SwigClassContext.klass, "set", VALUEFUNC(_wrap_Context_set), -1);
4758
+ rb_define_singleton_method(SwigClassContext.klass, "fromString", VALUEFUNC(_wrap_Context_fromString), -1);
4759
+ rb_define_singleton_method(SwigClassContext.klass, "copy", VALUEFUNC(_wrap_Context_copy), -1);
4760
+ rb_define_singleton_method(SwigClassContext.klass, "clear", VALUEFUNC(_wrap_Context_clear), -1);
4761
+ rb_define_singleton_method(SwigClassContext.klass, "isValid", VALUEFUNC(_wrap_Context_isValid), -1);
4762
+ rb_define_singleton_method(SwigClassContext.klass, "init", VALUEFUNC(_wrap_Context_init), -1);
4763
+ rb_define_singleton_method(SwigClassContext.klass, "disconnect", VALUEFUNC(_wrap_Context_disconnect), -1);
4764
+ rb_define_singleton_method(SwigClassContext.klass, "reconnect", VALUEFUNC(_wrap_Context_reconnect), -1);
4765
+ rb_define_singleton_method(SwigClassContext.klass, "shutdown", VALUEFUNC(_wrap_Context_shutdown), -1);
4766
+ rb_define_singleton_method(SwigClassContext.klass, "createEvent", VALUEFUNC(_wrap_Context_createEvent), -1);
4767
+ rb_define_singleton_method(SwigClassContext.klass, "startTrace", VALUEFUNC(_wrap_Context_startTrace), -1);
4768
+ SwigClassContext.mark = 0;
4769
+ SwigClassContext.destroy = (void (*)(void *)) free_Context;
4770
+ SwigClassContext.trackObjects = 0;
4771
+
4772
+ SwigClassEvent.klass = rb_define_class_under(mOboe_metal, "Event", rb_cObject);
4773
+ SWIG_TypeClientData(SWIGTYPE_p_Event, (void *) &SwigClassEvent);
4774
+ rb_undef_alloc_func(SwigClassEvent.klass);
4775
+ rb_define_method(SwigClassEvent.klass, "addInfo", VALUEFUNC(_wrap_Event_addInfo), -1);
4776
+ rb_define_method(SwigClassEvent.klass, "addEdge", VALUEFUNC(_wrap_Event_addEdge), -1);
4777
+ rb_define_method(SwigClassEvent.klass, "addEdgeStr", VALUEFUNC(_wrap_Event_addEdgeStr), -1);
4778
+ rb_define_method(SwigClassEvent.klass, "getMetadata", VALUEFUNC(_wrap_Event_getMetadata), -1);
4779
+ rb_define_method(SwigClassEvent.klass, "metadataString", VALUEFUNC(_wrap_Event_metadataString), -1);
4780
+ rb_define_method(SwigClassEvent.klass, "send", VALUEFUNC(_wrap_Event_send), -1);
4781
+ rb_define_singleton_method(SwigClassEvent.klass, "startTrace", VALUEFUNC(_wrap_Event_startTrace), -1);
4782
+ SwigClassEvent.mark = 0;
4783
+ SwigClassEvent.destroy = (void (*)(void *)) free_Event;
4784
+ SwigClassEvent.trackObjects = 0;
4785
+
4786
+ SwigClassReporter.klass = rb_define_class_under(mOboe_metal, "Reporter", rb_cObject);
4787
+ SWIG_TypeClientData(SWIGTYPE_p_Reporter, (void *) &SwigClassReporter);
4788
+ rb_define_alloc_func(SwigClassReporter.klass, _wrap_Reporter_allocate);
4789
+ rb_define_method(SwigClassReporter.klass, "initialize", VALUEFUNC(_wrap_new_Reporter), -1);
4790
+ rb_define_method(SwigClassReporter.klass, "sendReport", VALUEFUNC(_wrap_Reporter_sendReport), -1);
4791
+ SwigClassReporter.mark = 0;
4792
+ SwigClassReporter.destroy = (void (*)(void *)) free_Reporter;
4793
+ SwigClassReporter.trackObjects = 0;
4794
+
4795
+ SwigClassSslReporter.klass = rb_define_class_under(mOboe_metal, "SslReporter", rb_cObject);
4796
+ SWIG_TypeClientData(SWIGTYPE_p_SslReporter, (void *) &SwigClassSslReporter);
4797
+ rb_define_alloc_func(SwigClassSslReporter.klass, _wrap_SslReporter_allocate);
4798
+ rb_define_method(SwigClassSslReporter.klass, "initialize", VALUEFUNC(_wrap_new_SslReporter), -1);
4799
+ rb_define_method(SwigClassSslReporter.klass, "sendReport", VALUEFUNC(_wrap_SslReporter_sendReport), -1);
4800
+ SwigClassSslReporter.mark = 0;
4801
+ SwigClassSslReporter.destroy = (void (*)(void *)) free_SslReporter;
4802
+ SwigClassSslReporter.trackObjects = 0;
4803
+
4804
+ SwigClassUdpReporter.klass = rb_define_class_under(mOboe_metal, "UdpReporter", rb_cObject);
4805
+ SWIG_TypeClientData(SWIGTYPE_p_UdpReporter, (void *) &SwigClassUdpReporter);
4806
+ rb_define_alloc_func(SwigClassUdpReporter.klass, _wrap_UdpReporter_allocate);
4807
+ rb_define_method(SwigClassUdpReporter.klass, "initialize", VALUEFUNC(_wrap_new_UdpReporter), -1);
4808
+ rb_define_method(SwigClassUdpReporter.klass, "sendReport", VALUEFUNC(_wrap_UdpReporter_sendReport), -1);
4809
+ SwigClassUdpReporter.mark = 0;
4810
+ SwigClassUdpReporter.destroy = (void (*)(void *)) free_UdpReporter;
4811
+ SwigClassUdpReporter.trackObjects = 0;
4812
+
4813
+ SwigClassFileReporter.klass = rb_define_class_under(mOboe_metal, "FileReporter", rb_cObject);
4814
+ SWIG_TypeClientData(SWIGTYPE_p_FileReporter, (void *) &SwigClassFileReporter);
4815
+ rb_define_alloc_func(SwigClassFileReporter.klass, _wrap_FileReporter_allocate);
4816
+ rb_define_method(SwigClassFileReporter.klass, "initialize", VALUEFUNC(_wrap_new_FileReporter), -1);
4817
+ rb_define_method(SwigClassFileReporter.klass, "sendReport", VALUEFUNC(_wrap_FileReporter_sendReport), -1);
4818
+ SwigClassFileReporter.mark = 0;
4819
+ SwigClassFileReporter.destroy = (void (*)(void *)) free_FileReporter;
4820
+ SwigClassFileReporter.trackObjects = 0;
4821
+
4822
+ SwigClassDebugLogger.klass = rb_define_class_under(mOboe_metal, "DebugLogger", rb_cObject);
4823
+ SWIG_TypeClientData(SWIGTYPE_p_DebugLogger, (void *) &SwigClassDebugLogger);
4824
+ rb_undef_alloc_func(SwigClassDebugLogger.klass);
4825
+ rb_define_method(SwigClassDebugLogger.klass, "log", VALUEFUNC(_wrap_DebugLogger_log), -1);
4826
+ SwigClassDebugLogger.mark = 0;
4827
+ SwigClassDebugLogger.destroy = (void (*)(void *)) free_DebugLogger;
4828
+ SwigClassDebugLogger.trackObjects = 0;
4829
+ rb_define_module_function(mOboe_metal, "oboe_debug_log_handler", VALUEFUNC(_wrap_oboe_debug_log_handler), -1);
4830
+
4831
+ SwigClassDebugLog.klass = rb_define_class_under(mOboe_metal, "DebugLog", rb_cObject);
4832
+ SWIG_TypeClientData(SWIGTYPE_p_DebugLog, (void *) &SwigClassDebugLog);
4833
+ rb_define_alloc_func(SwigClassDebugLog.klass, _wrap_DebugLog_allocate);
4834
+ rb_define_method(SwigClassDebugLog.klass, "initialize", VALUEFUNC(_wrap_new_DebugLog), -1);
4835
+ rb_define_singleton_method(SwigClassDebugLog.klass, "getLevelName", VALUEFUNC(_wrap_DebugLog_getLevelName), -1);
4836
+ rb_define_singleton_method(SwigClassDebugLog.klass, "getModuleName", VALUEFUNC(_wrap_DebugLog_getModuleName), -1);
4837
+ rb_define_singleton_method(SwigClassDebugLog.klass, "getLevel", VALUEFUNC(_wrap_DebugLog_getLevel), -1);
4838
+ rb_define_singleton_method(SwigClassDebugLog.klass, "setLevel", VALUEFUNC(_wrap_DebugLog_setLevel), -1);
4839
+ rb_define_singleton_method(SwigClassDebugLog.klass, "setOutputStream", VALUEFUNC(_wrap_DebugLog_setOutputStream), -1);
4840
+ rb_define_singleton_method(SwigClassDebugLog.klass, "setOutputFile", VALUEFUNC(_wrap_DebugLog_setOutputFile), -1);
4841
+ rb_define_singleton_method(SwigClassDebugLog.klass, "addDebugLogger", VALUEFUNC(_wrap_DebugLog_addDebugLogger), -1);
4842
+ rb_define_singleton_method(SwigClassDebugLog.klass, "removeDebugLogger", VALUEFUNC(_wrap_DebugLog_removeDebugLogger), -1);
4843
+ rb_define_singleton_method(SwigClassDebugLog.klass, "logMessage", VALUEFUNC(_wrap_DebugLog_logMessage), -1);
4844
+ SwigClassDebugLog.mark = 0;
4845
+ SwigClassDebugLog.destroy = (void (*)(void *)) free_DebugLog;
4846
+ SwigClassDebugLog.trackObjects = 0;
4847
+
4848
+ SwigClassConfig.klass = rb_define_class_under(mOboe_metal, "Config", rb_cObject);
4849
+ SWIG_TypeClientData(SWIGTYPE_p_Config, (void *) &SwigClassConfig);
4850
+ rb_define_alloc_func(SwigClassConfig.klass, _wrap_Config_allocate);
4851
+ rb_define_method(SwigClassConfig.klass, "initialize", VALUEFUNC(_wrap_new_Config), -1);
4852
+ rb_define_singleton_method(SwigClassConfig.klass, "checkVersion", VALUEFUNC(_wrap_Config_checkVersion), -1);
4853
+ rb_define_singleton_method(SwigClassConfig.klass, "getVersion", VALUEFUNC(_wrap_Config_getVersion), -1);
4854
+ rb_define_singleton_method(SwigClassConfig.klass, "getRevision", VALUEFUNC(_wrap_Config_getRevision), -1);
4855
+ SwigClassConfig.mark = 0;
4856
+ SwigClassConfig.destroy = (void (*)(void *)) free_Config;
4857
+ SwigClassConfig.trackObjects = 0;
4858
+ }
4859
+