|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
A string interner (Symbol Map). More...
#include <src/utils/symap.h>
Public Member Functions | |
| Symap (const Symap &other) | |
| Symap & | operator= (const Symap &other) |
| Symap (Symap &&other) | |
| Symap & | operator= (Symap &&other) |
| uint32_t | try_map (const char *sym) |
| Map a string to a symbol ID if it is already mapped, otherwise return 0. | |
| uint32_t | map (const char *sym) |
| Map a string to a symbol ID. | |
| const char * | unmap (uint32_t id) |
| Unmap a symbol ID back to a symbol, or NULL if no such ID exists. | |
Friends | |
| void | swap (Symap &first, Symap &second) |
| uint32_t Symap::map | ( | const char * | sym | ) |
Map a string to a symbol ID.
Note that 0 is never a valid symbol ID.
| const char * Symap::unmap | ( | uint32_t | id | ) |
Unmap a symbol ID back to a symbol, or NULL if no such ID exists.
Note that 0 is never a valid symbol ID.