IMP  2.4.0
The Integrative Modeling Platform
map.h
Go to the documentation of this file.
1 /**
2  * \file IMP/base/map.h
3  * \brief Declare an efficient stl-compatible map
4  *
5  * Copyright 2007-2015 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPBASE_BASE_MAP_H
9 #define IMPBASE_BASE_MAP_H
10 
11 #include <IMP/base/base_config.h>
12 #include <boost/unordered_map.hpp>
13 #include "hash.h"
14 
15 IMPBASE_DEPRECATED_HEADER(2.2,
16  "Use boost::unordered_map directly or"
17  " base/set_map_macros.h.");
18 
19 IMPBASE_BEGIN_NAMESPACE
20 /** This class chooses the best of STL compatible
21  non-ordered
22  map available. This will, in general, be a hash map
23  if it
24  is available or std::map if it is not.
25  */
26 template <class Key, class Data>
27 class map : public boost::unordered_map<Key, Data> {
28  typedef boost::unordered_map<Key, Data> P;
29 
30  public:
31  map() {}
32  template <class It>
33  map(It b, It e)
34  : P(b, e) {}
35 };
36 
37 IMPBASE_END_NAMESPACE
38 
39 #endif /* IMPBASE_BASE_MAP_H */
IO support.