AnimatLab  2
Test
AnimatSimPy_wrap.cxx
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 3.0.5
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 SWIGPYTHON
12 #define SWIG_DIRECTORS
13 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
14 
15 
16 #ifdef __cplusplus
17 /* SwigValueWrapper is described in swig.swg */
18 template<typename T> class SwigValueWrapper {
19  struct SwigMovePointer {
20  T *ptr;
21  SwigMovePointer(T *p) : ptr(p) { }
22  ~SwigMovePointer() { delete ptr; }
23  SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
24  } pointer;
25  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
26  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
27 public:
28  SwigValueWrapper() : pointer(0) { }
29  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
30  operator T&() const { return *pointer.ptr; }
31  T *operator&() { return pointer.ptr; }
32 };
33 
34 template <typename T> T SwigValueInit() {
35  return T();
36 }
37 #endif
38 
39 /* -----------------------------------------------------------------------------
40  * This section contains generic SWIG labels for method/variable
41  * declarations/attributes, and other compiler dependent labels.
42  * ----------------------------------------------------------------------------- */
43 
44 /* template workaround for compilers that cannot correctly implement the C++ standard */
45 #ifndef SWIGTEMPLATEDISAMBIGUATOR
46 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
47 # define SWIGTEMPLATEDISAMBIGUATOR template
48 # elif defined(__HP_aCC)
49 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
50 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
51 # define SWIGTEMPLATEDISAMBIGUATOR template
52 # else
53 # define SWIGTEMPLATEDISAMBIGUATOR
54 # endif
55 #endif
56 
57 /* inline attribute */
58 #ifndef SWIGINLINE
59 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
60 # define SWIGINLINE inline
61 # else
62 # define SWIGINLINE
63 # endif
64 #endif
65 
66 /* attribute recognised by some compilers to avoid 'unused' warnings */
67 #ifndef SWIGUNUSED
68 # if defined(__GNUC__)
69 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
70 # define SWIGUNUSED __attribute__ ((__unused__))
71 # else
72 # define SWIGUNUSED
73 # endif
74 # elif defined(__ICC)
75 # define SWIGUNUSED __attribute__ ((__unused__))
76 # else
77 # define SWIGUNUSED
78 # endif
79 #endif
80 
81 #ifndef SWIG_MSC_UNSUPPRESS_4505
82 # if defined(_MSC_VER)
83 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
84 # endif
85 #endif
86 
87 #ifndef SWIGUNUSEDPARM
88 # ifdef __cplusplus
89 # define SWIGUNUSEDPARM(p)
90 # else
91 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
92 # endif
93 #endif
94 
95 /* internal SWIG method */
96 #ifndef SWIGINTERN
97 # define SWIGINTERN static SWIGUNUSED
98 #endif
99 
100 /* internal inline SWIG method */
101 #ifndef SWIGINTERNINLINE
102 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
103 #endif
104 
105 /* exporting methods */
106 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
107 # ifndef GCC_HASCLASSVISIBILITY
108 # define GCC_HASCLASSVISIBILITY
109 # endif
110 #endif
111 
112 #ifndef SWIGEXPORT
113 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
114 # if defined(STATIC_LINKED)
115 # define SWIGEXPORT
116 # else
117 # define SWIGEXPORT __declspec(dllexport)
118 # endif
119 # else
120 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
121 # define SWIGEXPORT __attribute__ ((visibility("default")))
122 # else
123 # define SWIGEXPORT
124 # endif
125 # endif
126 #endif
127 
128 /* calling conventions for Windows */
129 #ifndef SWIGSTDCALL
130 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
131 # define SWIGSTDCALL __stdcall
132 # else
133 # define SWIGSTDCALL
134 # endif
135 #endif
136 
137 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
138 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
139 # define _CRT_SECURE_NO_DEPRECATE
140 #endif
141 
142 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
143 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
144 # define _SCL_SECURE_NO_DEPRECATE
145 #endif
146 
147 
148 
149 #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
150 /* Use debug wrappers with the Python release dll */
151 # undef _DEBUG
152 # include <Python.h>
153 # define _DEBUG
154 #else
155 # include <Python.h>
156 #endif
157 
158 /* -----------------------------------------------------------------------------
159  * swigrun.swg
160  *
161  * This file contains generic C API SWIG runtime support for pointer
162  * type checking.
163  * ----------------------------------------------------------------------------- */
164 
165 /* This should only be incremented when either the layout of swig_type_info changes,
166  or for whatever reason, the runtime changes incompatibly */
167 #define SWIG_RUNTIME_VERSION "4"
168 
169 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
170 #ifdef SWIG_TYPE_TABLE
171 # define SWIG_QUOTE_STRING(x) #x
172 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
173 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
174 #else
175 # define SWIG_TYPE_TABLE_NAME
176 #endif
177 
178 /*
179  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
180  creating a static or dynamic library from the SWIG runtime code.
181  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
182 
183  But only do this if strictly necessary, ie, if you have problems
184  with your compiler or suchlike.
185 */
186 
187 #ifndef SWIGRUNTIME
188 # define SWIGRUNTIME SWIGINTERN
189 #endif
190 
191 #ifndef SWIGRUNTIMEINLINE
192 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
193 #endif
194 
195 /* Generic buffer size */
196 #ifndef SWIG_BUFFER_SIZE
197 # define SWIG_BUFFER_SIZE 1024
198 #endif
199 
200 /* Flags for pointer conversions */
201 #define SWIG_POINTER_DISOWN 0x1
202 #define SWIG_CAST_NEW_MEMORY 0x2
203 
204 /* Flags for new pointer objects */
205 #define SWIG_POINTER_OWN 0x1
206 
207 
208 /*
209  Flags/methods for returning states.
210 
211  The SWIG conversion methods, as ConvertPtr, return an integer
212  that tells if the conversion was successful or not. And if not,
213  an error code can be returned (see swigerrors.swg for the codes).
214 
215  Use the following macros/flags to set or process the returning
216  states.
217 
218  In old versions of SWIG, code such as the following was usually written:
219 
220  if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
221  // success code
222  } else {
223  //fail code
224  }
225 
226  Now you can be more explicit:
227 
228  int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
229  if (SWIG_IsOK(res)) {
230  // success code
231  } else {
232  // fail code
233  }
234 
235  which is the same really, but now you can also do
236 
237  Type *ptr;
238  int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
239  if (SWIG_IsOK(res)) {
240  // success code
241  if (SWIG_IsNewObj(res) {
242  ...
243  delete *ptr;
244  } else {
245  ...
246  }
247  } else {
248  // fail code
249  }
250 
251  I.e., now SWIG_ConvertPtr can return new objects and you can
252  identify the case and take care of the deallocation. Of course that
253  also requires SWIG_ConvertPtr to return new result values, such as
254 
255  int SWIG_ConvertPtr(obj, ptr,...) {
256  if (<obj is ok>) {
257  if (<need new object>) {
258  *ptr = <ptr to new allocated object>;
259  return SWIG_NEWOBJ;
260  } else {
261  *ptr = <ptr to old object>;
262  return SWIG_OLDOBJ;
263  }
264  } else {
265  return SWIG_BADOBJ;
266  }
267  }
268 
269  Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
270  more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
271  SWIG errors code.
272 
273  Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
274  allows to return the 'cast rank', for example, if you have this
275 
276  int food(double)
277  int fooi(int);
278 
279  and you call
280 
281  food(1) // cast rank '1' (1 -> 1.0)
282  fooi(1) // cast rank '0'
283 
284  just use the SWIG_AddCast()/SWIG_CheckState()
285 */
286 
287 #define SWIG_OK (0)
288 #define SWIG_ERROR (-1)
289 #define SWIG_IsOK(r) (r >= 0)
290 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
291 
292 /* The CastRankLimit says how many bits are used for the cast rank */
293 #define SWIG_CASTRANKLIMIT (1 << 8)
294 /* The NewMask denotes the object was created (using new/malloc) */
295 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
296 /* The TmpMask is for in/out typemaps that use temporal objects */
297 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
298 /* Simple returning values */
299 #define SWIG_BADOBJ (SWIG_ERROR)
300 #define SWIG_OLDOBJ (SWIG_OK)
301 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
302 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
303 /* Check, add and del mask methods */
304 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
305 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
306 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
307 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
308 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
309 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
310 
311 /* Cast-Rank Mode */
312 #if defined(SWIG_CASTRANK_MODE)
313 # ifndef SWIG_TypeRank
314 # define SWIG_TypeRank unsigned long
315 # endif
316 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
317 # define SWIG_MAXCASTRANK (2)
318 # endif
319 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
320 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
321 SWIGINTERNINLINE int SWIG_AddCast(int r) {
322  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
323 }
324 SWIGINTERNINLINE int SWIG_CheckState(int r) {
325  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
326 }
327 #else /* no cast-rank mode */
328 # define SWIG_AddCast(r) (r)
329 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
330 #endif
331 
332 
333 #include <string.h>
334 
335 #ifdef __cplusplus
336 extern "C" {
337 #endif
338 
339 typedef void *(*swig_converter_func)(void *, int *);
340 typedef struct swig_type_info *(*swig_dycast_func)(void **);
341 
342 /* Structure to store information on one type */
343 typedef struct swig_type_info {
344  const char *name; /* mangled name of this type */
345  const char *str; /* human readable name of this type */
346  swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
347  struct swig_cast_info *cast; /* linked list of types that can cast into this type */
348  void *clientdata; /* language specific type data */
349  int owndata; /* flag if the structure owns the clientdata */
351 
352 /* Structure to store a type and conversion function used for casting */
353 typedef struct swig_cast_info {
354  swig_type_info *type; /* pointer to type that is equivalent to this type */
355  swig_converter_func converter; /* function to cast the void pointers */
356  struct swig_cast_info *next; /* pointer to next cast in linked list */
357  struct swig_cast_info *prev; /* pointer to the previous cast */
359 
360 /* Structure used to store module information
361  * Each module generates one structure like this, and the runtime collects
362  * all of these structures and stores them in a circularly linked list.*/
363 typedef struct swig_module_info {
364  swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
365  size_t size; /* Number of types in this module */
366  struct swig_module_info *next; /* Pointer to next element in circularly linked list */
367  swig_type_info **type_initial; /* Array of initially generated type structures */
368  swig_cast_info **cast_initial; /* Array of initially generated casting structures */
369  void *clientdata; /* Language specific module data */
371 
372 /*
373  Compare two type names skipping the space characters, therefore
374  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
375 
376  Return 0 when the two name types are equivalent, as in
377  strncmp, but skipping ' '.
378 */
379 SWIGRUNTIME int
380 SWIG_TypeNameComp(const char *f1, const char *l1,
381  const char *f2, const char *l2) {
382  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
383  while ((*f1 == ' ') && (f1 != l1)) ++f1;
384  while ((*f2 == ' ') && (f2 != l2)) ++f2;
385  if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
386  }
387  return (int)((l1 - f1) - (l2 - f2));
388 }
389 
390 /*
391  Check type equivalence in a name list like <name1>|<name2>|...
392  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
393 */
394 SWIGRUNTIME int
395 SWIG_TypeCmp(const char *nb, const char *tb) {
396  int equiv = 1;
397  const char* te = tb + strlen(tb);
398  const char* ne = nb;
399  while (equiv != 0 && *ne) {
400  for (nb = ne; *ne; ++ne) {
401  if (*ne == '|') break;
402  }
403  equiv = SWIG_TypeNameComp(nb, ne, tb, te);
404  if (*ne) ++ne;
405  }
406  return equiv;
407 }
408 
409 /*
410  Check type equivalence in a name list like <name1>|<name2>|...
411  Return 0 if not equal, 1 if equal
412 */
413 SWIGRUNTIME int
414 SWIG_TypeEquiv(const char *nb, const char *tb) {
415  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
416 }
417 
418 /*
419  Check the typename
420 */
421 SWIGRUNTIME swig_cast_info *
422 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
423  if (ty) {
424  swig_cast_info *iter = ty->cast;
425  while (iter) {
426  if (strcmp(iter->type->name, c) == 0) {
427  if (iter == ty->cast)
428  return iter;
429  /* Move iter to the top of the linked list */
430  iter->prev->next = iter->next;
431  if (iter->next)
432  iter->next->prev = iter->prev;
433  iter->next = ty->cast;
434  iter->prev = 0;
435  if (ty->cast) ty->cast->prev = iter;
436  ty->cast = iter;
437  return iter;
438  }
439  iter = iter->next;
440  }
441  }
442  return 0;
443 }
444 
445 /*
446  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
447 */
448 SWIGRUNTIME swig_cast_info *
449 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
450  if (ty) {
451  swig_cast_info *iter = ty->cast;
452  while (iter) {
453  if (iter->type == from) {
454  if (iter == ty->cast)
455  return iter;
456  /* Move iter to the top of the linked list */
457  iter->prev->next = iter->next;
458  if (iter->next)
459  iter->next->prev = iter->prev;
460  iter->next = ty->cast;
461  iter->prev = 0;
462  if (ty->cast) ty->cast->prev = iter;
463  ty->cast = iter;
464  return iter;
465  }
466  iter = iter->next;
467  }
468  }
469  return 0;
470 }
471 
472 /*
473  Cast a pointer up an inheritance hierarchy
474 */
475 SWIGRUNTIMEINLINE void *
476 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
477  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
478 }
479 
480 /*
481  Dynamic pointer casting. Down an inheritance hierarchy
482 */
483 SWIGRUNTIME swig_type_info *
484 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
485  swig_type_info *lastty = ty;
486  if (!ty || !ty->dcast) return ty;
487  while (ty && (ty->dcast)) {
488  ty = (*ty->dcast)(ptr);
489  if (ty) lastty = ty;
490  }
491  return lastty;
492 }
493 
494 /*
495  Return the name associated with this type
496 */
497 SWIGRUNTIMEINLINE const char *
498 SWIG_TypeName(const swig_type_info *ty) {
499  return ty->name;
500 }
501 
502 /*
503  Return the pretty name associated with this type,
504  that is an unmangled type name in a form presentable to the user.
505 */
506 SWIGRUNTIME const char *
507 SWIG_TypePrettyName(const swig_type_info *type) {
508  /* The "str" field contains the equivalent pretty names of the
509  type, separated by vertical-bar characters. We choose
510  to print the last name, as it is often (?) the most
511  specific. */
512  if (!type) return NULL;
513  if (type->str != NULL) {
514  const char *last_name = type->str;
515  const char *s;
516  for (s = type->str; *s; s++)
517  if (*s == '|') last_name = s+1;
518  return last_name;
519  }
520  else
521  return type->name;
522 }
523 
524 /*
525  Set the clientdata field for a type
526 */
527 SWIGRUNTIME void
528 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
529  swig_cast_info *cast = ti->cast;
530  /* if (ti->clientdata == clientdata) return; */
531  ti->clientdata = clientdata;
532 
533  while (cast) {
534  if (!cast->converter) {
535  swig_type_info *tc = cast->type;
536  if (!tc->clientdata) {
537  SWIG_TypeClientData(tc, clientdata);
538  }
539  }
540  cast = cast->next;
541  }
542 }
543 SWIGRUNTIME void
544 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
545  SWIG_TypeClientData(ti, clientdata);
546  ti->owndata = 1;
547 }
548 
549 /*
550  Search for a swig_type_info structure only by mangled name
551  Search is a O(log #types)
552 
553  We start searching at module start, and finish searching when start == end.
554  Note: if start == end at the beginning of the function, we go all the way around
555  the circular list.
556 */
557 SWIGRUNTIME swig_type_info *
558 SWIG_MangledTypeQueryModule(swig_module_info *start,
559  swig_module_info *end,
560  const char *name) {
561  swig_module_info *iter = start;
562  do {
563  if (iter->size) {
564  size_t l = 0;
565  size_t r = iter->size - 1;
566  do {
567  /* since l+r >= 0, we can (>> 1) instead (/ 2) */
568  size_t i = (l + r) >> 1;
569  const char *iname = iter->types[i]->name;
570  if (iname) {
571  int compare = strcmp(name, iname);
572  if (compare == 0) {
573  return iter->types[i];
574  } else if (compare < 0) {
575  if (i) {
576  r = i - 1;
577  } else {
578  break;
579  }
580  } else if (compare > 0) {
581  l = i + 1;
582  }
583  } else {
584  break; /* should never happen */
585  }
586  } while (l <= r);
587  }
588  iter = iter->next;
589  } while (iter != end);
590  return 0;
591 }
592 
593 /*
594  Search for a swig_type_info structure for either a mangled name or a human readable name.
595  It first searches the mangled names of the types, which is a O(log #types)
596  If a type is not found it then searches the human readable names, which is O(#types).
597 
598  We start searching at module start, and finish searching when start == end.
599  Note: if start == end at the beginning of the function, we go all the way around
600  the circular list.
601 */
602 SWIGRUNTIME swig_type_info *
603 SWIG_TypeQueryModule(swig_module_info *start,
604  swig_module_info *end,
605  const char *name) {
606  /* STEP 1: Search the name field using binary search */
607  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
608  if (ret) {
609  return ret;
610  } else {
611  /* STEP 2: If the type hasn't been found, do a complete search
612  of the str field (the human readable name) */
613  swig_module_info *iter = start;
614  do {
615  size_t i = 0;
616  for (; i < iter->size; ++i) {
617  if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
618  return iter->types[i];
619  }
620  iter = iter->next;
621  } while (iter != end);
622  }
623 
624  /* neither found a match */
625  return 0;
626 }
627 
628 /*
629  Pack binary data into a string
630 */
631 SWIGRUNTIME char *
632 SWIG_PackData(char *c, void *ptr, size_t sz) {
633  static const char hex[17] = "0123456789abcdef";
634  const unsigned char *u = (unsigned char *) ptr;
635  const unsigned char *eu = u + sz;
636  for (; u != eu; ++u) {
637  unsigned char uu = *u;
638  *(c++) = hex[(uu & 0xf0) >> 4];
639  *(c++) = hex[uu & 0xf];
640  }
641  return c;
642 }
643 
644 /*
645  Unpack binary data from a string
646 */
647 SWIGRUNTIME const char *
648 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
649  unsigned char *u = (unsigned char *) ptr;
650  const unsigned char *eu = u + sz;
651  for (; u != eu; ++u) {
652  char d = *(c++);
653  unsigned char uu;
654  if ((d >= '0') && (d <= '9'))
655  uu = ((d - '0') << 4);
656  else if ((d >= 'a') && (d <= 'f'))
657  uu = ((d - ('a'-10)) << 4);
658  else
659  return (char *) 0;
660  d = *(c++);
661  if ((d >= '0') && (d <= '9'))
662  uu |= (d - '0');
663  else if ((d >= 'a') && (d <= 'f'))
664  uu |= (d - ('a'-10));
665  else
666  return (char *) 0;
667  *u = uu;
668  }
669  return c;
670 }
671 
672 /*
673  Pack 'void *' into a string buffer.
674 */
675 SWIGRUNTIME char *
676 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
677  char *r = buff;
678  if ((2*sizeof(void *) + 2) > bsz) return 0;
679  *(r++) = '_';
680  r = SWIG_PackData(r,&ptr,sizeof(void *));
681  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
682  strcpy(r,name);
683  return buff;
684 }
685 
686 SWIGRUNTIME const char *
687 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
688  if (*c != '_') {
689  if (strcmp(c,"NULL") == 0) {
690  *ptr = (void *) 0;
691  return name;
692  } else {
693  return 0;
694  }
695  }
696  return SWIG_UnpackData(++c,ptr,sizeof(void *));
697 }
698 
699 SWIGRUNTIME char *
700 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
701  char *r = buff;
702  size_t lname = (name ? strlen(name) : 0);
703  if ((2*sz + 2 + lname) > bsz) return 0;
704  *(r++) = '_';
705  r = SWIG_PackData(r,ptr,sz);
706  if (lname) {
707  strncpy(r,name,lname+1);
708  } else {
709  *r = 0;
710  }
711  return buff;
712 }
713 
714 SWIGRUNTIME const char *
715 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
716  if (*c != '_') {
717  if (strcmp(c,"NULL") == 0) {
718  memset(ptr,0,sz);
719  return name;
720  } else {
721  return 0;
722  }
723  }
724  return SWIG_UnpackData(++c,ptr,sz);
725 }
726 
727 #ifdef __cplusplus
728 }
729 #endif
730 
731 /* Errors in SWIG */
732 #define SWIG_UnknownError -1
733 #define SWIG_IOError -2
734 #define SWIG_RuntimeError -3
735 #define SWIG_IndexError -4
736 #define SWIG_TypeError -5
737 #define SWIG_DivisionByZero -6
738 #define SWIG_OverflowError -7
739 #define SWIG_SyntaxError -8
740 #define SWIG_ValueError -9
741 #define SWIG_SystemError -10
742 #define SWIG_AttributeError -11
743 #define SWIG_MemoryError -12
744 #define SWIG_NullReferenceError -13
745 
746 
747 
748 /* Compatibility macros for Python 3 */
749 #if PY_VERSION_HEX >= 0x03000000
750 
751 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
752 #define PyInt_Check(x) PyLong_Check(x)
753 #define PyInt_AsLong(x) PyLong_AsLong(x)
754 #define PyInt_FromLong(x) PyLong_FromLong(x)
755 #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
756 #define PyString_Check(name) PyBytes_Check(name)
757 #define PyString_FromString(x) PyUnicode_FromString(x)
758 #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
759 #define PyString_AsString(str) PyBytes_AsString(str)
760 #define PyString_Size(str) PyBytes_Size(str)
761 #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
762 #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
763 #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
764 #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
765 
766 #endif
767 
768 #ifndef Py_TYPE
769 # define Py_TYPE(op) ((op)->ob_type)
770 #endif
771 
772 /* SWIG APIs for compatibility of both Python 2 & 3 */
773 
774 #if PY_VERSION_HEX >= 0x03000000
775 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
776 #else
777 # define SWIG_Python_str_FromFormat PyString_FromFormat
778 #endif
779 
780 
781 /* Warning: This function will allocate a new string in Python 3,
782  * so please call SWIG_Python_str_DelForPy3(x) to free the space.
783  */
784 SWIGINTERN char*
785 SWIG_Python_str_AsChar(PyObject *str)
786 {
787 #if PY_VERSION_HEX >= 0x03000000
788  char *cstr;
789  char *newstr;
790  Py_ssize_t len;
791  str = PyUnicode_AsUTF8String(str);
792  PyBytes_AsStringAndSize(str, &cstr, &len);
793  newstr = (char *) malloc(len+1);
794  memcpy(newstr, cstr, len+1);
795  Py_XDECREF(str);
796  return newstr;
797 #else
798  return PyString_AsString(str);
799 #endif
800 }
801 
802 #if PY_VERSION_HEX >= 0x03000000
803 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
804 #else
805 # define SWIG_Python_str_DelForPy3(x)
806 #endif
807 
808 
809 SWIGINTERN PyObject*
810 SWIG_Python_str_FromChar(const char *c)
811 {
812 #if PY_VERSION_HEX >= 0x03000000
813  return PyUnicode_FromString(c);
814 #else
815  return PyString_FromString(c);
816 #endif
817 }
818 
819 /* Add PyOS_snprintf for old Pythons */
820 #if PY_VERSION_HEX < 0x02020000
821 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
822 # define PyOS_snprintf _snprintf
823 # else
824 # define PyOS_snprintf snprintf
825 # endif
826 #endif
827 
828 /* A crude PyString_FromFormat implementation for old Pythons */
829 #if PY_VERSION_HEX < 0x02020000
830 
831 #ifndef SWIG_PYBUFFER_SIZE
832 # define SWIG_PYBUFFER_SIZE 1024
833 #endif
834 
835 static PyObject *
836 PyString_FromFormat(const char *fmt, ...) {
837  va_list ap;
838  char buf[SWIG_PYBUFFER_SIZE * 2];
839  int res;
840  va_start(ap, fmt);
841  res = vsnprintf(buf, sizeof(buf), fmt, ap);
842  va_end(ap);
843  return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
844 }
845 #endif
846 
847 /* Add PyObject_Del for old Pythons */
848 #if PY_VERSION_HEX < 0x01060000
849 # define PyObject_Del(op) PyMem_DEL((op))
850 #endif
851 #ifndef PyObject_DEL
852 # define PyObject_DEL PyObject_Del
853 #endif
854 
855 /* A crude PyExc_StopIteration exception for old Pythons */
856 #if PY_VERSION_HEX < 0x02020000
857 # ifndef PyExc_StopIteration
858 # define PyExc_StopIteration PyExc_RuntimeError
859 # endif
860 # ifndef PyObject_GenericGetAttr
861 # define PyObject_GenericGetAttr 0
862 # endif
863 #endif
864 
865 /* Py_NotImplemented is defined in 2.1 and up. */
866 #if PY_VERSION_HEX < 0x02010000
867 # ifndef Py_NotImplemented
868 # define Py_NotImplemented PyExc_RuntimeError
869 # endif
870 #endif
871 
872 /* A crude PyString_AsStringAndSize implementation for old Pythons */
873 #if PY_VERSION_HEX < 0x02010000
874 # ifndef PyString_AsStringAndSize
875 # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
876 # endif
877 #endif
878 
879 /* PySequence_Size for old Pythons */
880 #if PY_VERSION_HEX < 0x02000000
881 # ifndef PySequence_Size
882 # define PySequence_Size PySequence_Length
883 # endif
884 #endif
885 
886 /* PyBool_FromLong for old Pythons */
887 #if PY_VERSION_HEX < 0x02030000
888 static
889 PyObject *PyBool_FromLong(long ok)
890 {
891  PyObject *result = ok ? Py_True : Py_False;
892  Py_INCREF(result);
893  return result;
894 }
895 #endif
896 
897 /* Py_ssize_t for old Pythons */
898 /* This code is as recommended by: */
899 /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
900 #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
901 typedef int Py_ssize_t;
902 # define PY_SSIZE_T_MAX INT_MAX
903 # define PY_SSIZE_T_MIN INT_MIN
904 typedef inquiry lenfunc;
905 typedef intargfunc ssizeargfunc;
906 typedef intintargfunc ssizessizeargfunc;
907 typedef intobjargproc ssizeobjargproc;
908 typedef intintobjargproc ssizessizeobjargproc;
909 typedef getreadbufferproc readbufferproc;
910 typedef getwritebufferproc writebufferproc;
911 typedef getsegcountproc segcountproc;
912 typedef getcharbufferproc charbufferproc;
913 static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
914 {
915  long result = 0;
916  PyObject *i = PyNumber_Int(x);
917  if (i) {
918  result = PyInt_AsLong(i);
919  Py_DECREF(i);
920  }
921  return result;
922 }
923 #endif
924 
925 #if PY_VERSION_HEX < 0x02050000
926 #define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
927 #endif
928 
929 #if PY_VERSION_HEX < 0x02040000
930 #define Py_VISIT(op) \
931  do { \
932  if (op) { \
933  int vret = visit((op), arg); \
934  if (vret) \
935  return vret; \
936  } \
937  } while (0)
938 #endif
939 
940 #if PY_VERSION_HEX < 0x02030000
941 typedef struct {
942  PyTypeObject type;
943  PyNumberMethods as_number;
944  PyMappingMethods as_mapping;
945  PySequenceMethods as_sequence;
946  PyBufferProcs as_buffer;
947  PyObject *name, *slots;
949 #endif
950 
951 #if PY_VERSION_HEX < 0x02030000
952 typedef destructor freefunc;
953 #endif
954 
955 #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
956  (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
957  (PY_MAJOR_VERSION > 3))
958 # define SWIGPY_USE_CAPSULE
959 # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
960 #endif
961 
962 #if PY_VERSION_HEX < 0x03020000
963 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
964 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
965 #endif
966 
967 /* -----------------------------------------------------------------------------
968  * error manipulation
969  * ----------------------------------------------------------------------------- */
970 
971 SWIGRUNTIME PyObject*
972 SWIG_Python_ErrorType(int code) {
973  PyObject* type = 0;
974  switch(code) {
975  case SWIG_MemoryError:
976  type = PyExc_MemoryError;
977  break;
978  case SWIG_IOError:
979  type = PyExc_IOError;
980  break;
981  case SWIG_RuntimeError:
982  type = PyExc_RuntimeError;
983  break;
984  case SWIG_IndexError:
985  type = PyExc_IndexError;
986  break;
987  case SWIG_TypeError:
988  type = PyExc_TypeError;
989  break;
990  case SWIG_DivisionByZero:
991  type = PyExc_ZeroDivisionError;
992  break;
993  case SWIG_OverflowError:
994  type = PyExc_OverflowError;
995  break;
996  case SWIG_SyntaxError:
997  type = PyExc_SyntaxError;
998  break;
999  case SWIG_ValueError:
1000  type = PyExc_ValueError;
1001  break;
1002  case SWIG_SystemError:
1003  type = PyExc_SystemError;
1004  break;
1005  case SWIG_AttributeError:
1006  type = PyExc_AttributeError;
1007  break;
1008  default:
1009  type = PyExc_RuntimeError;
1010  }
1011  return type;
1012 }
1013 
1014 
1015 SWIGRUNTIME void
1016 SWIG_Python_AddErrorMsg(const char* mesg)
1017 {
1018  PyObject *type = 0;
1019  PyObject *value = 0;
1020  PyObject *traceback = 0;
1021 
1022  if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
1023  if (value) {
1024  char *tmp;
1025  PyObject *old_str = PyObject_Str(value);
1026  PyErr_Clear();
1027  Py_XINCREF(type);
1028 
1029  PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
1030  SWIG_Python_str_DelForPy3(tmp);
1031  Py_DECREF(old_str);
1032  Py_DECREF(value);
1033  } else {
1034  PyErr_SetString(PyExc_RuntimeError, mesg);
1035  }
1036 }
1037 
1038 #if defined(SWIG_PYTHON_NO_THREADS)
1039 # if defined(SWIG_PYTHON_THREADS)
1040 # undef SWIG_PYTHON_THREADS
1041 # endif
1042 #endif
1043 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
1044 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
1045 # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
1046 # define SWIG_PYTHON_USE_GIL
1047 # endif
1048 # endif
1049 # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
1050 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
1051 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
1052 # endif
1053 # ifdef __cplusplus /* C++ code */
1054  class SWIG_Python_Thread_Block {
1055  bool status;
1056  PyGILState_STATE state;
1057  public:
1058  void end() { if (status) { PyGILState_Release(state); status = false;} }
1059  SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
1060  ~SWIG_Python_Thread_Block() { end(); }
1061  };
1062  class SWIG_Python_Thread_Allow {
1063  bool status;
1064  PyThreadState *save;
1065  public:
1066  void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
1067  SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
1068  ~SWIG_Python_Thread_Allow() { end(); }
1069  };
1070 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
1071 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
1072 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
1073 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
1074 # else /* C code */
1075 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1076 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
1077 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1078 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
1079 # endif
1080 # else /* Old thread way, not implemented, user must provide it */
1081 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1082 # define SWIG_PYTHON_INITIALIZE_THREADS
1083 # endif
1084 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1085 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1086 # endif
1087 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1088 # define SWIG_PYTHON_THREAD_END_BLOCK
1089 # endif
1090 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1091 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1092 # endif
1093 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1094 # define SWIG_PYTHON_THREAD_END_ALLOW
1095 # endif
1096 # endif
1097 #else /* No thread support */
1098 # define SWIG_PYTHON_INITIALIZE_THREADS
1099 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1100 # define SWIG_PYTHON_THREAD_END_BLOCK
1101 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1102 # define SWIG_PYTHON_THREAD_END_ALLOW
1103 #endif
1104 
1105 /* -----------------------------------------------------------------------------
1106  * Python API portion that goes into the runtime
1107  * ----------------------------------------------------------------------------- */
1108 
1109 #ifdef __cplusplus
1110 extern "C" {
1111 #endif
1112 
1113 /* -----------------------------------------------------------------------------
1114  * Constant declarations
1115  * ----------------------------------------------------------------------------- */
1116 
1117 /* Constant Types */
1118 #define SWIG_PY_POINTER 4
1119 #define SWIG_PY_BINARY 5
1120 
1121 /* Constant information structure */
1122 typedef struct swig_const_info {
1123  int type;
1124  char *name;
1125  long lvalue;
1126  double dvalue;
1127  void *pvalue;
1128  swig_type_info **ptype;
1129 } swig_const_info;
1130 
1131 
1132 /* -----------------------------------------------------------------------------
1133  * Wrapper of PyInstanceMethod_New() used in Python 3
1134  * It is exported to the generated module, used for -fastproxy
1135  * ----------------------------------------------------------------------------- */
1136 #if PY_VERSION_HEX >= 0x03000000
1137 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
1138 {
1139  return PyInstanceMethod_New(func);
1140 }
1141 #else
1142 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
1143 {
1144  return NULL;
1145 }
1146 #endif
1147 
1148 #ifdef __cplusplus
1149 }
1150 #endif
1151 
1152 
1153 /* -----------------------------------------------------------------------------
1154  * pyrun.swg
1155  *
1156  * This file contains the runtime support for Python modules
1157  * and includes code for managing global variables and pointer
1158  * type checking.
1159  *
1160  * ----------------------------------------------------------------------------- */
1161 
1162 /* Common SWIG API */
1163 
1164 /* for raw pointers */
1165 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1166 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1167 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1168 
1169 #ifdef SWIGPYTHON_BUILTIN
1170 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
1171 #else
1172 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1173 #endif
1174 
1175 #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1176 
1177 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1178 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1179 #define swig_owntype int
1180 
1181 /* for raw packed data */
1182 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1183 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1184 
1185 /* for class or struct pointers */
1186 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1187 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1188 
1189 /* for C or C++ function pointers */
1190 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1191 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1192 
1193 /* for C++ member pointers, ie, member methods */
1194 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1195 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1196 
1197 
1198 /* Runtime API */
1199 
1200 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
1201 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1202 #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1203 
1204 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1205 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1206 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1207 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1208 #define SWIG_fail goto fail
1209 
1210 
1211 /* Runtime API implementation */
1212 
1213 /* Error manipulation */
1214 
1215 SWIGINTERN void
1216 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1217  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1218  PyErr_SetObject(errtype, obj);
1219  Py_DECREF(obj);
1220  SWIG_PYTHON_THREAD_END_BLOCK;
1221 }
1222 
1223 SWIGINTERN void
1224 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1225  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1226  PyErr_SetString(errtype, msg);
1227  SWIG_PYTHON_THREAD_END_BLOCK;
1228 }
1229 
1230 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1231 
1232 /* Set a constant value */
1233 
1234 #if defined(SWIGPYTHON_BUILTIN)
1235 
1236 SWIGINTERN void
1237 SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
1238  PyObject *s = PyString_InternFromString(key);
1239  PyList_Append(seq, s);
1240  Py_DECREF(s);
1241 }
1242 
1243 SWIGINTERN void
1244 SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
1245 #if PY_VERSION_HEX < 0x02030000
1246  PyDict_SetItemString(d, (char *)name, obj);
1247 #else
1248  PyDict_SetItemString(d, name, obj);
1249 #endif
1250  Py_DECREF(obj);
1251  if (public_interface)
1252  SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1253 }
1254 
1255 #else
1256 
1257 SWIGINTERN void
1258 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1259 #if PY_VERSION_HEX < 0x02030000
1260  PyDict_SetItemString(d, (char *)name, obj);
1261 #else
1262  PyDict_SetItemString(d, name, obj);
1263 #endif
1264  Py_DECREF(obj);
1265 }
1266 
1267 #endif
1268 
1269 /* Append a value to the result obj */
1270 
1271 SWIGINTERN PyObject*
1272 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1273 #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1274  if (!result) {
1275  result = obj;
1276  } else if (result == Py_None) {
1277  Py_DECREF(result);
1278  result = obj;
1279  } else {
1280  if (!PyList_Check(result)) {
1281  PyObject *o2 = result;
1282  result = PyList_New(1);
1283  PyList_SetItem(result, 0, o2);
1284  }
1285  PyList_Append(result,obj);
1286  Py_DECREF(obj);
1287  }
1288  return result;
1289 #else
1290  PyObject* o2;
1291  PyObject* o3;
1292  if (!result) {
1293  result = obj;
1294  } else if (result == Py_None) {
1295  Py_DECREF(result);
1296  result = obj;
1297  } else {
1298  if (!PyTuple_Check(result)) {
1299  o2 = result;
1300  result = PyTuple_New(1);
1301  PyTuple_SET_ITEM(result, 0, o2);
1302  }
1303  o3 = PyTuple_New(1);
1304  PyTuple_SET_ITEM(o3, 0, obj);
1305  o2 = result;
1306  result = PySequence_Concat(o2, o3);
1307  Py_DECREF(o2);
1308  Py_DECREF(o3);
1309  }
1310  return result;
1311 #endif
1312 }
1313 
1314 /* Unpack the argument tuple */
1315 
1316 SWIGINTERN int
1317 SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1318 {
1319  if (!args) {
1320  if (!min && !max) {
1321  return 1;
1322  } else {
1323  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1324  name, (min == max ? "" : "at least "), (int)min);
1325  return 0;
1326  }
1327  }
1328  if (!PyTuple_Check(args)) {
1329  if (min <= 1 && max >= 1) {
1330  int i;
1331  objs[0] = args;
1332  for (i = 1; i < max; ++i) {
1333  objs[i] = 0;
1334  }
1335  return 2;
1336  }
1337  PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1338  return 0;
1339  } else {
1340  Py_ssize_t l = PyTuple_GET_SIZE(args);
1341  if (l < min) {
1342  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1343  name, (min == max ? "" : "at least "), (int)min, (int)l);
1344  return 0;
1345  } else if (l > max) {
1346  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1347  name, (min == max ? "" : "at most "), (int)max, (int)l);
1348  return 0;
1349  } else {
1350  int i;
1351  for (i = 0; i < l; ++i) {
1352  objs[i] = PyTuple_GET_ITEM(args, i);
1353  }
1354  for (; l < max; ++l) {
1355  objs[l] = 0;
1356  }
1357  return i + 1;
1358  }
1359  }
1360 }
1361 
1362 /* A functor is a function object with one single object argument */
1363 #if PY_VERSION_HEX >= 0x02020000
1364 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1365 #else
1366 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
1367 #endif
1368 
1369 /*
1370  Helper for static pointer initialization for both C and C++ code, for example
1371  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1372 */
1373 #ifdef __cplusplus
1374 #define SWIG_STATIC_POINTER(var) var
1375 #else
1376 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1377 #endif
1378 
1379 /* -----------------------------------------------------------------------------
1380  * Pointer declarations
1381  * ----------------------------------------------------------------------------- */
1382 
1383 /* Flags for new pointer objects */
1384 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1385 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1386 
1387 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1388 
1389 #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
1390 #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1391 
1392 #ifdef __cplusplus
1393 extern "C" {
1394 #endif
1395 
1396 /* How to access Py_None */
1397 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
1398 # ifndef SWIG_PYTHON_NO_BUILD_NONE
1399 # ifndef SWIG_PYTHON_BUILD_NONE
1400 # define SWIG_PYTHON_BUILD_NONE
1401 # endif
1402 # endif
1403 #endif
1404 
1405 #ifdef SWIG_PYTHON_BUILD_NONE
1406 # ifdef Py_None
1407 # undef Py_None
1408 # define Py_None SWIG_Py_None()
1409 # endif
1410 SWIGRUNTIMEINLINE PyObject *
1411 _SWIG_Py_None(void)
1412 {
1413  PyObject *none = Py_BuildValue((char*)"");
1414  Py_DECREF(none);
1415  return none;
1416 }
1417 SWIGRUNTIME PyObject *
1418 SWIG_Py_None(void)
1419 {
1420  static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
1421  return none;
1422 }
1423 #endif
1424 
1425 /* The python void return value */
1426 
1427 SWIGRUNTIMEINLINE PyObject *
1428 SWIG_Py_Void(void)
1429 {
1430  PyObject *none = Py_None;
1431  Py_INCREF(none);
1432  return none;
1433 }
1434 
1435 /* SwigPyClientData */
1436 
1437 typedef struct {
1438  PyObject *klass;
1439  PyObject *newraw;
1440  PyObject *newargs;
1441  PyObject *destroy;
1442  int delargs;
1443  int implicitconv;
1444  PyTypeObject *pytype;
1446 
1447 SWIGRUNTIMEINLINE int
1448 SWIG_Python_CheckImplicit(swig_type_info *ty)
1449 {
1450  SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
1451  return data ? data->implicitconv : 0;
1452 }
1453 
1454 SWIGRUNTIMEINLINE PyObject *
1455 SWIG_Python_ExceptionType(swig_type_info *desc) {
1456  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1457  PyObject *klass = data ? data->klass : 0;
1458  return (klass ? klass : PyExc_RuntimeError);
1459 }
1460 
1461 
1462 SWIGRUNTIME SwigPyClientData *
1463 SwigPyClientData_New(PyObject* obj)
1464 {
1465  if (!obj) {
1466  return 0;
1467  } else {
1468  SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
1469  /* the klass element */
1470  data->klass = obj;
1471  Py_INCREF(data->klass);
1472  /* the newraw method and newargs arguments used to create a new raw instance */
1473  if (PyClass_Check(obj)) {
1474  data->newraw = 0;
1475  data->newargs = obj;
1476  Py_INCREF(obj);
1477  } else {
1478 #if (PY_VERSION_HEX < 0x02020000)
1479  data->newraw = 0;
1480 #else
1481  data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
1482 #endif
1483  if (data->newraw) {
1484  Py_INCREF(data->newraw);
1485  data->newargs = PyTuple_New(1);
1486  PyTuple_SetItem(data->newargs, 0, obj);
1487  } else {
1488  data->newargs = obj;
1489  }
1490  Py_INCREF(data->newargs);
1491  }
1492  /* the destroy method, aka as the C++ delete method */
1493  data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
1494  if (PyErr_Occurred()) {
1495  PyErr_Clear();
1496  data->destroy = 0;
1497  }
1498  if (data->destroy) {
1499  int flags;
1500  Py_INCREF(data->destroy);
1501  flags = PyCFunction_GET_FLAGS(data->destroy);
1502 #ifdef METH_O
1503  data->delargs = !(flags & (METH_O));
1504 #else
1505  data->delargs = 0;
1506 #endif
1507  } else {
1508  data->delargs = 0;
1509  }
1510  data->implicitconv = 0;
1511  data->pytype = 0;
1512  return data;
1513  }
1514 }
1515 
1516 SWIGRUNTIME void
1517 SwigPyClientData_Del(SwigPyClientData *data) {
1518  Py_XDECREF(data->newraw);
1519  Py_XDECREF(data->newargs);
1520  Py_XDECREF(data->destroy);
1521 }
1522 
1523 /* =============== SwigPyObject =====================*/
1524 
1525 typedef struct {
1526  PyObject_HEAD
1527  void *ptr;
1528  swig_type_info *ty;
1529  int own;
1530  PyObject *next;
1531 #ifdef SWIGPYTHON_BUILTIN
1532  PyObject *dict;
1533 #endif
1534 } SwigPyObject;
1535 
1536 SWIGRUNTIME PyObject *
1537 SwigPyObject_long(SwigPyObject *v)
1538 {
1539  return PyLong_FromVoidPtr(v->ptr);
1540 }
1541 
1542 SWIGRUNTIME PyObject *
1543 SwigPyObject_format(const char* fmt, SwigPyObject *v)
1544 {
1545  PyObject *res = NULL;
1546  PyObject *args = PyTuple_New(1);
1547  if (args) {
1548  if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1549  PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1550  if (ofmt) {
1551 #if PY_VERSION_HEX >= 0x03000000
1552  res = PyUnicode_Format(ofmt,args);
1553 #else
1554  res = PyString_Format(ofmt,args);
1555 #endif
1556  Py_DECREF(ofmt);
1557  }
1558  Py_DECREF(args);
1559  }
1560  }
1561  return res;
1562 }
1563 
1564 SWIGRUNTIME PyObject *
1565 SwigPyObject_oct(SwigPyObject *v)
1566 {
1567  return SwigPyObject_format("%o",v);
1568 }
1569 
1570 SWIGRUNTIME PyObject *
1571 SwigPyObject_hex(SwigPyObject *v)
1572 {
1573  return SwigPyObject_format("%x",v);
1574 }
1575 
1576 SWIGRUNTIME PyObject *
1577 #ifdef METH_NOARGS
1578 SwigPyObject_repr(SwigPyObject *v)
1579 #else
1580 SwigPyObject_repr(SwigPyObject *v, PyObject *args)
1581 #endif
1582 {
1583  const char *name = SWIG_TypePrettyName(v->ty);
1584  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
1585  if (v->next) {
1586 # ifdef METH_NOARGS
1587  PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1588 # else
1589  PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
1590 # endif
1591 # if PY_VERSION_HEX >= 0x03000000
1592  PyObject *joined = PyUnicode_Concat(repr, nrep);
1593  Py_DecRef(repr);
1594  Py_DecRef(nrep);
1595  repr = joined;
1596 # else
1597  PyString_ConcatAndDel(&repr,nrep);
1598 # endif
1599  }
1600  return repr;
1601 }
1602 
1603 SWIGRUNTIME int
1604 SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
1605 {
1606  void *i = v->ptr;
1607  void *j = w->ptr;
1608  return (i < j) ? -1 : ((i > j) ? 1 : 0);
1609 }
1610 
1611 /* Added for Python 3.x, would it also be useful for Python 2.x? */
1612 SWIGRUNTIME PyObject*
1613 SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
1614 {
1615  PyObject* res;
1616  if( op != Py_EQ && op != Py_NE ) {
1617  Py_INCREF(Py_NotImplemented);
1618  return Py_NotImplemented;
1619  }
1620  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1621  return res;
1622 }
1623 
1624 
1625 SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
1626 
1627 #ifdef SWIGPYTHON_BUILTIN
1628 static swig_type_info *SwigPyObject_stype = 0;
1629 SWIGRUNTIME PyTypeObject*
1630 SwigPyObject_type(void) {
1631  SwigPyClientData *cd;
1632  assert(SwigPyObject_stype);
1633  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
1634  assert(cd);
1635  assert(cd->pytype);
1636  return cd->pytype;
1637 }
1638 #else
1639 SWIGRUNTIME PyTypeObject*
1640 SwigPyObject_type(void) {
1641  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1642  return type;
1643 }
1644 #endif
1645 
1646 SWIGRUNTIMEINLINE int
1647 SwigPyObject_Check(PyObject *op) {
1648 #ifdef SWIGPYTHON_BUILTIN
1649  PyTypeObject *target_tp = SwigPyObject_type();
1650  if (PyType_IsSubtype(op->ob_type, target_tp))
1651  return 1;
1652  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
1653 #else
1654  return (Py_TYPE(op) == SwigPyObject_type())
1655  || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
1656 #endif
1657 }
1658 
1659 SWIGRUNTIME PyObject *
1660 SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
1661 
1662 SWIGRUNTIME void
1663 SwigPyObject_dealloc(PyObject *v)
1664 {
1665  SwigPyObject *sobj = (SwigPyObject *) v;
1666  PyObject *next = sobj->next;
1667  if (sobj->own == SWIG_POINTER_OWN) {
1668  swig_type_info *ty = sobj->ty;
1669  SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1670  PyObject *destroy = data ? data->destroy : 0;
1671  if (destroy) {
1672  /* destroy is always a VARARGS method */
1673  PyObject *res;
1674  if (data->delargs) {
1675  /* we need to create a temporary object to carry the destroy operation */
1676  PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1677  res = SWIG_Python_CallFunctor(destroy, tmp);
1678  Py_DECREF(tmp);
1679  } else {
1680  PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1681  PyObject *mself = PyCFunction_GET_SELF(destroy);
1682  res = ((*meth)(mself, v));
1683  }
1684  Py_XDECREF(res);
1685  }
1686 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1687  else {
1688  const char *name = SWIG_TypePrettyName(ty);
1689  printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1690  }
1691 #endif
1692  }
1693  Py_XDECREF(next);
1694  PyObject_DEL(v);
1695 }
1696 
1697 SWIGRUNTIME PyObject*
1698 SwigPyObject_append(PyObject* v, PyObject* next)
1699 {
1700  SwigPyObject *sobj = (SwigPyObject *) v;
1701 #ifndef METH_O
1702  PyObject *tmp = 0;
1703  if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
1704  next = tmp;
1705 #endif
1706  if (!SwigPyObject_Check(next)) {
1707  return NULL;
1708  }
1709  sobj->next = next;
1710  Py_INCREF(next);
1711  return SWIG_Py_Void();
1712 }
1713 
1714 SWIGRUNTIME PyObject*
1715 #ifdef METH_NOARGS
1716 SwigPyObject_next(PyObject* v)
1717 #else
1718 SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1719 #endif
1720 {
1721  SwigPyObject *sobj = (SwigPyObject *) v;
1722  if (sobj->next) {
1723  Py_INCREF(sobj->next);
1724  return sobj->next;
1725  } else {
1726  return SWIG_Py_Void();
1727  }
1728 }
1729 
1730 SWIGINTERN PyObject*
1731 #ifdef METH_NOARGS
1732 SwigPyObject_disown(PyObject *v)
1733 #else
1734 SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1735 #endif
1736 {
1737  SwigPyObject *sobj = (SwigPyObject *)v;
1738  sobj->own = 0;
1739  return SWIG_Py_Void();
1740 }
1741 
1742 SWIGINTERN PyObject*
1743 #ifdef METH_NOARGS
1744 SwigPyObject_acquire(PyObject *v)
1745 #else
1746 SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1747 #endif
1748 {
1749  SwigPyObject *sobj = (SwigPyObject *)v;
1750  sobj->own = SWIG_POINTER_OWN;
1751  return SWIG_Py_Void();
1752 }
1753 
1754 SWIGINTERN PyObject*
1755 SwigPyObject_own(PyObject *v, PyObject *args)
1756 {
1757  PyObject *val = 0;
1758 #if (PY_VERSION_HEX < 0x02020000)
1759  if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
1760 #elif (PY_VERSION_HEX < 0x02050000)
1761  if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
1762 #else
1763  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
1764 #endif
1765  {
1766  return NULL;
1767  }
1768  else
1769  {
1770  SwigPyObject *sobj = (SwigPyObject *)v;
1771  PyObject *obj = PyBool_FromLong(sobj->own);
1772  if (val) {
1773 #ifdef METH_NOARGS
1774  if (PyObject_IsTrue(val)) {
1775  SwigPyObject_acquire(v);
1776  } else {
1777  SwigPyObject_disown(v);
1778  }
1779 #else
1780  if (PyObject_IsTrue(val)) {
1781  SwigPyObject_acquire(v,args);
1782  } else {
1783  SwigPyObject_disown(v,args);
1784  }
1785 #endif
1786  }
1787  return obj;
1788  }
1789 }
1790 
1791 #ifdef METH_O
1792 static PyMethodDef
1793 swigobject_methods[] = {
1794  {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
1795  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
1796  {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1797  {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
1798  {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
1799  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
1800  {0, 0, 0, 0}
1801 };
1802 #else
1803 static PyMethodDef
1804 swigobject_methods[] = {
1805  {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
1806  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
1807  {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1808  {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
1809  {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
1810  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
1811  {0, 0, 0, 0}
1812 };
1813 #endif
1814 
1815 #if PY_VERSION_HEX < 0x02020000
1816 SWIGINTERN PyObject *
1817 SwigPyObject_getattr(SwigPyObject *sobj,char *name)
1818 {
1819  return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
1820 }
1821 #endif
1822 
1823 SWIGRUNTIME PyTypeObject*
1824 SwigPyObject_TypeOnce(void) {
1825  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1826 
1827  static PyNumberMethods SwigPyObject_as_number = {
1828  (binaryfunc)0, /*nb_add*/
1829  (binaryfunc)0, /*nb_subtract*/
1830  (binaryfunc)0, /*nb_multiply*/
1831  /* nb_divide removed in Python 3 */
1832 #if PY_VERSION_HEX < 0x03000000
1833  (binaryfunc)0, /*nb_divide*/
1834 #endif
1835  (binaryfunc)0, /*nb_remainder*/
1836  (binaryfunc)0, /*nb_divmod*/
1837  (ternaryfunc)0,/*nb_power*/
1838  (unaryfunc)0, /*nb_negative*/
1839  (unaryfunc)0, /*nb_positive*/
1840  (unaryfunc)0, /*nb_absolute*/
1841  (inquiry)0, /*nb_nonzero*/
1842  0, /*nb_invert*/
1843  0, /*nb_lshift*/
1844  0, /*nb_rshift*/
1845  0, /*nb_and*/
1846  0, /*nb_xor*/
1847  0, /*nb_or*/
1848 #if PY_VERSION_HEX < 0x03000000
1849  0, /*nb_coerce*/
1850 #endif
1851  (unaryfunc)SwigPyObject_long, /*nb_int*/
1852 #if PY_VERSION_HEX < 0x03000000
1853  (unaryfunc)SwigPyObject_long, /*nb_long*/
1854 #else
1855  0, /*nb_reserved*/
1856 #endif
1857  (unaryfunc)0, /*nb_float*/
1858 #if PY_VERSION_HEX < 0x03000000
1859  (unaryfunc)SwigPyObject_oct, /*nb_oct*/
1860  (unaryfunc)SwigPyObject_hex, /*nb_hex*/
1861 #endif
1862 #if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
1863  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
1864 #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
1865  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1866 #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
1867  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
1868 #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
1869  0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
1870 #endif
1871  };
1872 
1873  static PyTypeObject swigpyobject_type;
1874  static int type_init = 0;
1875  if (!type_init) {
1876  const PyTypeObject tmp = {
1877  /* PyObject header changed in Python 3 */
1878 #if PY_VERSION_HEX >= 0x03000000
1879  PyVarObject_HEAD_INIT(NULL, 0)
1880 #else
1881  PyObject_HEAD_INIT(NULL)
1882  0, /* ob_size */
1883 #endif
1884  (char *)"SwigPyObject", /* tp_name */
1885  sizeof(SwigPyObject), /* tp_basicsize */
1886  0, /* tp_itemsize */
1887  (destructor)SwigPyObject_dealloc, /* tp_dealloc */
1888  0, /* tp_print */
1889 #if PY_VERSION_HEX < 0x02020000
1890  (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
1891 #else
1892  (getattrfunc)0, /* tp_getattr */
1893 #endif
1894  (setattrfunc)0, /* tp_setattr */
1895 #if PY_VERSION_HEX >= 0x03000000
1896  0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1897 #else
1898  (cmpfunc)SwigPyObject_compare, /* tp_compare */
1899 #endif
1900  (reprfunc)SwigPyObject_repr, /* tp_repr */
1901  &SwigPyObject_as_number, /* tp_as_number */
1902  0, /* tp_as_sequence */
1903  0, /* tp_as_mapping */
1904  (hashfunc)0, /* tp_hash */
1905  (ternaryfunc)0, /* tp_call */
1906  0, /* tp_str */
1907  PyObject_GenericGetAttr, /* tp_getattro */
1908  0, /* tp_setattro */
1909  0, /* tp_as_buffer */
1910  Py_TPFLAGS_DEFAULT, /* tp_flags */
1911  swigobject_doc, /* tp_doc */
1912  0, /* tp_traverse */
1913  0, /* tp_clear */
1914  (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
1915  0, /* tp_weaklistoffset */
1916 #if PY_VERSION_HEX >= 0x02020000
1917  0, /* tp_iter */
1918  0, /* tp_iternext */
1919  swigobject_methods, /* tp_methods */
1920  0, /* tp_members */
1921  0, /* tp_getset */
1922  0, /* tp_base */
1923  0, /* tp_dict */
1924  0, /* tp_descr_get */
1925  0, /* tp_descr_set */
1926  0, /* tp_dictoffset */
1927  0, /* tp_init */
1928  0, /* tp_alloc */
1929  0, /* tp_new */
1930  0, /* tp_free */
1931  0, /* tp_is_gc */
1932  0, /* tp_bases */
1933  0, /* tp_mro */
1934  0, /* tp_cache */
1935  0, /* tp_subclasses */
1936  0, /* tp_weaklist */
1937 #endif
1938 #if PY_VERSION_HEX >= 0x02030000
1939  0, /* tp_del */
1940 #endif
1941 #if PY_VERSION_HEX >= 0x02060000
1942  0, /* tp_version */
1943 #endif
1944 #ifdef COUNT_ALLOCS
1945  0,0,0,0 /* tp_alloc -> tp_next */
1946 #endif
1947  };
1948  swigpyobject_type = tmp;
1949  type_init = 1;
1950 #if PY_VERSION_HEX < 0x02020000
1951  swigpyobject_type.ob_type = &PyType_Type;
1952 #else
1953  if (PyType_Ready(&swigpyobject_type) < 0)
1954  return NULL;
1955 #endif
1956  }
1957  return &swigpyobject_type;
1958 }
1959 
1960 SWIGRUNTIME PyObject *
1961 SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1962 {
1963  SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
1964  if (sobj) {
1965  sobj->ptr = ptr;
1966  sobj->ty = ty;
1967  sobj->own = own;
1968  sobj->next = 0;
1969  }
1970  return (PyObject *)sobj;
1971 }
1972 
1973 /* -----------------------------------------------------------------------------
1974  * Implements a simple Swig Packed type, and use it instead of string
1975  * ----------------------------------------------------------------------------- */
1976 
1977 typedef struct {
1978  PyObject_HEAD
1979  void *pack;
1980  swig_type_info *ty;
1981  size_t size;
1982 } SwigPyPacked;
1983 
1984 SWIGRUNTIME int
1985 SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
1986 {
1987  char result[SWIG_BUFFER_SIZE];
1988  fputs("<Swig Packed ", fp);
1989  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1990  fputs("at ", fp);
1991  fputs(result, fp);
1992  }
1993  fputs(v->ty->name,fp);
1994  fputs(">", fp);
1995  return 0;
1996 }
1997 
1998 SWIGRUNTIME PyObject *
1999 SwigPyPacked_repr(SwigPyPacked *v)
2000 {
2001  char result[SWIG_BUFFER_SIZE];
2002  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
2003  return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
2004  } else {
2005  return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
2006  }
2007 }
2008 
2009 SWIGRUNTIME PyObject *
2010 SwigPyPacked_str(SwigPyPacked *v)
2011 {
2012  char result[SWIG_BUFFER_SIZE];
2013  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
2014  return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
2015  } else {
2016  return SWIG_Python_str_FromChar(v->ty->name);
2017  }
2018 }
2019 
2020 SWIGRUNTIME int
2021 SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
2022 {
2023  size_t i = v->size;
2024  size_t j = w->size;
2025  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
2026  return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
2027 }
2028 
2029 SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
2030 
2031 SWIGRUNTIME PyTypeObject*
2032 SwigPyPacked_type(void) {
2033  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
2034  return type;
2035 }
2036 
2037 SWIGRUNTIMEINLINE int
2038 SwigPyPacked_Check(PyObject *op) {
2039  return ((op)->ob_type == SwigPyPacked_TypeOnce())
2040  || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
2041 }
2042 
2043 SWIGRUNTIME void
2044 SwigPyPacked_dealloc(PyObject *v)
2045 {
2046  if (SwigPyPacked_Check(v)) {
2047  SwigPyPacked *sobj = (SwigPyPacked *) v;
2048  free(sobj->pack);
2049  }
2050  PyObject_DEL(v);
2051 }
2052 
2053 SWIGRUNTIME PyTypeObject*
2054 SwigPyPacked_TypeOnce(void) {
2055  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
2056  static PyTypeObject swigpypacked_type;
2057  static int type_init = 0;
2058  if (!type_init) {
2059  const PyTypeObject tmp = {
2060  /* PyObject header changed in Python 3 */
2061 #if PY_VERSION_HEX>=0x03000000
2062  PyVarObject_HEAD_INIT(NULL, 0)
2063 #else
2064  PyObject_HEAD_INIT(NULL)
2065  0, /* ob_size */
2066 #endif
2067  (char *)"SwigPyPacked", /* tp_name */
2068  sizeof(SwigPyPacked), /* tp_basicsize */
2069  0, /* tp_itemsize */
2070  (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
2071  (printfunc)SwigPyPacked_print, /* tp_print */
2072  (getattrfunc)0, /* tp_getattr */
2073  (setattrfunc)0, /* tp_setattr */
2074 #if PY_VERSION_HEX>=0x03000000
2075  0, /* tp_reserved in 3.0.1 */
2076 #else
2077  (cmpfunc)SwigPyPacked_compare, /* tp_compare */
2078 #endif
2079  (reprfunc)SwigPyPacked_repr, /* tp_repr */
2080  0, /* tp_as_number */
2081  0, /* tp_as_sequence */
2082  0, /* tp_as_mapping */
2083  (hashfunc)0, /* tp_hash */
2084  (ternaryfunc)0, /* tp_call */
2085  (reprfunc)SwigPyPacked_str, /* tp_str */
2086  PyObject_GenericGetAttr, /* tp_getattro */
2087  0, /* tp_setattro */
2088  0, /* tp_as_buffer */
2089  Py_TPFLAGS_DEFAULT, /* tp_flags */
2090  swigpacked_doc, /* tp_doc */
2091  0, /* tp_traverse */
2092  0, /* tp_clear */
2093  0, /* tp_richcompare */
2094  0, /* tp_weaklistoffset */
2095 #if PY_VERSION_HEX >= 0x02020000
2096  0, /* tp_iter */
2097  0, /* tp_iternext */
2098  0, /* tp_methods */
2099  0, /* tp_members */
2100  0, /* tp_getset */
2101  0, /* tp_base */
2102  0, /* tp_dict */
2103  0, /* tp_descr_get */
2104  0, /* tp_descr_set */
2105  0, /* tp_dictoffset */
2106  0, /* tp_init */
2107  0, /* tp_alloc */
2108  0, /* tp_new */
2109  0, /* tp_free */
2110  0, /* tp_is_gc */
2111  0, /* tp_bases */
2112  0, /* tp_mro */
2113  0, /* tp_cache */
2114  0, /* tp_subclasses */
2115  0, /* tp_weaklist */
2116 #endif
2117 #if PY_VERSION_HEX >= 0x02030000
2118  0, /* tp_del */
2119 #endif
2120 #if PY_VERSION_HEX >= 0x02060000
2121  0, /* tp_version */
2122 #endif
2123 #ifdef COUNT_ALLOCS
2124  0,0,0,0 /* tp_alloc -> tp_next */
2125 #endif
2126  };
2127  swigpypacked_type = tmp;
2128  type_init = 1;
2129 #if PY_VERSION_HEX < 0x02020000
2130  swigpypacked_type.ob_type = &PyType_Type;
2131 #else
2132  if (PyType_Ready(&swigpypacked_type) < 0)
2133  return NULL;
2134 #endif
2135  }
2136  return &swigpypacked_type;
2137 }
2138 
2139 SWIGRUNTIME PyObject *
2140 SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
2141 {
2142  SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
2143  if (sobj) {
2144  void *pack = malloc(size);
2145  if (pack) {
2146  memcpy(pack, ptr, size);
2147  sobj->pack = pack;
2148  sobj->ty = ty;
2149  sobj->size = size;
2150  } else {
2151  PyObject_DEL((PyObject *) sobj);
2152  sobj = 0;
2153  }
2154  }
2155  return (PyObject *) sobj;
2156 }
2157 
2158 SWIGRUNTIME swig_type_info *
2159 SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
2160 {
2161  if (SwigPyPacked_Check(obj)) {
2162  SwigPyPacked *sobj = (SwigPyPacked *)obj;
2163  if (sobj->size != size) return 0;
2164  memcpy(ptr, sobj->pack, size);
2165  return sobj->ty;
2166  } else {
2167  return 0;
2168  }
2169 }
2170 
2171 /* -----------------------------------------------------------------------------
2172  * pointers/data manipulation
2173  * ----------------------------------------------------------------------------- */
2174 
2175 SWIGRUNTIMEINLINE PyObject *
2176 _SWIG_This(void)
2177 {
2178  return SWIG_Python_str_FromChar("this");
2179 }
2180 
2181 static PyObject *swig_this = NULL;
2182 
2183 SWIGRUNTIME PyObject *
2184 SWIG_This(void)
2185 {
2186  if (swig_this == NULL)
2187  swig_this = _SWIG_This();
2188  return swig_this;
2189 }
2190 
2191 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
2192 
2193 /* TODO: I don't know how to implement the fast getset in Python 3 right now */
2194 #if PY_VERSION_HEX>=0x03000000
2195 #define SWIG_PYTHON_SLOW_GETSET_THIS
2196 #endif
2197 
2198 SWIGRUNTIME SwigPyObject *
2199 SWIG_Python_GetSwigThis(PyObject *pyobj)
2200 {
2201  PyObject *obj;
2202 
2203  if (SwigPyObject_Check(pyobj))
2204  return (SwigPyObject *) pyobj;
2205 
2206 #ifdef SWIGPYTHON_BUILTIN
2207  (void)obj;
2208 # ifdef PyWeakref_CheckProxy
2209  if (PyWeakref_CheckProxy(pyobj)) {
2210  pyobj = PyWeakref_GET_OBJECT(pyobj);
2211  if (pyobj && SwigPyObject_Check(pyobj))
2212  return (SwigPyObject*) pyobj;
2213  }
2214 # endif
2215  return NULL;
2216 #else
2217 
2218  obj = 0;
2219 
2220 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
2221  if (PyInstance_Check(pyobj)) {
2222  obj = _PyInstance_Lookup(pyobj, SWIG_This());
2223  } else {
2224  PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2225  if (dictptr != NULL) {
2226  PyObject *dict = *dictptr;
2227  obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2228  } else {
2229 #ifdef PyWeakref_CheckProxy
2230  if (PyWeakref_CheckProxy(pyobj)) {
2231  PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2232  return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2233  }
2234 #endif
2235  obj = PyObject_GetAttr(pyobj,SWIG_This());
2236  if (obj) {
2237  Py_DECREF(obj);
2238  } else {
2239  if (PyErr_Occurred()) PyErr_Clear();
2240  return 0;
2241  }
2242  }
2243  }
2244 #else
2245  obj = PyObject_GetAttr(pyobj,SWIG_This());
2246  if (obj) {
2247  Py_DECREF(obj);
2248  } else {
2249  if (PyErr_Occurred()) PyErr_Clear();
2250  return 0;
2251  }
2252 #endif
2253  if (obj && !SwigPyObject_Check(obj)) {
2254  /* a PyObject is called 'this', try to get the 'real this'
2255  SwigPyObject from it */
2256  return SWIG_Python_GetSwigThis(obj);
2257  }
2258  return (SwigPyObject *)obj;
2259 #endif
2260 }
2261 
2262 /* Acquire a pointer value */
2263 
2264 SWIGRUNTIME int
2265 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2266  if (own == SWIG_POINTER_OWN) {
2267  SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
2268  if (sobj) {
2269  int oldown = sobj->own;
2270  sobj->own = own;
2271  return oldown;
2272  }
2273  }
2274  return 0;
2275 }
2276 
2277 /* Convert a pointer value */
2278 
2279 SWIGRUNTIME int
2280 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2281  int res;
2282  SwigPyObject *sobj;
2283  int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2284 
2285  if (!obj)
2286  return SWIG_ERROR;
2287  if (obj == Py_None && !implicit_conv) {
2288  if (ptr)
2289  *ptr = 0;
2290  return SWIG_OK;
2291  }
2292 
2293  res = SWIG_ERROR;
2294 
2295  sobj = SWIG_Python_GetSwigThis(obj);
2296  if (own)
2297  *own = 0;
2298  while (sobj) {
2299  void *vptr = sobj->ptr;
2300  if (ty) {
2301  swig_type_info *to = sobj->ty;
2302  if (to == ty) {
2303  /* no type cast needed */
2304  if (ptr) *ptr = vptr;
2305  break;
2306  } else {
2307  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2308  if (!tc) {
2309  sobj = (SwigPyObject *)sobj->next;
2310  } else {
2311  if (ptr) {
2312  int newmemory = 0;
2313  *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2314  if (newmemory == SWIG_CAST_NEW_MEMORY) {
2315  assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
2316  if (own)
2317  *own = *own | SWIG_CAST_NEW_MEMORY;
2318  }
2319  }
2320  break;
2321  }
2322  }
2323  } else {
2324  if (ptr) *ptr = vptr;
2325  break;
2326  }
2327  }
2328  if (sobj) {
2329  if (own)
2330  *own = *own | sobj->own;
2331  if (flags & SWIG_POINTER_DISOWN) {
2332  sobj->own = 0;
2333  }
2334  res = SWIG_OK;
2335  } else {
2336  if (implicit_conv) {
2337  SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
2338  if (data && !data->implicitconv) {
2339  PyObject *klass = data->klass;
2340  if (klass) {
2341  PyObject *impconv;
2342  data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2343  impconv = SWIG_Python_CallFunctor(klass, obj);
2344  data->implicitconv = 0;
2345  if (PyErr_Occurred()) {
2346  PyErr_Clear();
2347  impconv = 0;
2348  }
2349  if (impconv) {
2350  SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2351  if (iobj) {
2352  void *vptr;
2353  res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2354  if (SWIG_IsOK(res)) {
2355  if (ptr) {
2356  *ptr = vptr;
2357  /* transfer the ownership to 'ptr' */
2358  iobj->own = 0;
2359  res = SWIG_AddCast(res);
2360  res = SWIG_AddNewMask(res);
2361  } else {
2362  res = SWIG_AddCast(res);
2363  }
2364  }
2365  }
2366  Py_DECREF(impconv);
2367  }
2368  }
2369  }
2370  }
2371  if (!SWIG_IsOK(res) && obj == Py_None) {
2372  if (ptr)
2373  *ptr = 0;
2374  if (PyErr_Occurred())
2375  PyErr_Clear();
2376  res = SWIG_OK;
2377  }
2378  }
2379  return res;
2380 }
2381 
2382 /* Convert a function ptr value */
2383 
2384 SWIGRUNTIME int
2385 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2386  if (!PyCFunction_Check(obj)) {
2387  return SWIG_ConvertPtr(obj, ptr, ty, 0);
2388  } else {
2389  void *vptr = 0;
2390 
2391  /* here we get the method pointer for callbacks */
2392  const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2393  const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2394  if (desc)
2395  desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2396  if (!desc)
2397  return SWIG_ERROR;
2398  if (ty) {
2399  swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
2400  if (tc) {
2401  int newmemory = 0;
2402  *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2403  assert(!newmemory); /* newmemory handling not yet implemented */
2404  } else {
2405  return SWIG_ERROR;
2406  }
2407  } else {
2408  *ptr = vptr;
2409  }
2410  return SWIG_OK;
2411  }
2412 }
2413 
2414 /* Convert a packed value value */
2415 
2416 SWIGRUNTIME int
2417 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2418  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
2419  if (!to) return SWIG_ERROR;
2420  if (ty) {
2421  if (to != ty) {
2422  /* check type cast? */
2423  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2424  if (!tc) return SWIG_ERROR;
2425  }
2426  }
2427  return SWIG_OK;
2428 }
2429 
2430 /* -----------------------------------------------------------------------------
2431  * Create a new pointer object
2432  * ----------------------------------------------------------------------------- */
2433 
2434 /*
2435  Create a new instance object, without calling __init__, and set the
2436  'this' attribute.
2437 */
2438 
2439 SWIGRUNTIME PyObject*
2440 SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
2441 {
2442 #if (PY_VERSION_HEX >= 0x02020000)
2443  PyObject *inst = 0;
2444  PyObject *newraw = data->newraw;
2445  if (newraw) {
2446  inst = PyObject_Call(newraw, data->newargs, NULL);
2447  if (inst) {
2448 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2449  PyObject **dictptr = _PyObject_GetDictPtr(inst);
2450  if (dictptr != NULL) {
2451  PyObject *dict = *dictptr;
2452  if (dict == NULL) {
2453  dict = PyDict_New();
2454  *dictptr = dict;
2455  PyDict_SetItem(dict, SWIG_This(), swig_this);
2456  }
2457  }
2458 #else
2459  PyObject *key = SWIG_This();
2460  PyObject_SetAttr(inst, key, swig_this);
2461 #endif
2462  }
2463  } else {
2464 #if PY_VERSION_HEX >= 0x03000000
2465  inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
2466  if (inst) {
2467  PyObject_SetAttr(inst, SWIG_This(), swig_this);
2468  Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2469  }
2470 #else
2471  PyObject *dict = PyDict_New();
2472  if (dict) {
2473  PyDict_SetItem(dict, SWIG_This(), swig_this);
2474  inst = PyInstance_NewRaw(data->newargs, dict);
2475  Py_DECREF(dict);
2476  }
2477 #endif
2478  }
2479  return inst;
2480 #else
2481 #if (PY_VERSION_HEX >= 0x02010000)
2482  PyObject *inst = 0;
2483  PyObject *dict = PyDict_New();
2484  if (dict) {
2485  PyDict_SetItem(dict, SWIG_This(), swig_this);
2486  inst = PyInstance_NewRaw(data->newargs, dict);
2487  Py_DECREF(dict);
2488  }
2489  return (PyObject *) inst;
2490 #else
2491  PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
2492  if (inst == NULL) {
2493  return NULL;
2494  }
2495  inst->in_class = (PyClassObject *)data->newargs;
2496  Py_INCREF(inst->in_class);
2497  inst->in_dict = PyDict_New();
2498  if (inst->in_dict == NULL) {
2499  Py_DECREF(inst);
2500  return NULL;
2501  }
2502 #ifdef Py_TPFLAGS_HAVE_WEAKREFS
2503  inst->in_weakreflist = NULL;
2504 #endif
2505 #ifdef Py_TPFLAGS_GC
2506  PyObject_GC_Init(inst);
2507 #endif
2508  PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
2509  return (PyObject *) inst;
2510 #endif
2511 #endif
2512 }
2513 
2514 SWIGRUNTIME void
2515 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2516 {
2517  PyObject *dict;
2518 #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2519  PyObject **dictptr = _PyObject_GetDictPtr(inst);
2520  if (dictptr != NULL) {
2521  dict = *dictptr;
2522  if (dict == NULL) {
2523  dict = PyDict_New();
2524  *dictptr = dict;
2525  }
2526  PyDict_SetItem(dict, SWIG_This(), swig_this);
2527  return;
2528  }
2529 #endif
2530  dict = PyObject_GetAttrString(inst, (char*)"__dict__");
2531  PyDict_SetItem(dict, SWIG_This(), swig_this);
2532  Py_DECREF(dict);
2533 }
2534 
2535 
2536 SWIGINTERN PyObject *
2537 SWIG_Python_InitShadowInstance(PyObject *args) {
2538  PyObject *obj[2];
2539  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2540  return NULL;
2541  } else {
2542  SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2543  if (sthis) {
2544  SwigPyObject_append((PyObject*) sthis, obj[1]);
2545  } else {
2546  SWIG_Python_SetSwigThis(obj[0], obj[1]);
2547  }
2548  return SWIG_Py_Void();
2549  }
2550 }
2551 
2552 /* Create a new pointer object */
2553 
2554 SWIGRUNTIME PyObject *
2555 SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2556  SwigPyClientData *clientdata;
2557  PyObject * robj;
2558  int own;
2559 
2560  if (!ptr)
2561  return SWIG_Py_Void();
2562 
2563  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2564  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2565  if (clientdata && clientdata->pytype) {
2566  SwigPyObject *newobj;
2567  if (flags & SWIG_BUILTIN_TP_INIT) {
2568  newobj = (SwigPyObject*) self;
2569  if (newobj->ptr) {
2570  PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
2571  while (newobj->next)
2572  newobj = (SwigPyObject *) newobj->next;
2573  newobj->next = next_self;
2574  newobj = (SwigPyObject *)next_self;
2575  }
2576  } else {
2577  newobj = PyObject_New(SwigPyObject, clientdata->pytype);
2578  }
2579  if (newobj) {
2580  newobj->ptr = ptr;
2581  newobj->ty = type;
2582  newobj->own = own;
2583  newobj->next = 0;
2584 #ifdef SWIGPYTHON_BUILTIN
2585  newobj->dict = 0;
2586 #endif
2587  return (PyObject*) newobj;
2588  }
2589  return SWIG_Py_Void();
2590  }
2591 
2592  assert(!(flags & SWIG_BUILTIN_TP_INIT));
2593 
2594  robj = SwigPyObject_New(ptr, type, own);
2595  if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2596  PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2597  Py_DECREF(robj);
2598  robj = inst;
2599  }
2600  return robj;
2601 }
2602 
2603 /* Create a new packed object */
2604 
2605 SWIGRUNTIMEINLINE PyObject *
2606 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2607  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2608 }
2609 
2610 /* -----------------------------------------------------------------------------*
2611  * Get type list
2612  * -----------------------------------------------------------------------------*/
2613 
2614 #ifdef SWIG_LINK_RUNTIME
2615 void *SWIG_ReturnGlobalTypeList(void *);
2616 #endif
2617 
2618 SWIGRUNTIME swig_module_info *
2619 SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
2620  static void *type_pointer = (void *)0;
2621  /* first check if module already created */
2622  if (!type_pointer) {
2623 #ifdef SWIG_LINK_RUNTIME
2624  type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2625 #else
2626 # ifdef SWIGPY_USE_CAPSULE
2627  type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2628 # else
2629  type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2630  (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
2631 # endif
2632  if (PyErr_Occurred()) {
2633  PyErr_Clear();
2634  type_pointer = (void *)0;
2635  }
2636 #endif
2637  }
2638  return (swig_module_info *) type_pointer;
2639 }
2640 
2641 #if PY_MAJOR_VERSION < 2
2642 /* PyModule_AddObject function was introduced in Python 2.0. The following function
2643  is copied out of Python/modsupport.c in python version 2.3.4 */
2644 SWIGINTERN int
2645 PyModule_AddObject(PyObject *m, char *name, PyObject *o)
2646 {
2647  PyObject *dict;
2648  if (!PyModule_Check(m)) {
2649  PyErr_SetString(PyExc_TypeError,
2650  "PyModule_AddObject() needs module as first arg");
2651  return SWIG_ERROR;
2652  }
2653  if (!o) {
2654  PyErr_SetString(PyExc_TypeError,
2655  "PyModule_AddObject() needs non-NULL value");
2656  return SWIG_ERROR;
2657  }
2658 
2659  dict = PyModule_GetDict(m);
2660  if (dict == NULL) {
2661  /* Internal error -- modules must have a dict! */
2662  PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
2663  PyModule_GetName(m));
2664  return SWIG_ERROR;
2665  }
2666  if (PyDict_SetItemString(dict, name, o))
2667  return SWIG_ERROR;
2668  Py_DECREF(o);
2669  return SWIG_OK;
2670 }
2671 #endif
2672 
2673 SWIGRUNTIME void
2674 #ifdef SWIGPY_USE_CAPSULE
2675 SWIG_Python_DestroyModule(PyObject *obj)
2676 #else
2677 SWIG_Python_DestroyModule(void *vptr)
2678 #endif
2679 {
2680 #ifdef SWIGPY_USE_CAPSULE
2681  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
2682 #else
2683  swig_module_info *swig_module = (swig_module_info *) vptr;
2684 #endif
2685  swig_type_info **types = swig_module->types;
2686  size_t i;
2687  for (i =0; i < swig_module->size; ++i) {
2688  swig_type_info *ty = types[i];
2689  if (ty->owndata) {
2690  SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
2691  if (data) SwigPyClientData_Del(data);
2692  }
2693  }
2694  Py_DECREF(SWIG_This());
2695  swig_this = NULL;
2696 }
2697 
2698 SWIGRUNTIME void
2699 SWIG_Python_SetModule(swig_module_info *swig_module) {
2700 #if PY_VERSION_HEX >= 0x03000000
2701  /* Add a dummy module object into sys.modules */
2702  PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
2703 #else
2704  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
2705  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2706 #endif
2707 #ifdef SWIGPY_USE_CAPSULE
2708  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2709  if (pointer && module) {
2710  PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
2711  } else {
2712  Py_XDECREF(pointer);
2713  }
2714 #else
2715  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
2716  if (pointer && module) {
2717  PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
2718  } else {
2719  Py_XDECREF(pointer);
2720  }
2721 #endif
2722 }
2723 
2724 /* The python cached type query */
2725 SWIGRUNTIME PyObject *
2726 SWIG_Python_TypeCache(void) {
2727  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2728  return cache;
2729 }
2730 
2731 SWIGRUNTIME swig_type_info *
2732 SWIG_Python_TypeQuery(const char *type)
2733 {
2734  PyObject *cache = SWIG_Python_TypeCache();
2735  PyObject *key = SWIG_Python_str_FromChar(type);
2736  PyObject *obj = PyDict_GetItem(cache, key);
2737  swig_type_info *descriptor;
2738  if (obj) {
2739 #ifdef SWIGPY_USE_CAPSULE
2740  descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2741 #else
2742  descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
2743 #endif
2744  } else {
2745  swig_module_info *swig_module = SWIG_GetModule(0);
2746  descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2747  if (descriptor) {
2748 #ifdef SWIGPY_USE_CAPSULE
2749  obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2750 #else
2751  obj = PyCObject_FromVoidPtr(descriptor, NULL);
2752 #endif
2753  PyDict_SetItem(cache, key, obj);
2754  Py_DECREF(obj);
2755  }
2756  }
2757  Py_DECREF(key);
2758  return descriptor;
2759 }
2760 
2761 /*
2762  For backward compatibility only
2763 */
2764 #define SWIG_POINTER_EXCEPTION 0
2765 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2766 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2767 
2768 SWIGRUNTIME int
2769 SWIG_Python_AddErrMesg(const char* mesg, int infront)
2770 {
2771  if (PyErr_Occurred()) {
2772  PyObject *type = 0;
2773  PyObject *value = 0;
2774  PyObject *traceback = 0;
2775  PyErr_Fetch(&type, &value, &traceback);
2776  if (value) {
2777  char *tmp;
2778  PyObject *old_str = PyObject_Str(value);
2779  Py_XINCREF(type);
2780  PyErr_Clear();
2781  if (infront) {
2782  PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
2783  } else {
2784  PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
2785  }
2786  SWIG_Python_str_DelForPy3(tmp);
2787  Py_DECREF(old_str);
2788  }
2789  return 1;
2790  } else {
2791  return 0;
2792  }
2793 }
2794 
2795 SWIGRUNTIME int
2796 SWIG_Python_ArgFail(int argnum)
2797 {
2798  if (PyErr_Occurred()) {
2799  /* add information about failing argument */
2800  char mesg[256];
2801  PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2802  return SWIG_Python_AddErrMesg(mesg, 1);
2803  } else {
2804  return 0;
2805  }
2806 }
2807 
2808 SWIGRUNTIMEINLINE const char *
2809 SwigPyObject_GetDesc(PyObject *self)
2810 {
2811  SwigPyObject *v = (SwigPyObject *)self;
2812  swig_type_info *ty = v ? v->ty : 0;
2813  return ty ? ty->str : "";
2814 }
2815 
2816 SWIGRUNTIME void
2817 SWIG_Python_TypeError(const char *type, PyObject *obj)
2818 {
2819  if (type) {
2820 #if defined(SWIG_COBJECT_TYPES)
2821  if (obj && SwigPyObject_Check(obj)) {
2822  const char *otype = (const char *) SwigPyObject_GetDesc(obj);
2823  if (otype) {
2824  PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
2825  type, otype);
2826  return;
2827  }
2828  } else
2829 #endif
2830  {
2831  const char *otype = (obj ? obj->ob_type->tp_name : 0);
2832  if (otype) {
2833  PyObject *str = PyObject_Str(obj);
2834  const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
2835  if (cstr) {
2836  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2837  type, otype, cstr);
2838  SWIG_Python_str_DelForPy3(cstr);
2839  } else {
2840  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2841  type, otype);
2842  }
2843  Py_XDECREF(str);
2844  return;
2845  }
2846  }
2847  PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2848  } else {
2849  PyErr_Format(PyExc_TypeError, "unexpected type is received");
2850  }
2851 }
2852 
2853 
2854 /* Convert a pointer value, signal an exception on a type mismatch */
2855 SWIGRUNTIME void *
2856 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
2857  void *result;
2858  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2859  PyErr_Clear();
2860 #if SWIG_POINTER_EXCEPTION
2861  if (flags) {
2862  SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2863  SWIG_Python_ArgFail(argnum);
2864  }
2865 #endif
2866  }
2867  return result;
2868 }
2869 
2870 #ifdef SWIGPYTHON_BUILTIN
2871 SWIGRUNTIME int
2872 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
2873  PyTypeObject *tp = obj->ob_type;
2874  PyObject *descr;
2875  PyObject *encoded_name;
2876  descrsetfunc f;
2877  int res = -1;
2878 
2879 # ifdef Py_USING_UNICODE
2880  if (PyString_Check(name)) {
2881  name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
2882  if (!name)
2883  return -1;
2884  } else if (!PyUnicode_Check(name))
2885 # else
2886  if (!PyString_Check(name))
2887 # endif
2888  {
2889  PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
2890  return -1;
2891  } else {
2892  Py_INCREF(name);
2893  }
2894 
2895  if (!tp->tp_dict) {
2896  if (PyType_Ready(tp) < 0)
2897  goto done;
2898  }
2899 
2900  descr = _PyType_Lookup(tp, name);
2901  f = NULL;
2902  if (descr != NULL)
2903  f = descr->ob_type->tp_descr_set;
2904  if (!f) {
2905  if (PyString_Check(name)) {
2906  encoded_name = name;
2907  Py_INCREF(name);
2908  } else {
2909  encoded_name = PyUnicode_AsUTF8String(name);
2910  }
2911  PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2912  Py_DECREF(encoded_name);
2913  } else {
2914  res = f(descr, obj, value);
2915  }
2916 
2917  done:
2918  Py_DECREF(name);
2919  return res;
2920 }
2921 #endif
2922 
2923 
2924 #ifdef __cplusplus
2925 }
2926 #endif
2927 
2928 
2929 
2930 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2931 
2932 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2933 
2934 
2935 
2936  #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
2937 
2938 /* -----------------------------------------------------------------------------
2939  * director.swg
2940  *
2941  * This file contains support for director classes so that Python proxy
2942  * methods can be called from C++.
2943  * ----------------------------------------------------------------------------- */
2944 
2945 #ifndef SWIG_DIRECTOR_PYTHON_HEADER_
2946 #define SWIG_DIRECTOR_PYTHON_HEADER_
2947 
2948 #include <string>
2949 #include <iostream>
2950 #include <exception>
2951 #include <vector>
2952 #include <map>
2953 
2954 
2955 /*
2956  Use -DSWIG_PYTHON_DIRECTOR_NO_VTABLE if you don't want to generate a 'virtual
2957  table', and avoid multiple GetAttr calls to retrieve the python
2958  methods.
2959 */
2960 
2961 #ifndef SWIG_PYTHON_DIRECTOR_NO_VTABLE
2962 #ifndef SWIG_PYTHON_DIRECTOR_VTABLE
2963 #define SWIG_PYTHON_DIRECTOR_VTABLE
2964 #endif
2965 #endif
2966 
2967 
2968 
2969 /*
2970  Use -DSWIG_DIRECTOR_NO_UEH if you prefer to avoid the use of the
2971  Undefined Exception Handler provided by swig.
2972 */
2973 #ifndef SWIG_DIRECTOR_NO_UEH
2974 #ifndef SWIG_DIRECTOR_UEH
2975 #define SWIG_DIRECTOR_UEH
2976 #endif
2977 #endif
2978 
2979 
2980 /*
2981  Use -DSWIG_DIRECTOR_STATIC if you prefer to avoid the use of the
2982  'Swig' namespace. This could be useful for multi-modules projects.
2983 */
2984 #ifdef SWIG_DIRECTOR_STATIC
2985 /* Force anonymous (static) namespace */
2986 #define Swig
2987 #endif
2988 
2989 
2990 /*
2991  Use -DSWIG_DIRECTOR_NORTTI if you prefer to avoid the use of the
2992  native C++ RTTI and dynamic_cast<>. But be aware that directors
2993  could stop working when using this option.
2994 */
2995 #ifdef SWIG_DIRECTOR_NORTTI
2996 /*
2997  When we don't use the native C++ RTTI, we implement a minimal one
2998  only for Directors.
2999 */
3000 # ifndef SWIG_DIRECTOR_RTDIR
3001 # define SWIG_DIRECTOR_RTDIR
3002 
3003 namespace Swig {
3004  class Director;
3005  SWIGINTERN std::map<void *, Director *>& get_rtdir_map() {
3006  static std::map<void *, Director *> rtdir_map;
3007  return rtdir_map;
3008  }
3009 
3010  SWIGINTERNINLINE void set_rtdir(void *vptr, Director *rtdir) {
3011  get_rtdir_map()[vptr] = rtdir;
3012  }
3013 
3014  SWIGINTERNINLINE Director *get_rtdir(void *vptr) {
3015  std::map<void *, Director *>::const_iterator pos = get_rtdir_map().find(vptr);
3016  Director *rtdir = (pos != get_rtdir_map().end()) ? pos->second : 0;
3017  return rtdir;
3018  }
3019 }
3020 # endif /* SWIG_DIRECTOR_RTDIR */
3021 
3022 # define SWIG_DIRECTOR_CAST(ARG) Swig::get_rtdir(static_cast<void *>(ARG))
3023 # define SWIG_DIRECTOR_RGTR(ARG1, ARG2) Swig::set_rtdir(static_cast<void *>(ARG1), ARG2)
3024 
3025 #else
3026 
3027 # define SWIG_DIRECTOR_CAST(ARG) dynamic_cast<Swig::Director *>(ARG)
3028 # define SWIG_DIRECTOR_RGTR(ARG1, ARG2)
3029 
3030 #endif /* SWIG_DIRECTOR_NORTTI */
3031 
3032 extern "C" {
3033  struct swig_type_info;
3034 }
3035 
3036 namespace Swig {
3037 
3038  /* memory handler */
3039  struct GCItem {
3040  virtual ~GCItem() {}
3041 
3042  virtual int get_own() const {
3043  return 0;
3044  }
3045  };
3046 
3047  struct GCItem_var {
3048  GCItem_var(GCItem *item = 0) : _item(item) {
3049  }
3050 
3051  GCItem_var& operator=(GCItem *item) {
3052  GCItem *tmp = _item;
3053  _item = item;
3054  delete tmp;
3055  return *this;
3056  }
3057 
3058  ~GCItem_var() {
3059  delete _item;
3060  }
3061 
3062  GCItem * operator->() const {
3063  return _item;
3064  }
3065 
3066  private:
3067  GCItem *_item;
3068  };
3069 
3071  GCItem_Object(int own) : _own(own) {
3072  }
3073 
3074  virtual ~GCItem_Object() {
3075  }
3076 
3077  int get_own() const {
3078  return _own;
3079  }
3080 
3081  private:
3082  int _own;
3083  };
3084 
3085  template <typename Type>
3086  struct GCItem_T : GCItem {
3087  GCItem_T(Type *ptr) : _ptr(ptr) {
3088  }
3089 
3090  virtual ~GCItem_T() {
3091  delete _ptr;
3092  }
3093 
3094  private:
3095  Type *_ptr;
3096  };
3097 
3098  template <typename Type>
3099  struct GCArray_T : GCItem {
3100  GCArray_T(Type *ptr) : _ptr(ptr) {
3101  }
3102 
3103  virtual ~GCArray_T() {
3104  delete[] _ptr;
3105  }
3106 
3107  private:
3108  Type *_ptr;
3109  };
3110 
3111  /* base class for director exceptions */
3112  class DirectorException : public std::exception {
3113  protected:
3114  std::string swig_msg;
3115  public:
3116  DirectorException(PyObject *error, const char *hdr ="", const char *msg ="") : swig_msg(hdr) {
3117  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3118  if (msg[0]) {
3119  swig_msg += " ";
3120  swig_msg += msg;
3121  }
3122  if (!PyErr_Occurred()) {
3123  PyErr_SetString(error, what());
3124  }
3125  SWIG_PYTHON_THREAD_END_BLOCK;
3126  }
3127 
3128  virtual ~DirectorException() throw() {
3129  }
3130 
3131  /* Deprecated, use what() instead */
3132  const char *getMessage() const {
3133  return what();
3134  }
3135 
3136  const char *what() const throw() {
3137  return swig_msg.c_str();
3138  }
3139 
3140  static void raise(PyObject *error, const char *msg) {
3141  throw DirectorException(error, msg);
3142  }
3143 
3144  static void raise(const char *msg) {
3145  raise(PyExc_RuntimeError, msg);
3146  }
3147  };
3148 
3149  /* unknown exception handler */
3151 #ifdef SWIG_DIRECTOR_UEH
3152  static void handler() {
3153  try {
3154  throw;
3155  } catch (DirectorException& e) {
3156  std::cerr << "SWIG Director exception caught:" << std::endl
3157  << e.what() << std::endl;
3158  } catch (std::exception& e) {
3159  std::cerr << "std::exception caught: "<< e.what() << std::endl;
3160  } catch (...) {
3161  std::cerr << "Unknown exception caught." << std::endl;
3162  }
3163 
3164  std::cerr << std::endl
3165  << "Python interpreter traceback:" << std::endl;
3166  PyErr_Print();
3167  std::cerr << std::endl;
3168 
3169  std::cerr << "This exception was caught by the SWIG unexpected exception handler." << std::endl
3170  << "Try using %feature(\"director:except\") to avoid reaching this point." << std::endl
3171  << std::endl
3172  << "Exception is being re-thrown, program will likely abort/terminate." << std::endl;
3173  throw;
3174  }
3175 
3176  public:
3177 
3178  std::unexpected_handler old;
3179  UnknownExceptionHandler(std::unexpected_handler nh = handler) {
3180  old = std::set_unexpected(nh);
3181  }
3182 
3184  std::set_unexpected(old);
3185  }
3186 #endif
3187  };
3188 
3189  /* type mismatch in the return value from a python method call */
3191  public:
3192  DirectorTypeMismatchException(PyObject *error, const char *msg="")
3193  : DirectorException(error, "SWIG director type mismatch", msg) {
3194  }
3195 
3196  DirectorTypeMismatchException(const char *msg="")
3197  : DirectorException(PyExc_TypeError, "SWIG director type mismatch", msg) {
3198  }
3199 
3200  static void raise(PyObject *error, const char *msg) {
3201  throw DirectorTypeMismatchException(error, msg);
3202  }
3203 
3204  static void raise(const char *msg) {
3205  throw DirectorTypeMismatchException(msg);
3206  }
3207  };
3208 
3209  /* any python exception that occurs during a director method call */
3211  public:
3212  DirectorMethodException(const char *msg = "")
3213  : DirectorException(PyExc_RuntimeError, "SWIG director method error.", msg) {
3214  }
3215 
3216  static void raise(const char *msg) {
3217  throw DirectorMethodException(msg);
3218  }
3219  };
3220 
3221  /* attempt to call a pure virtual method via a director method */
3223  public:
3224  DirectorPureVirtualException(const char *msg = "")
3225  : DirectorException(PyExc_RuntimeError, "SWIG director pure virtual method called", msg) {
3226  }
3227 
3228  static void raise(const char *msg) {
3229  throw DirectorPureVirtualException(msg);
3230  }
3231  };
3232 
3233 
3234 #if defined(SWIG_PYTHON_THREADS)
3235 /* __THREAD__ is the old macro to activate some thread support */
3236 # if !defined(__THREAD__)
3237 # define __THREAD__ 1
3238 # endif
3239 #endif
3240 
3241 #ifdef __THREAD__
3242 # include "pythread.h"
3243  class Guard {
3244  PyThread_type_lock &mutex_;
3245 
3246  public:
3247  Guard(PyThread_type_lock & mutex) : mutex_(mutex) {
3248  PyThread_acquire_lock(mutex_, WAIT_LOCK);
3249  }
3250 
3251  ~Guard() {
3252  PyThread_release_lock(mutex_);
3253  }
3254  };
3255 # define SWIG_GUARD(mutex) Guard _guard(mutex)
3256 #else
3257 # define SWIG_GUARD(mutex)
3258 #endif
3259 
3260  /* director base class */
3261  class Director {
3262  private:
3263  /* pointer to the wrapped python object */
3264  PyObject *swig_self;
3265  /* flag indicating whether the object is owned by python or c++ */
3266  mutable bool swig_disown_flag;
3267 
3268  /* decrement the reference count of the wrapped python object */
3269  void swig_decref() const {
3270  if (swig_disown_flag) {
3271  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3272  Py_DECREF(swig_self);
3273  SWIG_PYTHON_THREAD_END_BLOCK;
3274  }
3275  }
3276 
3277  public:
3278  /* wrap a python object, optionally taking ownership */
3279  Director(PyObject *self) : swig_self(self), swig_disown_flag(false) {
3280  swig_incref();
3281  }
3282 
3283  /* discard our reference at destruction */
3284  virtual ~Director() {
3285  swig_decref();
3286  }
3287 
3288  /* return a pointer to the wrapped python object */
3289  PyObject *swig_get_self() const {
3290  return swig_self;
3291  }
3292 
3293  /* acquire ownership of the wrapped python object (the sense of "disown" is from python) */
3294  void swig_disown() const {
3295  if (!swig_disown_flag) {
3296  swig_disown_flag=true;
3297  swig_incref();
3298  }
3299  }
3300 
3301  /* increase the reference count of the wrapped python object */
3302  void swig_incref() const {
3303  if (swig_disown_flag) {
3304  Py_INCREF(swig_self);
3305  }
3306  }
3307 
3308  /* methods to implement pseudo protected director members */
3309  virtual bool swig_get_inner(const char * /* swig_protected_method_name */) const {
3310  return true;
3311  }
3312 
3313  virtual void swig_set_inner(const char * /* swig_protected_method_name */, bool /* swig_val */) const {
3314  }
3315 
3316  /* ownership management */
3317  private:
3318  typedef std::map<void *, GCItem_var> swig_ownership_map;
3319  mutable swig_ownership_map swig_owner;
3320 #ifdef __THREAD__
3321  static PyThread_type_lock swig_mutex_own;
3322 #endif
3323 
3324  public:
3325  template <typename Type>
3326  void swig_acquire_ownership_array(Type *vptr) const {
3327  if (vptr) {
3328  SWIG_GUARD(swig_mutex_own);
3329  swig_owner[vptr] = new GCArray_T<Type>(vptr);
3330  }
3331  }
3332 
3333  template <typename Type>
3334  void swig_acquire_ownership(Type *vptr) const {
3335  if (vptr) {
3336  SWIG_GUARD(swig_mutex_own);
3337  swig_owner[vptr] = new GCItem_T<Type>(vptr);
3338  }
3339  }
3340 
3341  void swig_acquire_ownership_obj(void *vptr, int own) const {
3342  if (vptr && own) {
3343  SWIG_GUARD(swig_mutex_own);
3344  swig_owner[vptr] = new GCItem_Object(own);
3345  }
3346  }
3347 
3348  int swig_release_ownership(void *vptr) const {
3349  int own = 0;
3350  if (vptr) {
3351  SWIG_GUARD(swig_mutex_own);
3352  swig_ownership_map::iterator iter = swig_owner.find(vptr);
3353  if (iter != swig_owner.end()) {
3354  own = iter->second->get_own();
3355  swig_owner.erase(iter);
3356  }
3357  }
3358  return own;
3359  }
3360 
3361  template <typename Type>
3362  static PyObject *swig_pyobj_disown(PyObject *pyobj, PyObject *SWIGUNUSEDPARM(args)) {
3363  SwigPyObject *sobj = (SwigPyObject *)pyobj;
3364  sobj->own = 0;
3365  Director *d = SWIG_DIRECTOR_CAST(reinterpret_cast<Type *>(sobj->ptr));
3366  if (d)
3367  d->swig_disown();
3368  return PyWeakref_NewProxy(pyobj, NULL);
3369  }
3370  };
3371 
3372 #ifdef __THREAD__
3373  PyThread_type_lock Director::swig_mutex_own = PyThread_allocate_lock();
3374 #endif
3375 }
3376 
3377 #endif
3378 
3379 /* -------- TYPES TABLE (BEGIN) -------- */
3380 
3381 #define SWIGTYPE_p_ActivatedItem swig_types[0]
3382 #define SWIGTYPE_p_Adapter swig_types[1]
3383 #define SWIGTYPE_p_AnimatBase swig_types[2]
3384 #define SWIGTYPE_p_AnimatPropertyType swig_types[3]
3385 #define SWIGTYPE_p_AnimatSim__ActivatedItem swig_types[4]
3386 #define SWIGTYPE_p_AnimatSim__ActivatedItemMgr swig_types[5]
3387 #define SWIGTYPE_p_AnimatSim__Adapters__Adapter swig_types[6]
3388 #define SWIGTYPE_p_AnimatSim__Adapters__ContactAdapter swig_types[7]
3389 #define SWIGTYPE_p_AnimatSim__Adapters__PropertyControlAdapter swig_types[8]
3390 #define SWIGTYPE_p_AnimatSim__AnimatBase swig_types[9]
3391 #define SWIGTYPE_p_AnimatSim__Behavior__NervousSystem swig_types[10]
3392 #define SWIGTYPE_p_AnimatSim__Behavior__NeuralModule swig_types[11]
3393 #define SWIGTYPE_p_AnimatSim__Behavior__PhysicsNeuralModule swig_types[12]
3394 #define SWIGTYPE_p_AnimatSim__BoundingBox swig_types[13]
3395 #define SWIGTYPE_p_AnimatSim__Charting__ArrayChart swig_types[14]
3396 #define SWIGTYPE_p_AnimatSim__Charting__DataChart swig_types[15]
3397 #define SWIGTYPE_p_AnimatSim__Charting__DataChartMgr swig_types[16]
3398 #define SWIGTYPE_p_AnimatSim__Charting__DataColumn swig_types[17]
3399 #define SWIGTYPE_p_AnimatSim__Charting__FileChart swig_types[18]
3400 #define SWIGTYPE_p_AnimatSim__Charting__MemoryChart swig_types[19]
3401 #define SWIGTYPE_p_AnimatSim__DelayLine swig_types[20]
3402 #define SWIGTYPE_p_AnimatSim__Environment__Bodies__Attachment swig_types[21]
3403 #define SWIGTYPE_p_AnimatSim__Environment__Bodies__Box swig_types[22]
3404 #define SWIGTYPE_p_AnimatSim__Environment__Bodies__Cone swig_types[23]
3405 #define SWIGTYPE_p_AnimatSim__Environment__Bodies__Cylinder swig_types[24]
3406 #define SWIGTYPE_p_AnimatSim__Environment__Bodies__Ellipsoid swig_types[25]
3407 #define SWIGTYPE_p_AnimatSim__Environment__Bodies__FluidPlane swig_types[26]
3408 #define SWIGTYPE_p_AnimatSim__Environment__Bodies__LineBase swig_types[27]
3409 #define SWIGTYPE_p_AnimatSim__Environment__Bodies__LinearHillMuscle swig_types[28]
3410 #define SWIGTYPE_p_AnimatSim__Environment__Bodies__LinearHillStretchReceptor swig_types[29]
3411 #define SWIGTYPE_p_AnimatSim__Environment__Bodies__Mesh swig_types[30]
3412 #define SWIGTYPE_p_AnimatSim__Environment__Bodies__Mouth swig_types[31]
3413 #define SWIGTYPE_p_AnimatSim__Environment__Bodies__MuscleBase swig_types[32]
3414 #define SWIGTYPE_p_AnimatSim__Environment__Bodies__OdorSensor swig_types[33]
3415 #define SWIGTYPE_p_AnimatSim__Environment__Bodies__Plane swig_types[34]
3416 #define SWIGTYPE_p_AnimatSim__Environment__Bodies__Sensor swig_types[35]
3417 #define SWIGTYPE_p_AnimatSim__Environment__Bodies__Sphere swig_types[36]
3418 #define SWIGTYPE_p_AnimatSim__Environment__Bodies__Spring swig_types[37]
3419 #define SWIGTYPE_p_AnimatSim__Environment__Bodies__Stomach swig_types[38]
3420 #define SWIGTYPE_p_AnimatSim__Environment__Bodies__Terrain swig_types[39]
3421 #define SWIGTYPE_p_AnimatSim__Environment__Bodies__Torus swig_types[40]
3422 #define SWIGTYPE_p_AnimatSim__Environment__BodyPart swig_types[41]
3423 #define SWIGTYPE_p_AnimatSim__Environment__CollisionPair swig_types[42]
3424 #define SWIGTYPE_p_AnimatSim__Environment__ConstraintFriction swig_types[43]
3425 #define SWIGTYPE_p_AnimatSim__Environment__ConstraintLimit swig_types[44]
3426 #define SWIGTYPE_p_AnimatSim__Environment__ConstraintRelaxation swig_types[45]
3427 #define SWIGTYPE_p_AnimatSim__Environment__ContactSensor swig_types[46]
3428 #define SWIGTYPE_p_AnimatSim__Environment__IMotorizedJoint swig_types[47]
3429 #define SWIGTYPE_p_AnimatSim__Environment__IPhysicsBody swig_types[48]
3430 #define SWIGTYPE_p_AnimatSim__Environment__IPhysicsMovableItem swig_types[49]
3431 #define SWIGTYPE_p_AnimatSim__Environment__Joint swig_types[50]
3432 #define SWIGTYPE_p_AnimatSim__Environment__Joints__BallSocket swig_types[51]
3433 #define SWIGTYPE_p_AnimatSim__Environment__Joints__Hinge swig_types[52]
3434 #define SWIGTYPE_p_AnimatSim__Environment__Joints__LinearJoint swig_types[53]
3435 #define SWIGTYPE_p_AnimatSim__Environment__Joints__Prismatic swig_types[54]
3436 #define SWIGTYPE_p_AnimatSim__Environment__Joints__RPRO swig_types[55]
3437 #define SWIGTYPE_p_AnimatSim__Environment__Light swig_types[56]
3438 #define SWIGTYPE_p_AnimatSim__Environment__LightManager swig_types[57]
3439 #define SWIGTYPE_p_AnimatSim__Environment__MaterialType swig_types[58]
3440 #define SWIGTYPE_p_AnimatSim__Environment__Materials swig_types[59]
3441 #define SWIGTYPE_p_AnimatSim__Environment__MotorizedJoint swig_types[60]
3442 #define SWIGTYPE_p_AnimatSim__Environment__MovableItem swig_types[61]
3443 #define SWIGTYPE_p_AnimatSim__Environment__Odor swig_types[62]
3444 #define SWIGTYPE_p_AnimatSim__Environment__OdorType swig_types[63]
3445 #define SWIGTYPE_p_AnimatSim__Environment__Organism swig_types[64]
3446 #define SWIGTYPE_p_AnimatSim__Environment__ReceptiveFieldPair swig_types[65]
3447 #define SWIGTYPE_p_AnimatSim__Environment__RigidBody swig_types[66]
3448 #define SWIGTYPE_p_AnimatSim__Environment__Structure swig_types[67]
3449 #define SWIGTYPE_p_AnimatSim__ExternalStimuli__CurrentStimulus swig_types[68]
3450 #define SWIGTYPE_p_AnimatSim__ExternalStimuli__EnablerStimulus swig_types[69]
3451 #define SWIGTYPE_p_AnimatSim__ExternalStimuli__ExternalInputStimulus swig_types[70]
3452 #define SWIGTYPE_p_AnimatSim__ExternalStimuli__ExternalStimuliMgr swig_types[71]
3453 #define SWIGTYPE_p_AnimatSim__ExternalStimuli__ExternalStimulus swig_types[72]
3454 #define SWIGTYPE_p_AnimatSim__ExternalStimuli__ForceStimulus swig_types[73]
3455 #define SWIGTYPE_p_AnimatSim__ExternalStimuli__InverseMuscleCurrent swig_types[74]
3456 #define SWIGTYPE_p_AnimatSim__ExternalStimuli__MotorStimulus swig_types[75]
3457 #define SWIGTYPE_p_AnimatSim__ExternalStimuli__PropertyControlStimulus swig_types[76]
3458 #define SWIGTYPE_p_AnimatSim__ExternalStimuli__VoltageClamp swig_types[77]
3459 #define SWIGTYPE_p_AnimatSim__Gains__BellGain swig_types[78]
3460 #define SWIGTYPE_p_AnimatSim__Gains__EquationGain swig_types[79]
3461 #define SWIGTYPE_p_AnimatSim__Gains__Gain swig_types[80]
3462 #define SWIGTYPE_p_AnimatSim__Gains__LengthTensionGain swig_types[81]
3463 #define SWIGTYPE_p_AnimatSim__Gains__PolynomialGain swig_types[82]
3464 #define SWIGTYPE_p_AnimatSim__Gains__SigmoidGain swig_types[83]
3465 #define SWIGTYPE_p_AnimatSim__Hud swig_types[84]
3466 #define SWIGTYPE_p_AnimatSim__HudItem swig_types[85]
3467 #define SWIGTYPE_p_AnimatSim__HudText swig_types[86]
3468 #define SWIGTYPE_p_AnimatSim__IMovableItemCallback swig_types[87]
3469 #define SWIGTYPE_p_AnimatSim__ISimGUICallback swig_types[88]
3470 #define SWIGTYPE_p_AnimatSim__Link swig_types[89]
3471 #define SWIGTYPE_p_AnimatSim__Node swig_types[90]
3472 #define SWIGTYPE_p_AnimatSim__Recording__KeyFrame swig_types[91]
3473 #define SWIGTYPE_p_AnimatSim__Recording__SimulationRecorder swig_types[92]
3474 #define SWIGTYPE_p_AnimatSim__Robotics__PassThroughLinkage swig_types[93]
3475 #define SWIGTYPE_p_AnimatSim__Robotics__PulsedLinkage swig_types[94]
3476 #define SWIGTYPE_p_AnimatSim__Robotics__RemoteControl swig_types[95]
3477 #define SWIGTYPE_p_AnimatSim__Robotics__RemoteControlLinkage swig_types[96]
3478 #define SWIGTYPE_p_AnimatSim__Robotics__RobotIOControl swig_types[97]
3479 #define SWIGTYPE_p_AnimatSim__Robotics__RobotInterface swig_types[98]
3480 #define SWIGTYPE_p_AnimatSim__Robotics__RobotPartInterface swig_types[99]
3481 #define SWIGTYPE_p_AnimatSim__ScriptProcessor swig_types[100]
3482 #define SWIGTYPE_p_AnimatSim__SimulationMgr swig_types[101]
3483 #define SWIGTYPE_p_AnimatSim__SimulationThread swig_types[102]
3484 #define SWIGTYPE_p_AnimatSim__SimulationWindow swig_types[103]
3485 #define SWIGTYPE_p_AnimatSim__SimulationWindowMgr swig_types[104]
3486 #define SWIGTYPE_p_AnimatSim__Simulator swig_types[105]
3487 #define SWIGTYPE_p_Attachment swig_types[106]
3488 #define SWIGTYPE_p_BodyPart swig_types[107]
3489 #define SWIGTYPE_p_BoundingBox swig_types[108]
3490 #define SWIGTYPE_p_CStdArrayT_ActivatedItem_p_t swig_types[109]
3491 #define SWIGTYPE_p_CStdArrayT_Adapter_p_t swig_types[110]
3492 #define SWIGTYPE_p_CStdArrayT_AnimatSim__Environment__Bodies__Attachment_p_t swig_types[111]
3493 #define SWIGTYPE_p_CStdArrayT_Attachment_p_t swig_types[112]
3494 #define SWIGTYPE_p_CStdArrayT_BodyPart_p_t swig_types[113]
3495 #define SWIGTYPE_p_CStdArrayT_KeyFrame_p_t swig_types[114]
3496 #define SWIGTYPE_p_CStdArrayT_ModuleThreadProcessor_p_t swig_types[115]
3497 #define SWIGTYPE_p_CStdArrayT_RigidBody_p_t swig_types[116]
3498 #define SWIGTYPE_p_CStdArrayT_RobotPartInterface_p_t swig_types[117]
3499 #define SWIGTYPE_p_CStdArrayT_double_t swig_types[118]
3500 #define SWIGTYPE_p_CStdArrayT_float_t swig_types[119]
3501 #define SWIGTYPE_p_CStdArrayT_int_t swig_types[120]
3502 #define SWIGTYPE_p_CStdArrayT_long_t swig_types[121]
3503 #define SWIGTYPE_p_CStdArrayT_std__string_t swig_types[122]
3504 #define SWIGTYPE_p_CStdCircularArrayT_float_t swig_types[123]
3505 #define SWIGTYPE_p_CStdMapT_std__string_AnimatBase_p_t swig_types[124]
3506 #define SWIGTYPE_p_CStdMapT_std__string_AnimatSim__AnimatBase_p_t swig_types[125]
3507 #define SWIGTYPE_p_CStdMapT_std__string_DataColumn_p_t swig_types[126]
3508 #define SWIGTYPE_p_CStdMapT_std__string_Joint_p_t swig_types[127]
3509 #define SWIGTYPE_p_CStdMapT_std__string_Odor_p_t swig_types[128]
3510 #define SWIGTYPE_p_CStdMapT_std__string_RigidBody_p_t swig_types[129]
3511 #define SWIGTYPE_p_CStdMapT_std__string_StdUtils__IStdClassFactory_p_t swig_types[130]
3512 #define SWIGTYPE_p_CStdMapT_std__string_Structure_p_t swig_types[131]
3513 #define SWIGTYPE_p_CStdPointT_double_t swig_types[132]
3514 #define SWIGTYPE_p_CStdPointT_float_t swig_types[133]
3515 #define SWIGTYPE_p_CStdPointT_int_t swig_types[134]
3516 #define SWIGTYPE_p_CStdPointT_long_t swig_types[135]
3517 #define SWIGTYPE_p_CStdPtrArrayT_Adapter_t swig_types[136]
3518 #define SWIGTYPE_p_CStdPtrArrayT_AnimatSim__Environment__CollisionPair_t swig_types[137]
3519 #define SWIGTYPE_p_CStdPtrArrayT_AnimatSim__Environment__Light_t swig_types[138]
3520 #define SWIGTYPE_p_CStdPtrArrayT_AnimatSim__Environment__RigidBody_t swig_types[139]
3521 #define SWIGTYPE_p_CStdPtrArrayT_AnimatSim__Robotics__RemoteControlLinkage_t swig_types[140]
3522 #define SWIGTYPE_p_CStdPtrArrayT_AnimatSim__SimulationThread_t swig_types[141]
3523 #define SWIGTYPE_p_CStdPtrArrayT_AnimatSim__SimulationWindow_t swig_types[142]
3524 #define SWIGTYPE_p_CStdPtrArrayT_CollisionPair_t swig_types[143]
3525 #define SWIGTYPE_p_CStdPtrArrayT_DataColumn_t swig_types[144]
3526 #define SWIGTYPE_p_CStdPtrArrayT_HudItem_t swig_types[145]
3527 #define SWIGTYPE_p_CStdPtrArrayT_Light_t swig_types[146]
3528 #define SWIGTYPE_p_CStdPtrArrayT_MaterialType_t swig_types[147]
3529 #define SWIGTYPE_p_CStdPtrArrayT_Neuron_t swig_types[148]
3530 #define SWIGTYPE_p_CStdPtrArrayT_ReceptiveFieldPair_t swig_types[149]
3531 #define SWIGTYPE_p_CStdPtrArrayT_ReceptiveField_t swig_types[150]
3532 #define SWIGTYPE_p_CStdPtrArrayT_RigidBody_t swig_types[151]
3533 #define SWIGTYPE_p_CStdPtrArrayT_RobotIOControl_t swig_types[152]
3534 #define SWIGTYPE_p_CStdPtrArrayT_RobotPartInterface_t swig_types[153]
3535 #define SWIGTYPE_p_CStdPtrArrayT_SimulationThread_t swig_types[154]
3536 #define SWIGTYPE_p_CStdPtrArrayT_SimulationWindow_t swig_types[155]
3537 #define SWIGTYPE_p_CStdPtrArrayT_StdUtils__CStdVariable_t swig_types[156]
3538 #define SWIGTYPE_p_CStdPtrArrayT_Synapse_t swig_types[157]
3539 #define SWIGTYPE_p_CStdPtrArrayT_TypeProperty_t swig_types[158]
3540 #define SWIGTYPE_p_CStdPtrMapT_std__string_ActivatedItem_t swig_types[159]
3541 #define SWIGTYPE_p_CStdPtrMapT_std__string_NeuralModule_t swig_types[160]
3542 #define SWIGTYPE_p_CStdPtrMapT_std__string_OdorType_t swig_types[161]
3543 #define SWIGTYPE_p_CStdPtrMapT_std__string_Odor_t swig_types[162]
3544 #define SWIGTYPE_p_CStdPtrMapT_std__string_Organism_t swig_types[163]
3545 #define SWIGTYPE_p_CStdPtrMapT_std__string_Structure_t swig_types[164]
3546 #define SWIGTYPE_p_CStdStackT_double_t swig_types[165]
3547 #define SWIGTYPE_p_CollisionPair swig_types[166]
3548 #define SWIGTYPE_p_ContactSensor swig_types[167]
3549 #define SWIGTYPE_p_DataChart swig_types[168]
3550 #define SWIGTYPE_p_DataChartMgr swig_types[169]
3551 #define SWIGTYPE_p_DataColumn swig_types[170]
3552 #define SWIGTYPE_p_ExternalStimuliMgr swig_types[171]
3553 #define SWIGTYPE_p_FiringRateModule swig_types[172]
3554 #define SWIGTYPE_p_FiringRateSim__FiringRateModule swig_types[173]
3555 #define SWIGTYPE_p_FiringRateSim__Neurons__BistableNeuron swig_types[174]
3556 #define SWIGTYPE_p_FiringRateSim__Neurons__Neuron swig_types[175]
3557 #define SWIGTYPE_p_FiringRateSim__Neurons__PacemakerNeuron swig_types[176]
3558 #define SWIGTYPE_p_FiringRateSim__Neurons__RandomNeuron swig_types[177]
3559 #define SWIGTYPE_p_FiringRateSim__Neurons__TonicNeuron swig_types[178]
3560 #define SWIGTYPE_p_FiringRateSim__Synapses__GatedSynapse swig_types[179]
3561 #define SWIGTYPE_p_FiringRateSim__Synapses__ModulateNeuronPropSynapse swig_types[180]
3562 #define SWIGTYPE_p_FiringRateSim__Synapses__ModulatedSynapse swig_types[181]
3563 #define SWIGTYPE_p_FiringRateSim__Synapses__Synapse swig_types[182]
3564 #define SWIGTYPE_p_Gain swig_types[183]
3565 #define SWIGTYPE_p_HWND swig_types[184]
3566 #define SWIGTYPE_p_HudItem swig_types[185]
3567 #define SWIGTYPE_p_Joint swig_types[186]
3568 #define SWIGTYPE_p_KeyFrame swig_types[187]
3569 #define SWIGTYPE_p_LengthTensionGain swig_types[188]
3570 #define SWIGTYPE_p_Light swig_types[189]
3571 #define SWIGTYPE_p_LightManager swig_types[190]
3572 #define SWIGTYPE_p_LinearHillMuscle swig_types[191]
3573 #define SWIGTYPE_p_MaterialType swig_types[192]
3574 #define SWIGTYPE_p_Materials swig_types[193]
3575 #define SWIGTYPE_p_ModuleThreadProcessor swig_types[194]
3576 #define SWIGTYPE_p_NeuralModule swig_types[195]
3577 #define SWIGTYPE_p_Neuron swig_types[196]
3578 #define SWIGTYPE_p_Node swig_types[197]
3579 #define SWIGTYPE_p_Odor swig_types[198]
3580 #define SWIGTYPE_p_OdorType swig_types[199]
3581 #define SWIGTYPE_p_Organism swig_types[200]
3582 #define SWIGTYPE_p_ReceptiveField swig_types[201]
3583 #define SWIGTYPE_p_ReceptiveFieldPair swig_types[202]
3584 #define SWIGTYPE_p_RigidBody swig_types[203]
3585 #define SWIGTYPE_p_RobotIOControl swig_types[204]
3586 #define SWIGTYPE_p_RobotInterface swig_types[205]
3587 #define SWIGTYPE_p_RobotPartInterface swig_types[206]
3588 #define SWIGTYPE_p_ScriptProcessor swig_types[207]
3589 #define SWIGTYPE_p_SigmoidGain swig_types[208]
3590 #define SWIGTYPE_p_SimulationRecorder swig_types[209]
3591 #define SWIGTYPE_p_SimulationThread swig_types[210]
3592 #define SWIGTYPE_p_SimulationWindow swig_types[211]
3593 #define SWIGTYPE_p_Simulator swig_types[212]
3594 #define SWIGTYPE_p_StdUtils__CMarkupSTL swig_types[213]
3595 #define SWIGTYPE_p_StdUtils__CStdColor swig_types[214]
3596 #define SWIGTYPE_p_StdUtils__CStdCriticalSection swig_types[215]
3597 #define SWIGTYPE_p_StdUtils__CStdFixed swig_types[216]
3598 #define SWIGTYPE_p_StdUtils__CStdFont swig_types[217]
3599 #define SWIGTYPE_p_StdUtils__CStdLookupTable swig_types[218]
3600 #define SWIGTYPE_p_StdUtils__CStdPID swig_types[219]
3601 #define SWIGTYPE_p_StdUtils__CStdPostFixEval swig_types[220]
3602 #define SWIGTYPE_p_StdUtils__CStdSerialize swig_types[221]
3603 #define SWIGTYPE_p_StdUtils__CStdVariable swig_types[222]
3604 #define SWIGTYPE_p_StdUtils__CStdVariant swig_types[223]
3605 #define SWIGTYPE_p_StdUtils__CStdXml swig_types[224]
3606 #define SWIGTYPE_p_StdUtils__IStdClassFactory swig_types[225]
3607 #define SWIGTYPE_p_Structure swig_types[226]
3608 #define SWIGTYPE_p_Synapse swig_types[227]
3609 #define SWIGTYPE_p_TypeProperty swig_types[228]
3610 #define SWIGTYPE_p_a_3__float swig_types[229]
3611 #define SWIGTYPE_p_a_4__a_4__float swig_types[230]
3612 #define SWIGTYPE_p_a_4__float swig_types[231]
3613 #define SWIGTYPE_p_allocator_type swig_types[232]
3614 #define SWIGTYPE_p_bool swig_types[233]
3615 #define SWIGTYPE_p_byte swig_types[234]
3616 #define SWIGTYPE_p_char swig_types[235]
3617 #define SWIGTYPE_p_const_reference swig_types[236]
3618 #define SWIGTYPE_p_difference_type swig_types[237]
3619 #define SWIGTYPE_p_double swig_types[238]
3620 #define SWIGTYPE_p_float swig_types[239]
3621 #define SWIGTYPE_p_int swig_types[240]
3622 #define SWIGTYPE_p_key_type swig_types[241]
3623 #define SWIGTYPE_p_long swig_types[242]
3624 #define SWIGTYPE_p_mapped_type swig_types[243]
3625 #define SWIGTYPE_p_p_PyObject swig_types[244]
3626 #define SWIGTYPE_p_p_char swig_types[245]
3627 #define SWIGTYPE_p_reference swig_types[246]
3628 #define SWIGTYPE_p_short swig_types[247]
3629 #define SWIGTYPE_p_size_type swig_types[248]
3630 #define SWIGTYPE_p_std__allocatorT_ActivatedItem_p_t swig_types[249]
3631 #define SWIGTYPE_p_std__allocatorT_Adapter_p_t swig_types[250]
3632 #define SWIGTYPE_p_std__allocatorT_Attachment_p_t swig_types[251]
3633 #define SWIGTYPE_p_std__allocatorT_BodyPart_p_t swig_types[252]
3634 #define SWIGTYPE_p_std__allocatorT_CollisionPair_p_t swig_types[253]
3635 #define SWIGTYPE_p_std__allocatorT_DataColumn_p_t swig_types[254]
3636 #define SWIGTYPE_p_std__allocatorT_HudItem_p_t swig_types[255]
3637 #define SWIGTYPE_p_std__allocatorT_KeyFrame_p_t swig_types[256]
3638 #define SWIGTYPE_p_std__allocatorT_Light_p_t swig_types[257]
3639 #define SWIGTYPE_p_std__allocatorT_MaterialType_p_t swig_types[258]
3640 #define SWIGTYPE_p_std__allocatorT_ModuleThreadProcessor_p_t swig_types[259]
3641 #define SWIGTYPE_p_std__allocatorT_Neuron_p_t swig_types[260]
3642 #define SWIGTYPE_p_std__allocatorT_ReceptiveFieldPair_p_t swig_types[261]
3643 #define SWIGTYPE_p_std__allocatorT_ReceptiveField_p_t swig_types[262]
3644 #define SWIGTYPE_p_std__allocatorT_RigidBody_p_t swig_types[263]
3645 #define SWIGTYPE_p_std__allocatorT_RobotIOControl_p_t swig_types[264]
3646 #define SWIGTYPE_p_std__allocatorT_RobotInterface_p_t swig_types[265]
3647 #define SWIGTYPE_p_std__allocatorT_RobotPartInterface_p_t swig_types[266]
3648 #define SWIGTYPE_p_std__allocatorT_SimulationThread_p_t swig_types[267]
3649 #define SWIGTYPE_p_std__allocatorT_SimulationWindow_p_t swig_types[268]
3650 #define SWIGTYPE_p_std__allocatorT_StdUtils__CStdVariable_p_t swig_types[269]
3651 #define SWIGTYPE_p_std__allocatorT_Synapse_p_t swig_types[270]
3652 #define SWIGTYPE_p_std__allocatorT_TypeProperty_p_t swig_types[271]
3653 #define SWIGTYPE_p_std__allocatorT_double_t swig_types[272]
3654 #define SWIGTYPE_p_std__allocatorT_float_t swig_types[273]
3655 #define SWIGTYPE_p_std__allocatorT_int_t swig_types[274]
3656 #define SWIGTYPE_p_std__allocatorT_long_t swig_types[275]
3657 #define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_ActivatedItem_p_t_t swig_types[276]
3658 #define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_AnimatBase_p_t_t swig_types[277]
3659 #define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_DataColumn_p_t_t swig_types[278]
3660 #define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_Joint_p_t_t swig_types[279]
3661 #define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_NeuralModule_p_t_t swig_types[280]
3662 #define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_OdorType_p_t_t swig_types[281]
3663 #define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_Odor_p_t_t swig_types[282]
3664 #define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_Organism_p_t_t swig_types[283]
3665 #define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_RigidBody_p_t_t swig_types[284]
3666 #define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_StdUtils__IStdClassFactory_p_t_t swig_types[285]
3667 #define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_Structure_p_t_t swig_types[286]
3668 #define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[287]
3669 #define SWIGTYPE_p_std__invalid_argument swig_types[288]
3670 #define SWIGTYPE_p_std__lessT_std__string_t swig_types[289]
3671 #define SWIGTYPE_p_std__mapT_std__string_ActivatedItem_p_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_ActivatedItem_p_t_t_t swig_types[290]
3672 #define SWIGTYPE_p_std__mapT_std__string_AnimatBase_p_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_AnimatBase_p_t_t_t swig_types[291]
3673 #define SWIGTYPE_p_std__mapT_std__string_DataColumn_p_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_DataColumn_p_t_t_t swig_types[292]
3674 #define SWIGTYPE_p_std__mapT_std__string_Joint_p_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_Joint_p_t_t_t swig_types[293]
3675 #define SWIGTYPE_p_std__mapT_std__string_NeuralModule_p_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_NeuralModule_p_t_t_t swig_types[294]
3676 #define SWIGTYPE_p_std__mapT_std__string_OdorType_p_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_OdorType_p_t_t_t swig_types[295]
3677 #define SWIGTYPE_p_std__mapT_std__string_Odor_p_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_Odor_p_t_t_t swig_types[296]
3678 #define SWIGTYPE_p_std__mapT_std__string_Organism_p_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_Organism_p_t_t_t swig_types[297]
3679 #define SWIGTYPE_p_std__mapT_std__string_RigidBody_p_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_RigidBody_p_t_t_t swig_types[298]
3680 #define SWIGTYPE_p_std__mapT_std__string_StdUtils__IStdClassFactory_p_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_StdUtils__IStdClassFactory_p_t_t_t swig_types[299]
3681 #define SWIGTYPE_p_std__mapT_std__string_Structure_p_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_Structure_p_t_t_t swig_types[300]
3682 #define SWIGTYPE_p_std__ofstream swig_types[301]
3683 #define SWIGTYPE_p_std__ostream swig_types[302]
3684 #define SWIGTYPE_p_std__string swig_types[303]
3685 #define SWIGTYPE_p_std__unordered_setT_AnimatSim__Environment__RigidBody_p_t swig_types[304]
3686 #define SWIGTYPE_p_std__vectorT_ActivatedItem_p_std__allocatorT_ActivatedItem_p_t_t swig_types[305]
3687 #define SWIGTYPE_p_std__vectorT_Adapter_p_std__allocatorT_Adapter_p_t_t swig_types[306]
3688 #define SWIGTYPE_p_std__vectorT_Attachment_p_std__allocatorT_Attachment_p_t_t swig_types[307]
3689 #define SWIGTYPE_p_std__vectorT_BodyPart_p_std__allocatorT_BodyPart_p_t_t swig_types[308]
3690 #define SWIGTYPE_p_std__vectorT_CollisionPair_p_std__allocatorT_CollisionPair_p_t_t swig_types[309]
3691 #define SWIGTYPE_p_std__vectorT_DataColumn_p_std__allocatorT_DataColumn_p_t_t swig_types[310]
3692 #define SWIGTYPE_p_std__vectorT_HudItem_p_std__allocatorT_HudItem_p_t_t swig_types[311]
3693 #define SWIGTYPE_p_std__vectorT_KeyFrame_p_std__allocatorT_KeyFrame_p_t_t swig_types[312]
3694 #define SWIGTYPE_p_std__vectorT_Light_p_std__allocatorT_Light_p_t_t swig_types[313]
3695 #define SWIGTYPE_p_std__vectorT_MaterialType_p_std__allocatorT_MaterialType_p_t_t swig_types[314]
3696 #define SWIGTYPE_p_std__vectorT_ModuleThreadProcessor_p_std__allocatorT_ModuleThreadProcessor_p_t_t swig_types[315]
3697 #define SWIGTYPE_p_std__vectorT_Neuron_p_std__allocatorT_Neuron_p_t_t swig_types[316]
3698 #define SWIGTYPE_p_std__vectorT_ReceptiveFieldPair_p_std__allocatorT_ReceptiveFieldPair_p_t_t swig_types[317]
3699 #define SWIGTYPE_p_std__vectorT_ReceptiveField_p_std__allocatorT_ReceptiveField_p_t_t swig_types[318]
3700 #define SWIGTYPE_p_std__vectorT_RigidBody_p_std__allocatorT_RigidBody_p_t_t swig_types[319]
3701 #define SWIGTYPE_p_std__vectorT_RobotIOControl_p_std__allocatorT_RobotIOControl_p_t_t swig_types[320]
3702 #define SWIGTYPE_p_std__vectorT_RobotInterface_p_std__allocatorT_RobotInterface_p_t_t swig_types[321]
3703 #define SWIGTYPE_p_std__vectorT_RobotPartInterface_p_std__allocatorT_RobotPartInterface_p_t_t swig_types[322]
3704 #define SWIGTYPE_p_std__vectorT_SimulationThread_p_std__allocatorT_SimulationThread_p_t_t swig_types[323]
3705 #define SWIGTYPE_p_std__vectorT_SimulationWindow_p_std__allocatorT_SimulationWindow_p_t_t swig_types[324]
3706 #define SWIGTYPE_p_std__vectorT_StdUtils__CStdVariable_p_std__allocatorT_StdUtils__CStdVariable_p_t_t swig_types[325]
3707 #define SWIGTYPE_p_std__vectorT_Synapse_p_std__allocatorT_Synapse_p_t_t swig_types[326]
3708 #define SWIGTYPE_p_std__vectorT_TypeProperty_p_std__allocatorT_TypeProperty_p_t_t swig_types[327]
3709 #define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[328]
3710 #define SWIGTYPE_p_std__vectorT_float_std__allocatorT_float_t_t swig_types[329]
3711 #define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[330]
3712 #define SWIGTYPE_p_std__vectorT_long_std__allocatorT_long_t_t swig_types[331]
3713 #define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[332]
3714 #define SWIGTYPE_p_swig__SwigPyIterator swig_types[333]
3715 #define SWIGTYPE_p_unsigned_char swig_types[334]
3716 #define SWIGTYPE_p_unsigned_int swig_types[335]
3717 #define SWIGTYPE_p_unsigned_long swig_types[336]
3718 #define SWIGTYPE_p_unsigned_short swig_types[337]
3719 #define SWIGTYPE_p_value_type swig_types[338]
3720 static swig_type_info *swig_types[340];
3721 static swig_module_info swig_module = {swig_types, 339, 0, 0, 0, 0};
3722 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
3723 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
3724 
3725 /* -------- TYPES TABLE (END) -------- */
3726 
3727 #if (PY_VERSION_HEX <= 0x02000000)
3728 # if !defined(SWIG_PYTHON_CLASSIC)
3729 # error "This python version requires swig to be run with the '-classic' option"
3730 # endif
3731 #endif
3732 
3733 /*-----------------------------------------------
3734  @(target):= _AnimatSimPy.so
3735  ------------------------------------------------*/
3736 #if PY_VERSION_HEX >= 0x03000000
3737 # define SWIG_init PyInit__AnimatSimPy
3738 
3739 #else
3740 # define SWIG_init init_AnimatSimPy
3741 
3742 #endif
3743 #define SWIG_name "_AnimatSimPy"
3744 
3745 #define SWIGVERSION 0x030005
3746 #define SWIG_VERSION SWIGVERSION
3747 
3748 
3749 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
3750 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
3751 
3752 
3753 #include <stdexcept>
3754 
3755 
3756 namespace swig {
3758  protected:
3759  PyObject *_obj;
3760 
3761  public:
3762  SwigPtr_PyObject() :_obj(0)
3763  {
3764  }
3765 
3766  SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
3767  {
3768  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3769  Py_XINCREF(_obj);
3770  SWIG_PYTHON_THREAD_END_BLOCK;
3771  }
3772 
3773  SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
3774  {
3775  if (initial_ref) {
3776  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3777  Py_XINCREF(_obj);
3778  SWIG_PYTHON_THREAD_END_BLOCK;
3779  }
3780  }
3781 
3782  SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
3783  {
3784  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3785  Py_XINCREF(item._obj);
3786  Py_XDECREF(_obj);
3787  _obj = item._obj;
3788  SWIG_PYTHON_THREAD_END_BLOCK;
3789  return *this;
3790  }
3791 
3792  ~SwigPtr_PyObject()
3793  {
3794  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3795  Py_XDECREF(_obj);
3796  SWIG_PYTHON_THREAD_END_BLOCK;
3797  }
3798 
3799  operator PyObject *() const
3800  {
3801  return _obj;
3802  }
3803 
3804  PyObject *operator->() const
3805  {
3806  return _obj;
3807  }
3808  };
3809 }
3810 
3811 
3812 namespace swig {
3814  SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
3815 
3816  SwigVar_PyObject & operator = (PyObject* obj)
3817  {
3818  Py_XDECREF(_obj);
3819  _obj = obj;
3820  return *this;
3821  }
3822  };
3823 }
3824 
3825 
3826 #include "StdAfx.h"
3827 using namespace StdUtils;
3828 
3829 
3830 #include <iostream>
3831 
3832 #if PY_VERSION_HEX >= 0x03020000
3833 # define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj))
3834 #else
3835 # define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj))
3836 #endif
3837 
3838 
3839 #include <stdexcept>
3840 
3841 
3842 #if defined(__GNUC__)
3843 # if __GNUC__ == 2 && __GNUC_MINOR <= 96
3844 # define SWIG_STD_NOMODERN_STL
3845 # endif
3846 #endif
3847 
3848 
3849 #include <string>
3850 
3851 
3852 #include <stddef.h>
3853 
3854 
3855 namespace swig {
3857  };
3858 
3860  private:
3861  SwigPtr_PyObject _seq;
3862 
3863  protected:
3864  SwigPyIterator(PyObject *seq) : _seq(seq)
3865  {
3866  }
3867 
3868  public:
3869  virtual ~SwigPyIterator() {}
3870 
3871  // Access iterator method, required by Python
3872  virtual PyObject *value() const = 0;
3873 
3874  // Forward iterator method, required by Python
3875  virtual SwigPyIterator *incr(size_t n = 1) = 0;
3876 
3877  // Backward iterator method, very common in C++, but not required in Python
3878  virtual SwigPyIterator *decr(size_t /*n*/ = 1)
3879  {
3880  throw stop_iteration();
3881  }
3882 
3883  // Random access iterator methods, but not required in Python
3884  virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
3885  {
3886  throw std::invalid_argument("operation not supported");
3887  }
3888 
3889  virtual bool equal (const SwigPyIterator &/*x*/) const
3890  {
3891  throw std::invalid_argument("operation not supported");
3892  }
3893 
3894  // C++ common/needed methods
3895  virtual SwigPyIterator *copy() const = 0;
3896 
3897  PyObject *next()
3898  {
3899  SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads
3900  PyObject *obj = value();
3901  incr();
3902  SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
3903  return obj;
3904  }
3905 
3906  /* Make an alias for Python 3.x */
3907  PyObject *__next__()
3908  {
3909  return next();
3910  }
3911 
3912  PyObject *previous()
3913  {
3914  SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads
3915  decr();
3916  PyObject *obj = value();
3917  SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
3918  return obj;
3919  }
3920 
3921  SwigPyIterator *advance(ptrdiff_t n)
3922  {
3923  return (n > 0) ? incr(n) : decr(-n);
3924  }
3925 
3926  bool operator == (const SwigPyIterator& x) const
3927  {
3928  return equal(x);
3929  }
3930 
3931  bool operator != (const SwigPyIterator& x) const
3932  {
3933  return ! operator==(x);
3934  }
3935 
3936  SwigPyIterator& operator += (ptrdiff_t n)
3937  {
3938  return *advance(n);
3939  }
3940 
3941  SwigPyIterator& operator -= (ptrdiff_t n)
3942  {
3943  return *advance(-n);
3944  }
3945 
3946  SwigPyIterator* operator + (ptrdiff_t n) const
3947  {
3948  return copy()->advance(n);
3949  }
3950 
3951  SwigPyIterator* operator - (ptrdiff_t n) const
3952  {
3953  return copy()->advance(-n);
3954  }
3955 
3956  ptrdiff_t operator - (const SwigPyIterator& x) const
3957  {
3958  return x.distance(*this);
3959  }
3960 
3961  static swig_type_info* descriptor() {
3962  static int init = 0;
3963  static swig_type_info* desc = 0;
3964  if (!init) {
3965  desc = SWIG_TypeQuery("swig::SwigPyIterator *");
3966  init = 1;
3967  }
3968  return desc;
3969  }
3970  };
3971 
3972 #if defined(SWIGPYTHON_BUILTIN)
3973  inline PyObject* make_output_iterator_builtin (PyObject *pyself)
3974  {
3975  Py_INCREF(pyself);
3976  return pyself;
3977  }
3978 #endif
3979 }
3980 
3981 
3982 SWIGINTERN int
3983 SWIG_AsVal_double (PyObject *obj, double *val)
3984 {
3985  int res = SWIG_TypeError;
3986  if (PyFloat_Check(obj)) {
3987  if (val) *val = PyFloat_AsDouble(obj);
3988  return SWIG_OK;
3989  } else if (PyInt_Check(obj)) {
3990  if (val) *val = PyInt_AsLong(obj);
3991  return SWIG_OK;
3992  } else if (PyLong_Check(obj)) {
3993  double v = PyLong_AsDouble(obj);
3994  if (!PyErr_Occurred()) {
3995  if (val) *val = v;
3996  return SWIG_OK;
3997  } else {
3998  PyErr_Clear();
3999  }
4000  }
4001 #ifdef SWIG_PYTHON_CAST_MODE
4002  {
4003  int dispatch = 0;
4004  double d = PyFloat_AsDouble(obj);
4005  if (!PyErr_Occurred()) {
4006  if (val) *val = d;
4007  return SWIG_AddCast(SWIG_OK);
4008  } else {
4009  PyErr_Clear();
4010  }
4011  if (!dispatch) {
4012  long v = PyLong_AsLong(obj);
4013  if (!PyErr_Occurred()) {
4014  if (val) *val = v;
4015  return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
4016  } else {
4017  PyErr_Clear();
4018  }
4019  }
4020  }
4021 #endif
4022  return res;
4023 }
4024 
4025 
4026 #include <float.h>
4027 
4028 
4029 #include <math.h>
4030 
4031 
4032 SWIGINTERNINLINE int
4033 SWIG_CanCastAsInteger(double *d, double min, double max) {
4034  double x = *d;
4035  if ((min <= x && x <= max)) {
4036  double fx = floor(x);
4037  double cx = ceil(x);
4038  double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
4039  if ((errno == EDOM) || (errno == ERANGE)) {
4040  errno = 0;
4041  } else {
4042  double summ, reps, diff;
4043  if (rd < x) {
4044  diff = x - rd;
4045  } else if (rd > x) {
4046  diff = rd - x;
4047  } else {
4048  return 1;
4049  }
4050  summ = rd + x;
4051  reps = diff/summ;
4052  if (reps < 8*DBL_EPSILON) {
4053  *d = rd;
4054  return 1;
4055  }
4056  }
4057  }
4058  return 0;
4059 }
4060 
4061 
4062 SWIGINTERN int
4063 SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
4064 {
4065 #if PY_VERSION_HEX < 0x03000000
4066  if (PyInt_Check(obj)) {
4067  long v = PyInt_AsLong(obj);
4068  if (v >= 0) {
4069  if (val) *val = v;
4070  return SWIG_OK;
4071  } else {
4072  return SWIG_OverflowError;
4073  }
4074  } else
4075 #endif
4076  if (PyLong_Check(obj)) {
4077  unsigned long v = PyLong_AsUnsignedLong(obj);
4078  if (!PyErr_Occurred()) {
4079  if (val) *val = v;
4080  return SWIG_OK;
4081  } else {
4082  PyErr_Clear();
4083 #if PY_VERSION_HEX >= 0x03000000
4084  {
4085  long v = PyLong_AsLong(obj);
4086  if (!PyErr_Occurred()) {
4087  if (v < 0) {
4088  return SWIG_OverflowError;
4089  }
4090  } else {
4091  PyErr_Clear();
4092  }
4093  }
4094 #endif
4095  }
4096  }
4097 #ifdef SWIG_PYTHON_CAST_MODE
4098  {
4099  int dispatch = 0;
4100  unsigned long v = PyLong_AsUnsignedLong(obj);
4101  if (!PyErr_Occurred()) {
4102  if (val) *val = v;
4103  return SWIG_AddCast(SWIG_OK);
4104  } else {
4105  PyErr_Clear();
4106  }
4107  if (!dispatch) {
4108  double d;
4109  int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
4110  if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
4111  if (val) *val = (unsigned long)(d);
4112  return res;
4113  }
4114  }
4115  }
4116 #endif
4117  return SWIG_TypeError;
4118 }
4119 
4120 
4121 SWIGINTERNINLINE int
4122 SWIG_AsVal_size_t (PyObject * obj, size_t *val)
4123 {
4124  unsigned long v;
4125  int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
4126  if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
4127  return res;
4128 }
4129 
4130 
4131  #define SWIG_From_long PyLong_FromLong
4132 
4133 
4134 SWIGINTERNINLINE PyObject *
4135 SWIG_From_ptrdiff_t (ptrdiff_t value)
4136 {
4137  return SWIG_From_long (static_cast< long >(value));
4138 }
4139 
4140 
4141 SWIGINTERNINLINE PyObject*
4142  SWIG_From_bool (bool value)
4143 {
4144  return PyBool_FromLong(value ? 1 : 0);
4145 }
4146 
4147 
4148 SWIGINTERN int
4149 SWIG_AsVal_long (PyObject *obj, long* val)
4150 {
4151  if (PyInt_Check(obj)) {
4152  if (val) *val = PyInt_AsLong(obj);
4153  return SWIG_OK;
4154  } else if (PyLong_Check(obj)) {
4155  long v = PyLong_AsLong(obj);
4156  if (!PyErr_Occurred()) {
4157  if (val) *val = v;
4158  return SWIG_OK;
4159  } else {
4160  PyErr_Clear();
4161  }
4162  }
4163 #ifdef SWIG_PYTHON_CAST_MODE
4164  {
4165  int dispatch = 0;
4166  long v = PyInt_AsLong(obj);
4167  if (!PyErr_Occurred()) {
4168  if (val) *val = v;
4169  return SWIG_AddCast(SWIG_OK);
4170  } else {
4171  PyErr_Clear();
4172  }
4173  if (!dispatch) {
4174  double d;
4175  int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
4176  if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
4177  if (val) *val = (long)(d);
4178  return res;
4179  }
4180  }
4181  }
4182 #endif
4183  return SWIG_TypeError;
4184 }
4185 
4186 
4187 SWIGINTERNINLINE int
4188 SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val)
4189 {
4190  long v;
4191  int res = SWIG_AsVal_long (obj, val ? &v : 0);
4192  if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v);
4193  return res;
4194 }
4195 
4196 
4197 #include <algorithm>
4198 
4199 
4200 #include <vector>
4201 
4202 
4203 SWIGINTERNINLINE PyObject*
4204  SWIG_From_int (int value)
4205 {
4206  return PyInt_FromLong((long) value);
4207 }
4208 
4209 
4210 #include <utility>
4211 
4212 
4213 #include <map>
4214 
4215 
4216 #include <algorithm>
4217 
4218 
4219 namespace swig {
4220  template <class Type>
4222  typedef Type noconst_type;
4223  };
4224 
4225  template <class Type>
4226  struct noconst_traits<const Type> {
4227  typedef Type noconst_type;
4228  };
4229 
4230  /*
4231  type categories
4232  */
4233  struct pointer_category { };
4234  struct value_category { };
4235 
4236  /*
4237  General traits that provides type_name and type_info
4238  */
4239  template <class Type> struct traits { };
4240 
4241  template <class Type>
4242  inline const char* type_name() {
4244  }
4245 
4246  template <class Type>
4247  struct traits_info {
4248  static swig_type_info *type_query(std::string name) {
4249  name += " *";
4250  return SWIG_TypeQuery(name.c_str());
4251  }
4252  static swig_type_info *type_info() {
4253  static swig_type_info *info = type_query(type_name<Type>());
4254  return info;
4255  }
4256  };
4257 
4258  template <class Type>
4259  inline swig_type_info *type_info() {
4261  }
4262 
4263  /*
4264  Partial specialization for pointers
4265  */
4266  template <class Type> struct traits <Type *> {
4267  typedef pointer_category category;
4268  static std::string make_ptr_name(const char* name) {
4269  std::string ptrname = name;
4270  ptrname += " *";
4271  return ptrname;
4272  }
4273  static const char* type_name() {
4274  static std::string name = make_ptr_name(swig::type_name<Type>());
4275  return name.c_str();
4276  }
4277  };
4278 
4279  template <class Type, class Category>
4280  struct traits_as { };
4281 
4282  template <class Type, class Category>
4283  struct traits_check { };
4284 
4285 }
4286 
4287 
4288 namespace swig {
4289  /*
4290  Traits that provides the from method
4291  */
4292  template <class Type> struct traits_from_ptr {
4293  static PyObject *from(Type *val, int owner = 0) {
4294  return SWIG_InternalNewPointerObj(val, type_info<Type>(), owner);
4295  }
4296  };
4297 
4298  template <class Type> struct traits_from {
4299  static PyObject *from(const Type& val) {
4300  return traits_from_ptr<Type>::from(new Type(val), 1);
4301  }
4302  };
4303 
4304  template <class Type> struct traits_from<Type *> {
4305  static PyObject *from(Type* val) {
4306  return traits_from_ptr<Type>::from(val, 0);
4307  }
4308  };
4309 
4310  template <class Type> struct traits_from<const Type *> {
4311  static PyObject *from(const Type* val) {
4312  return traits_from_ptr<Type>::from(const_cast<Type*>(val), 0);
4313  }
4314  };
4315 
4316 
4317  template <class Type>
4318  inline PyObject *from(const Type& val) {
4319  return traits_from<Type>::from(val);
4320  }
4321 
4322  template <class Type>
4323  inline PyObject *from_ptr(Type* val, int owner) {
4324  return traits_from_ptr<Type>::from(val, owner);
4325  }
4326 
4327  /*
4328  Traits that provides the asval/as/check method
4329  */
4330  template <class Type>
4331  struct traits_asptr {
4332  static int asptr(PyObject *obj, Type **val) {
4333  Type *p;
4334  int res = SWIG_ConvertPtr(obj, (void**)&p, type_info<Type>(), 0);
4335  if (SWIG_IsOK(res)) {
4336  if (val) *val = p;
4337  }
4338  return res;
4339  }
4340  };
4341 
4342  template <class Type>
4343  inline int asptr(PyObject *obj, Type **vptr) {
4344  return traits_asptr<Type>::asptr(obj, vptr);
4345  }
4346 
4347  template <class Type>
4348  struct traits_asval {
4349  static int asval(PyObject *obj, Type *val) {
4350  if (val) {
4351  Type *p = 0;
4352  int res = traits_asptr<Type>::asptr(obj, &p);
4353  if (!SWIG_IsOK(res)) return res;
4354  if (p) {
4355  typedef typename noconst_traits<Type>::noconst_type noconst_type;
4356  *(const_cast<noconst_type*>(val)) = *p;
4357  if (SWIG_IsNewObj(res)){
4358  delete p;
4359  res = SWIG_DelNewMask(res);
4360  }
4361  return res;
4362  } else {
4363  return SWIG_ERROR;
4364  }
4365  } else {
4366  return traits_asptr<Type>::asptr(obj, (Type **)(0));
4367  }
4368  }
4369  };
4370 
4371  template <class Type> struct traits_asval<Type*> {
4372  static int asval(PyObject *obj, Type **val) {
4373  if (val) {
4374  typedef typename noconst_traits<Type>::noconst_type noconst_type;
4375  noconst_type *p = 0;
4376  int res = traits_asptr<noconst_type>::asptr(obj, &p);
4377  if (SWIG_IsOK(res)) {
4378  *(const_cast<noconst_type**>(val)) = p;
4379  }
4380  return res;
4381  } else {
4382  return traits_asptr<Type>::asptr(obj, (Type **)(0));
4383  }
4384  }
4385  };
4386 
4387  template <class Type>
4388  inline int asval(PyObject *obj, Type *val) {
4389  return traits_asval<Type>::asval(obj, val);
4390  }
4391 
4392  template <class Type>
4393  struct traits_as<Type, value_category> {
4394  static Type as(PyObject *obj, bool throw_error) {
4395  Type v;
4396  int res = asval(obj, &v);
4397  if (!obj || !SWIG_IsOK(res)) {
4398  if (!PyErr_Occurred()) {
4399  ::SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
4400  }
4401  if (throw_error) throw std::invalid_argument("bad type");
4402  }
4403  return v;
4404  }
4405  };
4406 
4407  template <class Type>
4408  struct traits_as<Type, pointer_category> {
4409  static Type as(PyObject *obj, bool throw_error) {
4410  Type *v = 0;
4411  int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
4412  if (SWIG_IsOK(res) && v) {
4413  if (SWIG_IsNewObj(res)) {
4414  Type r(*v);
4415  delete v;
4416  return r;
4417  } else {
4418  return *v;
4419  }
4420  } else {
4421  // Uninitialized return value, no Type() constructor required.
4422  static Type *v_def = (Type*) malloc(sizeof(Type));
4423  if (!PyErr_Occurred()) {
4424  SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
4425  }
4426  if (throw_error) throw std::invalid_argument("bad type");
4427  memset(v_def,0,sizeof(Type));
4428  return *v_def;
4429  }
4430  }
4431  };
4432 
4433  template <class Type>
4434  struct traits_as<Type*, pointer_category> {
4435  static Type* as(PyObject *obj, bool throw_error) {
4436  Type *v = 0;
4437  int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
4438  if (SWIG_IsOK(res)) {
4439  return v;
4440  } else {
4441  if (!PyErr_Occurred()) {
4442  SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
4443  }
4444  if (throw_error) throw std::invalid_argument("bad type");
4445  return 0;
4446  }
4447  }
4448  };
4449 
4450  template <class Type>
4451  inline Type as(PyObject *obj, bool te = false) {
4453  }
4454 
4455  template <class Type>
4457  static bool check(PyObject *obj) {
4458  int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR;
4459  return SWIG_IsOK(res) ? true : false;
4460  }
4461  };
4462 
4463  template <class Type>
4465  static bool check(PyObject *obj) {
4466  int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR;
4467  return SWIG_IsOK(res) ? true : false;
4468  }
4469  };
4470 
4471  template <class Type>
4472  inline bool check(PyObject *obj) {
4474  }
4475 }
4476 
4477 
4478 #include <functional>
4479 
4480 namespace std {
4481  template <>
4482  struct less <PyObject *>: public binary_function<PyObject *, PyObject *, bool>
4483  {
4484  bool
4485  operator()(PyObject * v, PyObject *w) const
4486  {
4487  bool res;
4488  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
4489  res = PyObject_RichCompareBool(v, w, Py_LT) ? true : false;
4490  /* This may fall into a case of inconsistent
4491  eg. ObjA > ObjX > ObjB
4492  but ObjA < ObjB
4493  */
4494  if( PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError) )
4495  {
4496  /* Objects can't be compared, this mostly occurred in Python 3.0 */
4497  /* Compare their ptr directly for a workaround */
4498  res = (v < w);
4499  PyErr_Clear();
4500  }
4501  SWIG_PYTHON_THREAD_END_BLOCK;
4502  return res;
4503  }
4504  };
4505 
4506  template <>
4507  struct less <swig::SwigPtr_PyObject>: public binary_function<swig::SwigPtr_PyObject, swig::SwigPtr_PyObject, bool>
4508  {
4509  bool
4510  operator()(const swig::SwigPtr_PyObject& v, const swig::SwigPtr_PyObject& w) const
4511  {
4512  return std::less<PyObject *>()(v, w);
4513  }
4514  };
4515 
4516  template <>
4517  struct less <swig::SwigVar_PyObject>: public binary_function<swig::SwigVar_PyObject, swig::SwigVar_PyObject, bool>
4518  {
4519  bool
4520  operator()(const swig::SwigVar_PyObject& v, const swig::SwigVar_PyObject& w) const
4521  {
4522  return std::less<PyObject *>()(v, w);
4523  }
4524  };
4525 
4526 }
4527 
4528 namespace swig {
4529  template <> struct traits<PyObject *> {
4530  typedef value_category category;
4531  static const char* type_name() { return "PyObject *"; }
4532  };
4533 
4534  template <> struct traits_asval<PyObject * > {
4535  typedef PyObject * value_type;
4536  static int asval(PyObject *obj, value_type *val) {
4537  if (val) *val = obj;
4538  return SWIG_OK;
4539  }
4540  };
4541 
4542  template <>
4543  struct traits_check<PyObject *, value_category> {
4544  static bool check(PyObject *) {
4545  return true;
4546  }
4547  };
4548 
4549  template <> struct traits_from<PyObject *> {
4550  typedef PyObject * value_type;
4551  static PyObject *from(const value_type& val) {
4552  Py_XINCREF(val);
4553  return val;
4554  }
4555  };
4556 
4557 }
4558 
4559 namespace swig {
4560  template <class Difference>
4561  inline size_t
4562  check_index(Difference i, size_t size, bool insert = false) {
4563  if ( i < 0 ) {
4564  if ((size_t) (-i) <= size)
4565  return (size_t) (i + size);
4566  } else if ( (size_t) i < size ) {
4567  return (size_t) i;
4568  } else if (insert && ((size_t) i == size)) {
4569  return size;
4570  }
4571  throw std::out_of_range("index out of range");
4572  }
4573 
4574  template <class Difference>
4575  void
4576  slice_adjust(Difference i, Difference j, Py_ssize_t step, size_t size, Difference &ii, Difference &jj, bool insert = false) {
4577  if (step == 0) {
4578  throw std::invalid_argument("slice step cannot be zero");
4579  } else if (step > 0) {
4580  // Required range: 0 <= i < size, 0 <= j < size
4581  if (i < 0) {
4582  ii = 0;
4583  } else if (i < (Difference)size) {
4584  ii = i;
4585  } else if (insert && (i >= (Difference)size)) {
4586  ii = (Difference)size;
4587  }
4588  if ( j < 0 ) {
4589  jj = 0;
4590  } else {
4591  jj = (j < (Difference)size) ? j : (Difference)size;
4592  }
4593  } else {
4594  // Required range: -1 <= i < size-1, -1 <= j < size-1
4595  if (i < -1) {
4596  ii = -1;
4597  } else if (i < (Difference) size) {
4598  ii = i;
4599  } else if (i >= (Difference)(size-1)) {
4600  ii = (Difference)(size-1);
4601  }
4602  if (j < -1) {
4603  jj = -1;
4604  } else {
4605  jj = (j < (Difference)size ) ? j : (Difference)(size-1);
4606  }
4607  }
4608  }
4609 
4610  template <class Sequence, class Difference>
4611  inline typename Sequence::iterator
4612  getpos(Sequence* self, Difference i) {
4613  typename Sequence::iterator pos = self->begin();
4614  std::advance(pos, check_index(i,self->size()));
4615  return pos;
4616  }
4617 
4618  template <class Sequence, class Difference>
4619  inline typename Sequence::const_iterator
4620  cgetpos(const Sequence* self, Difference i) {
4621  typename Sequence::const_iterator pos = self->begin();
4622  std::advance(pos, check_index(i,self->size()));
4623  return pos;
4624  }
4625 
4626  template <class Sequence, class Difference>
4627  inline Sequence*
4628  getslice(const Sequence* self, Difference i, Difference j, Py_ssize_t step) {
4629  typename Sequence::size_type size = self->size();
4630  Difference ii = 0;
4631  Difference jj = 0;
4632  swig::slice_adjust(i, j, step, size, ii, jj);
4633 
4634  if (step > 0) {
4635  typename Sequence::const_iterator sb = self->begin();
4636  typename Sequence::const_iterator se = self->begin();
4637  std::advance(sb,ii);
4638  std::advance(se,jj);
4639  if (step == 1) {
4640  return new Sequence(sb, se);
4641  } else {
4642  Sequence *sequence = new Sequence();
4643  typename Sequence::const_iterator it = sb;
4644  while (it!=se) {
4645  sequence->push_back(*it);
4646  for (Py_ssize_t c=0; c<step && it!=se; ++c)
4647  it++;
4648  }
4649  return sequence;
4650  }
4651  } else {
4652  Sequence *sequence = new Sequence();
4653  if (ii > jj) {
4654  typename Sequence::const_reverse_iterator sb = self->rbegin();
4655  typename Sequence::const_reverse_iterator se = self->rbegin();
4656  std::advance(sb,size-ii-1);
4657  std::advance(se,size-jj-1);
4658  typename Sequence::const_reverse_iterator it = sb;
4659  while (it!=se) {
4660  sequence->push_back(*it);
4661  for (Py_ssize_t c=0; c<-step && it!=se; ++c)
4662  it++;
4663  }
4664  }
4665  return sequence;
4666  }
4667  }
4668 
4669  template <class Sequence, class Difference, class InputSeq>
4670  inline void
4671  setslice(Sequence* self, Difference i, Difference j, Py_ssize_t step, const InputSeq& is = InputSeq()) {
4672  typename Sequence::size_type size = self->size();
4673  Difference ii = 0;
4674  Difference jj = 0;
4675  swig::slice_adjust(i, j, step, size, ii, jj, true);
4676  if (step > 0) {
4677  if (jj < ii)
4678  jj = ii;
4679  if (step == 1) {
4680  size_t ssize = jj - ii;
4681  if (ssize <= is.size()) {
4682  // expanding/staying the same size
4683  typename Sequence::iterator sb = self->begin();
4684  typename InputSeq::const_iterator isit = is.begin();
4685  std::advance(sb,ii);
4686  std::advance(isit, jj - ii);
4687  self->insert(std::copy(is.begin(), isit, sb), isit, is.end());
4688  } else {
4689  // shrinking
4690  typename Sequence::iterator sb = self->begin();
4691  typename Sequence::iterator se = self->begin();
4692  std::advance(sb,ii);
4693  std::advance(se,jj);
4694  self->erase(sb,se);
4695  sb = self->begin();
4696  std::advance(sb,ii);
4697  self->insert(sb, is.begin(), is.end());
4698  }
4699  } else {
4700  size_t replacecount = (jj - ii + step - 1) / step;
4701  if (is.size() != replacecount) {
4702  char msg[1024];
4703  sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount);
4704  throw std::invalid_argument(msg);
4705  }
4706  typename Sequence::const_iterator isit = is.begin();
4707  typename Sequence::iterator it = self->begin();
4708  std::advance(it,ii);
4709  for (size_t rc=0; rc<replacecount; ++rc) {
4710  *it++ = *isit++;
4711  for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c)
4712  it++;
4713  }
4714  }
4715  } else {
4716  if (jj > ii)
4717  jj = ii;
4718  size_t replacecount = (ii - jj - step - 1) / -step;
4719  if (is.size() != replacecount) {
4720  char msg[1024];
4721  sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount);
4722  throw std::invalid_argument(msg);
4723  }
4724  typename Sequence::const_iterator isit = is.begin();
4725  typename Sequence::reverse_iterator it = self->rbegin();
4726  std::advance(it,size-ii-1);
4727  for (size_t rc=0; rc<replacecount; ++rc) {
4728  *it++ = *isit++;
4729  for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c)
4730  it++;
4731  }
4732  }
4733  }
4734 
4735  template <class Sequence, class Difference>
4736  inline void
4737  delslice(Sequence* self, Difference i, Difference j, Py_ssize_t step) {
4738  typename Sequence::size_type size = self->size();
4739  Difference ii = 0;
4740  Difference jj = 0;
4741  swig::slice_adjust(i, j, step, size, ii, jj, true);
4742  if (step > 0) {
4743  if (jj > ii) {
4744  typename Sequence::iterator sb = self->begin();
4745  std::advance(sb,ii);
4746  if (step == 1) {
4747  typename Sequence::iterator se = self->begin();
4748  std::advance(se,jj);
4749  self->erase(sb,se);
4750  } else {
4751  typename Sequence::iterator it = sb;
4752  size_t delcount = (jj - ii + step - 1) / step;
4753  while (delcount) {
4754  it = self->erase(it);
4755  for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c)
4756  it++;
4757  delcount--;
4758  }
4759  }
4760  }
4761  } else {
4762  if (ii > jj) {
4763  typename Sequence::reverse_iterator sb = self->rbegin();
4764  std::advance(sb,size-ii-1);
4765  typename Sequence::reverse_iterator it = sb;
4766  size_t delcount = (ii - jj - step - 1) / -step;
4767  while (delcount) {
4768  it = typename Sequence::reverse_iterator(self->erase((++it).base()));
4769  for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c)
4770  it++;
4771  delcount--;
4772  }
4773  }
4774  }
4775  }
4776 }
4777 
4778 
4779 #if defined(__SUNPRO_CC) && defined(_RWSTD_VER)
4780 # if !defined(SWIG_NO_STD_NOITERATOR_TRAITS_STL)
4781 # define SWIG_STD_NOITERATOR_TRAITS_STL
4782 # endif
4783 #endif
4784 
4785 #if !defined(SWIG_STD_NOITERATOR_TRAITS_STL)
4786 #include <iterator>
4787 #else
4788 namespace std {
4789  template <class Iterator>
4790  struct iterator_traits {
4791  typedef ptrdiff_t difference_type;
4792  typedef typename Iterator::value_type value_type;
4793  };
4794 
4795  template <class Iterator, class Category,class T, class Reference, class Pointer, class Distance>
4796  struct iterator_traits<__reverse_bi_iterator<Iterator,Category,T,Reference,Pointer,Distance> > {
4797  typedef Distance difference_type;
4798  typedef T value_type;
4799  };
4800 
4801  template <class T>
4802  struct iterator_traits<T*> {
4803  typedef T value_type;
4804  typedef ptrdiff_t difference_type;
4805  };
4806 
4807  template<typename _InputIterator>
4808  inline typename iterator_traits<_InputIterator>::difference_type
4809  distance(_InputIterator __first, _InputIterator __last)
4810  {
4811  typename iterator_traits<_InputIterator>::difference_type __n = 0;
4812  while (__first != __last) {
4813  ++__first; ++__n;
4814  }
4815  return __n;
4816  }
4817 }
4818 #endif
4819 
4820 
4821 namespace swig {
4822  template<typename OutIterator>
4824  {
4825  public:
4826  typedef OutIterator out_iterator;
4827  typedef typename std::iterator_traits<out_iterator>::value_type value_type;
4829 
4830  SwigPyIterator_T(out_iterator curr, PyObject *seq)
4831  : SwigPyIterator(seq), current(curr)
4832  {
4833  }
4834 
4835  const out_iterator& get_current() const
4836  {
4837  return current;
4838  }
4839 
4840 
4841  bool equal (const SwigPyIterator &iter) const
4842  {
4843  const self_type *iters = dynamic_cast<const self_type *>(&iter);
4844  if (iters) {
4845  return (current == iters->get_current());
4846  } else {
4847  throw std::invalid_argument("bad iterator type");
4848  }
4849  }
4850 
4851  ptrdiff_t distance(const SwigPyIterator &iter) const
4852  {
4853  const self_type *iters = dynamic_cast<const self_type *>(&iter);
4854  if (iters) {
4855  return std::distance(current, iters->get_current());
4856  } else {
4857  throw std::invalid_argument("bad iterator type");
4858  }
4859  }
4860 
4861  protected:
4862  out_iterator current;
4863  };
4864 
4865  template <class ValueType>
4866  struct from_oper
4867  {
4868  typedef const ValueType& argument_type;
4869  typedef PyObject *result_type;
4870  result_type operator()(argument_type v) const
4871  {
4872  return swig::from(v);
4873  }
4874  };
4875 
4876  template<typename OutIterator,
4877  typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
4878  typename FromOper = from_oper<ValueType> >
4879  class SwigPyIteratorOpen_T : public SwigPyIterator_T<OutIterator>
4880  {
4881  public:
4882  FromOper from;
4883  typedef OutIterator out_iterator;
4884  typedef ValueType value_type;
4887 
4888  SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
4889  : SwigPyIterator_T<OutIterator>(curr, seq)
4890  {
4891  }
4892 
4893  PyObject *value() const {
4894  return from(static_cast<const value_type&>(*(base::current)));
4895  }
4896 
4897  SwigPyIterator *copy() const
4898  {
4899  return new self_type(*this);
4900  }
4901 
4902  SwigPyIterator *incr(size_t n = 1)
4903  {
4904  while (n--) {
4905  ++base::current;
4906  }
4907  return this;
4908  }
4909 
4910  SwigPyIterator *decr(size_t n = 1)
4911  {
4912  while (n--) {
4913  --base::current;
4914  }
4915  return this;
4916  }
4917  };
4918 
4919  template<typename OutIterator,
4920  typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
4921  typename FromOper = from_oper<ValueType> >
4922  class SwigPyIteratorClosed_T : public SwigPyIterator_T<OutIterator>
4923  {
4924  public:
4925  FromOper from;
4926  typedef OutIterator out_iterator;
4927  typedef ValueType value_type;
4930 
4931  SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq)
4932  : SwigPyIterator_T<OutIterator>(curr, seq), begin(first), end(last)
4933  {
4934  }
4935 
4936  PyObject *value() const {
4937  if (base::current == end) {
4938  throw stop_iteration();
4939  } else {
4940  return from(static_cast<const value_type&>(*(base::current)));
4941  }
4942  }
4943 
4944  SwigPyIterator *copy() const
4945  {
4946  return new self_type(*this);
4947  }
4948 
4949  SwigPyIterator *incr(size_t n = 1)
4950  {
4951  while (n--) {
4952  if (base::current == end) {
4953  throw stop_iteration();
4954  } else {
4955  ++base::current;
4956  }
4957  }
4958  return this;
4959  }
4960 
4961  SwigPyIterator *decr(size_t n = 1)
4962  {
4963  while (n--) {
4964  if (base::current == begin) {
4965  throw stop_iteration();
4966  } else {
4967  --base::current;
4968  }
4969  }
4970  return this;
4971  }
4972 
4973  private:
4974  out_iterator begin;
4975  out_iterator end;
4976  };
4977 
4978  template<typename OutIter>
4979  inline SwigPyIterator*
4980  make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0)
4981  {
4982  return new SwigPyIteratorClosed_T<OutIter>(current, begin, end, seq);
4983  }
4984 
4985  template<typename OutIter>
4986  inline SwigPyIterator*
4987  make_output_iterator(const OutIter& current, PyObject *seq = 0)
4988  {
4989  return new SwigPyIteratorOpen_T<OutIter>(current, seq);
4990  }
4991 
4992 }
4993 
4994 
4995 namespace swig
4996 {
4997  template <class T>
4999  {
5000  SwigPySequence_Ref(PyObject* seq, int index)
5001  : _seq(seq), _index(index)
5002  {
5003  }
5004 
5005  operator T () const
5006  {
5007  swig::SwigVar_PyObject item = PySequence_GetItem(_seq, _index);
5008  try {
5009  return swig::as<T>(item, true);
5010  } catch (std::exception& e) {
5011  char msg[1024];
5012  sprintf(msg, "in sequence element %d ", _index);
5013  if (!PyErr_Occurred()) {
5014  ::SWIG_Error(SWIG_TypeError, swig::type_name<T>());
5015  }
5016  SWIG_Python_AddErrorMsg(msg);
5017  SWIG_Python_AddErrorMsg(e.what());
5018  throw;
5019  }
5020  }
5021 
5022  SwigPySequence_Ref& operator=(const T& v)
5023  {
5024  PySequence_SetItem(_seq, _index, swig::from<T>(v));
5025  return *this;
5026  }
5027 
5028  private:
5029  PyObject* _seq;
5030  int _index;
5031  };
5032 
5033  template <class T>
5035  {
5036  SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
5037  const T* operator->() const { return &m_value; }
5038  operator const T*() const { return &m_value; }
5039  T m_value;
5040  };
5041 
5042  template <class T, class Reference >
5044  {
5046 
5047  typedef std::random_access_iterator_tag iterator_category;
5048  typedef Reference reference;
5049  typedef T value_type;
5050  typedef T* pointer;
5051  typedef int difference_type;
5052 
5054  {
5055  }
5056 
5057  SwigPySequence_InputIterator(PyObject* seq, int index)
5058  : _seq(seq), _index(index)
5059  {
5060  }
5061 
5062  reference operator*() const
5063  {
5064  return reference(_seq, _index);
5065  }
5066 
5068  operator->() const {
5069  return SwigPySequence_ArrowProxy<T>(operator*());
5070  }
5071 
5072  bool operator==(const self& ri) const
5073  {
5074  return (_index == ri._index) && (_seq == ri._seq);
5075  }
5076 
5077  bool operator!=(const self& ri) const
5078  {
5079  return !(operator==(ri));
5080  }
5081 
5082  self& operator ++ ()
5083  {
5084  ++_index;
5085  return *this;
5086  }
5087 
5088  self& operator -- ()
5089  {
5090  --_index;
5091  return *this;
5092  }
5093 
5094  self& operator += (difference_type n)
5095  {
5096  _index += n;
5097  return *this;
5098  }
5099 
5100  self operator +(difference_type n) const
5101  {
5102  return self(_seq, _index + n);
5103  }
5104 
5105  self& operator -= (difference_type n)
5106  {
5107  _index -= n;
5108  return *this;
5109  }
5110 
5111  self operator -(difference_type n) const
5112  {
5113  return self(_seq, _index - n);
5114  }
5115 
5116  difference_type operator - (const self& ri) const
5117  {
5118  return _index - ri._index;
5119  }
5120 
5121  bool operator < (const self& ri) const
5122  {
5123  return _index < ri._index;
5124  }
5125 
5126  reference
5127  operator[](difference_type n) const
5128  {
5129  return reference(_seq, _index + n);
5130  }
5131 
5132  private:
5133  PyObject* _seq;
5134  difference_type _index;
5135  };
5136 
5137  template <class T>
5139  {
5141  typedef const SwigPySequence_Ref<T> const_reference;
5142  typedef T value_type;
5143  typedef T* pointer;
5144  typedef int difference_type;
5145  typedef int size_type;
5146  typedef const pointer const_pointer;
5149 
5150  SwigPySequence_Cont(PyObject* seq) : _seq(0)
5151  {
5152  if (!PySequence_Check(seq)) {
5153  throw std::invalid_argument("a sequence is expected");
5154  }
5155  _seq = seq;
5156  Py_INCREF(_seq);
5157  }
5158 
5160  {
5161  Py_XDECREF(_seq);
5162  }
5163 
5164  size_type size() const
5165  {
5166  return static_cast<size_type>(PySequence_Size(_seq));
5167  }
5168 
5169  bool empty() const
5170  {
5171  return size() == 0;
5172  }
5173 
5174  iterator begin()
5175  {
5176  return iterator(_seq, 0);
5177  }
5178 
5179  const_iterator begin() const
5180  {
5181  return const_iterator(_seq, 0);
5182  }
5183 
5184  iterator end()
5185  {
5186  return iterator(_seq, size());
5187  }
5188 
5189  const_iterator end() const
5190  {
5191  return const_iterator(_seq, size());
5192  }
5193 
5194  reference operator[](difference_type n)
5195  {
5196  return reference(_seq, n);
5197  }
5198 
5199  const_reference operator[](difference_type n) const
5200  {
5201  return const_reference(_seq, n);
5202  }
5203 
5204  bool check(bool set_err = true) const
5205  {
5206  int s = size();
5207  for (int i = 0; i < s; ++i) {
5208  swig::SwigVar_PyObject item = PySequence_GetItem(_seq, i);
5209  if (!swig::check<value_type>(item)) {
5210  if (set_err) {
5211  char msg[1024];
5212  sprintf(msg, "in sequence element %d", i);
5213  SWIG_Error(SWIG_RuntimeError, msg);
5214  }
5215  return false;
5216  }
5217  }
5218  return true;
5219  }
5220 
5221  private:
5222  PyObject* _seq;
5223  };
5224 
5225 }
5226 
5227 
5228 SWIGINTERN swig_type_info*
5229 SWIG_pchar_descriptor(void)
5230 {
5231  static int init = 0;
5232  static swig_type_info* info = 0;
5233  if (!init) {
5234  info = SWIG_TypeQuery("_p_char");
5235  init = 1;
5236  }
5237  return info;
5238 }
5239 
5240 
5241 SWIGINTERN int
5242 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
5243 {
5244 #if PY_VERSION_HEX>=0x03000000
5245  if (PyUnicode_Check(obj))
5246 #else
5247  if (PyString_Check(obj))
5248 #endif
5249  {
5250  char *cstr; Py_ssize_t len;
5251 #if PY_VERSION_HEX>=0x03000000
5252  if (!alloc && cptr) {
5253  /* We can't allow converting without allocation, since the internal
5254  representation of string in Python 3 is UCS-2/UCS-4 but we require
5255  a UTF-8 representation.
5256  TODO(bhy) More detailed explanation */
5257  return SWIG_RuntimeError;
5258  }
5259  obj = PyUnicode_AsUTF8String(obj);
5260  PyBytes_AsStringAndSize(obj, &cstr, &len);
5261  if(alloc) *alloc = SWIG_NEWOBJ;
5262 #else
5263  PyString_AsStringAndSize(obj, &cstr, &len);
5264 #endif
5265  if (cptr) {
5266  if (alloc) {
5267  /*
5268  In python the user should not be able to modify the inner
5269  string representation. To warranty that, if you define
5270  SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
5271  buffer is always returned.
5272 
5273  The default behavior is just to return the pointer value,
5274  so, be careful.
5275  */
5276 #if defined(SWIG_PYTHON_SAFE_CSTRINGS)
5277  if (*alloc != SWIG_OLDOBJ)
5278 #else
5279  if (*alloc == SWIG_NEWOBJ)
5280 #endif
5281  {
5282  *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
5283  *alloc = SWIG_NEWOBJ;
5284  }
5285  else {
5286  *cptr = cstr;
5287  *alloc = SWIG_OLDOBJ;
5288  }
5289  } else {
5290  #if PY_VERSION_HEX>=0x03000000
5291  assert(0); /* Should never reach here in Python 3 */
5292  #endif
5293  *cptr = SWIG_Python_str_AsChar(obj);
5294  }
5295  }
5296  if (psize) *psize = len + 1;
5297 #if PY_VERSION_HEX>=0x03000000
5298  Py_XDECREF(obj);
5299 #endif
5300  return SWIG_OK;
5301  } else {
5302  swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
5303  if (pchar_descriptor) {
5304  void* vptr = 0;
5305  if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
5306  if (cptr) *cptr = (char *) vptr;
5307  if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
5308  if (alloc) *alloc = SWIG_OLDOBJ;
5309  return SWIG_OK;
5310  }
5311  }
5312  }
5313  return SWIG_TypeError;
5314 }
5315 
5316 
5317 SWIGINTERN int
5318 SWIG_AsPtr_std_string (PyObject * obj, std::string **val)
5319 {
5320  char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
5321  if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
5322  if (buf) {
5323  if (val) *val = new std::string(buf, size - 1);
5324  if (alloc == SWIG_NEWOBJ) delete[] buf;
5325  return SWIG_NEWOBJ;
5326  } else {
5327  if (val) *val = 0;
5328  return SWIG_OLDOBJ;
5329  }
5330  } else {
5331  static int init = 0;
5332  static swig_type_info* descriptor = 0;
5333  if (!init) {
5334  descriptor = SWIG_TypeQuery("std::string" " *");
5335  init = 1;
5336  }
5337  if (descriptor) {
5338  std::string *vptr;
5339  int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0);
5340  if (SWIG_IsOK(res) && val) *val = vptr;
5341  return res;
5342  }
5343  }
5344  return SWIG_ERROR;
5345 }
5346 
5347 
5348 SWIGINTERN int
5349 SWIG_AsVal_std_string (PyObject * obj, std::string *val)
5350 {
5351  std::string* v = (std::string *) 0;
5352  int res = SWIG_AsPtr_std_string (obj, &v);
5353  if (!SWIG_IsOK(res)) return res;
5354  if (v) {
5355  if (val) *val = *v;
5356  if (SWIG_IsNewObj(res)) {
5357  delete v;
5358  res = SWIG_DelNewMask(res);
5359  }
5360  return res;
5361  }
5362  return SWIG_ERROR;
5363 }
5364 
5365 
5366 SWIGINTERNINLINE PyObject *
5367 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
5368 {
5369  if (carray) {
5370  if (size > INT_MAX) {
5371  swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
5372  return pchar_descriptor ?
5373  SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
5374  } else {
5375 #if PY_VERSION_HEX >= 0x03000000
5376 #if PY_VERSION_HEX >= 0x03010000
5377  return PyUnicode_DecodeUTF8(carray, static_cast< int >(size), "surrogateescape");
5378 #else
5379  return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
5380 #endif
5381 #else
5382  return PyString_FromStringAndSize(carray, static_cast< int >(size));
5383 #endif
5384  }
5385  } else {
5386  return SWIG_Py_Void();
5387  }
5388 }
5389 
5390 
5391 SWIGINTERNINLINE PyObject *
5392 SWIG_From_std_string (const std::string& s)
5393 {
5394  return SWIG_FromCharPtrAndSize(s.data(), s.size());
5395 }
5396 
5397 
5398 namespace swig {
5399  template <> struct traits<std::string > {
5400  typedef value_category category;
5401  static const char* type_name() { return"std::string"; }
5402  };
5403  template <> struct traits_asval<std::string > {
5404  typedef std::string value_type;
5405  static int asval(PyObject *obj, value_type *val) {
5406  return SWIG_AsVal_std_string (obj, val);
5407  }
5408  };
5409  template <> struct traits_from<std::string > {
5410  typedef std::string value_type;
5411  static PyObject *from(const value_type& val) {
5412  return SWIG_From_std_string (val);
5413  }
5414  };
5415 }
5416 
5417 
5418 namespace swig {
5419  template <class SwigPySeq, class Seq>
5420  inline void
5421  assign(const SwigPySeq& swigpyseq, Seq* seq) {
5422  // seq->assign(swigpyseq.begin(), swigpyseq.end()); // not used as not always implemented
5423  typedef typename SwigPySeq::value_type value_type;
5424  typename SwigPySeq::const_iterator it = swigpyseq.begin();
5425  for (;it != swigpyseq.end(); ++it) {
5426  seq->insert(seq->end(),(value_type)(*it));
5427  }
5428  }
5429 
5430  template <class Seq, class T = typename Seq::value_type >
5432  typedef Seq sequence;
5433  typedef T value_type;
5434 
5435  static int asptr(PyObject *obj, sequence **seq) {
5436  if (obj == Py_None || SWIG_Python_GetSwigThis(obj)) {
5437  sequence *p;
5438  if (::SWIG_ConvertPtr(obj,(void**)&p,
5439  swig::type_info<sequence>(),0) == SWIG_OK) {
5440  if (seq) *seq = p;
5441  return SWIG_OLDOBJ;
5442  }
5443  } else if (PySequence_Check(obj)) {
5444  try {
5445  SwigPySequence_Cont<value_type> swigpyseq(obj);
5446  if (seq) {
5447  sequence *pseq = new sequence();
5448  assign(swigpyseq, pseq);
5449  *seq = pseq;
5450  return SWIG_NEWOBJ;
5451  } else {
5452  return swigpyseq.check() ? SWIG_OK : SWIG_ERROR;
5453  }
5454  } catch (std::exception& e) {
5455  if (seq) {
5456  if (!PyErr_Occurred()) {
5457  PyErr_SetString(PyExc_TypeError, e.what());
5458  }
5459  }
5460  return SWIG_ERROR;
5461  }
5462  }
5463  return SWIG_ERROR;
5464  }
5465  };
5466 
5467  template <class Seq, class T = typename Seq::value_type >
5469  typedef Seq sequence;
5470  typedef T value_type;
5471  typedef typename Seq::size_type size_type;
5472  typedef typename sequence::const_iterator const_iterator;
5473 
5474  static PyObject *from(const sequence& seq) {
5475 #ifdef SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS
5476  swig_type_info *desc = swig::type_info<sequence>();
5477  if (desc && desc->clientdata) {
5478  return SWIG_NewPointerObj(new sequence(seq), desc, SWIG_POINTER_OWN);
5479  }
5480 #endif
5481  size_type size = seq.size();
5482  if (size <= (size_type)INT_MAX) {
5483  PyObject *obj = PyTuple_New((int)size);
5484  int i = 0;
5485  for (const_iterator it = seq.begin();
5486  it != seq.end(); ++it, ++i) {
5487  PyTuple_SetItem(obj,i,swig::from<value_type>(*it));
5488  }
5489  return obj;
5490  } else {
5491  PyErr_SetString(PyExc_OverflowError,"sequence size not valid in python");
5492  return NULL;
5493  }
5494  }
5495  };
5496 }
5497 
5498 
5499  namespace swig {
5500  template <class T>
5501  struct traits_asptr<std::vector<T> > {
5502  static int asptr(PyObject *obj, std::vector<T> **vec) {
5503  return traits_asptr_stdseq<std::vector<T> >::asptr(obj, vec);
5504  }
5505  };
5506 
5507  template <class T>
5508  struct traits_from<std::vector<T> > {
5509  static PyObject *from(const std::vector<T>& vec) {
5510  return traits_from_stdseq<std::vector<T> >::from(vec);
5511  }
5512  };
5513  }
5514 
5515 
5516  namespace swig {
5517  template <> struct traits<std::vector<std::string, std::allocator< std::string > > > {
5518  typedef pointer_category category;
5519  static const char* type_name() {
5520  return "std::vector<" "std::string" "," "std::allocator< std::string >" " >";
5521  }
5522  };
5523  }
5524 
5525 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_std_string_Sg__iterator(std::vector< std::string > *self,PyObject **PYTHON_SELF){
5526  return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
5527  }
5528 SWIGINTERN bool std_vector_Sl_std_string_Sg____nonzero__(std::vector< std::string > const *self){
5529  return !(self->empty());
5530  }
5531 SWIGINTERN bool std_vector_Sl_std_string_Sg____bool__(std::vector< std::string > const *self){
5532  return !(self->empty());
5533  }
5534 SWIGINTERN std::vector< std::string >::size_type std_vector_Sl_std_string_Sg____len__(std::vector< std::string > const *self){
5535  return self->size();
5536  }
5537 
5538 SWIGINTERNINLINE PyObject*
5539 SWIG_From_unsigned_SS_long (unsigned long value)
5540 {
5541  return (value > LONG_MAX) ?
5542  PyLong_FromUnsignedLong(value) : PyLong_FromLong(static_cast< long >(value));
5543 }
5544 
5545 
5546 SWIGINTERNINLINE PyObject *
5547 SWIG_From_size_t (size_t value)
5548 {
5549  return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value));
5550 }
5551 
5552 SWIGINTERN std::vector< std::string >::value_type std_vector_Sl_std_string_Sg__pop(std::vector< std::string > *self){
5553  if (self->size() == 0)
5554  throw std::out_of_range("pop from empty container");
5555  std::vector<std::string,std::allocator< std::string > >::value_type x = self->back();
5556  self->pop_back();
5557  return x;
5558  }
5559 SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg____getslice__(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type j){
5560  return swig::getslice(self, i, j, 1);
5561  }
5562 SWIGINTERN void std_vector_Sl_std_string_Sg____setslice____SWIG_0(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type j,std::vector< std::string,std::allocator< std::string > > const &v=std::vector< std::string,std::allocator< std::string > >()){
5563  swig::setslice(self, i, j, 1, v);
5564  }
5565 SWIGINTERN void std_vector_Sl_std_string_Sg____delslice__(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type j){
5566  swig::delslice(self, i, j, 1);
5567  }
5568 SWIGINTERN void std_vector_Sl_std_string_Sg____delitem____SWIG_0(std::vector< std::string > *self,std::vector< std::string >::difference_type i){
5569  self->erase(swig::getpos(self,i));
5570  }
5571 SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg____getitem____SWIG_0(std::vector< std::string > *self,PySliceObject *slice){
5572  Py_ssize_t i, j, step;
5573  if( !PySlice_Check(slice) ) {
5574  SWIG_Error(SWIG_TypeError, "Slice object expected.");
5575  return NULL;
5576  }
5577  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5578  std::vector<std::string,std::allocator< std::string > >::difference_type id = i;
5579  std::vector<std::string,std::allocator< std::string > >::difference_type jd = j;
5580  return swig::getslice(self, id, jd, step);
5581  }
5582 SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_0(std::vector< std::string > *self,PySliceObject *slice,std::vector< std::string,std::allocator< std::string > > const &v){
5583  Py_ssize_t i, j, step;
5584  if( !PySlice_Check(slice) ) {
5585  SWIG_Error(SWIG_TypeError, "Slice object expected.");
5586  return;
5587  }
5588  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5589  std::vector<std::string,std::allocator< std::string > >::difference_type id = i;
5590  std::vector<std::string,std::allocator< std::string > >::difference_type jd = j;
5591  swig::setslice(self, id, jd, step, v);
5592  }
5593 SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_1(std::vector< std::string > *self,PySliceObject *slice){
5594  Py_ssize_t i, j, step;
5595  if( !PySlice_Check(slice) ) {
5596  SWIG_Error(SWIG_TypeError, "Slice object expected.");
5597  return;
5598  }
5599  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5600  std::vector<std::string,std::allocator< std::string > >::difference_type id = i;
5601  std::vector<std::string,std::allocator< std::string > >::difference_type jd = j;
5602  swig::delslice(self, id, jd, step);
5603  }
5604 SWIGINTERN void std_vector_Sl_std_string_Sg____delitem____SWIG_1(std::vector< std::string > *self,PySliceObject *slice){
5605  Py_ssize_t i, j, step;
5606  if( !PySlice_Check(slice) ) {
5607  SWIG_Error(SWIG_TypeError, "Slice object expected.");
5608  return;
5609  }
5610  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5611  std::vector<std::string,std::allocator< std::string > >::difference_type id = i;
5612  std::vector<std::string,std::allocator< std::string > >::difference_type jd = j;
5613  swig::delslice(self, id, jd, step);
5614  }
5615 SWIGINTERN std::vector< std::string >::value_type const &std_vector_Sl_std_string_Sg____getitem____SWIG_1(std::vector< std::string > const *self,std::vector< std::string >::difference_type i){
5616  return *(swig::cgetpos(self, i));
5617  }
5618 SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_2(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::value_type const &x){
5619  *(swig::getpos(self,i)) = x;
5620  }
5621 SWIGINTERN void std_vector_Sl_std_string_Sg__append(std::vector< std::string > *self,std::vector< std::string >::value_type const &x){
5622  self->push_back(x);
5623  }
5624 SWIGINTERN std::vector< std::string >::iterator std_vector_Sl_std_string_Sg__erase__SWIG_0(std::vector< std::string > *self,std::vector< std::string >::iterator pos){ return self->erase(pos); }
5625 SWIGINTERN std::vector< std::string >::iterator std_vector_Sl_std_string_Sg__erase__SWIG_1(std::vector< std::string > *self,std::vector< std::string >::iterator first,std::vector< std::string >::iterator last){ return self->erase(first, last); }
5626 SWIGINTERN std::vector< std::string >::iterator std_vector_Sl_std_string_Sg__insert__SWIG_0(std::vector< std::string > *self,std::vector< std::string >::iterator pos,std::vector< std::string >::value_type const &x){ return self->insert(pos, x); }
5627 SWIGINTERN void std_vector_Sl_std_string_Sg__insert__SWIG_1(std::vector< std::string > *self,std::vector< std::string >::iterator pos,std::vector< std::string >::size_type n,std::vector< std::string >::value_type const &x){ self->insert(pos, n, x); }
5628 
5629 #include <limits.h>
5630 #if !defined(SWIG_NO_LLONG_MAX)
5631 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
5632 # define LLONG_MAX __LONG_LONG_MAX__
5633 # define LLONG_MIN (-LLONG_MAX - 1LL)
5634 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
5635 # endif
5636 #endif
5637 
5638 
5639 SWIGINTERN int
5640 SWIG_AsVal_int (PyObject * obj, int *val)
5641 {
5642  long v;
5643  int res = SWIG_AsVal_long (obj, &v);
5644  if (SWIG_IsOK(res)) {
5645  if ((v < INT_MIN || v > INT_MAX)) {
5646  return SWIG_OverflowError;
5647  } else {
5648  if (val) *val = static_cast< int >(v);
5649  }
5650  }
5651  return res;
5652 }
5653 
5654 
5655 namespace swig {
5656  template <> struct traits<int > {
5657  typedef value_category category;
5658  static const char* type_name() { return"int"; }
5659  };
5660  template <> struct traits_asval<int > {
5661  typedef int value_type;
5662  static int asval(PyObject *obj, value_type *val) {
5663  return SWIG_AsVal_int (obj, val);
5664  }
5665  };
5666  template <> struct traits_from<int > {
5667  typedef int value_type;
5668  static PyObject *from(const value_type& val) {
5669  return SWIG_From_int (val);
5670  }
5671  };
5672 }
5673 
5674 
5675  namespace swig {
5676  template <> struct traits<std::vector<int, std::allocator< int > > > {
5677  typedef pointer_category category;
5678  static const char* type_name() {
5679  return "std::vector<" "int" "," "std::allocator< int >" " >";
5680  }
5681  };
5682  }
5683 
5684 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_int_Sg__iterator(std::vector< int > *self,PyObject **PYTHON_SELF){
5685  return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
5686  }
5687 SWIGINTERN bool std_vector_Sl_int_Sg____nonzero__(std::vector< int > const *self){
5688  return !(self->empty());
5689  }
5690 SWIGINTERN bool std_vector_Sl_int_Sg____bool__(std::vector< int > const *self){
5691  return !(self->empty());
5692  }
5693 SWIGINTERN std::vector< int >::size_type std_vector_Sl_int_Sg____len__(std::vector< int > const *self){
5694  return self->size();
5695  }
5696 SWIGINTERN std::vector< int >::value_type std_vector_Sl_int_Sg__pop(std::vector< int > *self){
5697  if (self->size() == 0)
5698  throw std::out_of_range("pop from empty container");
5699  std::vector<int,std::allocator< int > >::value_type x = self->back();
5700  self->pop_back();
5701  return x;
5702  }
5703 SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){
5704  return swig::getslice(self, i, j, 1);
5705  }
5706 SWIGINTERN void std_vector_Sl_int_Sg____setslice____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j,std::vector< int,std::allocator< int > > const &v=std::vector< int,std::allocator< int > >()){
5707  swig::setslice(self, i, j, 1, v);
5708  }
5709 SWIGINTERN void std_vector_Sl_int_Sg____delslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){
5710  swig::delslice(self, i, j, 1);
5711  }
5712 SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i){
5713  self->erase(swig::getpos(self,i));
5714  }
5715 SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getitem____SWIG_0(std::vector< int > *self,PySliceObject *slice){
5716  Py_ssize_t i, j, step;
5717  if( !PySlice_Check(slice) ) {
5718  SWIG_Error(SWIG_TypeError, "Slice object expected.");
5719  return NULL;
5720  }
5721  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5722  std::vector<int,std::allocator< int > >::difference_type id = i;
5723  std::vector<int,std::allocator< int > >::difference_type jd = j;
5724  return swig::getslice(self, id, jd, step);
5725  }
5726 SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_0(std::vector< int > *self,PySliceObject *slice,std::vector< int,std::allocator< int > > const &v){
5727  Py_ssize_t i, j, step;
5728  if( !PySlice_Check(slice) ) {
5729  SWIG_Error(SWIG_TypeError, "Slice object expected.");
5730  return;
5731  }
5732  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5733  std::vector<int,std::allocator< int > >::difference_type id = i;
5734  std::vector<int,std::allocator< int > >::difference_type jd = j;
5735  swig::setslice(self, id, jd, step, v);
5736  }
5737 SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){
5738  Py_ssize_t i, j, step;
5739  if( !PySlice_Check(slice) ) {
5740  SWIG_Error(SWIG_TypeError, "Slice object expected.");
5741  return;
5742  }
5743  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5744  std::vector<int,std::allocator< int > >::difference_type id = i;
5745  std::vector<int,std::allocator< int > >::difference_type jd = j;
5746  swig::delslice(self, id, jd, step);
5747  }
5748 SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){
5749  Py_ssize_t i, j, step;
5750  if( !PySlice_Check(slice) ) {
5751  SWIG_Error(SWIG_TypeError, "Slice object expected.");
5752  return;
5753  }
5754  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5755  std::vector<int,std::allocator< int > >::difference_type id = i;
5756  std::vector<int,std::allocator< int > >::difference_type jd = j;
5757  swig::delslice(self, id, jd, step);
5758  }
5759 SWIGINTERN std::vector< int >::value_type const &std_vector_Sl_int_Sg____getitem____SWIG_1(std::vector< int > const *self,std::vector< int >::difference_type i){
5760  return *(swig::cgetpos(self, i));
5761  }
5762 SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_2(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::value_type const &x){
5763  *(swig::getpos(self,i)) = x;
5764  }
5765 SWIGINTERN void std_vector_Sl_int_Sg__append(std::vector< int > *self,std::vector< int >::value_type const &x){
5766  self->push_back(x);
5767  }
5768 SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__erase__SWIG_0(std::vector< int > *self,std::vector< int >::iterator pos){ return self->erase(pos); }
5769 SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__erase__SWIG_1(std::vector< int > *self,std::vector< int >::iterator first,std::vector< int >::iterator last){ return self->erase(first, last); }
5770 SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__insert__SWIG_0(std::vector< int > *self,std::vector< int >::iterator pos,std::vector< int >::value_type const &x){ return self->insert(pos, x); }
5771 SWIGINTERN void std_vector_Sl_int_Sg__insert__SWIG_1(std::vector< int > *self,std::vector< int >::iterator pos,std::vector< int >::size_type n,std::vector< int >::value_type const &x){ self->insert(pos, n, x); }
5772 
5773 namespace swig {
5774  template <> struct traits<long > {
5775  typedef value_category category;
5776  static const char* type_name() { return"long"; }
5777  };
5778  template <> struct traits_asval<long > {
5779  typedef long value_type;
5780  static int asval(PyObject *obj, value_type *val) {
5781  return SWIG_AsVal_long (obj, val);
5782  }
5783  };
5784  template <> struct traits_from<long > {
5785  typedef long value_type;
5786  static PyObject *from(const value_type& val) {
5787  return SWIG_From_long (val);
5788  }
5789  };
5790 }
5791 
5792 
5793  namespace swig {
5794  template <> struct traits<std::vector<long, std::allocator< long > > > {
5795  typedef pointer_category category;
5796  static const char* type_name() {
5797  return "std::vector<" "long" "," "std::allocator< long >" " >";
5798  }
5799  };
5800  }
5801 
5802 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_long_Sg__iterator(std::vector< long > *self,PyObject **PYTHON_SELF){
5803  return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
5804  }
5805 SWIGINTERN bool std_vector_Sl_long_Sg____nonzero__(std::vector< long > const *self){
5806  return !(self->empty());
5807  }
5808 SWIGINTERN bool std_vector_Sl_long_Sg____bool__(std::vector< long > const *self){
5809  return !(self->empty());
5810  }
5811 SWIGINTERN std::vector< long >::size_type std_vector_Sl_long_Sg____len__(std::vector< long > const *self){
5812  return self->size();
5813  }
5814 SWIGINTERN std::vector< long >::value_type std_vector_Sl_long_Sg__pop(std::vector< long > *self){
5815  if (self->size() == 0)
5816  throw std::out_of_range("pop from empty container");
5817  std::vector<long,std::allocator< long > >::value_type x = self->back();
5818  self->pop_back();
5819  return x;
5820  }
5821 SWIGINTERN std::vector< long,std::allocator< long > > *std_vector_Sl_long_Sg____getslice__(std::vector< long > *self,std::vector< long >::difference_type i,std::vector< long >::difference_type j){
5822  return swig::getslice(self, i, j, 1);
5823  }
5824 SWIGINTERN void std_vector_Sl_long_Sg____setslice____SWIG_0(std::vector< long > *self,std::vector< long >::difference_type i,std::vector< long >::difference_type j,std::vector< long,std::allocator< long > > const &v=std::vector< long,std::allocator< long > >()){
5825  swig::setslice(self, i, j, 1, v);
5826  }
5827 SWIGINTERN void std_vector_Sl_long_Sg____delslice__(std::vector< long > *self,std::vector< long >::difference_type i,std::vector< long >::difference_type j){
5828  swig::delslice(self, i, j, 1);
5829  }
5830 SWIGINTERN void std_vector_Sl_long_Sg____delitem____SWIG_0(std::vector< long > *self,std::vector< long >::difference_type i){
5831  self->erase(swig::getpos(self,i));
5832  }
5833 SWIGINTERN std::vector< long,std::allocator< long > > *std_vector_Sl_long_Sg____getitem____SWIG_0(std::vector< long > *self,PySliceObject *slice){
5834  Py_ssize_t i, j, step;
5835  if( !PySlice_Check(slice) ) {
5836  SWIG_Error(SWIG_TypeError, "Slice object expected.");
5837  return NULL;
5838  }
5839  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5840  std::vector<long,std::allocator< long > >::difference_type id = i;
5841  std::vector<long,std::allocator< long > >::difference_type jd = j;
5842  return swig::getslice(self, id, jd, step);
5843  }
5844 SWIGINTERN void std_vector_Sl_long_Sg____setitem____SWIG_0(std::vector< long > *self,PySliceObject *slice,std::vector< long,std::allocator< long > > const &v){
5845  Py_ssize_t i, j, step;
5846  if( !PySlice_Check(slice) ) {
5847  SWIG_Error(SWIG_TypeError, "Slice object expected.");
5848  return;
5849  }
5850  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5851  std::vector<long,std::allocator< long > >::difference_type id = i;
5852  std::vector<long,std::allocator< long > >::difference_type jd = j;
5853  swig::setslice(self, id, jd, step, v);
5854  }
5855 SWIGINTERN void std_vector_Sl_long_Sg____setitem____SWIG_1(std::vector< long > *self,PySliceObject *slice){
5856  Py_ssize_t i, j, step;
5857  if( !PySlice_Check(slice) ) {
5858  SWIG_Error(SWIG_TypeError, "Slice object expected.");
5859  return;
5860  }
5861  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5862  std::vector<long,std::allocator< long > >::difference_type id = i;
5863  std::vector<long,std::allocator< long > >::difference_type jd = j;
5864  swig::delslice(self, id, jd, step);
5865  }
5866 SWIGINTERN void std_vector_Sl_long_Sg____delitem____SWIG_1(std::vector< long > *self,PySliceObject *slice){
5867  Py_ssize_t i, j, step;
5868  if( !PySlice_Check(slice) ) {
5869  SWIG_Error(SWIG_TypeError, "Slice object expected.");
5870  return;
5871  }
5872  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5873  std::vector<long,std::allocator< long > >::difference_type id = i;
5874  std::vector<long,std::allocator< long > >::difference_type jd = j;
5875  swig::delslice(self, id, jd, step);
5876  }
5877 SWIGINTERN std::vector< long >::value_type const &std_vector_Sl_long_Sg____getitem____SWIG_1(std::vector< long > const *self,std::vector< long >::difference_type i){
5878  return *(swig::cgetpos(self, i));
5879  }
5880 SWIGINTERN void std_vector_Sl_long_Sg____setitem____SWIG_2(std::vector< long > *self,std::vector< long >::difference_type i,std::vector< long >::value_type const &x){
5881  *(swig::getpos(self,i)) = x;
5882  }
5883 SWIGINTERN void std_vector_Sl_long_Sg__append(std::vector< long > *self,std::vector< long >::value_type const &x){
5884  self->push_back(x);
5885  }
5886 SWIGINTERN std::vector< long >::iterator std_vector_Sl_long_Sg__erase__SWIG_0(std::vector< long > *self,std::vector< long >::iterator pos){ return self->erase(pos); }
5887 SWIGINTERN std::vector< long >::iterator std_vector_Sl_long_Sg__erase__SWIG_1(std::vector< long > *self,std::vector< long >::iterator first,std::vector< long >::iterator last){ return self->erase(first, last); }
5888 SWIGINTERN std::vector< long >::iterator std_vector_Sl_long_Sg__insert__SWIG_0(std::vector< long > *self,std::vector< long >::iterator pos,std::vector< long >::value_type const &x){ return self->insert(pos, x); }
5889 SWIGINTERN void std_vector_Sl_long_Sg__insert__SWIG_1(std::vector< long > *self,std::vector< long >::iterator pos,std::vector< long >::size_type n,std::vector< long >::value_type const &x){ self->insert(pos, n, x); }
5890 
5891 /* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */
5892 #ifndef SWIG_isfinite
5893 # if defined(isfinite)
5894 # define SWIG_isfinite(X) (isfinite(X))
5895 # elif defined(_MSC_VER)
5896 # define SWIG_isfinite(X) (_finite(X))
5897 # elif defined(__sun) && defined(__SVR4)
5898 # include <ieeefp.h>
5899 # define SWIG_isfinite(X) (finite(X))
5900 # endif
5901 #endif
5902 
5903 
5904 /* Accept infinite as a valid float value unless we are unable to check if a value is finite */
5905 #ifdef SWIG_isfinite
5906 # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX) && SWIG_isfinite(X))
5907 #else
5908 # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX))
5909 #endif
5910 
5911 
5912 SWIGINTERN int
5913 SWIG_AsVal_float (PyObject * obj, float *val)
5914 {
5915  double v;
5916  int res = SWIG_AsVal_double (obj, &v);
5917  if (SWIG_IsOK(res)) {
5918  if (SWIG_Float_Overflow_Check(v)) {
5919  return SWIG_OverflowError;
5920  } else {
5921  if (val) *val = static_cast< float >(v);
5922  }
5923  }
5924  return res;
5925 }
5926 
5927 
5928  #define SWIG_From_double PyFloat_FromDouble
5929 
5930 
5931 SWIGINTERNINLINE PyObject *
5932 SWIG_From_float (float value)
5933 {
5934  return SWIG_From_double (value);
5935 }
5936 
5937 
5938 namespace swig {
5939  template <> struct traits<float > {
5940  typedef value_category category;
5941  static const char* type_name() { return"float"; }
5942  };
5943  template <> struct traits_asval<float > {
5944  typedef float value_type;
5945  static int asval(PyObject *obj, value_type *val) {
5946  return SWIG_AsVal_float (obj, val);
5947  }
5948  };
5949  template <> struct traits_from<float > {
5950  typedef float value_type;
5951  static PyObject *from(const value_type& val) {
5952  return SWIG_From_float (val);
5953  }
5954  };
5955 }
5956 
5957 
5958  namespace swig {
5959  template <> struct traits<std::vector<float, std::allocator< float > > > {
5960  typedef pointer_category category;
5961  static const char* type_name() {
5962  return "std::vector<" "float" "," "std::allocator< float >" " >";
5963  }
5964  };
5965  }
5966 
5967 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_float_Sg__iterator(std::vector< float > *self,PyObject **PYTHON_SELF){
5968  return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
5969  }
5970 SWIGINTERN bool std_vector_Sl_float_Sg____nonzero__(std::vector< float > const *self){
5971  return !(self->empty());
5972  }
5973 SWIGINTERN bool std_vector_Sl_float_Sg____bool__(std::vector< float > const *self){
5974  return !(self->empty());
5975  }
5976 SWIGINTERN std::vector< float >::size_type std_vector_Sl_float_Sg____len__(std::vector< float > const *self){
5977  return self->size();
5978  }
5979 SWIGINTERN std::vector< float >::value_type std_vector_Sl_float_Sg__pop(std::vector< float > *self){
5980  if (self->size() == 0)
5981  throw std::out_of_range("pop from empty container");
5982  std::vector<float,std::allocator< float > >::value_type x = self->back();
5983  self->pop_back();
5984  return x;
5985  }
5986 SWIGINTERN std::vector< float,std::allocator< float > > *std_vector_Sl_float_Sg____getslice__(std::vector< float > *self,std::vector< float >::difference_type i,std::vector< float >::difference_type j){
5987  return swig::getslice(self, i, j, 1);
5988  }
5989 SWIGINTERN void std_vector_Sl_float_Sg____setslice____SWIG_0(std::vector< float > *self,std::vector< float >::difference_type i,std::vector< float >::difference_type j,std::vector< float,std::allocator< float > > const &v=std::vector< float,std::allocator< float > >()){
5990  swig::setslice(self, i, j, 1, v);
5991  }
5992 SWIGINTERN void std_vector_Sl_float_Sg____delslice__(std::vector< float > *self,std::vector< float >::difference_type i,std::vector< float >::difference_type j){
5993  swig::delslice(self, i, j, 1);
5994  }
5995 SWIGINTERN void std_vector_Sl_float_Sg____delitem____SWIG_0(std::vector< float > *self,std::vector< float >::difference_type i){
5996  self->erase(swig::getpos(self,i));
5997  }
5998 SWIGINTERN std::vector< float,std::allocator< float > > *std_vector_Sl_float_Sg____getitem____SWIG_0(std::vector< float > *self,PySliceObject *slice){
5999  Py_ssize_t i, j, step;
6000  if( !PySlice_Check(slice) ) {
6001  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6002  return NULL;
6003  }
6004  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6005  std::vector<float,std::allocator< float > >::difference_type id = i;
6006  std::vector<float,std::allocator< float > >::difference_type jd = j;
6007  return swig::getslice(self, id, jd, step);
6008  }
6009 SWIGINTERN void std_vector_Sl_float_Sg____setitem____SWIG_0(std::vector< float > *self,PySliceObject *slice,std::vector< float,std::allocator< float > > const &v){
6010  Py_ssize_t i, j, step;
6011  if( !PySlice_Check(slice) ) {
6012  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6013  return;
6014  }
6015  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6016  std::vector<float,std::allocator< float > >::difference_type id = i;
6017  std::vector<float,std::allocator< float > >::difference_type jd = j;
6018  swig::setslice(self, id, jd, step, v);
6019  }
6020 SWIGINTERN void std_vector_Sl_float_Sg____setitem____SWIG_1(std::vector< float > *self,PySliceObject *slice){
6021  Py_ssize_t i, j, step;
6022  if( !PySlice_Check(slice) ) {
6023  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6024  return;
6025  }
6026  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6027  std::vector<float,std::allocator< float > >::difference_type id = i;
6028  std::vector<float,std::allocator< float > >::difference_type jd = j;
6029  swig::delslice(self, id, jd, step);
6030  }
6031 SWIGINTERN void std_vector_Sl_float_Sg____delitem____SWIG_1(std::vector< float > *self,PySliceObject *slice){
6032  Py_ssize_t i, j, step;
6033  if( !PySlice_Check(slice) ) {
6034  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6035  return;
6036  }
6037  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6038  std::vector<float,std::allocator< float > >::difference_type id = i;
6039  std::vector<float,std::allocator< float > >::difference_type jd = j;
6040  swig::delslice(self, id, jd, step);
6041  }
6042 SWIGINTERN std::vector< float >::value_type const &std_vector_Sl_float_Sg____getitem____SWIG_1(std::vector< float > const *self,std::vector< float >::difference_type i){
6043  return *(swig::cgetpos(self, i));
6044  }
6045 SWIGINTERN void std_vector_Sl_float_Sg____setitem____SWIG_2(std::vector< float > *self,std::vector< float >::difference_type i,std::vector< float >::value_type const &x){
6046  *(swig::getpos(self,i)) = x;
6047  }
6048 SWIGINTERN void std_vector_Sl_float_Sg__append(std::vector< float > *self,std::vector< float >::value_type const &x){
6049  self->push_back(x);
6050  }
6051 SWIGINTERN std::vector< float >::iterator std_vector_Sl_float_Sg__erase__SWIG_0(std::vector< float > *self,std::vector< float >::iterator pos){ return self->erase(pos); }
6052 SWIGINTERN std::vector< float >::iterator std_vector_Sl_float_Sg__erase__SWIG_1(std::vector< float > *self,std::vector< float >::iterator first,std::vector< float >::iterator last){ return self->erase(first, last); }
6053 SWIGINTERN std::vector< float >::iterator std_vector_Sl_float_Sg__insert__SWIG_0(std::vector< float > *self,std::vector< float >::iterator pos,std::vector< float >::value_type const &x){ return self->insert(pos, x); }
6054 SWIGINTERN void std_vector_Sl_float_Sg__insert__SWIG_1(std::vector< float > *self,std::vector< float >::iterator pos,std::vector< float >::size_type n,std::vector< float >::value_type const &x){ self->insert(pos, n, x); }
6055 
6056 namespace swig {
6057  template <> struct traits<double > {
6058  typedef value_category category;
6059  static const char* type_name() { return"double"; }
6060  };
6061  template <> struct traits_asval<double > {
6062  typedef double value_type;
6063  static int asval(PyObject *obj, value_type *val) {
6064  return SWIG_AsVal_double (obj, val);
6065  }
6066  };
6067  template <> struct traits_from<double > {
6068  typedef double value_type;
6069  static PyObject *from(const value_type& val) {
6070  return SWIG_From_double (val);
6071  }
6072  };
6073 }
6074 
6075 
6076  namespace swig {
6077  template <> struct traits<std::vector<double, std::allocator< double > > > {
6078  typedef pointer_category category;
6079  static const char* type_name() {
6080  return "std::vector<" "double" "," "std::allocator< double >" " >";
6081  }
6082  };
6083  }
6084 
6085 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_double_Sg__iterator(std::vector< double > *self,PyObject **PYTHON_SELF){
6086  return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
6087  }
6088 SWIGINTERN bool std_vector_Sl_double_Sg____nonzero__(std::vector< double > const *self){
6089  return !(self->empty());
6090  }
6091 SWIGINTERN bool std_vector_Sl_double_Sg____bool__(std::vector< double > const *self){
6092  return !(self->empty());
6093  }
6094 SWIGINTERN std::vector< double >::size_type std_vector_Sl_double_Sg____len__(std::vector< double > const *self){
6095  return self->size();
6096  }
6097 SWIGINTERN std::vector< double >::value_type std_vector_Sl_double_Sg__pop(std::vector< double > *self){
6098  if (self->size() == 0)
6099  throw std::out_of_range("pop from empty container");
6100  std::vector<double,std::allocator< double > >::value_type x = self->back();
6101  self->pop_back();
6102  return x;
6103  }
6104 SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getslice__(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){
6105  return swig::getslice(self, i, j, 1);
6106  }
6107 SWIGINTERN void std_vector_Sl_double_Sg____setslice____SWIG_0(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j,std::vector< double,std::allocator< double > > const &v=std::vector< double,std::allocator< double > >()){
6108  swig::setslice(self, i, j, 1, v);
6109  }
6110 SWIGINTERN void std_vector_Sl_double_Sg____delslice__(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){
6111  swig::delslice(self, i, j, 1);
6112  }
6113 SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_0(std::vector< double > *self,std::vector< double >::difference_type i){
6114  self->erase(swig::getpos(self,i));
6115  }
6116 SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getitem____SWIG_0(std::vector< double > *self,PySliceObject *slice){
6117  Py_ssize_t i, j, step;
6118  if( !PySlice_Check(slice) ) {
6119  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6120  return NULL;
6121  }
6122  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6123  std::vector<double,std::allocator< double > >::difference_type id = i;
6124  std::vector<double,std::allocator< double > >::difference_type jd = j;
6125  return swig::getslice(self, id, jd, step);
6126  }
6127 SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_0(std::vector< double > *self,PySliceObject *slice,std::vector< double,std::allocator< double > > const &v){
6128  Py_ssize_t i, j, step;
6129  if( !PySlice_Check(slice) ) {
6130  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6131  return;
6132  }
6133  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6134  std::vector<double,std::allocator< double > >::difference_type id = i;
6135  std::vector<double,std::allocator< double > >::difference_type jd = j;
6136  swig::setslice(self, id, jd, step, v);
6137  }
6138 SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){
6139  Py_ssize_t i, j, step;
6140  if( !PySlice_Check(slice) ) {
6141  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6142  return;
6143  }
6144  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6145  std::vector<double,std::allocator< double > >::difference_type id = i;
6146  std::vector<double,std::allocator< double > >::difference_type jd = j;
6147  swig::delslice(self, id, jd, step);
6148  }
6149 SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){
6150  Py_ssize_t i, j, step;
6151  if( !PySlice_Check(slice) ) {
6152  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6153  return;
6154  }
6155  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6156  std::vector<double,std::allocator< double > >::difference_type id = i;
6157  std::vector<double,std::allocator< double > >::difference_type jd = j;
6158  swig::delslice(self, id, jd, step);
6159  }
6160 SWIGINTERN std::vector< double >::value_type const &std_vector_Sl_double_Sg____getitem____SWIG_1(std::vector< double > const *self,std::vector< double >::difference_type i){
6161  return *(swig::cgetpos(self, i));
6162  }
6163 SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_2(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::value_type const &x){
6164  *(swig::getpos(self,i)) = x;
6165  }
6166 SWIGINTERN void std_vector_Sl_double_Sg__append(std::vector< double > *self,std::vector< double >::value_type const &x){
6167  self->push_back(x);
6168  }
6169 SWIGINTERN std::vector< double >::iterator std_vector_Sl_double_Sg__erase__SWIG_0(std::vector< double > *self,std::vector< double >::iterator pos){ return self->erase(pos); }
6170 SWIGINTERN std::vector< double >::iterator std_vector_Sl_double_Sg__erase__SWIG_1(std::vector< double > *self,std::vector< double >::iterator first,std::vector< double >::iterator last){ return self->erase(first, last); }
6171 SWIGINTERN std::vector< double >::iterator std_vector_Sl_double_Sg__insert__SWIG_0(std::vector< double > *self,std::vector< double >::iterator pos,std::vector< double >::value_type const &x){ return self->insert(pos, x); }
6172 SWIGINTERN void std_vector_Sl_double_Sg__insert__SWIG_1(std::vector< double > *self,std::vector< double >::iterator pos,std::vector< double >::size_type n,std::vector< double >::value_type const &x){ self->insert(pos, n, x); }
6173 
6174  namespace swig {
6175  template <> struct traits<ActivatedItem > {
6176  typedef pointer_category category;
6177  static const char* type_name() { return"ActivatedItem"; }
6178  };
6179  }
6180 
6181 
6182  namespace swig {
6183  template <> struct traits<std::vector<ActivatedItem*, std::allocator< ActivatedItem * > > > {
6184  typedef value_category category;
6185  static const char* type_name() {
6186  return "std::vector<" "ActivatedItem" " *," "std::allocator< ActivatedItem * >" " >";
6187  }
6188  };
6189  }
6190 
6191 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_ActivatedItem_Sm__Sg__iterator(std::vector< ActivatedItem * > *self,PyObject **PYTHON_SELF){
6192  return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
6193  }
6194 SWIGINTERN bool std_vector_Sl_ActivatedItem_Sm__Sg____nonzero__(std::vector< ActivatedItem * > const *self){
6195  return !(self->empty());
6196  }
6197 SWIGINTERN bool std_vector_Sl_ActivatedItem_Sm__Sg____bool__(std::vector< ActivatedItem * > const *self){
6198  return !(self->empty());
6199  }
6200 SWIGINTERN std::vector< ActivatedItem * >::size_type std_vector_Sl_ActivatedItem_Sm__Sg____len__(std::vector< ActivatedItem * > const *self){
6201  return self->size();
6202  }
6203 SWIGINTERN std::vector< ActivatedItem * >::value_type std_vector_Sl_ActivatedItem_Sm__Sg__pop(std::vector< ActivatedItem * > *self){
6204  if (self->size() == 0)
6205  throw std::out_of_range("pop from empty container");
6206  std::vector<ActivatedItem*,std::allocator< ActivatedItem * > >::value_type x = self->back();
6207  self->pop_back();
6208  return x;
6209  }
6210 SWIGINTERN std::vector< ActivatedItem *,std::allocator< ActivatedItem * > > *std_vector_Sl_ActivatedItem_Sm__Sg____getslice__(std::vector< ActivatedItem * > *self,std::vector< ActivatedItem * >::difference_type i,std::vector< ActivatedItem * >::difference_type j){
6211  return swig::getslice(self, i, j, 1);
6212  }
6213 SWIGINTERN void std_vector_Sl_ActivatedItem_Sm__Sg____setslice____SWIG_0(std::vector< ActivatedItem * > *self,std::vector< ActivatedItem * >::difference_type i,std::vector< ActivatedItem * >::difference_type j,std::vector< ActivatedItem *,std::allocator< ActivatedItem * > > const &v=std::vector< ActivatedItem *,std::allocator< ActivatedItem * > >()){
6214  swig::setslice(self, i, j, 1, v);
6215  }
6216 SWIGINTERN void std_vector_Sl_ActivatedItem_Sm__Sg____delslice__(std::vector< ActivatedItem * > *self,std::vector< ActivatedItem * >::difference_type i,std::vector< ActivatedItem * >::difference_type j){
6217  swig::delslice(self, i, j, 1);
6218  }
6219 SWIGINTERN void std_vector_Sl_ActivatedItem_Sm__Sg____delitem____SWIG_0(std::vector< ActivatedItem * > *self,std::vector< ActivatedItem * >::difference_type i){
6220  self->erase(swig::getpos(self,i));
6221  }
6222 SWIGINTERN std::vector< ActivatedItem *,std::allocator< ActivatedItem * > > *std_vector_Sl_ActivatedItem_Sm__Sg____getitem____SWIG_0(std::vector< ActivatedItem * > *self,PySliceObject *slice){
6223  Py_ssize_t i, j, step;
6224  if( !PySlice_Check(slice) ) {
6225  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6226  return NULL;
6227  }
6228  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6229  std::vector<ActivatedItem*,std::allocator< ActivatedItem * > >::difference_type id = i;
6230  std::vector<ActivatedItem*,std::allocator< ActivatedItem * > >::difference_type jd = j;
6231  return swig::getslice(self, id, jd, step);
6232  }
6233 SWIGINTERN void std_vector_Sl_ActivatedItem_Sm__Sg____setitem____SWIG_0(std::vector< ActivatedItem * > *self,PySliceObject *slice,std::vector< ActivatedItem *,std::allocator< ActivatedItem * > > const &v){
6234  Py_ssize_t i, j, step;
6235  if( !PySlice_Check(slice) ) {
6236  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6237  return;
6238  }
6239  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6240  std::vector<ActivatedItem*,std::allocator< ActivatedItem * > >::difference_type id = i;
6241  std::vector<ActivatedItem*,std::allocator< ActivatedItem * > >::difference_type jd = j;
6242  swig::setslice(self, id, jd, step, v);
6243  }
6244 SWIGINTERN void std_vector_Sl_ActivatedItem_Sm__Sg____setitem____SWIG_1(std::vector< ActivatedItem * > *self,PySliceObject *slice){
6245  Py_ssize_t i, j, step;
6246  if( !PySlice_Check(slice) ) {
6247  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6248  return;
6249  }
6250  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6251  std::vector<ActivatedItem*,std::allocator< ActivatedItem * > >::difference_type id = i;
6252  std::vector<ActivatedItem*,std::allocator< ActivatedItem * > >::difference_type jd = j;
6253  swig::delslice(self, id, jd, step);
6254  }
6255 SWIGINTERN void std_vector_Sl_ActivatedItem_Sm__Sg____delitem____SWIG_1(std::vector< ActivatedItem * > *self,PySliceObject *slice){
6256  Py_ssize_t i, j, step;
6257  if( !PySlice_Check(slice) ) {
6258  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6259  return;
6260  }
6261  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6262  std::vector<ActivatedItem*,std::allocator< ActivatedItem * > >::difference_type id = i;
6263  std::vector<ActivatedItem*,std::allocator< ActivatedItem * > >::difference_type jd = j;
6264  swig::delslice(self, id, jd, step);
6265  }
6266 SWIGINTERN std::vector< ActivatedItem * >::value_type std_vector_Sl_ActivatedItem_Sm__Sg____getitem____SWIG_1(std::vector< ActivatedItem * > *self,std::vector< ActivatedItem * >::difference_type i){
6267  return *(swig::cgetpos(self, i));
6268  }
6269 SWIGINTERN void std_vector_Sl_ActivatedItem_Sm__Sg____setitem____SWIG_2(std::vector< ActivatedItem * > *self,std::vector< ActivatedItem * >::difference_type i,std::vector< ActivatedItem * >::value_type x){
6270  *(swig::getpos(self,i)) = x;
6271  }
6272 SWIGINTERN void std_vector_Sl_ActivatedItem_Sm__Sg__append(std::vector< ActivatedItem * > *self,std::vector< ActivatedItem * >::value_type x){
6273  self->push_back(x);
6274  }
6275 SWIGINTERN std::vector< ActivatedItem * >::iterator std_vector_Sl_ActivatedItem_Sm__Sg__erase__SWIG_0(std::vector< ActivatedItem * > *self,std::vector< ActivatedItem * >::iterator pos){ return self->erase(pos); }
6276 SWIGINTERN std::vector< ActivatedItem * >::iterator std_vector_Sl_ActivatedItem_Sm__Sg__erase__SWIG_1(std::vector< ActivatedItem * > *self,std::vector< ActivatedItem * >::iterator first,std::vector< ActivatedItem * >::iterator last){ return self->erase(first, last); }
6277 SWIGINTERN std::vector< ActivatedItem * >::iterator std_vector_Sl_ActivatedItem_Sm__Sg__insert__SWIG_0(std::vector< ActivatedItem * > *self,std::vector< ActivatedItem * >::iterator pos,std::vector< ActivatedItem * >::value_type x){ return self->insert(pos, x); }
6278 SWIGINTERN void std_vector_Sl_ActivatedItem_Sm__Sg__insert__SWIG_1(std::vector< ActivatedItem * > *self,std::vector< ActivatedItem * >::iterator pos,std::vector< ActivatedItem * >::size_type n,std::vector< ActivatedItem * >::value_type x){ self->insert(pos, n, x); }
6279 
6280  namespace swig {
6281  template <> struct traits<Adapter > {
6282  typedef pointer_category category;
6283  static const char* type_name() { return"Adapter"; }
6284  };
6285  }
6286 
6287 
6288  namespace swig {
6289  template <> struct traits<std::vector<Adapter*, std::allocator< Adapter * > > > {
6290  typedef value_category category;
6291  static const char* type_name() {
6292  return "std::vector<" "Adapter" " *," "std::allocator< Adapter * >" " >";
6293  }
6294  };
6295  }
6296 
6297 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_Adapter_Sm__Sg__iterator(std::vector< Adapter * > *self,PyObject **PYTHON_SELF){
6298  return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
6299  }
6300 SWIGINTERN bool std_vector_Sl_Adapter_Sm__Sg____nonzero__(std::vector< Adapter * > const *self){
6301  return !(self->empty());
6302  }
6303 SWIGINTERN bool std_vector_Sl_Adapter_Sm__Sg____bool__(std::vector< Adapter * > const *self){
6304  return !(self->empty());
6305  }
6306 SWIGINTERN std::vector< Adapter * >::size_type std_vector_Sl_Adapter_Sm__Sg____len__(std::vector< Adapter * > const *self){
6307  return self->size();
6308  }
6309 SWIGINTERN std::vector< Adapter * >::value_type std_vector_Sl_Adapter_Sm__Sg__pop(std::vector< Adapter * > *self){
6310  if (self->size() == 0)
6311  throw std::out_of_range("pop from empty container");
6312  std::vector<Adapter*,std::allocator< Adapter * > >::value_type x = self->back();
6313  self->pop_back();
6314  return x;
6315  }
6316 SWIGINTERN std::vector< Adapter *,std::allocator< Adapter * > > *std_vector_Sl_Adapter_Sm__Sg____getslice__(std::vector< Adapter * > *self,std::vector< Adapter * >::difference_type i,std::vector< Adapter * >::difference_type j){
6317  return swig::getslice(self, i, j, 1);
6318  }
6319 SWIGINTERN void std_vector_Sl_Adapter_Sm__Sg____setslice____SWIG_0(std::vector< Adapter * > *self,std::vector< Adapter * >::difference_type i,std::vector< Adapter * >::difference_type j,std::vector< Adapter *,std::allocator< Adapter * > > const &v=std::vector< Adapter *,std::allocator< Adapter * > >()){
6320  swig::setslice(self, i, j, 1, v);
6321  }
6322 SWIGINTERN void std_vector_Sl_Adapter_Sm__Sg____delslice__(std::vector< Adapter * > *self,std::vector< Adapter * >::difference_type i,std::vector< Adapter * >::difference_type j){
6323  swig::delslice(self, i, j, 1);
6324  }
6325 SWIGINTERN void std_vector_Sl_Adapter_Sm__Sg____delitem____SWIG_0(std::vector< Adapter * > *self,std::vector< Adapter * >::difference_type i){
6326  self->erase(swig::getpos(self,i));
6327  }
6328 SWIGINTERN std::vector< Adapter *,std::allocator< Adapter * > > *std_vector_Sl_Adapter_Sm__Sg____getitem____SWIG_0(std::vector< Adapter * > *self,PySliceObject *slice){
6329  Py_ssize_t i, j, step;
6330  if( !PySlice_Check(slice) ) {
6331  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6332  return NULL;
6333  }
6334  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6335  std::vector<Adapter*,std::allocator< Adapter * > >::difference_type id = i;
6336  std::vector<Adapter*,std::allocator< Adapter * > >::difference_type jd = j;
6337  return swig::getslice(self, id, jd, step);
6338  }
6339 SWIGINTERN void std_vector_Sl_Adapter_Sm__Sg____setitem____SWIG_0(std::vector< Adapter * > *self,PySliceObject *slice,std::vector< Adapter *,std::allocator< Adapter * > > const &v){
6340  Py_ssize_t i, j, step;
6341  if( !PySlice_Check(slice) ) {
6342  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6343  return;
6344  }
6345  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6346  std::vector<Adapter*,std::allocator< Adapter * > >::difference_type id = i;
6347  std::vector<Adapter*,std::allocator< Adapter * > >::difference_type jd = j;
6348  swig::setslice(self, id, jd, step, v);
6349  }
6350 SWIGINTERN void std_vector_Sl_Adapter_Sm__Sg____setitem____SWIG_1(std::vector< Adapter * > *self,PySliceObject *slice){
6351  Py_ssize_t i, j, step;
6352  if( !PySlice_Check(slice) ) {
6353  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6354  return;
6355  }
6356  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6357  std::vector<Adapter*,std::allocator< Adapter * > >::difference_type id = i;
6358  std::vector<Adapter*,std::allocator< Adapter * > >::difference_type jd = j;
6359  swig::delslice(self, id, jd, step);
6360  }
6361 SWIGINTERN void std_vector_Sl_Adapter_Sm__Sg____delitem____SWIG_1(std::vector< Adapter * > *self,PySliceObject *slice){
6362  Py_ssize_t i, j, step;
6363  if( !PySlice_Check(slice) ) {
6364  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6365  return;
6366  }
6367  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6368  std::vector<Adapter*,std::allocator< Adapter * > >::difference_type id = i;
6369  std::vector<Adapter*,std::allocator< Adapter * > >::difference_type jd = j;
6370  swig::delslice(self, id, jd, step);
6371  }
6372 SWIGINTERN std::vector< Adapter * >::value_type std_vector_Sl_Adapter_Sm__Sg____getitem____SWIG_1(std::vector< Adapter * > *self,std::vector< Adapter * >::difference_type i){
6373  return *(swig::cgetpos(self, i));
6374  }
6375 SWIGINTERN void std_vector_Sl_Adapter_Sm__Sg____setitem____SWIG_2(std::vector< Adapter * > *self,std::vector< Adapter * >::difference_type i,std::vector< Adapter * >::value_type x){
6376  *(swig::getpos(self,i)) = x;
6377  }
6378 SWIGINTERN void std_vector_Sl_Adapter_Sm__Sg__append(std::vector< Adapter * > *self,std::vector< Adapter * >::value_type x){
6379  self->push_back(x);
6380  }
6381 SWIGINTERN std::vector< Adapter * >::iterator std_vector_Sl_Adapter_Sm__Sg__erase__SWIG_0(std::vector< Adapter * > *self,std::vector< Adapter * >::iterator pos){ return self->erase(pos); }
6382 SWIGINTERN std::vector< Adapter * >::iterator std_vector_Sl_Adapter_Sm__Sg__erase__SWIG_1(std::vector< Adapter * > *self,std::vector< Adapter * >::iterator first,std::vector< Adapter * >::iterator last){ return self->erase(first, last); }
6383 SWIGINTERN std::vector< Adapter * >::iterator std_vector_Sl_Adapter_Sm__Sg__insert__SWIG_0(std::vector< Adapter * > *self,std::vector< Adapter * >::iterator pos,std::vector< Adapter * >::value_type x){ return self->insert(pos, x); }
6384 SWIGINTERN void std_vector_Sl_Adapter_Sm__Sg__insert__SWIG_1(std::vector< Adapter * > *self,std::vector< Adapter * >::iterator pos,std::vector< Adapter * >::size_type n,std::vector< Adapter * >::value_type x){ self->insert(pos, n, x); }
6385 
6386  namespace swig {
6387  template <> struct traits<Attachment > {
6388  typedef pointer_category category;
6389  static const char* type_name() { return"Attachment"; }
6390  };
6391  }
6392 
6393 
6394  namespace swig {
6395  template <> struct traits<std::vector<Attachment*, std::allocator< Attachment * > > > {
6396  typedef value_category category;
6397  static const char* type_name() {
6398  return "std::vector<" "Attachment" " *," "std::allocator< Attachment * >" " >";
6399  }
6400  };
6401  }
6402 
6403 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_Attachment_Sm__Sg__iterator(std::vector< Attachment * > *self,PyObject **PYTHON_SELF){
6404  return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
6405  }
6406 SWIGINTERN bool std_vector_Sl_Attachment_Sm__Sg____nonzero__(std::vector< Attachment * > const *self){
6407  return !(self->empty());
6408  }
6409 SWIGINTERN bool std_vector_Sl_Attachment_Sm__Sg____bool__(std::vector< Attachment * > const *self){
6410  return !(self->empty());
6411  }
6412 SWIGINTERN std::vector< Attachment * >::size_type std_vector_Sl_Attachment_Sm__Sg____len__(std::vector< Attachment * > const *self){
6413  return self->size();
6414  }
6415 SWIGINTERN std::vector< Attachment * >::value_type std_vector_Sl_Attachment_Sm__Sg__pop(std::vector< Attachment * > *self){
6416  if (self->size() == 0)
6417  throw std::out_of_range("pop from empty container");
6418  std::vector<Attachment*,std::allocator< Attachment * > >::value_type x = self->back();
6419  self->pop_back();
6420  return x;
6421  }
6422 SWIGINTERN std::vector< Attachment *,std::allocator< Attachment * > > *std_vector_Sl_Attachment_Sm__Sg____getslice__(std::vector< Attachment * > *self,std::vector< Attachment * >::difference_type i,std::vector< Attachment * >::difference_type j){
6423  return swig::getslice(self, i, j, 1);
6424  }
6425 SWIGINTERN void std_vector_Sl_Attachment_Sm__Sg____setslice____SWIG_0(std::vector< Attachment * > *self,std::vector< Attachment * >::difference_type i,std::vector< Attachment * >::difference_type j,std::vector< Attachment *,std::allocator< Attachment * > > const &v=std::vector< Attachment *,std::allocator< Attachment * > >()){
6426  swig::setslice(self, i, j, 1, v);
6427  }
6428 SWIGINTERN void std_vector_Sl_Attachment_Sm__Sg____delslice__(std::vector< Attachment * > *self,std::vector< Attachment * >::difference_type i,std::vector< Attachment * >::difference_type j){
6429  swig::delslice(self, i, j, 1);
6430  }
6431 SWIGINTERN void std_vector_Sl_Attachment_Sm__Sg____delitem____SWIG_0(std::vector< Attachment * > *self,std::vector< Attachment * >::difference_type i){
6432  self->erase(swig::getpos(self,i));
6433  }
6434 SWIGINTERN std::vector< Attachment *,std::allocator< Attachment * > > *std_vector_Sl_Attachment_Sm__Sg____getitem____SWIG_0(std::vector< Attachment * > *self,PySliceObject *slice){
6435  Py_ssize_t i, j, step;
6436  if( !PySlice_Check(slice) ) {
6437  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6438  return NULL;
6439  }
6440  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6441  std::vector<Attachment*,std::allocator< Attachment * > >::difference_type id = i;
6442  std::vector<Attachment*,std::allocator< Attachment * > >::difference_type jd = j;
6443  return swig::getslice(self, id, jd, step);
6444  }
6445 SWIGINTERN void std_vector_Sl_Attachment_Sm__Sg____setitem____SWIG_0(std::vector< Attachment * > *self,PySliceObject *slice,std::vector< Attachment *,std::allocator< Attachment * > > const &v){
6446  Py_ssize_t i, j, step;
6447  if( !PySlice_Check(slice) ) {
6448  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6449  return;
6450  }
6451  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6452  std::vector<Attachment*,std::allocator< Attachment * > >::difference_type id = i;
6453  std::vector<Attachment*,std::allocator< Attachment * > >::difference_type jd = j;
6454  swig::setslice(self, id, jd, step, v);
6455  }
6456 SWIGINTERN void std_vector_Sl_Attachment_Sm__Sg____setitem____SWIG_1(std::vector< Attachment * > *self,PySliceObject *slice){
6457  Py_ssize_t i, j, step;
6458  if( !PySlice_Check(slice) ) {
6459  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6460  return;
6461  }
6462  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6463  std::vector<Attachment*,std::allocator< Attachment * > >::difference_type id = i;
6464  std::vector<Attachment*,std::allocator< Attachment * > >::difference_type jd = j;
6465  swig::delslice(self, id, jd, step);
6466  }
6467 SWIGINTERN void std_vector_Sl_Attachment_Sm__Sg____delitem____SWIG_1(std::vector< Attachment * > *self,PySliceObject *slice){
6468  Py_ssize_t i, j, step;
6469  if( !PySlice_Check(slice) ) {
6470  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6471  return;
6472  }
6473  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6474  std::vector<Attachment*,std::allocator< Attachment * > >::difference_type id = i;
6475  std::vector<Attachment*,std::allocator< Attachment * > >::difference_type jd = j;
6476  swig::delslice(self, id, jd, step);
6477  }
6478 SWIGINTERN std::vector< Attachment * >::value_type std_vector_Sl_Attachment_Sm__Sg____getitem____SWIG_1(std::vector< Attachment * > *self,std::vector< Attachment * >::difference_type i){
6479  return *(swig::cgetpos(self, i));
6480  }
6481 SWIGINTERN void std_vector_Sl_Attachment_Sm__Sg____setitem____SWIG_2(std::vector< Attachment * > *self,std::vector< Attachment * >::difference_type i,std::vector< Attachment * >::value_type x){
6482  *(swig::getpos(self,i)) = x;
6483  }
6484 SWIGINTERN void std_vector_Sl_Attachment_Sm__Sg__append(std::vector< Attachment * > *self,std::vector< Attachment * >::value_type x){
6485  self->push_back(x);
6486  }
6487 SWIGINTERN std::vector< Attachment * >::iterator std_vector_Sl_Attachment_Sm__Sg__erase__SWIG_0(std::vector< Attachment * > *self,std::vector< Attachment * >::iterator pos){ return self->erase(pos); }
6488 SWIGINTERN std::vector< Attachment * >::iterator std_vector_Sl_Attachment_Sm__Sg__erase__SWIG_1(std::vector< Attachment * > *self,std::vector< Attachment * >::iterator first,std::vector< Attachment * >::iterator last){ return self->erase(first, last); }
6489 SWIGINTERN std::vector< Attachment * >::iterator std_vector_Sl_Attachment_Sm__Sg__insert__SWIG_0(std::vector< Attachment * > *self,std::vector< Attachment * >::iterator pos,std::vector< Attachment * >::value_type x){ return self->insert(pos, x); }
6490 SWIGINTERN void std_vector_Sl_Attachment_Sm__Sg__insert__SWIG_1(std::vector< Attachment * > *self,std::vector< Attachment * >::iterator pos,std::vector< Attachment * >::size_type n,std::vector< Attachment * >::value_type x){ self->insert(pos, n, x); }
6491 
6492  namespace swig {
6493  template <> struct traits<BodyPart > {
6494  typedef pointer_category category;
6495  static const char* type_name() { return"BodyPart"; }
6496  };
6497  }
6498 
6499 
6500  namespace swig {
6501  template <> struct traits<std::vector<BodyPart*, std::allocator< BodyPart * > > > {
6502  typedef value_category category;
6503  static const char* type_name() {
6504  return "std::vector<" "BodyPart" " *," "std::allocator< BodyPart * >" " >";
6505  }
6506  };
6507  }
6508 
6509 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_BodyPart_Sm__Sg__iterator(std::vector< BodyPart * > *self,PyObject **PYTHON_SELF){
6510  return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
6511  }
6512 SWIGINTERN bool std_vector_Sl_BodyPart_Sm__Sg____nonzero__(std::vector< BodyPart * > const *self){
6513  return !(self->empty());
6514  }
6515 SWIGINTERN bool std_vector_Sl_BodyPart_Sm__Sg____bool__(std::vector< BodyPart * > const *self){
6516  return !(self->empty());
6517  }
6518 SWIGINTERN std::vector< BodyPart * >::size_type std_vector_Sl_BodyPart_Sm__Sg____len__(std::vector< BodyPart * > const *self){
6519  return self->size();
6520  }
6521 SWIGINTERN std::vector< BodyPart * >::value_type std_vector_Sl_BodyPart_Sm__Sg__pop(std::vector< BodyPart * > *self){
6522  if (self->size() == 0)
6523  throw std::out_of_range("pop from empty container");
6524  std::vector<BodyPart*,std::allocator< BodyPart * > >::value_type x = self->back();
6525  self->pop_back();
6526  return x;
6527  }
6528 SWIGINTERN std::vector< BodyPart *,std::allocator< BodyPart * > > *std_vector_Sl_BodyPart_Sm__Sg____getslice__(std::vector< BodyPart * > *self,std::vector< BodyPart * >::difference_type i,std::vector< BodyPart * >::difference_type j){
6529  return swig::getslice(self, i, j, 1);
6530  }
6531 SWIGINTERN void std_vector_Sl_BodyPart_Sm__Sg____setslice____SWIG_0(std::vector< BodyPart * > *self,std::vector< BodyPart * >::difference_type i,std::vector< BodyPart * >::difference_type j,std::vector< BodyPart *,std::allocator< BodyPart * > > const &v=std::vector< BodyPart *,std::allocator< BodyPart * > >()){
6532  swig::setslice(self, i, j, 1, v);
6533  }
6534 SWIGINTERN void std_vector_Sl_BodyPart_Sm__Sg____delslice__(std::vector< BodyPart * > *self,std::vector< BodyPart * >::difference_type i,std::vector< BodyPart * >::difference_type j){
6535  swig::delslice(self, i, j, 1);
6536  }
6537 SWIGINTERN void std_vector_Sl_BodyPart_Sm__Sg____delitem____SWIG_0(std::vector< BodyPart * > *self,std::vector< BodyPart * >::difference_type i){
6538  self->erase(swig::getpos(self,i));
6539  }
6540 SWIGINTERN std::vector< BodyPart *,std::allocator< BodyPart * > > *std_vector_Sl_BodyPart_Sm__Sg____getitem____SWIG_0(std::vector< BodyPart * > *self,PySliceObject *slice){
6541  Py_ssize_t i, j, step;
6542  if( !PySlice_Check(slice) ) {
6543  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6544  return NULL;
6545  }
6546  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6547  std::vector<BodyPart*,std::allocator< BodyPart * > >::difference_type id = i;
6548  std::vector<BodyPart*,std::allocator< BodyPart * > >::difference_type jd = j;
6549  return swig::getslice(self, id, jd, step);
6550  }
6551 SWIGINTERN void std_vector_Sl_BodyPart_Sm__Sg____setitem____SWIG_0(std::vector< BodyPart * > *self,PySliceObject *slice,std::vector< BodyPart *,std::allocator< BodyPart * > > const &v){
6552  Py_ssize_t i, j, step;
6553  if( !PySlice_Check(slice) ) {
6554  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6555  return;
6556  }
6557  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6558  std::vector<BodyPart*,std::allocator< BodyPart * > >::difference_type id = i;
6559  std::vector<BodyPart*,std::allocator< BodyPart * > >::difference_type jd = j;
6560  swig::setslice(self, id, jd, step, v);
6561  }
6562 SWIGINTERN void std_vector_Sl_BodyPart_Sm__Sg____setitem____SWIG_1(std::vector< BodyPart * > *self,PySliceObject *slice){
6563  Py_ssize_t i, j, step;
6564  if( !PySlice_Check(slice) ) {
6565  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6566  return;
6567  }
6568  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6569  std::vector<BodyPart*,std::allocator< BodyPart * > >::difference_type id = i;
6570  std::vector<BodyPart*,std::allocator< BodyPart * > >::difference_type jd = j;
6571  swig::delslice(self, id, jd, step);
6572  }
6573 SWIGINTERN void std_vector_Sl_BodyPart_Sm__Sg____delitem____SWIG_1(std::vector< BodyPart * > *self,PySliceObject *slice){
6574  Py_ssize_t i, j, step;
6575  if( !PySlice_Check(slice) ) {
6576  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6577  return;
6578  }
6579  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6580  std::vector<BodyPart*,std::allocator< BodyPart * > >::difference_type id = i;
6581  std::vector<BodyPart*,std::allocator< BodyPart * > >::difference_type jd = j;
6582  swig::delslice(self, id, jd, step);
6583  }
6584 SWIGINTERN std::vector< BodyPart * >::value_type std_vector_Sl_BodyPart_Sm__Sg____getitem____SWIG_1(std::vector< BodyPart * > *self,std::vector< BodyPart * >::difference_type i){
6585  return *(swig::cgetpos(self, i));
6586  }
6587 SWIGINTERN void std_vector_Sl_BodyPart_Sm__Sg____setitem____SWIG_2(std::vector< BodyPart * > *self,std::vector< BodyPart * >::difference_type i,std::vector< BodyPart * >::value_type x){
6588  *(swig::getpos(self,i)) = x;
6589  }
6590 SWIGINTERN void std_vector_Sl_BodyPart_Sm__Sg__append(std::vector< BodyPart * > *self,std::vector< BodyPart * >::value_type x){
6591  self->push_back(x);
6592  }
6593 SWIGINTERN std::vector< BodyPart * >::iterator std_vector_Sl_BodyPart_Sm__Sg__erase__SWIG_0(std::vector< BodyPart * > *self,std::vector< BodyPart * >::iterator pos){ return self->erase(pos); }
6594 SWIGINTERN std::vector< BodyPart * >::iterator std_vector_Sl_BodyPart_Sm__Sg__erase__SWIG_1(std::vector< BodyPart * > *self,std::vector< BodyPart * >::iterator first,std::vector< BodyPart * >::iterator last){ return self->erase(first, last); }
6595 SWIGINTERN std::vector< BodyPart * >::iterator std_vector_Sl_BodyPart_Sm__Sg__insert__SWIG_0(std::vector< BodyPart * > *self,std::vector< BodyPart * >::iterator pos,std::vector< BodyPart * >::value_type x){ return self->insert(pos, x); }
6596 SWIGINTERN void std_vector_Sl_BodyPart_Sm__Sg__insert__SWIG_1(std::vector< BodyPart * > *self,std::vector< BodyPart * >::iterator pos,std::vector< BodyPart * >::size_type n,std::vector< BodyPart * >::value_type x){ self->insert(pos, n, x); }
6597 
6598  namespace swig {
6599  template <> struct traits<CollisionPair > {
6600  typedef pointer_category category;
6601  static const char* type_name() { return"CollisionPair"; }
6602  };
6603  }
6604 
6605 
6606  namespace swig {
6607  template <> struct traits<std::vector<CollisionPair*, std::allocator< CollisionPair * > > > {
6608  typedef value_category category;
6609  static const char* type_name() {
6610  return "std::vector<" "CollisionPair" " *," "std::allocator< CollisionPair * >" " >";
6611  }
6612  };
6613  }
6614 
6615 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_CollisionPair_Sm__Sg__iterator(std::vector< CollisionPair * > *self,PyObject **PYTHON_SELF){
6616  return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
6617  }
6618 SWIGINTERN bool std_vector_Sl_CollisionPair_Sm__Sg____nonzero__(std::vector< CollisionPair * > const *self){
6619  return !(self->empty());
6620  }
6621 SWIGINTERN bool std_vector_Sl_CollisionPair_Sm__Sg____bool__(std::vector< CollisionPair * > const *self){
6622  return !(self->empty());
6623  }
6624 SWIGINTERN std::vector< CollisionPair * >::size_type std_vector_Sl_CollisionPair_Sm__Sg____len__(std::vector< CollisionPair * > const *self){
6625  return self->size();
6626  }
6627 SWIGINTERN std::vector< CollisionPair * >::value_type std_vector_Sl_CollisionPair_Sm__Sg__pop(std::vector< CollisionPair * > *self){
6628  if (self->size() == 0)
6629  throw std::out_of_range("pop from empty container");
6630  std::vector<CollisionPair*,std::allocator< CollisionPair * > >::value_type x = self->back();
6631  self->pop_back();
6632  return x;
6633  }
6634 SWIGINTERN std::vector< CollisionPair *,std::allocator< CollisionPair * > > *std_vector_Sl_CollisionPair_Sm__Sg____getslice__(std::vector< CollisionPair * > *self,std::vector< CollisionPair * >::difference_type i,std::vector< CollisionPair * >::difference_type j){
6635  return swig::getslice(self, i, j, 1);
6636  }
6637 SWIGINTERN void std_vector_Sl_CollisionPair_Sm__Sg____setslice____SWIG_0(std::vector< CollisionPair * > *self,std::vector< CollisionPair * >::difference_type i,std::vector< CollisionPair * >::difference_type j,std::vector< CollisionPair *,std::allocator< CollisionPair * > > const &v=std::vector< CollisionPair *,std::allocator< CollisionPair * > >()){
6638  swig::setslice(self, i, j, 1, v);
6639  }
6640 SWIGINTERN void std_vector_Sl_CollisionPair_Sm__Sg____delslice__(std::vector< CollisionPair * > *self,std::vector< CollisionPair * >::difference_type i,std::vector< CollisionPair * >::difference_type j){
6641  swig::delslice(self, i, j, 1);
6642  }
6643 SWIGINTERN void std_vector_Sl_CollisionPair_Sm__Sg____delitem____SWIG_0(std::vector< CollisionPair * > *self,std::vector< CollisionPair * >::difference_type i){
6644  self->erase(swig::getpos(self,i));
6645  }
6646 SWIGINTERN std::vector< CollisionPair *,std::allocator< CollisionPair * > > *std_vector_Sl_CollisionPair_Sm__Sg____getitem____SWIG_0(std::vector< CollisionPair * > *self,PySliceObject *slice){
6647  Py_ssize_t i, j, step;
6648  if( !PySlice_Check(slice) ) {
6649  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6650  return NULL;
6651  }
6652  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6653  std::vector<CollisionPair*,std::allocator< CollisionPair * > >::difference_type id = i;
6654  std::vector<CollisionPair*,std::allocator< CollisionPair * > >::difference_type jd = j;
6655  return swig::getslice(self, id, jd, step);
6656  }
6657 SWIGINTERN void std_vector_Sl_CollisionPair_Sm__Sg____setitem____SWIG_0(std::vector< CollisionPair * > *self,PySliceObject *slice,std::vector< CollisionPair *,std::allocator< CollisionPair * > > const &v){
6658  Py_ssize_t i, j, step;
6659  if( !PySlice_Check(slice) ) {
6660  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6661  return;
6662  }
6663  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6664  std::vector<CollisionPair*,std::allocator< CollisionPair * > >::difference_type id = i;
6665  std::vector<CollisionPair*,std::allocator< CollisionPair * > >::difference_type jd = j;
6666  swig::setslice(self, id, jd, step, v);
6667  }
6668 SWIGINTERN void std_vector_Sl_CollisionPair_Sm__Sg____setitem____SWIG_1(std::vector< CollisionPair * > *self,PySliceObject *slice){
6669  Py_ssize_t i, j, step;
6670  if( !PySlice_Check(slice) ) {
6671  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6672  return;
6673  }
6674  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6675  std::vector<CollisionPair*,std::allocator< CollisionPair * > >::difference_type id = i;
6676  std::vector<CollisionPair*,std::allocator< CollisionPair * > >::difference_type jd = j;
6677  swig::delslice(self, id, jd, step);
6678  }
6679 SWIGINTERN void std_vector_Sl_CollisionPair_Sm__Sg____delitem____SWIG_1(std::vector< CollisionPair * > *self,PySliceObject *slice){
6680  Py_ssize_t i, j, step;
6681  if( !PySlice_Check(slice) ) {
6682  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6683  return;
6684  }
6685  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6686  std::vector<CollisionPair*,std::allocator< CollisionPair * > >::difference_type id = i;
6687  std::vector<CollisionPair*,std::allocator< CollisionPair * > >::difference_type jd = j;
6688  swig::delslice(self, id, jd, step);
6689  }
6690 SWIGINTERN std::vector< CollisionPair * >::value_type std_vector_Sl_CollisionPair_Sm__Sg____getitem____SWIG_1(std::vector< CollisionPair * > *self,std::vector< CollisionPair * >::difference_type i){
6691  return *(swig::cgetpos(self, i));
6692  }
6693 SWIGINTERN void std_vector_Sl_CollisionPair_Sm__Sg____setitem____SWIG_2(std::vector< CollisionPair * > *self,std::vector< CollisionPair * >::difference_type i,std::vector< CollisionPair * >::value_type x){
6694  *(swig::getpos(self,i)) = x;
6695  }
6696 SWIGINTERN void std_vector_Sl_CollisionPair_Sm__Sg__append(std::vector< CollisionPair * > *self,std::vector< CollisionPair * >::value_type x){
6697  self->push_back(x);
6698  }
6699 SWIGINTERN std::vector< CollisionPair * >::iterator std_vector_Sl_CollisionPair_Sm__Sg__erase__SWIG_0(std::vector< CollisionPair * > *self,std::vector< CollisionPair * >::iterator pos){ return self->erase(pos); }
6700 SWIGINTERN std::vector< CollisionPair * >::iterator std_vector_Sl_CollisionPair_Sm__Sg__erase__SWIG_1(std::vector< CollisionPair * > *self,std::vector< CollisionPair * >::iterator first,std::vector< CollisionPair * >::iterator last){ return self->erase(first, last); }
6701 SWIGINTERN std::vector< CollisionPair * >::iterator std_vector_Sl_CollisionPair_Sm__Sg__insert__SWIG_0(std::vector< CollisionPair * > *self,std::vector< CollisionPair * >::iterator pos,std::vector< CollisionPair * >::value_type x){ return self->insert(pos, x); }
6702 SWIGINTERN void std_vector_Sl_CollisionPair_Sm__Sg__insert__SWIG_1(std::vector< CollisionPair * > *self,std::vector< CollisionPair * >::iterator pos,std::vector< CollisionPair * >::size_type n,std::vector< CollisionPair * >::value_type x){ self->insert(pos, n, x); }
6703 
6704  namespace swig {
6705  template <> struct traits<CStdVariable > {
6706  typedef pointer_category category;
6707  static const char* type_name() { return"CStdVariable"; }
6708  };
6709  }
6710 
6711 
6712  namespace swig {
6713  template <> struct traits<std::vector<CStdVariable*, std::allocator< CStdVariable * > > > {
6714  typedef value_category category;
6715  static const char* type_name() {
6716  return "std::vector<" "CStdVariable" " *," "std::allocator< CStdVariable * >" " >";
6717  }
6718  };
6719  }
6720 
6721 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_CStdVariable_Sm__Sg__iterator(std::vector< CStdVariable * > *self,PyObject **PYTHON_SELF){
6722  return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
6723  }
6724 SWIGINTERN bool std_vector_Sl_CStdVariable_Sm__Sg____nonzero__(std::vector< CStdVariable * > const *self){
6725  return !(self->empty());
6726  }
6727 SWIGINTERN bool std_vector_Sl_CStdVariable_Sm__Sg____bool__(std::vector< CStdVariable * > const *self){
6728  return !(self->empty());
6729  }
6730 SWIGINTERN std::vector< CStdVariable * >::size_type std_vector_Sl_CStdVariable_Sm__Sg____len__(std::vector< CStdVariable * > const *self){
6731  return self->size();
6732  }
6733 SWIGINTERN std::vector< CStdVariable * >::value_type std_vector_Sl_CStdVariable_Sm__Sg__pop(std::vector< CStdVariable * > *self){
6734  if (self->size() == 0)
6735  throw std::out_of_range("pop from empty container");
6736  std::vector<CStdVariable*,std::allocator< CStdVariable * > >::value_type x = self->back();
6737  self->pop_back();
6738  return x;
6739  }
6740 SWIGINTERN std::vector< StdUtils::CStdVariable *,std::allocator< StdUtils::CStdVariable * > > *std_vector_Sl_CStdVariable_Sm__Sg____getslice__(std::vector< CStdVariable * > *self,std::vector< CStdVariable * >::difference_type i,std::vector< CStdVariable * >::difference_type j){
6741  return swig::getslice(self, i, j, 1);
6742  }
6743 SWIGINTERN void std_vector_Sl_CStdVariable_Sm__Sg____setslice____SWIG_0(std::vector< CStdVariable * > *self,std::vector< CStdVariable * >::difference_type i,std::vector< CStdVariable * >::difference_type j,std::vector< StdUtils::CStdVariable *,std::allocator< StdUtils::CStdVariable * > > const &v=std::vector< CStdVariable *,std::allocator< CStdVariable * > >()){
6744  swig::setslice(self, i, j, 1, v);
6745  }
6746 SWIGINTERN void std_vector_Sl_CStdVariable_Sm__Sg____delslice__(std::vector< CStdVariable * > *self,std::vector< CStdVariable * >::difference_type i,std::vector< CStdVariable * >::difference_type j){
6747  swig::delslice(self, i, j, 1);
6748  }
6749 SWIGINTERN void std_vector_Sl_CStdVariable_Sm__Sg____delitem____SWIG_0(std::vector< CStdVariable * > *self,std::vector< CStdVariable * >::difference_type i){
6750  self->erase(swig::getpos(self,i));
6751  }
6752 SWIGINTERN std::vector< StdUtils::CStdVariable *,std::allocator< StdUtils::CStdVariable * > > *std_vector_Sl_CStdVariable_Sm__Sg____getitem____SWIG_0(std::vector< CStdVariable * > *self,PySliceObject *slice){
6753  Py_ssize_t i, j, step;
6754  if( !PySlice_Check(slice) ) {
6755  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6756  return NULL;
6757  }
6758  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6759  std::vector<CStdVariable*,std::allocator< CStdVariable * > >::difference_type id = i;
6760  std::vector<CStdVariable*,std::allocator< CStdVariable * > >::difference_type jd = j;
6761  return swig::getslice(self, id, jd, step);
6762  }
6763 SWIGINTERN void std_vector_Sl_CStdVariable_Sm__Sg____setitem____SWIG_0(std::vector< CStdVariable * > *self,PySliceObject *slice,std::vector< StdUtils::CStdVariable *,std::allocator< StdUtils::CStdVariable * > > const &v){
6764  Py_ssize_t i, j, step;
6765  if( !PySlice_Check(slice) ) {
6766  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6767  return;
6768  }
6769  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6770  std::vector<CStdVariable*,std::allocator< CStdVariable * > >::difference_type id = i;
6771  std::vector<CStdVariable*,std::allocator< CStdVariable * > >::difference_type jd = j;
6772  swig::setslice(self, id, jd, step, v);
6773  }
6774 SWIGINTERN void std_vector_Sl_CStdVariable_Sm__Sg____setitem____SWIG_1(std::vector< CStdVariable * > *self,PySliceObject *slice){
6775  Py_ssize_t i, j, step;
6776  if( !PySlice_Check(slice) ) {
6777  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6778  return;
6779  }
6780  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6781  std::vector<CStdVariable*,std::allocator< CStdVariable * > >::difference_type id = i;
6782  std::vector<CStdVariable*,std::allocator< CStdVariable * > >::difference_type jd = j;
6783  swig::delslice(self, id, jd, step);
6784  }
6785 SWIGINTERN void std_vector_Sl_CStdVariable_Sm__Sg____delitem____SWIG_1(std::vector< CStdVariable * > *self,PySliceObject *slice){
6786  Py_ssize_t i, j, step;
6787  if( !PySlice_Check(slice) ) {
6788  SWIG_Error(SWIG_TypeError, "Slice object expected.");
6789  return;
6790  }
6791  PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6792  std::vector<CStdVariable*,std::allocator< CStdVariable * > >::difference_type id = i;
6793  std::vector<CStdVariable*,std::allocator< CStdVariable * > >::difference_type jd = j;
6794  swig::delslice(self, id, jd, step);
6795  }
6796 SWIGINTERN std::vector< CStdVariable * >::value_type std_vector_Sl_CStdVariable_Sm__Sg____getitem____SWIG_1(std::vector< CStdVariable * > *self,std::vector< CStdVariable * >::difference_type i){
6797  return *(swig::cgetpos(self, i));
6798  }
6799 SWIGINTERN void std_vector_Sl_CStdVariable_Sm__Sg____setitem____SWIG_2(std::vector< CStdVariable * > *self,std::vector< CStdVariable * >::difference_type i,std::vector< CStdVariable * >::value_type x){
6800  *(swig::getpos(self,i)) = x;
6801  }
6802 SWIGINTERN void std_vector_Sl_CStdVariable_Sm__Sg__append(std::vector< CStdVariable * > *self,std::vector< CStdVariable * >::value_type x){
6803  self->push_back(x);
6804  }
6805 SWIGINTERN std::vector< CStdVariable * >::iterator std_vector_Sl_CStdVariable_Sm__Sg__erase__SWIG_0(std::vector< CStdVariable * > *self,std::vector< CStdVariable * >::iterator pos){ return self->erase(pos); }
6806 SWIGINTERN std::vector< CStdVariable * >::iterator std_vector_Sl_CStdVariable_Sm__Sg__erase__SWIG_1(std::vector< CStdVariable * > *self,std::vector< CStdVariable * >::iterator first,std::vector< CStdVariable * >::iterator last){ return self->erase(first, last); }
6807 SWIGINTERN std::vector< CStdVariable * >::iterator std_vector_Sl_CStdVariable_Sm__Sg__insert__SWIG_0(std::vector< CStdVariable * > *self,std::vector< CStdVariable * >::iterator pos,std::vector< CStdVariable * >::value_type x){ return self->insert(pos, x); }
6808 SWIGINTERN void std_vector_Sl_CStdVariable_Sm__Sg__insert__SWIG_1(std::vector< CStdVariable * > *self,std::vector< CStdVariable * >::iterator pos,std::vector< CStdVariable * >::size_type n,std::vector< CStdVariable * >::value_type x){ self->insert(pos, n, x); }
6809 
6810  namespace swig {
6811  template <> struct traits<DataColumn > {
6812  typedef pointer_category category;
6813  static const char* type_name() { return"DataColumn"; }
6814  };
6815  }
6816 
6817 
6818  namespace swig {
6819  template <> struct traits<std::vector<DataColumn*, std::allocator< DataColumn * > > > {
6820  typedef value_category