ATLAS Offline Software
Loading...
Searching...
No Matches
Event
PyDumper
PyDumper
PySTLAdaptor.h
Go to the documentation of this file.
1
// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
3
/*
4
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
// $Id$
14
15
16
#ifndef PYDUMPER_PYSTLADAPTOR_H
17
#define PYDUMPER_PYSTLADAPTOR_H
18
19
20
namespace
PyDumper
{
21
22
35
template
<
class
C>
36
class
PySTLAdaptor
37
{
38
public
:
39
class
iterator
40
{
41
public
:
42
iterator
(
typename
C::const_iterator it) :
m_it
(it) {}
43
typename
C::const_iterator::value_type
operator*
() {
return
*
m_it
; }
44
iterator
&
operator++
() { ++
m_it
;
return
*
this
; }
45
bool
operator!=
(
const
iterator
& other)
const
{
return
m_it
!= other.m_it; }
46
private
:
47
typename
C::const_iterator
m_it
;
48
};
49
50
51
PySTLAdaptor
(
const
C
& c) :
m_c
(&c) {}
52
iterator
begin
()
const
{
return
m_c
->begin(); }
53
iterator
end
()
const
{
return
m_c
->end(); }
54
55
56
private
:
57
const
C
*
m_c
;
58
};
59
60
61
}
// namespace PyDumper
62
63
64
#endif
// not PYDUMPER_PYSTLADAPTOR_H
PyDumper::PySTLAdaptor::iterator
Definition
PySTLAdaptor.h:40
PyDumper::PySTLAdaptor::iterator::iterator
iterator(typename C::const_iterator it)
Definition
PySTLAdaptor.h:42
PyDumper::PySTLAdaptor::iterator::m_it
C::const_iterator m_it
Definition
PySTLAdaptor.h:47
PyDumper::PySTLAdaptor::iterator::operator!=
bool operator!=(const iterator &other) const
Definition
PySTLAdaptor.h:45
PyDumper::PySTLAdaptor::iterator::operator*
C::const_iterator::value_type operator*()
Definition
PySTLAdaptor.h:43
PyDumper::PySTLAdaptor::iterator::operator++
iterator & operator++()
Definition
PySTLAdaptor.h:44
PyDumper::PySTLAdaptor::PySTLAdaptor
PySTLAdaptor(const C &c)
Definition
PySTLAdaptor.h:51
PyDumper::PySTLAdaptor::m_c
const C * m_c
Definition
PySTLAdaptor.h:57
PyDumper::PySTLAdaptor::end
iterator end() const
Definition
PySTLAdaptor.h:53
PyDumper::PySTLAdaptor::begin
iterator begin() const
Definition
PySTLAdaptor.h:52
C
struct color C
PyDumper
Definition
PyDumperDict.h:22
Generated on
for ATLAS Offline Software by
1.14.0