swig::traits_as< Type *, pointer_category > Struct Template Reference

List of all members.

Static Public Member Functions

static Type * as (PyObject *obj, bool throw_error)


Detailed Description

template<class Type>
struct swig::traits_as< Type *, pointer_category >

Definition at line 3719 of file SyFi_wrap.cc.


Member Function Documentation

template<class Type >
static Type* swig::traits_as< Type *, pointer_category >::as ( PyObject *  obj,
bool  throw_error 
) [inline, static]

Definition at line 3720 of file SyFi_wrap.cc.

References swig::traits_asptr< Type >::asptr(), run_all::res, SWIG_Error, SWIG_ERROR, SWIG_IsOK, and SWIG_TypeError.

03720                                                      {
03721       Type *v = 0;      
03722       int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
03723       if (SWIG_IsOK(res)) {
03724         return v;
03725       } else {
03726         if (!PyErr_Occurred()) {
03727           SWIG_Error(SWIG_TypeError,  swig::type_name<Type>());
03728         }
03729         if (throw_error) throw std::invalid_argument("bad type");
03730         return 0;
03731       }
03732     }


The documentation for this struct was generated from the following file:

Generated on Mon Aug 31 16:17:06 2009 for SyFi by  doxygen 1.5.9