Map that can use two different keys to value. Uses Bidirectional Map for mapping of primary and secondary keys.
More...
|
| 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 |
| |
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
-
| Key | primary key type |
| AltKey | secondary key type |
| Value | value type |