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

A dynamic array of handles. More...

#include "util/u_misc.h"
#include "math/m_api.h"
#include "oxr_handle_base.h"
#include "oxr_handle_array.h"
Include dependency graph for oxr_handle_array.c:

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

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().