ATLAS Offline Software
CaloConstIteratorAdaptor.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  * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
4  */
5 // $Id$
14 #ifndef CALODETDESCR_CALOCONSTITERATORADAPTOR_H
15 #define CALODETDESCR_CALOCONSTITERATORADAPTOR_H
16 
17 
18 #include "boost/iterator/iterator_adaptor.hpp"
19 #include <iterator>
20 #include <type_traits>
21 
22 
23 // Helper: The value type of ITERATOR should be a pointer.
24 // Give the type as a const pointer.
25 template <class ITERATOR>
27 {
28  typedef typename std::iterator_traits<ITERATOR>::value_type orig_t;
30  typedef const base_t* type;
31 };
32 
33 
40 template <class ITERATOR>
42  : public boost::iterator_adaptor<CaloConstIteratorAdaptor<ITERATOR>,
43  ITERATOR,
44  typename CaloClassIteratorValueType<ITERATOR>::type,
45  typename ITERATOR::iterator_category,
46  typename CaloClassIteratorValueType<ITERATOR>::type>
47 {
48 public:
51  : CaloConstIteratorAdaptor::iterator_adaptor_ (it) {}
52 
53 private:
55 };
56 
57 
58 #endif // not CALODETDESCR_CALOCONSTITERATORADAPTOR_H
skel.it
it
Definition: skel.GENtoEVGEN.py:396
CaloConstIteratorAdaptor::iterator_core_access
friend class boost::iterator_core_access
Definition: CaloConstIteratorAdaptor.h:54
CaloClassIteratorValueType::type
const base_t * type
Definition: CaloConstIteratorAdaptor.h:30
CaloClassIteratorValueType::orig_t
std::iterator_traits< ITERATOR >::value_type orig_t
Definition: CaloConstIteratorAdaptor.h:28
CaloConstIteratorAdaptor::CaloConstIteratorAdaptor
CaloConstIteratorAdaptor()
Definition: CaloConstIteratorAdaptor.h:49
CaloConstIteratorAdaptor::CaloConstIteratorAdaptor
CaloConstIteratorAdaptor(ITERATOR it)
Definition: CaloConstIteratorAdaptor.h:50
CaloClassIteratorValueType::base_t
std::remove_pointer< orig_t >::type base_t
Definition: CaloConstIteratorAdaptor.h:29
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CaloClassIteratorValueType
Definition: CaloConstIteratorAdaptor.h:27
CaloConstIteratorAdaptor
Tranform iterator over pointers to iterator over const pointers.
Definition: CaloConstIteratorAdaptor.h:47