voxelTerrain
 All Classes Functions Variables Typedefs Enumerations Pages
map.hpp
1 #ifndef MAP_HPP
2 #define MAP_HPP
3 
4 #include <map>
5 
6 
7 namespace blub
8 {
9 
10 template <class S, class T>
11 class map : public std::map<S, T>
12 {
13 public:
14  typedef std::map<S, T> t_base;
15 
16  map<S, T>() : t_base() {;}
17 
18  typename t_base::const_iterator constBegin() const
19  {
20  return t_base::cbegin();
21  }
22 
23  typename t_base::const_iterator constEnd() const
24  {
25  return t_base::cend();
26  }
27 
28  void insert(const typename t_base::key_type& key, const typename t_base::mapped_type& value)
29  {
30  t_base::operator [](key) = value;
31  }
32 
33  void remove(const typename t_base::key_type& key)
34  {
35  t_base::erase(key);
36  }
37 
38  bool contains(const typename t_base::key_type& key) const
39  {
40  return t_base::find(key) != t_base::cend();
41  }
42 
43 };
44 
45 }
46 
47 #endif // MAP_HPP
Definition: map.hpp:11
Definition: deadlineTimer.hpp:10