1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
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 * ----------------------------------------------------------------------------- */
12 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
15 template<typename T> class SwigValueWrapper {
18 SwigValueWrapper() : tt(0) { }
19 SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
20 SwigValueWrapper(const T& t) : tt(new T(t)) { }
21 ~SwigValueWrapper() { delete tt; }
22 SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
23 operator T&() const { return *tt; }
24 T *operator&() { return tt; }
26 SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
29 template <typename T> T SwigValueInit() {
34 /* -----------------------------------------------------------------------------
35 * This section contains generic SWIG labels for method/variable
36 * declarations/attributes, and other compiler dependent labels.
37 * ----------------------------------------------------------------------------- */
39 /* template workaround for compilers that cannot correctly implement the C++ standard */
40 #ifndef SWIGTEMPLATEDISAMBIGUATOR
41 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
42 # define SWIGTEMPLATEDISAMBIGUATOR template
43 # elif defined(__HP_aCC)
44 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
45 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
46 # define SWIGTEMPLATEDISAMBIGUATOR template
48 # define SWIGTEMPLATEDISAMBIGUATOR
52 /* inline attribute */
54 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
55 # define SWIGINLINE inline
61 /* attribute recognised by some compilers to avoid 'unused' warnings */
63 # if defined(__GNUC__)
64 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
65 # define SWIGUNUSED __attribute__ ((__unused__))
70 # define SWIGUNUSED __attribute__ ((__unused__))
76 #ifndef SWIG_MSC_UNSUPPRESS_4505
77 # if defined(_MSC_VER)
78 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
82 #ifndef SWIGUNUSEDPARM
84 # define SWIGUNUSEDPARM(p)
86 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
90 /* internal SWIG method */
92 # define SWIGINTERN static SWIGUNUSED
95 /* internal inline SWIG method */
96 #ifndef SWIGINTERNINLINE
97 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
100 /* exporting methods */
101 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
102 # ifndef GCC_HASCLASSVISIBILITY
103 # define GCC_HASCLASSVISIBILITY
108 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
109 # if defined(STATIC_LINKED)
112 # define SWIGEXPORT __declspec(dllexport)
115 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
116 # define SWIGEXPORT __attribute__ ((visibility("default")))
123 /* calling conventions for Windows */
125 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
126 # define SWIGSTDCALL __stdcall
132 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
133 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
134 # define _CRT_SECURE_NO_DEPRECATE
137 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
138 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
139 # define _SCL_SECURE_NO_DEPRECATE
144 /* Python.h has to appear first */
147 /* -----------------------------------------------------------------------------
150 * This file contains generic CAPI SWIG runtime support for pointer
152 * ----------------------------------------------------------------------------- */
154 /* This should only be incremented when either the layout of swig_type_info changes,
155 or for whatever reason, the runtime changes incompatibly */
156 #define SWIG_RUNTIME_VERSION "4"
158 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
159 #ifdef SWIG_TYPE_TABLE
160 # define SWIG_QUOTE_STRING(x) #x
161 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
162 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
164 # define SWIG_TYPE_TABLE_NAME
168 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
169 creating a static or dynamic library from the swig runtime code.
170 In 99.9% of the cases, swig just needs to declare them as 'static'.
172 But only do this if is strictly necessary, ie, if you have problems
173 with your compiler or so.
177 # define SWIGRUNTIME SWIGINTERN
180 #ifndef SWIGRUNTIMEINLINE
181 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
184 /* Generic buffer size */
185 #ifndef SWIG_BUFFER_SIZE
186 # define SWIG_BUFFER_SIZE 1024
189 /* Flags for pointer conversions */
190 #define SWIG_POINTER_DISOWN 0x1
191 #define SWIG_CAST_NEW_MEMORY 0x2
193 /* Flags for new pointer objects */
194 #define SWIG_POINTER_OWN 0x1
198 Flags/methods for returning states.
200 The swig conversion methods, as ConvertPtr, return and integer
201 that tells if the conversion was successful or not. And if not,
202 an error code can be returned (see swigerrors.swg for the codes).
204 Use the following macros/flags to set or process the returning
207 In old swig versions, you usually write code as:
209 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
215 Now you can be more explicit as:
217 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
218 if (SWIG_IsOK(res)) {
224 that seems to be the same, but now you can also do
227 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
228 if (SWIG_IsOK(res)) {
230 if (SWIG_IsNewObj(res) {
240 I.e., now SWIG_ConvertPtr can return new objects and you can
241 identify the case and take care of the deallocation. Of course that
242 requires also to SWIG_ConvertPtr to return new result values, as
244 int SWIG_ConvertPtr(obj, ptr,...) {
246 if (<need new object>) {
247 *ptr = <ptr to new allocated object>;
250 *ptr = <ptr to old object>;
258 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
259 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
262 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
263 allows to return the 'cast rank', for example, if you have this
270 food(1) // cast rank '1' (1 -> 1.0)
271 fooi(1) // cast rank '0'
273 just use the SWIG_AddCast()/SWIG_CheckState()
278 #define SWIG_ERROR (-1)
279 #define SWIG_IsOK(r) (r >= 0)
280 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
282 /* The CastRankLimit says how many bits are used for the cast rank */
283 #define SWIG_CASTRANKLIMIT (1 << 8)
284 /* The NewMask denotes the object was created (using new/malloc) */
285 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
286 /* The TmpMask is for in/out typemaps that use temporal objects */
287 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
288 /* Simple returning values */
289 #define SWIG_BADOBJ (SWIG_ERROR)
290 #define SWIG_OLDOBJ (SWIG_OK)
291 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
292 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
293 /* Check, add and del mask methods */
294 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
295 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
296 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
297 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
298 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
299 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
303 #if defined(SWIG_CASTRANK_MODE)
304 # ifndef SWIG_TypeRank
305 # define SWIG_TypeRank unsigned long
307 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
308 # define SWIG_MAXCASTRANK (2)
310 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
311 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
312 SWIGINTERNINLINE int SWIG_AddCast(int r) {
313 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
315 SWIGINTERNINLINE int SWIG_CheckState(int r) {
316 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
318 #else /* no cast-rank mode */
319 # define SWIG_AddCast
320 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
332 typedef void *(*swig_converter_func)(void *, int *);
333 typedef struct swig_type_info *(*swig_dycast_func)(void **);
335 /* Structure to store information on one type */
336 typedef struct swig_type_info {
337 const char *name; /* mangled name of this type */
338 const char *str; /* human readable name of this type */
339 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
340 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
341 void *clientdata; /* language specific type data */
342 int owndata; /* flag if the structure owns the clientdata */
345 /* Structure to store a type and conversion function used for casting */
346 typedef struct swig_cast_info {
347 swig_type_info *type; /* pointer to type that is equivalent to this type */
348 swig_converter_func converter; /* function to cast the void pointers */
349 struct swig_cast_info *next; /* pointer to next cast in linked list */
350 struct swig_cast_info *prev; /* pointer to the previous cast */
353 /* Structure used to store module information
354 * Each module generates one structure like this, and the runtime collects
355 * all of these structures and stores them in a circularly linked list.*/
356 typedef struct swig_module_info {
357 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
358 size_t size; /* Number of types in this module */
359 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
360 swig_type_info **type_initial; /* Array of initially generated type structures */
361 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
362 void *clientdata; /* Language specific module data */
366 Compare two type names skipping the space characters, therefore
367 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
369 Return 0 when the two name types are equivalent, as in
370 strncmp, but skipping ' '.
373 SWIG_TypeNameComp(const char *f1, const char *l1,
374 const char *f2, const char *l2) {
375 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
376 while ((*f1 == ' ') && (f1 != l1)) ++f1;
377 while ((*f2 == ' ') && (f2 != l2)) ++f2;
378 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
380 return (int)((l1 - f1) - (l2 - f2));
384 Check type equivalence in a name list like <name1>|<name2>|...
385 Return 0 if not equal, 1 if equal
388 SWIG_TypeEquiv(const char *nb, const char *tb) {
390 const char* te = tb + strlen(tb);
392 while (!equiv && *ne) {
393 for (nb = ne; *ne; ++ne) {
394 if (*ne == '|') break;
396 equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
403 Check type equivalence in a name list like <name1>|<name2>|...
404 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
407 SWIG_TypeCompare(const char *nb, const char *tb) {
409 const char* te = tb + strlen(tb);
411 while (!equiv && *ne) {
412 for (nb = ne; *ne; ++ne) {
413 if (*ne == '|') break;
415 equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
422 /* think of this as a c++ template<> or a scheme macro */
423 #define SWIG_TypeCheck_Template(comparison, ty) \
425 swig_cast_info *iter = ty->cast; \
428 if (iter == ty->cast) return iter; \
429 /* Move iter to the top of the linked list */ \
430 iter->prev->next = iter->next; \
432 iter->next->prev = iter->prev; \
433 iter->next = ty->cast; \
435 if (ty->cast) ty->cast->prev = iter; \
447 SWIGRUNTIME swig_cast_info *
448 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
449 SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
452 /* Same as previous function, except strcmp is replaced with a pointer comparison */
453 SWIGRUNTIME swig_cast_info *
454 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
455 SWIG_TypeCheck_Template(iter->type == from, into);
459 Cast a pointer up an inheritance hierarchy
461 SWIGRUNTIMEINLINE void *
462 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
463 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
467 Dynamic pointer casting. Down an inheritance hierarchy
469 SWIGRUNTIME swig_type_info *
470 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
471 swig_type_info *lastty = ty;
472 if (!ty || !ty->dcast) return ty;
473 while (ty && (ty->dcast)) {
474 ty = (*ty->dcast)(ptr);
481 Return the name associated with this type
483 SWIGRUNTIMEINLINE const char *
484 SWIG_TypeName(const swig_type_info *ty) {
489 Return the pretty name associated with this type,
490 that is an unmangled type name in a form presentable to the user.
492 SWIGRUNTIME const char *
493 SWIG_TypePrettyName(const swig_type_info *type) {
494 /* The "str" field contains the equivalent pretty names of the
495 type, separated by vertical-bar characters. We choose
496 to print the last name, as it is often (?) the most
498 if (!type) return NULL;
499 if (type->str != NULL) {
500 const char *last_name = type->str;
502 for (s = type->str; *s; s++)
503 if (*s == '|') last_name = s+1;
511 Set the clientdata field for a type
514 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
515 swig_cast_info *cast = ti->cast;
516 /* if (ti->clientdata == clientdata) return; */
517 ti->clientdata = clientdata;
520 if (!cast->converter) {
521 swig_type_info *tc = cast->type;
522 if (!tc->clientdata) {
523 SWIG_TypeClientData(tc, clientdata);
530 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
531 SWIG_TypeClientData(ti, clientdata);
536 Search for a swig_type_info structure only by mangled name
537 Search is a O(log #types)
539 We start searching at module start, and finish searching when start == end.
540 Note: if start == end at the beginning of the function, we go all the way around
543 SWIGRUNTIME swig_type_info *
544 SWIG_MangledTypeQueryModule(swig_module_info *start,
545 swig_module_info *end,
547 swig_module_info *iter = start;
550 register size_t l = 0;
551 register size_t r = iter->size - 1;
553 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
554 register size_t i = (l + r) >> 1;
555 const char *iname = iter->types[i]->name;
557 register int compare = strcmp(name, iname);
559 return iter->types[i];
560 } else if (compare < 0) {
566 } else if (compare > 0) {
570 break; /* should never happen */
575 } while (iter != end);
580 Search for a swig_type_info structure for either a mangled name or a human readable name.
581 It first searches the mangled names of the types, which is a O(log #types)
582 If a type is not found it then searches the human readable names, which is O(#types).
584 We start searching at module start, and finish searching when start == end.
585 Note: if start == end at the beginning of the function, we go all the way around
588 SWIGRUNTIME swig_type_info *
589 SWIG_TypeQueryModule(swig_module_info *start,
590 swig_module_info *end,
592 /* STEP 1: Search the name field using binary search */
593 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
597 /* STEP 2: If the type hasn't been found, do a complete search
598 of the str field (the human readable name) */
599 swig_module_info *iter = start;
601 register size_t i = 0;
602 for (; i < iter->size; ++i) {
603 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
604 return iter->types[i];
607 } while (iter != end);
610 /* neither found a match */
615 Pack binary data into a string
618 SWIG_PackData(char *c, void *ptr, size_t sz) {
619 static const char hex[17] = "0123456789abcdef";
620 register const unsigned char *u = (unsigned char *) ptr;
621 register const unsigned char *eu = u + sz;
622 for (; u != eu; ++u) {
623 register unsigned char uu = *u;
624 *(c++) = hex[(uu & 0xf0) >> 4];
625 *(c++) = hex[uu & 0xf];
631 Unpack binary data from a string
633 SWIGRUNTIME const char *
634 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
635 register unsigned char *u = (unsigned char *) ptr;
636 register const unsigned char *eu = u + sz;
637 for (; u != eu; ++u) {
638 register char d = *(c++);
639 register unsigned char uu;
640 if ((d >= '0') && (d <= '9'))
641 uu = ((d - '0') << 4);
642 else if ((d >= 'a') && (d <= 'f'))
643 uu = ((d - ('a'-10)) << 4);
647 if ((d >= '0') && (d <= '9'))
649 else if ((d >= 'a') && (d <= 'f'))
650 uu |= (d - ('a'-10));
659 Pack 'void *' into a string buffer.
662 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
664 if ((2*sizeof(void *) + 2) > bsz) return 0;
666 r = SWIG_PackData(r,&ptr,sizeof(void *));
667 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
672 SWIGRUNTIME const char *
673 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
675 if (strcmp(c,"NULL") == 0) {
682 return SWIG_UnpackData(++c,ptr,sizeof(void *));
686 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
688 size_t lname = (name ? strlen(name) : 0);
689 if ((2*sz + 2 + lname) > bsz) return 0;
691 r = SWIG_PackData(r,ptr,sz);
693 strncpy(r,name,lname+1);
700 SWIGRUNTIME const char *
701 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
703 if (strcmp(c,"NULL") == 0) {
710 return SWIG_UnpackData(++c,ptr,sz);
718 #define SWIG_UnknownError -1
719 #define SWIG_IOError -2
720 #define SWIG_RuntimeError -3
721 #define SWIG_IndexError -4
722 #define SWIG_TypeError -5
723 #define SWIG_DivisionByZero -6
724 #define SWIG_OverflowError -7
725 #define SWIG_SyntaxError -8
726 #define SWIG_ValueError -9
727 #define SWIG_SystemError -10
728 #define SWIG_AttributeError -11
729 #define SWIG_MemoryError -12
730 #define SWIG_NullReferenceError -13
735 /* Add PyOS_snprintf for old Pythons */
736 #if PY_VERSION_HEX < 0x02020000
737 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
738 # define PyOS_snprintf _snprintf
740 # define PyOS_snprintf snprintf
744 /* A crude PyString_FromFormat implementation for old Pythons */
745 #if PY_VERSION_HEX < 0x02020000
747 #ifndef SWIG_PYBUFFER_SIZE
748 # define SWIG_PYBUFFER_SIZE 1024
752 PyString_FromFormat(const char *fmt, ...) {
754 char buf[SWIG_PYBUFFER_SIZE * 2];
757 res = vsnprintf(buf, sizeof(buf), fmt, ap);
759 return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
763 /* Add PyObject_Del for old Pythons */
764 #if PY_VERSION_HEX < 0x01060000
765 # define PyObject_Del(op) PyMem_DEL((op))
768 # define PyObject_DEL PyObject_Del
771 /* A crude PyExc_StopIteration exception for old Pythons */
772 #if PY_VERSION_HEX < 0x02020000
773 # ifndef PyExc_StopIteration
774 # define PyExc_StopIteration PyExc_RuntimeError
776 # ifndef PyObject_GenericGetAttr
777 # define PyObject_GenericGetAttr 0
780 /* Py_NotImplemented is defined in 2.1 and up. */
781 #if PY_VERSION_HEX < 0x02010000
782 # ifndef Py_NotImplemented
783 # define Py_NotImplemented PyExc_RuntimeError
788 /* A crude PyString_AsStringAndSize implementation for old Pythons */
789 #if PY_VERSION_HEX < 0x02010000
790 # ifndef PyString_AsStringAndSize
791 # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
795 /* PySequence_Size for old Pythons */
796 #if PY_VERSION_HEX < 0x02000000
797 # ifndef PySequence_Size
798 # define PySequence_Size PySequence_Length
803 /* PyBool_FromLong for old Pythons */
804 #if PY_VERSION_HEX < 0x02030000
806 PyObject *PyBool_FromLong(long ok)
808 PyObject *result = ok ? Py_True : Py_False;
814 /* Py_ssize_t for old Pythons */
815 /* This code is as recommended by: */
816 /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
817 #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
818 typedef int Py_ssize_t;
819 # define PY_SSIZE_T_MAX INT_MAX
820 # define PY_SSIZE_T_MIN INT_MIN
823 /* -----------------------------------------------------------------------------
825 * ----------------------------------------------------------------------------- */
827 SWIGRUNTIME PyObject*
828 SWIG_Python_ErrorType(int code) {
831 case SWIG_MemoryError:
832 type = PyExc_MemoryError;
835 type = PyExc_IOError;
837 case SWIG_RuntimeError:
838 type = PyExc_RuntimeError;
840 case SWIG_IndexError:
841 type = PyExc_IndexError;
844 type = PyExc_TypeError;
846 case SWIG_DivisionByZero:
847 type = PyExc_ZeroDivisionError;
849 case SWIG_OverflowError:
850 type = PyExc_OverflowError;
852 case SWIG_SyntaxError:
853 type = PyExc_SyntaxError;
855 case SWIG_ValueError:
856 type = PyExc_ValueError;
858 case SWIG_SystemError:
859 type = PyExc_SystemError;
861 case SWIG_AttributeError:
862 type = PyExc_AttributeError;
865 type = PyExc_RuntimeError;
872 SWIG_Python_AddErrorMsg(const char* mesg)
876 PyObject *traceback = 0;
878 if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
880 PyObject *old_str = PyObject_Str(value);
883 PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
887 PyErr_SetString(PyExc_RuntimeError, mesg);
893 #if defined(SWIG_PYTHON_NO_THREADS)
894 # if defined(SWIG_PYTHON_THREADS)
895 # undef SWIG_PYTHON_THREADS
898 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
899 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
900 # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
901 # define SWIG_PYTHON_USE_GIL
904 # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
905 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
906 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
908 # ifdef __cplusplus /* C++ code */
909 class SWIG_Python_Thread_Block {
911 PyGILState_STATE state;
913 void end() { if (status) { PyGILState_Release(state); status = false;} }
914 SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
915 ~SWIG_Python_Thread_Block() { end(); }
917 class SWIG_Python_Thread_Allow {
921 void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
922 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
923 ~SWIG_Python_Thread_Allow() { end(); }
925 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
926 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
927 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
928 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
930 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
931 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
932 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
933 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
935 # else /* Old thread way, not implemented, user must provide it */
936 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
937 # define SWIG_PYTHON_INITIALIZE_THREADS
939 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
940 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
942 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
943 # define SWIG_PYTHON_THREAD_END_BLOCK
945 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
946 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
948 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
949 # define SWIG_PYTHON_THREAD_END_ALLOW
952 #else /* No thread support */
953 # define SWIG_PYTHON_INITIALIZE_THREADS
954 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
955 # define SWIG_PYTHON_THREAD_END_BLOCK
956 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
957 # define SWIG_PYTHON_THREAD_END_ALLOW
960 /* -----------------------------------------------------------------------------
961 * Python API portion that goes into the runtime
962 * ----------------------------------------------------------------------------- */
971 /* -----------------------------------------------------------------------------
972 * Constant declarations
973 * ----------------------------------------------------------------------------- */
976 #define SWIG_PY_POINTER 4
977 #define SWIG_PY_BINARY 5
979 /* Constant information structure */
980 typedef struct swig_const_info {
986 swig_type_info **ptype;
997 /* -----------------------------------------------------------------------------
998 * See the LICENSE file for information on copyright, usage and redistribution
999 * of SWIG, and the README file for authors - http://www.swig.org/release.html.
1003 * This file contains the runtime support for Python modules
1004 * and includes code for managing global variables and pointer
1007 * ----------------------------------------------------------------------------- */
1009 /* Common SWIG API */
1011 /* for raw pointers */
1012 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1013 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1014 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1015 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags)
1016 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1017 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1018 #define swig_owntype int
1020 /* for raw packed data */
1021 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1022 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1024 /* for class or struct pointers */
1025 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1026 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1028 /* for C or C++ function pointers */
1029 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1030 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0)
1032 /* for C++ member pointers, ie, member methods */
1033 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1034 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1039 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule()
1040 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1041 #define SWIG_NewClientData(obj) PySwigClientData_New(obj)
1043 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1044 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1045 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1046 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1047 #define SWIG_fail goto fail
1050 /* Runtime API implementation */
1052 /* Error manipulation */
1055 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1056 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1057 PyErr_SetObject(errtype, obj);
1059 SWIG_PYTHON_THREAD_END_BLOCK;
1063 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1064 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1065 PyErr_SetString(errtype, (char *) msg);
1066 SWIG_PYTHON_THREAD_END_BLOCK;
1069 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1071 /* Set a constant value */
1074 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1075 PyDict_SetItemString(d, (char*) name, obj);
1079 /* Append a value to the result obj */
1081 SWIGINTERN PyObject*
1082 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1083 #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1086 } else if (result == Py_None) {
1090 if (!PyList_Check(result)) {
1091 PyObject *o2 = result;
1092 result = PyList_New(1);
1093 PyList_SetItem(result, 0, o2);
1095 PyList_Append(result,obj);
1104 } else if (result == Py_None) {
1108 if (!PyTuple_Check(result)) {
1110 result = PyTuple_New(1);
1111 PyTuple_SET_ITEM(result, 0, o2);
1113 o3 = PyTuple_New(1);
1114 PyTuple_SET_ITEM(o3, 0, obj);
1116 result = PySequence_Concat(o2, o3);
1124 /* Unpack the argument tuple */
1127 SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1133 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1134 name, (min == max ? "" : "at least "), (int)min);
1138 if (!PyTuple_Check(args)) {
1139 PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1142 register Py_ssize_t l = PyTuple_GET_SIZE(args);
1144 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1145 name, (min == max ? "" : "at least "), (int)min, (int)l);
1147 } else if (l > max) {
1148 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1149 name, (min == max ? "" : "at most "), (int)max, (int)l);
1153 for (i = 0; i < l; ++i) {
1154 objs[i] = PyTuple_GET_ITEM(args, i);
1156 for (; l < max; ++l) {
1164 /* A functor is a function object with one single object argument */
1165 #if PY_VERSION_HEX >= 0x02020000
1166 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1168 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
1172 Helper for static pointer initialization for both C and C++ code, for example
1173 static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1176 #define SWIG_STATIC_POINTER(var) var
1178 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1181 /* -----------------------------------------------------------------------------
1182 * Pointer declarations
1183 * ----------------------------------------------------------------------------- */
1185 /* Flags for new pointer objects */
1186 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1187 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1189 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1198 /* How to access Py_None */
1199 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
1200 # ifndef SWIG_PYTHON_NO_BUILD_NONE
1201 # ifndef SWIG_PYTHON_BUILD_NONE
1202 # define SWIG_PYTHON_BUILD_NONE
1207 #ifdef SWIG_PYTHON_BUILD_NONE
1210 # define Py_None SWIG_Py_None()
1212 SWIGRUNTIMEINLINE PyObject *
1215 PyObject *none = Py_BuildValue((char*)"");
1219 SWIGRUNTIME PyObject *
1222 static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
1227 /* The python void return value */
1229 SWIGRUNTIMEINLINE PyObject *
1232 PyObject *none = Py_None;
1237 /* PySwigClientData */
1248 SWIGRUNTIMEINLINE int
1249 SWIG_Python_CheckImplicit(swig_type_info *ty)
1251 PySwigClientData *data = (PySwigClientData *)ty->clientdata;
1252 return data ? data->implicitconv : 0;
1255 SWIGRUNTIMEINLINE PyObject *
1256 SWIG_Python_ExceptionType(swig_type_info *desc) {
1257 PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0;
1258 PyObject *klass = data ? data->klass : 0;
1259 return (klass ? klass : PyExc_RuntimeError);
1263 SWIGRUNTIME PySwigClientData *
1264 PySwigClientData_New(PyObject* obj)
1269 PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData));
1270 /* the klass element */
1272 Py_INCREF(data->klass);
1273 /* the newraw method and newargs arguments used to create a new raw instance */
1274 if (PyClass_Check(obj)) {
1276 data->newargs = obj;
1279 #if (PY_VERSION_HEX < 0x02020000)
1282 data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
1285 Py_INCREF(data->newraw);
1286 data->newargs = PyTuple_New(1);
1287 PyTuple_SetItem(data->newargs, 0, obj);
1289 data->newargs = obj;
1291 Py_INCREF(data->newargs);
1293 /* the destroy method, aka as the C++ delete method */
1294 data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
1295 if (PyErr_Occurred()) {
1299 if (data->destroy) {
1301 Py_INCREF(data->destroy);
1302 flags = PyCFunction_GET_FLAGS(data->destroy);
1304 data->delargs = !(flags & (METH_O));
1311 data->implicitconv = 0;
1317 PySwigClientData_Del(PySwigClientData* data)
1319 Py_XDECREF(data->newraw);
1320 Py_XDECREF(data->newargs);
1321 Py_XDECREF(data->destroy);
1324 /* =============== PySwigObject =====================*/
1334 SWIGRUNTIME PyObject *
1335 PySwigObject_long(PySwigObject *v)
1337 return PyLong_FromVoidPtr(v->ptr);
1340 SWIGRUNTIME PyObject *
1341 PySwigObject_format(const char* fmt, PySwigObject *v)
1343 PyObject *res = NULL;
1344 PyObject *args = PyTuple_New(1);
1346 if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) {
1347 PyObject *ofmt = PyString_FromString(fmt);
1349 res = PyString_Format(ofmt,args);
1358 SWIGRUNTIME PyObject *
1359 PySwigObject_oct(PySwigObject *v)
1361 return PySwigObject_format("%o",v);
1364 SWIGRUNTIME PyObject *
1365 PySwigObject_hex(PySwigObject *v)
1367 return PySwigObject_format("%x",v);
1370 SWIGRUNTIME PyObject *
1372 PySwigObject_repr(PySwigObject *v)
1374 PySwigObject_repr(PySwigObject *v, PyObject *args)
1377 const char *name = SWIG_TypePrettyName(v->ty);
1378 PyObject *hex = PySwigObject_hex(v);
1379 PyObject *repr = PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString_AsString(hex));
1383 PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next);
1385 PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args);
1387 PyString_ConcatAndDel(&repr,nrep);
1393 PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
1396 PyObject *repr = PySwigObject_repr(v);
1398 PyObject *repr = PySwigObject_repr(v, NULL);
1401 fputs(PyString_AsString(repr), fp);
1409 SWIGRUNTIME PyObject *
1410 PySwigObject_str(PySwigObject *v)
1412 char result[SWIG_BUFFER_SIZE];
1413 return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
1414 PyString_FromString(result) : 0;
1418 PySwigObject_compare(PySwigObject *v, PySwigObject *w)
1422 return (i < j) ? -1 : ((i > j) ? 1 : 0);
1425 SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
1427 SWIGRUNTIME PyTypeObject*
1428 PySwigObject_type(void) {
1429 static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
1433 SWIGRUNTIMEINLINE int
1434 PySwigObject_Check(PyObject *op) {
1435 return ((op)->ob_type == PySwigObject_type())
1436 || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0);
1439 SWIGRUNTIME PyObject *
1440 PySwigObject_New(void *ptr, swig_type_info *ty, int own);
1443 PySwigObject_dealloc(PyObject *v)
1445 PySwigObject *sobj = (PySwigObject *) v;
1446 PyObject *next = sobj->next;
1447 if (sobj->own == SWIG_POINTER_OWN) {
1448 swig_type_info *ty = sobj->ty;
1449 PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
1450 PyObject *destroy = data ? data->destroy : 0;
1452 /* destroy is always a VARARGS method */
1454 if (data->delargs) {
1455 /* we need to create a temporal object to carry the destroy operation */
1456 PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0);
1457 res = SWIG_Python_CallFunctor(destroy, tmp);
1460 PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1461 PyObject *mself = PyCFunction_GET_SELF(destroy);
1462 res = ((*meth)(mself, v));
1466 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1468 const char *name = SWIG_TypePrettyName(ty);
1469 printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1477 SWIGRUNTIME PyObject*
1478 PySwigObject_append(PyObject* v, PyObject* next)
1480 PySwigObject *sobj = (PySwigObject *) v;
1483 if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
1486 if (!PySwigObject_Check(next)) {
1491 return SWIG_Py_Void();
1494 SWIGRUNTIME PyObject*
1496 PySwigObject_next(PyObject* v)
1498 PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1501 PySwigObject *sobj = (PySwigObject *) v;
1503 Py_INCREF(sobj->next);
1506 return SWIG_Py_Void();
1510 SWIGINTERN PyObject*
1512 PySwigObject_disown(PyObject *v)
1514 PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1517 PySwigObject *sobj = (PySwigObject *)v;
1519 return SWIG_Py_Void();
1522 SWIGINTERN PyObject*
1524 PySwigObject_acquire(PyObject *v)
1526 PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1529 PySwigObject *sobj = (PySwigObject *)v;
1530 sobj->own = SWIG_POINTER_OWN;
1531 return SWIG_Py_Void();
1534 SWIGINTERN PyObject*
1535 PySwigObject_own(PyObject *v, PyObject *args)
1538 #if (PY_VERSION_HEX < 0x02020000)
1539 if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
1541 if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
1548 PySwigObject *sobj = (PySwigObject *)v;
1549 PyObject *obj = PyBool_FromLong(sobj->own);
1552 if (PyObject_IsTrue(val)) {
1553 PySwigObject_acquire(v);
1555 PySwigObject_disown(v);
1558 if (PyObject_IsTrue(val)) {
1559 PySwigObject_acquire(v,args);
1561 PySwigObject_disown(v,args);
1571 swigobject_methods[] = {
1572 {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
1573 {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"},
1574 {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1575 {(char *)"append", (PyCFunction)PySwigObject_append, METH_O, (char *)"appends another 'this' object"},
1576 {(char *)"next", (PyCFunction)PySwigObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
1577 {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_NOARGS, (char *)"returns object representation"},
1582 swigobject_methods[] = {
1583 {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
1584 {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
1585 {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1586 {(char *)"append", (PyCFunction)PySwigObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
1587 {(char *)"next", (PyCFunction)PySwigObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
1588 {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_VARARGS, (char *)"returns object representation"},
1593 #if PY_VERSION_HEX < 0x02020000
1594 SWIGINTERN PyObject *
1595 PySwigObject_getattr(PySwigObject *sobj,char *name)
1597 return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
1601 SWIGRUNTIME PyTypeObject*
1602 _PySwigObject_type(void) {
1603 static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1605 static PyNumberMethods PySwigObject_as_number = {
1606 (binaryfunc)0, /*nb_add*/
1607 (binaryfunc)0, /*nb_subtract*/
1608 (binaryfunc)0, /*nb_multiply*/
1609 (binaryfunc)0, /*nb_divide*/
1610 (binaryfunc)0, /*nb_remainder*/
1611 (binaryfunc)0, /*nb_divmod*/
1612 (ternaryfunc)0,/*nb_power*/
1613 (unaryfunc)0, /*nb_negative*/
1614 (unaryfunc)0, /*nb_positive*/
1615 (unaryfunc)0, /*nb_absolute*/
1616 (inquiry)0, /*nb_nonzero*/
1623 (coercion)0, /*nb_coerce*/
1624 (unaryfunc)PySwigObject_long, /*nb_int*/
1625 (unaryfunc)PySwigObject_long, /*nb_long*/
1626 (unaryfunc)0, /*nb_float*/
1627 (unaryfunc)PySwigObject_oct, /*nb_oct*/
1628 (unaryfunc)PySwigObject_hex, /*nb_hex*/
1629 #if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
1630 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1631 #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
1632 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
1633 #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
1634 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
1638 static PyTypeObject pyswigobject_type;
1639 static int type_init = 0;
1641 const PyTypeObject tmp
1643 PyObject_HEAD_INIT(NULL)
1645 (char *)"PySwigObject", /* tp_name */
1646 sizeof(PySwigObject), /* tp_basicsize */
1647 0, /* tp_itemsize */
1648 (destructor)PySwigObject_dealloc, /* tp_dealloc */
1649 (printfunc)PySwigObject_print, /* tp_print */
1650 #if PY_VERSION_HEX < 0x02020000
1651 (getattrfunc)PySwigObject_getattr, /* tp_getattr */
1653 (getattrfunc)0, /* tp_getattr */
1655 (setattrfunc)0, /* tp_setattr */
1656 (cmpfunc)PySwigObject_compare, /* tp_compare */
1657 (reprfunc)PySwigObject_repr, /* tp_repr */
1658 &PySwigObject_as_number, /* tp_as_number */
1659 0, /* tp_as_sequence */
1660 0, /* tp_as_mapping */
1661 (hashfunc)0, /* tp_hash */
1662 (ternaryfunc)0, /* tp_call */
1663 (reprfunc)PySwigObject_str, /* tp_str */
1664 PyObject_GenericGetAttr, /* tp_getattro */
1665 0, /* tp_setattro */
1666 0, /* tp_as_buffer */
1667 Py_TPFLAGS_DEFAULT, /* tp_flags */
1668 swigobject_doc, /* tp_doc */
1669 0, /* tp_traverse */
1671 0, /* tp_richcompare */
1672 0, /* tp_weaklistoffset */
1673 #if PY_VERSION_HEX >= 0x02020000
1675 0, /* tp_iternext */
1676 swigobject_methods, /* tp_methods */
1681 0, /* tp_descr_get */
1682 0, /* tp_descr_set */
1683 0, /* tp_dictoffset */
1692 0, /* tp_subclasses */
1693 0, /* tp_weaklist */
1695 #if PY_VERSION_HEX >= 0x02030000
1699 0,0,0,0 /* tp_alloc -> tp_next */
1702 pyswigobject_type = tmp;
1703 pyswigobject_type.ob_type = &PyType_Type;
1706 return &pyswigobject_type;
1709 SWIGRUNTIME PyObject *
1710 PySwigObject_New(void *ptr, swig_type_info *ty, int own)
1712 PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type());
1719 return (PyObject *)sobj;
1722 /* -----------------------------------------------------------------------------
1723 * Implements a simple Swig Packed type, and use it instead of string
1724 * ----------------------------------------------------------------------------- */
1734 PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
1736 char result[SWIG_BUFFER_SIZE];
1737 fputs("<Swig Packed ", fp);
1738 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1742 fputs(v->ty->name,fp);
1747 SWIGRUNTIME PyObject *
1748 PySwigPacked_repr(PySwigPacked *v)
1750 char result[SWIG_BUFFER_SIZE];
1751 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1752 return PyString_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
1754 return PyString_FromFormat("<Swig Packed %s>", v->ty->name);
1758 SWIGRUNTIME PyObject *
1759 PySwigPacked_str(PySwigPacked *v)
1761 char result[SWIG_BUFFER_SIZE];
1762 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
1763 return PyString_FromFormat("%s%s", result, v->ty->name);
1765 return PyString_FromString(v->ty->name);
1770 PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w)
1774 int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
1775 return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
1778 SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
1780 SWIGRUNTIME PyTypeObject*
1781 PySwigPacked_type(void) {
1782 static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
1786 SWIGRUNTIMEINLINE int
1787 PySwigPacked_Check(PyObject *op) {
1788 return ((op)->ob_type == _PySwigPacked_type())
1789 || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0);
1793 PySwigPacked_dealloc(PyObject *v)
1795 if (PySwigPacked_Check(v)) {
1796 PySwigPacked *sobj = (PySwigPacked *) v;
1802 SWIGRUNTIME PyTypeObject*
1803 _PySwigPacked_type(void) {
1804 static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
1805 static PyTypeObject pyswigpacked_type;
1806 static int type_init = 0;
1808 const PyTypeObject tmp
1810 PyObject_HEAD_INIT(NULL)
1812 (char *)"PySwigPacked", /* tp_name */
1813 sizeof(PySwigPacked), /* tp_basicsize */
1814 0, /* tp_itemsize */
1815 (destructor)PySwigPacked_dealloc, /* tp_dealloc */
1816 (printfunc)PySwigPacked_print, /* tp_print */
1817 (getattrfunc)0, /* tp_getattr */
1818 (setattrfunc)0, /* tp_setattr */
1819 (cmpfunc)PySwigPacked_compare, /* tp_compare */
1820 (reprfunc)PySwigPacked_repr, /* tp_repr */
1821 0, /* tp_as_number */
1822 0, /* tp_as_sequence */
1823 0, /* tp_as_mapping */
1824 (hashfunc)0, /* tp_hash */
1825 (ternaryfunc)0, /* tp_call */
1826 (reprfunc)PySwigPacked_str, /* tp_str */
1827 PyObject_GenericGetAttr, /* tp_getattro */
1828 0, /* tp_setattro */
1829 0, /* tp_as_buffer */
1830 Py_TPFLAGS_DEFAULT, /* tp_flags */
1831 swigpacked_doc, /* tp_doc */
1832 0, /* tp_traverse */
1834 0, /* tp_richcompare */
1835 0, /* tp_weaklistoffset */
1836 #if PY_VERSION_HEX >= 0x02020000
1838 0, /* tp_iternext */
1844 0, /* tp_descr_get */
1845 0, /* tp_descr_set */
1846 0, /* tp_dictoffset */
1855 0, /* tp_subclasses */
1856 0, /* tp_weaklist */
1858 #if PY_VERSION_HEX >= 0x02030000
1862 0,0,0,0 /* tp_alloc -> tp_next */
1865 pyswigpacked_type = tmp;
1866 pyswigpacked_type.ob_type = &PyType_Type;
1869 return &pyswigpacked_type;
1872 SWIGRUNTIME PyObject *
1873 PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty)
1875 PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type());
1877 void *pack = malloc(size);
1879 memcpy(pack, ptr, size);
1884 PyObject_DEL((PyObject *) sobj);
1888 return (PyObject *) sobj;
1891 SWIGRUNTIME swig_type_info *
1892 PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
1894 if (PySwigPacked_Check(obj)) {
1895 PySwigPacked *sobj = (PySwigPacked *)obj;
1896 if (sobj->size != size) return 0;
1897 memcpy(ptr, sobj->pack, size);
1904 /* -----------------------------------------------------------------------------
1905 * pointers/data manipulation
1906 * ----------------------------------------------------------------------------- */
1908 SWIGRUNTIMEINLINE PyObject *
1911 return PyString_FromString("this");
1914 SWIGRUNTIME PyObject *
1917 static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
1921 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
1923 SWIGRUNTIME PySwigObject *
1924 SWIG_Python_GetSwigThis(PyObject *pyobj)
1926 if (PySwigObject_Check(pyobj)) {
1927 return (PySwigObject *) pyobj;
1930 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
1931 if (PyInstance_Check(pyobj)) {
1932 obj = _PyInstance_Lookup(pyobj, SWIG_This());
1934 PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
1935 if (dictptr != NULL) {
1936 PyObject *dict = *dictptr;
1937 obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
1939 #ifdef PyWeakref_CheckProxy
1940 if (PyWeakref_CheckProxy(pyobj)) {
1941 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
1942 return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
1945 obj = PyObject_GetAttr(pyobj,SWIG_This());
1949 if (PyErr_Occurred()) PyErr_Clear();
1955 obj = PyObject_GetAttr(pyobj,SWIG_This());
1959 if (PyErr_Occurred()) PyErr_Clear();
1963 if (obj && !PySwigObject_Check(obj)) {
1964 /* a PyObject is called 'this', try to get the 'real this'
1965 PySwigObject from it */
1966 return SWIG_Python_GetSwigThis(obj);
1968 return (PySwigObject *)obj;
1972 /* Acquire a pointer value */
1975 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
1976 if (own == SWIG_POINTER_OWN) {
1977 PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
1979 int oldown = sobj->own;
1987 /* Convert a pointer value */
1990 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
1991 if (!obj) return SWIG_ERROR;
1992 if (obj == Py_None) {
1996 PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
2000 void *vptr = sobj->ptr;
2002 swig_type_info *to = sobj->ty;
2004 /* no type cast needed */
2005 if (ptr) *ptr = vptr;
2008 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2010 sobj = (PySwigObject *)sobj->next;
2014 *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2015 if (newmemory == SWIG_CAST_NEW_MEMORY) {
2018 *own = *own | SWIG_CAST_NEW_MEMORY;
2025 if (ptr) *ptr = vptr;
2031 *own = *own | sobj->own;
2032 if (flags & SWIG_POINTER_DISOWN) {
2037 int res = SWIG_ERROR;
2038 if (flags & SWIG_POINTER_IMPLICIT_CONV) {
2039 PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
2040 if (data && !data->implicitconv) {
2041 PyObject *klass = data->klass;
2044 data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2045 impconv = SWIG_Python_CallFunctor(klass, obj);
2046 data->implicitconv = 0;
2047 if (PyErr_Occurred()) {
2052 PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv);
2055 res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2056 if (SWIG_IsOK(res)) {
2059 /* transfer the ownership to 'ptr' */
2061 res = SWIG_AddCast(res);
2062 res = SWIG_AddNewMask(res);
2064 res = SWIG_AddCast(res);
2078 /* Convert a function ptr value */
2081 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2082 if (!PyCFunction_Check(obj)) {
2083 return SWIG_ConvertPtr(obj, ptr, ty, 0);
2087 /* here we get the method pointer for callbacks */
2088 const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2089 const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2091 desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2092 if (!desc) return SWIG_ERROR;
2095 swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
2098 *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2099 assert(!newmemory); /* newmemory handling not yet implemented */
2110 /* Convert a packed value value */
2113 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2114 swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz);
2115 if (!to) return SWIG_ERROR;
2118 /* check type cast? */
2119 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2120 if (!tc) return SWIG_ERROR;
2126 /* -----------------------------------------------------------------------------
2127 * Create a new pointer object
2128 * ----------------------------------------------------------------------------- */
2131 Create a new instance object, whitout calling __init__, and set the
2135 SWIGRUNTIME PyObject*
2136 SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this)
2138 #if (PY_VERSION_HEX >= 0x02020000)
2140 PyObject *newraw = data->newraw;
2142 inst = PyObject_Call(newraw, data->newargs, NULL);
2144 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2145 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2146 if (dictptr != NULL) {
2147 PyObject *dict = *dictptr;
2149 dict = PyDict_New();
2151 PyDict_SetItem(dict, SWIG_This(), swig_this);
2155 PyObject *key = SWIG_This();
2156 PyObject_SetAttr(inst, key, swig_this);
2160 PyObject *dict = PyDict_New();
2161 PyDict_SetItem(dict, SWIG_This(), swig_this);
2162 inst = PyInstance_NewRaw(data->newargs, dict);
2167 #if (PY_VERSION_HEX >= 0x02010000)
2169 PyObject *dict = PyDict_New();
2170 PyDict_SetItem(dict, SWIG_This(), swig_this);
2171 inst = PyInstance_NewRaw(data->newargs, dict);
2173 return (PyObject *) inst;
2175 PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
2179 inst->in_class = (PyClassObject *)data->newargs;
2180 Py_INCREF(inst->in_class);
2181 inst->in_dict = PyDict_New();
2182 if (inst->in_dict == NULL) {
2186 #ifdef Py_TPFLAGS_HAVE_WEAKREFS
2187 inst->in_weakreflist = NULL;
2189 #ifdef Py_TPFLAGS_GC
2190 PyObject_GC_Init(inst);
2192 PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
2193 return (PyObject *) inst;
2199 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2202 #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2203 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2204 if (dictptr != NULL) {
2207 dict = PyDict_New();
2210 PyDict_SetItem(dict, SWIG_This(), swig_this);
2214 dict = PyObject_GetAttrString(inst, (char*)"__dict__");
2215 PyDict_SetItem(dict, SWIG_This(), swig_this);
2220 SWIGINTERN PyObject *
2221 SWIG_Python_InitShadowInstance(PyObject *args) {
2223 if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
2226 PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2228 PySwigObject_append((PyObject*) sthis, obj[1]);
2230 SWIG_Python_SetSwigThis(obj[0], obj[1]);
2232 return SWIG_Py_Void();
2236 /* Create a new pointer object */
2238 SWIGRUNTIME PyObject *
2239 SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
2241 return SWIG_Py_Void();
2243 int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2244 PyObject *robj = PySwigObject_New(ptr, type, own);
2245 PySwigClientData *clientdata = type ? (PySwigClientData *)(type->clientdata) : 0;
2246 if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2247 PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2257 /* Create a new packed object */
2259 SWIGRUNTIMEINLINE PyObject *
2260 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2261 return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2264 /* -----------------------------------------------------------------------------*
2266 * -----------------------------------------------------------------------------*/
2268 #ifdef SWIG_LINK_RUNTIME
2269 void *SWIG_ReturnGlobalTypeList(void *);
2272 SWIGRUNTIME swig_module_info *
2273 SWIG_Python_GetModule(void) {
2274 static void *type_pointer = (void *)0;
2275 /* first check if module already created */
2276 if (!type_pointer) {
2277 #ifdef SWIG_LINK_RUNTIME
2278 type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2280 type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2281 (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
2282 if (PyErr_Occurred()) {
2284 type_pointer = (void *)0;
2288 return (swig_module_info *) type_pointer;
2291 #if PY_MAJOR_VERSION < 2
2292 /* PyModule_AddObject function was introduced in Python 2.0. The following function
2293 is copied out of Python/modsupport.c in python version 2.3.4 */
2295 PyModule_AddObject(PyObject *m, char *name, PyObject *o)
2298 if (!PyModule_Check(m)) {
2299 PyErr_SetString(PyExc_TypeError,
2300 "PyModule_AddObject() needs module as first arg");
2304 PyErr_SetString(PyExc_TypeError,
2305 "PyModule_AddObject() needs non-NULL value");
2309 dict = PyModule_GetDict(m);
2311 /* Internal error -- modules must have a dict! */
2312 PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
2313 PyModule_GetName(m));
2316 if (PyDict_SetItemString(dict, name, o))
2324 SWIG_Python_DestroyModule(void *vptr)
2326 swig_module_info *swig_module = (swig_module_info *) vptr;
2327 swig_type_info **types = swig_module->types;
2329 for (i =0; i < swig_module->size; ++i) {
2330 swig_type_info *ty = types[i];
2332 PySwigClientData *data = (PySwigClientData *) ty->clientdata;
2333 if (data) PySwigClientData_Del(data);
2336 Py_DECREF(SWIG_This());
2340 SWIG_Python_SetModule(swig_module_info *swig_module) {
2341 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
2343 PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2344 swig_empty_runtime_method_table);
2345 PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
2346 if (pointer && module) {
2347 PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
2349 Py_XDECREF(pointer);
2353 /* The python cached type query */
2354 SWIGRUNTIME PyObject *
2355 SWIG_Python_TypeCache(void) {
2356 static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2360 SWIGRUNTIME swig_type_info *
2361 SWIG_Python_TypeQuery(const char *type)
2363 PyObject *cache = SWIG_Python_TypeCache();
2364 PyObject *key = PyString_FromString(type);
2365 PyObject *obj = PyDict_GetItem(cache, key);
2366 swig_type_info *descriptor;
2368 descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
2370 swig_module_info *swig_module = SWIG_Python_GetModule();
2371 descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2373 obj = PyCObject_FromVoidPtr(descriptor, NULL);
2374 PyDict_SetItem(cache, key, obj);
2383 For backward compatibility only
2385 #define SWIG_POINTER_EXCEPTION 0
2386 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2387 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2390 SWIG_Python_AddErrMesg(const char* mesg, int infront)
2392 if (PyErr_Occurred()) {
2394 PyObject *value = 0;
2395 PyObject *traceback = 0;
2396 PyErr_Fetch(&type, &value, &traceback);
2398 PyObject *old_str = PyObject_Str(value);
2402 PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str));
2404 PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
2415 SWIG_Python_ArgFail(int argnum)
2417 if (PyErr_Occurred()) {
2418 /* add information about failing argument */
2420 PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2421 return SWIG_Python_AddErrMesg(mesg, 1);
2427 SWIGRUNTIMEINLINE const char *
2428 PySwigObject_GetDesc(PyObject *self)
2430 PySwigObject *v = (PySwigObject *)self;
2431 swig_type_info *ty = v ? v->ty : 0;
2432 return ty ? ty->str : (char*)"";
2436 SWIG_Python_TypeError(const char *type, PyObject *obj)
2439 #if defined(SWIG_COBJECT_TYPES)
2440 if (obj && PySwigObject_Check(obj)) {
2441 const char *otype = (const char *) PySwigObject_GetDesc(obj);
2443 PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received",
2450 const char *otype = (obj ? obj->ob_type->tp_name : 0);
2452 PyObject *str = PyObject_Str(obj);
2453 const char *cstr = str ? PyString_AsString(str) : 0;
2455 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2458 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2465 PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2467 PyErr_Format(PyExc_TypeError, "unexpected type is received");
2472 /* Convert a pointer value, signal an exception on a type mismatch */
2474 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
2476 if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2478 if (flags & SWIG_POINTER_EXCEPTION) {
2479 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2480 SWIG_Python_ArgFail(argnum);
2496 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2498 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2502 #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
2505 /* -------- TYPES TABLE (BEGIN) -------- */
2507 #define SWIGTYPE_p_allocator_type swig_types[0]
2508 #define SWIGTYPE_p_boost__shared_ptrT_gr_basic_block_t swig_types[1]
2509 #define SWIGTYPE_p_boost__shared_ptrT_gr_block_detail_t swig_types[2]
2510 #define SWIGTYPE_p_boost__shared_ptrT_gr_block_t swig_types[3]
2511 #define SWIGTYPE_p_boost__shared_ptrT_gr_buffer_reader_t swig_types[4]
2512 #define SWIGTYPE_p_boost__shared_ptrT_gr_buffer_t swig_types[5]
2513 #define SWIGTYPE_p_boost__shared_ptrT_gr_dispatcher_t swig_types[6]
2514 #define SWIGTYPE_p_boost__shared_ptrT_gr_hier_block2_t swig_types[7]
2515 #define SWIGTYPE_p_boost__shared_ptrT_gr_io_signature_t swig_types[8]
2516 #define SWIGTYPE_p_boost__shared_ptrT_gr_message_t swig_types[9]
2517 #define SWIGTYPE_p_boost__shared_ptrT_gr_msg_queue_t swig_types[10]
2518 #define SWIGTYPE_p_boost__shared_ptrT_gr_single_threaded_scheduler_t swig_types[11]
2519 #define SWIGTYPE_p_boost__shared_ptrT_gr_top_block_t swig_types[12]
2520 #define SWIGTYPE_p_boost__shared_ptrT_howto_square2_ff_t swig_types[13]
2521 #define SWIGTYPE_p_boost__shared_ptrT_howto_square_ff_t swig_types[14]
2522 #define SWIGTYPE_p_char swig_types[15]
2523 #define SWIGTYPE_p_difference_type swig_types[16]
2524 #define SWIGTYPE_p_gr_basic_block swig_types[17]
2525 #define SWIGTYPE_p_gr_block swig_types[18]
2526 #define SWIGTYPE_p_gr_hier_block2 swig_types[19]
2527 #define SWIGTYPE_p_gr_sync_block swig_types[20]
2528 #define SWIGTYPE_p_gr_sync_decimator swig_types[21]
2529 #define SWIGTYPE_p_gr_sync_interpolator swig_types[22]
2530 #define SWIGTYPE_p_gr_top_block swig_types[23]
2531 #define SWIGTYPE_p_gruel__rt_status_t swig_types[24]
2532 #define SWIGTYPE_p_howto_square2_ff swig_types[25]
2533 #define SWIGTYPE_p_howto_square_ff swig_types[26]
2534 #define SWIGTYPE_p_size_type swig_types[27]
2535 #define SWIGTYPE_p_std__complexT_double_t swig_types[28]
2536 #define SWIGTYPE_p_std__complexT_float_t swig_types[29]
2537 #define SWIGTYPE_p_std__invalid_argument swig_types[30]
2538 #define SWIGTYPE_p_swig__PySwigIterator swig_types[31]
2539 #define SWIGTYPE_p_value_type swig_types[32]
2540 static swig_type_info *swig_types[34];
2541 static swig_module_info swig_module = {swig_types, 33, 0, 0, 0, 0};
2542 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2543 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2545 /* -------- TYPES TABLE (END) -------- */
2547 #if (PY_VERSION_HEX <= 0x02000000)
2548 # if !defined(SWIG_PYTHON_CLASSIC)
2549 # error "This python version requires swig to be run with the '-classic' option"
2552 #if (PY_VERSION_HEX <= 0x02020000)
2553 # error "This python version requires swig to be run with the '-nomodern' option"
2555 #if (PY_VERSION_HEX <= 0x02020000)
2556 # error "This python version requires swig to be run with the '-nomodernargs' option"
2559 /*-----------------------------------------------
2560 @(target):= _howto.so
2561 ------------------------------------------------*/
2562 #define SWIG_init init_howto
2564 #define SWIG_name "_howto"
2566 #define SWIGVERSION 0x010336
2567 #define SWIG_VERSION SWIGVERSION
2570 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
2571 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
2574 #include <stdexcept>
2578 class PyObject_ptr {
2583 PyObject_ptr() :_obj(0)
2587 PyObject_ptr(const PyObject_ptr& item) : _obj(item._obj)
2592 PyObject_ptr(PyObject *obj, bool initial_ref = true) :_obj(obj)
2599 PyObject_ptr & operator=(const PyObject_ptr& item)
2601 Py_XINCREF(item._obj);
2612 operator PyObject *() const
2617 PyObject *operator->() const
2626 struct PyObject_var : PyObject_ptr {
2627 PyObject_var(PyObject* obj = 0) : PyObject_ptr(obj, false) { }
2629 PyObject_var & operator = (PyObject* obj)
2639 #include "gnuradio_swig_bug_workaround.h" // mandatory bug fix
2640 #include <gr_types.h>
2641 #include <stddef.h> // size_t
2644 #include <stdexcept>
2647 #if defined(__GNUC__)
2648 # if __GNUC__ == 2 && __GNUC_MINOR <= 96
2649 # define SWIG_STD_NOMODERN_STL
2655 #include <stdexcept>
2665 struct stop_iteration {
2668 struct PySwigIterator {
2673 PySwigIterator(PyObject *seq) : _seq(seq)
2678 virtual ~PySwigIterator() {}
2680 // Access iterator method, required by Python
2681 virtual PyObject *value() const = 0;
2683 // Forward iterator method, required by Python
2684 virtual PySwigIterator *incr(size_t n = 1) = 0;
2686 // Backward iterator method, very common in C++, but not required in Python
2687 virtual PySwigIterator *decr(size_t /*n*/ = 1)
2689 throw stop_iteration();
2692 // Random access iterator methods, but not required in Python
2693 virtual ptrdiff_t distance(const PySwigIterator &/*x*/) const
2695 throw std::invalid_argument("operation not supported");
2698 virtual bool equal (const PySwigIterator &/*x*/) const
2700 throw std::invalid_argument("operation not supported");
2703 // C++ common/needed methods
2704 virtual PySwigIterator *copy() const = 0;
2708 SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads
2709 PyObject *obj = value();
2711 SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
2715 PyObject *previous()
2717 SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads
2719 PyObject *obj = value();
2720 SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
2724 PySwigIterator *advance(ptrdiff_t n)
2726 return (n > 0) ? incr(n) : decr(-n);
2729 bool operator == (const PySwigIterator& x) const
2734 bool operator != (const PySwigIterator& x) const
2736 return ! operator==(x);
2739 PySwigIterator& operator += (ptrdiff_t n)
2744 PySwigIterator& operator -= (ptrdiff_t n)
2746 return *advance(-n);
2749 PySwigIterator* operator + (ptrdiff_t n) const
2751 return copy()->advance(n);
2754 PySwigIterator* operator - (ptrdiff_t n) const
2756 return copy()->advance(-n);
2759 ptrdiff_t operator - (const PySwigIterator& x) const
2761 return x.distance(*this);
2764 static swig_type_info* descriptor() {
2765 static int init = 0;
2766 static swig_type_info* desc = 0;
2768 desc = SWIG_TypeQuery("swig::PySwigIterator *");
2778 SWIG_AsVal_double (PyObject *obj, double *val)
2780 int res = SWIG_TypeError;
2781 if (PyFloat_Check(obj)) {
2782 if (val) *val = PyFloat_AsDouble(obj);
2784 } else if (PyInt_Check(obj)) {
2785 if (val) *val = PyInt_AsLong(obj);
2787 } else if (PyLong_Check(obj)) {
2788 double v = PyLong_AsDouble(obj);
2789 if (!PyErr_Occurred()) {
2796 #ifdef SWIG_PYTHON_CAST_MODE
2799 double d = PyFloat_AsDouble(obj);
2800 if (!PyErr_Occurred()) {
2802 return SWIG_AddCast(SWIG_OK);
2807 long v = PyLong_AsLong(obj);
2808 if (!PyErr_Occurred()) {
2810 return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
2827 SWIGINTERNINLINE int
2828 SWIG_CanCastAsInteger(double *d, double min, double max) {
2830 if ((min <= x && x <= max)) {
2831 double fx = floor(x);
2832 double cx = ceil(x);
2833 double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
2834 if ((errno == EDOM) || (errno == ERANGE)) {
2837 double summ, reps, diff;
2840 } else if (rd > x) {
2847 if (reps < 8*DBL_EPSILON) {
2858 SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
2860 if (PyInt_Check(obj)) {
2861 long v = PyInt_AsLong(obj);
2866 return SWIG_OverflowError;
2868 } else if (PyLong_Check(obj)) {
2869 unsigned long v = PyLong_AsUnsignedLong(obj);
2870 if (!PyErr_Occurred()) {
2877 #ifdef SWIG_PYTHON_CAST_MODE
2880 unsigned long v = PyLong_AsUnsignedLong(obj);
2881 if (!PyErr_Occurred()) {
2883 return SWIG_AddCast(SWIG_OK);
2889 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
2890 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
2891 if (val) *val = (unsigned long)(d);
2897 return SWIG_TypeError;
2901 SWIGINTERNINLINE int
2902 SWIG_AsVal_size_t (PyObject * obj, size_t *val)
2905 int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
2906 if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
2911 #define SWIG_From_long PyInt_FromLong
2914 SWIGINTERNINLINE PyObject *
2915 SWIG_From_ptrdiff_t (ptrdiff_t value)
2917 return SWIG_From_long (static_cast< long >(value));
2921 SWIGINTERNINLINE PyObject*
2922 SWIG_From_bool (bool value)
2924 return PyBool_FromLong(value ? 1 : 0);
2929 SWIG_AsVal_long (PyObject *obj, long* val)
2931 if (PyInt_Check(obj)) {
2932 if (val) *val = PyInt_AsLong(obj);
2934 } else if (PyLong_Check(obj)) {
2935 long v = PyLong_AsLong(obj);
2936 if (!PyErr_Occurred()) {
2943 #ifdef SWIG_PYTHON_CAST_MODE
2946 long v = PyInt_AsLong(obj);
2947 if (!PyErr_Occurred()) {
2949 return SWIG_AddCast(SWIG_OK);
2955 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
2956 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
2957 if (val) *val = (long)(d);
2963 return SWIG_TypeError;
2967 SWIGINTERNINLINE int
2968 SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val)
2971 int res = SWIG_AsVal_long (obj, val ? &v : 0);
2972 if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v);
2977 #include <stdexcept>
2980 #include <algorithm>
2990 #include <algorithm>
2991 #include <stdexcept>
2998 template <class Type>
2999 struct noconst_traits {
3000 typedef Type noconst_type;
3003 template <class Type>
3004 struct noconst_traits<const Type> {
3005 typedef Type noconst_type;
3011 struct pointer_category { };
3012 struct value_category { };
3015 General traits that provides type_name and type_info
3017 template <class Type> struct traits { };
3019 template <class Type>
3020 inline const char* type_name() {
3021 return traits<typename noconst_traits<Type >::noconst_type >::type_name();
3024 template <class Type>
3025 struct traits_info {
3026 static swig_type_info *type_query(std::string name) {
3028 return SWIG_TypeQuery(name.c_str());
3030 static swig_type_info *type_info() {
3031 static swig_type_info *info = type_query(type_name<Type>());
3036 template <class Type>
3037 inline swig_type_info *type_info() {
3038 return traits_info<Type>::type_info();
3042 Partial specialization for pointers
3044 template <class Type> struct traits <Type *> {
3045 typedef pointer_category category;
3046 static std::string make_ptr_name(const char* name) {
3047 std::string ptrname = name;
3051 static const char* type_name() {
3052 static std::string name = make_ptr_name(swig::type_name<Type>());
3053 return name.c_str();
3057 template <class Type, class Category>
3058 struct traits_as { };
3060 template <class Type, class Category>
3061 struct traits_check { };
3068 Traits that provides the from method
3070 template <class Type> struct traits_from_ptr {
3071 static PyObject *from(Type *val, int owner = 0) {
3072 return SWIG_NewPointerObj(val, type_info<Type>(), owner);
3076 template <class Type> struct traits_from {
3077 static PyObject *from(const Type& val) {
3078 return traits_from_ptr<Type>::from(new Type(val), 1);
3082 template <class Type> struct traits_from<Type *> {
3083 static PyObject *from(Type* val) {
3084 return traits_from_ptr<Type>::from(val, 0);
3088 template <class Type> struct traits_from<const Type *> {
3089 static PyObject *from(const Type* val) {
3090 return traits_from_ptr<Type>::from(const_cast<Type*>(val), 0);
3095 template <class Type>
3096 inline PyObject *from(const Type& val) {
3097 return traits_from<Type>::from(val);
3100 template <class Type>
3101 inline PyObject *from_ptr(Type* val, int owner) {
3102 return traits_from_ptr<Type>::from(val, owner);
3106 Traits that provides the asval/as/check method
3108 template <class Type>
3109 struct traits_asptr {
3110 static int asptr(PyObject *obj, Type **val) {
3112 int res = (SWIG_ConvertPtr(obj, (void**)&p, type_info<Type>(), 0) == SWIG_OK) ? SWIG_OLDOBJ : 0;
3113 if (SWIG_IsOK(res)) {
3120 template <class Type>
3121 inline int asptr(PyObject *obj, Type **vptr) {
3122 return traits_asptr<Type>::asptr(obj, vptr);
3125 template <class Type>
3126 struct traits_asval {
3127 static int asval(PyObject *obj, Type *val) {
3130 int res = traits_asptr<Type>::asptr(obj, &p);
3131 if (!SWIG_IsOK(res)) return res;
3133 typedef typename noconst_traits<Type>::noconst_type noconst_type;
3134 *(const_cast<noconst_type*>(val)) = *p;
3135 if (SWIG_IsNewObj(res)){
3137 res = SWIG_DelNewMask(res);
3144 return traits_asptr<Type>::asptr(obj, (Type **)(0));
3149 template <class Type> struct traits_asval<Type*> {
3150 static int asval(PyObject *obj, Type **val) {
3152 typedef typename noconst_traits<Type>::noconst_type noconst_type;
3153 noconst_type *p = 0;
3154 int res = traits_asptr<noconst_type>::asptr(obj, &p);
3155 if (SWIG_IsOK(res)) {
3156 *(const_cast<noconst_type**>(val)) = p;
3160 return traits_asptr<Type>::asptr(obj, (Type **)(0));
3165 template <class Type>
3166 inline int asval(PyObject *obj, Type *val) {
3167 return traits_asval<Type>::asval(obj, val);
3170 template <class Type>
3171 struct traits_as<Type, value_category> {
3172 static Type as(PyObject *obj, bool throw_error) {
3174 int res = asval(obj, &v);
3175 if (!obj || !SWIG_IsOK(res)) {
3176 if (!PyErr_Occurred()) {
3177 ::SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
3179 if (throw_error) throw std::invalid_argument("bad type");
3185 template <class Type>
3186 struct traits_as<Type, pointer_category> {
3187 static Type as(PyObject *obj, bool throw_error) {
3189 int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
3190 if (SWIG_IsOK(res) && v) {
3191 if (SWIG_IsNewObj(res)) {
3199 // Uninitialized return value, no Type() constructor required.
3200 static Type *v_def = (Type*) malloc(sizeof(Type));
3201 if (!PyErr_Occurred()) {
3202 SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
3204 if (throw_error) throw std::invalid_argument("bad type");
3205 memset(v_def,0,sizeof(Type));
3211 template <class Type>
3212 struct traits_as<Type*, pointer_category> {
3213 static Type* as(PyObject *obj, bool throw_error) {
3215 int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
3216 if (SWIG_IsOK(res)) {
3219 if (!PyErr_Occurred()) {
3220 SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
3222 if (throw_error) throw std::invalid_argument("bad type");
3228 template <class Type>
3229 inline Type as(PyObject *obj, bool te = false) {
3230 return traits_as<Type, typename traits<Type>::category>::as(obj, te);
3233 template <class Type>
3234 struct traits_check<Type, value_category> {
3235 static bool check(PyObject *obj) {
3236 int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR;
3237 return SWIG_IsOK(res) ? true : false;
3241 template <class Type>
3242 struct traits_check<Type, pointer_category> {
3243 static bool check(PyObject *obj) {
3244 int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR;
3245 return SWIG_IsOK(res) ? true : false;
3249 template <class Type>
3250 inline bool check(PyObject *obj) {
3251 return traits_check<Type, typename traits<Type>::category>::check(obj);
3256 #include <functional>
3260 struct less <PyObject *>: public binary_function<PyObject *, PyObject *, bool>
3263 operator()(PyObject * v, PyObject *w) const
3266 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3267 res = PyObject_Compare(v, w) < 0;
3268 SWIG_PYTHON_THREAD_END_BLOCK;
3274 struct less <swig::PyObject_ptr>: public binary_function<swig::PyObject_ptr, swig::PyObject_ptr, bool>
3277 operator()(const swig::PyObject_ptr& v, const swig::PyObject_ptr& w) const
3279 return std::less<PyObject *>()(v, w);
3284 struct less <swig::PyObject_var>: public binary_function<swig::PyObject_var, swig::PyObject_var, bool>
3287 operator()(const swig::PyObject_var& v, const swig::PyObject_var& w) const
3289 return std::less<PyObject *>()(v, w);
3296 template <> struct traits<PyObject *> {
3297 typedef value_category category;
3298 static const char* type_name() { return "PyObject *"; }
3301 template <> struct traits_asval<PyObject * > {
3302 typedef PyObject * value_type;
3303 static int asval(PyObject *obj, value_type *val) {
3304 if (val) *val = obj;
3310 struct traits_check<PyObject *, value_category> {
3311 static bool check(PyObject *) {
3316 template <> struct traits_from<PyObject *> {
3317 typedef PyObject * value_type;
3318 static PyObject *from(const value_type& val) {
3328 check_index(ptrdiff_t i, size_t size, bool insert = false) {
3330 if ((size_t) (-i) <= size)
3331 return (size_t) (i + size);
3332 } else if ( (size_t) i < size ) {
3334 } else if (insert && ((size_t) i == size)) {
3338 throw std::out_of_range("index out of range");
3342 slice_index(ptrdiff_t i, size_t size) {
3344 if ((size_t) (-i) <= size) {
3345 return (size_t) (i + size);
3347 throw std::out_of_range("index out of range");
3350 return ( (size_t) i < size ) ? ((size_t) i) : size;
3354 template <class Sequence, class Difference>
3355 inline typename Sequence::iterator
3356 getpos(Sequence* self, Difference i) {
3357 typename Sequence::iterator pos = self->begin();
3358 std::advance(pos, check_index(i,self->size()));
3362 template <class Sequence, class Difference>
3363 inline typename Sequence::const_iterator
3364 cgetpos(const Sequence* self, Difference i) {
3365 typename Sequence::const_iterator pos = self->begin();
3366 std::advance(pos, check_index(i,self->size()));
3370 template <class Sequence, class Difference>
3372 getslice(const Sequence* self, Difference i, Difference j) {
3373 typename Sequence::size_type size = self->size();
3374 typename Sequence::size_type ii = swig::check_index(i, size);
3375 typename Sequence::size_type jj = swig::slice_index(j, size);
3378 typename Sequence::const_iterator vb = self->begin();
3379 typename Sequence::const_iterator ve = self->begin();
3380 std::advance(vb,ii);
3381 std::advance(ve,jj);
3382 return new Sequence(vb, ve);
3384 return new Sequence();
3388 template <class Sequence, class Difference, class InputSeq>
3390 setslice(Sequence* self, Difference i, Difference j, const InputSeq& v) {
3391 typename Sequence::size_type size = self->size();
3392 typename Sequence::size_type ii = swig::check_index(i, size, true);
3393 typename Sequence::size_type jj = swig::slice_index(j, size);
3394 if (jj < ii) jj = ii;
3395 size_t ssize = jj - ii;
3396 if (ssize <= v.size()) {
3397 typename Sequence::iterator sb = self->begin();
3398 typename InputSeq::const_iterator vmid = v.begin();
3399 std::advance(sb,ii);
3400 std::advance(vmid, jj - ii);
3401 self->insert(std::copy(v.begin(), vmid, sb), vmid, v.end());
3403 typename Sequence::iterator sb = self->begin();
3404 typename Sequence::iterator se = self->begin();
3405 std::advance(sb,ii);
3406 std::advance(se,jj);
3408 self->insert(sb, v.begin(), v.end());
3412 template <class Sequence, class Difference>
3414 delslice(Sequence* self, Difference i, Difference j) {
3415 typename Sequence::size_type size = self->size();
3416 typename Sequence::size_type ii = swig::check_index(i, size, true);
3417 typename Sequence::size_type jj = swig::slice_index(j, size);
3419 typename Sequence::iterator sb = self->begin();
3420 typename Sequence::iterator se = self->begin();
3421 std::advance(sb,ii);
3422 std::advance(se,jj);
3429 #if defined(__SUNPRO_CC) && defined(_RWSTD_VER)
3430 # if !defined(SWIG_NO_STD_NOITERATOR_TRAITS_STL)
3431 # define SWIG_STD_NOITERATOR_TRAITS_STL
3435 #if !defined(SWIG_STD_NOITERATOR_TRAITS_STL)
3439 template <class Iterator>
3440 struct iterator_traits {
3441 typedef ptrdiff_t difference_type;
3442 typedef typename Iterator::value_type value_type;
3445 template <class Iterator, class Category,class T, class Reference, class Pointer, class Distance>
3446 struct iterator_traits<__reverse_bi_iterator<Iterator,Category,T,Reference,Pointer,Distance> > {
3447 typedef Distance difference_type;
3448 typedef T value_type;
3452 struct iterator_traits<T*> {
3453 typedef T value_type;
3454 typedef ptrdiff_t difference_type;
3457 template<typename _InputIterator>
3458 inline typename iterator_traits<_InputIterator>::difference_type
3459 distance(_InputIterator __first, _InputIterator __last)
3461 typename iterator_traits<_InputIterator>::difference_type __n = 0;
3462 while (__first != __last) {
3472 template<typename OutIterator>
3473 class PySwigIterator_T : public PySwigIterator
3476 typedef OutIterator out_iterator;
3477 typedef typename std::iterator_traits<out_iterator>::value_type value_type;
3478 typedef PySwigIterator_T<out_iterator> self_type;
3480 PySwigIterator_T(out_iterator curr, PyObject *seq)
3481 : PySwigIterator(seq), current(curr)
3485 const out_iterator& get_current() const
3491 bool equal (const PySwigIterator &iter) const
3493 const self_type *iters = dynamic_cast<const self_type *>(&iter);
3495 return (current == iters->get_current());
3497 throw std::invalid_argument("bad iterator type");
3501 ptrdiff_t distance(const PySwigIterator &iter) const
3503 const self_type *iters = dynamic_cast<const self_type *>(&iter);
3505 return std::distance(current, iters->get_current());
3507 throw std::invalid_argument("bad iterator type");
3512 out_iterator current;
3515 template <class ValueType>
3518 typedef const ValueType& argument_type;
3519 typedef PyObject *result_type;
3520 result_type operator()(argument_type v) const
3522 return swig::from(v);
3526 template<typename OutIterator,
3527 typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
3528 typename FromOper = from_oper<ValueType> >
3529 class PySwigIteratorOpen_T : public PySwigIterator_T<OutIterator>
3533 typedef OutIterator out_iterator;
3534 typedef ValueType value_type;
3535 typedef PySwigIterator_T<out_iterator> base;
3536 typedef PySwigIteratorOpen_T<OutIterator, ValueType, FromOper> self_type;
3538 PySwigIteratorOpen_T(out_iterator curr, PyObject *seq)
3539 : PySwigIterator_T<OutIterator>(curr, seq)
3543 PyObject *value() const {
3544 return from(static_cast<const value_type&>(*(base::current)));
3547 PySwigIterator *copy() const
3549 return new self_type(*this);
3552 PySwigIterator *incr(size_t n = 1)
3560 PySwigIterator *decr(size_t n = 1)
3569 template<typename OutIterator,
3570 typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
3571 typename FromOper = from_oper<ValueType> >
3572 class PySwigIteratorClosed_T : public PySwigIterator_T<OutIterator>
3576 typedef OutIterator out_iterator;
3577 typedef ValueType value_type;
3578 typedef PySwigIterator_T<out_iterator> base;
3579 typedef PySwigIteratorClosed_T<OutIterator, ValueType, FromOper> self_type;
3581 PySwigIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq)
3582 : PySwigIterator_T<OutIterator>(curr, seq), begin(first), end(last)
3586 PyObject *value() const {
3587 if (base::current == end) {
3588 throw stop_iteration();
3590 return from(static_cast<const value_type&>(*(base::current)));
3594 PySwigIterator *copy() const
3596 return new self_type(*this);
3599 PySwigIterator *incr(size_t n = 1)
3602 if (base::current == end) {
3603 throw stop_iteration();
3611 PySwigIterator *decr(size_t n = 1)
3614 if (base::current == begin) {
3615 throw stop_iteration();
3628 template<typename OutIter>
3629 inline PySwigIterator*
3630 make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0)
3632 return new PySwigIteratorClosed_T<OutIter>(current, begin, end, seq);
3635 template<typename OutIter>
3636 inline PySwigIterator*
3637 make_output_iterator(const OutIter& current, PyObject *seq = 0)
3639 return new PySwigIteratorOpen_T<OutIter>(current, seq);
3647 struct PySequence_Ref
3649 PySequence_Ref(PyObject* seq, int index)
3650 : _seq(seq), _index(index)
3656 swig::PyObject_var item = PySequence_GetItem(_seq, _index);
3658 return swig::as<T>(item, true);
3659 } catch (std::exception& e) {
3661 sprintf(msg, "in sequence element %d ", _index);
3662 if (!PyErr_Occurred()) {
3663 ::SWIG_Error(SWIG_TypeError, swig::type_name<T>());
3665 SWIG_Python_AddErrorMsg(msg);
3666 SWIG_Python_AddErrorMsg(e.what());
3671 PySequence_Ref& operator=(const T& v)
3673 PySequence_SetItem(_seq, _index, swig::from<T>(v));
3683 struct PySequence_ArrowProxy
3685 PySequence_ArrowProxy(const T& x): m_value(x) {}
3686 const T* operator->() const { return &m_value; }
3687 operator const T*() const { return &m_value; }
3691 template <class T, class Reference >
3692 struct PySequence_InputIterator
3694 typedef PySequence_InputIterator<T, Reference > self;
3696 typedef std::random_access_iterator_tag iterator_category;
3697 typedef Reference reference;
3698 typedef T value_type;
3700 typedef int difference_type;
3702 PySequence_InputIterator()
3706 PySequence_InputIterator(PyObject* seq, int index)
3707 : _seq(seq), _index(index)
3711 reference operator*() const
3713 return reference(_seq, _index);
3716 PySequence_ArrowProxy<T>
3717 operator->() const {
3718 return PySequence_ArrowProxy<T>(operator*());
3721 bool operator==(const self& ri) const
3723 return (_index == ri._index) && (_seq == ri._seq);
3726 bool operator!=(const self& ri) const
3728 return !(operator==(ri));
3731 self& operator ++ ()
3737 self& operator -- ()
3743 self& operator += (difference_type n)
3749 self operator +(difference_type n) const
3751 return self(_seq, _index + n);
3754 self& operator -= (difference_type n)
3760 self operator -(difference_type n) const
3762 return self(_seq, _index - n);
3765 difference_type operator - (const self& ri) const
3767 return _index - ri._index;
3770 bool operator < (const self& ri) const
3772 return _index < ri._index;
3776 operator[](difference_type n) const
3778 return reference(_seq, _index + n);
3783 difference_type _index;
3787 struct PySequence_Cont
3789 typedef PySequence_Ref<T> reference;
3790 typedef const PySequence_Ref<T> const_reference;
3791 typedef T value_type;
3793 typedef int difference_type;
3794 typedef int size_type;
3795 typedef const pointer const_pointer;
3796 typedef PySequence_InputIterator<T, reference> iterator;
3797 typedef PySequence_InputIterator<T, const_reference> const_iterator;
3799 PySequence_Cont(PyObject* seq) : _seq(0)
3801 if (!PySequence_Check(seq)) {
3802 throw std::invalid_argument("a sequence is expected");
3813 size_type size() const
3815 return static_cast<size_type>(PySequence_Size(_seq));
3825 return iterator(_seq, 0);
3828 const_iterator begin() const
3830 return const_iterator(_seq, 0);
3835 return iterator(_seq, size());
3838 const_iterator end() const
3840 return const_iterator(_seq, size());
3843 reference operator[](difference_type n)
3845 return reference(_seq, n);
3848 const_reference operator[](difference_type n) const
3850 return const_reference(_seq, n);
3853 bool check(bool set_err = true) const
3856 for (int i = 0; i < s; ++i) {
3857 swig::PyObject_var item = PySequence_GetItem(_seq, i);
3858 if (!swig::check<value_type>(item)) {
3861 sprintf(msg, "in sequence element %d", i);
3862 SWIG_Error(SWIG_RuntimeError, msg);
3877 SWIGINTERNINLINE PyObject *
3878 SWIG_From_int (int value)
3880 return SWIG_From_long (value);
3884 #include "howto_square_ff.h"
3885 #include "howto_square2_ff.h"
3888 SWIGINTERNINLINE PyObject*
3889 SWIG_From_unsigned_SS_long (unsigned long value)
3891 return (value > LONG_MAX) ?
3892 PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
3896 SWIGINTERNINLINE PyObject *
3897 SWIG_From_unsigned_SS_int (unsigned int value)
3899 return SWIG_From_unsigned_SS_long (value);
3903 #define SWIG_From_double PyFloat_FromDouble
3906 SWIGINTERN swig_type_info*
3907 SWIG_pchar_descriptor(void)
3909 static int init = 0;
3910 static swig_type_info* info = 0;
3912 info = SWIG_TypeQuery("_p_char");
3919 SWIGINTERNINLINE PyObject *
3920 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
3923 if (size > INT_MAX) {
3924 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3925 return pchar_descriptor ?
3926 SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
3928 return PyString_FromStringAndSize(carray, static_cast< int >(size));
3931 return SWIG_Py_Void();
3936 SWIGINTERNINLINE PyObject *
3937 SWIG_From_std_string (const std::string& s)
3940 return SWIG_FromCharPtrAndSize(s.data(), s.size());
3942 return SWIG_FromCharPtrAndSize(s.c_str(), 0);
3948 #if !defined(SWIG_NO_LLONG_MAX)
3949 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3950 # define LLONG_MAX __LONG_LONG_MAX__
3951 # define LLONG_MIN (-LLONG_MAX - 1LL)
3952 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3958 SWIG_AsVal_int (PyObject * obj, int *val)
3961 int res = SWIG_AsVal_long (obj, &v);
3962 if (SWIG_IsOK(res)) {
3963 if ((v < INT_MIN || v > INT_MAX)) {
3964 return SWIG_OverflowError;
3966 if (val) *val = static_cast< int >(v);
3975 SWIGINTERN PyObject *_wrap_delete_PySwigIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3976 PyObject *resultobj = 0;
3977 swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ;
3980 PyObject * obj0 = 0 ;
3982 if(!PyArg_UnpackTuple(args,(char *)"delete_PySwigIterator",1,1,&obj0)) SWIG_fail;
3983 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_DISOWN | 0 );
3984 if (!SWIG_IsOK(res1)) {
3985 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PySwigIterator" "', argument " "1"" of type '" "swig::PySwigIterator *""'");
3987 arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1);
3989 resultobj = SWIG_Py_Void();
3996 SWIGINTERN PyObject *_wrap_PySwigIterator_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3997 PyObject *resultobj = 0;
3998 swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ;
4001 PyObject * obj0 = 0 ;
4002 PyObject *result = 0 ;
4004 if(!PyArg_UnpackTuple(args,(char *)"PySwigIterator_value",1,1,&obj0)) SWIG_fail;
4005 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 );
4006 if (!SWIG_IsOK(res1)) {
4007 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator_value" "', argument " "1"" of type '" "swig::PySwigIterator const *""'");
4009 arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1);
4011 result = (PyObject *)((swig::PySwigIterator const *)arg1)->value();
4013 catch(swig::stop_iteration &_e) {
4016 SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
4028 SWIGINTERN PyObject *_wrap_PySwigIterator_incr(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
4029 PyObject *resultobj = 0;
4030 swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ;
4031 size_t arg2 = (size_t) 1 ;
4036 PyObject * obj0 = 0 ;
4037 PyObject * obj1 = 0 ;
4038 char * kwnames[] = {
4039 (char *) "self",(char *) "n", NULL
4041 swig::PySwigIterator *result = 0 ;
4043 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:PySwigIterator_incr",kwnames,&obj0,&obj1)) SWIG_fail;
4044 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 );
4045 if (!SWIG_IsOK(res1)) {
4046 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator_incr" "', argument " "1"" of type '" "swig::PySwigIterator *""'");
4048 arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1);
4050 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4051 if (!SWIG_IsOK(ecode2)) {
4052 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PySwigIterator_incr" "', argument " "2"" of type '" "size_t""'");
4054 arg2 = static_cast< size_t >(val2);
4057 result = (swig::PySwigIterator *)(arg1)->incr(arg2);
4059 catch(swig::stop_iteration &_e) {
4062 SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
4067 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, 0 | 0 );
4074 SWIGINTERN PyObject *_wrap_PySwigIterator_decr(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
4075 PyObject *resultobj = 0;
4076 swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ;
4077 size_t arg2 = (size_t) 1 ;
4082 PyObject * obj0 = 0 ;
4083 PyObject * obj1 = 0 ;
4084 char * kwnames[] = {
4085 (char *) "self",(char *) "n", NULL
4087 swig::PySwigIterator *result = 0 ;
4089 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:PySwigIterator_decr",kwnames,&obj0,&obj1)) SWIG_fail;
4090 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 );
4091 if (!SWIG_IsOK(res1)) {
4092 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator_decr" "', argument " "1"" of type '" "swig::PySwigIterator *""'");
4094 arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1);
4096 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4097 if (!SWIG_IsOK(ecode2)) {
4098 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PySwigIterator_decr" "', argument " "2"" of type '" "size_t""'");
4100 arg2 = static_cast< size_t >(val2);
4103 result = (swig::PySwigIterator *)(arg1)->decr(arg2);
4105 catch(swig::stop_iteration &_e) {
4108 SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
4113 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, 0 | 0 );
4120 SWIGINTERN PyObject *_wrap_PySwigIterator_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
4121 PyObject *resultobj = 0;
4122 swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ;
4123 swig::PySwigIterator *arg2 = 0 ;
4128 PyObject * obj0 = 0 ;
4129 PyObject * obj1 = 0 ;
4130 char * kwnames[] = {
4131 (char *) "self",(char *) "x", NULL
4135 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PySwigIterator_distance",kwnames,&obj0,&obj1)) SWIG_fail;
4136 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 );
4137 if (!SWIG_IsOK(res1)) {
4138 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator_distance" "', argument " "1"" of type '" "swig::PySwigIterator const *""'");
4140 arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1);
4141 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__PySwigIterator, 0 | 0);
4142 if (!SWIG_IsOK(res2)) {
4143 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PySwigIterator_distance" "', argument " "2"" of type '" "swig::PySwigIterator const &""'");
4146 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PySwigIterator_distance" "', argument " "2"" of type '" "swig::PySwigIterator const &""'");
4148 arg2 = reinterpret_cast< swig::PySwigIterator * >(argp2);
4150 result = ((swig::PySwigIterator const *)arg1)->distance((swig::PySwigIterator const &)*arg2);
4152 catch(std::invalid_argument &_e) {
4153 SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail;
4156 resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
4163 SWIGINTERN PyObject *_wrap_PySwigIterator_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
4164 PyObject *resultobj = 0;
4165 swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ;
4166 swig::PySwigIterator *arg2 = 0 ;
4171 PyObject * obj0 = 0 ;
4172 PyObject * obj1 = 0 ;
4173 char * kwnames[] = {
4174 (char *) "self",(char *) "x", NULL
4178 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PySwigIterator_equal",kwnames,&obj0,&obj1)) SWIG_fail;
4179 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 );
4180 if (!SWIG_IsOK(res1)) {
4181 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator_equal" "', argument " "1"" of type '" "swig::PySwigIterator const *""'");
4183 arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1);
4184 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__PySwigIterator, 0 | 0);
4185 if (!SWIG_IsOK(res2)) {
4186 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PySwigIterator_equal" "', argument " "2"" of type '" "swig::PySwigIterator const &""'");
4189 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PySwigIterator_equal" "', argument " "2"" of type '" "swig::PySwigIterator const &""'");
4191 arg2 = reinterpret_cast< swig::PySwigIterator * >(argp2);
4193 result = (bool)((swig::PySwigIterator const *)arg1)->equal((swig::PySwigIterator const &)*arg2);
4195 catch(std::invalid_argument &_e) {
4196 SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail;
4199 resultobj = SWIG_From_bool(static_cast< bool >(result));
4206 SWIGINTERN PyObject *_wrap_PySwigIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4207 PyObject *resultobj = 0;
4208 swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ;
4211 PyObject * obj0 = 0 ;
4212 swig::PySwigIterator *result = 0 ;
4214 if(!PyArg_UnpackTuple(args,(char *)"PySwigIterator_copy",1,1,&obj0)) SWIG_fail;
4215 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 );
4216 if (!SWIG_IsOK(res1)) {
4217 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator_copy" "', argument " "1"" of type '" "swig::PySwigIterator const *""'");
4219 arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1);
4220 result = (swig::PySwigIterator *)((swig::PySwigIterator const *)arg1)->copy();
4221 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_OWN | 0 );
4228 SWIGINTERN PyObject *_wrap_PySwigIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4229 PyObject *resultobj = 0;
4230 swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ;
4233 PyObject * obj0 = 0 ;
4234 PyObject *result = 0 ;
4236 if(!PyArg_UnpackTuple(args,(char *)"PySwigIterator_next",1,1,&obj0)) SWIG_fail;
4237 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 );
4238 if (!SWIG_IsOK(res1)) {
4239 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator_next" "', argument " "1"" of type '" "swig::PySwigIterator *""'");
4241 arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1);
4243 result = (PyObject *)(arg1)->next();
4245 catch(swig::stop_iteration &_e) {
4248 SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
4260 SWIGINTERN PyObject *_wrap_PySwigIterator_previous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4261 PyObject *resultobj = 0;
4262 swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ;
4265 PyObject * obj0 = 0 ;
4266 PyObject *result = 0 ;
4268 if(!PyArg_UnpackTuple(args,(char *)"PySwigIterator_previous",1,1,&obj0)) SWIG_fail;
4269 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 );
4270 if (!SWIG_IsOK(res1)) {
4271 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator_previous" "', argument " "1"" of type '" "swig::PySwigIterator *""'");
4273 arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1);
4275 result = (PyObject *)(arg1)->previous();
4277 catch(swig::stop_iteration &_e) {
4280 SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
4292 SWIGINTERN PyObject *_wrap_PySwigIterator_advance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
4293 PyObject *resultobj = 0;
4294 swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ;
4300 PyObject * obj0 = 0 ;
4301 PyObject * obj1 = 0 ;
4302 char * kwnames[] = {
4303 (char *) "self",(char *) "n", NULL
4305 swig::PySwigIterator *result = 0 ;
4307 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PySwigIterator_advance",kwnames,&obj0,&obj1)) SWIG_fail;
4308 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 );
4309 if (!SWIG_IsOK(res1)) {
4310 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator_advance" "', argument " "1"" of type '" "swig::PySwigIterator *""'");
4312 arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1);
4313 ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
4314 if (!SWIG_IsOK(ecode2)) {
4315 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PySwigIterator_advance" "', argument " "2"" of type '" "ptrdiff_t""'");
4317 arg2 = static_cast< ptrdiff_t >(val2);
4319 result = (swig::PySwigIterator *)(arg1)->advance(arg2);
4321 catch(swig::stop_iteration &_e) {
4324 SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
4329 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, 0 | 0 );
4336 SWIGINTERN PyObject *_wrap_PySwigIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
4337 PyObject *resultobj = 0;
4338 swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ;
4339 swig::PySwigIterator *arg2 = 0 ;
4344 PyObject * obj0 = 0 ;
4345 PyObject * obj1 = 0 ;
4346 char * kwnames[] = {
4347 (char *) "self",(char *) "x", NULL
4351 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PySwigIterator___eq__",kwnames,&obj0,&obj1)) SWIG_fail;
4352 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 );
4353 if (!SWIG_IsOK(res1)) {
4354 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator___eq__" "', argument " "1"" of type '" "swig::PySwigIterator const *""'");
4356 arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1);
4357 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__PySwigIterator, 0 | 0);
4358 if (!SWIG_IsOK(res2)) {
4359 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PySwigIterator___eq__" "', argument " "2"" of type '" "swig::PySwigIterator const &""'");
4362 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PySwigIterator___eq__" "', argument " "2"" of type '" "swig::PySwigIterator const &""'");
4364 arg2 = reinterpret_cast< swig::PySwigIterator * >(argp2);
4365 result = (bool)((swig::PySwigIterator const *)arg1)->operator ==((swig::PySwigIterator const &)*arg2);
4366 resultobj = SWIG_From_bool(static_cast< bool >(result));
4373 SWIGINTERN PyObject *_wrap_PySwigIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
4374 PyObject *resultobj = 0;
4375 swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ;
4376 swig::PySwigIterator *arg2 = 0 ;
4381 PyObject * obj0 = 0 ;
4382 PyObject * obj1 = 0 ;
4383 char * kwnames[] = {
4384 (char *) "self",(char *) "x", NULL
4388 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PySwigIterator___ne__",kwnames,&obj0,&obj1)) SWIG_fail;
4389 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 );
4390 if (!SWIG_IsOK(res1)) {
4391 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator___ne__" "', argument " "1"" of type '" "swig::PySwigIterator const *""'");
4393 arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1);
4394 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__PySwigIterator, 0 | 0);
4395 if (!SWIG_IsOK(res2)) {
4396 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PySwigIterator___ne__" "', argument " "2"" of type '" "swig::PySwigIterator const &""'");
4399 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PySwigIterator___ne__" "', argument " "2"" of type '" "swig::PySwigIterator const &""'");
4401 arg2 = reinterpret_cast< swig::PySwigIterator * >(argp2);
4402 result = (bool)((swig::PySwigIterator const *)arg1)->operator !=((swig::PySwigIterator const &)*arg2);
4403 resultobj = SWIG_From_bool(static_cast< bool >(result));
4410 SWIGINTERN PyObject *_wrap_PySwigIterator___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
4411 PyObject *resultobj = 0;
4412 swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ;
4418 PyObject * obj0 = 0 ;
4419 PyObject * obj1 = 0 ;
4420 char * kwnames[] = {
4421 (char *) "self",(char *) "n", NULL
4423 swig::PySwigIterator *result = 0 ;
4425 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PySwigIterator___iadd__",kwnames,&obj0,&obj1)) SWIG_fail;
4426 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_DISOWN | 0 );
4427 if (!SWIG_IsOK(res1)) {
4428 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator___iadd__" "', argument " "1"" of type '" "swig::PySwigIterator *""'");
4430 arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1);
4431 ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
4432 if (!SWIG_IsOK(ecode2)) {
4433 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PySwigIterator___iadd__" "', argument " "2"" of type '" "ptrdiff_t""'");
4435 arg2 = static_cast< ptrdiff_t >(val2);
4438 swig::PySwigIterator &_result_ref = (arg1)->operator +=(arg2);
4439 result = (swig::PySwigIterator *) &_result_ref;
4442 catch(swig::stop_iteration &_e) {
4445 SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
4450 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_OWN | 0 );
4457 SWIGINTERN PyObject *_wrap_PySwigIterator___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
4458 PyObject *resultobj = 0;
4459 swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ;
4465 PyObject * obj0 = 0 ;
4466 PyObject * obj1 = 0 ;
4467 char * kwnames[] = {
4468 (char *) "self",(char *) "n", NULL
4470 swig::PySwigIterator *result = 0 ;
4472 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PySwigIterator___isub__",kwnames,&obj0,&obj1)) SWIG_fail;
4473 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_DISOWN | 0 );
4474 if (!SWIG_IsOK(res1)) {
4475 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator___isub__" "', argument " "1"" of type '" "swig::PySwigIterator *""'");
4477 arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1);
4478 ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
4479 if (!SWIG_IsOK(ecode2)) {
4480 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PySwigIterator___isub__" "', argument " "2"" of type '" "ptrdiff_t""'");
4482 arg2 = static_cast< ptrdiff_t >(val2);
4485 swig::PySwigIterator &_result_ref = (arg1)->operator -=(arg2);
4486 result = (swig::PySwigIterator *) &_result_ref;
4489 catch(swig::stop_iteration &_e) {
4492 SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
4497 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_OWN | 0 );
4504 SWIGINTERN PyObject *_wrap_PySwigIterator___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
4505 PyObject *resultobj = 0;
4506 swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ;
4512 PyObject * obj0 = 0 ;
4513 PyObject * obj1 = 0 ;
4514 char * kwnames[] = {
4515 (char *) "self",(char *) "n", NULL
4517 swig::PySwigIterator *result = 0 ;
4519 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PySwigIterator___add__",kwnames,&obj0,&obj1)) SWIG_fail;
4520 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 );
4521 if (!SWIG_IsOK(res1)) {
4522 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator___add__" "', argument " "1"" of type '" "swig::PySwigIterator const *""'");
4524 arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1);
4525 ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
4526 if (!SWIG_IsOK(ecode2)) {
4527 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PySwigIterator___add__" "', argument " "2"" of type '" "ptrdiff_t""'");
4529 arg2 = static_cast< ptrdiff_t >(val2);
4531 result = (swig::PySwigIterator *)((swig::PySwigIterator const *)arg1)->operator +(arg2);
4533 catch(swig::stop_iteration &_e) {
4536 SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
4541 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_OWN | 0 );
4548 SWIGINTERN PyObject *_wrap_PySwigIterator___sub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4549 PyObject *resultobj = 0;
4550 swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ;
4556 PyObject * obj0 = 0 ;
4557 PyObject * obj1 = 0 ;
4558 swig::PySwigIterator *result = 0 ;
4560 if(!PyArg_UnpackTuple(args,(char *)"PySwigIterator___sub__",2,2,&obj0,&obj1)) SWIG_fail;
4561 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 );
4562 if (!SWIG_IsOK(res1)) {
4563 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator___sub__" "', argument " "1"" of type '" "swig::PySwigIterator const *""'");
4565 arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1);
4566 ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
4567 if (!SWIG_IsOK(ecode2)) {
4568 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PySwigIterator___sub__" "', argument " "2"" of type '" "ptrdiff_t""'");
4570 arg2 = static_cast< ptrdiff_t >(val2);
4572 result = (swig::PySwigIterator *)((swig::PySwigIterator const *)arg1)->operator -(arg2);
4574 catch(swig::stop_iteration &_e) {
4577 SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
4582 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_OWN | 0 );
4589 SWIGINTERN PyObject *_wrap_PySwigIterator___sub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4590 PyObject *resultobj = 0;
4591 swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ;
4592 swig::PySwigIterator *arg2 = 0 ;
4597 PyObject * obj0 = 0 ;
4598 PyObject * obj1 = 0 ;
4601 if(!PyArg_UnpackTuple(args,(char *)"PySwigIterator___sub__",2,2,&obj0,&obj1)) SWIG_fail;
4602 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 );
4603 if (!SWIG_IsOK(res1)) {
4604 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator___sub__" "', argument " "1"" of type '" "swig::PySwigIterator const *""'");
4606 arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1);
4607 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__PySwigIterator, 0 | 0);
4608 if (!SWIG_IsOK(res2)) {
4609 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PySwigIterator___sub__" "', argument " "2"" of type '" "swig::PySwigIterator const &""'");
4612 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PySwigIterator___sub__" "', argument " "2"" of type '" "swig::PySwigIterator const &""'");
4614 arg2 = reinterpret_cast< swig::PySwigIterator * >(argp2);
4615 result = ((swig::PySwigIterator const *)arg1)->operator -((swig::PySwigIterator const &)*arg2);
4616 resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
4623 SWIGINTERN PyObject *_wrap_PySwigIterator___sub__(PyObject *self, PyObject *args) {
4628 if (!PyTuple_Check(args)) SWIG_fail;
4629 argc = (int)PyObject_Length(args);
4630 for (ii = 0; (ii < argc) && (ii < 2); ii++) {
4631 argv[ii] = PyTuple_GET_ITEM(args,ii);
4636 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__PySwigIterator, 0);
4637 _v = SWIG_CheckState(res);
4639 int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_swig__PySwigIterator, 0);
4640 _v = SWIG_CheckState(res);
4642 return _wrap_PySwigIterator___sub____SWIG_1(self, args);
4649 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__PySwigIterator, 0);
4650 _v = SWIG_CheckState(res);
4653 int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
4654 _v = SWIG_CheckState(res);
4657 return _wrap_PySwigIterator___sub____SWIG_0(self, args);
4663 Py_INCREF(Py_NotImplemented);
4664 return Py_NotImplemented;
4668 SWIGINTERN PyObject *PySwigIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4670 if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
4671 SWIG_TypeNewClientData(SWIGTYPE_p_swig__PySwigIterator, SWIG_NewClientData(obj));
4672 return SWIG_Py_Void();
4675 SWIGINTERN PyObject *_wrap_new_howto_square_ff_sptr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4676 PyObject *resultobj = 0;
4677 boost::shared_ptr< howto_square_ff > *result = 0 ;
4679 if(!PyArg_UnpackTuple(args,(char *)"new_howto_square_ff_sptr",0,0)) SWIG_fail;
4680 result = (boost::shared_ptr< howto_square_ff > *)new boost::shared_ptr< howto_square_ff >();
4681 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_howto_square_ff_t, SWIG_POINTER_NEW | 0 );
4688 SWIGINTERN PyObject *_wrap_new_howto_square_ff_sptr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4689 PyObject *resultobj = 0;
4690 howto_square_ff *arg1 = (howto_square_ff *) 0 ;
4693 PyObject * obj0 = 0 ;
4694 boost::shared_ptr< howto_square_ff > *result = 0 ;
4696 if(!PyArg_UnpackTuple(args,(char *)"new_howto_square_ff_sptr",1,1,&obj0)) SWIG_fail;
4697 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_howto_square_ff, 0 | 0 );
4698 if (!SWIG_IsOK(res1)) {
4699 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_howto_square_ff_sptr" "', argument " "1"" of type '" "howto_square_ff *""'");
4701 arg1 = reinterpret_cast< howto_square_ff * >(argp1);
4702 result = (boost::shared_ptr< howto_square_ff > *)new boost::shared_ptr< howto_square_ff >(arg1);
4703 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_howto_square_ff_t, SWIG_POINTER_NEW | 0 );
4710 SWIGINTERN PyObject *_wrap_new_howto_square_ff_sptr(PyObject *self, PyObject *args) {
4715 if (!PyTuple_Check(args)) SWIG_fail;
4716 argc = (int)PyObject_Length(args);
4717 for (ii = 0; (ii < argc) && (ii < 1); ii++) {
4718 argv[ii] = PyTuple_GET_ITEM(args,ii);
4721 return _wrap_new_howto_square_ff_sptr__SWIG_0(self, args);
4726 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_howto_square_ff, 0);
4727 _v = SWIG_CheckState(res);
4729 return _wrap_new_howto_square_ff_sptr__SWIG_1(self, args);
4734 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_howto_square_ff_sptr'.\n"
4735 " Possible C/C++ prototypes are:\n"
4736 " boost::shared_ptr< howto_square_ff >()\n"
4737 " boost::shared_ptr< howto_square_ff >(howto_square_ff *)\n");
4742 SWIGINTERN PyObject *_wrap_howto_square_ff_sptr___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4743 PyObject *resultobj = 0;
4744 boost::shared_ptr< howto_square_ff > *arg1 = (boost::shared_ptr< howto_square_ff > *) 0 ;
4747 PyObject * obj0 = 0 ;
4748 howto_square_ff *result = 0 ;
4750 if(!PyArg_UnpackTuple(args,(char *)"howto_square_ff_sptr___deref__",1,1,&obj0)) SWIG_fail;
4751 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square_ff_t, 0 | 0 );
4752 if (!SWIG_IsOK(res1)) {
4753 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square_ff_sptr___deref__" "', argument " "1"" of type '" "boost::shared_ptr< howto_square_ff > *""'");
4755 arg1 = reinterpret_cast< boost::shared_ptr< howto_square_ff > * >(argp1);
4756 result = (howto_square_ff *)(arg1)->operator ->();
4757 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_howto_square_ff, 0 | 0 );
4764 SWIGINTERN PyObject *_wrap_delete_howto_square_ff_sptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4765 PyObject *resultobj = 0;
4766 boost::shared_ptr< howto_square_ff > *arg1 = (boost::shared_ptr< howto_square_ff > *) 0 ;
4769 PyObject * obj0 = 0 ;
4771 if(!PyArg_UnpackTuple(args,(char *)"delete_howto_square_ff_sptr",1,1,&obj0)) SWIG_fail;
4772 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square_ff_t, SWIG_POINTER_DISOWN | 0 );
4773 if (!SWIG_IsOK(res1)) {
4774 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_howto_square_ff_sptr" "', argument " "1"" of type '" "boost::shared_ptr< howto_square_ff > *""'");
4776 arg1 = reinterpret_cast< boost::shared_ptr< howto_square_ff > * >(argp1);
4778 resultobj = SWIG_Py_Void();
4785 SWIGINTERN PyObject *_wrap_howto_square_ff_sptr_history(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4786 PyObject *resultobj = 0;
4787 boost::shared_ptr< howto_square_ff > *arg1 = (boost::shared_ptr< howto_square_ff > *) 0 ;
4790 PyObject * obj0 = 0 ;
4791 unsigned int result;
4793 if(!PyArg_UnpackTuple(args,(char *)"howto_square_ff_sptr_history",1,1,&obj0)) SWIG_fail;
4794 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square_ff_t, 0 | 0 );
4795 if (!SWIG_IsOK(res1)) {
4796 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square_ff_sptr_history" "', argument " "1"" of type '" "boost::shared_ptr< howto_square_ff > const *""'");
4798 arg1 = reinterpret_cast< boost::shared_ptr< howto_square_ff > * >(argp1);
4799 result = (unsigned int)(*arg1)->history();
4800 resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
4807 SWIGINTERN PyObject *_wrap_howto_square_ff_sptr_output_multiple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4808 PyObject *resultobj = 0;
4809 boost::shared_ptr< howto_square_ff > *arg1 = (boost::shared_ptr< howto_square_ff > *) 0 ;
4812 PyObject * obj0 = 0 ;
4815 if(!PyArg_UnpackTuple(args,(char *)"howto_square_ff_sptr_output_multiple",1,1,&obj0)) SWIG_fail;
4816 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square_ff_t, 0 | 0 );
4817 if (!SWIG_IsOK(res1)) {
4818 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square_ff_sptr_output_multiple" "', argument " "1"" of type '" "boost::shared_ptr< howto_square_ff > const *""'");
4820 arg1 = reinterpret_cast< boost::shared_ptr< howto_square_ff > * >(argp1);
4821 result = (int)(*arg1)->output_multiple();
4822 resultobj = SWIG_From_int(static_cast< int >(result));
4829 SWIGINTERN PyObject *_wrap_howto_square_ff_sptr_relative_rate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4830 PyObject *resultobj = 0;
4831 boost::shared_ptr< howto_square_ff > *arg1 = (boost::shared_ptr< howto_square_ff > *) 0 ;
4834 PyObject * obj0 = 0 ;
4837 if(!PyArg_UnpackTuple(args,(char *)"howto_square_ff_sptr_relative_rate",1,1,&obj0)) SWIG_fail;
4838 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square_ff_t, 0 | 0 );
4839 if (!SWIG_IsOK(res1)) {
4840 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square_ff_sptr_relative_rate" "', argument " "1"" of type '" "boost::shared_ptr< howto_square_ff > const *""'");
4842 arg1 = reinterpret_cast< boost::shared_ptr< howto_square_ff > * >(argp1);
4843 result = (double)(*arg1)->relative_rate();
4844 resultobj = SWIG_From_double(static_cast< double >(result));
4851 SWIGINTERN PyObject *_wrap_howto_square_ff_sptr_start(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4852 PyObject *resultobj = 0;
4853 boost::shared_ptr< howto_square_ff > *arg1 = (boost::shared_ptr< howto_square_ff > *) 0 ;
4856 PyObject * obj0 = 0 ;
4859 if(!PyArg_UnpackTuple(args,(char *)"howto_square_ff_sptr_start",1,1,&obj0)) SWIG_fail;
4860 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square_ff_t, 0 | 0 );
4861 if (!SWIG_IsOK(res1)) {
4862 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square_ff_sptr_start" "', argument " "1"" of type '" "boost::shared_ptr< howto_square_ff > *""'");
4864 arg1 = reinterpret_cast< boost::shared_ptr< howto_square_ff > * >(argp1);
4865 result = (bool)(*arg1)->start();
4866 resultobj = SWIG_From_bool(static_cast< bool >(result));
4873 SWIGINTERN PyObject *_wrap_howto_square_ff_sptr_stop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4874 PyObject *resultobj = 0;
4875 boost::shared_ptr< howto_square_ff > *arg1 = (boost::shared_ptr< howto_square_ff > *) 0 ;
4878 PyObject * obj0 = 0 ;
4881 if(!PyArg_UnpackTuple(args,(char *)"howto_square_ff_sptr_stop",1,1,&obj0)) SWIG_fail;
4882 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square_ff_t, 0 | 0 );
4883 if (!SWIG_IsOK(res1)) {
4884 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square_ff_sptr_stop" "', argument " "1"" of type '" "boost::shared_ptr< howto_square_ff > *""'");
4886 arg1 = reinterpret_cast< boost::shared_ptr< howto_square_ff > * >(argp1);
4887 result = (bool)(*arg1)->stop();
4888 resultobj = SWIG_From_bool(static_cast< bool >(result));
4895 SWIGINTERN PyObject *_wrap_howto_square_ff_sptr_detail(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4896 PyObject *resultobj = 0;
4897 boost::shared_ptr< howto_square_ff > *arg1 = (boost::shared_ptr< howto_square_ff > *) 0 ;
4900 PyObject * obj0 = 0 ;
4901 gr_block_detail_sptr result;
4903 if(!PyArg_UnpackTuple(args,(char *)"howto_square_ff_sptr_detail",1,1,&obj0)) SWIG_fail;
4904 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square_ff_t, 0 | 0 );
4905 if (!SWIG_IsOK(res1)) {
4906 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square_ff_sptr_detail" "', argument " "1"" of type '" "boost::shared_ptr< howto_square_ff > const *""'");
4908 arg1 = reinterpret_cast< boost::shared_ptr< howto_square_ff > * >(argp1);
4909 result = (*arg1)->detail();
4910 resultobj = SWIG_NewPointerObj((new gr_block_detail_sptr(static_cast< const gr_block_detail_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_block_detail_t, SWIG_POINTER_OWN | 0 );
4917 SWIGINTERN PyObject *_wrap_howto_square_ff_sptr_set_detail(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
4918 PyObject *resultobj = 0;
4919 boost::shared_ptr< howto_square_ff > *arg1 = (boost::shared_ptr< howto_square_ff > *) 0 ;
4920 gr_block_detail_sptr arg2 ;
4925 PyObject * obj0 = 0 ;
4926 PyObject * obj1 = 0 ;
4927 char * kwnames[] = {
4928 (char *) "self",(char *) "detail", NULL
4931 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:howto_square_ff_sptr_set_detail",kwnames,&obj0,&obj1)) SWIG_fail;
4932 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square_ff_t, 0 | 0 );
4933 if (!SWIG_IsOK(res1)) {
4934 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square_ff_sptr_set_detail" "', argument " "1"" of type '" "boost::shared_ptr< howto_square_ff > *""'");
4936 arg1 = reinterpret_cast< boost::shared_ptr< howto_square_ff > * >(argp1);
4938 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_boost__shared_ptrT_gr_block_detail_t, 0 | 0);
4939 if (!SWIG_IsOK(res2)) {
4940 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "howto_square_ff_sptr_set_detail" "', argument " "2"" of type '" "gr_block_detail_sptr""'");
4943 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "howto_square_ff_sptr_set_detail" "', argument " "2"" of type '" "gr_block_detail_sptr""'");
4945 gr_block_detail_sptr * temp = reinterpret_cast< gr_block_detail_sptr * >(argp2);
4947 if (SWIG_IsNewObj(res2)) delete temp;
4950 (*arg1)->set_detail(arg2);
4951 resultobj = SWIG_Py_Void();
4958 SWIGINTERN PyObject *_wrap_howto_square_ff_sptr_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4959 PyObject *resultobj = 0;
4960 boost::shared_ptr< howto_square_ff > *arg1 = (boost::shared_ptr< howto_square_ff > *) 0 ;
4963 PyObject * obj0 = 0 ;
4966 if(!PyArg_UnpackTuple(args,(char *)"howto_square_ff_sptr_name",1,1,&obj0)) SWIG_fail;
4967 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square_ff_t, 0 | 0 );
4968 if (!SWIG_IsOK(res1)) {
4969 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square_ff_sptr_name" "', argument " "1"" of type '" "boost::shared_ptr< howto_square_ff > const *""'");
4971 arg1 = reinterpret_cast< boost::shared_ptr< howto_square_ff > * >(argp1);
4972 result = (*arg1)->name();
4973 resultobj = SWIG_From_std_string(static_cast< std::string >(result));
4980 SWIGINTERN PyObject *_wrap_howto_square_ff_sptr_input_signature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4981 PyObject *resultobj = 0;
4982 boost::shared_ptr< howto_square_ff > *arg1 = (boost::shared_ptr< howto_square_ff > *) 0 ;
4985 PyObject * obj0 = 0 ;
4986 gr_io_signature_sptr result;
4988 if(!PyArg_UnpackTuple(args,(char *)"howto_square_ff_sptr_input_signature",1,1,&obj0)) SWIG_fail;
4989 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square_ff_t, 0 | 0 );
4990 if (!SWIG_IsOK(res1)) {
4991 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square_ff_sptr_input_signature" "', argument " "1"" of type '" "boost::shared_ptr< howto_square_ff > const *""'");
4993 arg1 = reinterpret_cast< boost::shared_ptr< howto_square_ff > * >(argp1);
4994 result = (*arg1)->input_signature();
4995 resultobj = SWIG_NewPointerObj((new gr_io_signature_sptr(static_cast< const gr_io_signature_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_io_signature_t, SWIG_POINTER_OWN | 0 );
5002 SWIGINTERN PyObject *_wrap_howto_square_ff_sptr_output_signature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5003 PyObject *resultobj = 0;
5004 boost::shared_ptr< howto_square_ff > *arg1 = (boost::shared_ptr< howto_square_ff > *) 0 ;
5007 PyObject * obj0 = 0 ;
5008 gr_io_signature_sptr result;
5010 if(!PyArg_UnpackTuple(args,(char *)"howto_square_ff_sptr_output_signature",1,1,&obj0)) SWIG_fail;
5011 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square_ff_t, 0 | 0 );
5012 if (!SWIG_IsOK(res1)) {
5013 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square_ff_sptr_output_signature" "', argument " "1"" of type '" "boost::shared_ptr< howto_square_ff > const *""'");
5015 arg1 = reinterpret_cast< boost::shared_ptr< howto_square_ff > * >(argp1);
5016 result = (*arg1)->output_signature();
5017 resultobj = SWIG_NewPointerObj((new gr_io_signature_sptr(static_cast< const gr_io_signature_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_io_signature_t, SWIG_POINTER_OWN | 0 );
5024 SWIGINTERN PyObject *_wrap_howto_square_ff_sptr_unique_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5025 PyObject *resultobj = 0;
5026 boost::shared_ptr< howto_square_ff > *arg1 = (boost::shared_ptr< howto_square_ff > *) 0 ;
5029 PyObject * obj0 = 0 ;
5032 if(!PyArg_UnpackTuple(args,(char *)"howto_square_ff_sptr_unique_id",1,1,&obj0)) SWIG_fail;
5033 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square_ff_t, 0 | 0 );
5034 if (!SWIG_IsOK(res1)) {
5035 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square_ff_sptr_unique_id" "', argument " "1"" of type '" "boost::shared_ptr< howto_square_ff > const *""'");
5037 arg1 = reinterpret_cast< boost::shared_ptr< howto_square_ff > * >(argp1);
5038 result = (long)(*arg1)->unique_id();
5039 resultobj = SWIG_From_long(static_cast< long >(result));
5046 SWIGINTERN PyObject *_wrap_howto_square_ff_sptr_basic_block(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5047 PyObject *resultobj = 0;
5048 boost::shared_ptr< howto_square_ff > *arg1 = (boost::shared_ptr< howto_square_ff > *) 0 ;
5051 PyObject * obj0 = 0 ;
5052 gr_basic_block_sptr result;
5054 if(!PyArg_UnpackTuple(args,(char *)"howto_square_ff_sptr_basic_block",1,1,&obj0)) SWIG_fail;
5055 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square_ff_t, 0 | 0 );
5056 if (!SWIG_IsOK(res1)) {
5057 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square_ff_sptr_basic_block" "', argument " "1"" of type '" "boost::shared_ptr< howto_square_ff > *""'");
5059 arg1 = reinterpret_cast< boost::shared_ptr< howto_square_ff > * >(argp1);
5060 result = (*arg1)->basic_block();
5061 resultobj = SWIG_NewPointerObj((new gr_basic_block_sptr(static_cast< const gr_basic_block_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_basic_block_t, SWIG_POINTER_OWN | 0 );
5068 SWIGINTERN PyObject *_wrap_howto_square_ff_sptr_check_topology(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
5069 PyObject *resultobj = 0;
5070 boost::shared_ptr< howto_square_ff > *arg1 = (boost::shared_ptr< howto_square_ff > *) 0 ;
5079 PyObject * obj0 = 0 ;
5080 PyObject * obj1 = 0 ;
5081 PyObject * obj2 = 0 ;
5082 char * kwnames[] = {
5083 (char *) "self",(char *) "ninputs",(char *) "noutputs", NULL
5087 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:howto_square_ff_sptr_check_topology",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
5088 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square_ff_t, 0 | 0 );
5089 if (!SWIG_IsOK(res1)) {
5090 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square_ff_sptr_check_topology" "', argument " "1"" of type '" "boost::shared_ptr< howto_square_ff > *""'");
5092 arg1 = reinterpret_cast< boost::shared_ptr< howto_square_ff > * >(argp1);
5093 ecode2 = SWIG_AsVal_int(obj1, &val2);
5094 if (!SWIG_IsOK(ecode2)) {
5095 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "howto_square_ff_sptr_check_topology" "', argument " "2"" of type '" "int""'");
5097 arg2 = static_cast< int >(val2);
5098 ecode3 = SWIG_AsVal_int(obj2, &val3);
5099 if (!SWIG_IsOK(ecode3)) {
5100 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "howto_square_ff_sptr_check_topology" "', argument " "3"" of type '" "int""'");
5102 arg3 = static_cast< int >(val3);
5103 result = (bool)(*arg1)->check_topology(arg2,arg3);
5104 resultobj = SWIG_From_bool(static_cast< bool >(result));
5111 SWIGINTERN PyObject *howto_square_ff_sptr_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5113 if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
5114 SWIG_TypeNewClientData(SWIGTYPE_p_boost__shared_ptrT_howto_square_ff_t, SWIG_NewClientData(obj));
5115 return SWIG_Py_Void();
5118 SWIGINTERN PyObject *_wrap_square_ff(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5119 PyObject *resultobj = 0;
5120 howto_square_ff_sptr result;
5122 if(!PyArg_UnpackTuple(args,(char *)"square_ff",0,0)) SWIG_fail;
5123 result = howto_make_square_ff();
5124 resultobj = SWIG_NewPointerObj((new howto_square_ff_sptr(static_cast< const howto_square_ff_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_howto_square_ff_t, SWIG_POINTER_OWN | 0 );
5131 SWIGINTERN PyObject *_wrap_new_howto_square2_ff_sptr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5132 PyObject *resultobj = 0;
5133 boost::shared_ptr< howto_square2_ff > *result = 0 ;
5135 if(!PyArg_UnpackTuple(args,(char *)"new_howto_square2_ff_sptr",0,0)) SWIG_fail;
5136 result = (boost::shared_ptr< howto_square2_ff > *)new boost::shared_ptr< howto_square2_ff >();
5137 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_howto_square2_ff_t, SWIG_POINTER_NEW | 0 );
5144 SWIGINTERN PyObject *_wrap_new_howto_square2_ff_sptr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5145 PyObject *resultobj = 0;
5146 howto_square2_ff *arg1 = (howto_square2_ff *) 0 ;
5149 PyObject * obj0 = 0 ;
5150 boost::shared_ptr< howto_square2_ff > *result = 0 ;
5152 if(!PyArg_UnpackTuple(args,(char *)"new_howto_square2_ff_sptr",1,1,&obj0)) SWIG_fail;
5153 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_howto_square2_ff, 0 | 0 );
5154 if (!SWIG_IsOK(res1)) {
5155 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_howto_square2_ff_sptr" "', argument " "1"" of type '" "howto_square2_ff *""'");
5157 arg1 = reinterpret_cast< howto_square2_ff * >(argp1);
5158 result = (boost::shared_ptr< howto_square2_ff > *)new boost::shared_ptr< howto_square2_ff >(arg1);
5159 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_howto_square2_ff_t, SWIG_POINTER_NEW | 0 );
5166 SWIGINTERN PyObject *_wrap_new_howto_square2_ff_sptr(PyObject *self, PyObject *args) {
5171 if (!PyTuple_Check(args)) SWIG_fail;
5172 argc = (int)PyObject_Length(args);
5173 for (ii = 0; (ii < argc) && (ii < 1); ii++) {
5174 argv[ii] = PyTuple_GET_ITEM(args,ii);
5177 return _wrap_new_howto_square2_ff_sptr__SWIG_0(self, args);
5182 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_howto_square2_ff, 0);
5183 _v = SWIG_CheckState(res);
5185 return _wrap_new_howto_square2_ff_sptr__SWIG_1(self, args);
5190 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_howto_square2_ff_sptr'.\n"
5191 " Possible C/C++ prototypes are:\n"
5192 " boost::shared_ptr< howto_square2_ff >()\n"
5193 " boost::shared_ptr< howto_square2_ff >(howto_square2_ff *)\n");
5198 SWIGINTERN PyObject *_wrap_howto_square2_ff_sptr___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5199 PyObject *resultobj = 0;
5200 boost::shared_ptr< howto_square2_ff > *arg1 = (boost::shared_ptr< howto_square2_ff > *) 0 ;
5203 PyObject * obj0 = 0 ;
5204 howto_square2_ff *result = 0 ;
5206 if(!PyArg_UnpackTuple(args,(char *)"howto_square2_ff_sptr___deref__",1,1,&obj0)) SWIG_fail;
5207 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square2_ff_t, 0 | 0 );
5208 if (!SWIG_IsOK(res1)) {
5209 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square2_ff_sptr___deref__" "', argument " "1"" of type '" "boost::shared_ptr< howto_square2_ff > *""'");
5211 arg1 = reinterpret_cast< boost::shared_ptr< howto_square2_ff > * >(argp1);
5212 result = (howto_square2_ff *)(arg1)->operator ->();
5213 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_howto_square2_ff, 0 | 0 );
5220 SWIGINTERN PyObject *_wrap_delete_howto_square2_ff_sptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5221 PyObject *resultobj = 0;
5222 boost::shared_ptr< howto_square2_ff > *arg1 = (boost::shared_ptr< howto_square2_ff > *) 0 ;
5225 PyObject * obj0 = 0 ;
5227 if(!PyArg_UnpackTuple(args,(char *)"delete_howto_square2_ff_sptr",1,1,&obj0)) SWIG_fail;
5228 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square2_ff_t, SWIG_POINTER_DISOWN | 0 );
5229 if (!SWIG_IsOK(res1)) {
5230 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_howto_square2_ff_sptr" "', argument " "1"" of type '" "boost::shared_ptr< howto_square2_ff > *""'");
5232 arg1 = reinterpret_cast< boost::shared_ptr< howto_square2_ff > * >(argp1);
5234 resultobj = SWIG_Py_Void();
5241 SWIGINTERN PyObject *_wrap_howto_square2_ff_sptr_history(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5242 PyObject *resultobj = 0;
5243 boost::shared_ptr< howto_square2_ff > *arg1 = (boost::shared_ptr< howto_square2_ff > *) 0 ;
5246 PyObject * obj0 = 0 ;
5247 unsigned int result;
5249 if(!PyArg_UnpackTuple(args,(char *)"howto_square2_ff_sptr_history",1,1,&obj0)) SWIG_fail;
5250 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square2_ff_t, 0 | 0 );
5251 if (!SWIG_IsOK(res1)) {
5252 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square2_ff_sptr_history" "', argument " "1"" of type '" "boost::shared_ptr< howto_square2_ff > const *""'");
5254 arg1 = reinterpret_cast< boost::shared_ptr< howto_square2_ff > * >(argp1);
5255 result = (unsigned int)(*arg1)->history();
5256 resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
5263 SWIGINTERN PyObject *_wrap_howto_square2_ff_sptr_output_multiple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5264 PyObject *resultobj = 0;
5265 boost::shared_ptr< howto_square2_ff > *arg1 = (boost::shared_ptr< howto_square2_ff > *) 0 ;
5268 PyObject * obj0 = 0 ;
5271 if(!PyArg_UnpackTuple(args,(char *)"howto_square2_ff_sptr_output_multiple",1,1,&obj0)) SWIG_fail;
5272 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square2_ff_t, 0 | 0 );
5273 if (!SWIG_IsOK(res1)) {
5274 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square2_ff_sptr_output_multiple" "', argument " "1"" of type '" "boost::shared_ptr< howto_square2_ff > const *""'");
5276 arg1 = reinterpret_cast< boost::shared_ptr< howto_square2_ff > * >(argp1);
5277 result = (int)(*arg1)->output_multiple();
5278 resultobj = SWIG_From_int(static_cast< int >(result));
5285 SWIGINTERN PyObject *_wrap_howto_square2_ff_sptr_relative_rate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5286 PyObject *resultobj = 0;
5287 boost::shared_ptr< howto_square2_ff > *arg1 = (boost::shared_ptr< howto_square2_ff > *) 0 ;
5290 PyObject * obj0 = 0 ;
5293 if(!PyArg_UnpackTuple(args,(char *)"howto_square2_ff_sptr_relative_rate",1,1,&obj0)) SWIG_fail;
5294 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square2_ff_t, 0 | 0 );
5295 if (!SWIG_IsOK(res1)) {
5296 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square2_ff_sptr_relative_rate" "', argument " "1"" of type '" "boost::shared_ptr< howto_square2_ff > const *""'");
5298 arg1 = reinterpret_cast< boost::shared_ptr< howto_square2_ff > * >(argp1);
5299 result = (double)(*arg1)->relative_rate();
5300 resultobj = SWIG_From_double(static_cast< double >(result));
5307 SWIGINTERN PyObject *_wrap_howto_square2_ff_sptr_start(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5308 PyObject *resultobj = 0;
5309 boost::shared_ptr< howto_square2_ff > *arg1 = (boost::shared_ptr< howto_square2_ff > *) 0 ;
5312 PyObject * obj0 = 0 ;
5315 if(!PyArg_UnpackTuple(args,(char *)"howto_square2_ff_sptr_start",1,1,&obj0)) SWIG_fail;
5316 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square2_ff_t, 0 | 0 );
5317 if (!SWIG_IsOK(res1)) {
5318 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square2_ff_sptr_start" "', argument " "1"" of type '" "boost::shared_ptr< howto_square2_ff > *""'");
5320 arg1 = reinterpret_cast< boost::shared_ptr< howto_square2_ff > * >(argp1);
5321 result = (bool)(*arg1)->start();
5322 resultobj = SWIG_From_bool(static_cast< bool >(result));
5329 SWIGINTERN PyObject *_wrap_howto_square2_ff_sptr_stop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5330 PyObject *resultobj = 0;
5331 boost::shared_ptr< howto_square2_ff > *arg1 = (boost::shared_ptr< howto_square2_ff > *) 0 ;
5334 PyObject * obj0 = 0 ;
5337 if(!PyArg_UnpackTuple(args,(char *)"howto_square2_ff_sptr_stop",1,1,&obj0)) SWIG_fail;
5338 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square2_ff_t, 0 | 0 );
5339 if (!SWIG_IsOK(res1)) {
5340 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square2_ff_sptr_stop" "', argument " "1"" of type '" "boost::shared_ptr< howto_square2_ff > *""'");
5342 arg1 = reinterpret_cast< boost::shared_ptr< howto_square2_ff > * >(argp1);
5343 result = (bool)(*arg1)->stop();
5344 resultobj = SWIG_From_bool(static_cast< bool >(result));
5351 SWIGINTERN PyObject *_wrap_howto_square2_ff_sptr_detail(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5352 PyObject *resultobj = 0;
5353 boost::shared_ptr< howto_square2_ff > *arg1 = (boost::shared_ptr< howto_square2_ff > *) 0 ;
5356 PyObject * obj0 = 0 ;
5357 gr_block_detail_sptr result;
5359 if(!PyArg_UnpackTuple(args,(char *)"howto_square2_ff_sptr_detail",1,1,&obj0)) SWIG_fail;
5360 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square2_ff_t, 0 | 0 );
5361 if (!SWIG_IsOK(res1)) {
5362 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square2_ff_sptr_detail" "', argument " "1"" of type '" "boost::shared_ptr< howto_square2_ff > const *""'");
5364 arg1 = reinterpret_cast< boost::shared_ptr< howto_square2_ff > * >(argp1);
5365 result = (*arg1)->detail();
5366 resultobj = SWIG_NewPointerObj((new gr_block_detail_sptr(static_cast< const gr_block_detail_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_block_detail_t, SWIG_POINTER_OWN | 0 );
5373 SWIGINTERN PyObject *_wrap_howto_square2_ff_sptr_set_detail(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
5374 PyObject *resultobj = 0;
5375 boost::shared_ptr< howto_square2_ff > *arg1 = (boost::shared_ptr< howto_square2_ff > *) 0 ;
5376 gr_block_detail_sptr arg2 ;
5381 PyObject * obj0 = 0 ;
5382 PyObject * obj1 = 0 ;
5383 char * kwnames[] = {
5384 (char *) "self",(char *) "detail", NULL
5387 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:howto_square2_ff_sptr_set_detail",kwnames,&obj0,&obj1)) SWIG_fail;
5388 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square2_ff_t, 0 | 0 );
5389 if (!SWIG_IsOK(res1)) {
5390 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square2_ff_sptr_set_detail" "', argument " "1"" of type '" "boost::shared_ptr< howto_square2_ff > *""'");
5392 arg1 = reinterpret_cast< boost::shared_ptr< howto_square2_ff > * >(argp1);
5394 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_boost__shared_ptrT_gr_block_detail_t, 0 | 0);
5395 if (!SWIG_IsOK(res2)) {
5396 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "howto_square2_ff_sptr_set_detail" "', argument " "2"" of type '" "gr_block_detail_sptr""'");
5399 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "howto_square2_ff_sptr_set_detail" "', argument " "2"" of type '" "gr_block_detail_sptr""'");
5401 gr_block_detail_sptr * temp = reinterpret_cast< gr_block_detail_sptr * >(argp2);
5403 if (SWIG_IsNewObj(res2)) delete temp;
5406 (*arg1)->set_detail(arg2);
5407 resultobj = SWIG_Py_Void();
5414 SWIGINTERN PyObject *_wrap_howto_square2_ff_sptr_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5415 PyObject *resultobj = 0;
5416 boost::shared_ptr< howto_square2_ff > *arg1 = (boost::shared_ptr< howto_square2_ff > *) 0 ;
5419 PyObject * obj0 = 0 ;
5422 if(!PyArg_UnpackTuple(args,(char *)"howto_square2_ff_sptr_name",1,1,&obj0)) SWIG_fail;
5423 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square2_ff_t, 0 | 0 );
5424 if (!SWIG_IsOK(res1)) {
5425 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square2_ff_sptr_name" "', argument " "1"" of type '" "boost::shared_ptr< howto_square2_ff > const *""'");
5427 arg1 = reinterpret_cast< boost::shared_ptr< howto_square2_ff > * >(argp1);
5428 result = (*arg1)->name();
5429 resultobj = SWIG_From_std_string(static_cast< std::string >(result));
5436 SWIGINTERN PyObject *_wrap_howto_square2_ff_sptr_input_signature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5437 PyObject *resultobj = 0;
5438 boost::shared_ptr< howto_square2_ff > *arg1 = (boost::shared_ptr< howto_square2_ff > *) 0 ;
5441 PyObject * obj0 = 0 ;
5442 gr_io_signature_sptr result;
5444 if(!PyArg_UnpackTuple(args,(char *)"howto_square2_ff_sptr_input_signature",1,1,&obj0)) SWIG_fail;
5445 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square2_ff_t, 0 | 0 );
5446 if (!SWIG_IsOK(res1)) {
5447 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square2_ff_sptr_input_signature" "', argument " "1"" of type '" "boost::shared_ptr< howto_square2_ff > const *""'");
5449 arg1 = reinterpret_cast< boost::shared_ptr< howto_square2_ff > * >(argp1);
5450 result = (*arg1)->input_signature();
5451 resultobj = SWIG_NewPointerObj((new gr_io_signature_sptr(static_cast< const gr_io_signature_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_io_signature_t, SWIG_POINTER_OWN | 0 );
5458 SWIGINTERN PyObject *_wrap_howto_square2_ff_sptr_output_signature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5459 PyObject *resultobj = 0;
5460 boost::shared_ptr< howto_square2_ff > *arg1 = (boost::shared_ptr< howto_square2_ff > *) 0 ;
5463 PyObject * obj0 = 0 ;
5464 gr_io_signature_sptr result;
5466 if(!PyArg_UnpackTuple(args,(char *)"howto_square2_ff_sptr_output_signature",1,1,&obj0)) SWIG_fail;
5467 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square2_ff_t, 0 | 0 );
5468 if (!SWIG_IsOK(res1)) {
5469 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square2_ff_sptr_output_signature" "', argument " "1"" of type '" "boost::shared_ptr< howto_square2_ff > const *""'");
5471 arg1 = reinterpret_cast< boost::shared_ptr< howto_square2_ff > * >(argp1);
5472 result = (*arg1)->output_signature();
5473 resultobj = SWIG_NewPointerObj((new gr_io_signature_sptr(static_cast< const gr_io_signature_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_io_signature_t, SWIG_POINTER_OWN | 0 );
5480 SWIGINTERN PyObject *_wrap_howto_square2_ff_sptr_unique_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5481 PyObject *resultobj = 0;
5482 boost::shared_ptr< howto_square2_ff > *arg1 = (boost::shared_ptr< howto_square2_ff > *) 0 ;
5485 PyObject * obj0 = 0 ;
5488 if(!PyArg_UnpackTuple(args,(char *)"howto_square2_ff_sptr_unique_id",1,1,&obj0)) SWIG_fail;
5489 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square2_ff_t, 0 | 0 );
5490 if (!SWIG_IsOK(res1)) {
5491 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square2_ff_sptr_unique_id" "', argument " "1"" of type '" "boost::shared_ptr< howto_square2_ff > const *""'");
5493 arg1 = reinterpret_cast< boost::shared_ptr< howto_square2_ff > * >(argp1);
5494 result = (long)(*arg1)->unique_id();
5495 resultobj = SWIG_From_long(static_cast< long >(result));
5502 SWIGINTERN PyObject *_wrap_howto_square2_ff_sptr_basic_block(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5503 PyObject *resultobj = 0;
5504 boost::shared_ptr< howto_square2_ff > *arg1 = (boost::shared_ptr< howto_square2_ff > *) 0 ;
5507 PyObject * obj0 = 0 ;
5508 gr_basic_block_sptr result;
5510 if(!PyArg_UnpackTuple(args,(char *)"howto_square2_ff_sptr_basic_block",1,1,&obj0)) SWIG_fail;
5511 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square2_ff_t, 0 | 0 );
5512 if (!SWIG_IsOK(res1)) {
5513 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square2_ff_sptr_basic_block" "', argument " "1"" of type '" "boost::shared_ptr< howto_square2_ff > *""'");
5515 arg1 = reinterpret_cast< boost::shared_ptr< howto_square2_ff > * >(argp1);
5516 result = (*arg1)->basic_block();
5517 resultobj = SWIG_NewPointerObj((new gr_basic_block_sptr(static_cast< const gr_basic_block_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_basic_block_t, SWIG_POINTER_OWN | 0 );
5524 SWIGINTERN PyObject *_wrap_howto_square2_ff_sptr_check_topology(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
5525 PyObject *resultobj = 0;
5526 boost::shared_ptr< howto_square2_ff > *arg1 = (boost::shared_ptr< howto_square2_ff > *) 0 ;
5535 PyObject * obj0 = 0 ;
5536 PyObject * obj1 = 0 ;
5537 PyObject * obj2 = 0 ;
5538 char * kwnames[] = {
5539 (char *) "self",(char *) "ninputs",(char *) "noutputs", NULL
5543 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:howto_square2_ff_sptr_check_topology",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
5544 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_howto_square2_ff_t, 0 | 0 );
5545 if (!SWIG_IsOK(res1)) {
5546 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "howto_square2_ff_sptr_check_topology" "', argument " "1"" of type '" "boost::shared_ptr< howto_square2_ff > *""'");
5548 arg1 = reinterpret_cast< boost::shared_ptr< howto_square2_ff > * >(argp1);
5549 ecode2 = SWIG_AsVal_int(obj1, &val2);
5550 if (!SWIG_IsOK(ecode2)) {
5551 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "howto_square2_ff_sptr_check_topology" "', argument " "2"" of type '" "int""'");
5553 arg2 = static_cast< int >(val2);
5554 ecode3 = SWIG_AsVal_int(obj2, &val3);
5555 if (!SWIG_IsOK(ecode3)) {
5556 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "howto_square2_ff_sptr_check_topology" "', argument " "3"" of type '" "int""'");
5558 arg3 = static_cast< int >(val3);
5559 result = (bool)(*arg1)->check_topology(arg2,arg3);
5560 resultobj = SWIG_From_bool(static_cast< bool >(result));
5567 SWIGINTERN PyObject *howto_square2_ff_sptr_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5569 if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
5570 SWIG_TypeNewClientData(SWIGTYPE_p_boost__shared_ptrT_howto_square2_ff_t, SWIG_NewClientData(obj));
5571 return SWIG_Py_Void();
5574 SWIGINTERN PyObject *_wrap_square2_ff(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5575 PyObject *resultobj = 0;
5576 howto_square2_ff_sptr result;
5578 if(!PyArg_UnpackTuple(args,(char *)"square2_ff",0,0)) SWIG_fail;
5579 result = howto_make_square2_ff();
5580 resultobj = SWIG_NewPointerObj((new howto_square2_ff_sptr(static_cast< const howto_square2_ff_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_howto_square2_ff_t, SWIG_POINTER_OWN | 0 );
5587 static PyMethodDef SwigMethods[] = {
5588 { (char *)"delete_PySwigIterator", _wrap_delete_PySwigIterator, METH_VARARGS, (char *)"delete_PySwigIterator(PySwigIterator self)"},
5589 { (char *)"PySwigIterator_value", _wrap_PySwigIterator_value, METH_VARARGS, (char *)"PySwigIterator_value(PySwigIterator self) -> PyObject"},
5590 { (char *)"PySwigIterator_incr", (PyCFunction) _wrap_PySwigIterator_incr, METH_VARARGS | METH_KEYWORDS, (char *)"PySwigIterator_incr(PySwigIterator self, size_t n=1) -> PySwigIterator"},
5591 { (char *)"PySwigIterator_decr", (PyCFunction) _wrap_PySwigIterator_decr, METH_VARARGS | METH_KEYWORDS, (char *)"PySwigIterator_decr(PySwigIterator self, size_t n=1) -> PySwigIterator"},
5592 { (char *)"PySwigIterator_distance", (PyCFunction) _wrap_PySwigIterator_distance, METH_VARARGS | METH_KEYWORDS, (char *)"PySwigIterator_distance(PySwigIterator self, PySwigIterator x) -> ptrdiff_t"},
5593 { (char *)"PySwigIterator_equal", (PyCFunction) _wrap_PySwigIterator_equal, METH_VARARGS | METH_KEYWORDS, (char *)"PySwigIterator_equal(PySwigIterator self, PySwigIterator x) -> bool"},
5594 { (char *)"PySwigIterator_copy", _wrap_PySwigIterator_copy, METH_VARARGS, (char *)"PySwigIterator_copy(PySwigIterator self) -> PySwigIterator"},
5595 { (char *)"PySwigIterator_next", _wrap_PySwigIterator_next, METH_VARARGS, (char *)"PySwigIterator_next(PySwigIterator self) -> PyObject"},
5596 { (char *)"PySwigIterator_previous", _wrap_PySwigIterator_previous, METH_VARARGS, (char *)"PySwigIterator_previous(PySwigIterator self) -> PyObject"},
5597 { (char *)"PySwigIterator_advance", (PyCFunction) _wrap_PySwigIterator_advance, METH_VARARGS | METH_KEYWORDS, (char *)"PySwigIterator_advance(PySwigIterator self, ptrdiff_t n) -> PySwigIterator"},
5598 { (char *)"PySwigIterator___eq__", (PyCFunction) _wrap_PySwigIterator___eq__, METH_VARARGS | METH_KEYWORDS, (char *)"PySwigIterator___eq__(PySwigIterator self, PySwigIterator x) -> bool"},
5599 { (char *)"PySwigIterator___ne__", (PyCFunction) _wrap_PySwigIterator___ne__, METH_VARARGS | METH_KEYWORDS, (char *)"PySwigIterator___ne__(PySwigIterator self, PySwigIterator x) -> bool"},
5600 { (char *)"PySwigIterator___iadd__", (PyCFunction) _wrap_PySwigIterator___iadd__, METH_VARARGS | METH_KEYWORDS, (char *)"PySwigIterator___iadd__(PySwigIterator self, ptrdiff_t n) -> PySwigIterator"},
5601 { (char *)"PySwigIterator___isub__", (PyCFunction) _wrap_PySwigIterator___isub__, METH_VARARGS | METH_KEYWORDS, (char *)"PySwigIterator___isub__(PySwigIterator self, ptrdiff_t n) -> PySwigIterator"},
5602 { (char *)"PySwigIterator___add__", (PyCFunction) _wrap_PySwigIterator___add__, METH_VARARGS | METH_KEYWORDS, (char *)"PySwigIterator___add__(PySwigIterator self, ptrdiff_t n) -> PySwigIterator"},
5603 { (char *)"PySwigIterator___sub__", _wrap_PySwigIterator___sub__, METH_VARARGS, (char *)"\n"
5604 "__sub__(ptrdiff_t n) -> PySwigIterator\n"
5605 "PySwigIterator___sub__(PySwigIterator self, PySwigIterator x) -> ptrdiff_t\n"
5607 { (char *)"PySwigIterator_swigregister", PySwigIterator_swigregister, METH_VARARGS, NULL},
5608 { (char *)"new_howto_square_ff_sptr", _wrap_new_howto_square_ff_sptr, METH_VARARGS, (char *)"\n"
5609 "howto_square_ff_sptr()\n"
5610 "new_howto_square_ff_sptr( p) -> howto_square_ff_sptr\n"
5612 { (char *)"howto_square_ff_sptr___deref__", _wrap_howto_square_ff_sptr___deref__, METH_VARARGS, (char *)"howto_square_ff_sptr___deref__(howto_square_ff_sptr self)"},
5613 { (char *)"delete_howto_square_ff_sptr", _wrap_delete_howto_square_ff_sptr, METH_VARARGS, (char *)"delete_howto_square_ff_sptr(howto_square_ff_sptr self)"},
5614 { (char *)"howto_square_ff_sptr_history", _wrap_howto_square_ff_sptr_history, METH_VARARGS, (char *)"howto_square_ff_sptr_history(howto_square_ff_sptr self) -> unsigned int"},
5615 { (char *)"howto_square_ff_sptr_output_multiple", _wrap_howto_square_ff_sptr_output_multiple, METH_VARARGS, (char *)"howto_square_ff_sptr_output_multiple(howto_square_ff_sptr self) -> int"},
5616 { (char *)"howto_square_ff_sptr_relative_rate", _wrap_howto_square_ff_sptr_relative_rate, METH_VARARGS, (char *)"howto_square_ff_sptr_relative_rate(howto_square_ff_sptr self) -> double"},
5617 { (char *)"howto_square_ff_sptr_start", _wrap_howto_square_ff_sptr_start, METH_VARARGS, (char *)"howto_square_ff_sptr_start(howto_square_ff_sptr self) -> bool"},
5618 { (char *)"howto_square_ff_sptr_stop", _wrap_howto_square_ff_sptr_stop, METH_VARARGS, (char *)"howto_square_ff_sptr_stop(howto_square_ff_sptr self) -> bool"},
5619 { (char *)"howto_square_ff_sptr_detail", _wrap_howto_square_ff_sptr_detail, METH_VARARGS, (char *)"howto_square_ff_sptr_detail(howto_square_ff_sptr self) -> gr_block_detail_sptr"},
5620 { (char *)"howto_square_ff_sptr_set_detail", (PyCFunction) _wrap_howto_square_ff_sptr_set_detail, METH_VARARGS | METH_KEYWORDS, (char *)"howto_square_ff_sptr_set_detail(howto_square_ff_sptr self, gr_block_detail_sptr detail)"},
5621 { (char *)"howto_square_ff_sptr_name", _wrap_howto_square_ff_sptr_name, METH_VARARGS, (char *)"howto_square_ff_sptr_name(howto_square_ff_sptr self) -> string"},
5622 { (char *)"howto_square_ff_sptr_input_signature", _wrap_howto_square_ff_sptr_input_signature, METH_VARARGS, (char *)"howto_square_ff_sptr_input_signature(howto_square_ff_sptr self) -> gr_io_signature_sptr"},
5623 { (char *)"howto_square_ff_sptr_output_signature", _wrap_howto_square_ff_sptr_output_signature, METH_VARARGS, (char *)"howto_square_ff_sptr_output_signature(howto_square_ff_sptr self) -> gr_io_signature_sptr"},
5624 { (char *)"howto_square_ff_sptr_unique_id", _wrap_howto_square_ff_sptr_unique_id, METH_VARARGS, (char *)"howto_square_ff_sptr_unique_id(howto_square_ff_sptr self) -> long"},
5625 { (char *)"howto_square_ff_sptr_basic_block", _wrap_howto_square_ff_sptr_basic_block, METH_VARARGS, (char *)"howto_square_ff_sptr_basic_block(howto_square_ff_sptr self) -> gr_basic_block_sptr"},
5626 { (char *)"howto_square_ff_sptr_check_topology", (PyCFunction) _wrap_howto_square_ff_sptr_check_topology, METH_VARARGS | METH_KEYWORDS, (char *)"howto_square_ff_sptr_check_topology(howto_square_ff_sptr self, int ninputs, int noutputs) -> bool"},
5627 { (char *)"howto_square_ff_sptr_swigregister", howto_square_ff_sptr_swigregister, METH_VARARGS, NULL},
5628 { (char *)"square_ff", _wrap_square_ff, METH_VARARGS, (char *)"square_ff() -> howto_square_ff_sptr"},
5629 { (char *)"new_howto_square2_ff_sptr", _wrap_new_howto_square2_ff_sptr, METH_VARARGS, (char *)"\n"
5630 "howto_square2_ff_sptr()\n"
5631 "new_howto_square2_ff_sptr( p) -> howto_square2_ff_sptr\n"
5633 { (char *)"howto_square2_ff_sptr___deref__", _wrap_howto_square2_ff_sptr___deref__, METH_VARARGS, (char *)"howto_square2_ff_sptr___deref__(howto_square2_ff_sptr self)"},
5634 { (char *)"delete_howto_square2_ff_sptr", _wrap_delete_howto_square2_ff_sptr, METH_VARARGS, (char *)"delete_howto_square2_ff_sptr(howto_square2_ff_sptr self)"},
5635 { (char *)"howto_square2_ff_sptr_history", _wrap_howto_square2_ff_sptr_history, METH_VARARGS, (char *)"howto_square2_ff_sptr_history(howto_square2_ff_sptr self) -> unsigned int"},
5636 { (char *)"howto_square2_ff_sptr_output_multiple", _wrap_howto_square2_ff_sptr_output_multiple, METH_VARARGS, (char *)"howto_square2_ff_sptr_output_multiple(howto_square2_ff_sptr self) -> int"},
5637 { (char *)"howto_square2_ff_sptr_relative_rate", _wrap_howto_square2_ff_sptr_relative_rate, METH_VARARGS, (char *)"howto_square2_ff_sptr_relative_rate(howto_square2_ff_sptr self) -> double"},
5638 { (char *)"howto_square2_ff_sptr_start", _wrap_howto_square2_ff_sptr_start, METH_VARARGS, (char *)"howto_square2_ff_sptr_start(howto_square2_ff_sptr self) -> bool"},
5639 { (char *)"howto_square2_ff_sptr_stop", _wrap_howto_square2_ff_sptr_stop, METH_VARARGS, (char *)"howto_square2_ff_sptr_stop(howto_square2_ff_sptr self) -> bool"},
5640 { (char *)"howto_square2_ff_sptr_detail", _wrap_howto_square2_ff_sptr_detail, METH_VARARGS, (char *)"howto_square2_ff_sptr_detail(howto_square2_ff_sptr self) -> gr_block_detail_sptr"},
5641 { (char *)"howto_square2_ff_sptr_set_detail", (PyCFunction) _wrap_howto_square2_ff_sptr_set_detail, METH_VARARGS | METH_KEYWORDS, (char *)"howto_square2_ff_sptr_set_detail(howto_square2_ff_sptr self, gr_block_detail_sptr detail)"},
5642 { (char *)"howto_square2_ff_sptr_name", _wrap_howto_square2_ff_sptr_name, METH_VARARGS, (char *)"howto_square2_ff_sptr_name(howto_square2_ff_sptr self) -> string"},
5643 { (char *)"howto_square2_ff_sptr_input_signature", _wrap_howto_square2_ff_sptr_input_signature, METH_VARARGS, (char *)"howto_square2_ff_sptr_input_signature(howto_square2_ff_sptr self) -> gr_io_signature_sptr"},
5644 { (char *)"howto_square2_ff_sptr_output_signature", _wrap_howto_square2_ff_sptr_output_signature, METH_VARARGS, (char *)"howto_square2_ff_sptr_output_signature(howto_square2_ff_sptr self) -> gr_io_signature_sptr"},
5645 { (char *)"howto_square2_ff_sptr_unique_id", _wrap_howto_square2_ff_sptr_unique_id, METH_VARARGS, (char *)"howto_square2_ff_sptr_unique_id(howto_square2_ff_sptr self) -> long"},
5646 { (char *)"howto_square2_ff_sptr_basic_block", _wrap_howto_square2_ff_sptr_basic_block, METH_VARARGS, (char *)"howto_square2_ff_sptr_basic_block(howto_square2_ff_sptr self) -> gr_basic_block_sptr"},
5647 { (char *)"howto_square2_ff_sptr_check_topology", (PyCFunction) _wrap_howto_square2_ff_sptr_check_topology, METH_VARARGS | METH_KEYWORDS, (char *)"howto_square2_ff_sptr_check_topology(howto_square2_ff_sptr self, int ninputs, int noutputs) -> bool"},
5648 { (char *)"howto_square2_ff_sptr_swigregister", howto_square2_ff_sptr_swigregister, METH_VARARGS, NULL},
5649 { (char *)"square2_ff", _wrap_square2_ff, METH_VARARGS, (char *)"square2_ff() -> howto_square2_ff_sptr"},
5650 { NULL, NULL, 0, NULL }
5654 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
5656 static void *_p_howto_square2_ffTo_p_gr_sync_block(void *x, int *SWIGUNUSEDPARM(newmemory)) {
5657 return (void *)((gr_sync_block *) ((howto_square2_ff *) x));
5659 static void *_p_gr_sync_decimatorTo_p_gr_sync_block(void *x, int *SWIGUNUSEDPARM(newmemory)) {
5660 return (void *)((gr_sync_block *) ((gr_sync_decimator *) x));
5662 static void *_p_gr_sync_interpolatorTo_p_gr_sync_block(void *x, int *SWIGUNUSEDPARM(newmemory)) {
5663 return (void *)((gr_sync_block *) ((gr_sync_interpolator *) x));
5665 static void *_p_howto_square2_ffTo_p_gr_basic_block(void *x, int *SWIGUNUSEDPARM(newmemory)) {
5666 return (void *)((gr_basic_block *) (gr_block *)(gr_sync_block *) ((howto_square2_ff *) x));
5668 static void *_p_gr_sync_decimatorTo_p_gr_basic_block(void *x, int *SWIGUNUSEDPARM(newmemory)) {
5669 return (void *)((gr_basic_block *) (gr_block *)(gr_sync_block *) ((gr_sync_decimator *) x));
5671 static void *_p_gr_hier_block2To_p_gr_basic_block(void *x, int *SWIGUNUSEDPARM(newmemory)) {
5672 return (void *)((gr_basic_block *) ((gr_hier_block2 *) x));
5674 static void *_p_gr_sync_blockTo_p_gr_basic_block(void *x, int *SWIGUNUSEDPARM(newmemory)) {
5675 return (void *)((gr_basic_block *) (gr_block *) ((gr_sync_block *) x));
5677 static void *_p_gr_blockTo_p_gr_basic_block(void *x, int *SWIGUNUSEDPARM(newmemory)) {
5678 return (void *)((gr_basic_block *) ((gr_block *) x));
5680 static void *_p_gr_sync_interpolatorTo_p_gr_basic_block(void *x, int *SWIGUNUSEDPARM(newmemory)) {
5681 return (void *)((gr_basic_block *) (gr_block *)(gr_sync_block *) ((gr_sync_interpolator *) x));
5683 static void *_p_gr_top_blockTo_p_gr_basic_block(void *x, int *SWIGUNUSEDPARM(newmemory)) {
5684 return (void *)((gr_basic_block *) (gr_hier_block2 *) ((gr_top_block *) x));
5686 static void *_p_howto_square_ffTo_p_gr_basic_block(void *x, int *SWIGUNUSEDPARM(newmemory)) {
5687 return (void *)((gr_basic_block *) (gr_block *) ((howto_square_ff *) x));
5689 static void *_p_howto_square2_ffTo_p_gr_block(void *x, int *SWIGUNUSEDPARM(newmemory)) {
5690 return (void *)((gr_block *) (gr_sync_block *) ((howto_square2_ff *) x));
5692 static void *_p_gr_sync_decimatorTo_p_gr_block(void *x, int *SWIGUNUSEDPARM(newmemory)) {
5693 return (void *)((gr_block *) (gr_sync_block *) ((gr_sync_decimator *) x));
5695 static void *_p_gr_sync_blockTo_p_gr_block(void *x, int *SWIGUNUSEDPARM(newmemory)) {
5696 return (void *)((gr_block *) ((gr_sync_block *) x));
5698 static void *_p_gr_sync_interpolatorTo_p_gr_block(void *x, int *SWIGUNUSEDPARM(newmemory)) {
5699 return (void *)((gr_block *) (gr_sync_block *) ((gr_sync_interpolator *) x));
5701 static void *_p_howto_square_ffTo_p_gr_block(void *x, int *SWIGUNUSEDPARM(newmemory)) {
5702 return (void *)((gr_block *) ((howto_square_ff *) x));
5704 static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0};
5705 static swig_type_info _swigt__p_boost__shared_ptrT_gr_basic_block_t = {"_p_boost__shared_ptrT_gr_basic_block_t", "boost::shared_ptr< gr_basic_block > *|gr_basic_block_sptr *", 0, 0, (void*)0, 0};
5706 static swig_type_info _swigt__p_boost__shared_ptrT_gr_block_detail_t = {"_p_boost__shared_ptrT_gr_block_detail_t", "boost::shared_ptr< gr_block_detail > *|gr_block_detail_sptr *", 0, 0, (void*)0, 0};
5707 static swig_type_info _swigt__p_boost__shared_ptrT_gr_block_t = {"_p_boost__shared_ptrT_gr_block_t", "boost::shared_ptr< gr_block > *|gr_block_sptr *", 0, 0, (void*)0, 0};
5708 static swig_type_info _swigt__p_boost__shared_ptrT_gr_buffer_reader_t = {"_p_boost__shared_ptrT_gr_buffer_reader_t", "boost::shared_ptr< gr_buffer_reader > *|gr_buffer_reader_sptr *", 0, 0, (void*)0, 0};
5709 static swig_type_info _swigt__p_boost__shared_ptrT_gr_buffer_t = {"_p_boost__shared_ptrT_gr_buffer_t", "boost::shared_ptr< gr_buffer > *|gr_buffer_sptr *", 0, 0, (void*)0, 0};
5710 static swig_type_info _swigt__p_boost__shared_ptrT_gr_dispatcher_t = {"_p_boost__shared_ptrT_gr_dispatcher_t", "boost::shared_ptr< gr_dispatcher > *|gr_dispatcher_sptr *", 0, 0, (void*)0, 0};
5711 static swig_type_info _swigt__p_boost__shared_ptrT_gr_hier_block2_t = {"_p_boost__shared_ptrT_gr_hier_block2_t", "boost::shared_ptr< gr_hier_block2 > *|gr_hier_block2_sptr *", 0, 0, (void*)0, 0};
5712 static swig_type_info _swigt__p_boost__shared_ptrT_gr_io_signature_t = {"_p_boost__shared_ptrT_gr_io_signature_t", "boost::shared_ptr< gr_io_signature > *|gr_io_signature_sptr *", 0, 0, (void*)0, 0};
5713 static swig_type_info _swigt__p_boost__shared_ptrT_gr_message_t = {"_p_boost__shared_ptrT_gr_message_t", "boost::shared_ptr< gr_message > *|gr_message_sptr *", 0, 0, (void*)0, 0};
5714 static swig_type_info _swigt__p_boost__shared_ptrT_gr_msg_queue_t = {"_p_boost__shared_ptrT_gr_msg_queue_t", "boost::shared_ptr< gr_msg_queue > *|gr_msg_queue_sptr *", 0, 0, (void*)0, 0};
5715 static swig_type_info _swigt__p_boost__shared_ptrT_gr_single_threaded_scheduler_t = {"_p_boost__shared_ptrT_gr_single_threaded_scheduler_t", "boost::shared_ptr< gr_single_threaded_scheduler > *|gr_single_threaded_scheduler_sptr *", 0, 0, (void*)0, 0};
5716 static swig_type_info _swigt__p_boost__shared_ptrT_gr_top_block_t = {"_p_boost__shared_ptrT_gr_top_block_t", "boost::shared_ptr< gr_top_block > *|gr_top_block_sptr *", 0, 0, (void*)0, 0};
5717 static swig_type_info _swigt__p_boost__shared_ptrT_howto_square2_ff_t = {"_p_boost__shared_ptrT_howto_square2_ff_t", "boost::shared_ptr< howto_square2_ff > *|howto_square2_ff_sptr *", 0, 0, (void*)0, 0};
5718 static swig_type_info _swigt__p_boost__shared_ptrT_howto_square_ff_t = {"_p_boost__shared_ptrT_howto_square_ff_t", "boost::shared_ptr< howto_square_ff > *|howto_square_ff_sptr *", 0, 0, (void*)0, 0};
5719 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
5720 static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0};
5721 static swig_type_info _swigt__p_gr_basic_block = {"_p_gr_basic_block", "gr_basic_block *", 0, 0, (void*)0, 0};
5722 static swig_type_info _swigt__p_gr_sync_decimator = {"_p_gr_sync_decimator", 0, 0, 0, 0, 0};
5723 static swig_type_info _swigt__p_gr_hier_block2 = {"_p_gr_hier_block2", 0, 0, 0, 0, 0};
5724 static swig_type_info _swigt__p_gr_sync_interpolator = {"_p_gr_sync_interpolator", 0, 0, 0, 0, 0};
5725 static swig_type_info _swigt__p_gr_top_block = {"_p_gr_top_block", 0, 0, 0, 0, 0};
5726 static swig_type_info _swigt__p_gr_block = {"_p_gr_block", "gr_block *", 0, 0, (void*)0, 0};
5727 static swig_type_info _swigt__p_gr_sync_block = {"_p_gr_sync_block", "gr_sync_block *", 0, 0, (void*)0, 0};
5728 static swig_type_info _swigt__p_gruel__rt_status_t = {"_p_gruel__rt_status_t", "enum gruel::rt_status_t *|gruel::rt_status_t *|gr_rt_status_t *", 0, 0, (void*)0, 0};
5729 static swig_type_info _swigt__p_howto_square2_ff = {"_p_howto_square2_ff", "howto_square2_ff *", 0, 0, (void*)0, 0};
5730 static swig_type_info _swigt__p_howto_square_ff = {"_p_howto_square_ff", "howto_square_ff *", 0, 0, (void*)0, 0};
5731 static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0};
5732 static swig_type_info _swigt__p_std__complexT_double_t = {"_p_std__complexT_double_t", "gr_complexd *|std::complex< double > *", 0, 0, (void*)0, 0};
5733 static swig_type_info _swigt__p_std__complexT_float_t = {"_p_std__complexT_float_t", "std::complex< float > *|gr_complex *", 0, 0, (void*)0, 0};
5734 static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0};
5735 static swig_type_info _swigt__p_swig__PySwigIterator = {"_p_swig__PySwigIterator", "swig::PySwigIterator *", 0, 0, (void*)0, 0};
5736 static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0};
5738 static swig_type_info *swig_type_initial[] = {
5739 &_swigt__p_allocator_type,
5740 &_swigt__p_boost__shared_ptrT_gr_basic_block_t,
5741 &_swigt__p_boost__shared_ptrT_gr_block_detail_t,
5742 &_swigt__p_boost__shared_ptrT_gr_block_t,
5743 &_swigt__p_boost__shared_ptrT_gr_buffer_reader_t,
5744 &_swigt__p_boost__shared_ptrT_gr_buffer_t,
5745 &_swigt__p_boost__shared_ptrT_gr_dispatcher_t,
5746 &_swigt__p_boost__shared_ptrT_gr_hier_block2_t,
5747 &_swigt__p_boost__shared_ptrT_gr_io_signature_t,
5748 &_swigt__p_boost__shared_ptrT_gr_message_t,
5749 &_swigt__p_boost__shared_ptrT_gr_msg_queue_t,
5750 &_swigt__p_boost__shared_ptrT_gr_single_threaded_scheduler_t,
5751 &_swigt__p_boost__shared_ptrT_gr_top_block_t,
5752 &_swigt__p_boost__shared_ptrT_howto_square2_ff_t,
5753 &_swigt__p_boost__shared_ptrT_howto_square_ff_t,
5755 &_swigt__p_difference_type,
5756 &_swigt__p_gr_basic_block,
5757 &_swigt__p_gr_block,
5758 &_swigt__p_gr_hier_block2,
5759 &_swigt__p_gr_sync_block,
5760 &_swigt__p_gr_sync_decimator,
5761 &_swigt__p_gr_sync_interpolator,
5762 &_swigt__p_gr_top_block,
5763 &_swigt__p_gruel__rt_status_t,
5764 &_swigt__p_howto_square2_ff,
5765 &_swigt__p_howto_square_ff,
5766 &_swigt__p_size_type,
5767 &_swigt__p_std__complexT_double_t,
5768 &_swigt__p_std__complexT_float_t,
5769 &_swigt__p_std__invalid_argument,
5770 &_swigt__p_swig__PySwigIterator,
5771 &_swigt__p_value_type,
5774 static swig_cast_info _swigc__p_allocator_type[] = { {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}};
5775 static swig_cast_info _swigc__p_boost__shared_ptrT_gr_basic_block_t[] = { {&_swigt__p_boost__shared_ptrT_gr_basic_block_t, 0, 0, 0},{0, 0, 0, 0}};
5776 static swig_cast_info _swigc__p_boost__shared_ptrT_gr_block_detail_t[] = { {&_swigt__p_boost__shared_ptrT_gr_block_detail_t, 0, 0, 0},{0, 0, 0, 0}};
5777 static swig_cast_info _swigc__p_boost__shared_ptrT_gr_block_t[] = { {&_swigt__p_boost__shared_ptrT_gr_block_t, 0, 0, 0},{0, 0, 0, 0}};
5778 static swig_cast_info _swigc__p_boost__shared_ptrT_gr_buffer_reader_t[] = { {&_swigt__p_boost__shared_ptrT_gr_buffer_reader_t, 0, 0, 0},{0, 0, 0, 0}};
5779 static swig_cast_info _swigc__p_boost__shared_ptrT_gr_buffer_t[] = { {&_swigt__p_boost__shared_ptrT_gr_buffer_t, 0, 0, 0},{0, 0, 0, 0}};
5780 static swig_cast_info _swigc__p_boost__shared_ptrT_gr_dispatcher_t[] = { {&_swigt__p_boost__shared_ptrT_gr_dispatcher_t, 0, 0, 0},{0, 0, 0, 0}};
5781 static swig_cast_info _swigc__p_boost__shared_ptrT_gr_hier_block2_t[] = { {&_swigt__p_boost__shared_ptrT_gr_hier_block2_t, 0, 0, 0},{0, 0, 0, 0}};
5782 static swig_cast_info _swigc__p_boost__shared_ptrT_gr_io_signature_t[] = { {&_swigt__p_boost__shared_ptrT_gr_io_signature_t, 0, 0, 0},{0, 0, 0, 0}};
5783 static swig_cast_info _swigc__p_boost__shared_ptrT_gr_message_t[] = { {&_swigt__p_boost__shared_ptrT_gr_message_t, 0, 0, 0},{0, 0, 0, 0}};
5784 static swig_cast_info _swigc__p_boost__shared_ptrT_gr_msg_queue_t[] = { {&_swigt__p_boost__shared_ptrT_gr_msg_queue_t, 0, 0, 0},{0, 0, 0, 0}};
5785 static swig_cast_info _swigc__p_boost__shared_ptrT_gr_single_threaded_scheduler_t[] = { {&_swigt__p_boost__shared_ptrT_gr_single_threaded_scheduler_t, 0, 0, 0},{0, 0, 0, 0}};
5786 static swig_cast_info _swigc__p_boost__shared_ptrT_gr_top_block_t[] = { {&_swigt__p_boost__shared_ptrT_gr_top_block_t, 0, 0, 0},{0, 0, 0, 0}};
5787 static swig_cast_info _swigc__p_boost__shared_ptrT_howto_square2_ff_t[] = { {&_swigt__p_boost__shared_ptrT_howto_square2_ff_t, 0, 0, 0},{0, 0, 0, 0}};
5788 static swig_cast_info _swigc__p_boost__shared_ptrT_howto_square_ff_t[] = { {&_swigt__p_boost__shared_ptrT_howto_square_ff_t, 0, 0, 0},{0, 0, 0, 0}};
5789 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
5790 static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}};
5791 static swig_cast_info _swigc__p_gr_sync_decimator[] = {{&_swigt__p_gr_sync_decimator, 0, 0, 0},{0, 0, 0, 0}};
5792 static swig_cast_info _swigc__p_gr_hier_block2[] = {{&_swigt__p_gr_hier_block2, 0, 0, 0},{0, 0, 0, 0}};
5793 static swig_cast_info _swigc__p_gr_sync_interpolator[] = {{&_swigt__p_gr_sync_interpolator, 0, 0, 0},{0, 0, 0, 0}};
5794 static swig_cast_info _swigc__p_gr_top_block[] = {{&_swigt__p_gr_top_block, 0, 0, 0},{0, 0, 0, 0}};
5795 static swig_cast_info _swigc__p_gr_basic_block[] = { {&_swigt__p_howto_square2_ff, _p_howto_square2_ffTo_p_gr_basic_block, 0, 0}, {&_swigt__p_gr_sync_decimator, _p_gr_sync_decimatorTo_p_gr_basic_block, 0, 0}, {&_swigt__p_gr_basic_block, 0, 0, 0}, {&_swigt__p_gr_hier_block2, _p_gr_hier_block2To_p_gr_basic_block, 0, 0}, {&_swigt__p_gr_sync_block, _p_gr_sync_blockTo_p_gr_basic_block, 0, 0}, {&_swigt__p_gr_sync_interpolator, _p_gr_sync_interpolatorTo_p_gr_basic_block, 0, 0}, {&_swigt__p_gr_block, _p_gr_blockTo_p_gr_basic_block, 0, 0}, {&_swigt__p_howto_square_ff, _p_howto_square_ffTo_p_gr_basic_block, 0, 0}, {&_swigt__p_gr_top_block, _p_gr_top_blockTo_p_gr_basic_block, 0, 0},{0, 0, 0, 0}};
5796 static swig_cast_info _swigc__p_gr_block[] = { {&_swigt__p_howto_square2_ff, _p_howto_square2_ffTo_p_gr_block, 0, 0}, {&_swigt__p_gr_sync_decimator, _p_gr_sync_decimatorTo_p_gr_block, 0, 0}, {&_swigt__p_gr_sync_block, _p_gr_sync_blockTo_p_gr_block, 0, 0}, {&_swigt__p_gr_block, 0, 0, 0}, {&_swigt__p_gr_sync_interpolator, _p_gr_sync_interpolatorTo_p_gr_block, 0, 0}, {&_swigt__p_howto_square_ff, _p_howto_square_ffTo_p_gr_block, 0, 0},{0, 0, 0, 0}};
5797 static swig_cast_info _swigc__p_gr_sync_block[] = { {&_swigt__p_howto_square2_ff, _p_howto_square2_ffTo_p_gr_sync_block, 0, 0}, {&_swigt__p_gr_sync_decimator, _p_gr_sync_decimatorTo_p_gr_sync_block, 0, 0}, {&_swigt__p_gr_sync_block, 0, 0, 0}, {&_swigt__p_gr_sync_interpolator, _p_gr_sync_interpolatorTo_p_gr_sync_block, 0, 0},{0, 0, 0, 0}};
5798 static swig_cast_info _swigc__p_gruel__rt_status_t[] = { {&_swigt__p_gruel__rt_status_t, 0, 0, 0},{0, 0, 0, 0}};
5799 static swig_cast_info _swigc__p_howto_square2_ff[] = { {&_swigt__p_howto_square2_ff, 0, 0, 0},{0, 0, 0, 0}};
5800 static swig_cast_info _swigc__p_howto_square_ff[] = { {&_swigt__p_howto_square_ff, 0, 0, 0},{0, 0, 0, 0}};
5801 static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}};
5802 static swig_cast_info _swigc__p_std__complexT_double_t[] = { {&_swigt__p_std__complexT_double_t, 0, 0, 0},{0, 0, 0, 0}};
5803 static swig_cast_info _swigc__p_std__complexT_float_t[] = { {&_swigt__p_std__complexT_float_t, 0, 0, 0},{0, 0, 0, 0}};
5804 static swig_cast_info _swigc__p_std__invalid_argument[] = { {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}};
5805 static swig_cast_info _swigc__p_swig__PySwigIterator[] = { {&_swigt__p_swig__PySwigIterator, 0, 0, 0},{0, 0, 0, 0}};
5806 static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}};
5808 static swig_cast_info *swig_cast_initial[] = {
5809 _swigc__p_allocator_type,
5810 _swigc__p_boost__shared_ptrT_gr_basic_block_t,
5811 _swigc__p_boost__shared_ptrT_gr_block_detail_t,
5812 _swigc__p_boost__shared_ptrT_gr_block_t,
5813 _swigc__p_boost__shared_ptrT_gr_buffer_reader_t,
5814 _swigc__p_boost__shared_ptrT_gr_buffer_t,
5815 _swigc__p_boost__shared_ptrT_gr_dispatcher_t,
5816 _swigc__p_boost__shared_ptrT_gr_hier_block2_t,
5817 _swigc__p_boost__shared_ptrT_gr_io_signature_t,
5818 _swigc__p_boost__shared_ptrT_gr_message_t,
5819 _swigc__p_boost__shared_ptrT_gr_msg_queue_t,
5820 _swigc__p_boost__shared_ptrT_gr_single_threaded_scheduler_t,
5821 _swigc__p_boost__shared_ptrT_gr_top_block_t,
5822 _swigc__p_boost__shared_ptrT_howto_square2_ff_t,
5823 _swigc__p_boost__shared_ptrT_howto_square_ff_t,
5825 _swigc__p_difference_type,
5826 _swigc__p_gr_basic_block,
5828 _swigc__p_gr_hier_block2,
5829 _swigc__p_gr_sync_block,
5830 _swigc__p_gr_sync_decimator,
5831 _swigc__p_gr_sync_interpolator,
5832 _swigc__p_gr_top_block,
5833 _swigc__p_gruel__rt_status_t,
5834 _swigc__p_howto_square2_ff,
5835 _swigc__p_howto_square_ff,
5836 _swigc__p_size_type,
5837 _swigc__p_std__complexT_double_t,
5838 _swigc__p_std__complexT_float_t,
5839 _swigc__p_std__invalid_argument,
5840 _swigc__p_swig__PySwigIterator,
5841 _swigc__p_value_type,
5845 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
5847 static swig_const_info swig_const_table[] = {
5848 {0, 0, 0, 0.0, 0, 0}};
5853 /* -----------------------------------------------------------------------------
5854 * Type initialization:
5855 * This problem is tough by the requirement that no dynamic
5856 * memory is used. Also, since swig_type_info structures store pointers to
5857 * swig_cast_info structures and swig_cast_info structures store pointers back
5858 * to swig_type_info structures, we need some lookup code at initialization.
5859 * The idea is that swig generates all the structures that are needed.
5860 * The runtime then collects these partially filled structures.
5861 * The SWIG_InitializeModule function takes these initial arrays out of
5862 * swig_module, and does all the lookup, filling in the swig_module.types
5863 * array with the correct data and linking the correct swig_cast_info
5864 * structures together.
5866 * The generated swig_type_info structures are assigned staticly to an initial
5867 * array. We just loop through that array, and handle each type individually.
5868 * First we lookup if this type has been already loaded, and if so, use the
5869 * loaded structure instead of the generated one. Then we have to fill in the
5870 * cast linked list. The cast data is initially stored in something like a
5871 * two-dimensional array. Each row corresponds to a type (there are the same
5872 * number of rows as there are in the swig_type_initial array). Each entry in
5873 * a column is one of the swig_cast_info structures for that type.
5874 * The cast_initial array is actually an array of arrays, because each row has
5875 * a variable number of columns. So to actually build the cast linked list,
5876 * we find the array of casts associated with the type, and loop through it
5877 * adding the casts to the list. The one last trick we need to do is making
5878 * sure the type pointer in the swig_cast_info struct is correct.
5880 * First off, we lookup the cast->type name to see if it is already loaded.
5881 * There are three cases to handle:
5882 * 1) If the cast->type has already been loaded AND the type we are adding
5883 * casting info to has not been loaded (it is in this module), THEN we
5884 * replace the cast->type pointer with the type pointer that has already
5886 * 2) If BOTH types (the one we are adding casting info to, and the
5887 * cast->type) are loaded, THEN the cast info has already been loaded by
5888 * the previous module so we just ignore it.
5889 * 3) Finally, if cast->type has not already been loaded, then we add that
5890 * swig_cast_info to the linked list (because the cast->type) pointer will
5892 * ----------------------------------------------------------------------------- */
5902 #define SWIGRUNTIME_DEBUG
5907 SWIG_InitializeModule(void *clientdata) {
5909 swig_module_info *module_head, *iter;
5912 clientdata = clientdata;
5914 /* check to see if the circular list has been setup, if not, set it up */
5915 if (swig_module.next==0) {
5916 /* Initialize the swig_module */
5917 swig_module.type_initial = swig_type_initial;
5918 swig_module.cast_initial = swig_cast_initial;
5919 swig_module.next = &swig_module;
5925 /* Try and load any already created modules */
5926 module_head = SWIG_GetModule(clientdata);
5928 /* This is the first module loaded for this interpreter */
5929 /* so set the swig module into the interpreter */
5930 SWIG_SetModule(clientdata, &swig_module);
5931 module_head = &swig_module;
5933 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
5937 if (iter==&swig_module) {
5942 } while (iter!= module_head);
5944 /* if the is found in the list, then all is done and we may leave */
5946 /* otherwise we must add out module into the list */
5947 swig_module.next = module_head->next;
5948 module_head->next = &swig_module;
5951 /* When multiple interpeters are used, a module could have already been initialized in
5952 a different interpreter, but not yet have a pointer in this interpreter.
5953 In this case, we do not want to continue adding types... everything should be
5955 if (init == 0) return;
5957 /* Now work on filling in swig_module.types */
5958 #ifdef SWIGRUNTIME_DEBUG
5959 printf("SWIG_InitializeModule: size %d\n", swig_module.size);
5961 for (i = 0; i < swig_module.size; ++i) {
5962 swig_type_info *type = 0;
5963 swig_type_info *ret;
5964 swig_cast_info *cast;
5966 #ifdef SWIGRUNTIME_DEBUG
5967 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
5970 /* if there is another module already loaded */
5971 if (swig_module.next != &swig_module) {
5972 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
5975 /* Overwrite clientdata field */
5976 #ifdef SWIGRUNTIME_DEBUG
5977 printf("SWIG_InitializeModule: found type %s\n", type->name);
5979 if (swig_module.type_initial[i]->clientdata) {
5980 type->clientdata = swig_module.type_initial[i]->clientdata;
5981 #ifdef SWIGRUNTIME_DEBUG
5982 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
5986 type = swig_module.type_initial[i];
5989 /* Insert casting types */
5990 cast = swig_module.cast_initial[i];
5991 while (cast->type) {
5992 /* Don't need to add information already in the list */
5994 #ifdef SWIGRUNTIME_DEBUG
5995 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
5997 if (swig_module.next != &swig_module) {
5998 ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
5999 #ifdef SWIGRUNTIME_DEBUG
6000 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
6004 if (type == swig_module.type_initial[i]) {
6005 #ifdef SWIGRUNTIME_DEBUG
6006 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
6011 /* Check for casting already in the list */
6012 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
6013 #ifdef SWIGRUNTIME_DEBUG
6014 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
6016 if (!ocast) ret = 0;
6021 #ifdef SWIGRUNTIME_DEBUG
6022 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
6025 type->cast->prev = cast;
6026 cast->next = type->cast;
6032 /* Set entry in modules->types array equal to the type */
6033 swig_module.types[i] = type;
6035 swig_module.types[i] = 0;
6037 #ifdef SWIGRUNTIME_DEBUG
6038 printf("**** SWIG_InitializeModule: Cast List ******\n");
6039 for (i = 0; i < swig_module.size; ++i) {
6041 swig_cast_info *cast = swig_module.cast_initial[i];
6042 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
6043 while (cast->type) {
6044 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
6048 printf("---- Total casts: %d\n",j);
6050 printf("**** SWIG_InitializeModule: Cast List ******\n");
6054 /* This function will propagate the clientdata field of type to
6055 * any new swig_type_info structures that have been added into the list
6056 * of equivalent types. It is like calling
6057 * SWIG_TypeClientData(type, clientdata) a second time.
6060 SWIG_PropagateClientData(void) {
6062 swig_cast_info *equiv;
6063 static int init_run = 0;
6065 if (init_run) return;
6068 for (i = 0; i < swig_module.size; i++) {
6069 if (swig_module.types[i]->clientdata) {
6070 equiv = swig_module.types[i]->cast;
6072 if (!equiv->converter) {
6073 if (equiv->type && !equiv->type->clientdata)
6074 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
6076 equiv = equiv->next;
6096 /* Python-specific SWIG API */
6097 #define SWIG_newvarlink() SWIG_Python_newvarlink()
6098 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
6099 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
6101 /* -----------------------------------------------------------------------------
6102 * global variable support code.
6103 * ----------------------------------------------------------------------------- */
6105 typedef struct swig_globalvar {
6106 char *name; /* Name of global variable */
6107 PyObject *(*get_attr)(void); /* Return the current value */
6108 int (*set_attr)(PyObject *); /* Set the value */
6109 struct swig_globalvar *next;
6112 typedef struct swig_varlinkobject {
6114 swig_globalvar *vars;
6115 } swig_varlinkobject;
6117 SWIGINTERN PyObject *
6118 swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
6119 return PyString_FromString("<Swig global variables>");
6122 SWIGINTERN PyObject *
6123 swig_varlink_str(swig_varlinkobject *v) {
6124 PyObject *str = PyString_FromString("(");
6125 swig_globalvar *var;
6126 for (var = v->vars; var; var=var->next) {
6127 PyString_ConcatAndDel(&str,PyString_FromString(var->name));
6128 if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
6130 PyString_ConcatAndDel(&str,PyString_FromString(")"));
6135 swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
6136 PyObject *str = swig_varlink_str(v);
6137 fprintf(fp,"Swig global variables ");
6138 fprintf(fp,"%s\n", PyString_AsString(str));
6144 swig_varlink_dealloc(swig_varlinkobject *v) {
6145 swig_globalvar *var = v->vars;
6147 swig_globalvar *n = var->next;
6154 SWIGINTERN PyObject *
6155 swig_varlink_getattr(swig_varlinkobject *v, char *n) {
6156 PyObject *res = NULL;
6157 swig_globalvar *var = v->vars;
6159 if (strcmp(var->name,n) == 0) {
6160 res = (*var->get_attr)();
6165 if (res == NULL && !PyErr_Occurred()) {
6166 PyErr_SetString(PyExc_NameError,"Unknown C global variable");
6172 swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
6174 swig_globalvar *var = v->vars;
6176 if (strcmp(var->name,n) == 0) {
6177 res = (*var->set_attr)(p);
6182 if (res == 1 && !PyErr_Occurred()) {
6183 PyErr_SetString(PyExc_NameError,"Unknown C global variable");
6188 SWIGINTERN PyTypeObject*
6189 swig_varlink_type(void) {
6190 static char varlink__doc__[] = "Swig var link object";
6191 static PyTypeObject varlink_type;
6192 static int type_init = 0;
6194 const PyTypeObject tmp
6196 PyObject_HEAD_INIT(NULL)
6197 0, /* Number of items in variable part (ob_size) */
6198 (char *)"swigvarlink", /* Type name (tp_name) */
6199 sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */
6200 0, /* Itemsize (tp_itemsize) */
6201 (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */
6202 (printfunc) swig_varlink_print, /* Print (tp_print) */
6203 (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
6204 (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
6206 (reprfunc) swig_varlink_repr, /* tp_repr */
6207 0, /* tp_as_number */
6208 0, /* tp_as_sequence */
6209 0, /* tp_as_mapping */
6212 (reprfunc)swig_varlink_str, /* tp_str */
6213 0, /* tp_getattro */
6214 0, /* tp_setattro */
6215 0, /* tp_as_buffer */
6217 varlink__doc__, /* tp_doc */
6218 0, /* tp_traverse */
6220 0, /* tp_richcompare */
6221 0, /* tp_weaklistoffset */
6222 #if PY_VERSION_HEX >= 0x02020000
6223 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
6225 #if PY_VERSION_HEX >= 0x02030000
6229 0,0,0,0 /* tp_alloc -> tp_next */
6233 varlink_type.ob_type = &PyType_Type;
6236 return &varlink_type;
6239 /* Create a variable linking object for use later */
6240 SWIGINTERN PyObject *
6241 SWIG_Python_newvarlink(void) {
6242 swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
6246 return ((PyObject*) result);
6250 SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
6251 swig_varlinkobject *v = (swig_varlinkobject *) p;
6252 swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
6254 size_t size = strlen(name)+1;
6255 gv->name = (char *)malloc(size);
6257 strncpy(gv->name,name,size);
6258 gv->get_attr = get_attr;
6259 gv->set_attr = set_attr;
6266 SWIGINTERN PyObject *
6267 SWIG_globals(void) {
6268 static PyObject *_SWIG_globals = 0;
6269 if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
6270 return _SWIG_globals;
6273 /* -----------------------------------------------------------------------------
6274 * constants/methods manipulation
6275 * ----------------------------------------------------------------------------- */
6277 /* Install Constants */
6279 SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
6282 for (i = 0; constants[i].type; ++i) {
6283 switch(constants[i].type) {
6284 case SWIG_PY_POINTER:
6285 obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
6287 case SWIG_PY_BINARY:
6288 obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
6295 PyDict_SetItemString(d, constants[i].name, obj);
6301 /* -----------------------------------------------------------------------------*/
6302 /* Fix SwigMethods to carry the callback ptrs when needed */
6303 /* -----------------------------------------------------------------------------*/
6306 SWIG_Python_FixMethods(PyMethodDef *methods,
6307 swig_const_info *const_table,
6308 swig_type_info **types,
6309 swig_type_info **types_initial) {
6311 for (i = 0; methods[i].ml_name; ++i) {
6312 const char *c = methods[i].ml_doc;
6313 if (c && (c = strstr(c, "swig_ptr: "))) {
6315 swig_const_info *ci = 0;
6316 const char *name = c + 10;
6317 for (j = 0; const_table[j].type; ++j) {
6318 if (strncmp(const_table[j].name, name,
6319 strlen(const_table[j].name)) == 0) {
6320 ci = &(const_table[j]);
6325 size_t shift = (ci->ptype) - types;
6326 swig_type_info *ty = types_initial[shift];
6327 size_t ldoc = (c - methods[i].ml_doc);
6328 size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
6329 char *ndoc = (char*)malloc(ldoc + lptr + 10);
6332 void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
6334 strncpy(buff, methods[i].ml_doc, ldoc);
6336 strncpy(buff, "swig_ptr: ", 10);
6338 SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
6339 methods[i].ml_doc = ndoc;
6351 /* -----------------------------------------------------------------------------*
6352 * Partial Init method
6353 * -----------------------------------------------------------------------------*/
6358 SWIGEXPORT void SWIG_init(void) {
6361 /* Fix SwigMethods to carry the callback ptrs when needed */
6362 SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
6364 m = Py_InitModule((char *) SWIG_name, SwigMethods);
6365 d = PyModule_GetDict(m);
6367 SWIG_InitializeModule(0);
6368 SWIG_InstallConstants(d,swig_const_table);
6371 SWIG_Python_SetConstant(d, "sizeof_char",SWIG_From_int(static_cast< int >(sizeof(char))));
6372 SWIG_Python_SetConstant(d, "sizeof_short",SWIG_From_int(static_cast< int >(sizeof(short))));
6373 SWIG_Python_SetConstant(d, "sizeof_int",SWIG_From_int(static_cast< int >(sizeof(int))));
6374 SWIG_Python_SetConstant(d, "sizeof_float",SWIG_From_int(static_cast< int >(sizeof(float))));
6375 SWIG_Python_SetConstant(d, "sizeof_double",SWIG_From_int(static_cast< int >(sizeof(double))));
6376 SWIG_Python_SetConstant(d, "sizeof_gr_complex",SWIG_From_int(static_cast< int >(sizeof(gr_complex))));