Back to index

salome-kernel  6.5.0
swig_wrap.cpp
Go to the documentation of this file.
00001 /* ----------------------------------------------------------------------------
00002  * This file was automatically generated by SWIG (http://www.swig.org).
00003  * Version 1.3.40
00004  * 
00005  * This file is not intended to be easily readable and contains a number of 
00006  * coding conventions designed to improve portability and efficiency. Do not make
00007  * changes to this file unless you know what you are doing--modify the SWIG 
00008  * interface file instead. 
00009  * ----------------------------------------------------------------------------- */
00010 
00011 #define SWIGPYTHON
00012 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
00013 
00014 
00015 #ifdef __cplusplus
00016 /* SwigValueWrapper is described in swig.swg */
00017 template<typename T> class SwigValueWrapper {
00018   struct SwigMovePointer {
00019     T *ptr;
00020     SwigMovePointer(T *p) : ptr(p) { }
00021     ~SwigMovePointer() { delete ptr; }
00022     SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
00023   } pointer;
00024   SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
00025   SwigValueWrapper(const SwigValueWrapper<T>& rhs);
00026 public:
00027   SwigValueWrapper() : pointer(0) { }
00028   SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
00029   operator T&() const { return *pointer.ptr; }
00030   T *operator&() { return pointer.ptr; }
00031 };
00032 
00033 template <typename T> T SwigValueInit() {
00034   return T();
00035 }
00036 #endif
00037 
00038 /* -----------------------------------------------------------------------------
00039  *  This section contains generic SWIG labels for method/variable
00040  *  declarations/attributes, and other compiler dependent labels.
00041  * ----------------------------------------------------------------------------- */
00042 
00043 /* template workaround for compilers that cannot correctly implement the C++ standard */
00044 #ifndef SWIGTEMPLATEDISAMBIGUATOR
00045 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
00046 #  define SWIGTEMPLATEDISAMBIGUATOR template
00047 # elif defined(__HP_aCC)
00048 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
00049 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
00050 #  define SWIGTEMPLATEDISAMBIGUATOR template
00051 # else
00052 #  define SWIGTEMPLATEDISAMBIGUATOR
00053 # endif
00054 #endif
00055 
00056 /* inline attribute */
00057 #ifndef SWIGINLINE
00058 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
00059 #   define SWIGINLINE inline
00060 # else
00061 #   define SWIGINLINE
00062 # endif
00063 #endif
00064 
00065 /* attribute recognised by some compilers to avoid 'unused' warnings */
00066 #ifndef SWIGUNUSED
00067 # if defined(__GNUC__)
00068 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
00069 #     define SWIGUNUSED __attribute__ ((__unused__)) 
00070 #   else
00071 #     define SWIGUNUSED
00072 #   endif
00073 # elif defined(__ICC)
00074 #   define SWIGUNUSED __attribute__ ((__unused__)) 
00075 # else
00076 #   define SWIGUNUSED 
00077 # endif
00078 #endif
00079 
00080 #ifndef SWIG_MSC_UNSUPPRESS_4505
00081 # if defined(_MSC_VER)
00082 #   pragma warning(disable : 4505) /* unreferenced local function has been removed */
00083 # endif 
00084 #endif
00085 
00086 #ifndef SWIGUNUSEDPARM
00087 # ifdef __cplusplus
00088 #   define SWIGUNUSEDPARM(p)
00089 # else
00090 #   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
00091 # endif
00092 #endif
00093 
00094 /* internal SWIG method */
00095 #ifndef SWIGINTERN
00096 # define SWIGINTERN static SWIGUNUSED
00097 #endif
00098 
00099 /* internal inline SWIG method */
00100 #ifndef SWIGINTERNINLINE
00101 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
00102 #endif
00103 
00104 /* exporting methods */
00105 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
00106 #  ifndef GCC_HASCLASSVISIBILITY
00107 #    define GCC_HASCLASSVISIBILITY
00108 #  endif
00109 #endif
00110 
00111 #ifndef SWIGEXPORT
00112 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
00113 #   if defined(STATIC_LINKED)
00114 #     define SWIGEXPORT
00115 #   else
00116 #     define SWIGEXPORT __declspec(dllexport)
00117 #   endif
00118 # else
00119 #   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
00120 #     define SWIGEXPORT __attribute__ ((visibility("default")))
00121 #   else
00122 #     define SWIGEXPORT
00123 #   endif
00124 # endif
00125 #endif
00126 
00127 /* calling conventions for Windows */
00128 #ifndef SWIGSTDCALL
00129 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
00130 #   define SWIGSTDCALL __stdcall
00131 # else
00132 #   define SWIGSTDCALL
00133 # endif 
00134 #endif
00135 
00136 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
00137 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
00138 # define _CRT_SECURE_NO_DEPRECATE
00139 #endif
00140 
00141 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
00142 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
00143 # define _SCL_SECURE_NO_DEPRECATE
00144 #endif
00145 
00146 
00147 
00148 /* Python.h has to appear first */
00149 #include <Python.h>
00150 
00151 /* -----------------------------------------------------------------------------
00152  * swigrun.swg
00153  *
00154  * This file contains generic C API SWIG runtime support for pointer
00155  * type checking.
00156  * ----------------------------------------------------------------------------- */
00157 
00158 /* This should only be incremented when either the layout of swig_type_info changes,
00159    or for whatever reason, the runtime changes incompatibly */
00160 #define SWIG_RUNTIME_VERSION "4"
00161 
00162 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
00163 #ifdef SWIG_TYPE_TABLE
00164 # define SWIG_QUOTE_STRING(x) #x
00165 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
00166 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
00167 #else
00168 # define SWIG_TYPE_TABLE_NAME
00169 #endif
00170 
00171 /*
00172   You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
00173   creating a static or dynamic library from the SWIG runtime code.
00174   In 99.9% of the cases, SWIG just needs to declare them as 'static'.
00175   
00176   But only do this if strictly necessary, ie, if you have problems
00177   with your compiler or suchlike.
00178 */
00179 
00180 #ifndef SWIGRUNTIME
00181 # define SWIGRUNTIME SWIGINTERN
00182 #endif
00183 
00184 #ifndef SWIGRUNTIMEINLINE
00185 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
00186 #endif
00187 
00188 /*  Generic buffer size */
00189 #ifndef SWIG_BUFFER_SIZE
00190 # define SWIG_BUFFER_SIZE 1024
00191 #endif
00192 
00193 /* Flags for pointer conversions */
00194 #define SWIG_POINTER_DISOWN        0x1
00195 #define SWIG_CAST_NEW_MEMORY       0x2
00196 
00197 /* Flags for new pointer objects */
00198 #define SWIG_POINTER_OWN           0x1
00199 
00200 
00201 /* 
00202    Flags/methods for returning states.
00203    
00204    The SWIG conversion methods, as ConvertPtr, return and integer 
00205    that tells if the conversion was successful or not. And if not,
00206    an error code can be returned (see swigerrors.swg for the codes).
00207    
00208    Use the following macros/flags to set or process the returning
00209    states.
00210    
00211    In old versions of SWIG, code such as the following was usually written:
00212 
00213      if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
00214        // success code
00215      } else {
00216        //fail code
00217      }
00218 
00219    Now you can be more explicit:
00220 
00221     int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
00222     if (SWIG_IsOK(res)) {
00223       // success code
00224     } else {
00225       // fail code
00226     }
00227 
00228    which is the same really, but now you can also do
00229 
00230     Type *ptr;
00231     int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
00232     if (SWIG_IsOK(res)) {
00233       // success code
00234       if (SWIG_IsNewObj(res) {
00235         ...
00236        delete *ptr;
00237       } else {
00238         ...
00239       }
00240     } else {
00241       // fail code
00242     }
00243     
00244    I.e., now SWIG_ConvertPtr can return new objects and you can
00245    identify the case and take care of the deallocation. Of course that
00246    also requires SWIG_ConvertPtr to return new result values, such as
00247 
00248       int SWIG_ConvertPtr(obj, ptr,...) {         
00249         if (<obj is ok>) {                       
00250           if (<need new object>) {               
00251             *ptr = <ptr to new allocated object>; 
00252             return SWIG_NEWOBJ;                  
00253           } else {                               
00254             *ptr = <ptr to old object>;          
00255             return SWIG_OLDOBJ;                  
00256           }                               
00257         } else {                                 
00258           return SWIG_BADOBJ;                    
00259         }                                        
00260       }
00261 
00262    Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
00263    more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
00264    SWIG errors code.
00265 
00266    Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
00267    allows to return the 'cast rank', for example, if you have this
00268 
00269        int food(double)
00270        int fooi(int);
00271 
00272    and you call
00273  
00274       food(1)   // cast rank '1'  (1 -> 1.0)
00275       fooi(1)   // cast rank '0'
00276 
00277    just use the SWIG_AddCast()/SWIG_CheckState()
00278 */
00279 
00280 #define SWIG_OK                    (0) 
00281 #define SWIG_ERROR                 (-1)
00282 #define SWIG_IsOK(r)               (r >= 0)
00283 #define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
00284 
00285 /* The CastRankLimit says how many bits are used for the cast rank */
00286 #define SWIG_CASTRANKLIMIT         (1 << 8)
00287 /* The NewMask denotes the object was created (using new/malloc) */
00288 #define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
00289 /* The TmpMask is for in/out typemaps that use temporal objects */
00290 #define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
00291 /* Simple returning values */
00292 #define SWIG_BADOBJ                (SWIG_ERROR)
00293 #define SWIG_OLDOBJ                (SWIG_OK)
00294 #define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
00295 #define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
00296 /* Check, add and del mask methods */
00297 #define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
00298 #define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
00299 #define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
00300 #define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
00301 #define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
00302 #define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
00303 
00304 /* Cast-Rank Mode */
00305 #if defined(SWIG_CASTRANK_MODE)
00306 #  ifndef SWIG_TypeRank
00307 #    define SWIG_TypeRank             unsigned long
00308 #  endif
00309 #  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
00310 #    define SWIG_MAXCASTRANK          (2)
00311 #  endif
00312 #  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
00313 #  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
00314 SWIGINTERNINLINE int SWIG_AddCast(int r) { 
00315   return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
00316 }
00317 SWIGINTERNINLINE int SWIG_CheckState(int r) { 
00318   return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
00319 }
00320 #else /* no cast-rank mode */
00321 #  define SWIG_AddCast
00322 #  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
00323 #endif
00324 
00325 
00326 #include <string.h>
00327 
00328 #ifdef __cplusplus
00329 extern "C" {
00330 #endif
00331 
00332 typedef void *(*swig_converter_func)(void *, int *);
00333 typedef struct swig_type_info *(*swig_dycast_func)(void **);
00334 
00335 /* Structure to store information on one type */
00336 typedef struct swig_type_info {
00337   const char             *name;                  /* mangled name of this type */
00338   const char             *str;                   /* human readable name of this type */
00339   swig_dycast_func        dcast;          /* dynamic cast function down a hierarchy */
00340   struct swig_cast_info  *cast;                  /* linked list of types that can cast into this type */
00341   void                   *clientdata;            /* language specific type data */
00342   int                    owndata;         /* flag if the structure owns the clientdata */
00343 } swig_type_info;
00344 
00345 /* Structure to store a type and conversion function used for casting */
00346 typedef struct swig_cast_info {
00347   swig_type_info         *type;                  /* pointer to type that is equivalent to this type */
00348   swig_converter_func     converter;             /* function to cast the void pointers */
00349   struct swig_cast_info  *next;                  /* pointer to next cast in linked list */
00350   struct swig_cast_info  *prev;                  /* pointer to the previous cast */
00351 } swig_cast_info;
00352 
00353 /* Structure used to store module information
00354  * Each module generates one structure like this, and the runtime collects
00355  * all of these structures and stores them in a circularly linked list.*/
00356 typedef struct swig_module_info {
00357   swig_type_info         **types;         /* Array of pointers to swig_type_info structures that are in this module */
00358   size_t                 size;                    /* Number of types in this module */
00359   struct swig_module_info *next;          /* Pointer to next element in circularly linked list */
00360   swig_type_info         **type_initial;  /* Array of initially generated type structures */
00361   swig_cast_info         **cast_initial;  /* Array of initially generated casting structures */
00362   void                    *clientdata;           /* Language specific module data */
00363 } swig_module_info;
00364 
00365 /* 
00366   Compare two type names skipping the space characters, therefore
00367   "char*" == "char *" and "Class<int>" == "Class<int >", etc.
00368 
00369   Return 0 when the two name types are equivalent, as in
00370   strncmp, but skipping ' '.
00371 */
00372 SWIGRUNTIME int
00373 SWIG_TypeNameComp(const char *f1, const char *l1,
00374                 const char *f2, const char *l2) {
00375   for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
00376     while ((*f1 == ' ') && (f1 != l1)) ++f1;
00377     while ((*f2 == ' ') && (f2 != l2)) ++f2;
00378     if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
00379   }
00380   return (int)((l1 - f1) - (l2 - f2));
00381 }
00382 
00383 /*
00384   Check type equivalence in a name list like <name1>|<name2>|...
00385   Return 0 if not equal, 1 if equal
00386 */
00387 SWIGRUNTIME int
00388 SWIG_TypeEquiv(const char *nb, const char *tb) {
00389   int equiv = 0;
00390   const char* te = tb + strlen(tb);
00391   const char* ne = nb;
00392   while (!equiv && *ne) {
00393     for (nb = ne; *ne; ++ne) {
00394       if (*ne == '|') break;
00395     }
00396     equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
00397     if (*ne) ++ne;
00398   }
00399   return equiv;
00400 }
00401 
00402 /*
00403   Check type equivalence in a name list like <name1>|<name2>|...
00404   Return 0 if equal, -1 if nb < tb, 1 if nb > tb
00405 */
00406 SWIGRUNTIME int
00407 SWIG_TypeCompare(const char *nb, const char *tb) {
00408   int equiv = 0;
00409   const char* te = tb + strlen(tb);
00410   const char* ne = nb;
00411   while (!equiv && *ne) {
00412     for (nb = ne; *ne; ++ne) {
00413       if (*ne == '|') break;
00414     }
00415     equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
00416     if (*ne) ++ne;
00417   }
00418   return equiv;
00419 }
00420 
00421 
00422 /*
00423   Check the typename
00424 */
00425 SWIGRUNTIME swig_cast_info *
00426 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
00427   if (ty) {
00428     swig_cast_info *iter = ty->cast;
00429     while (iter) {
00430       if (strcmp(iter->type->name, c) == 0) {
00431         if (iter == ty->cast)
00432           return iter;
00433         /* Move iter to the top of the linked list */
00434         iter->prev->next = iter->next;
00435         if (iter->next)
00436           iter->next->prev = iter->prev;
00437         iter->next = ty->cast;
00438         iter->prev = 0;
00439         if (ty->cast) ty->cast->prev = iter;
00440         ty->cast = iter;
00441         return iter;
00442       }
00443       iter = iter->next;
00444     }
00445   }
00446   return 0;
00447 }
00448 
00449 /* 
00450   Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
00451 */
00452 SWIGRUNTIME swig_cast_info *
00453 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
00454   if (ty) {
00455     swig_cast_info *iter = ty->cast;
00456     while (iter) {
00457       if (iter->type == from) {
00458         if (iter == ty->cast)
00459           return iter;
00460         /* Move iter to the top of the linked list */
00461         iter->prev->next = iter->next;
00462         if (iter->next)
00463           iter->next->prev = iter->prev;
00464         iter->next = ty->cast;
00465         iter->prev = 0;
00466         if (ty->cast) ty->cast->prev = iter;
00467         ty->cast = iter;
00468         return iter;
00469       }
00470       iter = iter->next;
00471     }
00472   }
00473   return 0;
00474 }
00475 
00476 /*
00477   Cast a pointer up an inheritance hierarchy
00478 */
00479 SWIGRUNTIMEINLINE void *
00480 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
00481   return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
00482 }
00483 
00484 /* 
00485    Dynamic pointer casting. Down an inheritance hierarchy
00486 */
00487 SWIGRUNTIME swig_type_info *
00488 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
00489   swig_type_info *lastty = ty;
00490   if (!ty || !ty->dcast) return ty;
00491   while (ty && (ty->dcast)) {
00492     ty = (*ty->dcast)(ptr);
00493     if (ty) lastty = ty;
00494   }
00495   return lastty;
00496 }
00497 
00498 /*
00499   Return the name associated with this type
00500 */
00501 SWIGRUNTIMEINLINE const char *
00502 SWIG_TypeName(const swig_type_info *ty) {
00503   return ty->name;
00504 }
00505 
00506 /*
00507   Return the pretty name associated with this type,
00508   that is an unmangled type name in a form presentable to the user.
00509 */
00510 SWIGRUNTIME const char *
00511 SWIG_TypePrettyName(const swig_type_info *type) {
00512   /* The "str" field contains the equivalent pretty names of the
00513      type, separated by vertical-bar characters.  We choose
00514      to print the last name, as it is often (?) the most
00515      specific. */
00516   if (!type) return NULL;
00517   if (type->str != NULL) {
00518     const char *last_name = type->str;
00519     const char *s;
00520     for (s = type->str; *s; s++)
00521       if (*s == '|') last_name = s+1;
00522     return last_name;
00523   }
00524   else
00525     return type->name;
00526 }
00527 
00528 /* 
00529    Set the clientdata field for a type
00530 */
00531 SWIGRUNTIME void
00532 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
00533   swig_cast_info *cast = ti->cast;
00534   /* if (ti->clientdata == clientdata) return; */
00535   ti->clientdata = clientdata;
00536   
00537   while (cast) {
00538     if (!cast->converter) {
00539       swig_type_info *tc = cast->type;
00540       if (!tc->clientdata) {
00541        SWIG_TypeClientData(tc, clientdata);
00542       }
00543     }    
00544     cast = cast->next;
00545   }
00546 }
00547 SWIGRUNTIME void
00548 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
00549   SWIG_TypeClientData(ti, clientdata);
00550   ti->owndata = 1;
00551 }
00552   
00553 /*
00554   Search for a swig_type_info structure only by mangled name
00555   Search is a O(log #types)
00556   
00557   We start searching at module start, and finish searching when start == end.  
00558   Note: if start == end at the beginning of the function, we go all the way around
00559   the circular list.
00560 */
00561 SWIGRUNTIME swig_type_info *
00562 SWIG_MangledTypeQueryModule(swig_module_info *start, 
00563                             swig_module_info *end, 
00564                           const char *name) {
00565   swig_module_info *iter = start;
00566   do {
00567     if (iter->size) {
00568       register size_t l = 0;
00569       register size_t r = iter->size - 1;
00570       do {
00571        /* since l+r >= 0, we can (>> 1) instead (/ 2) */
00572        register size_t i = (l + r) >> 1; 
00573        const char *iname = iter->types[i]->name;
00574        if (iname) {
00575          register int compare = strcmp(name, iname);
00576          if (compare == 0) {           
00577            return iter->types[i];
00578          } else if (compare < 0) {
00579            if (i) {
00580              r = i - 1;
00581            } else {
00582              break;
00583            }
00584          } else if (compare > 0) {
00585            l = i + 1;
00586          }
00587        } else {
00588          break; /* should never happen */
00589        }
00590       } while (l <= r);
00591     }
00592     iter = iter->next;
00593   } while (iter != end);
00594   return 0;
00595 }
00596 
00597 /*
00598   Search for a swig_type_info structure for either a mangled name or a human readable name.
00599   It first searches the mangled names of the types, which is a O(log #types)
00600   If a type is not found it then searches the human readable names, which is O(#types).
00601   
00602   We start searching at module start, and finish searching when start == end.  
00603   Note: if start == end at the beginning of the function, we go all the way around
00604   the circular list.
00605 */
00606 SWIGRUNTIME swig_type_info *
00607 SWIG_TypeQueryModule(swig_module_info *start, 
00608                      swig_module_info *end, 
00609                    const char *name) {
00610   /* STEP 1: Search the name field using binary search */
00611   swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
00612   if (ret) {
00613     return ret;
00614   } else {
00615     /* STEP 2: If the type hasn't been found, do a complete search
00616        of the str field (the human readable name) */
00617     swig_module_info *iter = start;
00618     do {
00619       register size_t i = 0;
00620       for (; i < iter->size; ++i) {
00621        if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
00622          return iter->types[i];
00623       }
00624       iter = iter->next;
00625     } while (iter != end);
00626   }
00627   
00628   /* neither found a match */
00629   return 0;
00630 }
00631 
00632 /* 
00633    Pack binary data into a string
00634 */
00635 SWIGRUNTIME char *
00636 SWIG_PackData(char *c, void *ptr, size_t sz) {
00637   static const char hex[17] = "0123456789abcdef";
00638   register const unsigned char *u = (unsigned char *) ptr;
00639   register const unsigned char *eu =  u + sz;
00640   for (; u != eu; ++u) {
00641     register unsigned char uu = *u;
00642     *(c++) = hex[(uu & 0xf0) >> 4];
00643     *(c++) = hex[uu & 0xf];
00644   }
00645   return c;
00646 }
00647 
00648 /* 
00649    Unpack binary data from a string
00650 */
00651 SWIGRUNTIME const char *
00652 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
00653   register unsigned char *u = (unsigned char *) ptr;
00654   register const unsigned char *eu = u + sz;
00655   for (; u != eu; ++u) {
00656     register char d = *(c++);
00657     register unsigned char uu;
00658     if ((d >= '0') && (d <= '9'))
00659       uu = ((d - '0') << 4);
00660     else if ((d >= 'a') && (d <= 'f'))
00661       uu = ((d - ('a'-10)) << 4);
00662     else 
00663       return (char *) 0;
00664     d = *(c++);
00665     if ((d >= '0') && (d <= '9'))
00666       uu |= (d - '0');
00667     else if ((d >= 'a') && (d <= 'f'))
00668       uu |= (d - ('a'-10));
00669     else 
00670       return (char *) 0;
00671     *u = uu;
00672   }
00673   return c;
00674 }
00675 
00676 /* 
00677    Pack 'void *' into a string buffer.
00678 */
00679 SWIGRUNTIME char *
00680 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
00681   char *r = buff;
00682   if ((2*sizeof(void *) + 2) > bsz) return 0;
00683   *(r++) = '_';
00684   r = SWIG_PackData(r,&ptr,sizeof(void *));
00685   if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
00686   strcpy(r,name);
00687   return buff;
00688 }
00689 
00690 SWIGRUNTIME const char *
00691 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
00692   if (*c != '_') {
00693     if (strcmp(c,"NULL") == 0) {
00694       *ptr = (void *) 0;
00695       return name;
00696     } else {
00697       return 0;
00698     }
00699   }
00700   return SWIG_UnpackData(++c,ptr,sizeof(void *));
00701 }
00702 
00703 SWIGRUNTIME char *
00704 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
00705   char *r = buff;
00706   size_t lname = (name ? strlen(name) : 0);
00707   if ((2*sz + 2 + lname) > bsz) return 0;
00708   *(r++) = '_';
00709   r = SWIG_PackData(r,ptr,sz);
00710   if (lname) {
00711     strncpy(r,name,lname+1);
00712   } else {
00713     *r = 0;
00714   }
00715   return buff;
00716 }
00717 
00718 SWIGRUNTIME const char *
00719 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
00720   if (*c != '_') {
00721     if (strcmp(c,"NULL") == 0) {
00722       memset(ptr,0,sz);
00723       return name;
00724     } else {
00725       return 0;
00726     }
00727   }
00728   return SWIG_UnpackData(++c,ptr,sz);
00729 }
00730 
00731 #ifdef __cplusplus
00732 }
00733 #endif
00734 
00735 /*  Errors in SWIG */
00736 #define  SWIG_UnknownError            -1 
00737 #define  SWIG_IOError                 -2 
00738 #define  SWIG_RuntimeError            -3 
00739 #define  SWIG_IndexError              -4 
00740 #define  SWIG_TypeError               -5 
00741 #define  SWIG_DivisionByZero          -6 
00742 #define  SWIG_OverflowError           -7 
00743 #define  SWIG_SyntaxError             -8 
00744 #define  SWIG_ValueError              -9 
00745 #define  SWIG_SystemError             -10
00746 #define  SWIG_AttributeError          -11
00747 #define  SWIG_MemoryError             -12 
00748 #define  SWIG_NullReferenceError   -13
00749 
00750 
00751 
00752 /* Compatibility macros for Python 3 */
00753 #if PY_VERSION_HEX >= 0x03000000
00754 
00755 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
00756 #define PyInt_Check(x) PyLong_Check(x)
00757 #define PyInt_AsLong(x) PyLong_AsLong(x)
00758 #define PyInt_FromLong(x) PyLong_FromLong(x)
00759 #define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
00760 
00761 #endif
00762 
00763 #ifndef Py_TYPE
00764 #  define Py_TYPE(op) ((op)->ob_type)
00765 #endif
00766 
00767 /* SWIG APIs for compatibility of both Python 2 & 3 */
00768 
00769 #if PY_VERSION_HEX >= 0x03000000
00770 #  define SWIG_Python_str_FromFormat PyUnicode_FromFormat
00771 #else
00772 #  define SWIG_Python_str_FromFormat PyString_FromFormat
00773 #endif
00774 
00775 
00776 /* Warning: This function will allocate a new string in Python 3,
00777  * so please call SWIG_Python_str_DelForPy3(x) to free the space.
00778  */
00779 SWIGINTERN char*
00780 SWIG_Python_str_AsChar(PyObject *str)
00781 {
00782 #if PY_VERSION_HEX >= 0x03000000
00783   char *cstr;
00784   char *newstr;
00785   Py_ssize_t len;
00786   str = PyUnicode_AsUTF8String(str);
00787   PyBytes_AsStringAndSize(str, &cstr, &len);
00788   newstr = (char *) malloc(len+1);
00789   memcpy(newstr, cstr, len+1);
00790   Py_XDECREF(str);
00791   return newstr;
00792 #else
00793   return PyString_AsString(str);
00794 #endif
00795 }
00796 
00797 #if PY_VERSION_HEX >= 0x03000000
00798 #  define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
00799 #else
00800 #  define SWIG_Python_str_DelForPy3(x) 
00801 #endif
00802 
00803 
00804 SWIGINTERN PyObject*
00805 SWIG_Python_str_FromChar(const char *c)
00806 {
00807 #if PY_VERSION_HEX >= 0x03000000
00808   return PyUnicode_FromString(c); 
00809 #else
00810   return PyString_FromString(c);
00811 #endif
00812 }
00813 
00814 /* Add PyOS_snprintf for old Pythons */
00815 #if PY_VERSION_HEX < 0x02020000
00816 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
00817 #  define PyOS_snprintf _snprintf
00818 # else
00819 #  define PyOS_snprintf snprintf
00820 # endif
00821 #endif
00822 
00823 /* A crude PyString_FromFormat implementation for old Pythons */
00824 #if PY_VERSION_HEX < 0x02020000
00825 
00826 #ifndef SWIG_PYBUFFER_SIZE
00827 # define SWIG_PYBUFFER_SIZE 1024
00828 #endif
00829 
00830 static PyObject *
00831 PyString_FromFormat(const char *fmt, ...) {
00832   va_list ap;
00833   char buf[SWIG_PYBUFFER_SIZE * 2];
00834   int res;
00835   va_start(ap, fmt);
00836   res = vsnprintf(buf, sizeof(buf), fmt, ap);
00837   va_end(ap);
00838   return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
00839 }
00840 #endif
00841 
00842 /* Add PyObject_Del for old Pythons */
00843 #if PY_VERSION_HEX < 0x01060000
00844 # define PyObject_Del(op) PyMem_DEL((op))
00845 #endif
00846 #ifndef PyObject_DEL
00847 # define PyObject_DEL PyObject_Del
00848 #endif
00849 
00850 /* A crude PyExc_StopIteration exception for old Pythons */
00851 #if PY_VERSION_HEX < 0x02020000
00852 # ifndef PyExc_StopIteration
00853 #  define PyExc_StopIteration PyExc_RuntimeError
00854 # endif
00855 # ifndef PyObject_GenericGetAttr
00856 #  define PyObject_GenericGetAttr 0
00857 # endif
00858 #endif
00859 
00860 /* Py_NotImplemented is defined in 2.1 and up. */
00861 #if PY_VERSION_HEX < 0x02010000
00862 # ifndef Py_NotImplemented
00863 #  define Py_NotImplemented PyExc_RuntimeError
00864 # endif
00865 #endif
00866 
00867 /* A crude PyString_AsStringAndSize implementation for old Pythons */
00868 #if PY_VERSION_HEX < 0x02010000
00869 # ifndef PyString_AsStringAndSize
00870 #  define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
00871 # endif
00872 #endif
00873 
00874 /* PySequence_Size for old Pythons */
00875 #if PY_VERSION_HEX < 0x02000000
00876 # ifndef PySequence_Size
00877 #  define PySequence_Size PySequence_Length
00878 # endif
00879 #endif
00880 
00881 /* PyBool_FromLong for old Pythons */
00882 #if PY_VERSION_HEX < 0x02030000
00883 static
00884 PyObject *PyBool_FromLong(long ok)
00885 {
00886   PyObject *result = ok ? Py_True : Py_False;
00887   Py_INCREF(result);
00888   return result;
00889 }
00890 #endif
00891 
00892 /* Py_ssize_t for old Pythons */
00893 /* This code is as recommended by: */
00894 /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
00895 #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
00896 typedef int Py_ssize_t;
00897 # define PY_SSIZE_T_MAX INT_MAX
00898 # define PY_SSIZE_T_MIN INT_MIN
00899 #endif
00900 
00901 /* -----------------------------------------------------------------------------
00902  * error manipulation
00903  * ----------------------------------------------------------------------------- */
00904 
00905 SWIGRUNTIME PyObject*
00906 SWIG_Python_ErrorType(int code) {
00907   PyObject* type = 0;
00908   switch(code) {
00909   case SWIG_MemoryError:
00910     type = PyExc_MemoryError;
00911     break;
00912   case SWIG_IOError:
00913     type = PyExc_IOError;
00914     break;
00915   case SWIG_RuntimeError:
00916     type = PyExc_RuntimeError;
00917     break;
00918   case SWIG_IndexError:
00919     type = PyExc_IndexError;
00920     break;
00921   case SWIG_TypeError:
00922     type = PyExc_TypeError;
00923     break;
00924   case SWIG_DivisionByZero:
00925     type = PyExc_ZeroDivisionError;
00926     break;
00927   case SWIG_OverflowError:
00928     type = PyExc_OverflowError;
00929     break;
00930   case SWIG_SyntaxError:
00931     type = PyExc_SyntaxError;
00932     break;
00933   case SWIG_ValueError:
00934     type = PyExc_ValueError;
00935     break;
00936   case SWIG_SystemError:
00937     type = PyExc_SystemError;
00938     break;
00939   case SWIG_AttributeError:
00940     type = PyExc_AttributeError;
00941     break;
00942   default:
00943     type = PyExc_RuntimeError;
00944   }
00945   return type;
00946 }
00947 
00948 
00949 SWIGRUNTIME void
00950 SWIG_Python_AddErrorMsg(const char* mesg)
00951 {
00952   PyObject *type = 0;
00953   PyObject *value = 0;
00954   PyObject *traceback = 0;
00955 
00956   if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
00957   if (value) {
00958     char *tmp;
00959     PyObject *old_str = PyObject_Str(value);
00960     PyErr_Clear();
00961     Py_XINCREF(type);
00962 
00963     PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
00964     SWIG_Python_str_DelForPy3(tmp);
00965     Py_DECREF(old_str);
00966     Py_DECREF(value);
00967   } else {
00968     PyErr_SetString(PyExc_RuntimeError, mesg);
00969   }
00970 }
00971 
00972 #if defined(SWIG_PYTHON_NO_THREADS)
00973 #  if defined(SWIG_PYTHON_THREADS)
00974 #    undef SWIG_PYTHON_THREADS
00975 #  endif
00976 #endif
00977 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
00978 #  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
00979 #    if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
00980 #      define SWIG_PYTHON_USE_GIL
00981 #    endif
00982 #  endif
00983 #  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
00984 #    ifndef SWIG_PYTHON_INITIALIZE_THREADS
00985 #     define SWIG_PYTHON_INITIALIZE_THREADS  PyEval_InitThreads() 
00986 #    endif
00987 #    ifdef __cplusplus /* C++ code */
00988        class SWIG_Python_Thread_Block {
00989          bool status;
00990          PyGILState_STATE state;
00991        public:
00992          void end() { if (status) { PyGILState_Release(state); status = false;} }
00993          SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
00994          ~SWIG_Python_Thread_Block() { end(); }
00995        };
00996        class SWIG_Python_Thread_Allow {
00997          bool status;
00998          PyThreadState *save;
00999        public:
01000          void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
01001          SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
01002          ~SWIG_Python_Thread_Allow() { end(); }
01003        };
01004 #      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
01005 #      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
01006 #      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
01007 #      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
01008 #    else /* C code */
01009 #      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
01010 #      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
01011 #      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
01012 #      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
01013 #    endif
01014 #  else /* Old thread way, not implemented, user must provide it */
01015 #    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
01016 #      define SWIG_PYTHON_INITIALIZE_THREADS
01017 #    endif
01018 #    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
01019 #      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
01020 #    endif
01021 #    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
01022 #      define SWIG_PYTHON_THREAD_END_BLOCK
01023 #    endif
01024 #    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
01025 #      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
01026 #    endif
01027 #    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
01028 #      define SWIG_PYTHON_THREAD_END_ALLOW
01029 #    endif
01030 #  endif
01031 #else /* No thread support */
01032 #  define SWIG_PYTHON_INITIALIZE_THREADS
01033 #  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
01034 #  define SWIG_PYTHON_THREAD_END_BLOCK
01035 #  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
01036 #  define SWIG_PYTHON_THREAD_END_ALLOW
01037 #endif
01038 
01039 /* -----------------------------------------------------------------------------
01040  * Python API portion that goes into the runtime
01041  * ----------------------------------------------------------------------------- */
01042 
01043 #ifdef __cplusplus
01044 extern "C" {
01045 #if 0
01046 } /* cc-mode */
01047 #endif
01048 #endif
01049 
01050 /* -----------------------------------------------------------------------------
01051  * Constant declarations
01052  * ----------------------------------------------------------------------------- */
01053 
01054 /* Constant Types */
01055 #define SWIG_PY_POINTER 4
01056 #define SWIG_PY_BINARY  5
01057 
01058 /* Constant information structure */
01059 typedef struct swig_const_info {
01060   int type;
01061   char *name;
01062   long lvalue;
01063   double dvalue;
01064   void   *pvalue;
01065   swig_type_info **ptype;
01066 } swig_const_info;
01067 
01068 
01069 /* -----------------------------------------------------------------------------
01070  * Wrapper of PyInstanceMethod_New() used in Python 3
01071  * It is exported to the generated module, used for -fastproxy
01072  * ----------------------------------------------------------------------------- */
01073 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
01074 {
01075 #if PY_VERSION_HEX >= 0x03000000
01076   return PyInstanceMethod_New(func);
01077 #else
01078   return NULL;
01079 #endif
01080 }
01081 
01082 #ifdef __cplusplus
01083 #if 0
01084 { /* cc-mode */
01085 #endif
01086 }
01087 #endif
01088 
01089 
01090 /* -----------------------------------------------------------------------------
01091  * See the LICENSE file for information on copyright, usage and redistribution
01092  * of SWIG, and the README file for authors - http://www.swig.org/release.html.
01093  *
01094  * pyrun.swg
01095  *
01096  * This file contains the runtime support for Python modules
01097  * and includes code for managing global variables and pointer
01098  * type checking.
01099  *
01100  * ----------------------------------------------------------------------------- */
01101 
01102 /* Common SWIG API */
01103 
01104 /* for raw pointers */
01105 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
01106 #define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
01107 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
01108 #define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(ptr, type, flags)
01109 #define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
01110 #define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
01111 #define swig_owntype                                    int
01112 
01113 /* for raw packed data */
01114 #define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
01115 #define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
01116 
01117 /* for class or struct pointers */
01118 #define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
01119 #define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
01120 
01121 /* for C or C++ function pointers */
01122 #define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
01123 #define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(ptr, type, 0)
01124 
01125 /* for C++ member pointers, ie, member methods */
01126 #define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
01127 #define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
01128 
01129 
01130 /* Runtime API */
01131 
01132 #define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule()
01133 #define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
01134 #define SWIG_NewClientData(obj)                         SwigPyClientData_New(obj)
01135 
01136 #define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                            
01137 #define SWIG_SetErrorMsg                         SWIG_Python_SetErrorMsg                             
01138 #define SWIG_ErrorType(code)                     SWIG_Python_ErrorType(code)                        
01139 #define SWIG_Error(code, msg)                    SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
01140 #define SWIG_fail                                goto fail                                    
01141 
01142 
01143 /* Runtime API implementation */
01144 
01145 /* Error manipulation */
01146 
01147 SWIGINTERN void 
01148 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
01149   SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
01150   PyErr_SetObject(errtype, obj);
01151   Py_DECREF(obj);
01152   SWIG_PYTHON_THREAD_END_BLOCK;
01153 }
01154 
01155 SWIGINTERN void 
01156 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
01157   SWIG_PYTHON_THREAD_BEGIN_BLOCK;
01158   PyErr_SetString(errtype, (char *) msg);
01159   SWIG_PYTHON_THREAD_END_BLOCK;
01160 }
01161 
01162 #define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
01163 
01164 /* Set a constant value */
01165 
01166 SWIGINTERN void
01167 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
01168   PyDict_SetItemString(d, (char*) name, obj);
01169   Py_DECREF(obj);                            
01170 }
01171 
01172 /* Append a value to the result obj */
01173 
01174 SWIGINTERN PyObject*
01175 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
01176 #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
01177   if (!result) {
01178     result = obj;
01179   } else if (result == Py_None) {
01180     Py_DECREF(result);
01181     result = obj;
01182   } else {
01183     if (!PyList_Check(result)) {
01184       PyObject *o2 = result;
01185       result = PyList_New(1);
01186       PyList_SetItem(result, 0, o2);
01187     }
01188     PyList_Append(result,obj);
01189     Py_DECREF(obj);
01190   }
01191   return result;
01192 #else
01193   PyObject*   o2;
01194   PyObject*   o3;
01195   if (!result) {
01196     result = obj;
01197   } else if (result == Py_None) {
01198     Py_DECREF(result);
01199     result = obj;
01200   } else {
01201     if (!PyTuple_Check(result)) {
01202       o2 = result;
01203       result = PyTuple_New(1);
01204       PyTuple_SET_ITEM(result, 0, o2);
01205     }
01206     o3 = PyTuple_New(1);
01207     PyTuple_SET_ITEM(o3, 0, obj);
01208     o2 = result;
01209     result = PySequence_Concat(o2, o3);
01210     Py_DECREF(o2);
01211     Py_DECREF(o3);
01212   }
01213   return result;
01214 #endif
01215 }
01216 
01217 /* Unpack the argument tuple */
01218 
01219 SWIGINTERN int
01220 SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
01221 {
01222   if (!args) {
01223     if (!min && !max) {
01224       return 1;
01225     } else {
01226       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
01227                  name, (min == max ? "" : "at least "), (int)min);
01228       return 0;
01229     }
01230   }  
01231   if (!PyTuple_Check(args)) {
01232     PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
01233     return 0;
01234   } else {
01235     register Py_ssize_t l = PyTuple_GET_SIZE(args);
01236     if (l < min) {
01237       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
01238                  name, (min == max ? "" : "at least "), (int)min, (int)l);
01239       return 0;
01240     } else if (l > max) {
01241       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
01242                  name, (min == max ? "" : "at most "), (int)max, (int)l);
01243       return 0;
01244     } else {
01245       register int i;
01246       for (i = 0; i < l; ++i) {
01247        objs[i] = PyTuple_GET_ITEM(args, i);
01248       }
01249       for (; l < max; ++l) {
01250        objs[l] = 0;
01251       }
01252       return i + 1;
01253     }    
01254   }
01255 }
01256 
01257 /* A functor is a function object with one single object argument */
01258 #if PY_VERSION_HEX >= 0x02020000
01259 #define SWIG_Python_CallFunctor(functor, obj)            PyObject_CallFunctionObjArgs(functor, obj, NULL);
01260 #else
01261 #define SWIG_Python_CallFunctor(functor, obj)            PyObject_CallFunction(functor, "O", obj);
01262 #endif
01263 
01264 /*
01265   Helper for static pointer initialization for both C and C++ code, for example
01266   static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
01267 */
01268 #ifdef __cplusplus
01269 #define SWIG_STATIC_POINTER(var)  var
01270 #else
01271 #define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
01272 #endif
01273 
01274 /* -----------------------------------------------------------------------------
01275  * Pointer declarations
01276  * ----------------------------------------------------------------------------- */
01277 
01278 /* Flags for new pointer objects */
01279 #define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
01280 #define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
01281 
01282 #define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
01283 
01284 #ifdef __cplusplus
01285 extern "C" {
01286 #if 0
01287 } /* cc-mode */
01288 #endif
01289 #endif
01290 
01291 /*  How to access Py_None */
01292 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
01293 #  ifndef SWIG_PYTHON_NO_BUILD_NONE
01294 #    ifndef SWIG_PYTHON_BUILD_NONE
01295 #      define SWIG_PYTHON_BUILD_NONE
01296 #    endif
01297 #  endif
01298 #endif
01299 
01300 #ifdef SWIG_PYTHON_BUILD_NONE
01301 #  ifdef Py_None
01302 #   undef Py_None
01303 #   define Py_None SWIG_Py_None()
01304 #  endif
01305 SWIGRUNTIMEINLINE PyObject * 
01306 _SWIG_Py_None(void)
01307 {
01308   PyObject *none = Py_BuildValue((char*)"");
01309   Py_DECREF(none);
01310   return none;
01311 }
01312 SWIGRUNTIME PyObject * 
01313 SWIG_Py_None(void)
01314 {
01315   static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
01316   return none;
01317 }
01318 #endif
01319 
01320 /* The python void return value */
01321 
01322 SWIGRUNTIMEINLINE PyObject * 
01323 SWIG_Py_Void(void)
01324 {
01325   PyObject *none = Py_None;
01326   Py_INCREF(none);
01327   return none;
01328 }
01329 
01330 /* SwigPyClientData */
01331 
01332 typedef struct {
01333   PyObject *klass;
01334   PyObject *newraw;
01335   PyObject *newargs;
01336   PyObject *destroy;
01337   int delargs;
01338   int implicitconv;
01339 } SwigPyClientData;
01340 
01341 SWIGRUNTIMEINLINE int 
01342 SWIG_Python_CheckImplicit(swig_type_info *ty)
01343 {
01344   SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
01345   return data ? data->implicitconv : 0;
01346 }
01347 
01348 SWIGRUNTIMEINLINE PyObject *
01349 SWIG_Python_ExceptionType(swig_type_info *desc) {
01350   SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
01351   PyObject *klass = data ? data->klass : 0;
01352   return (klass ? klass : PyExc_RuntimeError);
01353 }
01354 
01355 
01356 SWIGRUNTIME SwigPyClientData * 
01357 SwigPyClientData_New(PyObject* obj)
01358 {
01359   if (!obj) {
01360     return 0;
01361   } else {
01362     SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
01363     /* the klass element */
01364     data->klass = obj;
01365     Py_INCREF(data->klass);
01366     /* the newraw method and newargs arguments used to create a new raw instance */
01367     if (PyClass_Check(obj)) {
01368       data->newraw = 0;
01369       data->newargs = obj;
01370       Py_INCREF(obj);
01371     } else {
01372 #if (PY_VERSION_HEX < 0x02020000)
01373       data->newraw = 0;
01374 #else
01375       data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
01376 #endif
01377       if (data->newraw) {
01378        Py_INCREF(data->newraw);
01379        data->newargs = PyTuple_New(1);
01380        PyTuple_SetItem(data->newargs, 0, obj);
01381       } else {
01382        data->newargs = obj;
01383       }
01384       Py_INCREF(data->newargs);
01385     }
01386     /* the destroy method, aka as the C++ delete method */
01387     data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
01388     if (PyErr_Occurred()) {
01389       PyErr_Clear();
01390       data->destroy = 0;
01391     }
01392     if (data->destroy) {
01393       int flags;
01394       Py_INCREF(data->destroy);
01395       flags = PyCFunction_GET_FLAGS(data->destroy);
01396 #ifdef METH_O
01397       data->delargs = !(flags & (METH_O));
01398 #else
01399       data->delargs = 0;
01400 #endif
01401     } else {
01402       data->delargs = 0;
01403     }
01404     data->implicitconv = 0;
01405     return data;
01406   }
01407 }
01408 
01409 SWIGRUNTIME void 
01410 SwigPyClientData_Del(SwigPyClientData* data)
01411 {
01412   Py_XDECREF(data->newraw);
01413   Py_XDECREF(data->newargs);
01414   Py_XDECREF(data->destroy);
01415 }
01416 
01417 /* =============== SwigPyObject =====================*/
01418 
01419 typedef struct {
01420   PyObject_HEAD
01421   void *ptr;
01422   swig_type_info *ty;
01423   int own;
01424   PyObject *next;
01425 } SwigPyObject;
01426 
01427 SWIGRUNTIME PyObject *
01428 SwigPyObject_long(SwigPyObject *v)
01429 {
01430   return PyLong_FromVoidPtr(v->ptr);
01431 }
01432 
01433 SWIGRUNTIME PyObject *
01434 SwigPyObject_format(const char* fmt, SwigPyObject *v)
01435 {
01436   PyObject *res = NULL;
01437   PyObject *args = PyTuple_New(1);
01438   if (args) {
01439     if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
01440       PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
01441       if (ofmt) {
01442 #if PY_VERSION_HEX >= 0x03000000
01443        res = PyUnicode_Format(ofmt,args);
01444 #else
01445        res = PyString_Format(ofmt,args);
01446 #endif
01447        Py_DECREF(ofmt);
01448       }
01449       Py_DECREF(args);
01450     }
01451   }
01452   return res;
01453 }
01454 
01455 SWIGRUNTIME PyObject *
01456 SwigPyObject_oct(SwigPyObject *v)
01457 {
01458   return SwigPyObject_format("%o",v);
01459 }
01460 
01461 SWIGRUNTIME PyObject *
01462 SwigPyObject_hex(SwigPyObject *v)
01463 {
01464   return SwigPyObject_format("%x",v);
01465 }
01466 
01467 SWIGRUNTIME PyObject *
01468 #ifdef METH_NOARGS
01469 SwigPyObject_repr(SwigPyObject *v)
01470 #else
01471 SwigPyObject_repr(SwigPyObject *v, PyObject *args)
01472 #endif
01473 {
01474   const char *name = SWIG_TypePrettyName(v->ty);
01475   PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, v);
01476   if (v->next) {
01477 #ifdef METH_NOARGS
01478     PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
01479 #else
01480     PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
01481 #endif
01482 #if PY_VERSION_HEX >= 0x03000000
01483     PyObject *joined = PyUnicode_Concat(repr, nrep);
01484     Py_DecRef(repr);
01485     Py_DecRef(nrep);
01486     repr = joined;
01487 #else
01488     PyString_ConcatAndDel(&repr,nrep);
01489 #endif
01490   }
01491   return repr;  
01492 }
01493 
01494 SWIGRUNTIME int
01495 SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
01496 {
01497   char *str;
01498 #ifdef METH_NOARGS
01499   PyObject *repr = SwigPyObject_repr(v);
01500 #else
01501   PyObject *repr = SwigPyObject_repr(v, NULL);
01502 #endif
01503   if (repr) {
01504     str = SWIG_Python_str_AsChar(repr); 
01505     fputs(str, fp);
01506     SWIG_Python_str_DelForPy3(str);
01507     Py_DECREF(repr);
01508     return 0; 
01509   } else {
01510     return 1; 
01511   }
01512 }
01513 
01514 SWIGRUNTIME PyObject *
01515 SwigPyObject_str(SwigPyObject *v)
01516 {
01517   char result[SWIG_BUFFER_SIZE];
01518   return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
01519     SWIG_Python_str_FromChar(result) : 0;
01520 }
01521 
01522 SWIGRUNTIME int
01523 SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
01524 {
01525   void *i = v->ptr;
01526   void *j = w->ptr;
01527   return (i < j) ? -1 : ((i > j) ? 1 : 0);
01528 }
01529 
01530 /* Added for Python 3.x, would it also be useful for Python 2.x? */
01531 SWIGRUNTIME PyObject*
01532 SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
01533 {
01534   PyObject* res;
01535   if( op != Py_EQ && op != Py_NE ) {
01536     Py_INCREF(Py_NotImplemented);
01537     return Py_NotImplemented;
01538   }
01539   if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) )
01540     res = Py_True;
01541   else
01542     res = Py_False;
01543   Py_INCREF(res);
01544   return res;  
01545 }
01546 
01547 
01548 SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
01549 
01550 SWIGRUNTIME PyTypeObject*
01551 SwigPyObject_type(void) {
01552   static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
01553   return type;
01554 }
01555 
01556 SWIGRUNTIMEINLINE int
01557 SwigPyObject_Check(PyObject *op) {
01558   return (Py_TYPE(op) == SwigPyObject_type())
01559     || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
01560 }
01561 
01562 SWIGRUNTIME PyObject *
01563 SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
01564 
01565 SWIGRUNTIME void
01566 SwigPyObject_dealloc(PyObject *v)
01567 {
01568   SwigPyObject *sobj = (SwigPyObject *) v;
01569   PyObject *next = sobj->next;
01570   if (sobj->own == SWIG_POINTER_OWN) {
01571     swig_type_info *ty = sobj->ty;
01572     SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
01573     PyObject *destroy = data ? data->destroy : 0;
01574     if (destroy) {
01575       /* destroy is always a VARARGS method */
01576       PyObject *res;
01577       if (data->delargs) {
01578        /* we need to create a temporary object to carry the destroy operation */
01579        PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
01580        res = SWIG_Python_CallFunctor(destroy, tmp);
01581        Py_DECREF(tmp);
01582       } else {
01583        PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
01584        PyObject *mself = PyCFunction_GET_SELF(destroy);
01585        res = ((*meth)(mself, v));
01586       }
01587       Py_XDECREF(res);
01588     } 
01589 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
01590     else {
01591       const char *name = SWIG_TypePrettyName(ty);
01592       printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
01593     }
01594 #endif
01595   } 
01596   Py_XDECREF(next);
01597   PyObject_DEL(v);
01598 }
01599 
01600 SWIGRUNTIME PyObject* 
01601 SwigPyObject_append(PyObject* v, PyObject* next)
01602 {
01603   SwigPyObject *sobj = (SwigPyObject *) v;
01604 #ifndef METH_O
01605   PyObject *tmp = 0;
01606   if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
01607   next = tmp;
01608 #endif
01609   if (!SwigPyObject_Check(next)) {
01610     return NULL;
01611   }
01612   sobj->next = next;
01613   Py_INCREF(next);
01614   return SWIG_Py_Void();
01615 }
01616 
01617 SWIGRUNTIME PyObject* 
01618 #ifdef METH_NOARGS
01619 SwigPyObject_next(PyObject* v)
01620 #else
01621 SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
01622 #endif
01623 {
01624   SwigPyObject *sobj = (SwigPyObject *) v;
01625   if (sobj->next) {    
01626     Py_INCREF(sobj->next);
01627     return sobj->next;
01628   } else {
01629     return SWIG_Py_Void();
01630   }
01631 }
01632 
01633 SWIGINTERN PyObject*
01634 #ifdef METH_NOARGS
01635 SwigPyObject_disown(PyObject *v)
01636 #else
01637 SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
01638 #endif
01639 {
01640   SwigPyObject *sobj = (SwigPyObject *)v;
01641   sobj->own = 0;
01642   return SWIG_Py_Void();
01643 }
01644 
01645 SWIGINTERN PyObject*
01646 #ifdef METH_NOARGS
01647 SwigPyObject_acquire(PyObject *v)
01648 #else
01649 SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
01650 #endif
01651 {
01652   SwigPyObject *sobj = (SwigPyObject *)v;
01653   sobj->own = SWIG_POINTER_OWN;
01654   return SWIG_Py_Void();
01655 }
01656 
01657 SWIGINTERN PyObject*
01658 SwigPyObject_own(PyObject *v, PyObject *args)
01659 {
01660   PyObject *val = 0;
01661 #if (PY_VERSION_HEX < 0x02020000)
01662   if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
01663 #else
01664   if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
01665 #endif
01666     {
01667       return NULL;
01668     } 
01669   else
01670     {
01671       SwigPyObject *sobj = (SwigPyObject *)v;
01672       PyObject *obj = PyBool_FromLong(sobj->own);
01673       if (val) {
01674 #ifdef METH_NOARGS
01675        if (PyObject_IsTrue(val)) {
01676          SwigPyObject_acquire(v);
01677        } else {
01678          SwigPyObject_disown(v);
01679        }
01680 #else
01681        if (PyObject_IsTrue(val)) {
01682          SwigPyObject_acquire(v,args);
01683        } else {
01684          SwigPyObject_disown(v,args);
01685        }
01686 #endif
01687       } 
01688       return obj;
01689     }
01690 }
01691 
01692 #ifdef METH_O
01693 static PyMethodDef
01694 swigobject_methods[] = {
01695   {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
01696   {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS,  (char *)"aquires ownership of the pointer"},
01697   {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
01698   {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_O,       (char *)"appends another 'this' object"},
01699   {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
01700   {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
01701   {0, 0, 0, 0}  
01702 };
01703 #else
01704 static PyMethodDef
01705 swigobject_methods[] = {
01706   {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
01707   {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS,  (char *)"aquires ownership of the pointer"},
01708   {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
01709   {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
01710   {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
01711   {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
01712   {0, 0, 0, 0}  
01713 };
01714 #endif
01715 
01716 #if PY_VERSION_HEX < 0x02020000
01717 SWIGINTERN PyObject *
01718 SwigPyObject_getattr(SwigPyObject *sobj,char *name)
01719 {
01720   return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
01721 }
01722 #endif
01723 
01724 SWIGRUNTIME PyTypeObject*
01725 _PySwigObject_type(void) {
01726   static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
01727   
01728   static PyNumberMethods SwigPyObject_as_number = {
01729     (binaryfunc)0, /*nb_add*/
01730     (binaryfunc)0, /*nb_subtract*/
01731     (binaryfunc)0, /*nb_multiply*/
01732     /* nb_divide removed in Python 3 */
01733 #if PY_VERSION_HEX < 0x03000000
01734     (binaryfunc)0, /*nb_divide*/
01735 #endif
01736     (binaryfunc)0, /*nb_remainder*/
01737     (binaryfunc)0, /*nb_divmod*/
01738     (ternaryfunc)0,/*nb_power*/
01739     (unaryfunc)0,  /*nb_negative*/
01740     (unaryfunc)0,  /*nb_positive*/
01741     (unaryfunc)0,  /*nb_absolute*/
01742     (inquiry)0,    /*nb_nonzero*/
01743     0,           /*nb_invert*/
01744     0,           /*nb_lshift*/
01745     0,           /*nb_rshift*/
01746     0,           /*nb_and*/
01747     0,           /*nb_xor*/
01748     0,           /*nb_or*/
01749 #if PY_VERSION_HEX < 0x03000000
01750     0,   /*nb_coerce*/
01751 #endif
01752     (unaryfunc)SwigPyObject_long, /*nb_int*/
01753 #if PY_VERSION_HEX < 0x03000000
01754     (unaryfunc)SwigPyObject_long, /*nb_long*/
01755 #else
01756     0, /*nb_reserved*/
01757 #endif
01758     (unaryfunc)0,                 /*nb_float*/
01759 #if PY_VERSION_HEX < 0x03000000
01760     (unaryfunc)SwigPyObject_oct,  /*nb_oct*/
01761     (unaryfunc)SwigPyObject_hex,  /*nb_hex*/
01762 #endif
01763 #if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
01764     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
01765 #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
01766     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
01767 #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
01768     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
01769 #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
01770     0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
01771 #endif
01772   };
01773 
01774   static PyTypeObject swigpyobject_type;  
01775   static int type_init = 0;
01776   if (!type_init) {
01777     const PyTypeObject tmp
01778       = {
01779        /* PyObject header changed in Python 3 */
01780 #if PY_VERSION_HEX >= 0x03000000
01781        PyVarObject_HEAD_INIT(&PyType_Type, 0)
01782 #else    
01783        PyObject_HEAD_INIT(NULL)
01784        0,                              /* ob_size */
01785 #endif
01786        (char *)"SwigPyObject",                /* tp_name */
01787        sizeof(SwigPyObject),                  /* tp_basicsize */
01788        0,                               /* tp_itemsize */
01789        (destructor)SwigPyObject_dealloc,   /* tp_dealloc */
01790        (printfunc)SwigPyObject_print,         /* tp_print */
01791 #if PY_VERSION_HEX < 0x02020000
01792        (getattrfunc)SwigPyObject_getattr,  /* tp_getattr */ 
01793 #else
01794        (getattrfunc)0,                        /* tp_getattr */ 
01795 #endif
01796        (setattrfunc)0,                        /* tp_setattr */ 
01797 #if PY_VERSION_HEX >= 0x03000000
01798     0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
01799 #else
01800        (cmpfunc)SwigPyObject_compare,         /* tp_compare */
01801 #endif
01802        (reprfunc)SwigPyObject_repr,           /* tp_repr */    
01803        &SwigPyObject_as_number,        /* tp_as_number */
01804        0,                              /* tp_as_sequence */
01805        0,                              /* tp_as_mapping */
01806        (hashfunc)0,                    /* tp_hash */
01807        (ternaryfunc)0,                        /* tp_call */
01808        (reprfunc)SwigPyObject_str,     /* tp_str */
01809        PyObject_GenericGetAttr,            /* tp_getattro */
01810        0,                              /* tp_setattro */
01811        0,                                /* tp_as_buffer */
01812        Py_TPFLAGS_DEFAULT,              /* tp_flags */
01813        swigobject_doc,                  /* tp_doc */        
01814        0,                                  /* tp_traverse */
01815        0,                                  /* tp_clear */
01816        (richcmpfunc)SwigPyObject_richcompare,           /* tp_richcompare */
01817        0,                                  /* tp_weaklistoffset */
01818 #if PY_VERSION_HEX >= 0x02020000
01819        0,                                  /* tp_iter */
01820        0,                                  /* tp_iternext */
01821        swigobject_methods,             /* tp_methods */ 
01822        0,                               /* tp_members */
01823        0,                              /* tp_getset */         
01824        0,                               /* tp_base */           
01825        0,                              /* tp_dict */           
01826        0,                              /* tp_descr_get */      
01827        0,                              /* tp_descr_set */      
01828        0,                              /* tp_dictoffset */     
01829        0,                              /* tp_init */           
01830        0,                              /* tp_alloc */          
01831        0,                               /* tp_new */           
01832        0,                                 /* tp_free */    
01833        0,                                  /* tp_is_gc */  
01834        0,                              /* tp_bases */   
01835        0,                              /* tp_mro */
01836        0,                              /* tp_cache */   
01837        0,                              /* tp_subclasses */
01838        0,                              /* tp_weaklist */
01839 #endif
01840 #if PY_VERSION_HEX >= 0x02030000
01841        0,                                  /* tp_del */
01842 #endif
01843 #ifdef COUNT_ALLOCS
01844        0,0,0,0                             /* tp_alloc -> tp_next */
01845 #endif
01846       };
01847     swigpyobject_type = tmp;
01848     /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
01849 #if PY_VERSION_HEX < 0x03000000
01850     swigpyobject_type.ob_type = &PyType_Type;
01851 #endif
01852     type_init = 1;
01853   }
01854   return &swigpyobject_type;
01855 }
01856 
01857 SWIGRUNTIME PyObject *
01858 SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
01859 {
01860   SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
01861   if (sobj) {
01862     sobj->ptr  = ptr;
01863     sobj->ty   = ty;
01864     sobj->own  = own;
01865     sobj->next = 0;
01866   }
01867   return (PyObject *)sobj;
01868 }
01869 
01870 /* -----------------------------------------------------------------------------
01871  * Implements a simple Swig Packed type, and use it instead of string
01872  * ----------------------------------------------------------------------------- */
01873 
01874 typedef struct {
01875   PyObject_HEAD
01876   void *pack;
01877   swig_type_info *ty;
01878   size_t size;
01879 } SwigPyPacked;
01880 
01881 SWIGRUNTIME int
01882 SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
01883 {
01884   char result[SWIG_BUFFER_SIZE];
01885   fputs("<Swig Packed ", fp); 
01886   if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
01887     fputs("at ", fp); 
01888     fputs(result, fp); 
01889   }
01890   fputs(v->ty->name,fp); 
01891   fputs(">", fp);
01892   return 0; 
01893 }
01894   
01895 SWIGRUNTIME PyObject *
01896 SwigPyPacked_repr(SwigPyPacked *v)
01897 {
01898   char result[SWIG_BUFFER_SIZE];
01899   if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
01900     return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
01901   } else {
01902     return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
01903   }  
01904 }
01905 
01906 SWIGRUNTIME PyObject *
01907 SwigPyPacked_str(SwigPyPacked *v)
01908 {
01909   char result[SWIG_BUFFER_SIZE];
01910   if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
01911     return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
01912   } else {
01913     return SWIG_Python_str_FromChar(v->ty->name);
01914   }  
01915 }
01916 
01917 SWIGRUNTIME int
01918 SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
01919 {
01920   size_t i = v->size;
01921   size_t j = w->size;
01922   int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
01923   return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
01924 }
01925 
01926 SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
01927 
01928 SWIGRUNTIME PyTypeObject*
01929 SwigPyPacked_type(void) {
01930   static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
01931   return type;
01932 }
01933 
01934 SWIGRUNTIMEINLINE int
01935 SwigPyPacked_Check(PyObject *op) {
01936   return ((op)->ob_type == _PySwigPacked_type()) 
01937     || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
01938 }
01939 
01940 SWIGRUNTIME void
01941 SwigPyPacked_dealloc(PyObject *v)
01942 {
01943   if (SwigPyPacked_Check(v)) {
01944     SwigPyPacked *sobj = (SwigPyPacked *) v;
01945     free(sobj->pack);
01946   }
01947   PyObject_DEL(v);
01948 }
01949 
01950 SWIGRUNTIME PyTypeObject*
01951 _PySwigPacked_type(void) {
01952   static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
01953   static PyTypeObject swigpypacked_type;
01954   static int type_init = 0;  
01955   if (!type_init) {
01956     const PyTypeObject tmp
01957       = {
01958     /* PyObject header changed in Python 3 */
01959 #if PY_VERSION_HEX>=0x03000000
01960     PyVarObject_HEAD_INIT(&PyType_Type, 0)
01961 #else
01962        PyObject_HEAD_INIT(NULL)
01963     0,                          /* ob_size */    
01964 #endif
01965        (char *)"SwigPyPacked",                /* tp_name */    
01966        sizeof(SwigPyPacked),                  /* tp_basicsize */      
01967        0,                              /* tp_itemsize */       
01968        (destructor)SwigPyPacked_dealloc,   /* tp_dealloc */    
01969        (printfunc)SwigPyPacked_print,         /* tp_print */          
01970        (getattrfunc)0,                        /* tp_getattr */        
01971        (setattrfunc)0,                        /* tp_setattr */        
01972 #if PY_VERSION_HEX>=0x03000000
01973     0, /* tp_reserved in 3.0.1 */
01974 #else
01975     (cmpfunc)SwigPyPacked_compare,     /* tp_compare */
01976 #endif
01977        (reprfunc)SwigPyPacked_repr,           /* tp_repr */
01978        0,                                 /* tp_as_number */
01979        0,                              /* tp_as_sequence */
01980        0,                              /* tp_as_mapping */
01981        (hashfunc)0,                    /* tp_hash */
01982        (ternaryfunc)0,                        /* tp_call */
01983        (reprfunc)SwigPyPacked_str,     /* tp_str */
01984        PyObject_GenericGetAttr,            /* tp_getattro */
01985        0,                              /* tp_setattro */
01986        0,                                /* tp_as_buffer */
01987        Py_TPFLAGS_DEFAULT,              /* tp_flags */
01988        swigpacked_doc,                  /* tp_doc */
01989        0,                                  /* tp_traverse */
01990        0,                                  /* tp_clear */
01991        0,                                  /* tp_richcompare */
01992        0,                                  /* tp_weaklistoffset */
01993 #if PY_VERSION_HEX >= 0x02020000
01994        0,                                  /* tp_iter */
01995        0,                                  /* tp_iternext */
01996        0,                                /* tp_methods */ 
01997        0,                               /* tp_members */
01998        0,                              /* tp_getset */         
01999        0,                               /* tp_base */           
02000        0,                              /* tp_dict */           
02001        0,                              /* tp_descr_get */      
02002        0,                              /* tp_descr_set */      
02003        0,                              /* tp_dictoffset */     
02004        0,                              /* tp_init */           
02005        0,                              /* tp_alloc */          
02006        0,                               /* tp_new */           
02007        0,                                 /* tp_free */    
02008         0,                                  /* tp_is_gc */  
02009        0,                              /* tp_bases */   
02010        0,                              /* tp_mro */
02011        0,                              /* tp_cache */   
02012        0,                              /* tp_subclasses */
02013        0,                              /* tp_weaklist */
02014 #endif
02015 #if PY_VERSION_HEX >= 0x02030000
02016        0,                                  /* tp_del */
02017 #endif
02018 #ifdef COUNT_ALLOCS
02019        0,0,0,0                             /* tp_alloc -> tp_next */
02020 #endif
02021       };
02022     swigpypacked_type = tmp;
02023     /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */
02024 #if PY_VERSION_HEX < 0x03000000
02025     swigpypacked_type.ob_type = &PyType_Type;
02026 #endif
02027     type_init = 1;
02028   }
02029   return &swigpypacked_type;
02030 }
02031 
02032 SWIGRUNTIME PyObject *
02033 SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
02034 {
02035   SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
02036   if (sobj) {
02037     void *pack = malloc(size);
02038     if (pack) {
02039       memcpy(pack, ptr, size);
02040       sobj->pack = pack;
02041       sobj->ty   = ty;
02042       sobj->size = size;
02043     } else {
02044       PyObject_DEL((PyObject *) sobj);
02045       sobj = 0;
02046     }
02047   }
02048   return (PyObject *) sobj;
02049 }
02050 
02051 SWIGRUNTIME swig_type_info *
02052 SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
02053 {
02054   if (SwigPyPacked_Check(obj)) {
02055     SwigPyPacked *sobj = (SwigPyPacked *)obj;
02056     if (sobj->size != size) return 0;
02057     memcpy(ptr, sobj->pack, size);
02058     return sobj->ty;
02059   } else {
02060     return 0;
02061   }
02062 }
02063 
02064 /* -----------------------------------------------------------------------------
02065  * pointers/data manipulation
02066  * ----------------------------------------------------------------------------- */
02067 
02068 SWIGRUNTIMEINLINE PyObject *
02069 _SWIG_This(void)
02070 {
02071     return SWIG_Python_str_FromChar("this");
02072 }
02073 
02074 SWIGRUNTIME PyObject *
02075 SWIG_This(void)
02076 {
02077   static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
02078   return swig_this;
02079 }
02080 
02081 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
02082 
02083 /* TODO: I don't know how to implement the fast getset in Python 3 right now */
02084 #if PY_VERSION_HEX>=0x03000000
02085 #define SWIG_PYTHON_SLOW_GETSET_THIS 
02086 #endif
02087 
02088 SWIGRUNTIME SwigPyObject *
02089 SWIG_Python_GetSwigThis(PyObject *pyobj) 
02090 {
02091   if (SwigPyObject_Check(pyobj)) {
02092     return (SwigPyObject *) pyobj;
02093   } else {
02094     PyObject *obj = 0;
02095 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
02096     if (PyInstance_Check(pyobj)) {
02097       obj = _PyInstance_Lookup(pyobj, SWIG_This());      
02098     } else {
02099       PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
02100       if (dictptr != NULL) {
02101        PyObject *dict = *dictptr;
02102        obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
02103       } else {
02104 #ifdef PyWeakref_CheckProxy
02105        if (PyWeakref_CheckProxy(pyobj)) {
02106          PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
02107          return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
02108        }
02109 #endif
02110        obj = PyObject_GetAttr(pyobj,SWIG_This());
02111        if (obj) {
02112          Py_DECREF(obj);
02113        } else {
02114          if (PyErr_Occurred()) PyErr_Clear();
02115          return 0;
02116        }
02117       }
02118     }
02119 #else
02120     obj = PyObject_GetAttr(pyobj,SWIG_This());
02121     if (obj) {
02122       Py_DECREF(obj);
02123     } else {
02124       if (PyErr_Occurred()) PyErr_Clear();
02125       return 0;
02126     }
02127 #endif
02128     if (obj && !SwigPyObject_Check(obj)) {
02129       /* a PyObject is called 'this', try to get the 'real this'
02130         SwigPyObject from it */ 
02131       return SWIG_Python_GetSwigThis(obj);
02132     }
02133     return (SwigPyObject *)obj;
02134   }
02135 }
02136 
02137 /* Acquire a pointer value */
02138 
02139 SWIGRUNTIME int
02140 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
02141   if (own == SWIG_POINTER_OWN) {
02142     SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
02143     if (sobj) {
02144       int oldown = sobj->own;
02145       sobj->own = own;
02146       return oldown;
02147     }
02148   }
02149   return 0;
02150 }
02151 
02152 /* Convert a pointer value */
02153 
02154 SWIGRUNTIME int
02155 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
02156   if (!obj) return SWIG_ERROR;
02157   if (obj == Py_None) {
02158     if (ptr) *ptr = 0;
02159     return SWIG_OK;
02160   } else {
02161     SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
02162     if (own)
02163       *own = 0;
02164     while (sobj) {
02165       void *vptr = sobj->ptr;
02166       if (ty) {
02167        swig_type_info *to = sobj->ty;
02168        if (to == ty) {
02169          /* no type cast needed */
02170          if (ptr) *ptr = vptr;
02171          break;
02172        } else {
02173          swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
02174          if (!tc) {
02175            sobj = (SwigPyObject *)sobj->next;
02176          } else {
02177            if (ptr) {
02178               int newmemory = 0;
02179               *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
02180               if (newmemory == SWIG_CAST_NEW_MEMORY) {
02181                 assert(own);
02182                 if (own)
02183                   *own = *own | SWIG_CAST_NEW_MEMORY;
02184               }
02185             }
02186            break;
02187          }
02188        }
02189       } else {
02190        if (ptr) *ptr = vptr;
02191        break;
02192       }
02193     }
02194     if (sobj) {
02195       if (own)
02196         *own = *own | sobj->own;
02197       if (flags & SWIG_POINTER_DISOWN) {
02198        sobj->own = 0;
02199       }
02200       return SWIG_OK;
02201     } else {
02202       int res = SWIG_ERROR;
02203       if (flags & SWIG_POINTER_IMPLICIT_CONV) {
02204        SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
02205        if (data && !data->implicitconv) {
02206          PyObject *klass = data->klass;
02207          if (klass) {
02208            PyObject *impconv;
02209            data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
02210            impconv = SWIG_Python_CallFunctor(klass, obj);
02211            data->implicitconv = 0;
02212            if (PyErr_Occurred()) {
02213              PyErr_Clear();
02214              impconv = 0;
02215            }
02216            if (impconv) {
02217              SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
02218              if (iobj) {
02219               void *vptr;
02220               res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
02221               if (SWIG_IsOK(res)) {
02222                 if (ptr) {
02223                   *ptr = vptr;
02224                   /* transfer the ownership to 'ptr' */
02225                   iobj->own = 0;
02226                   res = SWIG_AddCast(res);
02227                   res = SWIG_AddNewMask(res);
02228                 } else {
02229                   res = SWIG_AddCast(res);                  
02230                 }
02231               }
02232              }
02233              Py_DECREF(impconv);
02234            }
02235          }
02236        }
02237       }
02238       return res;
02239     }
02240   }
02241 }
02242 
02243 /* Convert a function ptr value */
02244 
02245 SWIGRUNTIME int
02246 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
02247   if (!PyCFunction_Check(obj)) {
02248     return SWIG_ConvertPtr(obj, ptr, ty, 0);
02249   } else {
02250     void *vptr = 0;
02251     
02252     /* here we get the method pointer for callbacks */
02253     const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
02254     const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
02255     if (desc)
02256       desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
02257     if (!desc) 
02258       return SWIG_ERROR;
02259     if (ty) {
02260       swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
02261       if (tc) {
02262         int newmemory = 0;
02263         *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
02264         assert(!newmemory); /* newmemory handling not yet implemented */
02265       } else {
02266         return SWIG_ERROR;
02267       }
02268     } else {
02269       *ptr = vptr;
02270     }
02271     return SWIG_OK;
02272   }
02273 }
02274 
02275 /* Convert a packed value value */
02276 
02277 SWIGRUNTIME int
02278 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
02279   swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
02280   if (!to) return SWIG_ERROR;
02281   if (ty) {
02282     if (to != ty) {
02283       /* check type cast? */
02284       swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
02285       if (!tc) return SWIG_ERROR;
02286     }
02287   }
02288   return SWIG_OK;
02289 }  
02290 
02291 /* -----------------------------------------------------------------------------
02292  * Create a new pointer object
02293  * ----------------------------------------------------------------------------- */
02294 
02295 /*
02296   Create a new instance object, without calling __init__, and set the
02297   'this' attribute.
02298 */
02299 
02300 SWIGRUNTIME PyObject* 
02301 SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
02302 {
02303 #if (PY_VERSION_HEX >= 0x02020000)
02304   PyObject *inst = 0;
02305   PyObject *newraw = data->newraw;
02306   if (newraw) {
02307     inst = PyObject_Call(newraw, data->newargs, NULL);
02308     if (inst) {
02309 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
02310       PyObject **dictptr = _PyObject_GetDictPtr(inst);
02311       if (dictptr != NULL) {
02312        PyObject *dict = *dictptr;
02313        if (dict == NULL) {
02314          dict = PyDict_New();
02315          *dictptr = dict;
02316          PyDict_SetItem(dict, SWIG_This(), swig_this);
02317        }
02318       }
02319 #else
02320       PyObject *key = SWIG_This();
02321       PyObject_SetAttr(inst, key, swig_this);
02322 #endif
02323     }
02324   } else {
02325 #if PY_VERSION_HEX >= 0x03000000
02326     inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
02327     PyObject_SetAttr(inst, SWIG_This(), swig_this);
02328     Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
02329 #else
02330     PyObject *dict = PyDict_New();
02331     PyDict_SetItem(dict, SWIG_This(), swig_this);
02332     inst = PyInstance_NewRaw(data->newargs, dict);
02333     Py_DECREF(dict);
02334 #endif
02335   }
02336   return inst;
02337 #else
02338 #if (PY_VERSION_HEX >= 0x02010000)
02339   PyObject *inst;
02340   PyObject *dict = PyDict_New();
02341   PyDict_SetItem(dict, SWIG_This(), swig_this);
02342   inst = PyInstance_NewRaw(data->newargs, dict);
02343   Py_DECREF(dict);
02344   return (PyObject *) inst;
02345 #else
02346   PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
02347   if (inst == NULL) {
02348     return NULL;
02349   }
02350   inst->in_class = (PyClassObject *)data->newargs;
02351   Py_INCREF(inst->in_class);
02352   inst->in_dict = PyDict_New();
02353   if (inst->in_dict == NULL) {
02354     Py_DECREF(inst);
02355     return NULL;
02356   }
02357 #ifdef Py_TPFLAGS_HAVE_WEAKREFS
02358   inst->in_weakreflist = NULL;
02359 #endif
02360 #ifdef Py_TPFLAGS_GC
02361   PyObject_GC_Init(inst);
02362 #endif
02363   PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
02364   return (PyObject *) inst;
02365 #endif
02366 #endif
02367 }
02368 
02369 SWIGRUNTIME void
02370 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
02371 {
02372  PyObject *dict;
02373 #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
02374  PyObject **dictptr = _PyObject_GetDictPtr(inst);
02375  if (dictptr != NULL) {
02376    dict = *dictptr;
02377    if (dict == NULL) {
02378      dict = PyDict_New();
02379      *dictptr = dict;
02380    }
02381    PyDict_SetItem(dict, SWIG_This(), swig_this);
02382    return;
02383  }
02384 #endif
02385  dict = PyObject_GetAttrString(inst, (char*)"__dict__");
02386  PyDict_SetItem(dict, SWIG_This(), swig_this);
02387  Py_DECREF(dict);
02388 } 
02389 
02390 
02391 SWIGINTERN PyObject *
02392 SWIG_Python_InitShadowInstance(PyObject *args) {
02393   PyObject *obj[2];
02394   if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
02395     return NULL;
02396   } else {
02397     SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
02398     if (sthis) {
02399       SwigPyObject_append((PyObject*) sthis, obj[1]);
02400     } else {
02401       SWIG_Python_SetSwigThis(obj[0], obj[1]);
02402     }
02403     return SWIG_Py_Void();
02404   }
02405 }
02406 
02407 /* Create a new pointer object */
02408 
02409 SWIGRUNTIME PyObject *
02410 SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
02411   if (!ptr) {
02412     return SWIG_Py_Void();
02413   } else {
02414     int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
02415     PyObject *robj = SwigPyObject_New(ptr, type, own);
02416     SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
02417     if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
02418       PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
02419       if (inst) {
02420        Py_DECREF(robj);
02421        robj = inst;
02422       }
02423     }
02424     return robj;
02425   }
02426 }
02427 
02428 /* Create a new packed object */
02429 
02430 SWIGRUNTIMEINLINE PyObject *
02431 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
02432   return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
02433 }
02434 
02435 /* -----------------------------------------------------------------------------*
02436  *  Get type list 
02437  * -----------------------------------------------------------------------------*/
02438 
02439 #ifdef SWIG_LINK_RUNTIME
02440 void *SWIG_ReturnGlobalTypeList(void *);
02441 #endif
02442 
02443 SWIGRUNTIME swig_module_info *
02444 SWIG_Python_GetModule(void) {
02445   static void *type_pointer = (void *)0;
02446   /* first check if module already created */
02447   if (!type_pointer) {
02448 #ifdef SWIG_LINK_RUNTIME
02449     type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
02450 #else
02451     type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
02452                                 (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
02453     if (PyErr_Occurred()) {
02454       PyErr_Clear();
02455       type_pointer = (void *)0;
02456     }
02457 #endif
02458   }
02459   return (swig_module_info *) type_pointer;
02460 }
02461 
02462 #if PY_MAJOR_VERSION < 2
02463 /* PyModule_AddObject function was introduced in Python 2.0.  The following function
02464    is copied out of Python/modsupport.c in python version 2.3.4 */
02465 SWIGINTERN int
02466 PyModule_AddObject(PyObject *m, char *name, PyObject *o)
02467 {
02468   PyObject *dict;
02469   if (!PyModule_Check(m)) {
02470     PyErr_SetString(PyExc_TypeError,
02471                   "PyModule_AddObject() needs module as first arg");
02472     return SWIG_ERROR;
02473   }
02474   if (!o) {
02475     PyErr_SetString(PyExc_TypeError,
02476                   "PyModule_AddObject() needs non-NULL value");
02477     return SWIG_ERROR;
02478   }
02479   
02480   dict = PyModule_GetDict(m);
02481   if (dict == NULL) {
02482     /* Internal error -- modules must have a dict! */
02483     PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
02484                PyModule_GetName(m));
02485     return SWIG_ERROR;
02486   }
02487   if (PyDict_SetItemString(dict, name, o))
02488     return SWIG_ERROR;
02489   Py_DECREF(o);
02490   return SWIG_OK;
02491 }
02492 #endif
02493 
02494 SWIGRUNTIME void
02495 SWIG_Python_DestroyModule(void *vptr)
02496 {
02497   swig_module_info *swig_module = (swig_module_info *) vptr;
02498   swig_type_info **types = swig_module->types;
02499   size_t i;
02500   for (i =0; i < swig_module->size; ++i) {
02501     swig_type_info *ty = types[i];
02502     if (ty->owndata) {
02503       SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
02504       if (data) SwigPyClientData_Del(data);
02505     }
02506   }
02507   Py_DECREF(SWIG_This());
02508 }
02509 
02510 SWIGRUNTIME void
02511 SWIG_Python_SetModule(swig_module_info *swig_module) {
02512   static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
02513 
02514 #if PY_VERSION_HEX >= 0x03000000
02515  /* Add a dummy module object into sys.modules */
02516   PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
02517 #else
02518   PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
02519                                swig_empty_runtime_method_table);
02520 #endif
02521   PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
02522   if (pointer && module) {
02523     PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
02524   } else {
02525     Py_XDECREF(pointer);
02526   }
02527 }
02528 
02529 /* The python cached type query */
02530 SWIGRUNTIME PyObject *
02531 SWIG_Python_TypeCache(void) {
02532   static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
02533   return cache;
02534 }
02535 
02536 SWIGRUNTIME swig_type_info *
02537 SWIG_Python_TypeQuery(const char *type)
02538 {
02539   PyObject *cache = SWIG_Python_TypeCache();
02540   PyObject *key = SWIG_Python_str_FromChar(type); 
02541   PyObject *obj = PyDict_GetItem(cache, key);
02542   swig_type_info *descriptor;
02543   if (obj) {
02544     descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
02545   } else {
02546     swig_module_info *swig_module = SWIG_Python_GetModule();
02547     descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
02548     if (descriptor) {
02549       obj = PyCObject_FromVoidPtr(descriptor, NULL);
02550       PyDict_SetItem(cache, key, obj);
02551       Py_DECREF(obj);
02552     }
02553   }
02554   Py_DECREF(key);
02555   return descriptor;
02556 }
02557 
02558 /* 
02559    For backward compatibility only
02560 */
02561 #define SWIG_POINTER_EXCEPTION  0
02562 #define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
02563 #define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)
02564 
02565 SWIGRUNTIME int
02566 SWIG_Python_AddErrMesg(const char* mesg, int infront)
02567 {  
02568   if (PyErr_Occurred()) {
02569     PyObject *type = 0;
02570     PyObject *value = 0;
02571     PyObject *traceback = 0;
02572     PyErr_Fetch(&type, &value, &traceback);
02573     if (value) {
02574       char *tmp;
02575       PyObject *old_str = PyObject_Str(value);
02576       Py_XINCREF(type);
02577       PyErr_Clear();
02578       if (infront) {
02579        PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
02580       } else {
02581        PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
02582       }
02583       SWIG_Python_str_DelForPy3(tmp);
02584       Py_DECREF(old_str);
02585     }
02586     return 1;
02587   } else {
02588     return 0;
02589   }
02590 }
02591   
02592 SWIGRUNTIME int
02593 SWIG_Python_ArgFail(int argnum)
02594 {
02595   if (PyErr_Occurred()) {
02596     /* add information about failing argument */
02597     char mesg[256];
02598     PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
02599     return SWIG_Python_AddErrMesg(mesg, 1);
02600   } else {
02601     return 0;
02602   }
02603 }
02604 
02605 SWIGRUNTIMEINLINE const char *
02606 SwigPyObject_GetDesc(PyObject *self)
02607 {
02608   SwigPyObject *v = (SwigPyObject *)self;
02609   swig_type_info *ty = v ? v->ty : 0;
02610   return ty ? ty->str : (char*)"";
02611 }
02612 
02613 SWIGRUNTIME void
02614 SWIG_Python_TypeError(const char *type, PyObject *obj)
02615 {
02616   if (type) {
02617 #if defined(SWIG_COBJECT_TYPES)
02618     if (obj && SwigPyObject_Check(obj)) {
02619       const char *otype = (const char *) SwigPyObject_GetDesc(obj);
02620       if (otype) {
02621        PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
02622                    type, otype);
02623        return;
02624       }
02625     } else 
02626 #endif      
02627     {
02628       const char *otype = (obj ? obj->ob_type->tp_name : 0); 
02629       if (otype) {
02630        PyObject *str = PyObject_Str(obj);
02631        const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
02632        if (cstr) {
02633          PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
02634                      type, otype, cstr);
02635           SWIG_Python_str_DelForPy3(cstr);
02636        } else {
02637          PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
02638                      type, otype);
02639        }
02640        Py_XDECREF(str);
02641        return;
02642       }
02643     }   
02644     PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
02645   } else {
02646     PyErr_Format(PyExc_TypeError, "unexpected type is received");
02647   }
02648 }
02649 
02650 
02651 /* Convert a pointer value, signal an exception on a type mismatch */
02652 SWIGRUNTIME void *
02653 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
02654   void *result;
02655   if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
02656     PyErr_Clear();
02657 #if SWIG_POINTER_EXCEPTION
02658     if (flags) {
02659       SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
02660       SWIG_Python_ArgFail(argnum);
02661     }
02662 #endif
02663   }
02664   return result;
02665 }
02666 
02667 
02668 #ifdef __cplusplus
02669 #if 0
02670 { /* cc-mode */
02671 #endif
02672 }
02673 #endif
02674 
02675 
02676 
02677 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 
02678 
02679 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 
02680 
02681 
02682 
02683 /* -------- TYPES TABLE (BEGIN) -------- */
02684 
02685 #define SWIGTYPE_p_SALOME__Matrix_ptr swig_types[0]
02686 #define SWIGTYPE_p_SALOME__SenderDouble_ptr swig_types[1]
02687 #define SWIGTYPE_p_SALOME__SenderInt_ptr swig_types[2]
02688 #define SWIGTYPE_p_char swig_types[3]
02689 static swig_type_info *swig_types[5];
02690 static swig_module_info swig_module = {swig_types, 4, 0, 0, 0, 0};
02691 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
02692 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
02693 
02694 /* -------- TYPES TABLE (END) -------- */
02695 
02696 #if (PY_VERSION_HEX <= 0x02000000)
02697 # if !defined(SWIG_PYTHON_CLASSIC)
02698 #  error "This python version requires swig to be run with the '-classic' option"
02699 # endif
02700 #endif
02701 
02702 /*-----------------------------------------------
02703               @(target):= _libSALOME_Comm.so
02704   ------------------------------------------------*/
02705 #if PY_VERSION_HEX >= 0x03000000
02706 #  define SWIG_init    PyInit__libSALOME_Comm
02707 
02708 #else
02709 #  define SWIG_init    init_libSALOME_Comm
02710 
02711 #endif
02712 #define SWIG_name    "_libSALOME_Comm"
02713 
02714 #define SWIGVERSION 0x010340 
02715 #define SWIG_VERSION SWIGVERSION
02716 
02717 
02718 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) 
02719 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) 
02720 
02721 
02722 #include <stdexcept>
02723 
02724 
02725 namespace swig {
02726   class SwigPtr_PyObject {
02727   protected:
02728     PyObject *_obj;
02729 
02730   public:
02731     SwigPtr_PyObject() :_obj(0)
02732     {
02733     }
02734 
02735     SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
02736     {
02737       Py_XINCREF(_obj);      
02738     }
02739     
02740     SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
02741     {
02742       if (initial_ref) {
02743         Py_XINCREF(_obj);
02744       }
02745     }
02746     
02747     SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) 
02748     {
02749       Py_XINCREF(item._obj);
02750       Py_XDECREF(_obj);
02751       _obj = item._obj;
02752       return *this;      
02753     }
02754     
02755     ~SwigPtr_PyObject() 
02756     {
02757       Py_XDECREF(_obj);
02758     }
02759     
02760     operator PyObject *() const
02761     {
02762       return _obj;
02763     }
02764 
02765     PyObject *operator->() const
02766     {
02767       return _obj;
02768     }
02769   };
02770 }
02771 
02772 
02773 namespace swig {
02774   struct SwigVar_PyObject : SwigPtr_PyObject {
02775     SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
02776     
02777     SwigVar_PyObject & operator = (PyObject* obj)
02778     {
02779       Py_XDECREF(_obj);
02780       _obj = obj;
02781       return *this;      
02782     }
02783   };
02784 }
02785 
02786 
02787   #include "ReceiverFactory.hxx"
02788   #include "MatrixClient.hxx"
02789   #include "SALOME_Comm_i.hxx"
02790   #include "SALOMEMultiComm.hxx"
02791   #include "SenderFactory.hxx"
02792 
02793 
02794 PyObject * getValueForSenderDouble(SALOME::SenderDouble_ptr senderDouble)
02795 {
02796   PyObject *py_list;
02797   long size;
02798   double *ret=ReceiverFactory::getValue(senderDouble,size);
02799   py_list = PyList_New(size);
02800   for (int i=0; i < size; i++)
02801     {
02802             int err = PyList_SetItem(py_list, i, Py_BuildValue("d", (double) ret[i]));
02803             if(err)
02804               {
02805                 const char * message = "Error in SUPPORT::getTypes";
02806                 PyErr_SetString(PyExc_RuntimeError, message);
02807                 return NULL;
02808               }
02809     }
02810   PyObject * result = Py_BuildValue("O", py_list);
02811   delete [] ret;
02812   Py_DECREF(py_list);
02813   return result;
02814 }
02815 
02816 
02817 PyObject * getValueForSenderInt(SALOME::SenderInt_ptr senderInt)
02818 {
02819   PyObject *py_list;
02820   long size;
02821   int *ret=ReceiverFactory::getValue(senderInt,size);
02822   py_list = PyList_New(size);
02823   for (int i=0; i < size; i++)
02824     {
02825             int err = PyList_SetItem(py_list, i, Py_BuildValue("i", (int) ret[i]));
02826             if(err)
02827               {
02828                 const char * message = "Error in SUPPORT::getTypes";
02829                 PyErr_SetString(PyExc_RuntimeError, message);
02830                 return NULL;
02831               }
02832     }
02833   PyObject * result = Py_BuildValue("O", py_list);
02834   delete [] ret;
02835   Py_DECREF(py_list);
02836   return result;
02837 }
02838 
02839 
02840 PyObject * getValueForMatrix(SALOME::Matrix_ptr matrix)
02841 {
02842   PyObject *py_list;
02843   int column,row;
02844   double *ret=MatrixClient::getValue(matrix,column,row);
02845   py_list = PyList_New(row);
02846   for(int i=0;i<row;i++)
02847     {
02848        PyObject *tmpRow=PyList_New(column);
02849        for(int j=0;j<column;j++)
02850          {
02851            int err = PyList_SetItem(tmpRow, j, Py_BuildValue("d", (double) ret[i*column+j]));
02852             if(err)
02853               {
02854                 const char * message = "PyList_SetItem matrix sent may be invalid";
02855                 PyErr_SetString(PyExc_RuntimeError, message);
02856                 return NULL;
02857               }
02858          }
02859        PyList_SetItem(py_list,i,tmpRow);
02860        Py_DECREF(tmpRow);
02861     }
02862   delete [] ret;
02863   Py_DECREF(py_list);
02864   return py_list;
02865 }
02866 
02867 
02868 SALOME::SenderDouble_ptr buildSenderDoubleFromList(PyObject *pylist)
02869 {
02870   if (PyList_Check(pylist)) 
02871   {
02872     int listLgth = PyList_Size(pylist);
02873     double *tab=new double[listLgth];
02874     for (int i=0;i<listLgth;i++)
02875        {
02876          tab[i]=PyFloat_AsDouble(PyList_GetItem(pylist,i));
02877        }
02878     SALOMEMultiComm communicator;
02879     return SenderFactory::buildSender(communicator,tab,listLgth,true);
02880   }
02881   else
02882   { 
02883     PyErr_SetString(PyExc_TypeError,"not a list");
02884     return SALOME::SenderDouble::_nil();
02885   }
02886 }
02887 
02888 
02889 SALOME::SenderInt_ptr buildSenderIntFromList(PyObject *pylist)
02890 {
02891   if (PyList_Check(pylist)) 
02892   {
02893     int listLgth = PyList_Size(pylist);
02894     int *tab=new int[listLgth];
02895     for (int i=0;i<listLgth;i++)
02896        {
02897          tab[i]=PyInt_AsLong(PyList_GetItem(pylist,i));
02898        }
02899     SALOMEMultiComm communicator;
02900     return SenderFactory::buildSender(communicator,tab,listLgth,true);
02901   }
02902   else
02903   { 
02904     PyErr_SetString(PyExc_TypeError,"not a list");
02905     return SALOME::SenderInt::_nil();
02906   }
02907 }
02908 
02909 #ifdef __cplusplus
02910 extern "C" {
02911 #endif
02912 SWIGINTERN PyObject *_wrap_getValueForSenderDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
02913   PyObject *resultobj = 0;
02914   SALOME::SenderDouble_ptr arg1 ;
02915   PyObject * obj0 = 0 ;
02916   PyObject *result = 0 ;
02917   
02918   if (!PyArg_ParseTuple(args,(char *)"O:getValueForSenderDouble",&obj0)) SWIG_fail;
02919   {
02920     PyObject* pdict = PyDict_New();
02921     PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins());
02922     PyRun_String("import CORBA", Py_single_input, pdict, pdict);
02923     
02924     PyRun_String("o = CORBA.ORB_init([''], CORBA.ORB_ID);", Py_single_input,
02925       pdict, pdict);
02926     
02927     PyObject* orb = PyDict_GetItemString(pdict, "o");
02928     
02929     // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
02930     
02931     PyObject* iorSupport = PyObject_CallMethod(orb, (char*)"object_to_string", (char*)"O", obj0);
02932     
02933     if (iorSupport == Py_None)
02934     return NULL;
02935     char * s = PyString_AsString(PyObject_Str(iorSupport));
02936     
02937     // Ask omniORB to convert IOR string to SALOME::SenderDouble_ptr
02938     
02939     int argc = 0;
02940     char *xargv = (char*)"";
02941     char **argv = &xargv;
02942     CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
02943     CORBA::Object_var O =  ORB->string_to_object(s);
02944     SALOME::SenderDouble_ptr t = SALOME::SenderDouble::_narrow(O);
02945     arg1 = t;
02946   }
02947   result = (PyObject *)getValueForSenderDouble(arg1);
02948   resultobj = result;
02949   return resultobj;
02950 fail:
02951   return NULL;
02952 }
02953 
02954 
02955 SWIGINTERN PyObject *_wrap_getValueForSenderInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
02956   PyObject *resultobj = 0;
02957   SALOME::SenderInt_ptr arg1 ;
02958   PyObject * obj0 = 0 ;
02959   PyObject *result = 0 ;
02960   
02961   if (!PyArg_ParseTuple(args,(char *)"O:getValueForSenderInt",&obj0)) SWIG_fail;
02962   {
02963     PyObject* pdict = PyDict_New();
02964     PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins());
02965     PyRun_String("import CORBA", Py_single_input, pdict, pdict);
02966     
02967     PyRun_String("o = CORBA.ORB_init([''], CORBA.ORB_ID);", Py_single_input,
02968       pdict, pdict);
02969     
02970     PyObject* orb = PyDict_GetItemString(pdict, "o");
02971     
02972     // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
02973     
02974     PyObject* iorSupport = PyObject_CallMethod(orb, (char*)"object_to_string", (char*)"O", obj0);
02975     
02976     if (iorSupport == Py_None)
02977     return NULL;
02978     char * s = PyString_AsString(PyObject_Str(iorSupport));
02979     
02980     // Ask omniORB to convert IOR string to SALOME::SenderInt_ptr
02981     
02982     int argc = 0;
02983     char *xargv = (char*)"";
02984     char **argv = &xargv;
02985     CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
02986     CORBA::Object_var O =  ORB->string_to_object(s);
02987     SALOME::SenderInt_ptr t = SALOME::SenderInt::_narrow(O);
02988     arg1 = t;
02989   }
02990   result = (PyObject *)getValueForSenderInt(arg1);
02991   resultobj = result;
02992   return resultobj;
02993 fail:
02994   return NULL;
02995 }
02996 
02997 
02998 SWIGINTERN PyObject *_wrap_getValueForMatrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
02999   PyObject *resultobj = 0;
03000   SALOME::Matrix_ptr arg1 ;
03001   void *argp1 ;
03002   int res1 = 0 ;
03003   PyObject * obj0 = 0 ;
03004   PyObject *result = 0 ;
03005   
03006   if (!PyArg_ParseTuple(args,(char *)"O:getValueForMatrix",&obj0)) SWIG_fail;
03007   {
03008     res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_SALOME__Matrix_ptr,  0  | 0);
03009     if (!SWIG_IsOK(res1)) {
03010       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getValueForMatrix" "', argument " "1"" of type '" "SALOME::Matrix_ptr""'"); 
03011     }  
03012     if (!argp1) {
03013       SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getValueForMatrix" "', argument " "1"" of type '" "SALOME::Matrix_ptr""'");
03014     } else {
03015       SALOME::Matrix_ptr * temp = reinterpret_cast< SALOME::Matrix_ptr * >(argp1);
03016       arg1 = *temp;
03017       if (SWIG_IsNewObj(res1)) delete temp;
03018     }
03019   }
03020   result = (PyObject *)getValueForMatrix(arg1);
03021   resultobj = result;
03022   return resultobj;
03023 fail:
03024   return NULL;
03025 }
03026 
03027 
03028 SWIGINTERN PyObject *_wrap_buildSenderDoubleFromList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
03029   PyObject *resultobj = 0;
03030   PyObject *arg1 = (PyObject *) 0 ;
03031   PyObject * obj0 = 0 ;
03032   SALOME::SenderDouble_ptr result;
03033   
03034   if (!PyArg_ParseTuple(args,(char *)"O:buildSenderDoubleFromList",&obj0)) SWIG_fail;
03035   arg1 = obj0;
03036   result = buildSenderDoubleFromList(arg1);
03037   {
03038     PyObject* pdict = PyDict_New();
03039     PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins());
03040     PyRun_String("import CORBA", Py_single_input, pdict, pdict);
03041     PyRun_String("o = CORBA.ORB_init([''], CORBA.ORB_ID);", Py_single_input,
03042       pdict, pdict);
03043     PyObject* orb = PyDict_GetItemString(pdict, "o");
03044     // Get the orb Corba C++
03045     int argc = 0;
03046     char *xargv = (char*)"";
03047     char **argv = &xargv;
03048     CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
03049     std::string s =  ORB->object_to_string(result);
03050     PyObject * tmp = PyString_FromString(s.c_str());
03051     resultobj = PyObject_CallMethod(orb, (char*)"string_to_object", (char*)"O", tmp);
03052   }
03053   return resultobj;
03054 fail:
03055   return NULL;
03056 }
03057 
03058 
03059 SWIGINTERN PyObject *_wrap_buildSenderIntFromList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
03060   PyObject *resultobj = 0;
03061   PyObject *arg1 = (PyObject *) 0 ;
03062   PyObject * obj0 = 0 ;
03063   SALOME::SenderInt_ptr result;
03064   
03065   if (!PyArg_ParseTuple(args,(char *)"O:buildSenderIntFromList",&obj0)) SWIG_fail;
03066   arg1 = obj0;
03067   result = buildSenderIntFromList(arg1);
03068   {
03069     PyObject* pdict = PyDict_New();
03070     PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins());
03071     PyRun_String("import CORBA", Py_single_input, pdict, pdict);
03072     PyRun_String("o = CORBA.ORB_init([''], CORBA.ORB_ID);", Py_single_input,
03073       pdict, pdict);
03074     PyObject* orb = PyDict_GetItemString(pdict, "o");
03075     // Get the orb Corba C++
03076     int argc = 0;
03077     char *xargv = (char*)"";
03078     char **argv = &xargv;
03079     CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
03080     std::string s =  ORB->object_to_string(result);
03081     PyObject * tmp = PyString_FromString(s.c_str());
03082     resultobj = PyObject_CallMethod(orb, (char*)"string_to_object", (char*)"O", tmp);
03083   }
03084   return resultobj;
03085 fail:
03086   return NULL;
03087 }
03088 
03089 
03090 static PyMethodDef SwigMethods[] = {
03091         { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
03092         { (char *)"getValueForSenderDouble", _wrap_getValueForSenderDouble, METH_VARARGS, (char *)"getValueForSenderDouble(SALOME::SenderDouble_ptr senderDouble) -> PyObject"},
03093         { (char *)"getValueForSenderInt", _wrap_getValueForSenderInt, METH_VARARGS, (char *)"getValueForSenderInt(SALOME::SenderInt_ptr senderInt) -> PyObject"},
03094         { (char *)"getValueForMatrix", _wrap_getValueForMatrix, METH_VARARGS, (char *)"getValueForMatrix(SALOME::Matrix_ptr matrix) -> PyObject"},
03095         { (char *)"buildSenderDoubleFromList", _wrap_buildSenderDoubleFromList, METH_VARARGS, (char *)"buildSenderDoubleFromList(PyObject pylist) -> SALOME::SenderDouble_ptr"},
03096         { (char *)"buildSenderIntFromList", _wrap_buildSenderIntFromList, METH_VARARGS, (char *)"buildSenderIntFromList(PyObject pylist) -> SALOME::SenderInt_ptr"},
03097         { NULL, NULL, 0, NULL }
03098 };
03099 
03100 
03101 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
03102 
03103 static swig_type_info _swigt__p_SALOME__Matrix_ptr = {"_p_SALOME__Matrix_ptr", "SALOME::Matrix_ptr *", 0, 0, (void*)0, 0};
03104 static swig_type_info _swigt__p_SALOME__SenderDouble_ptr = {"_p_SALOME__SenderDouble_ptr", "SALOME::SenderDouble_ptr *", 0, 0, (void*)0, 0};
03105 static swig_type_info _swigt__p_SALOME__SenderInt_ptr = {"_p_SALOME__SenderInt_ptr", "SALOME::SenderInt_ptr *", 0, 0, (void*)0, 0};
03106 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
03107 
03108 static swig_type_info *swig_type_initial[] = {
03109   &_swigt__p_SALOME__Matrix_ptr,
03110   &_swigt__p_SALOME__SenderDouble_ptr,
03111   &_swigt__p_SALOME__SenderInt_ptr,
03112   &_swigt__p_char,
03113 };
03114 
03115 static swig_cast_info _swigc__p_SALOME__Matrix_ptr[] = {  {&_swigt__p_SALOME__Matrix_ptr, 0, 0, 0},{0, 0, 0, 0}};
03116 static swig_cast_info _swigc__p_SALOME__SenderDouble_ptr[] = {  {&_swigt__p_SALOME__SenderDouble_ptr, 0, 0, 0},{0, 0, 0, 0}};
03117 static swig_cast_info _swigc__p_SALOME__SenderInt_ptr[] = {  {&_swigt__p_SALOME__SenderInt_ptr, 0, 0, 0},{0, 0, 0, 0}};
03118 static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
03119 
03120 static swig_cast_info *swig_cast_initial[] = {
03121   _swigc__p_SALOME__Matrix_ptr,
03122   _swigc__p_SALOME__SenderDouble_ptr,
03123   _swigc__p_SALOME__SenderInt_ptr,
03124   _swigc__p_char,
03125 };
03126 
03127 
03128 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
03129 
03130 static swig_const_info swig_const_table[] = {
03131 {0, 0, 0, 0.0, 0, 0}};
03132 
03133 #ifdef __cplusplus
03134 }
03135 #endif
03136 /* -----------------------------------------------------------------------------
03137  * Type initialization:
03138  * This problem is tough by the requirement that no dynamic 
03139  * memory is used. Also, since swig_type_info structures store pointers to 
03140  * swig_cast_info structures and swig_cast_info structures store pointers back
03141  * to swig_type_info structures, we need some lookup code at initialization. 
03142  * The idea is that swig generates all the structures that are needed. 
03143  * The runtime then collects these partially filled structures. 
03144  * The SWIG_InitializeModule function takes these initial arrays out of 
03145  * swig_module, and does all the lookup, filling in the swig_module.types
03146  * array with the correct data and linking the correct swig_cast_info
03147  * structures together.
03148  *
03149  * The generated swig_type_info structures are assigned staticly to an initial 
03150  * array. We just loop through that array, and handle each type individually.
03151  * First we lookup if this type has been already loaded, and if so, use the
03152  * loaded structure instead of the generated one. Then we have to fill in the
03153  * cast linked list. The cast data is initially stored in something like a
03154  * two-dimensional array. Each row corresponds to a type (there are the same
03155  * number of rows as there are in the swig_type_initial array). Each entry in
03156  * a column is one of the swig_cast_info structures for that type.
03157  * The cast_initial array is actually an array of arrays, because each row has
03158  * a variable number of columns. So to actually build the cast linked list,
03159  * we find the array of casts associated with the type, and loop through it 
03160  * adding the casts to the list. The one last trick we need to do is making
03161  * sure the type pointer in the swig_cast_info struct is correct.
03162  *
03163  * First off, we lookup the cast->type name to see if it is already loaded. 
03164  * There are three cases to handle:
03165  *  1) If the cast->type has already been loaded AND the type we are adding
03166  *     casting info to has not been loaded (it is in this module), THEN we
03167  *     replace the cast->type pointer with the type pointer that has already
03168  *     been loaded.
03169  *  2) If BOTH types (the one we are adding casting info to, and the 
03170  *     cast->type) are loaded, THEN the cast info has already been loaded by
03171  *     the previous module so we just ignore it.
03172  *  3) Finally, if cast->type has not already been loaded, then we add that
03173  *     swig_cast_info to the linked list (because the cast->type) pointer will
03174  *     be correct.
03175  * ----------------------------------------------------------------------------- */
03176 
03177 #ifdef __cplusplus
03178 extern "C" {
03179 #if 0
03180 } /* c-mode */
03181 #endif
03182 #endif
03183 
03184 #if 0
03185 #define SWIGRUNTIME_DEBUG
03186 #endif
03187 
03188 
03189 SWIGRUNTIME void
03190 SWIG_InitializeModule(void *clientdata) {
03191   size_t i;
03192   swig_module_info *module_head, *iter;
03193   int found, init;
03194   
03195   clientdata = clientdata;
03196   
03197   /* check to see if the circular list has been setup, if not, set it up */
03198   if (swig_module.next==0) {
03199     /* Initialize the swig_module */
03200     swig_module.type_initial = swig_type_initial;
03201     swig_module.cast_initial = swig_cast_initial;
03202     swig_module.next = &swig_module;
03203     init = 1;
03204   } else {
03205     init = 0;
03206   }
03207   
03208   /* Try and load any already created modules */
03209   module_head = SWIG_GetModule(clientdata);
03210   if (!module_head) {
03211     /* This is the first module loaded for this interpreter */
03212     /* so set the swig module into the interpreter */
03213     SWIG_SetModule(clientdata, &swig_module);
03214     module_head = &swig_module;
03215   } else {
03216     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
03217     found=0;
03218     iter=module_head;
03219     do {
03220       if (iter==&swig_module) {
03221         found=1;
03222         break;
03223       }
03224       iter=iter->next;
03225     } while (iter!= module_head);
03226     
03227     /* if the is found in the list, then all is done and we may leave */
03228     if (found) return;
03229     /* otherwise we must add out module into the list */
03230     swig_module.next = module_head->next;
03231     module_head->next = &swig_module;
03232   }
03233   
03234   /* When multiple interpeters are used, a module could have already been initialized in
03235        a different interpreter, but not yet have a pointer in this interpreter.
03236        In this case, we do not want to continue adding types... everything should be
03237        set up already */
03238   if (init == 0) return;
03239   
03240   /* Now work on filling in swig_module.types */
03241 #ifdef SWIGRUNTIME_DEBUG
03242   printf("SWIG_InitializeModule: size %d\n", swig_module.size);
03243 #endif
03244   for (i = 0; i < swig_module.size; ++i) {
03245     swig_type_info *type = 0;
03246     swig_type_info *ret;
03247     swig_cast_info *cast;
03248     
03249 #ifdef SWIGRUNTIME_DEBUG
03250     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
03251 #endif
03252     
03253     /* if there is another module already loaded */
03254     if (swig_module.next != &swig_module) {
03255       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
03256     }
03257     if (type) {
03258       /* Overwrite clientdata field */
03259 #ifdef SWIGRUNTIME_DEBUG
03260       printf("SWIG_InitializeModule: found type %s\n", type->name);
03261 #endif
03262       if (swig_module.type_initial[i]->clientdata) {
03263         type->clientdata = swig_module.type_initial[i]->clientdata;
03264 #ifdef SWIGRUNTIME_DEBUG
03265         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
03266 #endif
03267       }
03268     } else {
03269       type = swig_module.type_initial[i];
03270     }
03271     
03272     /* Insert casting types */
03273     cast = swig_module.cast_initial[i];
03274     while (cast->type) {
03275       /* Don't need to add information already in the list */
03276       ret = 0;
03277 #ifdef SWIGRUNTIME_DEBUG
03278       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
03279 #endif
03280       if (swig_module.next != &swig_module) {
03281         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
03282 #ifdef SWIGRUNTIME_DEBUG
03283         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
03284 #endif
03285       }
03286       if (ret) {
03287         if (type == swig_module.type_initial[i]) {
03288 #ifdef SWIGRUNTIME_DEBUG
03289           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
03290 #endif
03291           cast->type = ret;
03292           ret = 0;
03293         } else {
03294           /* Check for casting already in the list */
03295           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
03296 #ifdef SWIGRUNTIME_DEBUG
03297           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
03298 #endif
03299           if (!ocast) ret = 0;
03300         }
03301       }
03302       
03303       if (!ret) {
03304 #ifdef SWIGRUNTIME_DEBUG
03305         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
03306 #endif
03307         if (type->cast) {
03308           type->cast->prev = cast;
03309           cast->next = type->cast;
03310         }
03311         type->cast = cast;
03312       }
03313       cast++;
03314     }
03315     /* Set entry in modules->types array equal to the type */
03316     swig_module.types[i] = type;
03317   }
03318   swig_module.types[i] = 0;
03319   
03320 #ifdef SWIGRUNTIME_DEBUG
03321   printf("**** SWIG_InitializeModule: Cast List ******\n");
03322   for (i = 0; i < swig_module.size; ++i) {
03323     int j = 0;
03324     swig_cast_info *cast = swig_module.cast_initial[i];
03325     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
03326     while (cast->type) {
03327       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
03328       cast++;
03329       ++j;
03330     }
03331     printf("---- Total casts: %d\n",j);
03332   }
03333   printf("**** SWIG_InitializeModule: Cast List ******\n");
03334 #endif
03335 }
03336 
03337 /* This function will propagate the clientdata field of type to
03338 * any new swig_type_info structures that have been added into the list
03339 * of equivalent types.  It is like calling
03340 * SWIG_TypeClientData(type, clientdata) a second time.
03341 */
03342 SWIGRUNTIME void
03343 SWIG_PropagateClientData(void) {
03344   size_t i;
03345   swig_cast_info *equiv;
03346   static int init_run = 0;
03347   
03348   if (init_run) return;
03349   init_run = 1;
03350   
03351   for (i = 0; i < swig_module.size; i++) {
03352     if (swig_module.types[i]->clientdata) {
03353       equiv = swig_module.types[i]->cast;
03354       while (equiv) {
03355         if (!equiv->converter) {
03356           if (equiv->type && !equiv->type->clientdata)
03357           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
03358         }
03359         equiv = equiv->next;
03360       }
03361     }
03362   }
03363 }
03364 
03365 #ifdef __cplusplus
03366 #if 0
03367 {
03368   /* c-mode */
03369 #endif
03370 }
03371 #endif
03372 
03373 
03374 
03375 #ifdef __cplusplus
03376 extern "C" {
03377 #endif
03378   
03379   /* Python-specific SWIG API */
03380 #define SWIG_newvarlink()                             SWIG_Python_newvarlink()
03381 #define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
03382 #define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
03383   
03384   /* -----------------------------------------------------------------------------
03385    * global variable support code.
03386    * ----------------------------------------------------------------------------- */
03387   
03388   typedef struct swig_globalvar {
03389     char       *name;                  /* Name of global variable */
03390     PyObject *(*get_attr)(void);       /* Return the current value */
03391     int       (*set_attr)(PyObject *); /* Set the value */
03392     struct swig_globalvar *next;
03393   } swig_globalvar;
03394   
03395   typedef struct swig_varlinkobject {
03396     PyObject_HEAD
03397     swig_globalvar *vars;
03398   } swig_varlinkobject;
03399   
03400   SWIGINTERN PyObject *
03401   swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
03402 #if PY_VERSION_HEX >= 0x03000000
03403     return PyUnicode_InternFromString("<Swig global variables>");
03404 #else
03405     return PyString_FromString("<Swig global variables>");
03406 #endif
03407   }
03408   
03409   SWIGINTERN PyObject *
03410   swig_varlink_str(swig_varlinkobject *v) {
03411 #if PY_VERSION_HEX >= 0x03000000
03412     PyObject *str = PyUnicode_InternFromString("(");
03413     PyObject *tail;
03414     PyObject *joined;
03415     swig_globalvar *var;
03416     for (var = v->vars; var; var=var->next) {
03417       tail = PyUnicode_FromString(var->name);
03418       joined = PyUnicode_Concat(str, tail);
03419       Py_DecRef(str);
03420       Py_DecRef(tail);
03421       str = joined;
03422       if (var->next) {
03423         tail = PyUnicode_InternFromString(", ");
03424         joined = PyUnicode_Concat(str, tail);
03425         Py_DecRef(str);
03426         Py_DecRef(tail);
03427         str = joined;
03428       }
03429     }
03430     tail = PyUnicode_InternFromString(")");
03431     joined = PyUnicode_Concat(str, tail);
03432     Py_DecRef(str);
03433     Py_DecRef(tail);
03434     str = joined;
03435 #else
03436     PyObject *str = PyString_FromString("(");
03437     swig_globalvar *var;
03438     for (var = v->vars; var; var=var->next) {
03439       PyString_ConcatAndDel(&str,PyString_FromString(var->name));
03440       if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
03441     }
03442     PyString_ConcatAndDel(&str,PyString_FromString(")"));
03443 #endif
03444     return str;
03445   }
03446   
03447   SWIGINTERN int
03448   swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
03449     char *tmp;
03450     PyObject *str = swig_varlink_str(v);
03451     fprintf(fp,"Swig global variables ");
03452     fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
03453     SWIG_Python_str_DelForPy3(tmp);
03454     Py_DECREF(str);
03455     return 0;
03456   }
03457   
03458   SWIGINTERN void
03459   swig_varlink_dealloc(swig_varlinkobject *v) {
03460     swig_globalvar *var = v->vars;
03461     while (var) {
03462       swig_globalvar *n = var->next;
03463       free(var->name);
03464       free(var);
03465       var = n;
03466     }
03467   }
03468   
03469   SWIGINTERN PyObject *
03470   swig_varlink_getattr(swig_varlinkobject *v, char *n) {
03471     PyObject *res = NULL;
03472     swig_globalvar *var = v->vars;
03473     while (var) {
03474       if (strcmp(var->name,n) == 0) {
03475         res = (*var->get_attr)();
03476         break;
03477       }
03478       var = var->next;
03479     }
03480     if (res == NULL && !PyErr_Occurred()) {
03481       PyErr_SetString(PyExc_NameError,"Unknown C global variable");
03482     }
03483     return res;
03484   }
03485   
03486   SWIGINTERN int
03487   swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
03488     int res = 1;
03489     swig_globalvar *var = v->vars;
03490     while (var) {
03491       if (strcmp(var->name,n) == 0) {
03492         res = (*var->set_attr)(p);
03493         break;
03494       }
03495       var = var->next;
03496     }
03497     if (res == 1 && !PyErr_Occurred()) {
03498       PyErr_SetString(PyExc_NameError,"Unknown C global variable");
03499     }
03500     return res;
03501   }
03502   
03503   SWIGINTERN PyTypeObject*
03504   swig_varlink_type(void) {
03505     static char varlink__doc__[] = "Swig var link object";
03506     static PyTypeObject varlink_type;
03507     static int type_init = 0;  
03508     if (!type_init) {
03509       const PyTypeObject tmp
03510       = {
03511         /* PyObject header changed in Python 3 */
03512 #if PY_VERSION_HEX >= 0x03000000
03513         PyVarObject_HEAD_INIT(&PyType_Type, 0)
03514 #else
03515         PyObject_HEAD_INIT(NULL)
03516         0,                                  /* Number of items in variable part (ob_size) */
03517 #endif
03518         (char *)"swigvarlink",              /* Type name (tp_name) */
03519         sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
03520         0,                                  /* Itemsize (tp_itemsize) */
03521         (destructor) swig_varlink_dealloc,  /* Deallocator (tp_dealloc) */ 
03522         (printfunc) swig_varlink_print,     /* Print (tp_print) */
03523         (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
03524         (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
03525         0,                                  /* tp_compare */
03526         (reprfunc) swig_varlink_repr,       /* tp_repr */
03527         0,                                  /* tp_as_number */
03528         0,                                  /* tp_as_sequence */
03529         0,                                  /* tp_as_mapping */
03530         0,                                  /* tp_hash */
03531         0,                                  /* tp_call */
03532         (reprfunc) swig_varlink_str,        /* tp_str */
03533         0,                                  /* tp_getattro */
03534         0,                                  /* tp_setattro */
03535         0,                                  /* tp_as_buffer */
03536         0,                                  /* tp_flags */
03537         varlink__doc__,                     /* tp_doc */
03538         0,                                  /* tp_traverse */
03539         0,                                  /* tp_clear */
03540         0,                                  /* tp_richcompare */
03541         0,                                  /* tp_weaklistoffset */
03542 #if PY_VERSION_HEX >= 0x02020000
03543         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
03544 #endif
03545 #if PY_VERSION_HEX >= 0x02030000
03546         0,                                  /* tp_del */
03547 #endif
03548 #ifdef COUNT_ALLOCS
03549         0,0,0,0                             /* tp_alloc -> tp_next */
03550 #endif
03551       };
03552       varlink_type = tmp;
03553       /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
03554 #if PY_VERSION_HEX < 0x03000000
03555       varlink_type.ob_type = &PyType_Type;
03556 #endif
03557       type_init = 1;
03558     }
03559     return &varlink_type;
03560   }
03561   
03562   /* Create a variable linking object for use later */
03563   SWIGINTERN PyObject *
03564   SWIG_Python_newvarlink(void) {
03565     swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
03566     if (result) {
03567       result->vars = 0;
03568     }
03569     return ((PyObject*) result);
03570   }
03571   
03572   SWIGINTERN void 
03573   SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
03574     swig_varlinkobject *v = (swig_varlinkobject *) p;
03575     swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
03576     if (gv) {
03577       size_t size = strlen(name)+1;
03578       gv->name = (char *)malloc(size);
03579       if (gv->name) {
03580         strncpy(gv->name,name,size);
03581         gv->get_attr = get_attr;
03582         gv->set_attr = set_attr;
03583         gv->next = v->vars;
03584       }
03585     }
03586     v->vars = gv;
03587   }
03588   
03589   SWIGINTERN PyObject *
03590   SWIG_globals(void) {
03591     static PyObject *_SWIG_globals = 0; 
03592     if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
03593     return _SWIG_globals;
03594   }
03595   
03596   /* -----------------------------------------------------------------------------
03597    * constants/methods manipulation
03598    * ----------------------------------------------------------------------------- */
03599   
03600   /* Install Constants */
03601   SWIGINTERN void
03602   SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
03603     PyObject *obj = 0;
03604     size_t i;
03605     for (i = 0; constants[i].type; ++i) {
03606       switch(constants[i].type) {
03607       case SWIG_PY_POINTER:
03608         obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
03609         break;
03610       case SWIG_PY_BINARY:
03611         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
03612         break;
03613       default:
03614         obj = 0;
03615         break;
03616       }
03617       if (obj) {
03618         PyDict_SetItemString(d, constants[i].name, obj);
03619         Py_DECREF(obj);
03620       }
03621     }
03622   }
03623   
03624   /* -----------------------------------------------------------------------------*/
03625   /* Fix SwigMethods to carry the callback ptrs when needed */
03626   /* -----------------------------------------------------------------------------*/
03627   
03628   SWIGINTERN void
03629   SWIG_Python_FixMethods(PyMethodDef *methods,
03630     swig_const_info *const_table,
03631     swig_type_info **types,
03632     swig_type_info **types_initial) {
03633     size_t i;
03634     for (i = 0; methods[i].ml_name; ++i) {
03635       const char *c = methods[i].ml_doc;
03636       if (c && (c = strstr(c, "swig_ptr: "))) {
03637         int j;
03638         swig_const_info *ci = 0;
03639         const char *name = c + 10;
03640         for (j = 0; const_table[j].type; ++j) {
03641           if (strncmp(const_table[j].name, name, 
03642               strlen(const_table[j].name)) == 0) {
03643             ci = &(const_table[j]);
03644             break;
03645           }
03646         }
03647         if (ci) {
03648           size_t shift = (ci->ptype) - types;
03649           swig_type_info *ty = types_initial[shift];
03650           size_t ldoc = (c - methods[i].ml_doc);
03651           size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
03652           char *ndoc = (char*)malloc(ldoc + lptr + 10);
03653           if (ndoc) {
03654             char *buff = ndoc;
03655             void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
03656             if (ptr) {
03657               strncpy(buff, methods[i].ml_doc, ldoc);
03658               buff += ldoc;
03659               strncpy(buff, "swig_ptr: ", 10);
03660               buff += 10;
03661               SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
03662               methods[i].ml_doc = ndoc;
03663             }
03664           }
03665         }
03666       }
03667     }
03668   } 
03669   
03670 #ifdef __cplusplus
03671 }
03672 #endif
03673 
03674 /* -----------------------------------------------------------------------------*
03675  *  Partial Init method
03676  * -----------------------------------------------------------------------------*/
03677 
03678 #ifdef __cplusplus
03679 extern "C"
03680 #endif
03681 
03682 SWIGEXPORT 
03683 #if PY_VERSION_HEX >= 0x03000000
03684 PyObject*
03685 #else
03686 void
03687 #endif
03688 SWIG_init(void) {
03689   PyObject *m, *d;  
03690 #if PY_VERSION_HEX >= 0x03000000
03691   static struct PyModuleDef SWIG_module = {
03692     PyModuleDef_HEAD_INIT,
03693     (char *) SWIG_name,
03694     NULL,
03695     -1,
03696     SwigMethods,
03697     NULL,
03698     NULL,
03699     NULL,
03700     NULL
03701   };
03702 #endif
03703   
03704   /* Fix SwigMethods to carry the callback ptrs when needed */
03705   SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
03706   
03707 #if PY_VERSION_HEX >= 0x03000000
03708   m = PyModule_Create(&SWIG_module);
03709 #else
03710   m = Py_InitModule((char *) SWIG_name, SwigMethods);
03711 #endif
03712   d = PyModule_GetDict(m);
03713   
03714   SWIG_InitializeModule(0);
03715   SWIG_InstallConstants(d,swig_const_table);
03716   
03717   
03718 #if PY_VERSION_HEX >= 0x03000000
03719   return m;
03720 #else
03721   return;
03722 #endif
03723 }
03724