Derive-C
|
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <derive-c/core/helpers.h>
#include <derive-c/core/panic.h>
#include <derive-c/core/alloc/def.h>
#include <derive-c/core/self/def.h>
#include <derive-c/core/alloc/undef.h>
#include <derive-c/core/self/undef.h>
Go to the source code of this file.
Classes | |
struct | value_t |
struct | INDEX |
struct | SLOT |
struct | SELF |
An allocator that prints to stdout when it allocates or frees memory. More... | |
struct | IV_PAIR |
struct | IV_PAIR_CONST |
Macros | |
#define | INDEX_BITS 32 |
A vector-backed arena, with support for small indices. | |
#define | VALUE value_t |
#define | VALUE_DELETE value_delete |
#define | VALUE_CLONE value_clone |
#define | SLOT NS(SELF, slot) |
#define | CHECK_ACCESS_INDEX(self, index) |
#define | RESIZE_FACTOR 2 |
#define | INDEX NS(SELF, index) |
#define | IV_PAIR NS(SELF, iv) |
#define | IV_PAIR_CONST NS(SELF, iv_const) |
Functions | |
static void | value_delete (value_t *UNUSED(self)) |
static value_t | value_clone (value_t const *self) |
static SELF | new_with_capacity_for (INDEX_TYPE items, ALLOC *alloc) |
static INDEX | insert (SELF *self, VALUE value) |
static VALUE * | try_write (SELF *self, INDEX index) |
static VALUE * | write (SELF *self, INDEX index) |
static VALUE const * | try_read (SELF const *self, INDEX index) |
static VALUE const * | read (SELF const *self, INDEX index) |
static SELF | clone (SELF const *self) |
static INDEX_TYPE | size (SELF const *self) |
static bool | full (SELF const *self) |
static bool | try_remove (SELF *self, INDEX index, VALUE *destination) |
static VALUE | remove (SELF *self, INDEX index) |
static bool | delete_entry (SELF *self, INDEX index) |
static bool | empty (ITER const *iter) |
static IV_PAIR const * | next (ITER *iter) |
static ITER | get_iter (SELF *self) |
static void | delete (SELF *self) |
static bool | empty (ITER_CONST const *iter) |
static IV_PAIR_CONST const * | next (ITER_CONST *iter) |
static ITER_CONST | get_iter_const (SELF const *self) |
Variables | |
static size_t | max_capacity = MAX_CAPACITY |
static size_t | max_index = MAX_INDEX |
static IV_PAIR_CONST | iv_const_empty |
#define CHECK_ACCESS_INDEX | ( | self, | |
index ) |
Definition at line 69 of file template.h.
Definition at line 76 of file template.h.
#define INDEX_BITS 32 |
A vector-backed arena, with support for small indices.
Definition at line 19 of file template.h.
Definition at line 280 of file template.h.
Definition at line 346 of file template.h.
#define RESIZE_FACTOR 2 |
Definition at line 73 of file template.h.
Definition at line 67 of file template.h.
#define VALUE value_t |
Definition at line 29 of file template.h.
#define VALUE_CLONE value_clone |
Definition at line 33 of file template.h.
#define VALUE_DELETE value_delete |
Definition at line 31 of file template.h.
Definition at line 195 of file template.h.
|
static |
Definition at line 332 of file template.h.
Definition at line 262 of file template.h.
|
static |
Definition at line 293 of file template.h.
|
static |
Definition at line 364 of file template.h.
|
static |
Definition at line 225 of file template.h.
|
static |
Definition at line 318 of file template.h.
|
static |
Definition at line 387 of file template.h.
Definition at line 129 of file template.h.
Definition at line 113 of file template.h.
|
static |
Definition at line 301 of file template.h.
|
static |
Definition at line 369 of file template.h.
Definition at line 189 of file template.h.
Definition at line 256 of file template.h.
|
static |
Definition at line 220 of file template.h.
Definition at line 177 of file template.h.
Definition at line 238 of file template.h.
Definition at line 159 of file template.h.
Definition at line 32 of file template.h.
|
static |
Definition at line 30 of file template.h.
Definition at line 171 of file template.h.
|
static |
Definition at line 352 of file template.h.
|
static |
Definition at line 235 of file template.h.
|
static |
Definition at line 236 of file template.h.