ATLAS Offline Software
Loading...
Searching...
No Matches
combined_ordered_container.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef combined_ordered_container_H
6#define combined_ordered_container_H
7
9
15
16namespace LArBadChanImpl {
17
18 template <class Cont, class CMP=std::less<typename Cont::value_type> >
20 public:
21
22 typedef typename Cont::value_type value_type;
25
26 combined_ordered_container( const Cont& c1, const Cont& c2) : m_c1(c1), m_c2(c2) {}
27
28 const_iterator begin() const {return iterator( m_c1.begin(), m_c1.end(),
29 m_c2.begin(), m_c2.end(), CMP());}
30 const_iterator end() const {return iterator( m_c1.end(), m_c1.end(),
31 m_c2.end(), m_c2.end(), CMP());}
32
33 private:
34
35 const Cont& m_c1;
36 const Cont& m_c2;
37
38 };
39
40}
41
42#endif
combined_ordered_iterator< typename Cont::const_iterator, CMP > iterator
combined_ordered_iterator< typename Cont::const_iterator, CMP > const_iterator
combined_ordered_container(const Cont &c1, const Cont &c2)
A helper class that provides iterators over elements in two separate ordered containers as if the ele...