SyFi
0.3
|
Public Types | |
typedef SwigPySequence_Ref< T > | reference |
typedef const SwigPySequence_Ref< T > | const_reference |
typedef T | value_type |
typedef T * | pointer |
typedef int | difference_type |
typedef int | size_type |
typedef const pointer | const_pointer |
typedef SwigPySequence_InputIterator < T, reference > | iterator |
typedef SwigPySequence_InputIterator < T, const_reference > | const_iterator |
Public Member Functions | |
SwigPySequence_Cont (PyObject *seq) | |
~SwigPySequence_Cont () | |
size_type | size () const |
bool | empty () const |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
reference | operator[] (difference_type n) |
const_reference | operator[] (difference_type n) const |
bool | check (bool set_err=true) const |
Private Attributes | |
PyObject * | _seq |
Definition at line 4590 of file SyFiPYTHON_wrap.cxx.
typedef SwigPySequence_InputIterator<T, const_reference> swig::SwigPySequence_Cont< T >::const_iterator |
Definition at line 4600 of file SyFiPYTHON_wrap.cxx.
typedef const pointer swig::SwigPySequence_Cont< T >::const_pointer |
Definition at line 4598 of file SyFiPYTHON_wrap.cxx.
typedef const SwigPySequence_Ref<T> swig::SwigPySequence_Cont< T >::const_reference |
Definition at line 4593 of file SyFiPYTHON_wrap.cxx.
typedef int swig::SwigPySequence_Cont< T >::difference_type |
Definition at line 4596 of file SyFiPYTHON_wrap.cxx.
typedef SwigPySequence_InputIterator<T, reference> swig::SwigPySequence_Cont< T >::iterator |
Definition at line 4599 of file SyFiPYTHON_wrap.cxx.
typedef T* swig::SwigPySequence_Cont< T >::pointer |
Definition at line 4595 of file SyFiPYTHON_wrap.cxx.
typedef SwigPySequence_Ref<T> swig::SwigPySequence_Cont< T >::reference |
Definition at line 4592 of file SyFiPYTHON_wrap.cxx.
typedef int swig::SwigPySequence_Cont< T >::size_type |
Definition at line 4597 of file SyFiPYTHON_wrap.cxx.
typedef T swig::SwigPySequence_Cont< T >::value_type |
Definition at line 4594 of file SyFiPYTHON_wrap.cxx.
swig::SwigPySequence_Cont< T >::SwigPySequence_Cont | ( | PyObject * | seq | ) | [inline] |
Definition at line 4602 of file SyFiPYTHON_wrap.cxx.
swig::SwigPySequence_Cont< T >::~SwigPySequence_Cont | ( | ) | [inline] |
Definition at line 4611 of file SyFiPYTHON_wrap.cxx.
{ Py_XDECREF(_seq); }
iterator swig::SwigPySequence_Cont< T >::begin | ( | ) | [inline] |
Definition at line 4626 of file SyFiPYTHON_wrap.cxx.
const_iterator swig::SwigPySequence_Cont< T >::begin | ( | ) | const [inline] |
Definition at line 4631 of file SyFiPYTHON_wrap.cxx.
{ return const_iterator(_seq, 0); }
bool swig::SwigPySequence_Cont< T >::check | ( | bool | set_err = true | ) | const [inline] |
Definition at line 4656 of file SyFiPYTHON_wrap.cxx.
References run::s, SWIG_Error, and SWIG_RuntimeError.
Referenced by swig::traits_asptr_stdseq< Seq, T >::asptr().
{ int s = size(); for (int i = 0; i < s; ++i) { swig::SwigVar_PyObject item = PySequence_GetItem(_seq, i); if (!swig::check<value_type>(item)) { if (set_err) { char msg[1024]; sprintf(msg, "in sequence element %d", i); SWIG_Error(SWIG_RuntimeError, msg); } return false; } } return true; }
bool swig::SwigPySequence_Cont< T >::empty | ( | ) | const [inline] |
Definition at line 4621 of file SyFiPYTHON_wrap.cxx.
{ return size() == 0; }
iterator swig::SwigPySequence_Cont< T >::end | ( | ) | [inline] |
Definition at line 4636 of file SyFiPYTHON_wrap.cxx.
const_iterator swig::SwigPySequence_Cont< T >::end | ( | ) | const [inline] |
Definition at line 4641 of file SyFiPYTHON_wrap.cxx.
{ return const_iterator(_seq, size()); }
reference swig::SwigPySequence_Cont< T >::operator[] | ( | difference_type | n | ) | [inline] |
Definition at line 4646 of file SyFiPYTHON_wrap.cxx.
const_reference swig::SwigPySequence_Cont< T >::operator[] | ( | difference_type | n | ) | const [inline] |
Definition at line 4651 of file SyFiPYTHON_wrap.cxx.
{ return const_reference(_seq, n); }
size_type swig::SwigPySequence_Cont< T >::size | ( | ) | const [inline] |
Definition at line 4616 of file SyFiPYTHON_wrap.cxx.
References PySequence_Size.
{ return static_cast<size_type>(PySequence_Size(_seq)); }
PyObject* swig::SwigPySequence_Cont< T >::_seq [private] |
Definition at line 4674 of file SyFiPYTHON_wrap.cxx.