SyFi 0.3
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 3675 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 3676 of file SyFi_wrap.cc.

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

                                                    {
      Type v;
      int res = asval(obj, &v);
      if (!obj || !SWIG_IsOK(res)) {
        if (!PyErr_Occurred()) {
	  ::SWIG_Error(SWIG_TypeError,  swig::type_name<Type>());
        }
        if (throw_error) throw std::invalid_argument("bad type");
      }
      return v;
    }

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines