yat  0.8.3pre
SegmentMap.h
00001 #ifndef theplu_yat_utility_segment_map
00002 #define theplu_yat_utility_segment_map
00003 
00004 // $Id: SegmentMap.h 2681 2012-01-12 21:41:15Z peter $
00005 
00006 /*
00007   Copyright (C) 2010, 2012 Peter Johansson
00008 
00009   This file is part of the yat library, http://dev.thep.lu.se/yat
00010 
00011   The yat library is free software; you can redistribute it and/or
00012   modify it under the terms of the GNU General Public License as
00013   published by the Free Software Foundation; either version 3 of the
00014   License, or (at your option) any later version.
00015 
00016   The yat library is distributed in the hope that it will be useful,
00017   but WITHOUT ANY WARRANTY; without even the implied warranty of
00018   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00019   General Public License for more details.
00020 
00021   You should have received a copy of the GNU General Public License
00022   along with yat. If not, see <http://www.gnu.org/licenses/>.
00023 */
00024 
00025 #include "Segment.h"
00026 #include "SegmentTree.h"
00027 #include "stl_utility.h"
00028 
00029 #include <map>
00030 
00031 namespace theplu {
00032 namespace yat {
00033 namespace utility {
00034 
00042   template<typename T, typename Tp, class Compare = std::less<T> >
00043   class SegmentMap
00044     : public SegmentTree<std::map<Segment<T, Compare>, Tp,
00045                                   SegmentCompare<T, Compare> >,
00046                    Compare,
00047                    PairFirst<const std::pair<const Segment<T, Compare>, Tp> > >
00048   {
00049   public:
00051     typedef Tp mapped_type;
00052 
00056     SegmentMap(void) {}
00057 
00058   private:
00059     // using compiler generated copying
00060     //SegmentMap(const SegmentMap&);
00061     //SegmentMap& operator=(const SegmentMap&);
00062   };
00063 
00064 }}}
00065 #endif

Generated on Thu Dec 20 2012 03:12:58 for yat by  doxygen 1.8.0-20120409