Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Types | Static Public Member Functions
swig::traits_from_stdseq< Seq, T > Struct Template Reference

List of all members.

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)

Detailed Description

template<class Seq, class T = typename Seq::value_type>
struct swig::traits_from_stdseq< Seq, T >

Definition at line 4299 of file arc_wrap.cpp.


Member Typedef Documentation

template<class Seq, class T = typename Seq::value_type>
typedef sequence::const_iterator swig::traits_from_stdseq< Seq, T >::const_iterator

Definition at line 4303 of file arc_wrap.cpp.

template<class Seq, class T = typename Seq::value_type>
typedef Seq swig::traits_from_stdseq< Seq, T >::sequence

Definition at line 4300 of file arc_wrap.cpp.

template<class Seq, class T = typename Seq::value_type>
typedef Seq::size_type swig::traits_from_stdseq< Seq, T >::size_type

Definition at line 4302 of file arc_wrap.cpp.

template<class Seq, class T = typename Seq::value_type>
typedef T swig::traits_from_stdseq< Seq, T >::value_type

Definition at line 4301 of file arc_wrap.cpp.


Member Function Documentation

template<class Seq, class T = typename Seq::value_type>
static PyObject* swig::traits_from_stdseq< Seq, T >::from ( const sequence seq) [inline, static]

Definition at line 4305 of file arc_wrap.cpp.

                                               {
#ifdef SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS
      swig_type_info *desc = swig::type_info<sequence>();
      if (desc && desc->clientdata) {
       return SWIG_NewPointerObj(new sequence(seq), desc, SWIG_POINTER_OWN);
      }
#endif
      size_type size = seq.size();
      if (size <= (size_type)INT_MAX) {
       PyObject *obj = PyTuple_New((int)size);
       int i = 0;
       for (const_iterator it = seq.begin();
            it != seq.end(); ++it, ++i) {
         PyTuple_SetItem(obj,i,swig::from<value_type>(*it));
       }
       return obj;
      } else {
       PyErr_SetString(PyExc_OverflowError,"sequence size not valid in python");
       return NULL;
      }
    }

The documentation for this struct was generated from the following file: