12#ifndef BELFEM_CL_ORDEREDMAP_HPP
13#define BELFEM_CL_ORDEREDMAP_HPP
30 template<
typename Key,
typename Value >
34 std::map< Key, Value > mMap;
121 return mMap.find( aKey ) != mMap.end();
139 find (
const Key & tKey )
const ->
decltype( mMap.find(tKey) )
141 return mMap.find( tKey );
176 auto tIterator = mMap.find( aKey );
178#if !defined( NDEBUG ) || defined( DEBUG )
180 "Key %s not found in map.",
185 "Key not found in map." );
188 return tIterator->second;
200 auto tIterator = mMap.find( aKey );
202#if !defined( NDEBUG ) || defined( DEBUG )
205 "Key %s not found in map.",
210 "Key not found in map." );
213 return tIterator->second;
#define BELFEM_ERROR(aCheck,...)
Definition assert.hpp:264
#define BELFEM_ASSERT(aCheck,...)
Definition assert.hpp:244
Value & operator()(const Key &aKey)
find operator
Definition cl_OrderedMap.hpp:173
void clear()
clear map
Definition cl_OrderedMap.hpp:89
Value & operator[](const Key &aKey)
insert operator
Definition cl_OrderedMap.hpp:111
const Value & operator()(const Key &aKey) const
find operator ( const variant )
Definition cl_OrderedMap.hpp:197
OrderedMap(const OrderedMap< Key, Value > &aMap)=default
copy constructor
auto empty() const -> decltype(mMap.empty())
Definition cl_OrderedMap.hpp:145
auto find(const Key &tKey) const -> decltype(mMap.find(tKey))
Definition cl_OrderedMap.hpp:139
OrderedMap< Key, Value > & operator=(OrderedMap< Key, Value > &&other) noexcept=default
Move assignment operator constructor.
OrderedMap(OrderedMap< Key, Value > &&other) noexcept=default
move constructor
bool key_exists(const Key &aKey) const
Definition cl_OrderedMap.hpp:119
typename std::map< Key, Value >::const_iterator const_iterator
Definition cl_OrderedMap.hpp:41
auto end() const -> decltype(mMap.end())
Definition cl_OrderedMap.hpp:133
auto begin() const -> decltype(mMap.begin())
Definition cl_OrderedMap.hpp:127
void erase_key(const Key &aKey)
Definition cl_OrderedMap.hpp:153
auto map_data() -> decltype(mMap) &
Definition cl_OrderedMap.hpp:162
size_t size() const
returns the size of the map
Definition cl_OrderedMap.hpp:100
~OrderedMap()=default
default destructor
OrderedMap< Key, Value > & operator=(const OrderedMap< Key, Value > &other)=default
Copy assignment operator.
OrderedMap()=default
empty constructor
std::string KeyToString(const T &aKey)
Definition cl_Map.hpp:31
USER GUIDES:
Definition cl_Capacitor.cpp:16