A named registry for engine-owned context pointers.
| Include: | #include <dmsdk/dlib/context_registry.h> |
| TYPES | |
|---|---|
| HContextRegistry | Context registry handle. |
| FUNCTIONS | |
|---|---|
| void* ContextRegistryGet (HContextRegistry registry, const char* name) | Gets a context from the context registry using a s... |
| void* ContextRegistryGetByHash (HContextRegistry registry, dmhash_t name_hash) | Gets a context from the context registry using a s... |
| int ContextRegistrySet (HContextRegistry registry, const char* name, void* context) | Sets a context in the context registry using a spe... |
| int ContextRegistrySetByHash (HContextRegistry registry, dmhash_t name_hash, void* context) | Sets a context in the context registry using a spe... |
void* ContextRegistryGet(HContextRegistry registry, const char* name)
Gets a context from the context registry using a specified name.
PARAMETERS
HContextRegistry |
registry |
the context registry |
const char* |
name |
the context name |
RETURNS
void* |
The context, if it exists |
void* ContextRegistryGetByHash(HContextRegistry registry, dmhash_t name_hash)
Gets a context from the context registry using a specified name hash.
PARAMETERS
HContextRegistry |
registry |
the context registry |
dmhash_t |
name_hash |
the context name hash |
RETURNS
void* |
The context, if it exists |
int ContextRegistrySet(HContextRegistry registry, const char* name, void* context)
Sets a context in the context registry using a specified name.
PARAMETERS
HContextRegistry |
registry |
the context registry |
const char* |
name |
the context name |
void* |
context |
the context, or 0 to remove the context |
RETURNS
int |
0 if successful |
int ContextRegistrySetByHash(HContextRegistry registry, dmhash_t name_hash, void* context)
Sets a context in the context registry using a specified name hash.
PARAMETERS
HContextRegistry |
registry |
the context registry |
dmhash_t |
name_hash |
the context name hash |
void* |
context |
the context, or 0 to remove the context |
RETURNS
int |
0 if successful |
void HContextRegistry()
Context registry handle.
PARAMETERS