Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
Map.hxx
Go to the documentation of this file.
1
35#ifndef _UTILS_MAP_HXX_
36#define _UTILS_MAP_HXX_
37
38#if defined (__LINEAR_MAP__)
39#include "utils/LinearMap.hxx"
41#define BASE_CLASS LinearMap
42
43#else
44
45#include "utils/StlMap.hxx"
47#define BASE_CLASS StlMap
48
49#endif
50
62template <typename Key, typename Value> class Map : public BASE_CLASS <Key, Value>
63{
64public:
68 : BASE_CLASS<Key, Value>()
69 {
70 }
71
75 Map(size_t entries)
76 : BASE_CLASS<Key, Value>(entries)
77 {
78 }
79
83 {
84 }
85
86private:
88};
89
90#undef BASE_CLASS
91
92#endif /* _UTILS_MAP_HXX_ */
#define BASE_CLASS
Define StlMap as the base class for Map.
Definition Map.hxx:47
Though the standard template library includes std::map, commonly implemented as a Red Black tree,...
Definition Map.hxx:63
Map(size_t entries)
Constructor that limits the number of mappings to a static pool.
Definition Map.hxx:75
~Map()
Destructor.
Definition Map.hxx:82
Map()
Default Constructor which with no mapping entry limit.
Definition Map.hxx:67
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Removes default copy-constructor and assignment added by C++.
Definition macros.h:171