Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Types | Static Public Member Functions
swig::traits_from< std::map< K, T > > Struct Template Reference

List of all members.

Public Types

typedef std::map< K, T > map_type
typedef map_type::const_iterator const_iterator
typedef map_type::size_type size_type

Static Public Member Functions

static PyObject * from (const map_type &map)

Detailed Description

template<class K, class T>
struct swig::traits_from< std::map< K, T > >

Definition at line 4560 of file arc_wrap.cpp.


Member Typedef Documentation

template<class K , class T >
typedef map_type::const_iterator swig::traits_from< std::map< K, T > >::const_iterator

Definition at line 4562 of file arc_wrap.cpp.

template<class K , class T >
typedef std::map<K,T> swig::traits_from< std::map< K, T > >::map_type

Definition at line 4561 of file arc_wrap.cpp.

template<class K , class T >
typedef map_type::size_type swig::traits_from< std::map< K, T > >::size_type

Definition at line 4563 of file arc_wrap.cpp.


Member Function Documentation

template<class K , class T >
static PyObject* swig::traits_from< std::map< K, T > >::from ( const map_type map) [inline, static]

Definition at line 4565 of file arc_wrap.cpp.

                                                 {
       swig_type_info *desc = swig::type_info<map_type>();
       if (desc && desc->clientdata) {
         return SWIG_NewPointerObj(new map_type(map), desc, SWIG_POINTER_OWN);
       } else {
         size_type size = map.size();
         int pysize = (size <= (size_type) INT_MAX) ? (int) size : -1;
         if (pysize < 0) {
           SWIG_PYTHON_THREAD_BEGIN_BLOCK;
           PyErr_SetString(PyExc_OverflowError,
                         "map size not valid in python");
           SWIG_PYTHON_THREAD_END_BLOCK;
           return NULL;
         }
         PyObject *obj = PyDict_New();
         for (const_iterator i= map.begin(); i!= map.end(); ++i) {
           swig::PyObject_var key = swig::from(i->first);
           swig::PyObject_var val = swig::from(i->second);
           PyDict_SetItem(obj, key, val);
         }
         return obj;
       }
      }

Here is the call graph for this function:


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