Monado OpenXR Runtime
Loading...
Searching...
No Matches
oxr_instance_path_cache.h
Go to the documentation of this file.
1// Copyright 2018-2024, Collabora, Ltd.
2// Copyright 2023-2026, NVIDIA CORPORATION.
3// SPDX-License-Identifier: BSL-1.0
4/*!
5 * @file
6 * @brief Holds per instance action cache.
7 * @ingroup oxr_main
8 */
9
10#pragma once
11
13#include "oxr_extension_support.h"
14#include "oxr_subaction.h"
15#include "oxr_generated_bindings.h"
16
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22
23/*!
24 * This holds cached paths for subaction paths.
25 */
27{
28#define SUBACTION_PATH_MEMBER(X) XrPath X;
29 OXR_FOR_EACH_SUBACTION_PATH(SUBACTION_PATH_MEMBER)
30#undef SUBACTION_PATH_MEMBER
31
32 XrPath template_paths[OXR_BINDINGS_PROFILE_TEMPLATE_COUNT];
33};
34
35
36/*
37 *
38 * Functions
39 *
40 */
41
42/*!
43 * Initialize the action cache for an instance.
44 *
45 * @param cache Action cache to initialize
46 * @param store Path store to create paths in.
47 * @public @memberof oxr_instance_path_cache
48 */
49XrResult
50oxr_instance_path_cache_init(struct oxr_instance_path_cache *cache, struct oxr_path_store *store) XRT_NONNULL_ALL;
51
52/*!
53 * Finalize and cleanup the action cache for an instance.
54 *
55 * @param cache Action cache to finalize
56 * @public @memberof oxr_instance_path_cache
57 */
58void
59oxr_instance_path_cache_fini(struct oxr_instance_path_cache *cache) XRT_NONNULL_ALL;
60
61
62#ifdef __cplusplus
63}
64#endif
Forward declarations for OpenXR state tracker structs.
Provides a utility macro for dealing with subaction paths.
#define OXR_FOR_EACH_SUBACTION_PATH(_)
Expansion macro (x-macro) that calls the macro you pass with the shorthand name of each subaction pat...
Definition oxr_subaction.h:40
This holds cached paths for subaction paths.
Definition oxr_instance_path_cache.h:27
Path store structure for managing path storage and lookup.
Definition oxr_path_store.h:31