15 #ifndef BORNAGAIN_CORE_EXPORT_ORDEREDMAP_H
16 #define BORNAGAIN_CORE_EXPORT_ORDEREDMAP_H
22 #include <unordered_map>
35 typedef std::unordered_map<Key, iterator>
map_t;
59 void insert(
const Key& key,
const Object&
object)
95 const Object&
value(
const Key& key)
const
97 typename map_t::const_iterator mit =
m_map.find(key);
98 if (mit ==
m_map.end()) {
99 throw std::runtime_error(
"OrderedMap::value() -> No such key");
Defines the macro ASSERT.
#define ASSERT(condition)
Ordered map which saves the order of insertion.
list_t::iterator iterator
std::unordered_map< Key, iterator > map_t
std::list< entry_t > list_t
iterator find(const Key &key)
const_iterator end() const
size_t erase(const Key &key)
const Object & value(const Key &key) const
list_t::const_iterator const_iterator
const Object & operator[](const Key &key)
void insert(const Key &key, const Object &object)
std::pair< Key, Object > entry_t
const_iterator find(const Key &key) const
const_iterator begin() const