Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Types | Public Member Functions | Private Attributes
swig::PySequence_Cont< T > Struct Template Reference

List of all members.

Public Types

typedef PySequence_Ref< T > reference
typedef const PySequence_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
PySequence_InputIterator< T,
reference
iterator
typedef
PySequence_InputIterator< T,
const_reference
const_iterator

Public Member Functions

 PySequence_Cont (PyObject *seq)
 ~PySequence_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

Detailed Description

template<class T>
struct swig::PySequence_Cont< T >

Definition at line 3997 of file arc_wrap.cpp.


Member Typedef Documentation

Definition at line 4007 of file arc_wrap.cpp.

template<class T>
typedef const pointer swig::PySequence_Cont< T >::const_pointer

Definition at line 4005 of file arc_wrap.cpp.

template<class T>
typedef const PySequence_Ref<T> swig::PySequence_Cont< T >::const_reference

Definition at line 4000 of file arc_wrap.cpp.

template<class T>
typedef int swig::PySequence_Cont< T >::difference_type

Definition at line 4003 of file arc_wrap.cpp.

Definition at line 4006 of file arc_wrap.cpp.

template<class T>
typedef T* swig::PySequence_Cont< T >::pointer

Definition at line 4002 of file arc_wrap.cpp.

template<class T>
typedef PySequence_Ref<T> swig::PySequence_Cont< T >::reference

Definition at line 3999 of file arc_wrap.cpp.

template<class T>
typedef int swig::PySequence_Cont< T >::size_type

Definition at line 4004 of file arc_wrap.cpp.

template<class T>
typedef T swig::PySequence_Cont< T >::value_type

Definition at line 4001 of file arc_wrap.cpp.


Constructor & Destructor Documentation

template<class T>
swig::PySequence_Cont< T >::PySequence_Cont ( PyObject *  seq) [inline]

Definition at line 4009 of file arc_wrap.cpp.

                                   : _seq(0)
    {
      if (!PySequence_Check(seq)) {
       throw std::invalid_argument("a sequence is expected");
      }
      _seq = seq;
      Py_INCREF(_seq);
    }
template<class T>
swig::PySequence_Cont< T >::~PySequence_Cont ( ) [inline]

Definition at line 4018 of file arc_wrap.cpp.

    {
      Py_XDECREF(_seq);
    }

Member Function Documentation

template<class T>
iterator swig::PySequence_Cont< T >::begin ( ) [inline]

Definition at line 4033 of file arc_wrap.cpp.

    {
      return iterator(_seq, 0);
    }
template<class T>
const_iterator swig::PySequence_Cont< T >::begin ( ) const [inline]

Definition at line 4038 of file arc_wrap.cpp.

    {
      return const_iterator(_seq, 0);
    }
template<class T>
bool swig::PySequence_Cont< T >::check ( bool  set_err = true) const [inline]

Definition at line 4063 of file arc_wrap.cpp.

    {
      int s = size();
      for (int i = 0; i < s; ++i) {
       swig::PyObject_var 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;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T>
bool swig::PySequence_Cont< T >::empty ( ) const [inline]

Definition at line 4028 of file arc_wrap.cpp.

    {
      return size() == 0;
    }

Here is the call graph for this function:

template<class T>
iterator swig::PySequence_Cont< T >::end ( ) [inline]

Definition at line 4043 of file arc_wrap.cpp.

    {
      return iterator(_seq, size());
    }

Here is the call graph for this function:

template<class T>
const_iterator swig::PySequence_Cont< T >::end ( ) const [inline]

Definition at line 4048 of file arc_wrap.cpp.

    {
      return const_iterator(_seq, size());
    }

Here is the call graph for this function:

template<class T>
reference swig::PySequence_Cont< T >::operator[] ( difference_type  n) [inline]

Definition at line 4053 of file arc_wrap.cpp.

    {
      return reference(_seq, n);
    }
template<class T>
const_reference swig::PySequence_Cont< T >::operator[] ( difference_type  n) const [inline]

Definition at line 4058 of file arc_wrap.cpp.

    {
      return const_reference(_seq, n);
    }
template<class T>
size_type swig::PySequence_Cont< T >::size ( ) const [inline]

Definition at line 4023 of file arc_wrap.cpp.

    {
      return static_cast<size_type>(PySequence_Size(_seq));
    }

Here is the caller graph for this function:


Member Data Documentation

template<class T>
PyObject* swig::PySequence_Cont< T >::_seq [private]

Definition at line 4081 of file arc_wrap.cpp.


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