OR-Tools  9.2
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_operations_research__OrToolsVersion swig_types[5]
2669 #define SWIGTYPE_p_short swig_types[6]
2670 #define SWIGTYPE_p_signed_char swig_types[7]
2671 #define SWIGTYPE_p_unsigned_char swig_types[8]
2672 #define SWIGTYPE_p_unsigned_int swig_types[9]
2673 #define SWIGTYPE_p_unsigned_long swig_types[10]
2674 #define SWIGTYPE_p_unsigned_short swig_types[11]
2676 static swig_module_info swig_module = {swig_types, 12, 0, 0, 0, 0};
2677 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2678 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2679 
2680 /* -------- TYPES TABLE (END) -------- */
2681 
2682 #ifdef SWIG_TypeQuery
2683 # undef SWIG_TypeQuery
2684 #endif
2685 #define SWIG_TypeQuery SWIG_Python_TypeQuery
2686 
2687 /*-----------------------------------------------
2688  @(target):= _pywrapinit.so
2689  ------------------------------------------------*/
2690 #if PY_VERSION_HEX >= 0x03000000
2691 # define SWIG_init PyInit__pywrapinit
2692 
2693 #else
2694 # define SWIG_init init_pywrapinit
2695 
2696 #endif
2697 #define SWIG_name "_pywrapinit"
2698 
2699 #define SWIGVERSION 0x040001
2700 #define SWIG_VERSION SWIGVERSION
2701 
2702 
2703 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
2704 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
2705 
2706 
2707 #include <stdexcept>
2708 
2709 
2710 namespace swig {
2711  class SwigPtr_PyObject {
2712  protected:
2713  PyObject *_obj;
2714 
2715  public:
2717  {
2718  }
2719 
2721  {
2723  Py_XINCREF(_obj);
2725  }
2726 
2727  SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
2728  {
2729  if (initial_ref) {
2731  Py_XINCREF(_obj);
2733  }
2734  }
2735 
2737  {
2739  Py_XINCREF(item._obj);
2740  Py_XDECREF(_obj);
2741  _obj = item._obj;
2743  return *this;
2744  }
2745 
2747  {
2749  Py_XDECREF(_obj);
2751  }
2752 
2753  operator PyObject *() const
2754  {
2755  return _obj;
2756  }
2757 
2758  PyObject *operator->() const
2759  {
2760  return _obj;
2761  }
2762  };
2763 }
2764 
2765 
2766 namespace swig {
2767  struct SwigVar_PyObject : SwigPtr_PyObject {
2768  SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
2769 
2771  {
2772  Py_XDECREF(_obj);
2773  _obj = obj;
2774  return *this;
2775  }
2776  };
2777 }
2778 
2779 
2780 #include <cstdint>
2781 #include <string>
2782 #include <vector>
2783 
2784 #include "ortools/base/basictypes.h"
2785 
2786 
2787 #include <stdint.h> // Use the C99 official header
2788 
2789 
2790 #define SWIGWORDSIZE64
2791 #ifndef LONG_MAX
2792 #include <limits.h>
2793 #endif
2794 #if (__WORDSIZE == 32) || (LONG_MAX == INT_MAX)
2795 # error "SWIG wrapped code invalid in 32 bit architecture, regenerate code using -DSWIGWORDSIZE32"
2796 #endif
2797 
2798 
2799 #include <string>
2800 
2801 
2802 #include "ortools/base/python-swig.h"
2803 
2804 
2805 #include "ortools/init/init.h"
2806 
2807 
2808 SWIGINTERN int
2809 SWIG_AsVal_double (PyObject *obj, double *val)
2810 {
2811  int res = SWIG_TypeError;
2812  if (PyFloat_Check(obj)) {
2813  if (val) *val = PyFloat_AsDouble(obj);
2814  return SWIG_OK;
2815 #if PY_VERSION_HEX < 0x03000000
2816  } else if (PyInt_Check(obj)) {
2817  if (val) *val = (double) PyInt_AsLong(obj);
2818  return SWIG_OK;
2819 #endif
2820  } else if (PyLong_Check(obj)) {
2821  double v = PyLong_AsDouble(obj);
2822  if (!PyErr_Occurred()) {
2823  if (val) *val = v;
2824  return SWIG_OK;
2825  } else {
2826  PyErr_Clear();
2827  }
2828  }
2829 #ifdef SWIG_PYTHON_CAST_MODE
2830  {
2831  int dispatch = 0;
2832  double d = PyFloat_AsDouble(obj);
2833  if (!PyErr_Occurred()) {
2834  if (val) *val = d;
2835  return SWIG_AddCast(SWIG_OK);
2836  } else {
2837  PyErr_Clear();
2838  }
2839  if (!dispatch) {
2840  long v = PyLong_AsLong(obj);
2841  if (!PyErr_Occurred()) {
2842  if (val) *val = v;
2844  } else {
2845  PyErr_Clear();
2846  }
2847  }
2848  }
2849 #endif
2850  return res;
2851 }
2852 
2853 
2854 #include <float.h>
2855 
2856 
2857 #include <math.h>
2858 
2859 
2860 SWIGINTERNINLINE int
2861 SWIG_CanCastAsInteger(double *d, double min, double max) {
2862  double x = *d;
2863  if ((min <= x && x <= max)) {
2864  double fx = floor(x);
2865  double cx = ceil(x);
2866  double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
2867  if ((errno == EDOM) || (errno == ERANGE)) {
2868  errno = 0;
2869  } else {
2870  double summ, reps, diff;
2871  if (rd < x) {
2872  diff = x - rd;
2873  } else if (rd > x) {
2874  diff = rd - x;
2875  } else {
2876  return 1;
2877  }
2878  summ = rd + x;
2879  reps = diff/summ;
2880  if (reps < 8*DBL_EPSILON) {
2881  *d = rd;
2882  return 1;
2883  }
2884  }
2885  }
2886  return 0;
2887 }
2888 
2889 
2890 SWIGINTERN int
2891 SWIG_AsVal_long (PyObject *obj, long* val)
2892 {
2893 #if PY_VERSION_HEX < 0x03000000
2894  if (PyInt_Check(obj)) {
2895  if (val) *val = PyInt_AsLong(obj);
2896  return SWIG_OK;
2897  } else
2898 #endif
2899  if (PyLong_Check(obj)) {
2900  long v = PyLong_AsLong(obj);
2901  if (!PyErr_Occurred()) {
2902  if (val) *val = v;
2903  return SWIG_OK;
2904  } else {
2905  PyErr_Clear();
2906  return SWIG_OverflowError;
2907  }
2908  }
2909 #ifdef SWIG_PYTHON_CAST_MODE
2910  {
2911  int dispatch = 0;
2912  long v = PyInt_AsLong(obj);
2913  if (!PyErr_Occurred()) {
2914  if (val) *val = v;
2915  return SWIG_AddCast(SWIG_OK);
2916  } else {
2917  PyErr_Clear();
2918  }
2919  if (!dispatch) {
2920  double d;
2921  int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
2922  if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
2923  if (val) *val = (long)(d);
2924  return res;
2925  }
2926  }
2927  }
2928 #endif
2929  return SWIG_TypeError;
2930 }
2931 
2932 
2933 SWIGINTERN int
2934 SWIG_AsVal_bool (PyObject *obj, bool *val)
2935 {
2936  int r;
2937  if (!PyBool_Check(obj))
2938  return SWIG_ERROR;
2939  r = PyObject_IsTrue(obj);
2940  if (r == -1)
2941  return SWIG_ERROR;
2942  if (val) *val = r ? true : false;
2943  return SWIG_OK;
2944 }
2945 
2946 
2947 SWIGINTERNINLINE PyObject*
2949 {
2950  return PyBool_FromLong(value ? 1 : 0);
2951 }
2952 
2953 
2956 {
2957  static int init = 0;
2958  static swig_type_info* info = 0;
2959  if (!init) {
2960  info = SWIG_TypeQuery("_p_char");
2961  init = 1;
2962  }
2963  return info;
2964 }
2965 
2966 
2967 SWIGINTERN int
2968 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
2969 {
2970 #if PY_VERSION_HEX>=0x03000000
2971 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
2972  if (PyBytes_Check(obj))
2973 #else
2974  if (PyUnicode_Check(obj))
2975 #endif
2976 #else
2977  if (PyString_Check(obj))
2978 #endif
2979  {
2980  char *cstr; Py_ssize_t len;
2981  int ret = SWIG_OK;
2982 #if PY_VERSION_HEX>=0x03000000
2983 #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
2984  if (!alloc && cptr) {
2985  /* We can't allow converting without allocation, since the internal
2986  representation of string in Python 3 is UCS-2/UCS-4 but we require
2987  a UTF-8 representation.
2988  TODO(bhy) More detailed explanation */
2989  return SWIG_RuntimeError;
2990  }
2991  obj = PyUnicode_AsUTF8String(obj);
2992  if (!obj)
2993  return SWIG_TypeError;
2994  if (alloc)
2995  *alloc = SWIG_NEWOBJ;
2996 #endif
2997  PyBytes_AsStringAndSize(obj, &cstr, &len);
2998 #else
2999  PyString_AsStringAndSize(obj, &cstr, &len);
3000 #endif
3001  if (cptr) {
3002  if (alloc) {
3003  if (*alloc == SWIG_NEWOBJ) {
3004  *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3005  *alloc = SWIG_NEWOBJ;
3006  } else {
3007  *cptr = cstr;
3008  *alloc = SWIG_OLDOBJ;
3009  }
3010  } else {
3011 #if PY_VERSION_HEX>=0x03000000
3012 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3013  *cptr = PyBytes_AsString(obj);
3014 #else
3015  assert(0); /* Should never reach here with Unicode strings in Python 3 */
3016 #endif
3017 #else
3018  *cptr = SWIG_Python_str_AsChar(obj);
3019  if (!*cptr)
3020  ret = SWIG_TypeError;
3021 #endif
3022  }
3023  }
3024  if (psize) *psize = len + 1;
3025 #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3026  Py_XDECREF(obj);
3027 #endif
3028  return ret;
3029  } else {
3030 #if defined(SWIG_PYTHON_2_UNICODE)
3031 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3032 #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
3033 #endif
3034 #if PY_VERSION_HEX<0x03000000
3035  if (PyUnicode_Check(obj)) {
3036  char *cstr; Py_ssize_t len;
3037  if (!alloc && cptr) {
3038  return SWIG_RuntimeError;
3039  }
3040  obj = PyUnicode_AsUTF8String(obj);
3041  if (!obj)
3042  return SWIG_TypeError;
3043  if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
3044  if (cptr) {
3045  if (alloc) *alloc = SWIG_NEWOBJ;
3046  *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3047  }
3048  if (psize) *psize = len + 1;
3049 
3050  Py_XDECREF(obj);
3051  return SWIG_OK;
3052  } else {
3053  Py_XDECREF(obj);
3054  }
3055  }
3056 #endif
3057 #endif
3058 
3059  swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3060  if (pchar_descriptor) {
3061  void* vptr = 0;
3062  if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3063  if (cptr) *cptr = (char *) vptr;
3064  if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3065  if (alloc) *alloc = SWIG_OLDOBJ;
3066  return SWIG_OK;
3067  }
3068  }
3069  }
3070  return SWIG_TypeError;
3071 }
3072 
3073 
3074 SWIGINTERN int
3075 SWIG_AsPtr_std_string (PyObject * obj, std::string **val)
3076 {
3077  char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
3078  if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
3079  if (buf) {
3080  if (val) *val = new std::string(buf, size - 1);
3081  if (alloc == SWIG_NEWOBJ) delete[] buf;
3082  return SWIG_NEWOBJ;
3083  } else {
3084  if (val) *val = 0;
3085  return SWIG_OLDOBJ;
3086  }
3087  } else {
3088  static int init = 0;
3089  static swig_type_info* descriptor = 0;
3090  if (!init) {
3091  descriptor = SWIG_TypeQuery("std::string" " *");
3092  init = 1;
3093  }
3094  if (descriptor) {
3095  std::string *vptr;
3096  int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0);
3097  if (SWIG_IsOK(res) && val) *val = vptr;
3098  return res;
3099  }
3100  }
3101  return SWIG_ERROR;
3102 }
3103 
3104 
3105 SWIGINTERNINLINE PyObject *
3106 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
3107 {
3108  if (carray) {
3109  if (size > INT_MAX) {
3110  swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3111  return pchar_descriptor ?
3112  SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
3113  } else {
3114 #if PY_VERSION_HEX >= 0x03000000
3115 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3116  return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3117 #else
3118  return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
3119 #endif
3120 #else
3121  return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3122 #endif
3123  }
3124  } else {
3125  return SWIG_Py_Void();
3126  }
3127 }
3128 
3129 
3130 SWIGINTERNINLINE PyObject *
3131 SWIG_From_std_string (const std::string& s)
3132 {
3133  return SWIG_FromCharPtrAndSize(s.data(), s.size());
3134 }
3135 
3136 
3137 SWIGINTERNINLINE PyObject*
3139 {
3140  return PyInt_FromLong((long) value);
3141 }
3142 
3143 #ifdef __cplusplus
3144 extern "C" {
3145 #endif
3146 SWIGINTERN PyObject *_wrap_CppFlags_logtostderr_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3147  PyObject *resultobj = 0;
3149  bool arg2 ;
3150  void *argp1 = 0 ;
3151  int res1 = 0 ;
3152  bool val2 ;
3153  int ecode2 = 0 ;
3154  PyObject *swig_obj[2] ;
3155 
3156  if (!SWIG_Python_UnpackTuple(args, "CppFlags_logtostderr_set", 2, 2, swig_obj)) SWIG_fail;
3157  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3158  if (!SWIG_IsOK(res1)) {
3159  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_logtostderr_set" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3160  }
3161  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3162  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
3163  if (!SWIG_IsOK(ecode2)) {
3164  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CppFlags_logtostderr_set" "', argument " "2"" of type '" "bool""'");
3165  }
3166  arg2 = static_cast< bool >(val2);
3167  if (arg1) (arg1)->logtostderr = arg2;
3168  resultobj = SWIG_Py_Void();
3169  return resultobj;
3170 fail:
3171  return NULL;
3172 }
3173 
3174 
3175 SWIGINTERN PyObject *_wrap_CppFlags_logtostderr_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3176  PyObject *resultobj = 0;
3178  void *argp1 = 0 ;
3179  int res1 = 0 ;
3180  PyObject *swig_obj[1] ;
3181  bool result;
3182 
3183  if (!args) SWIG_fail;
3184  swig_obj[0] = args;
3185  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3186  if (!SWIG_IsOK(res1)) {
3187  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_logtostderr_get" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3188  }
3189  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3190  result = (bool) ((arg1)->logtostderr);
3191  resultobj = SWIG_From_bool(static_cast< bool >(result));
3192  return resultobj;
3193 fail:
3194  return NULL;
3195 }
3196 
3197 
3198 SWIGINTERN PyObject *_wrap_CppFlags_log_prefix_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3199  PyObject *resultobj = 0;
3201  bool arg2 ;
3202  void *argp1 = 0 ;
3203  int res1 = 0 ;
3204  bool val2 ;
3205  int ecode2 = 0 ;
3206  PyObject *swig_obj[2] ;
3207 
3208  if (!SWIG_Python_UnpackTuple(args, "CppFlags_log_prefix_set", 2, 2, swig_obj)) SWIG_fail;
3209  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3210  if (!SWIG_IsOK(res1)) {
3211  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_log_prefix_set" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3212  }
3213  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3214  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
3215  if (!SWIG_IsOK(ecode2)) {
3216  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CppFlags_log_prefix_set" "', argument " "2"" of type '" "bool""'");
3217  }
3218  arg2 = static_cast< bool >(val2);
3219  if (arg1) (arg1)->log_prefix = arg2;
3220  resultobj = SWIG_Py_Void();
3221  return resultobj;
3222 fail:
3223  return NULL;
3224 }
3225 
3226 
3227 SWIGINTERN PyObject *_wrap_CppFlags_log_prefix_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3228  PyObject *resultobj = 0;
3230  void *argp1 = 0 ;
3231  int res1 = 0 ;
3232  PyObject *swig_obj[1] ;
3233  bool result;
3234 
3235  if (!args) SWIG_fail;
3236  swig_obj[0] = args;
3237  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3238  if (!SWIG_IsOK(res1)) {
3239  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_log_prefix_get" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3240  }
3241  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3242  result = (bool) ((arg1)->log_prefix);
3243  resultobj = SWIG_From_bool(static_cast< bool >(result));
3244  return resultobj;
3245 fail:
3246  return NULL;
3247 }
3248 
3249 
3250 SWIGINTERN PyObject *_wrap_CppFlags_cp_model_dump_prefix_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3251  PyObject *resultobj = 0;
3253  std::string *arg2 = 0 ;
3254  void *argp1 = 0 ;
3255  int res1 = 0 ;
3256  int res2 = SWIG_OLDOBJ ;
3257  PyObject *swig_obj[2] ;
3258 
3259  if (!SWIG_Python_UnpackTuple(args, "CppFlags_cp_model_dump_prefix_set", 2, 2, swig_obj)) SWIG_fail;
3260  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3261  if (!SWIG_IsOK(res1)) {
3262  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_cp_model_dump_prefix_set" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3263  }
3264  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3265  {
3266  std::string *ptr = (std::string *)0;
3267  res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr);
3268  if (!SWIG_IsOK(res2)) {
3269  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CppFlags_cp_model_dump_prefix_set" "', argument " "2"" of type '" "std::string const &""'");
3270  }
3271  if (!ptr) {
3272  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CppFlags_cp_model_dump_prefix_set" "', argument " "2"" of type '" "std::string const &""'");
3273  }
3274  arg2 = ptr;
3275  }
3276  if (arg1) (arg1)->cp_model_dump_prefix = *arg2;
3277  resultobj = SWIG_Py_Void();
3278  if (SWIG_IsNewObj(res2)) delete arg2;
3279  return resultobj;
3280 fail:
3281  if (SWIG_IsNewObj(res2)) delete arg2;
3282  return NULL;
3283 }
3284 
3285 
3286 SWIGINTERN PyObject *_wrap_CppFlags_cp_model_dump_prefix_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3287  PyObject *resultobj = 0;
3289  void *argp1 = 0 ;
3290  int res1 = 0 ;
3291  PyObject *swig_obj[1] ;
3292  std::string *result = 0 ;
3293 
3294  if (!args) SWIG_fail;
3295  swig_obj[0] = args;
3296  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3297  if (!SWIG_IsOK(res1)) {
3298  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_cp_model_dump_prefix_get" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3299  }
3300  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3301  result = (std::string *) & ((arg1)->cp_model_dump_prefix);
3302  resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
3303  return resultobj;
3304 fail:
3305  return NULL;
3306 }
3307 
3308 
3309 SWIGINTERN PyObject *_wrap_CppFlags_cp_model_dump_models_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3310  PyObject *resultobj = 0;
3312  bool arg2 ;
3313  void *argp1 = 0 ;
3314  int res1 = 0 ;
3315  bool val2 ;
3316  int ecode2 = 0 ;
3317  PyObject *swig_obj[2] ;
3318 
3319  if (!SWIG_Python_UnpackTuple(args, "CppFlags_cp_model_dump_models_set", 2, 2, swig_obj)) SWIG_fail;
3320  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3321  if (!SWIG_IsOK(res1)) {
3322  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_cp_model_dump_models_set" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3323  }
3324  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3325  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
3326  if (!SWIG_IsOK(ecode2)) {
3327  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CppFlags_cp_model_dump_models_set" "', argument " "2"" of type '" "bool""'");
3328  }
3329  arg2 = static_cast< bool >(val2);
3330  if (arg1) (arg1)->cp_model_dump_models = arg2;
3331  resultobj = SWIG_Py_Void();
3332  return resultobj;
3333 fail:
3334  return NULL;
3335 }
3336 
3337 
3338 SWIGINTERN PyObject *_wrap_CppFlags_cp_model_dump_models_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3339  PyObject *resultobj = 0;
3341  void *argp1 = 0 ;
3342  int res1 = 0 ;
3343  PyObject *swig_obj[1] ;
3344  bool result;
3345 
3346  if (!args) SWIG_fail;
3347  swig_obj[0] = args;
3348  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3349  if (!SWIG_IsOK(res1)) {
3350  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_cp_model_dump_models_get" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3351  }
3352  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3353  result = (bool) ((arg1)->cp_model_dump_models);
3354  resultobj = SWIG_From_bool(static_cast< bool >(result));
3355  return resultobj;
3356 fail:
3357  return NULL;
3358 }
3359 
3360 
3361 SWIGINTERN PyObject *_wrap_CppFlags_cp_model_dump_lns_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3362  PyObject *resultobj = 0;
3364  bool arg2 ;
3365  void *argp1 = 0 ;
3366  int res1 = 0 ;
3367  bool val2 ;
3368  int ecode2 = 0 ;
3369  PyObject *swig_obj[2] ;
3370 
3371  if (!SWIG_Python_UnpackTuple(args, "CppFlags_cp_model_dump_lns_set", 2, 2, swig_obj)) SWIG_fail;
3372  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3373  if (!SWIG_IsOK(res1)) {
3374  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_cp_model_dump_lns_set" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3375  }
3376  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3377  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
3378  if (!SWIG_IsOK(ecode2)) {
3379  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CppFlags_cp_model_dump_lns_set" "', argument " "2"" of type '" "bool""'");
3380  }
3381  arg2 = static_cast< bool >(val2);
3382  if (arg1) (arg1)->cp_model_dump_lns = arg2;
3383  resultobj = SWIG_Py_Void();
3384  return resultobj;
3385 fail:
3386  return NULL;
3387 }
3388 
3389 
3390 SWIGINTERN PyObject *_wrap_CppFlags_cp_model_dump_lns_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3391  PyObject *resultobj = 0;
3393  void *argp1 = 0 ;
3394  int res1 = 0 ;
3395  PyObject *swig_obj[1] ;
3396  bool result;
3397 
3398  if (!args) SWIG_fail;
3399  swig_obj[0] = args;
3400  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3401  if (!SWIG_IsOK(res1)) {
3402  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_cp_model_dump_lns_get" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3403  }
3404  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3405  result = (bool) ((arg1)->cp_model_dump_lns);
3406  resultobj = SWIG_From_bool(static_cast< bool >(result));
3407  return resultobj;
3408 fail:
3409  return NULL;
3410 }
3411 
3412 
3413 SWIGINTERN PyObject *_wrap_CppFlags_cp_model_dump_response_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3414  PyObject *resultobj = 0;
3416  bool arg2 ;
3417  void *argp1 = 0 ;
3418  int res1 = 0 ;
3419  bool val2 ;
3420  int ecode2 = 0 ;
3421  PyObject *swig_obj[2] ;
3422 
3423  if (!SWIG_Python_UnpackTuple(args, "CppFlags_cp_model_dump_response_set", 2, 2, swig_obj)) SWIG_fail;
3424  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3425  if (!SWIG_IsOK(res1)) {
3426  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_cp_model_dump_response_set" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3427  }
3428  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3429  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
3430  if (!SWIG_IsOK(ecode2)) {
3431  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CppFlags_cp_model_dump_response_set" "', argument " "2"" of type '" "bool""'");
3432  }
3433  arg2 = static_cast< bool >(val2);
3434  if (arg1) (arg1)->cp_model_dump_response = arg2;
3435  resultobj = SWIG_Py_Void();
3436  return resultobj;
3437 fail:
3438  return NULL;
3439 }
3440 
3441 
3442 SWIGINTERN PyObject *_wrap_CppFlags_cp_model_dump_response_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3443  PyObject *resultobj = 0;
3445  void *argp1 = 0 ;
3446  int res1 = 0 ;
3447  PyObject *swig_obj[1] ;
3448  bool result;
3449 
3450  if (!args) SWIG_fail;
3451  swig_obj[0] = args;
3452  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__CppFlags, 0 | 0 );
3453  if (!SWIG_IsOK(res1)) {
3454  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppFlags_cp_model_dump_response_get" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3455  }
3456  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3457  result = (bool) ((arg1)->cp_model_dump_response);
3458  resultobj = SWIG_From_bool(static_cast< bool >(result));
3459  return resultobj;
3460 fail:
3461  return NULL;
3462 }
3463 
3464 
3465 SWIGINTERN PyObject *_wrap_new_CppFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3466  PyObject *resultobj = 0;
3467  operations_research::CppFlags *result = 0 ;
3468 
3469  if (!SWIG_Python_UnpackTuple(args, "new_CppFlags", 0, 0, 0)) SWIG_fail;
3472  return resultobj;
3473 fail:
3474  return NULL;
3475 }
3476 
3477 
3478 SWIGINTERN PyObject *_wrap_delete_CppFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3479  PyObject *resultobj = 0;
3481  void *argp1 = 0 ;
3482  int res1 = 0 ;
3483  PyObject *swig_obj[1] ;
3484 
3485  if (!args) SWIG_fail;
3486  swig_obj[0] = args;
3488  if (!SWIG_IsOK(res1)) {
3489  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CppFlags" "', argument " "1"" of type '" "operations_research::CppFlags *""'");
3490  }
3491  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3492  delete arg1;
3493  resultobj = SWIG_Py_Void();
3494  return resultobj;
3495 fail:
3496  return NULL;
3497 }
3498 
3499 
3500 SWIGINTERN PyObject *CppFlags_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3501  PyObject *obj;
3502  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
3504  return SWIG_Py_Void();
3505 }
3506 
3507 SWIGINTERN PyObject *CppFlags_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3508  return SWIG_Python_InitShadowInstance(args);
3509 }
3510 
3511 SWIGINTERN PyObject *_wrap_CppBridge_InitLogging(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3512  PyObject *resultobj = 0;
3513  std::string *arg1 = 0 ;
3514  int res1 = SWIG_OLDOBJ ;
3515  PyObject *swig_obj[1] ;
3516 
3517  if (!args) SWIG_fail;
3518  swig_obj[0] = args;
3519  {
3520  std::string *ptr = (std::string *)0;
3521  res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr);
3522  if (!SWIG_IsOK(res1)) {
3523  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppBridge_InitLogging" "', argument " "1"" of type '" "std::string const &""'");
3524  }
3525  if (!ptr) {
3526  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CppBridge_InitLogging" "', argument " "1"" of type '" "std::string const &""'");
3527  }
3528  arg1 = ptr;
3529  }
3530  operations_research::CppBridge::InitLogging((std::string const &)*arg1);
3531  resultobj = SWIG_Py_Void();
3532  if (SWIG_IsNewObj(res1)) delete arg1;
3533  return resultobj;
3534 fail:
3535  if (SWIG_IsNewObj(res1)) delete arg1;
3536  return NULL;
3537 }
3538 
3539 
3540 SWIGINTERN PyObject *_wrap_CppBridge_ShutdownLogging(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3541  PyObject *resultobj = 0;
3542 
3543  if (!SWIG_Python_UnpackTuple(args, "CppBridge_ShutdownLogging", 0, 0, 0)) SWIG_fail;
3545  resultobj = SWIG_Py_Void();
3546  return resultobj;
3547 fail:
3548  return NULL;
3549 }
3550 
3551 
3552 SWIGINTERN PyObject *_wrap_CppBridge_SetFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3553  PyObject *resultobj = 0;
3554  operations_research::CppFlags *arg1 = 0 ;
3555  void *argp1 = 0 ;
3556  int res1 = 0 ;
3557  PyObject *swig_obj[1] ;
3558 
3559  if (!args) SWIG_fail;
3560  swig_obj[0] = args;
3561  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_operations_research__CppFlags, 0 | 0);
3562  if (!SWIG_IsOK(res1)) {
3563  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppBridge_SetFlags" "', argument " "1"" of type '" "operations_research::CppFlags const &""'");
3564  }
3565  if (!argp1) {
3566  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CppBridge_SetFlags" "', argument " "1"" of type '" "operations_research::CppFlags const &""'");
3567  }
3568  arg1 = reinterpret_cast< operations_research::CppFlags * >(argp1);
3570  resultobj = SWIG_Py_Void();
3571  return resultobj;
3572 fail:
3573  return NULL;
3574 }
3575 
3576 
3577 SWIGINTERN PyObject *_wrap_CppBridge_LoadGurobiSharedLibrary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3578  PyObject *resultobj = 0;
3579  std::string *arg1 = 0 ;
3580  int res1 = SWIG_OLDOBJ ;
3581  PyObject *swig_obj[1] ;
3582  bool result;
3583 
3584  if (!args) SWIG_fail;
3585  swig_obj[0] = args;
3586  {
3587  std::string *ptr = (std::string *)0;
3588  res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr);
3589  if (!SWIG_IsOK(res1)) {
3590  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CppBridge_LoadGurobiSharedLibrary" "', argument " "1"" of type '" "std::string const &""'");
3591  }
3592  if (!ptr) {
3593  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CppBridge_LoadGurobiSharedLibrary" "', argument " "1"" of type '" "std::string const &""'");
3594  }
3595  arg1 = ptr;
3596  }
3597  result = (bool)operations_research::CppBridge::LoadGurobiSharedLibrary((std::string const &)*arg1);
3598  resultobj = SWIG_From_bool(static_cast< bool >(result));
3599  if (SWIG_IsNewObj(res1)) delete arg1;
3600  return resultobj;
3601 fail:
3602  if (SWIG_IsNewObj(res1)) delete arg1;
3603  return NULL;
3604 }
3605 
3606 
3607 SWIGINTERN PyObject *_wrap_new_CppBridge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3608  PyObject *resultobj = 0;
3609  operations_research::CppBridge *result = 0 ;
3610 
3611  if (!SWIG_Python_UnpackTuple(args, "new_CppBridge", 0, 0, 0)) SWIG_fail;
3614  return resultobj;
3615 fail:
3616  return NULL;
3617 }
3618 
3619 
3620 SWIGINTERN PyObject *_wrap_delete_CppBridge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3621  PyObject *resultobj = 0;
3623  void *argp1 = 0 ;
3624  int res1 = 0 ;
3625  PyObject *swig_obj[1] ;
3626 
3627  if (!args) SWIG_fail;
3628  swig_obj[0] = args;
3630  if (!SWIG_IsOK(res1)) {
3631  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CppBridge" "', argument " "1"" of type '" "operations_research::CppBridge *""'");
3632  }
3633  arg1 = reinterpret_cast< operations_research::CppBridge * >(argp1);
3634  delete arg1;
3635  resultobj = SWIG_Py_Void();
3636  return resultobj;
3637 fail:
3638  return NULL;
3639 }
3640 
3641 
3642 SWIGINTERN PyObject *CppBridge_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3643  PyObject *obj;
3644  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
3646  return SWIG_Py_Void();
3647 }
3648 
3649 SWIGINTERN PyObject *CppBridge_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3650  return SWIG_Python_InitShadowInstance(args);
3651 }
3652 
3653 SWIGINTERN PyObject *_wrap_OrToolsVersion_MajorNumber(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3654  PyObject *resultobj = 0;
3655  int result;
3656 
3657  if (!SWIG_Python_UnpackTuple(args, "OrToolsVersion_MajorNumber", 0, 0, 0)) SWIG_fail;
3659  resultobj = SWIG_From_int(static_cast< int >(result));
3660  return resultobj;
3661 fail:
3662  return NULL;
3663 }
3664 
3665 
3666 SWIGINTERN PyObject *_wrap_OrToolsVersion_MinorNumber(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3667  PyObject *resultobj = 0;
3668  int result;
3669 
3670  if (!SWIG_Python_UnpackTuple(args, "OrToolsVersion_MinorNumber", 0, 0, 0)) SWIG_fail;
3672  resultobj = SWIG_From_int(static_cast< int >(result));
3673  return resultobj;
3674 fail:
3675  return NULL;
3676 }
3677 
3678 
3679 SWIGINTERN PyObject *_wrap_OrToolsVersion_PatchNumber(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3680  PyObject *resultobj = 0;
3681  int result;
3682 
3683  if (!SWIG_Python_UnpackTuple(args, "OrToolsVersion_PatchNumber", 0, 0, 0)) SWIG_fail;
3685  resultobj = SWIG_From_int(static_cast< int >(result));
3686  return resultobj;
3687 fail:
3688  return NULL;
3689 }
3690 
3691 
3692 SWIGINTERN PyObject *_wrap_OrToolsVersion_VersionString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3693  PyObject *resultobj = 0;
3694  std::string result;
3695 
3696  if (!SWIG_Python_UnpackTuple(args, "OrToolsVersion_VersionString", 0, 0, 0)) SWIG_fail;
3698  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
3699  return resultobj;
3700 fail:
3701  return NULL;
3702 }
3703 
3704 
3705 SWIGINTERN PyObject *_wrap_new_OrToolsVersion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3706  PyObject *resultobj = 0;
3708 
3709  if (!SWIG_Python_UnpackTuple(args, "new_OrToolsVersion", 0, 0, 0)) SWIG_fail;
3712  return resultobj;
3713 fail:
3714  return NULL;
3715 }
3716 
3717 
3718 SWIGINTERN PyObject *_wrap_delete_OrToolsVersion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3719  PyObject *resultobj = 0;
3721  void *argp1 = 0 ;
3722  int res1 = 0 ;
3723  PyObject *swig_obj[1] ;
3724 
3725  if (!args) SWIG_fail;
3726  swig_obj[0] = args;
3728  if (!SWIG_IsOK(res1)) {
3729  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OrToolsVersion" "', argument " "1"" of type '" "operations_research::OrToolsVersion *""'");
3730  }
3731  arg1 = reinterpret_cast< operations_research::OrToolsVersion * >(argp1);
3732  delete arg1;
3733  resultobj = SWIG_Py_Void();
3734  return resultobj;
3735 fail:
3736  return NULL;
3737 }
3738 
3739 
3740 SWIGINTERN PyObject *OrToolsVersion_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3741  PyObject *obj;
3742  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
3744  return SWIG_Py_Void();
3745 }
3746 
3747 SWIGINTERN PyObject *OrToolsVersion_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3748  return SWIG_Python_InitShadowInstance(args);
3749 }
3750 
3751 static PyMethodDef SwigMethods[] = {
3752  { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
3753  { "CppFlags_logtostderr_set", _wrap_CppFlags_logtostderr_set, METH_VARARGS, "If true, all logging message will be sent to stderr."},
3754  { "CppFlags_logtostderr_get", _wrap_CppFlags_logtostderr_get, METH_O, "If true, all logging message will be sent to stderr."},
3755  { "CppFlags_log_prefix_set", _wrap_CppFlags_log_prefix_set, METH_VARARGS, "Controls is time and source code info are used to prefix logging messages."},
3756  { "CppFlags_log_prefix_get", _wrap_CppFlags_log_prefix_get, METH_O, "Controls is time and source code info are used to prefix logging messages."},
3757  { "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)."},
3758  { "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)."},
3759  { "CppFlags_cp_model_dump_models_set", _wrap_CppFlags_cp_model_dump_models_set, METH_VARARGS, "\n"
3760  "DEBUG ONLY: Dump CP-SAT models during solve.\n"
3761  "\n"
3762  " When set to true, SolveCpModel() will dump its model protos\n"
3763  "(original model, presolved model, mapping model) in text format to\n"
3764  "'FLAGS_cp_model_dump_prefix'{model|presolved_model|mapping_model}.pbtxt.\n"
3765  ""},
3766  { "CppFlags_cp_model_dump_models_get", _wrap_CppFlags_cp_model_dump_models_get, METH_O, "\n"
3767  "DEBUG ONLY: Dump CP-SAT models during solve.\n"
3768  "\n"
3769  " When set to true, SolveCpModel() will dump its model protos\n"
3770  "(original model, presolved model, mapping model) in text format to\n"
3771  "'FLAGS_cp_model_dump_prefix'{model|presolved_model|mapping_model}.pbtxt.\n"
3772  ""},
3773  { "CppFlags_cp_model_dump_lns_set", _wrap_CppFlags_cp_model_dump_lns_set, METH_VARARGS, "\n"
3774  "DEBUG ONLY: Dump CP-SAT LNS models during solve.\n"
3775  "\n"
3776  "When set to true, solve will dump all lns models proto in text format to\n"
3777  "'FLAGS_cp_model_dump_prefix'lns_xxx.pbtxt.\n"
3778  ""},
3779  { "CppFlags_cp_model_dump_lns_get", _wrap_CppFlags_cp_model_dump_lns_get, METH_O, "\n"
3780  "DEBUG ONLY: Dump CP-SAT LNS models during solve.\n"
3781  "\n"
3782  "When set to true, solve will dump all lns models proto in text format to\n"
3783  "'FLAGS_cp_model_dump_prefix'lns_xxx.pbtxt.\n"
3784  ""},
3785  { "CppFlags_cp_model_dump_response_set", _wrap_CppFlags_cp_model_dump_response_set, METH_VARARGS, "\n"
3786  "DEBUG ONLY: Dump the CP-SAT final response found during solve.\n"
3787  "\n"
3788  "If true, the final response of each solve will be dumped to\n"
3789  "'FLAGS_cp_model_dump_prefix'response.pbtxt.\n"
3790  ""},
3791  { "CppFlags_cp_model_dump_response_get", _wrap_CppFlags_cp_model_dump_response_get, METH_O, "\n"
3792  "DEBUG ONLY: Dump the CP-SAT final response found during solve.\n"
3793  "\n"
3794  "If true, the final response of each solve will be dumped to\n"
3795  "'FLAGS_cp_model_dump_prefix'response.pbtxt.\n"
3796  ""},
3797  { "new_CppFlags", _wrap_new_CppFlags, METH_NOARGS, NULL},
3798  { "delete_CppFlags", _wrap_delete_CppFlags, METH_O, NULL},
3799  { "CppFlags_swigregister", CppFlags_swigregister, METH_O, NULL},
3800  { "CppFlags_swiginit", CppFlags_swiginit, METH_VARARGS, NULL},
3801  { "CppBridge_InitLogging", _wrap_CppBridge_InitLogging, METH_O, "\n"
3802  "Initialize the C++ logging layer.\n"
3803  "\n"
3804  "This must be called once before any other library from OR-Tools are used.\n"
3805  ""},
3806  { "CppBridge_ShutdownLogging", _wrap_CppBridge_ShutdownLogging, METH_NOARGS, "\n"
3807  "Shutdown the C++ logging layer.\n"
3808  "\n"
3809  "This can be called to shutdown the C++ logging layer from OR-Tools.\n"
3810  "It should only be called once.\n"
3811  ""},
3812  { "CppBridge_SetFlags", _wrap_CppBridge_SetFlags, METH_O, "Sets all the C++ flags contained in the CppFlags structure."},
3813  { "CppBridge_LoadGurobiSharedLibrary", _wrap_CppBridge_LoadGurobiSharedLibrary, METH_O, "\n"
3814  "Load the gurobi shared library.\n"
3815  "\n"
3816  "This is necessary if the library is installed in a non canonical\n"
3817  "directory, or if for any reason, it is not found.\n"
3818  "You need to pass the full path, including the shared library file.\n"
3819  "It returns true if the library was found and correctly loaded.\n"
3820  ""},
3821  { "new_CppBridge", _wrap_new_CppBridge, METH_NOARGS, NULL},
3822  { "delete_CppBridge", _wrap_delete_CppBridge, METH_O, NULL},
3823  { "CppBridge_swigregister", CppBridge_swigregister, METH_O, NULL},
3824  { "CppBridge_swiginit", CppBridge_swiginit, METH_VARARGS, NULL},
3825  { "OrToolsVersion_MajorNumber", _wrap_OrToolsVersion_MajorNumber, METH_NOARGS, "Returns the major version of OR-Tools."},
3826  { "OrToolsVersion_MinorNumber", _wrap_OrToolsVersion_MinorNumber, METH_NOARGS, "Returns the minor version of OR-Tools."},
3827  { "OrToolsVersion_PatchNumber", _wrap_OrToolsVersion_PatchNumber, METH_NOARGS, "Returns the patch version of OR-Tools."},
3828  { "OrToolsVersion_VersionString", _wrap_OrToolsVersion_VersionString, METH_NOARGS, "Returns the string version of OR-Tools."},
3829  { "new_OrToolsVersion", _wrap_new_OrToolsVersion, METH_NOARGS, NULL},
3830  { "delete_OrToolsVersion", _wrap_delete_OrToolsVersion, METH_O, NULL},
3831  { "OrToolsVersion_swigregister", OrToolsVersion_swigregister, METH_O, NULL},
3832  { "OrToolsVersion_swiginit", OrToolsVersion_swiginit, METH_VARARGS, NULL},
3833  { NULL, NULL, 0, NULL }
3834 };
3835 
3836 static PyMethodDef SwigMethods_proxydocs[] = {
3837  { NULL, NULL, 0, NULL }
3838 };
3839 
3840 
3841 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
3842 
3843 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
3844 static swig_type_info _swigt__p_int = {"_p_int", "int *|int_least32_t *|int32_t *", 0, 0, (void*)0, 0};
3845 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};
3846 static swig_type_info _swigt__p_operations_research__CppBridge = {"_p_operations_research__CppBridge", "operations_research::CppBridge *", 0, 0, (void*)0, 0};
3847 static swig_type_info _swigt__p_operations_research__CppFlags = {"_p_operations_research__CppFlags", "operations_research::CppFlags *", 0, 0, (void*)0, 0};
3848 static swig_type_info _swigt__p_operations_research__OrToolsVersion = {"_p_operations_research__OrToolsVersion", "operations_research::OrToolsVersion *", 0, 0, (void*)0, 0};
3849 static swig_type_info _swigt__p_short = {"_p_short", "short *|int_least16_t *|int16_t *", 0, 0, (void*)0, 0};
3850 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};
3851 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};
3852 static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uint_least32_t *|uint32_t *|unsigned int *", 0, 0, (void*)0, 0};
3853 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};
3854 static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint_least16_t *|uint16_t *", 0, 0, (void*)0, 0};
3855 
3857  &_swigt__p_char,
3858  &_swigt__p_int,
3859  &_swigt__p_long,
3863  &_swigt__p_short,
3869 };
3870 
3871 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
3872 static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
3873 static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
3877 static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
3878 static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
3879 static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
3880 static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
3881 static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
3883 
3886  _swigc__p_int,
3897 };
3898 
3899 
3900 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
3901 
3903 {0, 0, 0, 0.0, 0, 0}};
3904 
3905 #ifdef __cplusplus
3906 }
3907 #endif
3908 /* -----------------------------------------------------------------------------
3909  * Type initialization:
3910  * This problem is tough by the requirement that no dynamic
3911  * memory is used. Also, since swig_type_info structures store pointers to
3912  * swig_cast_info structures and swig_cast_info structures store pointers back
3913  * to swig_type_info structures, we need some lookup code at initialization.
3914  * The idea is that swig generates all the structures that are needed.
3915  * The runtime then collects these partially filled structures.
3916  * The SWIG_InitializeModule function takes these initial arrays out of
3917  * swig_module, and does all the lookup, filling in the swig_module.types
3918  * array with the correct data and linking the correct swig_cast_info
3919  * structures together.
3920  *
3921  * The generated swig_type_info structures are assigned statically to an initial
3922  * array. We just loop through that array, and handle each type individually.
3923  * First we lookup if this type has been already loaded, and if so, use the
3924  * loaded structure instead of the generated one. Then we have to fill in the
3925  * cast linked list. The cast data is initially stored in something like a
3926  * two-dimensional array. Each row corresponds to a type (there are the same
3927  * number of rows as there are in the swig_type_initial array). Each entry in
3928  * a column is one of the swig_cast_info structures for that type.
3929  * The cast_initial array is actually an array of arrays, because each row has
3930  * a variable number of columns. So to actually build the cast linked list,
3931  * we find the array of casts associated with the type, and loop through it
3932  * adding the casts to the list. The one last trick we need to do is making
3933  * sure the type pointer in the swig_cast_info struct is correct.
3934  *
3935  * First off, we lookup the cast->type name to see if it is already loaded.
3936  * There are three cases to handle:
3937  * 1) If the cast->type has already been loaded AND the type we are adding
3938  * casting info to has not been loaded (it is in this module), THEN we
3939  * replace the cast->type pointer with the type pointer that has already
3940  * been loaded.
3941  * 2) If BOTH types (the one we are adding casting info to, and the
3942  * cast->type) are loaded, THEN the cast info has already been loaded by
3943  * the previous module so we just ignore it.
3944  * 3) Finally, if cast->type has not already been loaded, then we add that
3945  * swig_cast_info to the linked list (because the cast->type) pointer will
3946  * be correct.
3947  * ----------------------------------------------------------------------------- */
3948 
3949 #ifdef __cplusplus
3950 extern "C" {
3951 #if 0
3952 } /* c-mode */
3953 #endif
3954 #endif
3955 
3956 #if 0
3957 #define SWIGRUNTIME_DEBUG
3958 #endif
3959 
3960 
3961 SWIGRUNTIME void
3962 SWIG_InitializeModule(void *clientdata) {
3963  size_t i;
3964  swig_module_info *module_head, *iter;
3965  int init;
3966 
3967  /* check to see if the circular list has been setup, if not, set it up */
3968  if (swig_module.next==0) {
3969  /* Initialize the swig_module */
3973  init = 1;
3974  } else {
3975  init = 0;
3976  }
3977 
3978  /* Try and load any already created modules */
3979  module_head = SWIG_GetModule(clientdata);
3980  if (!module_head) {
3981  /* This is the first module loaded for this interpreter */
3982  /* so set the swig module into the interpreter */
3983  SWIG_SetModule(clientdata, &swig_module);
3984  } else {
3985  /* the interpreter has loaded a SWIG module, but has it loaded this one? */
3986  iter=module_head;
3987  do {
3988  if (iter==&swig_module) {
3989  /* Our module is already in the list, so there's nothing more to do. */
3990  return;
3991  }
3992  iter=iter->next;
3993  } while (iter!= module_head);
3994 
3995  /* otherwise we must add our module into the list */
3996  swig_module.next = module_head->next;
3997  module_head->next = &swig_module;
3998  }
3999 
4000  /* When multiple interpreters are used, a module could have already been initialized in
4001  a different interpreter, but not yet have a pointer in this interpreter.
4002  In this case, we do not want to continue adding types... everything should be
4003  set up already */
4004  if (init == 0) return;
4005 
4006  /* Now work on filling in swig_module.types */
4007 #ifdef SWIGRUNTIME_DEBUG
4008  printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
4009 #endif
4010  for (i = 0; i < swig_module.size; ++i) {
4011  swig_type_info *type = 0;
4012  swig_type_info *ret;
4013  swig_cast_info *cast;
4014 
4015 #ifdef SWIGRUNTIME_DEBUG
4016  printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
4017 #endif
4018 
4019  /* if there is another module already loaded */
4020  if (swig_module.next != &swig_module) {
4022  }
4023  if (type) {
4024  /* Overwrite clientdata field */
4025 #ifdef SWIGRUNTIME_DEBUG
4026  printf("SWIG_InitializeModule: found type %s\n", type->name);
4027 #endif
4030 #ifdef SWIGRUNTIME_DEBUG
4031  printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
4032 #endif
4033  }
4034  } else {
4035  type = swig_module.type_initial[i];
4036  }
4037 
4038  /* Insert casting types */
4039  cast = swig_module.cast_initial[i];
4040  while (cast->type) {
4041  /* Don't need to add information already in the list */
4042  ret = 0;
4043 #ifdef SWIGRUNTIME_DEBUG
4044  printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
4045 #endif
4046  if (swig_module.next != &swig_module) {
4048 #ifdef SWIGRUNTIME_DEBUG
4049  if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
4050 #endif
4051  }
4052  if (ret) {
4053  if (type == swig_module.type_initial[i]) {
4054 #ifdef SWIGRUNTIME_DEBUG
4055  printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
4056 #endif
4057  cast->type = ret;
4058  ret = 0;
4059  } else {
4060  /* Check for casting already in the list */
4061  swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
4062 #ifdef SWIGRUNTIME_DEBUG
4063  if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
4064 #endif
4065  if (!ocast) ret = 0;
4066  }
4067  }
4068 
4069  if (!ret) {
4070 #ifdef SWIGRUNTIME_DEBUG
4071  printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
4072 #endif
4073  if (type->cast) {
4074  type->cast->prev = cast;
4075  cast->next = type->cast;
4076  }
4077  type->cast = cast;
4078  }
4079  cast++;
4080  }
4081  /* Set entry in modules->types array equal to the type */
4082  swig_module.types[i] = type;
4083  }
4084  swig_module.types[i] = 0;
4085 
4086 #ifdef SWIGRUNTIME_DEBUG
4087  printf("**** SWIG_InitializeModule: Cast List ******\n");
4088  for (i = 0; i < swig_module.size; ++i) {
4089  int j = 0;
4091  printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
4092  while (cast->type) {
4093  printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
4094  cast++;
4095  ++j;
4096  }
4097  printf("---- Total casts: %d\n",j);
4098  }
4099  printf("**** SWIG_InitializeModule: Cast List ******\n");
4100 #endif
4101 }
4102 
4103 /* This function will propagate the clientdata field of type to
4104 * any new swig_type_info structures that have been added into the list
4105 * of equivalent types. It is like calling
4106 * SWIG_TypeClientData(type, clientdata) a second time.
4107 */
4108 SWIGRUNTIME void
4110  size_t i;
4111  swig_cast_info *equiv;
4112  static int init_run = 0;
4113 
4114  if (init_run) return;
4115  init_run = 1;
4116 
4117  for (i = 0; i < swig_module.size; i++) {
4118  if (swig_module.types[i]->clientdata) {
4119  equiv = swig_module.types[i]->cast;
4120  while (equiv) {
4121  if (!equiv->converter) {
4122  if (equiv->type && !equiv->type->clientdata)
4124  }
4125  equiv = equiv->next;
4126  }
4127  }
4128  }
4129 }
4130 
4131 #ifdef __cplusplus
4132 #if 0
4133 {
4134  /* c-mode */
4135 #endif
4136 }
4137 #endif
4138 
4139 
4140 
4141 #ifdef __cplusplus
4142 extern "C" {
4143 #endif
4144 
4145  /* Python-specific SWIG API */
4146 #define SWIG_newvarlink() SWIG_Python_newvarlink()
4147 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
4148 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
4149 
4150  /* -----------------------------------------------------------------------------
4151  * global variable support code.
4152  * ----------------------------------------------------------------------------- */
4153 
4154  typedef struct swig_globalvar {
4155  char *name; /* Name of global variable */
4156  PyObject *(*get_attr)(void); /* Return the current value */
4157  int (*set_attr)(PyObject *); /* Set the value */
4158  struct swig_globalvar *next;
4159  } swig_globalvar;
4160 
4161  typedef struct swig_varlinkobject {
4162  PyObject_HEAD
4165 
4166  SWIGINTERN PyObject *
4168 #if PY_VERSION_HEX >= 0x03000000
4169  return PyUnicode_InternFromString("<Swig global variables>");
4170 #else
4171  return PyString_FromString("<Swig global variables>");
4172 #endif
4173  }
4174 
4175  SWIGINTERN PyObject *
4177 #if PY_VERSION_HEX >= 0x03000000
4178  PyObject *str = PyUnicode_InternFromString("(");
4179  PyObject *tail;
4180  PyObject *joined;
4182  for (var = v->vars; var; var=var->next) {
4183  tail = PyUnicode_FromString(var->name);
4184  joined = PyUnicode_Concat(str, tail);
4185  Py_DecRef(str);
4186  Py_DecRef(tail);
4187  str = joined;
4188  if (var->next) {
4189  tail = PyUnicode_InternFromString(", ");
4190  joined = PyUnicode_Concat(str, tail);
4191  Py_DecRef(str);
4192  Py_DecRef(tail);
4193  str = joined;
4194  }
4195  }
4196  tail = PyUnicode_InternFromString(")");
4197  joined = PyUnicode_Concat(str, tail);
4198  Py_DecRef(str);
4199  Py_DecRef(tail);
4200  str = joined;
4201 #else
4202  PyObject *str = PyString_FromString("(");
4204  for (var = v->vars; var; var=var->next) {
4205  PyString_ConcatAndDel(&str,PyString_FromString(var->name));
4206  if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
4207  }
4208  PyString_ConcatAndDel(&str,PyString_FromString(")"));
4209 #endif
4210  return str;
4211  }
4212 
4213  SWIGINTERN void
4215  swig_globalvar *var = v->vars;
4216  while (var) {
4217  swig_globalvar *n = var->next;
4218  free(var->name);
4219  free(var);
4220  var = n;
4221  }
4222  }
4223 
4224  SWIGINTERN PyObject *
4226  PyObject *res = NULL;
4227  swig_globalvar *var = v->vars;
4228  while (var) {
4229  if (strcmp(var->name,n) == 0) {
4230  res = (*var->get_attr)();
4231  break;
4232  }
4233  var = var->next;
4234  }
4235  if (res == NULL && !PyErr_Occurred()) {
4236  PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
4237  }
4238  return res;
4239  }
4240 
4241  SWIGINTERN int
4242  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
4243  int res = 1;
4244  swig_globalvar *var = v->vars;
4245  while (var) {
4246  if (strcmp(var->name,n) == 0) {
4247  res = (*var->set_attr)(p);
4248  break;
4249  }
4250  var = var->next;
4251  }
4252  if (res == 1 && !PyErr_Occurred()) {
4253  PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
4254  }
4255  return res;
4256  }
4257 
4258  SWIGINTERN PyTypeObject*
4260  static char varlink__doc__[] = "Swig var link object";
4261  static PyTypeObject varlink_type;
4262  static int type_init = 0;
4263  if (!type_init) {
4264  const PyTypeObject tmp = {
4265 #if PY_VERSION_HEX >= 0x03000000
4266  PyVarObject_HEAD_INIT(NULL, 0)
4267 #else
4268  PyObject_HEAD_INIT(NULL)
4269  0, /* ob_size */
4270 #endif
4271  "swigvarlink", /* tp_name */
4272  sizeof(swig_varlinkobject), /* tp_basicsize */
4273  0, /* tp_itemsize */
4274  (destructor) swig_varlink_dealloc, /* tp_dealloc */
4275  0, /* tp_print */
4276  (getattrfunc) swig_varlink_getattr, /* tp_getattr */
4277  (setattrfunc) swig_varlink_setattr, /* tp_setattr */
4278  0, /* tp_compare */
4279  (reprfunc) swig_varlink_repr, /* tp_repr */
4280  0, /* tp_as_number */
4281  0, /* tp_as_sequence */
4282  0, /* tp_as_mapping */
4283  0, /* tp_hash */
4284  0, /* tp_call */
4285  (reprfunc) swig_varlink_str, /* tp_str */
4286  0, /* tp_getattro */
4287  0, /* tp_setattro */
4288  0, /* tp_as_buffer */
4289  0, /* tp_flags */
4290  varlink__doc__, /* tp_doc */
4291  0, /* tp_traverse */
4292  0, /* tp_clear */
4293  0, /* tp_richcompare */
4294  0, /* tp_weaklistoffset */
4295  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
4296  0, /* tp_del */
4297  0, /* tp_version_tag */
4298 #if PY_VERSION_HEX >= 0x03040000
4299  0, /* tp_finalize */
4300 #endif
4301 #ifdef COUNT_ALLOCS
4302  0, /* tp_allocs */
4303  0, /* tp_frees */
4304  0, /* tp_maxalloc */
4305  0, /* tp_prev */
4306  0 /* tp_next */
4307 #endif
4308  };
4309  varlink_type = tmp;
4310  type_init = 1;
4311  if (PyType_Ready(&varlink_type) < 0)
4312  return NULL;
4313  }
4314  return &varlink_type;
4315  }
4316 
4317  /* Create a variable linking object for use later */
4318  SWIGINTERN PyObject *
4320  swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
4321  if (result) {
4322  result->vars = 0;
4323  }
4324  return ((PyObject*) result);
4325  }
4326 
4327  SWIGINTERN void
4328  SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
4331  if (gv) {
4332  size_t size = strlen(name)+1;
4333  gv->name = (char *)malloc(size);
4334  if (gv->name) {
4335  memcpy(gv->name, name, size);
4336  gv->get_attr = get_attr;
4337  gv->set_attr = set_attr;
4338  gv->next = v->vars;
4339  }
4340  }
4341  v->vars = gv;
4342  }
4343 
4344  SWIGINTERN PyObject *
4346  static PyObject *globals = 0;
4347  if (!globals) {
4348  globals = SWIG_newvarlink();
4349  }
4350  return globals;
4351  }
4352 
4353  /* -----------------------------------------------------------------------------
4354  * constants/methods manipulation
4355  * ----------------------------------------------------------------------------- */
4356 
4357  /* Install Constants */
4358  SWIGINTERN void
4359  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
4360  PyObject *obj = 0;
4361  size_t i;
4362  for (i = 0; constants[i].type; ++i) {
4363  switch(constants[i].type) {
4364  case SWIG_PY_POINTER:
4365  obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
4366  break;
4367  case SWIG_PY_BINARY:
4368  obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
4369  break;
4370  default:
4371  obj = 0;
4372  break;
4373  }
4374  if (obj) {
4375  PyDict_SetItemString(d, constants[i].name, obj);
4376  Py_DECREF(obj);
4377  }
4378  }
4379  }
4380 
4381  /* -----------------------------------------------------------------------------*/
4382  /* Fix SwigMethods to carry the callback ptrs when needed */
4383  /* -----------------------------------------------------------------------------*/
4384 
4385  SWIGINTERN void
4386  SWIG_Python_FixMethods(PyMethodDef *methods,
4387  swig_const_info *const_table,
4388  swig_type_info **types,
4389  swig_type_info **types_initial) {
4390  size_t i;
4391  for (i = 0; methods[i].ml_name; ++i) {
4392  const char *c = methods[i].ml_doc;
4393  if (!c) continue;
4394  c = strstr(c, "swig_ptr: ");
4395  if (c) {
4396  int j;
4397  swig_const_info *ci = 0;
4398  const char *name = c + 10;
4399  for (j = 0; const_table[j].type; ++j) {
4400  if (strncmp(const_table[j].name, name,
4401  strlen(const_table[j].name)) == 0) {
4402  ci = &(const_table[j]);
4403  break;
4404  }
4405  }
4406  if (ci) {
4407  void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
4408  if (ptr) {
4409  size_t shift = (ci->ptype) - types;
4410  swig_type_info *ty = types_initial[shift];
4411  size_t ldoc = (c - methods[i].ml_doc);
4412  size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
4413  char *ndoc = (char*)malloc(ldoc + lptr + 10);
4414  if (ndoc) {
4415  char *buff = ndoc;
4416  memcpy(buff, methods[i].ml_doc, ldoc);
4417  buff += ldoc;
4418  memcpy(buff, "swig_ptr: ", 10);
4419  buff += 10;
4420  SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
4421  methods[i].ml_doc = ndoc;
4422  }
4423  }
4424  }
4425  }
4426  }
4427  }
4428 
4429  /* -----------------------------------------------------------------------------
4430  * Method creation and docstring support functions
4431  * ----------------------------------------------------------------------------- */
4432 
4433  /* -----------------------------------------------------------------------------
4434  * Function to find the method definition with the correct docstring for the
4435  * proxy module as opposed to the low-level API
4436  * ----------------------------------------------------------------------------- */
4437 
4438  SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
4439  /* Find the function in the modified method table */
4440  size_t offset = 0;
4441  int found = 0;
4442  while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
4443  if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
4444  found = 1;
4445  break;
4446  }
4447  offset++;
4448  }
4449  /* Use the copy with the modified docstring if available */
4450  return found ? &SwigMethods_proxydocs[offset] : NULL;
4451  }
4452 
4453  /* -----------------------------------------------------------------------------
4454  * Wrapper of PyInstanceMethod_New() used in Python 3
4455  * It is exported to the generated module, used for -fastproxy
4456  * ----------------------------------------------------------------------------- */
4457 
4458  SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
4459  if (PyCFunction_Check(func)) {
4460  PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
4461  PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
4462  if (ml)
4463  func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
4464  }
4465 #if PY_VERSION_HEX >= 0x03000000
4466  return PyInstanceMethod_New(func);
4467 #else
4468  return PyMethod_New(func, NULL, NULL);
4469 #endif
4470  }
4471 
4472  /* -----------------------------------------------------------------------------
4473  * Wrapper of PyStaticMethod_New()
4474  * It is exported to the generated module, used for -fastproxy
4475  * ----------------------------------------------------------------------------- */
4476 
4477  SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
4478  if (PyCFunction_Check(func)) {
4479  PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
4480  PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
4481  if (ml)
4482  func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
4483  }
4484  return PyStaticMethod_New(func);
4485  }
4486 
4487 #ifdef __cplusplus
4488 }
4489 #endif
4490 
4491 /* -----------------------------------------------------------------------------*
4492  * Partial Init method
4493  * -----------------------------------------------------------------------------*/
4494 
4495 #ifdef __cplusplus
4496 extern "C"
4497 #endif
4498 
4499 SWIGEXPORT
4500 #if PY_VERSION_HEX >= 0x03000000
4501 PyObject*
4502 #else
4503 void
4504 #endif
4505 SWIG_init(void) {
4506  PyObject *m, *d, *md, *globals;
4507 
4508 #if PY_VERSION_HEX >= 0x03000000
4509  static struct PyModuleDef SWIG_module = {
4510  PyModuleDef_HEAD_INIT,
4511  SWIG_name,
4512  NULL,
4513  -1,
4514  SwigMethods,
4515  NULL,
4516  NULL,
4517  NULL,
4518  NULL
4519  };
4520 #endif
4521 
4522 #if defined(SWIGPYTHON_BUILTIN)
4523  static SwigPyClientData SwigPyObject_clientdata = {
4524  0, 0, 0, 0, 0, 0, 0
4525  };
4526  static PyGetSetDef this_getset_def = {
4527  (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
4528  };
4529  static SwigPyGetSet thisown_getset_closure = {
4532  };
4533  static PyGetSetDef thisown_getset_def = {
4534  (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
4535  };
4536  PyTypeObject *builtin_pytype;
4537  int builtin_base_count;
4538  swig_type_info *builtin_basetype;
4539  PyObject *tuple;
4540  PyGetSetDescrObject *static_getset;
4541  PyTypeObject *metatype;
4542  PyTypeObject *swigpyobject;
4543  SwigPyClientData *cd;
4544  PyObject *public_interface, *public_symbol;
4545  PyObject *this_descr;
4546  PyObject *thisown_descr;
4547  PyObject *self = 0;
4548  int i;
4549 
4550  (void)builtin_pytype;
4551  (void)builtin_base_count;
4552  (void)builtin_basetype;
4553  (void)tuple;
4554  (void)static_getset;
4555  (void)self;
4556 
4557  /* Metaclass is used to implement static member variables */
4558  metatype = SwigPyObjectType();
4559  assert(metatype);
4560 #endif
4561 
4562  (void)globals;
4563 
4564  /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
4565  SWIG_This();
4568 #ifndef SWIGPYTHON_BUILTIN
4570 #endif
4571 
4572  /* Fix SwigMethods to carry the callback ptrs when needed */
4574 
4575 #if PY_VERSION_HEX >= 0x03000000
4576  m = PyModule_Create(&SWIG_module);
4577 #else
4578  m = Py_InitModule(SWIG_name, SwigMethods);
4579 #endif
4580 
4581  md = d = PyModule_GetDict(m);
4582  (void)md;
4583 
4585 
4586 #ifdef SWIGPYTHON_BUILTIN
4587  swigpyobject = SwigPyObject_TypeOnce();
4588 
4589  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
4590  assert(SwigPyObject_stype);
4591  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
4592  if (!cd) {
4593  SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
4594  SwigPyObject_clientdata.pytype = swigpyobject;
4595  } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
4596  PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
4597 # if PY_VERSION_HEX >= 0x03000000
4598  return NULL;
4599 # else
4600  return;
4601 # endif
4602  }
4603 
4604  /* All objects have a 'this' attribute */
4605  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
4606  (void)this_descr;
4607 
4608  /* All objects have a 'thisown' attribute */
4609  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
4610  (void)thisown_descr;
4611 
4612  public_interface = PyList_New(0);
4613  public_symbol = 0;
4614  (void)public_symbol;
4615 
4616  PyDict_SetItemString(md, "__all__", public_interface);
4617  Py_DECREF(public_interface);
4618  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
4619  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
4620  for (i = 0; swig_const_table[i].name != 0; ++i)
4621  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
4622 #endif
4623 
4625 
4626 #if PY_VERSION_HEX >= 0x03000000
4627  return m;
4628 #else
4629  return;
4630 #endif
4631 }
4632 
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:99
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
SWIGINTERN PyObject * _wrap_OrToolsVersion_MajorNumber(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
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)
static swig_type_info * swig_types[13]
SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v)
static swig_type_info _swigt__p_operations_research__OrToolsVersion
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)
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)
SWIGINTERNINLINE PyObject * SWIG_From_int(int value)
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
static swig_cast_info _swigc__p_operations_research__OrToolsVersion[]
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[]
static int MinorNumber()
Returns the minor version of OR-Tools.
Definition: init.h:140
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)
static int MajorNumber()
Returns the major version of OR-Tools.
Definition: init.h:133
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:82
Simple structure that holds useful C++ flags to setup from non-C++ languages.
Definition: init.h:36
#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 SWIGTYPE_p_operations_research__OrToolsVersion
#define SWIG_Python_str_DelForPy3(x)
SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void)
SWIGINTERN PyObject * _wrap_OrToolsVersion_PatchNumber(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN int SWIG_AsVal_double(PyObject *obj, double *val)
#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)
SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args)
SWIGINTERN PyObject * _wrap_delete_OrToolsVersion(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_NewPointerObj(ptr, type, flags)
#define SWIG_POINTER_OWN
#define SWIG_POINTER_NOSHADOW
SWIGINTERN PyObject * _wrap_OrToolsVersion_VersionString(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
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:104
#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:89
SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial)
SWIGINTERN PyObject * _wrap_new_OrToolsVersion(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
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 PyObject * OrToolsVersion_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static int PatchNumber()
Returns the patch version of OR-Tools.
Definition: init.h:147
SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v)
struct swig_cast_info swig_cast_info
SWIGINTERN PyObject * _wrap_OrToolsVersion_MinorNumber(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
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
SWIGINTERN PyObject * OrToolsVersion_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
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:123
SWIGINTERN PyObject * _wrap_CppFlags_cp_model_dump_models_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static std::string VersionString()
Returns the string version of OR-Tools.
Definition: init.h:154
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)