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