OverSim
oversim_mapset.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2008 Institut fuer Telematik, Universitaet Karlsruhe (TH)
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 
23 #ifndef OVERSIM_MAPSET_H_
24 #define OVERSIM_MAPSET_H_
25 
26 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
27 #define HAVE_GCC_TR1 1
28 #endif
29 
30 #if defined(HAVE_GCC_TR1)
31 
32 #include <tr1/unordered_map>
33 #include <tr1/unordered_set>
34 
35 #define UNORDERED_MAP std::tr1::unordered_map
36 #define UNORDERED_MULTIMAP std::tr1::unordered_multimap
37 #define UNORDERED_SET std::tr1::unordered_set
38 #define HASH_NAMESPACE std::tr1
39 
40 #elif defined(HAVE_MSVC_TR1)
41 
42 #include <tr1/unordered_map>
43 #include <tr1/unordered_set>
44 
45 #define UNORDERED_MAP std::tr1::unordered_map
46 #define UNORDERED_MULTIMAP std::tr1::unordered_multimap
47 #define UNORDERED_SET std::tr1::unordered_set
48 #define HASH_NAMESPACE std::tr1
49 
50 #elif _MSC_VER
51 
52 #include <hash_set>
53 #include <hash_map>
54 
55 #define UNORDERED_MAP stdext::hash_map
56 #define UNORDERED_MULTIMAP stdext::hash_multimap
57 #define UNORDERED_SET stdext::hash_set
58 #define HASH_NAMESPACE stdext
59 
60 #else
61 
62 #include <ext/hash_map>
63 #include <ext/hash_set>
64 
65 #define UNORDERED_MAP __gnu_cxx::hash_map
66 #define UNORDERED_MULTIMAP __gnu_cxx::hash_multimap
67 #define UNORDERED_SET __gnu_cxx::hash_set
68 #define HASH_NAMESPACE __gnu_cxx
69 
70 //#else // boost
71 //#include "boost/unordered_map.hpp"
72 //
73 //namespace std { namespace tr1 {
74 //
75 // using boost::unordered_map;
76 // using boost::unordered_set;
77 // using boost::hash;
78 //
79 //}}
80 
81 #endif
82 #endif