|
Vulkan Schnee 0.0.1
High-performance rendering engine
|
Maintains a one-to-one mapping that can be queried from either side. More...
#include <BidirectionalMap.h>
Classes | |
| class | Side |
Public Types | |
| using | LeftSideType = Side<T, U> |
| using | RightSideType = Side<U, T> |
Public Member Functions | |
| BidirectionalMap ()=default | |
| LeftSideType & | get_left () |
| const LeftSideType & | get_left () const |
| RightSideType & | get_right () |
| const RightSideType & | get_right () const |
| void | insert (const T &key, const U &value) |
| template<typename KT, typename KU> | |
| void | emplace (KT &&key, KU &&value) |
| void | remove_left (const T &key) |
| void | remove_right (const U &key) |
| void | clear () |
| void | reserve (size_t n) |
Private Attributes | |
| LeftSideType | left {} |
| RightSideType | right {} |
Maintains a one-to-one mapping that can be queried from either side.
Inserting a key or value that already exists removes the previous opposite mapping before storing the new pair.
| T | Left-side key type. |
| U | Right-side key type. |
Definition at line 16 of file BidirectionalMap.h.
| using BidirectionalMap< T, U >::LeftSideType = Side<T, U> |
Definition at line 65 of file BidirectionalMap.h.
| using BidirectionalMap< T, U >::RightSideType = Side<U, T> |
Definition at line 66 of file BidirectionalMap.h.
|
default |
|
inline |
Definition at line 131 of file BidirectionalMap.h.
|
inline |
Definition at line 96 of file BidirectionalMap.h.
|
inline |
Definition at line 70 of file BidirectionalMap.h.
References left.
|
inline |
Definition at line 71 of file BidirectionalMap.h.
References left.
|
inline |
Definition at line 73 of file BidirectionalMap.h.
References right.
|
inline |
Definition at line 74 of file BidirectionalMap.h.
References right.
|
inline |
Definition at line 76 of file BidirectionalMap.h.
|
inline |
Definition at line 113 of file BidirectionalMap.h.
|
inline |
Definition at line 122 of file BidirectionalMap.h.
|
inline |
Definition at line 136 of file BidirectionalMap.h.
|
private |
Definition at line 142 of file BidirectionalMap.h.
Referenced by clear(), emplace(), get_left(), get_left(), insert(), remove_left(), remove_right(), and reserve().
|
private |
Definition at line 143 of file BidirectionalMap.h.
Referenced by BidirectionalMap< T, U >::Side< T, U >::BidirectionalMap< T, U >, clear(), emplace(), get_right(), get_right(), insert(), remove_left(), remove_right(), and reserve().