Zrythm
a highly automated and intuitive digital audio workstation
|
API for Symap, a basic symbol map (string interner). More...
#include <cstdint>
Go to the source code of this file.
Data Structures | |
struct | Symap |
Macros | |
#define | ZSYMAP (ZRYTHM->symap) |
Functions | |
Symap * | symap_new (void) |
Create a new symbol map. | |
void | symap_free (Symap *map) |
Free a symbol map. | |
uint32_t | symap_try_map (Symap *map, const char *sym) |
Map a string to a symbol ID if it is already mapped, otherwise return 0. | |
uint32_t | symap_map (Symap *map, const char *sym) |
Map a string to a symbol ID. | |
const char * | symap_unmap (Symap *map, uint32_t id) |
Unmap a symbol ID back to a symbol, or NULL if no such ID exists. | |
API for Symap, a basic symbol map (string interner).
Particularly useful for implementing LV2 URI mapping.
Definition in file symap.h.
uint32_t symap_map | ( | 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 | ( | Symap * | map, |
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.