swig::traits_asval< Type > Struct Template Reference

List of all members.

Static Public Member Functions

static int asval (PyObject *obj, Type *val)


Detailed Description

template<class Type>
struct swig::traits_asval< Type >

Definition at line 3633 of file SyFi_wrap.cc.


Member Function Documentation

template<class Type >
static int swig::traits_asval< Type >::asval ( PyObject *  obj,
Type *  val 
) [inline, static]

Definition at line 3634 of file SyFi_wrap.cc.

References swig::asptr(), SyFi::p, run_all::res, SWIG_DelNewMask, SWIG_ERROR, SWIG_IsNewObj, and SWIG_IsOK.

Referenced by swig::asval().

03634                                                {
03635       if (val) {
03636         Type *p = 0;
03637         int res = traits_asptr<Type>::asptr(obj, &p);
03638         if (!SWIG_IsOK(res)) return res;        
03639         if (p) {
03640           typedef typename noconst_traits<Type>::noconst_type noconst_type;
03641           *(const_cast<noconst_type*>(val)) = *p;
03642           if (SWIG_IsNewObj(res)){
03643             delete p;
03644             res = SWIG_DelNewMask(res);
03645           }
03646           return res;
03647         } else {
03648           return SWIG_ERROR;
03649         }
03650       } else {
03651         return traits_asptr<Type>::asptr(obj, (Type **)(0));
03652       }
03653     }


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