OR-Tools  9.1
init_python_wrap.cc
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 4.0.1
4  *
5  * This file is not intended to be easily readable and contains a number of
6  * coding conventions designed to improve portability and efficiency. Do not make
7  * changes to this file unless you know what you are doing--modify the SWIG
8  * interface file instead.
9  * ----------------------------------------------------------------------------- */
10 
11 
12 #ifndef SWIGPYTHON
13 #define SWIGPYTHON
14 #endif
15 
16 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
17 
18 
19 #ifdef __cplusplus
20 /* SwigValueWrapper is described in swig.swg */
21 template<typename T> class SwigValueWrapper {
22  struct SwigMovePointer {
23  T *ptr;
24  SwigMovePointer(T *p) : ptr(p) { }
25  ~SwigMovePointer() { delete ptr; }
26  SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
27  } pointer;
28  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
29  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
30 public:
31  SwigValueWrapper() : pointer(0) { }
32  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
33  operator T&() const { return *pointer.ptr; }
34  T *operator&() { return pointer.ptr; }
35 };
36 
37 template <typename T> T SwigValueInit() {
38  return T();
39 }
40 #endif
41 
42 /* -----------------------------------------------------------------------------
43  * This section contains generic SWIG labels for method/variable
44  * declarations/attributes, and other compiler dependent labels.
45  * ----------------------------------------------------------------------------- */
46 
47 /* template workaround for compilers that cannot correctly implement the C++ standard */
48 #ifndef SWIGTEMPLATEDISAMBIGUATOR
49 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
50 # define SWIGTEMPLATEDISAMBIGUATOR template
51 # elif defined(__HP_aCC)
52 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
53 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
54 # define SWIGTEMPLATEDISAMBIGUATOR template
55 # else
56 # define SWIGTEMPLATEDISAMBIGUATOR
57 # endif
58 #endif
59 
60 /* inline attribute */
61 #ifndef SWIGINLINE
62 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
63 # define SWIGINLINE inline
64 # else
65 # define SWIGINLINE
66 # endif
67 #endif
68 
69 /* attribute recognised by some compilers to avoid 'unused' warnings */
70 #ifndef SWIGUNUSED
71 # if defined(__GNUC__)
72 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
73 # define SWIGUNUSED __attribute__ ((__unused__))
74 # else
75 # define SWIGUNUSED
76 # endif
77 # elif defined(__ICC)
78 # define SWIGUNUSED __attribute__ ((__unused__))
79 # else
80 # define SWIGUNUSED
81 # endif
82 #endif
83 
84 #ifndef SWIG_MSC_UNSUPPRESS_4505
85 # if defined(_MSC_VER)
86 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
87 # endif
88 #endif
89 
90 #ifndef SWIGUNUSEDPARM
91 # ifdef __cplusplus
92 # define SWIGUNUSEDPARM(p)
93 # else
94 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
95 # endif
96 #endif
97 
98 /* internal SWIG method */
99 #ifndef SWIGINTERN
100 # define SWIGINTERN static SWIGUNUSED
101 #endif
102 
103 /* internal inline SWIG method */
104 #ifndef SWIGINTERNINLINE
105 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
106 #endif
107 
108 /* exporting methods */
109 #if defined(__GNUC__)
110 # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
111 # ifndef GCC_HASCLASSVISIBILITY
112 # define GCC_HASCLASSVISIBILITY
113 # endif
114 # endif
115 #endif
116 
117 #ifndef SWIGEXPORT
118 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
119 # if defined(STATIC_LINKED)
120 # define SWIGEXPORT
121 # else
122 # define SWIGEXPORT __declspec(dllexport)
123 # endif
124 # else
125 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
126 # define SWIGEXPORT __attribute__ ((visibility("default")))
127 # else
128 # define SWIGEXPORT
129 # endif
130 # endif
131 #endif
132 
133 /* calling conventions for Windows */
134 #ifndef SWIGSTDCALL
135 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
136 # define SWIGSTDCALL __stdcall
137 # else
138 # define SWIGSTDCALL
139 # endif
140 #endif
141 
142 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
143 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
144 # define _CRT_SECURE_NO_DEPRECATE
145 #endif
146 
147 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
148 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
149 # define _SCL_SECURE_NO_DEPRECATE
150 #endif
151 
152 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
153 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
154 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
155 #endif
156 
157 /* Intel's compiler complains if a variable which was never initialised is
158  * cast to void, which is a common idiom which we use to indicate that we
159  * are aware a variable isn't used. So we just silence that warning.
160  * See: https://github.com/swig/swig/issues/192 for more discussion.
161  */
162 #ifdef __INTEL_COMPILER
163 # pragma warning disable 592
164 #endif
165 
166 
167 #if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND)
168 /* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */
169 # include <math.h>
170 #endif
171 
172 #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
173 /* Use debug wrappers with the Python release dll */
174 # undef _DEBUG
175 # include <Python.h>
176 # define _DEBUG 1
177 #else
178 # include <Python.h>
179 #endif
180 
181 /* -----------------------------------------------------------------------------
182  * swigrun.swg
183  *
184  * This file contains generic C API SWIG runtime support for pointer
185  * type checking.
186  * ----------------------------------------------------------------------------- */
187 
188 /* This should only be incremented when either the layout of swig_type_info changes,
189  or for whatever reason, the runtime changes incompatibly */
190 #define SWIG_RUNTIME_VERSION "4"
191 
192 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
193 #ifdef SWIG_TYPE_TABLE
194 # define SWIG_QUOTE_STRING(x) #x
195 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
196 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
197 #else
198 # define SWIG_TYPE_TABLE_NAME
199 #endif
200 
201 /*
202  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
203  creating a static or dynamic library from the SWIG runtime code.
204  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
205 
206  But only do this if strictly necessary, ie, if you have problems
207  with your compiler or suchlike.
208 */
209 
210 #ifndef SWIGRUNTIME
211 # define SWIGRUNTIME SWIGINTERN
212 #endif
213 
214 #ifndef SWIGRUNTIMEINLINE
215 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
216 #endif
217 
218 /* Generic buffer size */
219 #ifndef SWIG_BUFFER_SIZE
220 # define SWIG_BUFFER_SIZE 1024
221 #endif
222 
223 /* Flags for pointer conversions */
224 #define SWIG_POINTER_DISOWN 0x1
225 #define SWIG_CAST_NEW_MEMORY 0x2
226 #define SWIG_POINTER_NO_NULL 0x4
227 
228 /* Flags for new pointer objects */
229 #define SWIG_POINTER_OWN 0x1
230 
231 
232 /*
233  Flags/methods for returning states.
234 
235  The SWIG conversion methods, as ConvertPtr, return an integer
236  that tells if the conversion was successful or not. And if not,
237  an error code can be returned (see swigerrors.swg for the codes).
238 
239  Use the following macros/flags to set or process the returning
240  states.
241 
242  In old versions of SWIG, code such as the following was usually written:
243 
244  if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
245  // success code
246  } else {
247  //fail code
248  }
249 
250  Now you can be more explicit:
251 
252  int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
253  if (SWIG_IsOK(res)) {
254  // success code
255  } else {
256  // fail code
257  }
258 
259  which is the same really, but now you can also do
260 
261  Type *ptr;
262  int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
263  if (SWIG_IsOK(res)) {
264  // success code
265  if (SWIG_IsNewObj(res) {
266  ...
267  delete *ptr;
268  } else {
269  ...
270  }
271  } else {
272  // fail code
273  }
274 
275  I.e., now SWIG_ConvertPtr can return new objects and you can
276  identify the case and take care of the deallocation. Of course that
277  also requires SWIG_ConvertPtr to return new result values, such as
278 
279  int SWIG_ConvertPtr(obj, ptr,...) {
280  if (<obj is ok>) {
281  if (<need new object>) {
282  *ptr = <ptr to new allocated object>;
283  return SWIG_NEWOBJ;
284  } else {
285  *ptr = <ptr to old object>;
286  return SWIG_OLDOBJ;
287  }
288  } else {
289  return SWIG_BADOBJ;
290  }
291  }
292 
293  Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
294  more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
295  SWIG errors code.
296 
297  Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
298  allows to return the 'cast rank', for example, if you have this
299 
300  int food(double)
301  int fooi(int);
302 
303  and you call
304 
305  food(1) // cast rank '1' (1 -> 1.0)
306  fooi(1) // cast rank '0'
307 
308  just use the SWIG_AddCast()/SWIG_CheckState()
309 */
310 
311 #define SWIG_OK (0)
312 #define SWIG_ERROR (-1)
313 #define SWIG_IsOK(r) (r >= 0)
314 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
315 
316 /* The CastRankLimit says how many bits are used for the cast rank */
317 #define SWIG_CASTRANKLIMIT (1 << 8)
318 /* The NewMask denotes the object was created (using new/malloc) */
319 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
320 /* The TmpMask is for in/out typemaps that use temporal objects */
321 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
322 /* Simple returning values */
323 #define SWIG_BADOBJ (SWIG_ERROR)
324 #define SWIG_OLDOBJ (SWIG_OK)
325 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
326 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
327 /* Check, add and del mask methods */
328 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
329 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
330 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
331 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
332 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
333 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
334 
335 /* Cast-Rank Mode */
336 #if defined(SWIG_CASTRANK_MODE)
337 # ifndef SWIG_TypeRank
338 # define SWIG_TypeRank unsigned long
339 # endif
340 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
341 # define SWIG_MAXCASTRANK (2)
342 # endif
343 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
344 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
345 SWIGINTERNINLINE int SWIG_AddCast(int r) {
346  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
347 }
349  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
350 }
351 #else /* no cast-rank mode */
352 # define SWIG_AddCast(r) (r)
353 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
354 #endif
355 
356 
357 #include <string.h>
358 
359 #ifdef __cplusplus
360 extern "C" {
361 #endif
362 
363 typedef void *(*swig_converter_func)(void *, int *);
364 typedef struct swig_type_info *(*swig_dycast_func)(void **);
365 
366 /* Structure to store information on one type */
367 typedef struct swig_type_info {
368  const char *name; /* mangled name of this type */
369  const char *str; /* human readable name of this type */
370  swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
371  struct swig_cast_info *cast; /* linked list of types that can cast into this type */
372  void *clientdata; /* language specific type data */
373  int owndata; /* flag if the structure owns the clientdata */
375 
376 /* Structure to store a type and conversion function used for casting */
377 typedef struct swig_cast_info {
378  swig_type_info *type; /* pointer to type that is equivalent to this type */
379  swig_converter_func converter; /* function to cast the void pointers */
380  struct swig_cast_info *next; /* pointer to next cast in linked list */
381  struct swig_cast_info *prev; /* pointer to the previous cast */
383 
384 /* Structure used to store module information
385  * Each module generates one structure like this, and the runtime collects
386  * all of these structures and stores them in a circularly linked list.*/
387 typedef struct swig_module_info {
388  swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
389  size_t size; /* Number of types in this module */
390  struct swig_module_info *next; /* Pointer to next element in circularly linked list */
391  swig_type_info **type_initial; /* Array of initially generated type structures */
392  swig_cast_info **cast_initial; /* Array of initially generated casting structures */
393  void *clientdata; /* Language specific module data */
395 
396 /*
397  Compare two type names skipping the space characters, therefore
398  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
399 
400  Return 0 when the two name types are equivalent, as in
401  strncmp, but skipping ' '.
402 */
403 SWIGRUNTIME int
404 SWIG_TypeNameComp(const char *f1, const char *l1,
405  const char *f2, const char *l2) {
406  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
407  while ((*f1 == ' ') && (f1 != l1)) ++f1;
408  while ((*f2 == ' ') && (f2 != l2)) ++f2;
409  if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
410  }
411  return (int)((l1 - f1) - (l2 - f2));
412 }
413 
414 /*
415  Check type equivalence in a name list like <name1>|<name2>|...
416  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
417 */
418 SWIGRUNTIME int
419 SWIG_TypeCmp(const char *nb, const char *tb) {
420  int equiv = 1;
421  const char* te = tb + strlen(tb);
422  const char* ne = nb;
423  while (equiv != 0 && *ne) {
424  for (nb = ne; *ne; ++ne) {
425  if (*ne == '|') break;
426  }
427  equiv = SWIG_TypeNameComp(nb, ne, tb, te);
428  if (*ne) ++ne;
429  }
430  return equiv;
431 }
432 
433 /*
434  Check type equivalence in a name list like <name1>|<name2>|...
435  Return 0 if not equal, 1 if equal
436 */
437 SWIGRUNTIME int
438 SWIG_TypeEquiv(const char *nb, const char *tb) {
439  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
440 }
441 
442 /*
443  Check the typename
444 */
446 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
447  if (ty) {
448  swig_cast_info *iter = ty->cast;
449  while (iter) {
450  if (strcmp(iter->type->name, c) == 0) {
451  if (iter == ty->cast)
452  return iter;
453  /* Move iter to the top of the linked list */
454  iter->prev->next = iter->next;
455  if (iter->next)
456  iter->next->prev = iter->prev;
457  iter->next = ty->cast;
458  iter->prev = 0;
459  if (ty->cast) ty->cast->prev = iter;
460  ty->cast = iter;
461  return iter;
462  }
463  iter = iter->next;
464  }
465  }
466  return 0;
467 }
468 
469 /*
470  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
471 */
474  if (ty) {
475  swig_cast_info *iter = ty->cast;
476  while (iter) {
477  if (iter->type == from) {
478  if (iter == ty->cast)
479  return iter;
480  /* Move iter to the top of the linked list */
481  iter->prev->next = iter->next;
482  if (iter->next)
483  iter->next->prev = iter->prev;
484  iter->next = ty->cast;
485  iter->prev = 0;
486  if (ty->cast) ty->cast->prev = iter;
487  ty->cast = iter;
488  return iter;
489  }
490  iter = iter->next;
491  }
492  }
493  return 0;
494 }
495 
496 /*
497  Cast a pointer up an inheritance hierarchy
498 */
499 SWIGRUNTIMEINLINE void *
500 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
501  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
502 }
503 
504 /*
505  Dynamic pointer casting. Down an inheritance hierarchy
506 */
509  swig_type_info *lastty = ty;
510  if (!ty || !ty->dcast) return ty;
511  while (ty && (ty->dcast)) {
512  ty = (*ty->dcast)(ptr);
513  if (ty) lastty = ty;
514  }
515  return lastty;
516 }
517 
518 /*
519  Return the name associated with this type
520 */
521 SWIGRUNTIMEINLINE const char *
523  return ty->name;
524 }
525 
526 /*
527  Return the pretty name associated with this type,
528  that is an unmangled type name in a form presentable to the user.
529 */
530 SWIGRUNTIME const char *
532  /* The "str" field contains the equivalent pretty names of the
533  type, separated by vertical-bar characters. We choose
534  to print the last name, as it is often (?) the most
535  specific. */
536  if (!type) return NULL;
537  if (type->str != NULL) {
538  const char *last_name = type->str;
539  const char *s;
540  for (s = type->str; *s; s++)
541  if (*s == '|') last_name = s+1;
542  return last_name;
543  }
544  else
545  return type->name;
546 }
547 
548 /*
549  Set the clientdata field for a type
550 */
551 SWIGRUNTIME void
553  swig_cast_info *cast = ti->cast;
554  /* if (ti->clientdata == clientdata) return; */
555  ti->clientdata = clientdata;
556 
557  while (cast) {
558  if (!cast->converter) {
559  swig_type_info *tc = cast->type;
560  if (!tc->clientdata) {
562  }
563  }
564  cast = cast->next;
565  }
566 }
567 SWIGRUNTIME void
570  ti->owndata = 1;
571 }
572 
573 /*
574  Search for a swig_type_info structure only by mangled name
575  Search is a O(log #types)
576 
577  We start searching at module start, and finish searching when start == end.
578  Note: if start == end at the beginning of the function, we go all the way around
579  the circular list.
580 */
583  swig_module_info *end,
584  const char *name) {
585  swig_module_info *iter = start;
586  do {
587  if (iter->size) {
588  size_t l = 0;
589  size_t r = iter->size - 1;
590  do {
591  /* since l+r >= 0, we can (>> 1) instead (/ 2) */
592  size_t i = (l + r) >> 1;
593  const char *iname = iter->types[i]->name;
594  if (iname) {
595  int compare = strcmp(name, iname);
596  if (compare == 0) {
597  return iter->types[i];
598  } else if (compare < 0) {
599  if (i) {
600  r = i - 1;
601  } else {
602  break;
603  }
604  } else if (compare > 0) {
605  l = i + 1;
606  }
607  } else {
608  break; /* should never happen */
609  }
610  } while (l <= r);
611  }
612  iter = iter->next;
613  } while (iter != end);
614  return 0;
615 }
616 
617 /*
618  Search for a swig_type_info structure for either a mangled name or a human readable name.
619  It first searches the mangled names of the types, which is a O(log #types)
620  If a type is not found it then searches the human readable names, which is O(#types).
621 
622  We start searching at module start, and finish searching when start == end.
623  Note: if start == end at the beginning of the function, we go all the way around
624  the circular list.
625 */
628  swig_module_info *end,
629  const char *name) {
630  /* STEP 1: Search the name field using binary search */
631  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
632  if (ret) {
633  return ret;
634  } else {
635  /* STEP 2: If the type hasn't been found, do a complete search
636  of the str field (the human readable name) */
637  swig_module_info *iter = start;
638  do {
639  size_t i = 0;
640  for (; i < iter->size; ++i) {
641  if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
642  return iter->types[i];
643  }
644  iter = iter->next;
645  } while (iter != end);
646  }
647 
648  /* neither found a match */
649  return 0;
650 }
651 
652 /*
653  Pack binary data into a string
654 */
655 SWIGRUNTIME char *
656 SWIG_PackData(char *c, void *ptr, size_t sz) {
657  static const char hex[17] = "0123456789abcdef";
658  const unsigned char *u = (unsigned char *) ptr;
659  const unsigned char *eu = u + sz;
660  for (; u != eu; ++u) {
661  unsigned char uu = *u;
662  *(c++) = hex[(uu & 0xf0) >> 4];
663  *(c++) = hex[uu & 0xf];
664  }
665  return c;
666 }
667 
668 /*
669  Unpack binary data from a string
670 */
671 SWIGRUNTIME const char *
672 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
673  unsigned char *u = (unsigned char *) ptr;
674  const unsigned char *eu = u + sz;
675  for (; u != eu; ++u) {
676  char d = *(c++);
677  unsigned char uu;
678  if ((d >= '0') && (d <= '9'))
679  uu = (unsigned char)((d - '0') << 4);
680  else if ((d >= 'a') && (d <= 'f'))
681  uu = (unsigned char)((d - ('a'-10)) << 4);
682  else
683  return (char *) 0;
684  d = *(c++);
685  if ((d >= '0') && (d <= '9'))
686  uu |= (unsigned char)(d - '0');
687  else if ((d >= 'a') && (d <= 'f'))
688  uu |= (unsigned char)(d - ('a'-10));
689  else
690  return (char *) 0;
691  *u = uu;
692  }
693  return c;
694 }
695 
696 /*
697  Pack 'void *' into a string buffer.
698 */
699 SWIGRUNTIME char *
700 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
701  char *r = buff;
702  if ((2*sizeof(void *) + 2) > bsz) return 0;
703  *(r++) = '_';
704  r = SWIG_PackData(r,&ptr,sizeof(void *));
705  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
706  strcpy(r,name);
707  return buff;
708 }
709 
710 SWIGRUNTIME const char *
711 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
712  if (*c != '_') {
713  if (strcmp(c,"NULL") == 0) {
714  *ptr = (void *) 0;
715  return name;
716  } else {
717  return 0;
718  }
719  }
720  return SWIG_UnpackData(++c,ptr,sizeof(void *));
721 }
722 
723 SWIGRUNTIME char *
724 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
725  char *r = buff;
726  size_t lname = (name ? strlen(name) : 0);
727  if ((2*sz + 2 + lname) > bsz) return 0;
728  *(r++) = '_';
729  r = SWIG_PackData(r,ptr,sz);
730  if (lname) {
731  strncpy(r,name,lname+1);
732  } else {
733  *r = 0;
734  }
735  return buff;
736 }
737 
738 SWIGRUNTIME const char *
739 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
740  if (*c != '_') {
741  if (strcmp(c,"NULL") == 0) {
742  memset(ptr,0,sz);
743  return name;
744  } else {
745  return 0;
746  }
747  }
748  return SWIG_UnpackData(++c,ptr,sz);
749 }
750 
751 #ifdef __cplusplus
752 }
753 #endif
754 
755 /* Errors in SWIG */
756 #define SWIG_UnknownError -1
757 #define SWIG_IOError -2
758 #define SWIG_RuntimeError -3
759 #define SWIG_IndexError -4
760 #define SWIG_TypeError -5
761 #define SWIG_DivisionByZero -6
762 #define SWIG_OverflowError -7
763 #define SWIG_SyntaxError -8
764 #define SWIG_ValueError -9
765 #define SWIG_SystemError -10
766 #define SWIG_AttributeError -11
767 #define SWIG_MemoryError -12
768 #define SWIG_NullReferenceError -13
769 
770 
771 
772 /* Compatibility macros for Python 3 */
773 #if PY_VERSION_HEX >= 0x03000000
774 
775 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
776 #define PyInt_Check(x) PyLong_Check(x)
777 #define PyInt_AsLong(x) PyLong_AsLong(x)
778 #define PyInt_FromLong(x) PyLong_FromLong(x)
779 #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
780 #define PyString_Check(name) PyBytes_Check(name)
781 #define PyString_FromString(x) PyUnicode_FromString(x)
782 #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
783 #define PyString_AsString(str) PyBytes_AsString(str)
784 #define PyString_Size(str) PyBytes_Size(str)
785 #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
786 #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
787 #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
788 #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
789 
790 #endif
791 
792 #ifndef Py_TYPE
793 # define Py_TYPE(op) ((op)->ob_type)
794 #endif
795 
796 /* SWIG APIs for compatibility of both Python 2 & 3 */
797 
798 #if PY_VERSION_HEX >= 0x03000000
799 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
800 #else
801 # define SWIG_Python_str_FromFormat PyString_FromFormat
802 #endif
803 
804 
805 /* Warning: This function will allocate a new string in Python 3,
806  * so please call SWIG_Python_str_DelForPy3(x) to free the space.
807  */
808 SWIGINTERN char*
810 {
811 #if PY_VERSION_HEX >= 0x03000000
812  char *newstr = 0;
813  str = PyUnicode_AsUTF8String(str);
814  if (str) {
815  char *cstr;
816  Py_ssize_t len;
817  PyBytes_AsStringAndSize(str, &cstr, &len);
818  newstr = (char *) malloc(len+1);
819  memcpy(newstr, cstr, len+1);
820  Py_XDECREF(str);
821  }
822  return newstr;
823 #else
824  return PyString_AsString(str);
825 #endif
826 }
827 
828 #if PY_VERSION_HEX >= 0x03000000
829 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
830 #else
831 # define SWIG_Python_str_DelForPy3(x)
832 #endif
833 
834 
835 SWIGINTERN PyObject*
837 {
838 #if PY_VERSION_HEX >= 0x03000000
839  return PyUnicode_FromString(c);
840 #else
841  return PyString_FromString(c);
842 #endif
843 }
844 
845 #ifndef PyObject_DEL
846 # define PyObject_DEL PyObject_Del
847 #endif
848 
849 // SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user
850 // interface files check for it.
851 # define SWIGPY_USE_CAPSULE
852 # define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
853 
854 #if PY_VERSION_HEX < 0x03020000
855 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
856 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
857 #define Py_hash_t long
858 #endif
859 
860 /* -----------------------------------------------------------------------------
861  * error manipulation
862  * ----------------------------------------------------------------------------- */
863 
864 SWIGRUNTIME PyObject*
866  PyObject* type = 0;
867  switch(code) {
868  case SWIG_MemoryError:
869  type = PyExc_MemoryError;
870  break;
871  case SWIG_IOError:
872  type = PyExc_IOError;
873  break;
874  case SWIG_RuntimeError:
875  type = PyExc_RuntimeError;
876  break;
877  case SWIG_IndexError:
878  type = PyExc_IndexError;
879  break;
880  case SWIG_TypeError:
881  type = PyExc_TypeError;
882  break;
883  case SWIG_DivisionByZero:
884  type = PyExc_ZeroDivisionError;
885  break;
886  case SWIG_OverflowError:
887  type = PyExc_OverflowError;
888  break;
889  case SWIG_SyntaxError:
890  type = PyExc_SyntaxError;
891  break;
892  case SWIG_ValueError:
893  type = PyExc_ValueError;
894  break;
895  case SWIG_SystemError:
896  type = PyExc_SystemError;
897  break;
898  case SWIG_AttributeError:
899  type = PyExc_AttributeError;
900  break;
901  default:
902  type = PyExc_RuntimeError;
903  }
904  return type;
905 }
906 
907 
908 SWIGRUNTIME void
909 SWIG_Python_AddErrorMsg(const char* mesg)
910 {
911  PyObject *type = 0;
912  PyObject *value = 0;
913  PyObject *traceback = 0;
914 
915  if (PyErr_Occurred())
916  PyErr_Fetch(&type, &value, &traceback);
917  if (value) {
918  PyObject *old_str = PyObject_Str(value);
919  const char *tmp = SWIG_Python_str_AsChar(old_str);
920  PyErr_Clear();
921  Py_XINCREF(type);
922  if (tmp)
923  PyErr_Format(type, "%s %s", tmp, mesg);
924  else
925  PyErr_Format(type, "%s", mesg);
927  Py_DECREF(old_str);
928  Py_DECREF(value);
929  } else {
930  PyErr_SetString(PyExc_RuntimeError, mesg);
931  }
932 }
933 
934 SWIGRUNTIME int
936 {
937  PyObject *error;
938  if (obj)
939  return 0;
940  error = PyErr_Occurred();
941  return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError);
942 }
943 
944 SWIGRUNTIME void
946 {
947  if (SWIG_Python_TypeErrorOccurred(NULL)) {
948  /* Use existing TypeError to preserve stacktrace and enhance with given message */
949  PyObject *newvalue;
950  PyObject *type = NULL, *value = NULL, *traceback = NULL;
951  PyErr_Fetch(&type, &value, &traceback);
952 #if PY_VERSION_HEX >= 0x03000000
953  newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message);
954 #else
955  newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message);
956 #endif
957  Py_XDECREF(value);
958  PyErr_Restore(type, newvalue, traceback);
959  } else {
960  /* Raise TypeError using given message */
961  PyErr_SetString(PyExc_TypeError, message);
962  }
963 }
964 
965 #if defined(SWIG_PYTHON_NO_THREADS)
966 # if defined(SWIG_PYTHON_THREADS)
967 # undef SWIG_PYTHON_THREADS
968 # endif
969 #endif
970 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
971 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
972 # define SWIG_PYTHON_USE_GIL
973 # endif
974 # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
975 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
976 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
977 # endif
978 # ifdef __cplusplus /* C++ code */
979  class SWIG_Python_Thread_Block {
980  bool status;
981  PyGILState_STATE state;
982  public:
983  void end() { if (status) { PyGILState_Release(state); status = false;} }
984  SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
985  ~SWIG_Python_Thread_Block() { end(); }
986  };
987  class SWIG_Python_Thread_Allow {
988  bool status;
989  PyThreadState *save;
990  public:
991  void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
992  SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
993  ~SWIG_Python_Thread_Allow() { end(); }
994  };
995 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
996 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
997 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
998 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
999 # else /* C code */
1000 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1001 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
1002 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1003 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
1004 # endif
1005 # else /* Old thread way, not implemented, user must provide it */
1006 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1007 # define SWIG_PYTHON_INITIALIZE_THREADS
1008 # endif
1009 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1010 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1011 # endif
1012 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1013 # define SWIG_PYTHON_THREAD_END_BLOCK
1014 # endif
1015 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1016 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1017 # endif
1018 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1019 # define SWIG_PYTHON_THREAD_END_ALLOW
1020 # endif
1021 # endif
1022 #else /* No thread support */
1023 # define SWIG_PYTHON_INITIALIZE_THREADS
1024 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1025 # define SWIG_PYTHON_THREAD_END_BLOCK
1026 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1027 # define SWIG_PYTHON_THREAD_END_ALLOW
1028 #endif
1029 
1030 /* -----------------------------------------------------------------------------
1031  * Python API portion that goes into the runtime
1032  * ----------------------------------------------------------------------------- */
1033 
1034 #ifdef __cplusplus
1035 extern "C" {
1036 #endif
1037 
1038 /* -----------------------------------------------------------------------------
1039  * Constant declarations
1040  * ----------------------------------------------------------------------------- */
1041 
1042 /* Constant Types */
1043 #define SWIG_PY_POINTER 4
1044 #define SWIG_PY_BINARY 5
1045 
1046 /* Constant information structure */
1047 typedef struct swig_const_info {
1048  int type;
1049  const char *name;
1050  long lvalue;
1051  double dvalue;
1052  void *pvalue;
1054 } swig_const_info;
1055 
1056 #ifdef __cplusplus
1057 }
1058 #endif
1059 
1060 
1061 /* -----------------------------------------------------------------------------
1062  * pyrun.swg
1063  *
1064  * This file contains the runtime support for Python modules
1065  * and includes code for managing global variables and pointer
1066  * type checking.
1067  *
1068  * ----------------------------------------------------------------------------- */
1069 
1070 #if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */
1071 # error "This version of SWIG only supports Python >= 2.7"
1072 #endif
1073 
1074 #if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000
1075 # error "This version of SWIG only supports Python 3 >= 3.2"
1076 #endif
1077 
1078 /* Common SWIG API */
1079 
1080 /* for raw pointers */
1081 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1082 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1083 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1084 
1085 #ifdef SWIGPYTHON_BUILTIN
1086 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
1087 #else
1088 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1089 #endif
1090 
1091 #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1092 
1093 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1094 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1095 #define swig_owntype int
1096 
1097 /* for raw packed data */
1098 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1099 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1100 
1101 /* for class or struct pointers */
1102 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1103 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1104 
1105 /* for C or C++ function pointers */
1106 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1107 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1108 
1109 /* for C++ member pointers, ie, member methods */
1110 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1111 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1112 
1113 
1114 /* Runtime API */
1115 
1116 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
1117 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1118 #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1119 
1120 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1121 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1122 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1123 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1124 #define SWIG_fail goto fail
1125 
1126 
1127 /* Runtime API implementation */
1128 
1129 /* Error manipulation */
1130 
1131 SWIGINTERN void
1132 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1134  PyErr_SetObject(errtype, obj);
1135  Py_DECREF(obj);
1137 }
1138 
1139 SWIGINTERN void
1140 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1142  PyErr_SetString(errtype, msg);
1144 }
1145 
1146 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1147 
1148 /* Set a constant value */
1149 
1150 #if defined(SWIGPYTHON_BUILTIN)
1151 
1152 SWIGINTERN void
1153 SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
1154  PyObject *s = PyString_InternFromString(key);
1155  PyList_Append(seq, s);
1156  Py_DECREF(s);
1157 }
1158 
1159 SWIGINTERN void
1160 SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
1161  PyDict_SetItemString(d, name, obj);
1162  Py_DECREF(obj);
1163  if (public_interface)
1164  SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1165 }
1166 
1167 #else
1168 
1169 SWIGINTERN void
1170 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1171  PyDict_SetItemString(d, name, obj);
1172  Py_DECREF(obj);
1173 }
1174 
1175 #endif
1176 
1177 /* Append a value to the result obj */
1178 
1179 SWIGINTERN PyObject*
1180 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1181  if (!result) {
1182  result = obj;
1183  } else if (result == Py_None) {
1184  Py_DECREF(result);
1185  result = obj;
1186  } else {
1187  if (!PyList_Check(result)) {
1188  PyObject *o2 = result;
1189  result = PyList_New(1);
1190  PyList_SetItem(result, 0, o2);
1191  }
1192  PyList_Append(result,obj);
1193  Py_DECREF(obj);
1194  }
1195  return result;
1196 }
1197 
1198 /* Unpack the argument tuple */
1199 
1200 SWIGINTERN Py_ssize_t
1201 SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1202 {
1203  if (!args) {
1204  if (!min && !max) {
1205  return 1;
1206  } else {
1207  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1208  name, (min == max ? "" : "at least "), (int)min);
1209  return 0;
1210  }
1211  }
1212  if (!PyTuple_Check(args)) {
1213  if (min <= 1 && max >= 1) {
1214  Py_ssize_t i;
1215  objs[0] = args;
1216  for (i = 1; i < max; ++i) {
1217  objs[i] = 0;
1218  }
1219  return 2;
1220  }
1221  PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1222  return 0;
1223  } else {
1224  Py_ssize_t l = PyTuple_GET_SIZE(args);
1225  if (l < min) {
1226  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1227  name, (min == max ? "" : "at least "), (int)min, (int)l);
1228  return 0;
1229  } else if (l > max) {
1230  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1231  name, (min == max ? "" : "at most "), (int)max, (int)l);
1232  return 0;
1233  } else {
1234  Py_ssize_t i;
1235  for (i = 0; i < l; ++i) {
1236  objs[i] = PyTuple_GET_ITEM(args, i);
1237  }
1238  for (; l < max; ++l) {
1239  objs[l] = 0;
1240  }
1241  return i + 1;
1242  }
1243  }
1244 }
1245 
1246 /* A functor is a function object with one single object argument */
1247 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1248 
1249 /*
1250  Helper for static pointer initialization for both C and C++ code, for example
1251  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1252 */
1253 #ifdef __cplusplus
1254 #define SWIG_STATIC_POINTER(var) var
1255 #else
1256 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1257 #endif
1258 
1259 /* -----------------------------------------------------------------------------
1260  * Pointer declarations
1261  * ----------------------------------------------------------------------------- */
1262 
1263 /* Flags for new pointer objects */
1264 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1265 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1266 
1267 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1268 
1269 #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
1270 #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1271 
1272 #ifdef __cplusplus
1273 extern "C" {
1274 #endif
1275 
1276 /* The python void return value */
1277 
1278 SWIGRUNTIMEINLINE PyObject *
1280 {
1281  PyObject *none = Py_None;
1282  Py_INCREF(none);
1283  return none;
1284 }
1285 
1286 /* SwigPyClientData */
1287 
1288 typedef struct {
1289  PyObject *klass;
1290  PyObject *newraw;
1291  PyObject *newargs;
1292  PyObject *destroy;
1293  int delargs;
1294  int implicitconv;
1295  PyTypeObject *pytype;
1297 
1298 SWIGRUNTIMEINLINE int
1300 {
1302  int fail = data ? data->implicitconv : 0;
1303  if (fail)
1304  PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors.");
1305  return fail;
1306 }
1307 
1308 SWIGRUNTIMEINLINE PyObject *
1310  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1311  PyObject *klass = data ? data->klass : 0;
1312  return (klass ? klass : PyExc_RuntimeError);
1313 }
1314 
1315 
1317 SwigPyClientData_New(PyObject* obj)
1318 {
1319  if (!obj) {
1320  return 0;
1321  } else {
1323  /* the klass element */
1324  data->klass = obj;
1325  Py_INCREF(data->klass);
1326  /* the newraw method and newargs arguments used to create a new raw instance */
1327  if (PyClass_Check(obj)) {
1328  data->newraw = 0;
1329  data->newargs = obj;
1330  Py_INCREF(obj);
1331  } else {
1332  data->newraw = PyObject_GetAttrString(data->klass, "__new__");
1333  if (data->newraw) {
1334  Py_INCREF(data->newraw);
1335  data->newargs = PyTuple_New(1);
1336  PyTuple_SetItem(data->newargs, 0, obj);
1337  } else {
1338  data->newargs = obj;
1339  }
1340  Py_INCREF(data->newargs);
1341  }
1342  /* the destroy method, aka as the C++ delete method */
1343  data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
1344  if (PyErr_Occurred()) {
1345  PyErr_Clear();
1346  data->destroy = 0;
1347  }
1348  if (data->destroy) {
1349  int flags;
1350  Py_INCREF(data->destroy);
1351  flags = PyCFunction_GET_FLAGS(data->destroy);
1352  data->delargs = !(flags & (METH_O));
1353  } else {
1354  data->delargs = 0;
1355  }
1356  data->implicitconv = 0;
1357  data->pytype = 0;
1358  return data;
1359  }
1360 }
1361 
1362 SWIGRUNTIME void
1364  Py_XDECREF(data->newraw);
1365  Py_XDECREF(data->newargs);
1366  Py_XDECREF(data->destroy);
1367 }
1368 
1369 /* =============== SwigPyObject =====================*/
1370 
1371 typedef struct {
1372  PyObject_HEAD
1373  void *ptr;
1374  swig_type_info *ty;
1375  int own;
1376  PyObject *next;
1377 #ifdef SWIGPYTHON_BUILTIN
1378  PyObject *dict;
1379 #endif
1380 } SwigPyObject;
1381 
1382 
1383 #ifdef SWIGPYTHON_BUILTIN
1384 
1385 SWIGRUNTIME PyObject *
1386 SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1387 {
1388  SwigPyObject *sobj = (SwigPyObject *)v;
1389 
1390  if (!sobj->dict)
1391  sobj->dict = PyDict_New();
1392 
1393  Py_INCREF(sobj->dict);
1394  return sobj->dict;
1395 }
1396 
1397 #endif
1398 
1399 SWIGRUNTIME PyObject *
1401 {
1402  return PyLong_FromVoidPtr(v->ptr);
1403 }
1404 
1405 SWIGRUNTIME PyObject *
1406 SwigPyObject_format(const char* fmt, SwigPyObject *v)
1407 {
1408  PyObject *res = NULL;
1409  PyObject *args = PyTuple_New(1);
1410  if (args) {
1411  if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1412  PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1413  if (ofmt) {
1414 #if PY_VERSION_HEX >= 0x03000000
1415  res = PyUnicode_Format(ofmt,args);
1416 #else
1417  res = PyString_Format(ofmt,args);
1418 #endif
1419  Py_DECREF(ofmt);
1420  }
1421  Py_DECREF(args);
1422  }
1423  }
1424  return res;
1425 }
1426 
1427 SWIGRUNTIME PyObject *
1429 {
1430  return SwigPyObject_format("%o",v);
1431 }
1432 
1433 SWIGRUNTIME PyObject *
1435 {
1436  return SwigPyObject_format("%x",v);
1437 }
1438 
1439 SWIGRUNTIME PyObject *
1441 {
1442  const char *name = SWIG_TypePrettyName(v->ty);
1443  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
1444  if (v->next) {
1445  PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1446 # if PY_VERSION_HEX >= 0x03000000
1447  PyObject *joined = PyUnicode_Concat(repr, nrep);
1448  Py_DecRef(repr);
1449  Py_DecRef(nrep);
1450  repr = joined;
1451 # else
1452  PyString_ConcatAndDel(&repr,nrep);
1453 # endif
1454  }
1455  return repr;
1456 }
1457 
1458 /* We need a version taking two PyObject* parameters so it's a valid
1459  * PyCFunction to use in swigobject_methods[]. */
1460 SWIGRUNTIME PyObject *
1461 SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1462 {
1463  return SwigPyObject_repr((SwigPyObject*)v);
1464 }
1465 
1466 SWIGRUNTIME int
1468 {
1469  void *i = v->ptr;
1470  void *j = w->ptr;
1471  return (i < j) ? -1 : ((i > j) ? 1 : 0);
1472 }
1473 
1474 /* Added for Python 3.x, would it also be useful for Python 2.x? */
1475 SWIGRUNTIME PyObject*
1477 {
1478  PyObject* res;
1479  if( op != Py_EQ && op != Py_NE ) {
1480  Py_INCREF(Py_NotImplemented);
1481  return Py_NotImplemented;
1482  }
1483  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1484  return res;
1485 }
1486 
1487 
1488 SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
1489 
1490 #ifdef SWIGPYTHON_BUILTIN
1491 static swig_type_info *SwigPyObject_stype = 0;
1492 SWIGRUNTIME PyTypeObject*
1493 SwigPyObject_type(void) {
1494  SwigPyClientData *cd;
1495  assert(SwigPyObject_stype);
1496  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
1497  assert(cd);
1498  assert(cd->pytype);
1499  return cd->pytype;
1500 }
1501 #else
1502 SWIGRUNTIME PyTypeObject*
1504  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1505  return type;
1506 }
1507 #endif
1508 
1510 SwigPyObject_Check(PyObject *op) {
1511 #ifdef SWIGPYTHON_BUILTIN
1512  PyTypeObject *target_tp = SwigPyObject_type();
1513  if (PyType_IsSubtype(op->ob_type, target_tp))
1514  return 1;
1515  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
1516 #else
1517  return (Py_TYPE(op) == SwigPyObject_type())
1518  || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
1519 #endif
1520 }
1521 
1522 SWIGRUNTIME PyObject *
1523 SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
1524 
1525 SWIGRUNTIME void
1527 {
1528  SwigPyObject *sobj = (SwigPyObject *) v;
1529  PyObject *next = sobj->next;
1530  if (sobj->own == SWIG_POINTER_OWN) {
1531  swig_type_info *ty = sobj->ty;
1532  SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1533  PyObject *destroy = data ? data->destroy : 0;
1534  if (destroy) {
1535  /* destroy is always a VARARGS method */
1536  PyObject *res;
1537 
1538  /* PyObject_CallFunction() has the potential to silently drop
1539  the active exception. In cases of unnamed temporary
1540  variable or where we just finished iterating over a generator
1541  StopIteration will be active right now, and this needs to
1542  remain true upon return from SwigPyObject_dealloc. So save
1543  and restore. */
1544 
1545  PyObject *type = NULL, *value = NULL, *traceback = NULL;
1546  PyErr_Fetch(&type, &value, &traceback);
1547 
1548  if (data->delargs) {
1549  /* we need to create a temporary object to carry the destroy operation */
1550  PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1551  res = SWIG_Python_CallFunctor(destroy, tmp);
1552  Py_DECREF(tmp);
1553  } else {
1554  PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1555  PyObject *mself = PyCFunction_GET_SELF(destroy);
1556  res = ((*meth)(mself, v));
1557  }
1558  if (!res)
1559  PyErr_WriteUnraisable(destroy);
1560 
1561  PyErr_Restore(type, value, traceback);
1562 
1563  Py_XDECREF(res);
1564  }
1565 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1566  else {
1567  const char *name = SWIG_TypePrettyName(ty);
1568  printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1569  }
1570 #endif
1571  }
1572  Py_XDECREF(next);
1573  PyObject_DEL(v);
1574 }
1575 
1576 SWIGRUNTIME PyObject*
1577 SwigPyObject_append(PyObject* v, PyObject* next)
1578 {
1579  SwigPyObject *sobj = (SwigPyObject *) v;
1580  if (!SwigPyObject_Check(next)) {
1581  PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
1582  return NULL;
1583  }
1584  sobj->next = next;
1585  Py_INCREF(next);
1586  return SWIG_Py_Void();
1587 }
1588 
1589 SWIGRUNTIME PyObject*
1590 SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1591 {
1592  SwigPyObject *sobj = (SwigPyObject *) v;
1593  if (sobj->next) {
1594  Py_INCREF(sobj->next);
1595  return sobj->next;
1596  } else {
1597  return SWIG_Py_Void();
1598  }
1599 }
1600 
1601 SWIGINTERN PyObject*
1602 SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1603 {
1604  SwigPyObject *sobj = (SwigPyObject *)v;
1605  sobj->own = 0;
1606  return SWIG_Py_Void();
1607 }
1608 
1609 SWIGINTERN PyObject*
1610 SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1611 {
1612  SwigPyObject *sobj = (SwigPyObject *)v;
1613  sobj->own = SWIG_POINTER_OWN;
1614  return SWIG_Py_Void();
1615 }
1616 
1617 SWIGINTERN PyObject*
1618 SwigPyObject_own(PyObject *v, PyObject *args)
1619 {
1620  PyObject *val = 0;
1621  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
1622  return NULL;
1623  } else {
1624  SwigPyObject *sobj = (SwigPyObject *)v;
1625  PyObject *obj = PyBool_FromLong(sobj->own);
1626  if (val) {
1627  if (PyObject_IsTrue(val)) {
1628  SwigPyObject_acquire(v,args);
1629  } else {
1630  SwigPyObject_disown(v,args);
1631  }
1632  }
1633  return obj;
1634  }
1635 }
1636 
1637 static PyMethodDef
1639  {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"},
1640  {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"},
1641  {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"},
1642  {"append", SwigPyObject_append, METH_O, "appends another 'this' object"},
1643  {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"},
1644  {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"},
1645  {0, 0, 0, 0}
1646 };
1647 
1648 SWIGRUNTIME PyTypeObject*
1650  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1651 
1652  static PyNumberMethods SwigPyObject_as_number = {
1653  (binaryfunc)0, /*nb_add*/
1654  (binaryfunc)0, /*nb_subtract*/
1655  (binaryfunc)0, /*nb_multiply*/
1656  /* nb_divide removed in Python 3 */
1657 #if PY_VERSION_HEX < 0x03000000
1658  (binaryfunc)0, /*nb_divide*/
1659 #endif
1660  (binaryfunc)0, /*nb_remainder*/
1661  (binaryfunc)0, /*nb_divmod*/
1662  (ternaryfunc)0,/*nb_power*/
1663  (unaryfunc)0, /*nb_negative*/
1664  (unaryfunc)0, /*nb_positive*/
1665  (unaryfunc)0, /*nb_absolute*/
1666  (inquiry)0, /*nb_nonzero*/
1667  0, /*nb_invert*/
1668  0, /*nb_lshift*/
1669  0, /*nb_rshift*/
1670  0, /*nb_and*/
1671  0, /*nb_xor*/
1672  0, /*nb_or*/
1673 #if PY_VERSION_HEX < 0x03000000
1674  0, /*nb_coerce*/
1675 #endif
1676  (unaryfunc)SwigPyObject_long, /*nb_int*/
1677 #if PY_VERSION_HEX < 0x03000000
1678  (unaryfunc)SwigPyObject_long, /*nb_long*/
1679 #else
1680  0, /*nb_reserved*/
1681 #endif
1682  (unaryfunc)0, /*nb_float*/
1683 #if PY_VERSION_HEX < 0x03000000
1684  (unaryfunc)SwigPyObject_oct, /*nb_oct*/
1685  (unaryfunc)SwigPyObject_hex, /*nb_hex*/
1686 #endif
1687 #if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
1688  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
1689 #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
1690  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
1691 #else
1692  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1693 #endif
1694  };
1695 
1696  static PyTypeObject swigpyobject_type;
1697  static int type_init = 0;
1698  if (!type_init) {
1699  const PyTypeObject tmp = {
1700 #if PY_VERSION_HEX >= 0x03000000
1701  PyVarObject_HEAD_INIT(NULL, 0)
1702 #else
1703  PyObject_HEAD_INIT(NULL)
1704  0, /* ob_size */
1705 #endif
1706  "SwigPyObject", /* tp_name */
1707  sizeof(SwigPyObject), /* tp_basicsize */
1708  0, /* tp_itemsize */
1709  (destructor)SwigPyObject_dealloc, /* tp_dealloc */
1710  0, /* tp_print */
1711  (getattrfunc)0, /* tp_getattr */
1712  (setattrfunc)0, /* tp_setattr */
1713 #if PY_VERSION_HEX >= 0x03000000
1714  0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1715 #else
1716  (cmpfunc)SwigPyObject_compare, /* tp_compare */
1717 #endif
1718  (reprfunc)SwigPyObject_repr, /* tp_repr */
1719  &SwigPyObject_as_number, /* tp_as_number */
1720  0, /* tp_as_sequence */
1721  0, /* tp_as_mapping */
1722  (hashfunc)0, /* tp_hash */
1723  (ternaryfunc)0, /* tp_call */
1724  0, /* tp_str */
1725  PyObject_GenericGetAttr, /* tp_getattro */
1726  0, /* tp_setattro */
1727  0, /* tp_as_buffer */
1728  Py_TPFLAGS_DEFAULT, /* tp_flags */
1729  swigobject_doc, /* tp_doc */
1730  0, /* tp_traverse */
1731  0, /* tp_clear */
1732  (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
1733  0, /* tp_weaklistoffset */
1734  0, /* tp_iter */
1735  0, /* tp_iternext */
1736  swigobject_methods, /* tp_methods */
1737  0, /* tp_members */
1738  0, /* tp_getset */
1739  0, /* tp_base */
1740  0, /* tp_dict */
1741  0, /* tp_descr_get */
1742  0, /* tp_descr_set */
1743  0, /* tp_dictoffset */
1744  0, /* tp_init */
1745  0, /* tp_alloc */
1746  0, /* tp_new */
1747  0, /* tp_free */
1748  0, /* tp_is_gc */
1749  0, /* tp_bases */
1750  0, /* tp_mro */
1751  0, /* tp_cache */
1752  0, /* tp_subclasses */
1753  0, /* tp_weaklist */
1754  0, /* tp_del */
1755  0, /* tp_version_tag */
1756 #if PY_VERSION_HEX >= 0x03040000
1757  0, /* tp_finalize */
1758 #endif
1759 #ifdef COUNT_ALLOCS
1760  0, /* tp_allocs */
1761  0, /* tp_frees */
1762  0, /* tp_maxalloc */
1763  0, /* tp_prev */
1764  0 /* tp_next */
1765 #endif
1766  };
1767  swigpyobject_type = tmp;
1768  type_init = 1;
1769  if (PyType_Ready(&swigpyobject_type) < 0)
1770  return NULL;
1771  }
1772  return &swigpyobject_type;
1773 }
1774 
1775 SWIGRUNTIME PyObject *
1776 SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1777 {
1778  SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
1779  if (sobj) {
1780  sobj->ptr = ptr;
1781  sobj->ty = ty;
1782  sobj->own = own;
1783  sobj->next = 0;
1784  }
1785  return (PyObject *)sobj;
1786 }
1787 
1788 /* -----------------------------------------------------------------------------
1789  * Implements a simple Swig Packed type, and use it instead of string
1790  * ----------------------------------------------------------------------------- */
1791 
1792 typedef struct {
1793  PyObject_HEAD
1794  void *pack;
1795  swig_type_info *ty;
1796  size_t size;
1797 } SwigPyPacked;
1798 
1799 SWIGRUNTIME PyObject *
1801 {
1802  char result[SWIG_BUFFER_SIZE];
1803  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1804  return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
1805  } else {
1806  return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
1807  }
1808 }
1809 
1810 SWIGRUNTIME PyObject *
1812 {
1813  char result[SWIG_BUFFER_SIZE];
1814  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
1815  return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
1816  } else {
1817  return SWIG_Python_str_FromChar(v->ty->name);
1818  }
1819 }
1820 
1821 SWIGRUNTIME int
1823 {
1824  size_t i = v->size;
1825  size_t j = w->size;
1826  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
1827  return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size);
1828 }
1829 
1830 SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
1831 
1832 SWIGRUNTIME PyTypeObject*
1834  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
1835  return type;
1836 }
1837 
1839 SwigPyPacked_Check(PyObject *op) {
1840  return ((op)->ob_type == SwigPyPacked_TypeOnce())
1841  || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
1842 }
1843 
1844 SWIGRUNTIME void
1846 {
1847  if (SwigPyPacked_Check(v)) {
1848  SwigPyPacked *sobj = (SwigPyPacked *) v;
1849  free(sobj->pack);
1850  }
1851  PyObject_DEL(v);
1852 }
1853 
1854 SWIGRUNTIME PyTypeObject*
1856  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
1857  static PyTypeObject swigpypacked_type;
1858  static int type_init = 0;
1859  if (!type_init) {
1860  const PyTypeObject tmp = {
1861 #if PY_VERSION_HEX>=0x03000000
1862  PyVarObject_HEAD_INIT(NULL, 0)
1863 #else
1864  PyObject_HEAD_INIT(NULL)
1865  0, /* ob_size */
1866 #endif
1867  "SwigPyPacked", /* tp_name */
1868  sizeof(SwigPyPacked), /* tp_basicsize */
1869  0, /* tp_itemsize */
1870  (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
1871  0, /* tp_print */
1872  (getattrfunc)0, /* tp_getattr */
1873  (setattrfunc)0, /* tp_setattr */
1874 #if PY_VERSION_HEX>=0x03000000
1875  0, /* tp_reserved in 3.0.1 */
1876 #else
1877  (cmpfunc)SwigPyPacked_compare, /* tp_compare */
1878 #endif
1879  (reprfunc)SwigPyPacked_repr, /* tp_repr */
1880  0, /* tp_as_number */
1881  0, /* tp_as_sequence */
1882  0, /* tp_as_mapping */
1883  (hashfunc)0, /* tp_hash */
1884  (ternaryfunc)0, /* tp_call */
1885  (reprfunc)SwigPyPacked_str, /* tp_str */
1886  PyObject_GenericGetAttr, /* tp_getattro */
1887  0, /* tp_setattro */
1888  0, /* tp_as_buffer */
1889  Py_TPFLAGS_DEFAULT, /* tp_flags */
1890  swigpacked_doc, /* tp_doc */
1891  0, /* tp_traverse */
1892  0, /* tp_clear */
1893  0, /* tp_richcompare */
1894  0, /* tp_weaklistoffset */
1895  0, /* tp_iter */
1896  0, /* tp_iternext */
1897  0, /* tp_methods */
1898  0, /* tp_members */
1899  0, /* tp_getset */
1900  0, /* tp_base */
1901  0, /* tp_dict */
1902  0, /* tp_descr_get */
1903  0, /* tp_descr_set */
1904  0, /* tp_dictoffset */
1905  0, /* tp_init */
1906  0, /* tp_alloc */
1907  0, /* tp_new */
1908  0, /* tp_free */
1909  0, /* tp_is_gc */
1910  0, /* tp_bases */
1911  0, /* tp_mro */
1912  0, /* tp_cache */
1913  0, /* tp_subclasses */
1914  0, /* tp_weaklist */
1915  0, /* tp_del */
1916  0, /* tp_version_tag */
1917 #if PY_VERSION_HEX >= 0x03040000
1918  0, /* tp_finalize */
1919 #endif
1920 #ifdef COUNT_ALLOCS
1921  0, /* tp_allocs */
1922  0, /* tp_frees */
1923  0, /* tp_maxalloc */
1924  0, /* tp_prev */
1925  0 /* tp_next */
1926 #endif
1927  };
1928  swigpypacked_type = tmp;
1929  type_init = 1;
1930  if (PyType_Ready(&swigpypacked_type) < 0)
1931  return NULL;
1932  }
1933  return &swigpypacked_type;
1934 }
1935 
1936 SWIGRUNTIME PyObject *
1937 SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
1938 {
1939  SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
1940  if (sobj) {
1941  void *pack = malloc(size);
1942  if (pack) {
1943  memcpy(pack, ptr, size);
1944  sobj->pack = pack;
1945  sobj->ty = ty;
1946  sobj->size = size;
1947  } else {
1948  PyObject_DEL((PyObject *) sobj);
1949  sobj = 0;
1950  }
1951  }
1952  return (PyObject *) sobj;
1953 }
1954 
1956 SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
1957 {
1958  if (SwigPyPacked_Check(obj)) {
1959  SwigPyPacked *sobj = (SwigPyPacked *)obj;
1960  if (sobj->size != size) return 0;
1961  memcpy(ptr, sobj->pack, size);
1962  return sobj->ty;
1963  } else {
1964  return 0;
1965  }
1966 }
1967 
1968 /* -----------------------------------------------------------------------------
1969  * pointers/data manipulation
1970  * ----------------------------------------------------------------------------- */
1971 
1972 static PyObject *Swig_This_global = NULL;
1973 
1974 SWIGRUNTIME PyObject *
1976 {
1977  if (Swig_This_global == NULL)
1979  return Swig_This_global;
1980 }
1981 
1982 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
1983 
1984 /* TODO: I don't know how to implement the fast getset in Python 3 right now */
1985 #if PY_VERSION_HEX>=0x03000000
1986 #define SWIG_PYTHON_SLOW_GETSET_THIS
1987 #endif
1988 
1990 SWIG_Python_GetSwigThis(PyObject *pyobj)
1991 {
1992  PyObject *obj;
1993 
1994  if (SwigPyObject_Check(pyobj))
1995  return (SwigPyObject *) pyobj;
1996 
1997 #ifdef SWIGPYTHON_BUILTIN
1998  (void)obj;
1999 # ifdef PyWeakref_CheckProxy
2000  if (PyWeakref_CheckProxy(pyobj)) {
2001  pyobj = PyWeakref_GET_OBJECT(pyobj);
2002  if (pyobj && SwigPyObject_Check(pyobj))
2003  return (SwigPyObject*) pyobj;
2004  }
2005 # endif
2006  return NULL;
2007 #else
2008 
2009  obj = 0;
2010 
2011 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2012  if (PyInstance_Check(pyobj)) {
2013  obj = _PyInstance_Lookup(pyobj, SWIG_This());
2014  } else {
2015  PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2016  if (dictptr != NULL) {
2017  PyObject *dict = *dictptr;
2018  obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2019  } else {
2020 #ifdef PyWeakref_CheckProxy
2021  if (PyWeakref_CheckProxy(pyobj)) {
2022  PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2023  return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2024  }
2025 #endif
2026  obj = PyObject_GetAttr(pyobj,SWIG_This());
2027  if (obj) {
2028  Py_DECREF(obj);
2029  } else {
2030  if (PyErr_Occurred()) PyErr_Clear();
2031  return 0;
2032  }
2033  }
2034  }
2035 #else
2036  obj = PyObject_GetAttr(pyobj,SWIG_This());
2037  if (obj) {
2038  Py_DECREF(obj);
2039  } else {
2040  if (PyErr_Occurred()) PyErr_Clear();
2041  return 0;
2042  }
2043 #endif
2044  if (obj && !SwigPyObject_Check(obj)) {
2045  /* a PyObject is called 'this', try to get the 'real this'
2046  SwigPyObject from it */
2047  return SWIG_Python_GetSwigThis(obj);
2048  }
2049  return (SwigPyObject *)obj;
2050 #endif
2051 }
2052 
2053 /* Acquire a pointer value */
2054 
2055 SWIGRUNTIME int
2056 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2057  if (own == SWIG_POINTER_OWN) {
2059  if (sobj) {
2060  int oldown = sobj->own;
2061  sobj->own = own;
2062  return oldown;
2063  }
2064  }
2065  return 0;
2066 }
2067 
2068 /* Convert a pointer value */
2069 
2070 SWIGRUNTIME int
2071 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2072  int res;
2073  SwigPyObject *sobj;
2074  int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2075 
2076  if (!obj)
2077  return SWIG_ERROR;
2078  if (obj == Py_None && !implicit_conv) {
2079  if (ptr)
2080  *ptr = 0;
2082  }
2083 
2084  res = SWIG_ERROR;
2085 
2086  sobj = SWIG_Python_GetSwigThis(obj);
2087  if (own)
2088  *own = 0;
2089  while (sobj) {
2090  void *vptr = sobj->ptr;
2091  if (ty) {
2092  swig_type_info *to = sobj->ty;
2093  if (to == ty) {
2094  /* no type cast needed */
2095  if (ptr) *ptr = vptr;
2096  break;
2097  } else {
2098  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2099  if (!tc) {
2100  sobj = (SwigPyObject *)sobj->next;
2101  } else {
2102  if (ptr) {
2103  int newmemory = 0;
2104  *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2105  if (newmemory == SWIG_CAST_NEW_MEMORY) {
2106  assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
2107  if (own)
2108  *own = *own | SWIG_CAST_NEW_MEMORY;
2109  }
2110  }
2111  break;
2112  }
2113  }
2114  } else {
2115  if (ptr) *ptr = vptr;
2116  break;
2117  }
2118  }
2119  if (sobj) {
2120  if (own)
2121  *own = *own | sobj->own;
2122  if (flags & SWIG_POINTER_DISOWN) {
2123  sobj->own = 0;
2124  }
2125  res = SWIG_OK;
2126  } else {
2127  if (implicit_conv) {
2128  SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
2129  if (data && !data->implicitconv) {
2130  PyObject *klass = data->klass;
2131  if (klass) {
2132  PyObject *impconv;
2133  data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2134  impconv = SWIG_Python_CallFunctor(klass, obj);
2135  data->implicitconv = 0;
2136  if (PyErr_Occurred()) {
2137  PyErr_Clear();
2138  impconv = 0;
2139  }
2140  if (impconv) {
2141  SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2142  if (iobj) {
2143  void *vptr;
2144  res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2145  if (SWIG_IsOK(res)) {
2146  if (ptr) {
2147  *ptr = vptr;
2148  /* transfer the ownership to 'ptr' */
2149  iobj->own = 0;
2150  res = SWIG_AddCast(res);
2151  res = SWIG_AddNewMask(res);
2152  } else {
2153  res = SWIG_AddCast(res);
2154  }
2155  }
2156  }
2157  Py_DECREF(impconv);
2158  }
2159  }
2160  }
2161  if (!SWIG_IsOK(res) && obj == Py_None) {
2162  if (ptr)
2163  *ptr = 0;
2164  if (PyErr_Occurred())
2165  PyErr_Clear();
2166  res = SWIG_OK;
2167  }
2168  }
2169  }
2170  return res;
2171 }
2172 
2173 /* Convert a function ptr value */
2174 
2175 SWIGRUNTIME int
2176 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2177  if (!PyCFunction_Check(obj)) {
2178  return SWIG_ConvertPtr(obj, ptr, ty, 0);
2179  } else {
2180  void *vptr = 0;
2181  swig_cast_info *tc;
2182 
2183  /* here we get the method pointer for callbacks */
2184  const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2185  const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2186  if (desc)
2187  desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2188  if (!desc)
2189  return SWIG_ERROR;
2190  tc = SWIG_TypeCheck(desc,ty);
2191  if (tc) {
2192  int newmemory = 0;
2193  *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2194  assert(!newmemory); /* newmemory handling not yet implemented */
2195  } else {
2196  return SWIG_ERROR;
2197  }
2198  return SWIG_OK;
2199  }
2200 }
2201 
2202 /* Convert a packed pointer value */
2203 
2204 SWIGRUNTIME int
2205 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2206  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
2207  if (!to) return SWIG_ERROR;
2208  if (ty) {
2209  if (to != ty) {
2210  /* check type cast? */
2211  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2212  if (!tc) return SWIG_ERROR;
2213  }
2214  }
2215  return SWIG_OK;
2216 }
2217 
2218 /* -----------------------------------------------------------------------------
2219  * Create a new pointer object
2220  * ----------------------------------------------------------------------------- */
2221 
2222 /*
2223  Create a new instance object, without calling __init__, and set the
2224  'this' attribute.
2225 */
2226 
2227 SWIGRUNTIME PyObject*
2229 {
2230  PyObject *inst = 0;
2231  PyObject *newraw = data->newraw;
2232  if (newraw) {
2233  inst = PyObject_Call(newraw, data->newargs, NULL);
2234  if (inst) {
2235 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2236  PyObject **dictptr = _PyObject_GetDictPtr(inst);
2237  if (dictptr != NULL) {
2238  PyObject *dict = *dictptr;
2239  if (dict == NULL) {
2240  dict = PyDict_New();
2241  *dictptr = dict;
2242  PyDict_SetItem(dict, SWIG_This(), swig_this);
2243  }
2244  }
2245 #else
2246  PyObject *key = SWIG_This();
2247  PyObject_SetAttr(inst, key, swig_this);
2248 #endif
2249  }
2250  } else {
2251 #if PY_VERSION_HEX >= 0x03000000
2252  PyObject *empty_args = PyTuple_New(0);
2253  if (empty_args) {
2254  PyObject *empty_kwargs = PyDict_New();
2255  if (empty_kwargs) {
2256  inst = ((PyTypeObject *)data->newargs)->tp_new((PyTypeObject *)data->newargs, empty_args, empty_kwargs);
2257  Py_DECREF(empty_kwargs);
2258  if (inst) {
2259  PyObject_SetAttr(inst, SWIG_This(), swig_this);
2260  Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2261  }
2262  }
2263  Py_DECREF(empty_args);
2264  }
2265 #else
2266  PyObject *dict = PyDict_New();
2267  if (dict) {
2268  PyDict_SetItem(dict, SWIG_This(), swig_this);
2269  inst = PyInstance_NewRaw(data->newargs, dict);
2270  Py_DECREF(dict);
2271  }
2272 #endif
2273  }
2274  return inst;
2275 }
2276 
2277 SWIGRUNTIME void
2278 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2279 {
2280  PyObject *dict;
2281 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2282  PyObject **dictptr = _PyObject_GetDictPtr(inst);
2283  if (dictptr != NULL) {
2284  dict = *dictptr;
2285  if (dict == NULL) {
2286  dict = PyDict_New();
2287  *dictptr = dict;
2288  }
2289  PyDict_SetItem(dict, SWIG_This(), swig_this);
2290  return;
2291  }
2292 #endif
2293  dict = PyObject_GetAttrString(inst, "__dict__");
2294  PyDict_SetItem(dict, SWIG_This(), swig_this);
2295  Py_DECREF(dict);
2296 }
2297 
2298 
2299 SWIGINTERN PyObject *
2301  PyObject *obj[2];
2302  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2303  return NULL;
2304  } else {
2305  SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2306  if (sthis) {
2307  SwigPyObject_append((PyObject*) sthis, obj[1]);
2308  } else {
2309  SWIG_Python_SetSwigThis(obj[0], obj[1]);
2310  }
2311  return SWIG_Py_Void();
2312  }
2313 }
2314 
2315 /* Create a new pointer object */
2316 
2317 SWIGRUNTIME PyObject *
2318 SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2319  SwigPyClientData *clientdata;
2320  PyObject * robj;
2321  int own;
2322 
2323  if (!ptr)
2324  return SWIG_Py_Void();
2325 
2326  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2327  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2328  if (clientdata && clientdata->pytype) {
2329  SwigPyObject *newobj;
2330  if (flags & SWIG_BUILTIN_TP_INIT) {
2331  newobj = (SwigPyObject*) self;
2332  if (newobj->ptr) {
2333  PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
2334  while (newobj->next)
2335  newobj = (SwigPyObject *) newobj->next;
2336  newobj->next = next_self;
2337  newobj = (SwigPyObject *)next_self;
2338 #ifdef SWIGPYTHON_BUILTIN
2339  newobj->dict = 0;
2340 #endif
2341  }
2342  } else {
2343  newobj = PyObject_New(SwigPyObject, clientdata->pytype);
2344 #ifdef SWIGPYTHON_BUILTIN
2345  newobj->dict = 0;
2346 #endif
2347  }
2348  if (newobj) {
2349  newobj->ptr = ptr;
2350  newobj->ty = type;
2351  newobj->own = own;
2352  newobj->next = 0;
2353  return (PyObject*) newobj;
2354  }
2355  return SWIG_Py_Void();
2356  }
2357 
2358  assert(!(flags & SWIG_BUILTIN_TP_INIT));
2359 
2360  robj = SwigPyObject_New(ptr, type, own);
2361  if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2362  PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2363  Py_DECREF(robj);
2364  robj = inst;
2365  }
2366  return robj;
2367 }
2368 
2369 /* Create a new packed object */
2370 
2371 SWIGRUNTIMEINLINE PyObject *
2372 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2373  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2374 }
2375 
2376 /* -----------------------------------------------------------------------------*
2377  * Get type list
2378  * -----------------------------------------------------------------------------*/
2379 
2380 #ifdef SWIG_LINK_RUNTIME
2381 void *SWIG_ReturnGlobalTypeList(void *);
2382 #endif
2383 
2386  static void *type_pointer = (void *)0;
2387  /* first check if module already created */
2388  if (!type_pointer) {
2389 #ifdef SWIG_LINK_RUNTIME
2390  type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2391 #else
2392  type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2393  if (PyErr_Occurred()) {
2394  PyErr_Clear();
2395  type_pointer = (void *)0;
2396  }
2397 #endif
2398  }
2399  return (swig_module_info *) type_pointer;
2400 }
2401 
2402 SWIGRUNTIME void
2404 {
2405  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
2406  swig_type_info **types = swig_module->types;
2407  size_t i;
2408  for (i =0; i < swig_module->size; ++i) {
2409  swig_type_info *ty = types[i];
2410  if (ty->owndata) {
2412  if (data) SwigPyClientData_Del(data);
2413  }
2414  }
2415  Py_DECREF(SWIG_This());
2416  Swig_This_global = NULL;
2417 }
2418 
2419 SWIGRUNTIME void
2421 #if PY_VERSION_HEX >= 0x03000000
2422  /* Add a dummy module object into sys.modules */
2423  PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION);
2424 #else
2425  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
2426  PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2427 #endif
2428  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2429  if (pointer && module) {
2430  PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
2431  } else {
2432  Py_XDECREF(pointer);
2433  }
2434 }
2435 
2436 /* The python cached type query */
2437 SWIGRUNTIME PyObject *
2439  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2440  return cache;
2441 }
2442 
2444 SWIG_Python_TypeQuery(const char *type)
2445 {
2446  PyObject *cache = SWIG_Python_TypeCache();
2447  PyObject *key = SWIG_Python_str_FromChar(type);
2448  PyObject *obj = PyDict_GetItem(cache, key);
2449  swig_type_info *descriptor;
2450  if (obj) {
2451  descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2452  } else {
2454  descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2455  if (descriptor) {
2456  obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2457  PyDict_SetItem(cache, key, obj);
2458  Py_DECREF(obj);
2459  }
2460  }
2461  Py_DECREF(key);
2462  return descriptor;
2463 }
2464 
2465 /*
2466  For backward compatibility only
2467 */
2468 #define SWIG_POINTER_EXCEPTION 0
2469 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2470 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2471 
2472 SWIGRUNTIME int
2473 SWIG_Python_AddErrMesg(const char* mesg, int infront)
2474 {
2475  if (PyErr_Occurred()) {
2476  PyObject *type = 0;
2477  PyObject *value = 0;
2478  PyObject *traceback = 0;
2479  PyErr_Fetch(&type, &value, &traceback);
2480  if (value) {
2481  PyObject *old_str = PyObject_Str(value);
2482  const char *tmp = SWIG_Python_str_AsChar(old_str);
2483  const char *errmesg = tmp ? tmp : "Invalid error message";
2484  Py_XINCREF(type);
2485  PyErr_Clear();
2486  if (infront) {
2487  PyErr_Format(type, "%s %s", mesg, errmesg);
2488  } else {
2489  PyErr_Format(type, "%s %s", errmesg, mesg);
2490  }
2492  Py_DECREF(old_str);
2493  }
2494  return 1;
2495  } else {
2496  return 0;
2497  }
2498 }
2499 
2500 SWIGRUNTIME int
2502 {
2503  if (PyErr_Occurred()) {
2504  /* add information about failing argument */
2505  char mesg[256];
2506  PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2507  return SWIG_Python_AddErrMesg(mesg, 1);
2508  } else {
2509  return 0;
2510  }
2511 }
2512 
2513 SWIGRUNTIMEINLINE const char *
2514 SwigPyObject_GetDesc(PyObject *self)
2515 {
2516  SwigPyObject *v = (SwigPyObject *)self;
2517  swig_type_info *ty = v ? v->ty : 0;
2518  return ty ? ty->str : "";
2519 }
2520 
2521 SWIGRUNTIME void
2522 SWIG_Python_TypeError(const char *type, PyObject *obj)
2523 {
2524  if (type) {
2525 #if defined(SWIG_COBJECT_TYPES)
2526  if (obj && SwigPyObject_Check(obj)) {
2527  const char *otype = (const char *) SwigPyObject_GetDesc(obj);
2528  if (otype) {
2529  PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
2530  type, otype);
2531  return;
2532  }
2533  } else
2534 #endif
2535  {
2536  const char *otype = (obj ? obj->ob_type->tp_name : 0);
2537  if (otype) {
2538  PyObject *str = PyObject_Str(obj);
2539  const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
2540  if (cstr) {
2541  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2542  type, otype, cstr);
2544  } else {
2545  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2546  type, otype);
2547  }
2548  Py_XDECREF(str);
2549  return;
2550  }
2551  }
2552  PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2553  } else {
2554  PyErr_Format(PyExc_TypeError, "unexpected type is received");
2555  }
2556 }
2557 
2558 
2559 /* Convert a pointer value, signal an exception on a type mismatch */
2560 SWIGRUNTIME void *
2561 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
2562  void *result;
2563  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2564  PyErr_Clear();
2565 #if SWIG_POINTER_EXCEPTION
2566  if (flags) {
2568  SWIG_Python_ArgFail(argnum);
2569  }
2570 #endif
2571  }
2572  return result;
2573 }
2574 
2575 #ifdef SWIGPYTHON_BUILTIN
2576 SWIGRUNTIME int
2577 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
2578  PyTypeObject *tp = obj->ob_type;
2579  PyObject *descr;
2580  PyObject *encoded_name;
2581  descrsetfunc f;
2582  int res = -1;
2583 
2584 # ifdef Py_USING_UNICODE
2585  if (PyString_Check(name)) {
2586  name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
2587  if (!name)
2588  return -1;
2589  } else if (!PyUnicode_Check(name))
2590 # else
2591  if (!PyString_Check(name))
2592 # endif
2593  {
2594  PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
2595  return -1;
2596  } else {
2597  Py_INCREF(name);
2598  }
2599 
2600  if (!tp->tp_dict) {
2601  if (PyType_Ready(tp) < 0)
2602  goto done;
2603  }
2604 
2605  descr = _PyType_Lookup(tp, name);
2606  f = NULL;
2607  if (descr != NULL)
2608  f = descr->ob_type->tp_descr_set;
2609  if (!f) {
2610  if (PyString_Check(name)) {
2611  encoded_name = name;
2612  Py_INCREF(name);
2613  } else {
2614  encoded_name = PyUnicode_AsUTF8String(name);
2615  if (!encoded_name)
2616  return -1;
2617  }
2618  PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2619  Py_DECREF(encoded_name);
2620  } else {
2621  res = f(descr, obj, value);
2622  }
2623 
2624  done:
2625  Py_DECREF(name);
2626  return res;
2627 }
2628 #endif
2629 
2630 
2631 #ifdef __cplusplus
2632 }
2633 #endif
2634 
2635 
2636 
2637 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2638 
2639 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2640 
2641 
2642 
2643 #ifdef __cplusplus
2644 extern "C" {
2645 #endif
2646 
2647 /* Method creation and docstring support functions */
2648 
2649 SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name);
2650 SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
2651 SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
2652 
2653 #ifdef __cplusplus
2654 }
2655 #endif
2656 
2657 
2658  #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
2659 
2660 
2661 /* -------- TYPES TABLE (BEGIN) -------- */
2662 
2663 #define SWIGTYPE_p_char swig_types[0]
2664 #define SWIGTYPE_p_int swig_types[1]
2665 #define SWIGTYPE_p_long swig_types[2]
2666 #define SWIGTYPE_p_operations_research__CppBridge swig_types[3]
2667 #define SWIGTYPE_p_operations_research__CppFlags swig_types[4]
2668 #define SWIGTYPE_p_short swig_types[5]
2669 #define SWIGTYPE_p_signed_char swig_types[6]
2670 #define SWIGTYPE_p_unsigned_char swig_types[7]
2671 #define SWIGTYPE_p_unsigned_int swig_types[8]
2672 #define SWIGTYPE_p_unsigned_long swig_types[9]
2673 #define SWIGTYPE_p_unsigned_short swig_types[10]
2675 static swig_module_info swig_module = {swig_types, 11, 0, 0, 0, 0};
2676 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2677 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2678 
2679 /* -------- TYPES TABLE (END) -------- */
2680 
2681 #ifdef SWIG_TypeQuery
2682 # undef SWIG_TypeQuery
2683 #endif
2684 #define SWIG_TypeQuery SWIG_Python_TypeQuery
2685 
2686 /*-----------------------------------------------
2687  @(target):= _pywrapinit.so
2688  ------------------------------------------------*/
2689 #if PY_VERSION_HEX >= 0x03000000
2690 # define SWIG_init PyInit__pywrapinit
2691 
2692 #else
2693 # define SWIG_init init_pywrapinit
2694 
2695 #endif
2696 #define SWIG_name "_pywrapinit"
2697 
2698 #define SWIGVERSION 0x040001
2699 #define SWIG_VERSION SWIGVERSION
2700 
2701 
2702 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
2703 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
2704 
2705 
2706 #include <stdexcept>
2707 
2708 
2709 namespace swig {
2710  class SwigPtr_PyObject {
2711  protected:
2712  PyObject *_obj;
2713 
2714  public:
2716  {
2717  }
2718 
2720  {
2722  Py_XINCREF(_obj);
2724  }
2725 
2726  SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
2727  {
2728  if (initial_ref) {
2730  Py_XINCREF(_obj);
2732  }
2733  }
2734 
2736  {
2738  Py_XINCREF(item._obj);
2739  Py_XDECREF(_obj);
2740  _obj = item._obj;
2742  return *this;
2743  }
2744 
2746  {
2748  Py_XDECREF(_obj);
2750  }
2751 
2752  operator PyObject *() const
2753  {
2754  return _obj;
2755  }
2756 
2757  PyObject *operator->() const
2758  {
2759  return _obj;
2760  }
2761  };
2762 }
2763 
2764 
2765 namespace swig {
2766  struct SwigVar_PyObject : SwigPtr_PyObject {
2767  SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
2768 
2770  {
2771  Py_XDECREF(_obj);
2772  _obj = obj;
2773  return *this;
2774  }
2775  };
2776 }
2777 
2778 
2779 #include <cstdint>
2780 #include <string>
2781 #include <vector>
2782 
2783 #include "ortools/base/basictypes.h"
2784 
2785 
2786 #include <stdint.h> // Use the C99 official header
2787 
2788 
2789 #define SWIGWORDSIZE64
2790 #ifndef LONG_MAX
2791 #include <limits.h>
2792 #endif
2793 #if (__WORDSIZE == 32) || (LONG_MAX == INT_MAX)
2794 # error "SWIG wrapped code invalid in 32 bit architecture, regenerate code using -DSWIGWORDSIZE32"
2795 #endif
2796 
2797 
2798 #include <string>
2799 
2800 
2801 #include "ortools/base/python-swig.h"
2802 
2803 
2804 #include "ortools/init/init.h"
2805 
2806 
2807 SWIGINTERN int
2808 SWIG_AsVal_double (PyObject *obj, double *val)
2809 {
2810  int res = SWIG_TypeError;
2811  if (PyFloat_Check(obj)) {
2812  if (val) *val = PyFloat_AsDouble(obj);
2813  return SWIG_OK;
2814 #if PY_VERSION_HEX < 0x03000000
2815  } else if (PyInt_Check(obj)) {
2816  if (val) *val = (double) PyInt_AsLong(obj);
2817  return SWIG_OK;
2818 #endif
2819  } else if (PyLong_Check(obj)) {
2820  double v = PyLong_AsDouble(obj);
2821  if (!PyErr_Occurred()) {
2822  if (val) *val = v;
2823  return SWIG_OK;
2824  } else {
2825  PyErr_Clear();
2826  }
2827  }
2828 #ifdef SWIG_PYTHON_CAST_MODE
2829  {
2830  int dispatch = 0;
2831  double d = PyFloat_AsDouble(obj);
2832  if (!PyErr_Occurred()) {
2833  if (val) *val = d;
2834  return SWIG_AddCast(SWIG_OK);
2835  } else {
2836  PyErr_Clear();
2837  }
2838  if (!dispatch) {
2839  long v = PyLong_AsLong(obj);
2840  if (!PyErr_Occurred()) {
2841  if (val) *val = v;
2843  } else {
2844  PyErr_Clear();
2845  }
2846  }
2847  }
2848 #endif
2849  return res;
2850 }
2851 
2852 
2853 #include <float.h>
2854 
2855 
2856 #include <math.h>
2857 
2858 
2859 SWIGINTERNINLINE int
2860 SWIG_CanCastAsInteger(double *d, double min, double max) {
2861  double x = *d;
2862  if ((min <= x && x <= max)) {
2863  double fx = floor(x);
2864  double cx = ceil(x);
2865  double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
2866  if ((errno == EDOM) || (errno == ERANGE)) {
2867  errno = 0;
2868  } else {
2869  double summ, reps, diff;
2870  if (rd < x) {
2871  diff = x - rd;
2872  } else if (rd > x) {
2873  diff = rd - x;
2874  } else {
2875  return 1;
2876  }
2877  summ = rd + x;
2878  reps = diff/summ;
2879  if (reps < 8*DBL_EPSILON) {
2880  *d = rd;
2881  return 1;
2882  }
2883  }
2884  }
2885  return 0;
2886 }
2887 
2888 
2889 SWIGINTERN int
2890 SWIG_AsVal_long (PyObject *obj, long* val)
2891 {
2892 #if PY_VERSION_HEX < 0x03000000
2893  if (PyInt_Check(obj)) {
2894  if (val) *val = PyInt_AsLong(obj);
2895  return SWIG_OK;
2896  } else
2897 #endif
2898  if (PyLong_Check(obj)) {
2899  long v = PyLong_AsLong(obj);
2900  if (!PyErr_Occurred()) {
2901  if (val) *val = v;
2902  return SWIG_OK;
2903  } else {
2904  PyErr_Clear();
2905  return SWIG_OverflowError;
2906  }
2907  }
2908 #ifdef SWIG_PYTHON_CAST_MODE
2909  {
2910  int dispatch = 0;
2911  long v = PyInt_AsLong(obj);
2912  if (!PyErr_Occurred()) {
2913  if (val) *val = v;
2914  return SWIG_AddCast(SWIG_OK);
2915  } else {
2916  PyErr_Clear();
2917  }
2918  if (!dispatch) {
2919  double d;
2920  int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
2921  if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
2922  if (val) *val = (long)(d);
2923  return res;
2924  }
2925  }
2926  }
2927 #endif
2928  return SWIG_TypeError;
2929 }
2930 
2931 
2932 SWIGINTERN int
2933 SWIG_AsVal_bool (PyObject *obj, bool *val)
2934 {
2935  int r;
2936  if (!PyBool_Check(obj))
2937  return SWIG_ERROR;
2938  r = PyObject_IsTrue(obj);
2939  if (r == -1)
2940  return SWIG_ERROR;
2941  if (val) *val = r ? true : false;
2942  return SWIG_OK;
2943 }
2944 
2945 
2946 SWIGINTERNINLINE PyObject*
2948 {
2949  return PyBool_FromLong(value ? 1 : 0);
2950 }
2951 
2952 
2955 {
2956  static int init = 0;
2957  static swig_type_info* info = 0;
2958  if (!init) {
2959  info = SWIG_TypeQuery("_p_char");
2960  init = 1;
2961  }
2962  return info;
2963 }
2964 
2965 
2966 SWIGINTERN int
2967 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
2968 {
2969 #if PY_VERSION_HEX>=0x03000000
2970 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
2971  if (PyBytes_Check(obj))
2972 #else
2973  if (PyUnicode_Check(obj))
2974 #endif
2975 #else
2976  if (PyString_Check(obj))
2977 #endif
2978  {
2979  char *cstr; Py_ssize_t len;
2980  int ret = SWIG_OK;
2981 #if PY_VERSION_HEX>=0x03000000
2982 #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
2983  if (!alloc && cptr) {
2984  /* We can't allow converting without allocation, since the internal
2985  representation of string in Python 3 is UCS-2/UCS-4 but we require
2986  a UTF-8 representation.
2987  TODO(bhy) More detailed explanation */
2988  return SWIG_RuntimeError;
2989  }
2990  obj = PyUnicode_AsUTF8String(obj);
2991  if (!obj)
2992  return SWIG_TypeError;
2993  if (alloc)
2994  *alloc = SWIG_NEWOBJ;
2995 #endif
2996  PyBytes_AsStringAndSize(obj, &cstr, &len);
2997 #else
2998  PyString_AsStringAndSize(obj, &cstr, &len);
2999 #endif
3000  if (cptr) {
3001  if (alloc) {
3002  if (*alloc == SWIG_NEWOBJ) {
3003  *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3004  *alloc = SWIG_NEWOBJ;
3005  } else {
3006  *cptr = cstr;
3007  *alloc = SWIG_OLDOBJ;
3008  }
3009  } else {
3010 #if PY_VERSION_HEX>=0x03000000
3011 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3012  *cptr = PyBytes_AsString(obj);
3013 #else
3014  assert(0); /* Should never reach here with Unicode strings in Python 3 */
3015 #endif
3016 #else
3017  *cptr = SWIG_Python_str_AsChar(obj);
3018  if (!*cptr)
3019  ret = SWIG_TypeError;
3020 #endif
3021  }
3022  }
3023  if (psize) *psize = len + 1;
3024 #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3025  Py_XDECREF(obj);
3026 #endif
3027  return ret;
3028  } else {
3029 #if defined(SWIG_PYTHON_2_UNICODE)
3030 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3031 #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
3032 #endif
3033 #if PY_VERSION_HEX<0x03000000
3034  if (PyUnicode_Check(obj)) {
3035  char *cstr; Py_ssize_t len;
3036  if (!alloc && cptr) {
3037  return SWIG_RuntimeError;
3038  }
3039  obj = PyUnicode_AsUTF8String(obj);
3040  if (!obj)
3041  return SWIG_TypeError;
3042  if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
3043  if (cptr) {
3044  if (alloc) *alloc = SWIG_NEWOBJ;
3045  *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3046  }
3047  if (psize) *psize = len + 1;
3048 
3049  Py_XDECREF(obj);
3050  return SWIG_OK;
3051  } else {
3052  Py_XDECREF(obj);
3053  }
3054  }
3055 #endif
3056 #endif
3057 
3058  swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3059  if (pchar_descriptor) {
3060  void* vptr = 0;
3061  if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3062  if (cptr) *cptr = (char *) vptr;
3063  if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3064  if (alloc) *alloc = SWIG_OLDOBJ;
3065  return SWIG_OK;
3066  }
3067  }
3068  }
3069  return SWIG_TypeError;
3070 }
3071 
3072 
3073 SWIGINTERN int
3074 SWIG_AsPtr_std_string (PyObject * obj, std::string **val)
3075 {
3076  char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
3077  if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
3078  if (buf) {
3079  if (val) *val = new std::string(buf, size - 1);
3080  if (alloc == SWIG_NEWOBJ) delete[] buf;
3081  return SWIG_NEWOBJ;
3082  } else {
3083  if (val) *val = 0;
3084  return SWIG_OLDOBJ;
3085  }
3086  } else {
3087  static int init = 0;
3088  static swig_type_info* descriptor = 0;
3089  if (!init) {
3090  descriptor = SWIG_TypeQuery("std::string" " *");
3091  init = 1;
3092  }
3093  if (descriptor) {
3094  std::string *vptr;
3095  int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0);
3096  if (SWIG_IsOK(res) && val) *val = vptr;
3097  return res;
3098  }
3099  }
3100  return SWIG_ERROR;
3101 }
3102 
3103 
3104 SWIGINTERNINLINE PyObject *
3105 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
3106 {
3107  if (carray) {
3108  if (size > INT_MAX) {
3109  swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3110  return pchar_descriptor ?
3111  SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
3112  } else {
3113 #if PY_VERSION_HEX >= 0x03000000
3114 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3115  return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3116 #else
3117  return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
3118 #endif
3119 #else
3120  return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3121 #endif
3122  }
3123  } else {
3124  return SWIG_Py_Void();
3125  }
3126 }
3127 
3128 
3129 SWIGINTERNINLINE PyObject *
3130 SWIG_From_std_string (const std::string& s)
3131 {
3132  return SWIG_FromCharPtrAndSize(s.data(), s.size());
3133 }
3134 
3135 #ifdef __cplusplus
3136 extern "C" {
3137 #endif
3138 SWIGINTERN PyObject *_wrap_CppFlags_logtostderr_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3139  PyObject *resultobj = 0;
3141  bool arg2 ;
3142  void *argp1 = 0 ;
3143  int res1 = 0 ;
3144  bool val2 ;
3145  int ecode2 = 0 ;
3146  PyObject *swig_obj[2] ;
3147 
3148  if (!SWIG_Python_UnpackTuple(args, "CppFlags_logtostderr_set", 2, 2, swig_obj)) SWIG_fail;
3149  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3150  if (!SWIG_IsOK(res1)) {
3151  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_logtostderr_set" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3152  }
3153  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3154  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
3155  if (!SWIG_IsOK(ecode2)) {
3156  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CppFlags_logtostderr_set" "', argument " "2"" of type '" "bool""'");
3157  }
3158  arg2 = static_cast< bool >(val2);
3159  if (arg1) (arg1)->logtostderr = arg2;
3160  resultobj = SWIG_Py_Void();
3161  return resultobj;
3162 fail:
3163  return NULL;
3164 }
3165 
3166 
3167 SWIGINTERN PyObject *_wrap_CppFlags_logtostderr_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3168  PyObject *resultobj = 0;
3170  void *argp1 = 0 ;
3171  int res1 = 0 ;
3172  PyObject *swig_obj[1] ;
3173  bool result;
3174 
3175  if (!args) SWIG_fail;
3176  swig_obj[0] = args;
3177  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3178  if (!SWIG_IsOK(res1)) {
3179  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_logtostderr_get" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3180  }
3181  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3182  result = (bool) ((arg1)->logtostderr);
3183  resultobj = SWIG_From_bool(static_cast< bool >(result));
3184  return resultobj;
3185 fail:
3186  return NULL;
3187 }
3188 
3189 
3190 SWIGINTERN PyObject *_wrap_CppFlags_log_prefix_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3191  PyObject *resultobj = 0;
3193  bool arg2 ;
3194  void *argp1 = 0 ;
3195  int res1 = 0 ;
3196  bool val2 ;
3197  int ecode2 = 0 ;
3198  PyObject *swig_obj[2] ;
3199 
3200  if (!SWIG_Python_UnpackTuple(args, "CppFlags_log_prefix_set", 2, 2, swig_obj)) SWIG_fail;
3201  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3202  if (!SWIG_IsOK(res1)) {
3203  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_log_prefix_set" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3204  }
3205  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3206  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
3207  if (!SWIG_IsOK(ecode2)) {
3208  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CppFlags_log_prefix_set" "', argument " "2"" of type '" "bool""'");
3209  }
3210  arg2 = static_cast< bool >(val2);
3211  if (arg1) (arg1)->log_prefix = arg2;
3212  resultobj = SWIG_Py_Void();
3213  return resultobj;
3214 fail:
3215  return NULL;
3216 }
3217 
3218 
3219 SWIGINTERN PyObject *_wrap_CppFlags_log_prefix_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3220  PyObject *resultobj = 0;
3222  void *argp1 = 0 ;
3223  int res1 = 0 ;
3224  PyObject *swig_obj[1] ;
3225  bool result;
3226 
3227  if (!args) SWIG_fail;
3228  swig_obj[0] = args;
3229  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3230  if (!SWIG_IsOK(res1)) {
3231  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_log_prefix_get" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3232  }
3233  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3234  result = (bool) ((arg1)->log_prefix);
3235  resultobj = SWIG_From_bool(static_cast< bool >(result));
3236  return resultobj;
3237 fail:
3238  return NULL;
3239 }
3240 
3241 
3242 SWIGINTERN PyObject *_wrap_CppFlags_cp_model_dump_prefix_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3243  PyObject *resultobj = 0;
3245  std::string *arg2 = 0 ;
3246  void *argp1 = 0 ;
3247  int res1 = 0 ;
3248  int res2 = SWIG_OLDOBJ ;
3249  PyObject *swig_obj[2] ;
3250 
3251  if (!SWIG_Python_UnpackTuple(args, "CppFlags_cp_model_dump_prefix_set", 2, 2, swig_obj)) SWIG_fail;
3252  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3253  if (!SWIG_IsOK(res1)) {
3254  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_cp_model_dump_prefix_set" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3255  }
3256  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3257  {
3258  std::string *ptr = (std::string *)0;
3259  res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr);
3260  if (!SWIG_IsOK(res2)) {
3261  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CppFlags_cp_model_dump_prefix_set" "', argument " "2"" of type '" "std::string const &""'");
3262  }
3263  if (!ptr) {
3264  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CppFlags_cp_model_dump_prefix_set" "', argument " "2"" of type '" "std::string const &""'");
3265  }
3266  arg2 = ptr;
3267  }
3268  if (arg1) (arg1)->cp_model_dump_prefix = *arg2;
3269  resultobj = SWIG_Py_Void();
3270  if (SWIG_IsNewObj(res2)) delete arg2;
3271  return resultobj;
3272 fail:
3273  if (SWIG_IsNewObj(res2)) delete arg2;
3274  return NULL;
3275 }
3276 
3277 
3278 SWIGINTERN PyObject *_wrap_CppFlags_cp_model_dump_prefix_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3279  PyObject *resultobj = 0;
3281  void *argp1 = 0 ;
3282  int res1 = 0 ;
3283  PyObject *swig_obj[1] ;
3284  std::string *result = 0 ;
3285 
3286  if (!args) SWIG_fail;
3287  swig_obj[0] = args;
3288  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3289  if (!SWIG_IsOK(res1)) {
3290  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_cp_model_dump_prefix_get" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3291  }
3292  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3293  result = (std::string *) & ((arg1)->cp_model_dump_prefix);
3294  resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
3295  return resultobj;
3296 fail:
3297  return NULL;
3298 }
3299 
3300 
3301 SWIGINTERN PyObject *_wrap_CppFlags_cp_model_dump_models_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3302  PyObject *resultobj = 0;
3304  bool arg2 ;
3305  void *argp1 = 0 ;
3306  int res1 = 0 ;
3307  bool val2 ;
3308  int ecode2 = 0 ;
3309  PyObject *swig_obj[2] ;
3310 
3311  if (!SWIG_Python_UnpackTuple(args, "CppFlags_cp_model_dump_models_set", 2, 2, swig_obj)) SWIG_fail;
3312  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3313  if (!SWIG_IsOK(res1)) {
3314  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_cp_model_dump_models_set" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3315  }
3316  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3317  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
3318  if (!SWIG_IsOK(ecode2)) {
3319  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CppFlags_cp_model_dump_models_set" "', argument " "2"" of type '" "bool""'");
3320  }
3321  arg2 = static_cast< bool >(val2);
3322  if (arg1) (arg1)->cp_model_dump_models = arg2;
3323  resultobj = SWIG_Py_Void();
3324  return resultobj;
3325 fail:
3326  return NULL;
3327 }
3328 
3329 
3330 SWIGINTERN PyObject *_wrap_CppFlags_cp_model_dump_models_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3331  PyObject *resultobj = 0;
3333  void *argp1 = 0 ;
3334  int res1 = 0 ;
3335  PyObject *swig_obj[1] ;
3336  bool result;
3337 
3338  if (!args) SWIG_fail;
3339  swig_obj[0] = args;
3340  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3341  if (!SWIG_IsOK(res1)) {
3342  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_cp_model_dump_models_get" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3343  }
3344  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3345  result = (bool) ((arg1)->cp_model_dump_models);
3346  resultobj = SWIG_From_bool(static_cast< bool >(result));
3347  return resultobj;
3348 fail:
3349  return NULL;
3350 }
3351 
3352 
3353 SWIGINTERN PyObject *_wrap_CppFlags_cp_model_dump_lns_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3354  PyObject *resultobj = 0;
3356  bool arg2 ;
3357  void *argp1 = 0 ;
3358  int res1 = 0 ;
3359  bool val2 ;
3360  int ecode2 = 0 ;
3361  PyObject *swig_obj[2] ;
3362 
3363  if (!SWIG_Python_UnpackTuple(args, "CppFlags_cp_model_dump_lns_set", 2, 2, swig_obj)) SWIG_fail;
3364  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3365  if (!SWIG_IsOK(res1)) {
3366  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_cp_model_dump_lns_set" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3367  }
3368  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3369  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
3370  if (!SWIG_IsOK(ecode2)) {
3371  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CppFlags_cp_model_dump_lns_set" "', argument " "2"" of type '" "bool""'");
3372  }
3373  arg2 = static_cast< bool >(val2);
3374  if (arg1) (arg1)->cp_model_dump_lns = arg2;
3375  resultobj = SWIG_Py_Void();
3376  return resultobj;
3377 fail:
3378  return NULL;
3379 }
3380 
3381 
3382 SWIGINTERN PyObject *_wrap_CppFlags_cp_model_dump_lns_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3383  PyObject *resultobj = 0;
3385  void *argp1 = 0 ;
3386  int res1 = 0 ;
3387  PyObject *swig_obj[1] ;
3388  bool result;
3389 
3390  if (!args) SWIG_fail;
3391  swig_obj[0] = args;
3392  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3393  if (!SWIG_IsOK(res1)) {
3394  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_cp_model_dump_lns_get" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3395  }
3396  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3397  result = (bool) ((arg1)->cp_model_dump_lns);
3398  resultobj = SWIG_From_bool(static_cast< bool >(result));
3399  return resultobj;
3400 fail:
3401  return NULL;
3402 }
3403 
3404 
3405 SWIGINTERN PyObject *_wrap_CppFlags_cp_model_dump_response_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3406  PyObject *resultobj = 0;
3408  bool arg2 ;
3409  void *argp1 = 0 ;
3410  int res1 = 0 ;
3411  bool val2 ;
3412  int ecode2 = 0 ;
3413  PyObject *swig_obj[2] ;
3414 
3415  if (!SWIG_Python_UnpackTuple(args, "CppFlags_cp_model_dump_response_set", 2, 2, swig_obj)) SWIG_fail;
3416  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3417  if (!SWIG_IsOK(res1)) {
3418  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_cp_model_dump_response_set" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3419  }
3420  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3421  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
3422  if (!SWIG_IsOK(ecode2)) {
3423  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CppFlags_cp_model_dump_response_set" "', argument " "2"" of type '" "bool""'");
3424  }
3425  arg2 = static_cast< bool >(val2);
3426  if (arg1) (arg1)->cp_model_dump_response = arg2;
3427  resultobj = SWIG_Py_Void();
3428  return resultobj;
3429 fail:
3430  return NULL;
3431 }
3432 
3433 
3434 SWIGINTERN PyObject *_wrap_CppFlags_cp_model_dump_response_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3435  PyObject *resultobj = 0;
3437  void *argp1 = 0 ;
3438  int res1 = 0 ;
3439  PyObject *swig_obj[1] ;
3440  bool result;
3441 
3442  if (!args) SWIG_fail;
3443  swig_obj[0] = args;
3444  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3445  if (!SWIG_IsOK(res1)) {
3446  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_cp_model_dump_response_get" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3447  }
3448  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3449  result = (bool) ((arg1)->cp_model_dump_response);
3450  resultobj = SWIG_From_bool(static_cast< bool >(result));
3451  return resultobj;
3452 fail:
3453  return NULL;
3454 }
3455 
3456 
3457 SWIGINTERN PyObject *_wrap_new_CppFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3458  PyObject *resultobj = 0;
3459  operations_research::CppFlags *result = 0 ;
3460 
3461  if (!SWIG_Python_UnpackTuple(args, "new_CppFlags", 0, 0, 0)) SWIG_fail;
3464  return resultobj;
3465 fail:
3466  return NULL;
3467 }
3468 
3469 
3470 SWIGINTERN PyObject *_wrap_delete_CppFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3471  PyObject *resultobj = 0;
3473  void *argp1 = 0 ;
3474  int res1 = 0 ;
3475  PyObject *swig_obj[1] ;
3476 
3477  if (!args) SWIG_fail;
3478  swig_obj[0] = args;
3480  if (!SWIG_IsOK(res1)) {
3481  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CppFlags" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3482  }
3483  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3484  delete arg1;
3485  resultobj = SWIG_Py_Void();
3486  return resultobj;
3487 fail:
3488  return NULL;
3489 }
3490 
3491 
3492 SWIGINTERN PyObject *CppFlags_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3493  PyObject *obj;
3494  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
3496  return SWIG_Py_Void();
3497 }
3498 
3499 SWIGINTERN PyObject *CppFlags_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3500  return SWIG_Python_InitShadowInstance(args);
3501 }
3502 
3503 SWIGINTERN PyObject *_wrap_CppBridge_InitLogging(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3504  PyObject *resultobj = 0;
3505  std::string *arg1 = 0 ;
3506  int res1 = SWIG_OLDOBJ ;
3507  PyObject *swig_obj[1] ;
3508 
3509  if (!args) SWIG_fail;
3510  swig_obj[0] = args;
3511  {
3512  std::string *ptr = (std::string *)0;
3513  res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr);
3514  if (!SWIG_IsOK(res1)) {
3515  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppBridge_InitLogging" "', argument " "1"" of type '" "std::string const &""'");
3516  }
3517  if (!ptr) {
3518  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CppBridge_InitLogging" "', argument " "1"" of type '" "std::string const &""'");
3519  }
3520  arg1 = ptr;
3521  }
3522  operations_research::CppBridge::InitLogging((std::string const &)*arg1);
3523  resultobj = SWIG_Py_Void();
3524  if (SWIG_IsNewObj(res1)) delete arg1;
3525  return resultobj;
3526 fail:
3527  if (SWIG_IsNewObj(res1)) delete arg1;
3528  return NULL;
3529 }
3530 
3531 
3532 SWIGINTERN PyObject *_wrap_CppBridge_ShutdownLogging(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3533  PyObject *resultobj = 0;
3534 
3535  if (!SWIG_Python_UnpackTuple(args, "CppBridge_ShutdownLogging", 0, 0, 0)) SWIG_fail;
3537  resultobj = SWIG_Py_Void();
3538  return resultobj;
3539 fail:
3540  return NULL;
3541 }
3542 
3543 
3544 SWIGINTERN PyObject *_wrap_CppBridge_SetFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3545  PyObject *resultobj = 0;
3546  operations_research::CppFlags *arg1 = 0 ;
3547  void *argp1 = 0 ;
3548  int res1 = 0 ;
3549  PyObject *swig_obj[1] ;
3550 
3551  if (!args) SWIG_fail;
3552  swig_obj[0] = args;
3553  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_operations_research__CppFlags, 0 | 0);
3554  if (!SWIG_IsOK(res1)) {
3555  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppBridge_SetFlags" "', argument " "1"" of type '" "operations_research::CppFlags const &""'");
3556  }
3557  if (!argp1) {
3558  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CppBridge_SetFlags" "', argument " "1"" of type '" "operations_research::CppFlags const &""'");
3559  }
3560  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3562  resultobj = SWIG_Py_Void();
3563  return resultobj;
3564 fail:
3565  return NULL;
3566 }
3567 
3568 
3569 SWIGINTERN PyObject *_wrap_CppBridge_LoadGurobiSharedLibrary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3570  PyObject *resultobj = 0;
3571  std::string *arg1 = 0 ;
3572  int res1 = SWIG_OLDOBJ ;
3573  PyObject *swig_obj[1] ;
3574  bool result;
3575 
3576  if (!args) SWIG_fail;
3577  swig_obj[0] = args;
3578  {
3579  std::string *ptr = (std::string *)0;
3580  res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr);
3581  if (!SWIG_IsOK(res1)) {
3582  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppBridge_LoadGurobiSharedLibrary" "', argument " "1"" of type '" "std::string const &""'");
3583  }
3584  if (!ptr) {
3585  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CppBridge_LoadGurobiSharedLibrary" "', argument " "1"" of type '" "std::string const &""'");
3586  }
3587  arg1 = ptr;
3588  }
3589  result = (bool)operations_research::CppBridge::LoadGurobiSharedLibrary((std::string const &)*arg1);
3590  resultobj = SWIG_From_bool(static_cast< bool >(result));
3591  if (SWIG_IsNewObj(res1)) delete arg1;
3592  return resultobj;
3593 fail:
3594  if (SWIG_IsNewObj(res1)) delete arg1;
3595  return NULL;
3596 }
3597 
3598 
3599 SWIGINTERN PyObject *_wrap_new_CppBridge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3600  PyObject *resultobj = 0;
3601  operations_research::CppBridge *result = 0 ;
3602 
3603  if (!SWIG_Python_UnpackTuple(args, "new_CppBridge", 0, 0, 0)) SWIG_fail;
3606  return resultobj;
3607 fail:
3608  return NULL;
3609 }
3610 
3611 
3612 SWIGINTERN PyObject *_wrap_delete_CppBridge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3613  PyObject *resultobj = 0;
3615  void *argp1 = 0 ;
3616  int res1 = 0 ;
3617  PyObject *swig_obj[1] ;
3618 
3619  if (!args) SWIG_fail;
3620  swig_obj[0] = args;
3622  if (!SWIG_IsOK(res1)) {
3623  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CppBridge" "', argument " "1"" of type '" "operations_research::CppBridge *""'");
3624  }
3625  arg1 = reinterpret_cast< operations_research::CppBridge * >(argp1);
3626  delete arg1;
3627  resultobj = SWIG_Py_Void();
3628  return resultobj;
3629 fail:
3630  return NULL;
3631 }
3632 
3633 
3634 SWIGINTERN PyObject *CppBridge_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3635  PyObject *obj;
3636  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
3638  return SWIG_Py_Void();
3639 }
3640 
3641 SWIGINTERN PyObject *CppBridge_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3642  return SWIG_Python_InitShadowInstance(args);
3643 }
3644 
3645 static PyMethodDef SwigMethods[] = {
3646  { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
3647  { "CppFlags_logtostderr_set", _wrap_CppFlags_logtostderr_set, METH_VARARGS, "If true, all logging message will be sent to stderr."},
3648  { "CppFlags_logtostderr_get", _wrap_CppFlags_logtostderr_get, METH_O, "If true, all logging message will be sent to stderr."},
3649  { "CppFlags_log_prefix_set", _wrap_CppFlags_log_prefix_set, METH_VARARGS, "Controls is time and source code info are used to prefix logging messages."},
3650  { "CppFlags_log_prefix_get", _wrap_CppFlags_log_prefix_get, METH_O, "Controls is time and source code info are used to prefix logging messages."},
3651  { "CppFlags_cp_model_dump_prefix_set", _wrap_CppFlags_cp_model_dump_prefix_set, METH_VARARGS, "Prefix filename for all dumped files (models, solutions, lns sub-models)."},
3652  { "CppFlags_cp_model_dump_prefix_get", _wrap_CppFlags_cp_model_dump_prefix_get, METH_O, "Prefix filename for all dumped files (models, solutions, lns sub-models)."},
3653  { "CppFlags_cp_model_dump_models_set", _wrap_CppFlags_cp_model_dump_models_set, METH_VARARGS, "\n"
3654  "DEBUG ONLY: Dump CP-SAT models during solve.\n"
3655  "\n"
3656  " When set to true, SolveCpModel() will dump its model protos\n"
3657  "(original model, presolved model, mapping model) in text format to\n"
3658  "'FLAGS_cp_model_dump_prefix'{model|presolved_model|mapping_model}.pbtxt.\n"
3659  ""},
3660  { "CppFlags_cp_model_dump_models_get", _wrap_CppFlags_cp_model_dump_models_get, METH_O, "\n"
3661  "DEBUG ONLY: Dump CP-SAT models during solve.\n"
3662  "\n"
3663  " When set to true, SolveCpModel() will dump its model protos\n"
3664  "(original model, presolved model, mapping model) in text format to\n"
3665  "'FLAGS_cp_model_dump_prefix'{model|presolved_model|mapping_model}.pbtxt.\n"
3666  ""},
3667  { "CppFlags_cp_model_dump_lns_set", _wrap_CppFlags_cp_model_dump_lns_set, METH_VARARGS, "\n"
3668  "DEBUG ONLY: Dump CP-SAT LNS models during solve.\n"
3669  "\n"
3670  "When set to true, solve will dump all lns models proto in text format to\n"
3671  "'FLAGS_cp_model_dump_prefix'lns_xxx.pbtxt.\n"
3672  ""},
3673  { "CppFlags_cp_model_dump_lns_get", _wrap_CppFlags_cp_model_dump_lns_get, METH_O, "\n"
3674  "DEBUG ONLY: Dump CP-SAT LNS models during solve.\n"
3675  "\n"
3676  "When set to true, solve will dump all lns models proto in text format to\n"
3677  "'FLAGS_cp_model_dump_prefix'lns_xxx.pbtxt.\n"
3678  ""},
3679  { "CppFlags_cp_model_dump_response_set", _wrap_CppFlags_cp_model_dump_response_set, METH_VARARGS, "\n"
3680  "DEBUG ONLY: Dump the CP-SAT final response found during solve.\n"
3681  "\n"
3682  "If true, the final response of each solve will be dumped to\n"
3683  "'FLAGS_cp_model_dump_prefix'response.pbtxt.\n"
3684  ""},
3685  { "CppFlags_cp_model_dump_response_get", _wrap_CppFlags_cp_model_dump_response_get, METH_O, "\n"
3686  "DEBUG ONLY: Dump the CP-SAT final response found during solve.\n"
3687  "\n"
3688  "If true, the final response of each solve will be dumped to\n"
3689  "'FLAGS_cp_model_dump_prefix'response.pbtxt.\n"
3690  ""},
3691  { "new_CppFlags", _wrap_new_CppFlags, METH_NOARGS, NULL},
3692  { "delete_CppFlags", _wrap_delete_CppFlags, METH_O, NULL},
3693  { "CppFlags_swigregister", CppFlags_swigregister, METH_O, NULL},
3694  { "CppFlags_swiginit", CppFlags_swiginit, METH_VARARGS, NULL},
3695  { "CppBridge_InitLogging", _wrap_CppBridge_InitLogging, METH_O, "\n"
3696  "Initialize the C++ logging layer.\n"
3697  "\n"
3698  "This must be called once before any other library from OR-Tools are used.\n"
3699  ""},
3700  { "CppBridge_ShutdownLogging", _wrap_CppBridge_ShutdownLogging, METH_NOARGS, "\n"
3701  "Shutdown the C++ logging layer.\n"
3702  "\n"
3703  "This can be called to shutdown the C++ logging layer from OR-Tools.\n"
3704  "It should only be called once.\n"
3705  ""},
3706  { "CppBridge_SetFlags", _wrap_CppBridge_SetFlags, METH_O, "Sets all the C++ flags contained in the CppFlags structure."},
3707  { "CppBridge_LoadGurobiSharedLibrary", _wrap_CppBridge_LoadGurobiSharedLibrary, METH_O, "\n"
3708  "Load the gurobi shared library.\n"
3709  "\n"
3710  "This is necessary if the library is installed in a non canonical\n"
3711  "directory, or if for any reason, it is not found.\n"
3712  "You need to pass the full path, including the shared library file.\n"
3713  "It returns true if the library was found and correctly loaded.\n"
3714  ""},
3715  { "new_CppBridge", _wrap_new_CppBridge, METH_NOARGS, NULL},
3716  { "delete_CppBridge", _wrap_delete_CppBridge, METH_O, NULL},
3717  { "CppBridge_swigregister", CppBridge_swigregister, METH_O, NULL},
3718  { "CppBridge_swiginit", CppBridge_swiginit, METH_VARARGS, NULL},
3719  { NULL, NULL, 0, NULL }
3720 };
3721 
3722 static PyMethodDef SwigMethods_proxydocs[] = {
3723  { NULL, NULL, 0, NULL }
3724 };
3725 
3726 
3727 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
3728 
3729 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
3730 static swig_type_info _swigt__p_int = {"_p_int", "int *|int_least32_t *|int32_t *", 0, 0, (void*)0, 0};
3731 static swig_type_info _swigt__p_long = {"_p_long", "intptr_t *|int_least64_t *|int_fast32_t *|int_fast64_t *|int64_t *|long *|int_fast16_t *|intmax_t *", 0, 0, (void*)0, 0};
3732 static swig_type_info _swigt__p_operations_research__CppBridge = {"_p_operations_research__CppBridge", "operations_research::CppBridge *", 0, 0, (void*)0, 0};
3733 static swig_type_info _swigt__p_operations_research__CppFlags = {"_p_operations_research__CppFlags", "operations_research::CppFlags *", 0, 0, (void*)0, 0};
3734 static swig_type_info _swigt__p_short = {"_p_short", "short *|int_least16_t *|int16_t *", 0, 0, (void*)0, 0};
3735 static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|int_least8_t *|int_fast8_t *|int8_t *", 0, 0, (void*)0, 0};
3736 static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint_least8_t *|uint_fast8_t *|uint8_t *", 0, 0, (void*)0, 0};
3737 static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uint_least32_t *|uint32_t *|unsigned int *", 0, 0, (void*)0, 0};
3738 static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "uintptr_t *|uint_least64_t *|uint_fast32_t *|uint_fast64_t *|uint64_t *|unsigned long *|uint_fast16_t *|uintmax_t *", 0, 0, (void*)0, 0};
3739 static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint_least16_t *|uint16_t *", 0, 0, (void*)0, 0};
3740 
3742  &_swigt__p_char,
3743  &_swigt__p_int,
3744  &_swigt__p_long,
3747  &_swigt__p_short,
3753 };
3754 
3755 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
3756 static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
3757 static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
3760 static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
3761 static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
3762 static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
3763 static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
3764 static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
3766 
3769  _swigc__p_int,
3779 };
3780 
3781 
3782 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
3783 
3785 {0, 0, 0, 0.0, 0, 0}};
3786 
3787 #ifdef __cplusplus
3788 }
3789 #endif
3790 /* -----------------------------------------------------------------------------
3791  * Type initialization:
3792  * This problem is tough by the requirement that no dynamic
3793  * memory is used. Also, since swig_type_info structures store pointers to
3794  * swig_cast_info structures and swig_cast_info structures store pointers back
3795  * to swig_type_info structures, we need some lookup code at initialization.
3796  * The idea is that swig generates all the structures that are needed.
3797  * The runtime then collects these partially filled structures.
3798  * The SWIG_InitializeModule function takes these initial arrays out of
3799  * swig_module, and does all the lookup, filling in the swig_module.types
3800  * array with the correct data and linking the correct swig_cast_info
3801  * structures together.
3802  *
3803  * The generated swig_type_info structures are assigned statically to an initial
3804  * array. We just loop through that array, and handle each type individually.
3805  * First we lookup if this type has been already loaded, and if so, use the
3806  * loaded structure instead of the generated one. Then we have to fill in the
3807  * cast linked list. The cast data is initially stored in something like a
3808  * two-dimensional array. Each row corresponds to a type (there are the same
3809  * number of rows as there are in the swig_type_initial array). Each entry in
3810  * a column is one of the swig_cast_info structures for that type.
3811  * The cast_initial array is actually an array of arrays, because each row has
3812  * a variable number of columns. So to actually build the cast linked list,
3813  * we find the array of casts associated with the type, and loop through it
3814  * adding the casts to the list. The one last trick we need to do is making
3815  * sure the type pointer in the swig_cast_info struct is correct.
3816  *
3817  * First off, we lookup the cast->type name to see if it is already loaded.
3818  * There are three cases to handle:
3819  * 1) If the cast->type has already been loaded AND the type we are adding
3820  * casting info to has not been loaded (it is in this module), THEN we
3821  * replace the cast->type pointer with the type pointer that has already
3822  * been loaded.
3823  * 2) If BOTH types (the one we are adding casting info to, and the
3824  * cast->type) are loaded, THEN the cast info has already been loaded by
3825  * the previous module so we just ignore it.
3826  * 3) Finally, if cast->type has not already been loaded, then we add that
3827  * swig_cast_info to the linked list (because the cast->type) pointer will
3828  * be correct.
3829  * ----------------------------------------------------------------------------- */
3830 
3831 #ifdef __cplusplus
3832 extern "C" {
3833 #if 0
3834 } /* c-mode */
3835 #endif
3836 #endif
3837 
3838 #if 0
3839 #define SWIGRUNTIME_DEBUG
3840 #endif
3841 
3842 
3843 SWIGRUNTIME void
3844 SWIG_InitializeModule(void *clientdata) {
3845  size_t i;
3846  swig_module_info *module_head, *iter;
3847  int init;
3848 
3849  /* check to see if the circular list has been setup, if not, set it up */
3850  if (swig_module.next==0) {
3851  /* Initialize the swig_module */
3855  init = 1;
3856  } else {
3857  init = 0;
3858  }
3859 
3860  /* Try and load any already created modules */
3861  module_head = SWIG_GetModule(clientdata);
3862  if (!module_head) {
3863  /* This is the first module loaded for this interpreter */
3864  /* so set the swig module into the interpreter */
3865  SWIG_SetModule(clientdata, &swig_module);
3866  } else {
3867  /* the interpreter has loaded a SWIG module, but has it loaded this one? */
3868  iter=module_head;
3869  do {
3870  if (iter==&swig_module) {
3871  /* Our module is already in the list, so there's nothing more to do. */
3872  return;
3873  }
3874  iter=iter->next;
3875  } while (iter!= module_head);
3876 
3877  /* otherwise we must add our module into the list */
3878  swig_module.next = module_head->next;
3879  module_head->next = &swig_module;
3880  }
3881 
3882  /* When multiple interpreters are used, a module could have already been initialized in
3883  a different interpreter, but not yet have a pointer in this interpreter.
3884  In this case, we do not want to continue adding types... everything should be
3885  set up already */
3886  if (init == 0) return;
3887 
3888  /* Now work on filling in swig_module.types */
3889 #ifdef SWIGRUNTIME_DEBUG
3890  printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
3891 #endif
3892  for (i = 0; i < swig_module.size; ++i) {
3893  swig_type_info *type = 0;
3894  swig_type_info *ret;
3895  swig_cast_info *cast;
3896 
3897 #ifdef SWIGRUNTIME_DEBUG
3898  printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
3899 #endif
3900 
3901  /* if there is another module already loaded */
3902  if (swig_module.next != &swig_module) {
3904  }
3905  if (type) {
3906  /* Overwrite clientdata field */
3907 #ifdef SWIGRUNTIME_DEBUG
3908  printf("SWIG_InitializeModule: found type %s\n", type->name);
3909 #endif
3912 #ifdef SWIGRUNTIME_DEBUG
3913  printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
3914 #endif
3915  }
3916  } else {
3917  type = swig_module.type_initial[i];
3918  }
3919 
3920  /* Insert casting types */
3921  cast = swig_module.cast_initial[i];
3922  while (cast->type) {
3923  /* Don't need to add information already in the list */
3924  ret = 0;
3925 #ifdef SWIGRUNTIME_DEBUG
3926  printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
3927 #endif
3928  if (swig_module.next != &swig_module) {
3930 #ifdef SWIGRUNTIME_DEBUG
3931  if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
3932 #endif
3933  }
3934  if (ret) {
3935  if (type == swig_module.type_initial[i]) {
3936 #ifdef SWIGRUNTIME_DEBUG
3937  printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
3938 #endif
3939  cast->type = ret;
3940  ret = 0;
3941  } else {
3942  /* Check for casting already in the list */
3943  swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
3944 #ifdef SWIGRUNTIME_DEBUG
3945  if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
3946 #endif
3947  if (!ocast) ret = 0;
3948  }
3949  }
3950 
3951  if (!ret) {
3952 #ifdef SWIGRUNTIME_DEBUG
3953  printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
3954 #endif
3955  if (type->cast) {
3956  type->cast->prev = cast;
3957  cast->next = type->cast;
3958  }
3959  type->cast = cast;
3960  }
3961  cast++;
3962  }
3963  /* Set entry in modules->types array equal to the type */
3964  swig_module.types[i] = type;
3965  }
3966  swig_module.types[i] = 0;
3967 
3968 #ifdef SWIGRUNTIME_DEBUG
3969  printf("**** SWIG_InitializeModule: Cast List ******\n");
3970  for (i = 0; i < swig_module.size; ++i) {
3971  int j = 0;
3973  printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
3974  while (cast->type) {
3975  printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
3976  cast++;
3977  ++j;
3978  }
3979  printf("---- Total casts: %d\n",j);
3980  }
3981  printf("**** SWIG_InitializeModule: Cast List ******\n");
3982 #endif
3983 }
3984 
3985 /* This function will propagate the clientdata field of type to
3986 * any new swig_type_info structures that have been added into the list
3987 * of equivalent types. It is like calling
3988 * SWIG_TypeClientData(type, clientdata) a second time.
3989 */
3990 SWIGRUNTIME void
3992  size_t i;
3993  swig_cast_info *equiv;
3994  static int init_run = 0;
3995 
3996  if (init_run) return;
3997  init_run = 1;
3998 
3999  for (i = 0; i < swig_module.size; i++) {
4000  if (swig_module.types[i]->clientdata) {
4001  equiv = swig_module.types[i]->cast;
4002  while (equiv) {
4003  if (!equiv->converter) {
4004  if (equiv->type && !equiv->type->clientdata)
4006  }
4007  equiv = equiv->next;
4008  }
4009  }
4010  }
4011 }
4012 
4013 #ifdef __cplusplus
4014 #if 0
4015 {
4016  /* c-mode */
4017 #endif
4018 }
4019 #endif
4020 
4021 
4022 
4023 #ifdef __cplusplus
4024 extern "C" {
4025 #endif
4026 
4027  /* Python-specific SWIG API */
4028 #define SWIG_newvarlink() SWIG_Python_newvarlink()
4029 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
4030 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
4031 
4032  /* -----------------------------------------------------------------------------
4033  * global variable support code.
4034  * ----------------------------------------------------------------------------- */
4035 
4036  typedef struct swig_globalvar {
4037  char *name; /* Name of global variable */
4038  PyObject *(*get_attr)(void); /* Return the current value */
4039  int (*set_attr)(PyObject *); /* Set the value */
4040  struct swig_globalvar *next;
4041  } swig_globalvar;
4042 
4043  typedef struct swig_varlinkobject {
4044  PyObject_HEAD
4047 
4048  SWIGINTERN PyObject *
4050 #if PY_VERSION_HEX >= 0x03000000
4051  return PyUnicode_InternFromString("<Swig global variables>");
4052 #else
4053  return PyString_FromString("<Swig global variables>");
4054 #endif
4055  }
4056 
4057  SWIGINTERN PyObject *
4059 #if PY_VERSION_HEX >= 0x03000000
4060  PyObject *str = PyUnicode_InternFromString("(");
4061  PyObject *tail;
4062  PyObject *joined;
4064  for (var = v->vars; var; var=var->next) {
4065  tail = PyUnicode_FromString(var->name);
4066  joined = PyUnicode_Concat(str, tail);
4067  Py_DecRef(str);
4068  Py_DecRef(tail);
4069  str = joined;
4070  if (var->next) {
4071  tail = PyUnicode_InternFromString(", ");
4072  joined = PyUnicode_Concat(str, tail);
4073  Py_DecRef(str);
4074  Py_DecRef(tail);
4075  str = joined;
4076  }
4077  }
4078  tail = PyUnicode_InternFromString(")");
4079  joined = PyUnicode_Concat(str, tail);
4080  Py_DecRef(str);
4081  Py_DecRef(tail);
4082  str = joined;
4083 #else
4084  PyObject *str = PyString_FromString("(");
4086  for (var = v->vars; var; var=var->next) {
4087  PyString_ConcatAndDel(&str,PyString_FromString(var->name));
4088  if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
4089  }
4090  PyString_ConcatAndDel(&str,PyString_FromString(")"));
4091 #endif
4092  return str;
4093  }
4094 
4095  SWIGINTERN void
4097  swig_globalvar *var = v->vars;
4098  while (var) {
4099  swig_globalvar *n = var->next;
4100  free(var->name);
4101  free(var);
4102  var = n;
4103  }
4104  }
4105 
4106  SWIGINTERN PyObject *
4108  PyObject *res = NULL;
4109  swig_globalvar *var = v->vars;
4110  while (var) {
4111  if (strcmp(var->name,n) == 0) {
4112  res = (*var->get_attr)();
4113  break;
4114  }
4115  var = var->next;
4116  }
4117  if (res == NULL && !PyErr_Occurred()) {
4118  PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
4119  }
4120  return res;
4121  }
4122 
4123  SWIGINTERN int
4124  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
4125  int res = 1;
4126  swig_globalvar *var = v->vars;
4127  while (var) {
4128  if (strcmp(var->name,n) == 0) {
4129  res = (*var->set_attr)(p);
4130  break;
4131  }
4132  var = var->next;
4133  }
4134  if (res == 1 && !PyErr_Occurred()) {
4135  PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
4136  }
4137  return res;
4138  }
4139 
4140  SWIGINTERN PyTypeObject*
4142  static char varlink__doc__[] = "Swig var link object";
4143  static PyTypeObject varlink_type;
4144  static int type_init = 0;
4145  if (!type_init) {
4146  const PyTypeObject tmp = {
4147 #if PY_VERSION_HEX >= 0x03000000
4148  PyVarObject_HEAD_INIT(NULL, 0)
4149 #else
4150  PyObject_HEAD_INIT(NULL)
4151  0, /* ob_size */
4152 #endif
4153  "swigvarlink", /* tp_name */
4154  sizeof(swig_varlinkobject), /* tp_basicsize */
4155  0, /* tp_itemsize */
4156  (destructor) swig_varlink_dealloc, /* tp_dealloc */
4157  0, /* tp_print */
4158  (getattrfunc) swig_varlink_getattr, /* tp_getattr */
4159  (setattrfunc) swig_varlink_setattr, /* tp_setattr */
4160  0, /* tp_compare */
4161  (reprfunc) swig_varlink_repr, /* tp_repr */
4162  0, /* tp_as_number */
4163  0, /* tp_as_sequence */
4164  0, /* tp_as_mapping */
4165  0, /* tp_hash */
4166  0, /* tp_call */
4167  (reprfunc) swig_varlink_str, /* tp_str */
4168  0, /* tp_getattro */
4169  0, /* tp_setattro */
4170  0, /* tp_as_buffer */
4171  0, /* tp_flags */
4172  varlink__doc__, /* tp_doc */
4173  0, /* tp_traverse */
4174  0, /* tp_clear */
4175  0, /* tp_richcompare */
4176  0, /* tp_weaklistoffset */
4177  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
4178  0, /* tp_del */
4179  0, /* tp_version_tag */
4180 #if PY_VERSION_HEX >= 0x03040000
4181  0, /* tp_finalize */
4182 #endif
4183 #ifdef COUNT_ALLOCS
4184  0, /* tp_allocs */
4185  0, /* tp_frees */
4186  0, /* tp_maxalloc */
4187  0, /* tp_prev */
4188  0 /* tp_next */
4189 #endif
4190  };
4191  varlink_type = tmp;
4192  type_init = 1;
4193  if (PyType_Ready(&varlink_type) < 0)
4194  return NULL;
4195  }
4196  return &varlink_type;
4197  }
4198 
4199  /* Create a variable linking object for use later */
4200  SWIGINTERN PyObject *
4202  swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
4203  if (result) {
4204  result->vars = 0;
4205  }
4206  return ((PyObject*) result);
4207  }
4208 
4209  SWIGINTERN void
4210  SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
4213  if (gv) {
4214  size_t size = strlen(name)+1;
4215  gv->name = (char *)malloc(size);
4216  if (gv->name) {
4217  memcpy(gv->name, name, size);
4218  gv->get_attr = get_attr;
4219  gv->set_attr = set_attr;
4220  gv->next = v->vars;
4221  }
4222  }
4223  v->vars = gv;
4224  }
4225 
4226  SWIGINTERN PyObject *
4228  static PyObject *globals = 0;
4229  if (!globals) {
4230  globals = SWIG_newvarlink();
4231  }
4232  return globals;
4233  }
4234 
4235  /* -----------------------------------------------------------------------------
4236  * constants/methods manipulation
4237  * ----------------------------------------------------------------------------- */
4238 
4239  /* Install Constants */
4240  SWIGINTERN void
4241  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
4242  PyObject *obj = 0;
4243  size_t i;
4244  for (i = 0; constants[i].type; ++i) {
4245  switch(constants[i].type) {
4246  case SWIG_PY_POINTER:
4247  obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
4248  break;
4249  case SWIG_PY_BINARY:
4250  obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
4251  break;
4252  default:
4253  obj = 0;
4254  break;
4255  }
4256  if (obj) {
4257  PyDict_SetItemString(d, constants[i].name, obj);
4258  Py_DECREF(obj);
4259  }
4260  }
4261  }
4262 
4263  /* -----------------------------------------------------------------------------*/
4264  /* Fix SwigMethods to carry the callback ptrs when needed */
4265  /* -----------------------------------------------------------------------------*/
4266 
4267  SWIGINTERN void
4268  SWIG_Python_FixMethods(PyMethodDef *methods,
4269  swig_const_info *const_table,
4270  swig_type_info **types,
4271  swig_type_info **types_initial) {
4272  size_t i;
4273  for (i = 0; methods[i].ml_name; ++i) {
4274  const char *c = methods[i].ml_doc;
4275  if (!c) continue;
4276  c = strstr(c, "swig_ptr: ");
4277  if (c) {
4278  int j;
4279  swig_const_info *ci = 0;
4280  const char *name = c + 10;
4281  for (j = 0; const_table[j].type; ++j) {
4282  if (strncmp(const_table[j].name, name,
4283  strlen(const_table[j].name)) == 0) {
4284  ci = &(const_table[j]);
4285  break;
4286  }
4287  }
4288  if (ci) {
4289  void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
4290  if (ptr) {
4291  size_t shift = (ci->ptype) - types;
4292  swig_type_info *ty = types_initial[shift];
4293  size_t ldoc = (c - methods[i].ml_doc);
4294  size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
4295  char *ndoc = (char*)malloc(ldoc + lptr + 10);
4296  if (ndoc) {
4297  char *buff = ndoc;
4298  memcpy(buff, methods[i].ml_doc, ldoc);
4299  buff += ldoc;
4300  memcpy(buff, "swig_ptr: ", 10);
4301  buff += 10;
4302  SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
4303  methods[i].ml_doc = ndoc;
4304  }
4305  }
4306  }
4307  }
4308  }
4309  }
4310 
4311  /* -----------------------------------------------------------------------------
4312  * Method creation and docstring support functions
4313  * ----------------------------------------------------------------------------- */
4314 
4315  /* -----------------------------------------------------------------------------
4316  * Function to find the method definition with the correct docstring for the
4317  * proxy module as opposed to the low-level API
4318  * ----------------------------------------------------------------------------- */
4319 
4320  SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
4321  /* Find the function in the modified method table */
4322  size_t offset = 0;
4323  int found = 0;
4324  while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
4325  if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
4326  found = 1;
4327  break;
4328  }
4329  offset++;
4330  }
4331  /* Use the copy with the modified docstring if available */
4332  return found ? &SwigMethods_proxydocs[offset] : NULL;
4333  }
4334 
4335  /* -----------------------------------------------------------------------------
4336  * Wrapper of PyInstanceMethod_New() used in Python 3
4337  * It is exported to the generated module, used for -fastproxy
4338  * ----------------------------------------------------------------------------- */
4339 
4340  SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
4341  if (PyCFunction_Check(func)) {
4342  PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
4343  PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
4344  if (ml)
4345  func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
4346  }
4347 #if PY_VERSION_HEX >= 0x03000000
4348  return PyInstanceMethod_New(func);
4349 #else
4350  return PyMethod_New(func, NULL, NULL);
4351 #endif
4352  }
4353 
4354  /* -----------------------------------------------------------------------------
4355  * Wrapper of PyStaticMethod_New()
4356  * It is exported to the generated module, used for -fastproxy
4357  * ----------------------------------------------------------------------------- */
4358 
4359  SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
4360  if (PyCFunction_Check(func)) {
4361  PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
4362  PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
4363  if (ml)
4364  func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
4365  }
4366  return PyStaticMethod_New(func);
4367  }
4368 
4369 #ifdef __cplusplus
4370 }
4371 #endif
4372 
4373 /* -----------------------------------------------------------------------------*
4374  * Partial Init method
4375  * -----------------------------------------------------------------------------*/
4376 
4377 #ifdef __cplusplus
4378 extern "C"
4379 #endif
4380 
4381 SWIGEXPORT
4382 #if PY_VERSION_HEX >= 0x03000000
4383 PyObject*
4384 #else
4385 void
4386 #endif
4387 SWIG_init(void) {
4388  PyObject *m, *d, *md, *globals;
4389 
4390 #if PY_VERSION_HEX >= 0x03000000
4391  static struct PyModuleDef SWIG_module = {
4392  PyModuleDef_HEAD_INIT,
4393  SWIG_name,
4394  NULL,
4395  -1,
4396  SwigMethods,
4397  NULL,
4398  NULL,
4399  NULL,
4400  NULL
4401  };
4402 #endif
4403 
4404 #if defined(SWIGPYTHON_BUILTIN)
4405  static SwigPyClientData SwigPyObject_clientdata = {
4406  0, 0, 0, 0, 0, 0, 0
4407  };
4408  static PyGetSetDef this_getset_def = {
4409  (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
4410  };
4411  static SwigPyGetSet thisown_getset_closure = {
4414  };
4415  static PyGetSetDef thisown_getset_def = {
4416  (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
4417  };
4418  PyTypeObject *builtin_pytype;
4419  int builtin_base_count;
4420  swig_type_info *builtin_basetype;
4421  PyObject *tuple;
4422  PyGetSetDescrObject *static_getset;
4423  PyTypeObject *metatype;
4424  PyTypeObject *swigpyobject;
4425  SwigPyClientData *cd;
4426  PyObject *public_interface, *public_symbol;
4427  PyObject *this_descr;
4428  PyObject *thisown_descr;
4429  PyObject *self = 0;
4430  int i;
4431 
4432  (void)builtin_pytype;
4433  (void)builtin_base_count;
4434  (void)builtin_basetype;
4435  (void)tuple;
4436  (void)static_getset;
4437  (void)self;
4438 
4439  /* Metaclass is used to implement static member variables */
4440  metatype = SwigPyObjectType();
4441  assert(metatype);
4442 #endif
4443 
4444  (void)globals;
4445 
4446  /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
4447  SWIG_This();
4450 #ifndef SWIGPYTHON_BUILTIN
4452 #endif
4453 
4454  /* Fix SwigMethods to carry the callback ptrs when needed */
4456 
4457 #if PY_VERSION_HEX >= 0x03000000
4458  m = PyModule_Create(&SWIG_module);
4459 #else
4460  m = Py_InitModule(SWIG_name, SwigMethods);
4461 #endif
4462 
4463  md = d = PyModule_GetDict(m);
4464  (void)md;
4465 
4467 
4468 #ifdef SWIGPYTHON_BUILTIN
4469  swigpyobject = SwigPyObject_TypeOnce();
4470 
4471  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
4472  assert(SwigPyObject_stype);
4473  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
4474  if (!cd) {
4475  SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
4476  SwigPyObject_clientdata.pytype = swigpyobject;
4477  } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
4478  PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
4479 # if PY_VERSION_HEX >= 0x03000000
4480  return NULL;
4481 # else
4482  return;
4483 # endif
4484  }
4485 
4486  /* All objects have a 'this' attribute */
4487  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
4488  (void)this_descr;
4489 
4490  /* All objects have a 'thisown' attribute */
4491  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
4492  (void)thisown_descr;
4493 
4494  public_interface = PyList_New(0);
4495  public_symbol = 0;
4496  (void)public_symbol;
4497 
4498  PyDict_SetItemString(md, "__all__", public_interface);
4499  Py_DECREF(public_interface);
4500  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
4501  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
4502  for (i = 0; swig_const_table[i].name != 0; ++i)
4503  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
4504 #endif
4505 
4507 
4508 #if PY_VERSION_HEX >= 0x03000000
4509  return m;
4510 #else
4511  return;
4512 #endif
4513 }
4514 
SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz)
SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own)
SWIGINTERN PyObject * _wrap_delete_CppBridge(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_POINTER_IMPLICIT_CONV
SWIGRUNTIME PyObject * SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags)
SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void)
SWIGRUNTIME int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
#define SWIG_InternalNewPointerObj(ptr, type, flags)
SWIGRUNTIME PyTypeObject * SwigPyObject_type(void)
SWIGINTERNINLINE PyObject * SWIG_From_bool(bool value)
struct swig_cast_info * cast
SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v)
SWIGINTERN PyObject * _wrap_CppFlags_logtostderr_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyTypeObject * SwigPyPacked_TypeOnce(void)
SWIGINTERN void SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int(*set_attr)(PyObject *p))
SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb)
SWIGINTERN int SWIG_AsPtr_std_string(PyObject *obj, std::string **val)
struct swig_cast_info * next
int64_t min
Definition: alldiff_cst.cc:139
#define SWIG_ERROR
SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty)
SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type)
SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name)
#define SWIG_AddNewMask(r)
static PyMethodDef swigobject_methods[]
#define SWIG_AttributeError
SWIGRUNTIME PyTypeObject * SwigPyObject_TypeOnce(void)
SWIGINTERN PyObject * SWIG_Python_newvarlink(void)
SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2)
static swig_cast_info _swigc__p_int[]
SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v)
#define SWIG_TYPE_TABLE_NAME
#define PyObject_DEL
struct swig_globalvar swig_globalvar
SWIGINTERN int SWIG_AsVal_bool(PyObject *obj, bool *val)
#define SWIG_fail
#define SWIG_OLDOBJ
static swig_type_info _swigt__p_operations_research__CppFlags
#define SWIG_TypeQuery(name)
struct swig_type_info *(* swig_dycast_func)(void **)
#define SWIGUNUSEDPARM(p)
static swig_cast_info _swigc__p_unsigned_short[]
#define SWIG_PY_BINARY
void *(* swig_converter_func)(void *, int *)
SWIGINTERN PyObject * CppBridge_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
const std::string name
PyObject * operator->() const
SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own)
SwigPtr_PyObject & operator=(const SwigPtr_PyObject &item)
SWIGINTERN PyObject * _wrap_CppFlags_cp_model_dump_models_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_type_info _swigt__p_unsigned_long
#define SWIG_ArgError(r)
SWIGINTERN PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n)
SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
#define SWIG_NEWOBJ
#define SWIG_POINTER_NEW
#define SWIG_Python_str_FromFormat
static void ShutdownLogging()
Shutdown the C++ logging layer.
Definition: init.h:98
static swig_type_info _swigt__p_operations_research__CppBridge
SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op)
SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
#define SWIG_IsNewObj(r)
SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty)
static swig_cast_info _swigc__p_operations_research__CppBridge[]
static swig_cast_info _swigc__p_char[]
SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc)
SWIGINTERN char * SWIG_Python_str_AsChar(PyObject *str)
SWIGINTERN PyObject * CppBridge_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_unsigned_int[]
#define SWIG_ConvertPtr(obj, pptr, type, flags)
SWIGINTERN PyObject * SWIG_Python_AppendOutput(PyObject *result, PyObject *obj)
SWIGRUNTIME void SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
SWIGINTERN PyObject * _wrap_CppFlags_cp_model_dump_response_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_MemoryError
#define SWIG_SystemError
SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg)
SWIGINTERN void SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[])
#define SWIGTYPE_p_operations_research__CppBridge
SWIGINTERN PyMethodDef * SWIG_PythonGetProxyDoc(const char *name)
int64_t tail
struct swig_type_info swig_type_info
static swig_cast_info _swigc__p_long[]
PyObject_HEAD void * pack
#define SWIG_RuntimeError
#define SWIG_GetModule(clientdata)
SWIGRUNTIME int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
PyObject *(* get_attr)(void)
#define SWIG_newvarlink()
SWIGINTERN int SWIG_AsVal_long(PyObject *obj, long *val)
#define SWIG_InstallConstants(d, constants)
PyObject_HEAD swig_globalvar * vars
SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v)
#define SWIGEXPORT
#define SWIG_NewPackedObj(ptr, sz, type)
static swig_type_info _swigt__p_int
SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata)
SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz)
static swig_type_info _swigt__p_short
static swig_module_info swig_module
#define SWIGRUNTIMEINLINE
SWIGRUNTIME void SWIG_PropagateClientData(void)
SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data)
SWIGINTERN int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p)
SWIGINTERN PyObject * _wrap_CppBridge_ShutdownLogging(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj)
static swig_type_info * swig_type_initial[]
static swig_cast_info _swigc__p_unsigned_char[]
#define SWIG_OK
struct swig_globalvar * next
#define SWIG_exception_fail(code, msg)
int64_t max
Definition: alldiff_cst.cc:140
Block * next
SWIGRUNTIME void SWIG_InitializeModule(void *clientdata)
SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
#define SWIGINTERNINLINE
SWIGINTERN PyObject * SWIG_Python_str_FromChar(const char *c)
SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module)
#define SWIG_PY_POINTER
SWIGRUNTIME int SWIG_Python_AddErrMesg(const char *mesg, int infront)
SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v)
SWIGRUNTIME PyObject * SwigPyObject_repr(SwigPyObject *v)
struct swig_cast_info * prev
SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
#define SWIG_BUILTIN_TP_INIT
SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char *mesg)
SWIGINTERN PyObject * _wrap_CppFlags_log_prefix_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyTypeObject * swig_varlink_type(void)
static swig_type_info * swig_types[12]
SWIGINTERN PyObject * SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
#define SWIG_POINTER_NO_NULL
SWIGINTERN PyObject * _wrap_CppFlags_cp_model_dump_lns_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max)
SWIGRUNTIME PyObject * SWIG_Python_ErrorType(int code)
#define SWIG_SyntaxError
static swig_type_info _swigt__p_unsigned_int
SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc)
struct swig_const_info swig_const_info
#define SWIG_CAST_NEW_MEMORY
SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
#define SWIG_name
SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata)
#define SWIG_PYTHON_THREAD_END_BLOCK
SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj)
SWIGINTERN PyObject * _wrap_CppFlags_cp_model_dump_response_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_signed_char[]
SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz)
#define SWIG_RUNTIME_VERSION
SWIGINTERN PyObject * CppFlags_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_delete_CppFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * SwigPyObject_acquire(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
SwigVar_PyObject(PyObject *obj=0)
This class performs various C++ initialization.
Definition: init.h:81
Simple structure that holds useful C++ flags to setup from non-C++ languages.
Definition: init.h:35
#define SWIGINTERN
struct swig_module_info * next
#define SWIG_SetModule(clientdata, pointer)
#define SWIG_NewClientData(obj)
static PyObject * Swig_This_global
SWIGRUNTIME PyObject * SwigPyObject_next(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty)
SWIGINTERN Py_ssize_t SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata))
std::string message
Definition: trace.cc:398
#define SWIG_Python_str_DelForPy3(x)
SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void)
SWIGINTERN int SWIG_AsVal_double(PyObject *obj, double *val)
#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)
SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args)
#define SWIG_NewPointerObj(ptr, type, flags)
#define SWIG_POINTER_OWN
#define SWIG_POINTER_NOSHADOW
SWIGINTERN PyObject * CppFlags_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME int SWIG_Python_TypeErrorOccurred(PyObject *obj)
SWIGINTERN PyObject * _wrap_new_CppFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SWIG_This(void)
#define SWIG_AddCast(r)
struct swig_module_info swig_module_info
#define SWIGPY_CAPSULE_NAME
struct swig_varlinkobject swig_varlinkobject
SWIGRUNTIME PyObject * SwigPyObject_format(const char *fmt, SwigPyObject *v)
SWIGINTERN PyObject * _wrap_CppBridge_SetFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SwigVar_PyObject & operator=(PyObject *obj)
#define SWIG_init
#define SWIG_TypeError
static void SetFlags(const CppFlags &flags)
Sets all the C++ flags contained in the CppFlags structure.
Definition: init.h:103
#define SWIG_POINTER_DISOWN
SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v))
SWIGINTERN PyObject * SwigPyObject_disown(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty)
SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory)
PyObject_HEAD void * ptr
static void InitLogging(const std::string &program_name)
Initialize the C++ logging layer.
Definition: init.h:88
SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial)
SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v)
#define SWIG_DivisionByZero
#define SWIG_as_voidptr(a)
SWIGRUNTIME void SWIG_Python_DestroyModule(PyObject *obj)
static swig_cast_info _swigc__p_unsigned_long[]
void * malloc(YYSIZE_T)
#define SWIG_ValueError
#define SWIG_BUFFER_SIZE
SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj)
SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v)
struct swig_cast_info swig_cast_info
SWIGINTERN PyObject * _wrap_CppFlags_cp_model_dump_lns_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SwigPyObject_hex(SwigPyObject *v)
SWIGRUNTIME swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type)
SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name)
SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty)
static PyMethodDef SwigMethods[]
#define Py_TYPE(op)
SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v)
#define SWIG_IOError
SwigPtr_PyObject(PyObject *obj, bool initial_ref=true)
static swig_cast_info * swig_cast_initial[]
SWIGRUNTIME SwigPyClientData * SwigPyClientData_New(PyObject *obj)
static swig_type_info _swigt__p_char
static PyMethodDef SwigMethods_proxydocs[]
SWIGINTERN PyObject * _wrap_CppFlags_cp_model_dump_prefix_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_PYTHON_THREAD_BEGIN_BLOCK
SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz)
SWIGRUNTIME int SWIG_Python_ArgFail(int argnum)
static swig_type_info _swigt__p_long
IntVar * var
Definition: expr_array.cc:1874
SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type)
SWIGINTERN PyObject * _wrap_CppFlags_log_prefix_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_type_info _swigt__p_signed_char
static swig_type_info _swigt__p_unsigned_short
SWIGINTERN PyObject * _wrap_CppFlags_logtostderr_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v)
#define SWIGRUNTIME
SWIGINTERN PyObject * _wrap_CppFlags_cp_model_dump_prefix_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_CppBridge_InitLogging(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
void free(void *)
SWIGRUNTIME PyObject * SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
swig_converter_func converter
static swig_cast_info _swigc__p_short[]
SWIGINTERN PyObject * _wrap_CppBridge_LoadGurobiSharedLibrary(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_STATIC_POINTER(var)
SWIGINTERNINLINE PyObject * SWIG_From_std_string(const std::string &s)
#define SWIG_MangledTypeQuery(name)
static swig_cast_info _swigc__p_operations_research__CppFlags[]
static swig_type_info _swigt__p_unsigned_char
SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj)
#define SWIG_CheckState(r)
SWIGINTERN PyObject * _wrap_new_CppBridge(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME void SWIG_Python_RaiseOrModifyTypeError(const char *message)
SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb)
SWIGRUNTIME PyTypeObject * SwigPyPacked_type(void)
#define SWIG_OverflowError
SWIGRUNTIME void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags)
SWIGRUNTIMEINLINE const char * SwigPyObject_GetDesc(PyObject *self)
static bool LoadGurobiSharedLibrary(const std::string &full_library_path)
Load the gurobi shared library.
Definition: init.h:122
SWIGINTERN PyObject * _wrap_CppFlags_cp_model_dump_models_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
SWIGINTERN swig_type_info * SWIG_pchar_descriptor(void)
#define SWIGTYPE_p_operations_research__CppFlags
#define SWIG_Python_CallFunctor(functor, obj)
if(!yyg->yy_init)
Definition: parser.yy.cc:965
int64_t value
SWIGINTERN PyObject * SWIG_globals(void)
#define SWIG_IsOK(r)
#define SWIG_NullReferenceError
SWIGRUNTIME PyObject * SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
SWIGRUNTIME PyObject * SwigPyObject_append(PyObject *v, PyObject *next)
static swig_const_info swig_const_table[]
SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op)
SWIGINTERN PyObject * SwigPyObject_own(PyObject *v, PyObject *args)
SWIGINTERNINLINE PyObject * SWIG_FromCharPtrAndSize(const char *carray, size_t size)
#define SWIG_IndexError
SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty)
SwigPtr_PyObject(const SwigPtr_PyObject &item)