Kohi Game Engine
|
This files contains an implementation of a static-sized stack-allocated array. More...
#include "defines.h"
Go to the source code of this file.
Data Structures | |
struct | stackarray_base |
struct | stackarray_iterator |
Macros | |
#define | STACKARRAY_TYPE_NAMED(type, name, len) |
#define | STACKARRAY_TYPE(type, length) STACKARRAY_TYPE_NAMED(type, type, length) |
Typedefs | |
typedef struct stackarray_base | stackarray_base |
typedef struct stackarray_iterator | stackarray_iterator |
Functions | |
KAPI stackarray_iterator | stackarray_iterator_begin (stackarray_base *arr) |
KAPI stackarray_iterator | stackarray_iterator_rbegin (stackarray_base *arr) |
KAPI b8 | stackarray_iterator_end (const stackarray_iterator *it) |
KAPI void * | stackarray_iterator_value (const stackarray_iterator *it) |
KAPI void | stackarray_iterator_next (stackarray_iterator *it) |
KAPI void | stackarray_iterator_prev (stackarray_iterator *it) |
This files contains an implementation of a static-sized stack-allocated array.
Create an array type for a simple type using: STACKARRAY_TYPE(f64, 4)
. This would create f64_stackarray_4. Create an array type for "advanced" types, such as strings, like this: STACKARRAY_TYPE_NAMED(const char*, string, 4)
. This would create string_stackarray_4. See the bottom of this file for examples on how to create more stackarray types.
#define STACKARRAY_TYPE | ( | type, | |
length | |||
) | STACKARRAY_TYPE_NAMED(type, type, length) |
#define STACKARRAY_TYPE_NAMED | ( | type, | |
name, | |||
len | |||
) |
typedef struct stackarray_base stackarray_base |
typedef struct stackarray_iterator stackarray_iterator |
KAPI stackarray_iterator stackarray_iterator_begin | ( | stackarray_base * | arr | ) |
KAPI b8 stackarray_iterator_end | ( | const stackarray_iterator * | it | ) |
KAPI void stackarray_iterator_next | ( | stackarray_iterator * | it | ) |
KAPI void stackarray_iterator_prev | ( | stackarray_iterator * | it | ) |
KAPI stackarray_iterator stackarray_iterator_rbegin | ( | stackarray_base * | arr | ) |
KAPI void* stackarray_iterator_value | ( | const stackarray_iterator * | it | ) |