BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
belfem::Map< Key, Value > Class Template Reference

Hash map (unordered key-value). More...

#include <cl_Map.hpp>

Public Types

using const_iterator = typename std::unordered_map< Key, Value >::const_iterator

Public Member Functions

 Map ()=default
 empty constructor
 Map (const Map< Key, Value > &aMap)=default
 copy constructor
 Map (Map< Key, Value > &&other) noexcept=default
 move constructor
Map< Key, Value > & operator= (const Map< Key, Value > &other)=default
 Copy assignment operator.
Map< Key, Value > & operator= (Map< Key, Value > &&other) noexcept=default
 Move assignment operator constructor.
 ~Map ()=default
 default destructor
void clear ()
 clear map
size_t size () const
 returns the size of the map
Value & operator[] (const Key &aKey)
 insert operator
bool key_exists (const Key &aKey) const
auto begin () const -> decltype(mMap.begin())
auto end () const -> decltype(mMap.end())
auto find (const Key &tKey) const -> decltype(mMap.find(tKey))
auto empty () const -> decltype(mMap.empty())
auto get_entry (const index_t aIndex) const -> decltype(*mMap.begin())
void erase_key (const Key &aKey)
auto map_data () -> decltype(mMap) &
Value & operator() (const Key &aKey)
 find operator
const Value & operator() (const Key &aKey) const
 find operator ( const variant )

Detailed Description

template<typename Key, typename Value>
class belfem::Map< Key, Value >

Hash map (unordered key-value).

See also
BELFEM Container Classes - Usage Guide

Member Typedef Documentation

◆ const_iterator

template<typename Key, typename Value>
using belfem::Map< Key, Value >::const_iterator = typename std::unordered_map< Key, Value >::const_iterator

Constructor & Destructor Documentation

◆ Map() [1/3]

template<typename Key, typename Value>
belfem::Map< Key, Value >::Map ( )
explicitdefault

empty constructor

◆ Map() [2/3]

template<typename Key, typename Value>
belfem::Map< Key, Value >::Map ( const Map< Key, Value > & aMap)
default

copy constructor

◆ Map() [3/3]

template<typename Key, typename Value>
belfem::Map< Key, Value >::Map ( Map< Key, Value > && other)
defaultnoexcept

move constructor

◆ ~Map()

template<typename Key, typename Value>
belfem::Map< Key, Value >::~Map ( )
default

default destructor

Member Function Documentation

◆ begin()

template<typename Key, typename Value>
auto belfem::Map< Key, Value >::begin ( ) const -> decltype(mMap.begin())
inline

◆ clear()

template<typename Key, typename Value>
void belfem::Map< Key, Value >::clear ( )
inline

clear map

◆ empty()

template<typename Key, typename Value>
auto belfem::Map< Key, Value >::empty ( ) const -> decltype(mMap.empty())
inline

◆ end()

template<typename Key, typename Value>
auto belfem::Map< Key, Value >::end ( ) const -> decltype(mMap.end())
inline

◆ erase_key()

template<typename Key, typename Value>
void belfem::Map< Key, Value >::erase_key ( const Key & aKey)
inline

◆ find()

template<typename Key, typename Value>
auto belfem::Map< Key, Value >::find ( const Key & tKey) const -> decltype(mMap.find(tKey))
inline

◆ get_entry()

template<typename Key, typename Value>
auto belfem::Map< Key, Value >::get_entry ( const index_t aIndex) const -> decltype(*mMap.begin())
inline

◆ key_exists()

template<typename Key, typename Value>
bool belfem::Map< Key, Value >::key_exists ( const Key & aKey) const
inline

◆ map_data()

template<typename Key, typename Value>
auto belfem::Map< Key, Value >::map_data ( ) -> decltype(mMap) &
inline

◆ operator()() [1/2]

template<typename Key, typename Value>
Value & belfem::Map< Key, Value >::operator() ( const Key & aKey)
inline

find operator

◆ operator()() [2/2]

template<typename Key, typename Value>
const Value & belfem::Map< Key, Value >::operator() ( const Key & aKey) const
inline

find operator ( const variant )

◆ operator=() [1/2]

template<typename Key, typename Value>
Map< Key, Value > & belfem::Map< Key, Value >::operator= ( const Map< Key, Value > & other)
default

Copy assignment operator.

◆ operator=() [2/2]

template<typename Key, typename Value>
Map< Key, Value > & belfem::Map< Key, Value >::operator= ( Map< Key, Value > && other)
defaultnoexcept

Move assignment operator constructor.

◆ operator[]()

template<typename Key, typename Value>
Value & belfem::Map< Key, Value >::operator[] ( const Key & aKey)
inline

insert operator

◆ size()

template<typename Key, typename Value>
size_t belfem::Map< Key, Value >::size ( ) const
inline

returns the size of the map


The documentation for this class was generated from the following file: