|
Blender V4.3
|
#include <MEM_alloc_string_storage.hh>
Public Member Functions | |
| bool | contains (const keyT &key) |
| const char * | find (const keyT &key) |
| const char * | insert (const keyT &key, std::string alloc_string) |
A 'static' storage of allocation strings, with a simple API to set and retrieve them.
This is a templated wrapper around a std::unordered_map, to allow custom key types.
Definition at line 25 of file MEM_alloc_string_storage.hh.
|
inline |
Check whether the given key exists in the storage.
true if the key is found in storage, false otherwise. Definition at line 34 of file MEM_alloc_string_storage.hh.
Referenced by get_alloc_name().
|
inline |
Return the alloc string for the given key in the storage.
nullptr otherwise. Definition at line 44 of file MEM_alloc_string_storage.hh.
Referenced by get_alloc_name().
|
inline |
Insert the given alloc string in the storage, at the given key, and return a pointer to the stored string.
| alloc_string | The alloc string to store at key. |
Definition at line 59 of file MEM_alloc_string_storage.hh.
Referenced by get_alloc_name().