swig::traits_as< Type, value_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, value_category >

Definition at line 3678 of file SyFi_wrap.cc.


Member Function Documentation

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

Definition at line 3679 of file SyFi_wrap.cc.

References swig::asval(), run_all::res, SWIG_Error, SWIG_IsOK, and SWIG_TypeError.

03679                                                     {
03680       Type v;
03681       int res = asval(obj, &v);
03682       if (!obj || !SWIG_IsOK(res)) {
03683         if (!PyErr_Occurred()) {
03684 	  ::SWIG_Error(SWIG_TypeError,  swig::type_name<Type>());
03685         }
03686         if (throw_error) throw std::invalid_argument("bad type");
03687       }
03688       return v;
03689     }


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