|
Monado OpenXR Runtime
|
Manages an array of suggested profiles, does not have a init function but must be zero initialized where it is declared. More...
#include <oxr/actions/oxr_suggested_profile_array.h>

Public Member Functions | |
| XRT_NONNULL_ALL void | oxr_suggested_profile_array_clear (struct oxr_suggested_profile_array *array) |
| Frees all profiles on the suggested profile array. | |
| XRT_NONNULL_ALL void | oxr_suggested_profile_array_add (struct oxr_suggested_profile_array *array, struct oxr_suggested_profile *profile) |
| Add a suggested profile to the array. | |
| XRT_NONNULL_ALL XRT_CHECK_RESULT XrResult | oxr_suggested_profile_array_clone (const struct oxr_suggested_profile_array *src, struct oxr_suggested_profile_array *dst) |
| Clone a suggested profile array. | |
| XRT_NONNULL_ALL bool | oxr_suggested_profile_array_find_by_path (const struct oxr_suggested_profile_array *array, XrPath path, struct oxr_suggested_profile **out_p) |
| Find a suggested profile in the array by its path. | |
Data Fields | |
| struct oxr_suggested_profile ** | profiles |
| size_t | count |
Manages an array of suggested profiles, does not have a init function but must be zero initialized where it is declared.
| XRT_NONNULL_ALL void oxr_suggested_profile_array_add | ( | struct oxr_suggested_profile_array * | array, |
| struct oxr_suggested_profile * | profile | ||
| ) |
Add a suggested profile to the array.
The profile is added to the end of the array. The array takes ownership of the profile pointer.
| array | Suggested profile array to add to, must not be NULL |
| profile | Suggested profile to add, must not be NULL |
References U_ARRAY_REALLOC_OR_FREE.
| XRT_NONNULL_ALL void oxr_suggested_profile_array_clear | ( | struct oxr_suggested_profile_array * | array | ) |
Frees all profiles on the suggested profile array.
Frees all suggested profiles in the array and then frees the internal array. Does not free the struct passed in. After this call, the array structure is reset to an empty state.
| array | Suggested profile array to destroy, must not be NULL |
| XRT_NONNULL_ALL XRT_CHECK_RESULT XrResult oxr_suggested_profile_array_clone | ( | const struct oxr_suggested_profile_array * | src, |
| struct oxr_suggested_profile_array * | dst | ||
| ) |
Clone a suggested profile array.
Creates a deep copy of the source array, including cloning all suggested profiles it contains. The destination array is first cleared (destroying any existing profiles) before cloning. On failure the destination is left cleared (empty).
| src | Source suggested profile array to clone, must not be NULL |
| dst | Destination suggested profile array, must not be NULL |
References U_TYPED_ARRAY_CALLOC.
| XRT_NONNULL_ALL bool oxr_suggested_profile_array_find_by_path | ( | const struct oxr_suggested_profile_array * | array, |
| XrPath | path, | ||
| struct oxr_suggested_profile ** | out_p | ||
| ) |
Find a suggested profile in the array by its path.
Searches the array for a suggested profile with the matching XrPath.
| array | Suggested profile array to search, must not be NULL | |
| path | XrPath to search for | |
| [out] | out_p | Found suggested profile; NULL if not found. Must not be NULL. |
References oxr_suggested_profile::path.