|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
A read-only bidirectional map that maintains key-value and value-key mappings. More...
#include <src/utils/bidirectional_map.h>
Public Member Functions | |
| ConstBidirectionalMap (std::initializer_list< std::pair< K, V > > list) | |
| void | insert (const K &key, const V &val) |
| std::optional< V > | find_by_key (const K &key) const |
| std::optional< K > | find_by_value (const V &val) const |
A read-only bidirectional map that maintains key-value and value-key mappings.
| K | Key type |
| V | Value type |
This class provides constant-time lookups in both directions (key to value and value to key) using two internal unordered maps. The map is constructed with an initializer list and cannot be modified after construction.
Definition at line 23 of file bidirectional_map.h.
|
inline |
Definition at line 29 of file bidirectional_map.h.
|
inline |
Definition at line 42 of file bidirectional_map.h.
|
inline |
Definition at line 49 of file bidirectional_map.h.
|
inline |
Definition at line 36 of file bidirectional_map.h.