|
Monado OpenXR Runtime
|
Registry-wide store of subaction payloads keyed by XrPath. More...
#include <oxr/actions/oxr_subaction_store.h>

Public Member Functions | |
| XRT_CHECK_RESULT XrResult | oxr_subaction_store_init (struct oxr_subaction_store *store) |
| Initialize an empty subaction store. | |
| void | oxr_subaction_store_fini (struct oxr_subaction_store *store) |
| Release all stored subactions and destroy the store. | |
| XRT_CHECK_RESULT XrResult | oxr_subaction_store_add (struct oxr_subaction_store *store, XrPath path, const char *localized_name) |
| Insert a subaction path if not already present. | |
| bool | oxr_subaction_store_get (const struct oxr_subaction_store *store, XrPath path, const struct oxr_binding_subaction **out_subaction) |
| Look up a subaction payload by path. | |
Data Fields | |
| struct u_hashmap_int * | subactions_by_path |
| Maps subaction XrPath to oxr_binding_subaction. | |
Registry-wide store of subaction payloads keyed by XrPath.
Populated once when the binding registry is created with the known top-level subaction paths. Binding points look up shared payloads here instead of owning their own copies.
| XRT_CHECK_RESULT XrResult oxr_subaction_store_add | ( | struct oxr_subaction_store * | store, |
| XrPath | path, | ||
| const char * | localized_name | ||
| ) |
Insert a subaction path if not already present.
Duplicate paths are ignored and return success.
References oxr_binding_subaction::localized_name, oxr_binding_subaction::path, subactions_by_path, U_TYPED_CALLOC, and U_ZERO.
| void oxr_subaction_store_fini | ( | struct oxr_subaction_store * | store | ) |
Release all stored subactions and destroy the store.
References subactions_by_path, and u_hashmap_int_clear_and_call_for_each().
| bool oxr_subaction_store_get | ( | const struct oxr_subaction_store * | store, |
| XrPath | path, | ||
| const struct oxr_binding_subaction ** | out_subaction | ||
| ) |
Look up a subaction payload by path.
path was found, with out_subaction set path is unknown, with out_subaction set to NULL References oxr_binding_subaction::path, and subactions_by_path.
| XRT_CHECK_RESULT XrResult oxr_subaction_store_init | ( | struct oxr_subaction_store * | store | ) |
Initialize an empty subaction store.
References subactions_by_path, and U_ZERO.
| struct u_hashmap_int* oxr_subaction_store::subactions_by_path |
Maps subaction XrPath to oxr_binding_subaction.
Referenced by oxr_subaction_store_add(), oxr_subaction_store_fini(), oxr_subaction_store_get(), and oxr_subaction_store_init().