Public Types | List of all members
DirectionMap< Dim, T > Class Template Reference

#include <DirectionMap.hpp>

Public Types

using base = FixedHashMap< 2 *Dim, Direction< Dim >, T, DirectionHash< Dim > >
 
- Public Types inherited from FixedHashMap< 2 *Dim, Direction< Dim >, T, DirectionHash< Dim > >
using key_type = Direction< Dim >
 
using mapped_type = T
 
using value_type = std::pair< const key_type, mapped_type >
 
using size_type = size_t
 
using difference_type = ptrdiff_t
 
using hasher = DirectionHash< Dim >
 
using key_equal = std::equal_to< Direction< Dim > >
 
using reference = value_type &
 
using const_reference = const value_type &
 
using pointer = value_type *
 
using const_pointer = const value_type *
 
using iterator = FixedHashMapIterator< MaxSize, key_type, value_type, hasher, key_equal >
 
using const_iterator = FixedHashMapIterator< MaxSize, key_type, const value_type, hasher, key_equal >
 

Additional Inherited Members

- Public Member Functions inherited from FixedHashMap< 2 *Dim, Direction< Dim >, T, DirectionHash< Dim > >
 FixedHashMap (std::initializer_list< value_type > init) noexcept
 
 FixedHashMap (const FixedHashMap &)=default
 
 FixedHashMap (FixedHashMap &&)=default
 
FixedHashMapoperator= (const FixedHashMap &other) noexcept(noexcept(std::is_nothrow_copy_constructible< value_type >::value))
 
FixedHashMapoperator= (FixedHashMap &&other) noexcept
 
iterator begin () noexcept
 
const_iterator begin () const noexcept
 
const_iterator cbegin () const noexcept
 
iterator end () noexcept
 
const_iterator end () const noexcept
 
const_iterator cend () const noexcept
 
bool empty () const noexcept
 
size_t size () const noexcept
 
void clear () noexcept
 
std::pair< iterator, bool > insert (const value_type &value) noexcept
 Inserts the element if it does not exists.
 
std::pair< iterator, bool > insert (value_type &&value) noexcept
 
std::pair< iterator, bool > emplace (Args &&... args) noexcept
 
std::pair< iterator, bool > insert_or_assign (const key_type &key, M &&obj) noexcept
 Inserts the element if it does not exists, otherwise assigns to it the new value.
 
std::pair< iterator, bool > insert_or_assign (key_type &&key, M &&obj) noexcept
 
iterator erase (const const_iterator &pos) noexcept
 
size_t erase (const key_type &key) noexcept
 
mapped_type & at (const key_type &key)
 
const mapped_type & at (const key_type &key) const
 
mapped_type & operator[] (const key_type &key) noexcept
 
size_t count (const key_type &key) const noexcept
 
iterator find (const key_type &key) noexcept
 
const_iterator find (const key_type &key) const noexcept
 
bool contains (const key_type &key) const noexcept
 Check if key is in the map.
 
key_equal key_eq () const noexcept
 Get key equal function object.
 
hasher hash_function () const noexcept
 Get hash function object.
 
void pup (PUP::er &p) noexcept
 
auto insert_or_assign_impl (key_type &&key, M &&obj) noexcept -> std::pair< iterator, bool >
 
auto get_data_entry (const Direction< Dim > &key) noexcept -> typename storage_type::iterator
 

Detailed Description

template<size_t Dim, typename T>
class DirectionMap< Dim, T >

An optimized map with Direction keys


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