Public Types | |
typedef Seq | sequence |
typedef T | value_type |
typedef Seq::size_type | size_type |
typedef sequence::const_iterator | const_iterator |
Static Public Member Functions | |
static PyObject * | from (const sequence &seq) |
Definition at line 4453 of file SyFi_wrap.cc.
typedef sequence::const_iterator swig::traits_from_stdseq< Seq, T >::const_iterator |
Definition at line 4457 of file SyFi_wrap.cc.
typedef Seq swig::traits_from_stdseq< Seq, T >::sequence |
Definition at line 4454 of file SyFi_wrap.cc.
typedef Seq::size_type swig::traits_from_stdseq< Seq, T >::size_type |
Definition at line 4456 of file SyFi_wrap.cc.
typedef T swig::traits_from_stdseq< Seq, T >::value_type |
Definition at line 4455 of file SyFi_wrap.cc.
static PyObject* swig::traits_from_stdseq< Seq, T >::from | ( | const sequence & | seq | ) | [inline, static] |
Definition at line 4459 of file SyFi_wrap.cc.
References swig_type_info::clientdata, SWIG_NewPointerObj, and SWIG_POINTER_OWN.
04459 { 04460 #ifdef SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS 04461 swig_type_info *desc = swig::type_info<sequence>(); 04462 if (desc && desc->clientdata) { 04463 return SWIG_NewPointerObj(new sequence(seq), desc, SWIG_POINTER_OWN); 04464 } 04465 #endif 04466 size_type size = seq.size(); 04467 if (size <= (size_type)INT_MAX) { 04468 PyObject *obj = PyTuple_New((int)size); 04469 int i = 0; 04470 for (const_iterator it = seq.begin(); 04471 it != seq.end(); ++it, ++i) { 04472 PyTuple_SetItem(obj,i,swig::from<value_type>(*it)); 04473 } 04474 return obj; 04475 } else { 04476 PyErr_SetString(PyExc_OverflowError,"sequence size not valid in python"); 04477 return NULL; 04478 } 04479 }