Monado OpenXR Runtime
Loading...
Searching...
No Matches
oxr_handle_array.h File Reference

A dynamic array of handles. More...

Go to the source code of this file.

Data Structures

struct  oxr_handle_array
 Manages an array of handles, does not have a init function but must be zero initialized where it is declared. More...
 

Functions

XrResult oxr_handle_array_destroy (struct oxr_logger *log, struct oxr_handle_array *array, int level)
 Destroys all handles in the array, and the array itself.
 
bool oxr_handle_array_add (struct oxr_handle_array *array, struct oxr_handle_base *handle)
 Adds a handle to the array.
 
bool oxr_handle_array_remove (struct oxr_handle_array *array, uint32_t index)
 Removes the handle at the given index from the array, shifting all later handles down by one.
 

Detailed Description

A dynamic array of handles.

Author
Beyley Cardellio ep1cm.nosp@m.1n10.nosp@m.n123@.nosp@m.gmai.nosp@m.l.com

Function Documentation

◆ oxr_handle_array_add()

bool oxr_handle_array_add ( struct oxr_handle_array array,
struct oxr_handle_base handle 
)

Adds a handle to the array.

References MAX, and U_ARRAY_REALLOC_OR_FREE.

◆ oxr_handle_array_destroy()

XrResult oxr_handle_array_destroy ( struct oxr_logger log,
struct oxr_handle_array array,
int  level 
)

Destroys all handles in the array, and the array itself.

References oxr_handle_base::oxr_handle_destroy_internal().

Referenced by oxr_handle_base::oxr_handle_destroy_internal().

◆ oxr_handle_array_remove()

bool oxr_handle_array_remove ( struct oxr_handle_array array,
uint32_t  index 
)

Removes the handle at the given index from the array, shifting all later handles down by one.

Referenced by oxr_handle_base::oxr_handle_destroy_internal().