yat  0.10.4pre
SegmentMap.h
1 #ifndef theplu_yat_utility_segment_map
2 #define theplu_yat_utility_segment_map
3 
4 // $Id: SegmentMap.h 2703 2012-03-12 06:43:10Z peter $
5 
6 /*
7  Copyright (C) 2010, 2012 Peter Johansson
8 
9  This file is part of the yat library, http://dev.thep.lu.se/yat
10 
11  The yat library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU General Public License as
13  published by the Free Software Foundation; either version 3 of the
14  License, or (at your option) any later version.
15 
16  The yat library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with yat. If not, see <http://www.gnu.org/licenses/>.
23 */
24 
25 #include "Segment.h"
26 #include "SegmentTree.h"
27 #include "stl_utility.h"
28 
29 #include <map>
30 
31 namespace theplu {
32 namespace yat {
33 namespace utility {
34 
42  template<typename T, typename Tp, class Compare = std::less<T> >
43  class SegmentMap
44  : public SegmentTree<std::map<Segment<T, Compare>, Tp,
45  SegmentCompare<T, Compare> >,
46  Compare,
47  PairFirst<const std::pair<const Segment<T, Compare>, Tp> > >
48  {
49  public:
51  typedef Tp mapped_type;
52 
56  SegmentMap(void) {}
57 
58  private:
59  // using compiler generated copying
60  //SegmentMap(const SegmentMap&);
61  //SegmentMap& operator=(const SegmentMap&);
62  };
63 
64 }}}
65 #endif

Generated on Mon Nov 11 2013 09:41:44 for yat by  doxygen 1.8.1