Monado OpenXR Runtime
u_string_list Struct Reference
Collaboration diagram for u_string_list:

Public Member Functions

 u_string_list (StringList &&sl)
 
struct u_string_listu_string_list_create (void)
 Create a string list with room for at least the given number of strings. More...
 
struct u_string_listu_string_list_create_with_capacity (uint32_t capacity)
 Create a string list with room for at least the given number of strings. More...
 
struct u_string_listu_string_list_create_from_list (struct u_string_list *usl)
 Create a new string list from an existing string list. More...
 
struct u_string_listu_string_list_create_from_array (const char *const *arr, uint32_t size)
 Create a new string list from an array of suitable strings. More...
 
uint32_t u_string_list_get_size (const struct u_string_list *usl)
 Retrieve the number of elements in the list. More...
 
const char *const * u_string_list_get_data (const struct u_string_list *usl)
 Retrieve the data pointer of the list. More...
 
int u_string_list_append (struct u_string_list *usl, const char *str)
 Append a new string literal to the list. More...
 
int u_string_list_append_array (struct u_string_list *usl, const char *const *arr, uint32_t size)
 Append an array of new string literals to the list. More...
 
int u_string_list_append_unique (struct u_string_list *usl, const char *str)
 Append a new string literal to the list, if it's not the same as a string already in the list. More...
 
void u_string_list_destroy (struct u_string_list **list_ptr)
 Destroy a string list. More...
 

Data Fields

StringList list
 

Member Function Documentation

◆ u_string_list_append()

int u_string_list_append ( struct u_string_list usl,
const char *  str 
)

Append a new string literal to the list.

Parameters
uslself pointer
stra non-null, null-terminated string that must live at least as long as the list, preferably a string literal.
Returns
1 if successfully added, negative for errors.

References xrt::auxiliary::util::StringList::push_back().

◆ u_string_list_append_array()

int u_string_list_append_array ( struct u_string_list usl,
const char *const *  arr,
uint32_t  size 
)

Append an array of new string literals to the list.

Parameters
uslself pointer
arran array of zero or more non-null, null-terminated string that must live at least as long as the list, preferably string literals.
sizethe number of elements in the array.
Returns
1 if successfully added, negative for errors.

References xrt::auxiliary::util::StringList::push_back().

◆ u_string_list_append_unique()

int u_string_list_append_unique ( struct u_string_list usl,
const char *  str 
)

Append a new string literal to the list, if it's not the same as a string already in the list.

(Comparing string contents, not pointers)

Parameters
uslself pointer
stra non-null, null-terminated string that must live at least as long as the list, preferably a string literal.
Returns
1 if successfully added, 0 if already existing so not added, negative for errors.

References xrt::auxiliary::util::StringList::push_back_unique().

◆ u_string_list_create()

struct u_string_list * u_string_list_create ( void  )

Create a string list with room for at least the given number of strings.

Referenced by u_string_list_create_from_array().

◆ u_string_list_create_from_array()

struct u_string_list * u_string_list_create_from_array ( const char *const *  arr,
uint32_t  size 
)

Create a new string list from an array of suitable strings.

Parameters
arran array of zero or more non-null, null-terminated string that must live at least as long as the list, preferably string literals.
sizethe number of elements in the array.

References u_string_list_create().

Referenced by oxr_vk_create_vulkan_device().

◆ u_string_list_create_from_list()

struct u_string_list * u_string_list_create_from_list ( struct u_string_list usl)

Create a new string list from an existing string list.

Referenced by vk_build_instance_extensions().

◆ u_string_list_create_with_capacity()

struct u_string_list * u_string_list_create_with_capacity ( uint32_t  capacity)

Create a string list with room for at least the given number of strings.

◆ u_string_list_destroy()

void u_string_list_destroy ( struct u_string_list **  list_ptr)

Destroy a string list.

Performs null checks and sets your pointer to zero.

◆ u_string_list_get_data()

const char *const * u_string_list_get_data ( const struct u_string_list usl)

Retrieve the data pointer of the list.

References xrt::auxiliary::util::StringList::data().

Referenced by vk_build_instance_extensions(), and vk_fill_in_has_instance_extensions().

◆ u_string_list_get_size()

uint32_t u_string_list_get_size ( const struct u_string_list usl)

Retrieve the number of elements in the list.

References xrt::auxiliary::util::StringList::size().

Referenced by vk_build_instance_extensions(), and vk_fill_in_has_instance_extensions().


The documentation for this struct was generated from the following files: