ATLAS Offline Software
Loading...
Searching...
No Matches
PyDumper::PySTLAdaptor< C > Class Template Reference

Helper for iterating over STL map classes. More...

#include <PySTLAdaptor.h>

Collaboration diagram for PyDumper::PySTLAdaptor< C >:

Classes

class  iterator

Public Member Functions

 PySTLAdaptor (const C &c)
iterator begin () const
iterator end () const

Private Attributes

const Cm_c

Detailed Description

template<class C>
class PyDumper::PySTLAdaptor< C >

Helper for iterating over STL map classes.

It's difficult to generate proper reflex dictionaries for iterators over STL map classes, as (as least with libstdc++) one also needs dictionaries for bases of the iterators that have internal libstdc++ names. This adaptor class provides simple iterators for which it is easy to generate dictionaries.

While the principal use of this is expected to be map classes, it should work for any STL-compliant container type.

Definition at line 36 of file PySTLAdaptor.h.

Constructor & Destructor Documentation

◆ PySTLAdaptor()

template<class C>
PyDumper::PySTLAdaptor< C >::PySTLAdaptor ( const C & c)
inline

Definition at line 51 of file PySTLAdaptor.h.

51: m_c (&c) {}
Helper for iterating over STL map classes.

Member Function Documentation

◆ begin()

template<class C>
iterator PyDumper::PySTLAdaptor< C >::begin ( ) const
inline

Definition at line 52 of file PySTLAdaptor.h.

52{ return m_c->begin(); }

◆ end()

template<class C>
iterator PyDumper::PySTLAdaptor< C >::end ( ) const
inline

Definition at line 53 of file PySTLAdaptor.h.

53{ return m_c->end(); }

Member Data Documentation

◆ m_c

template<class C>
const C* PyDumper::PySTLAdaptor< C >::m_c
private

Definition at line 57 of file PySTLAdaptor.h.


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