Fishnet 2.0.1
Framework for Graph-Based Analysis of GIS Vector Data
Loading...
Searching...
No Matches
fishnet::util::AlternativeKeyMap< Key, AltKey, Value > Class Template Reference

Map that can use two different keys to value. Uses Bidirectional Map for mapping of primary and secondary keys. More...

#include <AlternativeKeyMap.hpp>

Public Member Functions

constexpr std::optional< AltKey > getAlternative (const Key &key) const noexcept
 
constexpr std::optional< Key > getKey (const AltKey &key) const noexcept
 
constexpr std::optional< Value > getFromKey (const Key &key) const noexcept
 
constexpr std::optional< Value > getFromAlternative (const AltKey &secondaryKey) const noexcept
 
constexpr Value getFromKeyOrElse (const Key &key, Value defaultValue) const noexcept
 
constexpr Value getFromAlternativeOrElse (const AltKey &secondaryKey, Value defaultValue) const noexcept
 
constexpr std::optional< Value > get (const Key &key) const noexcept
 
constexpr std::optional< Value > get (const AltKey &key) const noexcept
 
constexpr Value getOrElse (const Key &key, Value defaultValue) const noexcept
 
constexpr Value getOrElse (const AltKey &secondaryKey, Value defaultValue) const noexcept
 
constexpr bool containsKey (const Key &key) const noexcept
 
constexpr bool containsAlternative (const AltKey &key) const noexcept
 
constexpr bool contains (const Key &key) const noexcept
 
constexpr bool contains (const AltKey &key) const noexcept
 
constexpr bool insert (const Key &key, const AltKey &secondaryKey, Value value) noexcept
 
constexpr bool updateAlternative (const Key &key, const AltKey &secondaryKey) noexcept
 
constexpr bool eraseFromKey (const Key &key) noexcept
 
constexpr bool eraseFromAlternative (const AltKey &key) noexcept
 
constexpr bool erase (const Key &key) noexcept
 
constexpr bool erase (const AltKey &key) noexcept
 
constexpr auto begin () noexcept
 
constexpr auto end () noexcept
 
constexpr auto begin () const noexcept
 
constexpr auto end () const noexcept
 
constexpr auto cbegin () const noexcept
 
constexpr auto cend () const noexcept
 
constexpr bool empty () const noexcept
 
constexpr size_t size () const noexcept
 
constexpr void clear () noexcept
 

Detailed Description

template<Mapable Key, Mapable AltKey, typename Value>
class fishnet::util::AlternativeKeyMap< Key, AltKey, Value >

Map that can use two different keys to value. Uses Bidirectional Map for mapping of primary and secondary keys.

Template Parameters
Keyprimary key type
AltKeysecondary key type
Valuevalue type

Member Function Documentation

◆ begin() [1/2]

template<Mapable Key, Mapable AltKey, typename Value >
constexpr auto fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::begin ( ) const
inlineconstexprnoexcept

◆ begin() [2/2]

template<Mapable Key, Mapable AltKey, typename Value >
constexpr auto fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::begin ( )
inlineconstexprnoexcept

◆ cbegin()

template<Mapable Key, Mapable AltKey, typename Value >
constexpr auto fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::cbegin ( ) const
inlineconstexprnoexcept

◆ cend()

template<Mapable Key, Mapable AltKey, typename Value >
constexpr auto fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::cend ( ) const
inlineconstexprnoexcept

◆ clear()

template<Mapable Key, Mapable AltKey, typename Value >
constexpr void fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::clear ( )
inlineconstexprnoexcept

◆ contains() [1/2]

template<Mapable Key, Mapable AltKey, typename Value >
constexpr bool fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::contains ( const AltKey &  key) const
inlineconstexprnoexcept

◆ contains() [2/2]

template<Mapable Key, Mapable AltKey, typename Value >
constexpr bool fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::contains ( const Key &  key) const
inlineconstexprnoexcept

◆ containsAlternative()

template<Mapable Key, Mapable AltKey, typename Value >
constexpr bool fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::containsAlternative ( const AltKey &  key) const
inlineconstexprnoexcept

◆ containsKey()

template<Mapable Key, Mapable AltKey, typename Value >
constexpr bool fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::containsKey ( const Key &  key) const
inlineconstexprnoexcept

◆ empty()

template<Mapable Key, Mapable AltKey, typename Value >
constexpr bool fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::empty ( ) const
inlineconstexprnoexcept

◆ end() [1/2]

template<Mapable Key, Mapable AltKey, typename Value >
constexpr auto fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::end ( ) const
inlineconstexprnoexcept

◆ end() [2/2]

template<Mapable Key, Mapable AltKey, typename Value >
constexpr auto fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::end ( )
inlineconstexprnoexcept

◆ erase() [1/2]

template<Mapable Key, Mapable AltKey, typename Value >
constexpr bool fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::erase ( const AltKey &  key)
inlineconstexprnoexcept

◆ erase() [2/2]

template<Mapable Key, Mapable AltKey, typename Value >
constexpr bool fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::erase ( const Key &  key)
inlineconstexprnoexcept

◆ eraseFromAlternative()

template<Mapable Key, Mapable AltKey, typename Value >
constexpr bool fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::eraseFromAlternative ( const AltKey &  key)
inlineconstexprnoexcept

◆ eraseFromKey()

template<Mapable Key, Mapable AltKey, typename Value >
constexpr bool fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::eraseFromKey ( const Key &  key)
inlineconstexprnoexcept

◆ get() [1/2]

template<Mapable Key, Mapable AltKey, typename Value >
constexpr std::optional< Value > fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::get ( const AltKey &  key) const
inlineconstexprnoexcept

◆ get() [2/2]

template<Mapable Key, Mapable AltKey, typename Value >
constexpr std::optional< Value > fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::get ( const Key &  key) const
inlineconstexprnoexcept

◆ getAlternative()

template<Mapable Key, Mapable AltKey, typename Value >
constexpr std::optional< AltKey > fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::getAlternative ( const Key &  key) const
inlineconstexprnoexcept

◆ getFromAlternative()

template<Mapable Key, Mapable AltKey, typename Value >
constexpr std::optional< Value > fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::getFromAlternative ( const AltKey &  secondaryKey) const
inlineconstexprnoexcept

◆ getFromAlternativeOrElse()

template<Mapable Key, Mapable AltKey, typename Value >
constexpr Value fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::getFromAlternativeOrElse ( const AltKey &  secondaryKey,
Value  defaultValue 
) const
inlineconstexprnoexcept

◆ getFromKey()

template<Mapable Key, Mapable AltKey, typename Value >
constexpr std::optional< Value > fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::getFromKey ( const Key &  key) const
inlineconstexprnoexcept

◆ getFromKeyOrElse()

template<Mapable Key, Mapable AltKey, typename Value >
constexpr Value fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::getFromKeyOrElse ( const Key &  key,
Value  defaultValue 
) const
inlineconstexprnoexcept

◆ getKey()

template<Mapable Key, Mapable AltKey, typename Value >
constexpr std::optional< Key > fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::getKey ( const AltKey &  key) const
inlineconstexprnoexcept

◆ getOrElse() [1/2]

template<Mapable Key, Mapable AltKey, typename Value >
constexpr Value fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::getOrElse ( const AltKey &  secondaryKey,
Value  defaultValue 
) const
inlineconstexprnoexcept

◆ getOrElse() [2/2]

template<Mapable Key, Mapable AltKey, typename Value >
constexpr Value fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::getOrElse ( const Key &  key,
Value  defaultValue 
) const
inlineconstexprnoexcept

◆ insert()

template<Mapable Key, Mapable AltKey, typename Value >
constexpr bool fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::insert ( const Key &  key,
const AltKey &  secondaryKey,
Value  value 
)
inlineconstexprnoexcept

◆ size()

template<Mapable Key, Mapable AltKey, typename Value >
constexpr size_t fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::size ( ) const
inlineconstexprnoexcept

◆ updateAlternative()

template<Mapable Key, Mapable AltKey, typename Value >
constexpr bool fishnet::util::AlternativeKeyMap< Key, AltKey, Value >::updateAlternative ( const Key &  key,
const AltKey &  secondaryKey 
)
inlineconstexprnoexcept

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