Monado OpenXR Runtime
u_vector.h File Reference

Expose std::vector to C. More...

#include <stddef.h>
Include dependency graph for u_vector.h:

Go to the source code of this file.

Data Structures

struct  u_vector_int
 
struct  u_vector_float
 

Macros

#define U_VECTOR_DECLARATION(TYPE)
 

Functions

struct u_vector_int u_vector_int_create ()
 
void u_vector_int_push_back (struct u_vector_int uv, int e)
 
int u_vector_int_at (struct u_vector_int uv, size_t i)
 
void u_vector_int_destroy (struct u_vector_int *uv)
 
struct u_vector_float u_vector_float_create ()
 
void u_vector_float_push_back (struct u_vector_float uv, float e)
 
float u_vector_float_at (struct u_vector_float uv, size_t i)
 
void u_vector_float_destroy (struct u_vector_float *uv)
 

Detailed Description

Expose std::vector to C.

Author
Mateo de Mayo mateo.nosp@m..dem.nosp@m.ayo@c.nosp@m.olla.nosp@m.bora..nosp@m.com

Macro Definition Documentation

◆ U_VECTOR_DECLARATION

#define U_VECTOR_DECLARATION (   TYPE)
Value:
struct u_vector_##TYPE \
{ \
void *ptr; \
}; \
struct u_vector_##TYPE u_vector_##TYPE##_create(); \
void u_vector_##TYPE##_push_back(struct u_vector_##TYPE uv, TYPE e); \
TYPE u_vector_##TYPE##_at(struct u_vector_##TYPE uv, size_t i); \
void u_vector_##TYPE##_destroy(struct u_vector_##TYPE *uv);