|
Derive-C
|
#include <derive-c/core/includes/def.h>#include "includes.h"#include <derive-c/core/alloc/def.h>#include <derive-c/core/self/def.h>#include <derive-c/core/index/bits_to_type/def.h>#include <derive-c/core/index/type_to_strong/def.h>#include <derive-c/utils/slot/template.h>#include <derive-c/core/index/type_to_strong/undef.h>#include <derive-c/core/index/bits_to_type/undef.h>#include <derive-c/core/self/undef.h>#include <derive-c/core/alloc/undef.h>#include <derive-c/core/includes/undef.h>Go to the source code of this file.
Data Structures | |
| struct | VALUE |
| struct | SELF |
| An allocator that prints to stdout when it allocates or frees memory. More... | |
| struct | ITER |
| struct | IV_PAIR |
| struct | ITER_CONST |
| struct | IV_PAIR_CONST |
Macros | |
| #define | INDEX_BITS 8 |
| #define | BLOCK_INDEX_BITS 7 |
| #define | VALUE value_t |
| #define | VALUE_DELETE value_delete |
| #define | VALUE_CLONE value_clone |
| #define | VALUE_DEBUG value_debug |
| #define | SLOT NS(NAME, slot) |
| #define | SLOT_INDEX_TYPE INDEX_TYPE |
| #define | SLOT_VALUE VALUE |
| #define | SLOT_VALUE_CLONE VALUE_CLONE |
| #define | SLOT_VALUE_CLONE VALUE_CLONE |
| #define | SLOT_VALUE_DELETE VALUE_DELETE |
| #define | INTERNAL_NAME SLOT |
| #define | INVARIANT_CHECK(self) |
| #define | ITER NS(SELF, iter) |
| #define | IV_PAIR NS(ITER, item) |
| #define | ITER_INVARIANT_CHECK(iter) |
| #define | ITER_CONST NS(SELF, iter_const) |
| #define | IV_PAIR_CONST NS(ITER_CONST, item) |
| #define | ITER_CONST_INVARIANT_CHECK(iter) |
Typedefs | |
| typedef VALUE | value_t |
| typedef ALLOC | alloc_t |
| typedef SLOT | PRIV(block)[DC_ARENA_CHUNKED_BLOCK_SIZE(BLOCK_INDEX_BITS)] |
Functions | |
| DC_STATIC_ASSERT (BLOCK_INDEX_BITS > 0, "Cannot have zero block index bits") | |
| DC_STATIC_ASSERT (INDEX_BITS > 0, "Cannot have zero index bits") | |
| DC_STATIC_ASSERT (INDEX_BITS > BLOCK_INDEX_BITS, "The number of bits for offset within a block must be " "less than the number of bits used for an index") | |
| static void | VALUE_DELETE (value_t *) |
| static value_t | VALUE_CLONE (value_t const *self) |
| static void | VALUE_DEBUG (VALUE const *, dc_debug_fmt, FILE *) |
| DC_STATIC_ASSERT (sizeof(VALUE), "VALUE must be a non-zero sized type") | |
| static DC_PUBLIC SELF | new (ref alloc_ref) |
| static DC_PUBLIC INDEX | insert (SELF *self, VALUE value) |
| static DC_PUBLIC VALUE const * | try_read (SELF const *self, INDEX index) |
| static DC_PUBLIC VALUE const * | read (SELF const *self, INDEX index) |
| static DC_PUBLIC VALUE * | try_write (SELF *self, INDEX index) |
| static DC_PUBLIC VALUE * | write (SELF *self, INDEX index) |
| static DC_PUBLIC SELF | clone (SELF const *self) |
| static DC_PUBLIC size_t | size (SELF const *self) |
| static DC_PUBLIC bool | full (SELF const *self) |
| static DC_PUBLIC bool | try_remove (SELF *self, INDEX index, VALUE *destination) |
| static DC_PUBLIC VALUE | remove (SELF *self, INDEX index) |
| static DC_PUBLIC INDEX_TYPE PRIV | next_index_value (SELF const *self, INDEX_TYPE from_index) |
| static DC_PUBLIC IV_PAIR | iv_empty () |
| static DC_PUBLIC bool | empty_item (IV_PAIR const *item) |
| static DC_PUBLIC bool | empty (ITER const *iter) |
| static DC_PUBLIC IV_PAIR | next (ITER *iter) |
| static DC_PUBLIC ITER | get_iter (SELF *self) |
| static DC_PUBLIC void | delete (SELF *self) |
| static DC_PUBLIC IV_PAIR_CONST | iv_const_empty () |
| static DC_PUBLIC bool | empty_item (IV_PAIR_CONST const *item) |
| static DC_PUBLIC bool | empty (ITER_CONST const *iter) |
| static DC_PUBLIC IV_PAIR_CONST | next (ITER_CONST *iter) |
| static DC_PUBLIC ITER_CONST | get_iter_const (SELF const *self) |
| static DC_PUBLIC void | debug (SELF const *self, dc_debug_fmt fmt, FILE *stream) |
| DC_TRAIT_ARENA (SELF) | |
Variables | |
| static DC_PUBLIC const size_t | max_entries = MAX_INDEX |
| #define BLOCK_INDEX_BITS 7 |
Definition at line 20 of file template.h.
| #define INDEX_BITS 8 |
Definition at line 13 of file template.h.
| #define INTERNAL_NAME SLOT |
Definition at line 72 of file template.h.
| #define INVARIANT_CHECK | ( | self | ) |
Definition at line 90 of file template.h.
Definition at line 322 of file template.h.
Definition at line 411 of file template.h.
| #define ITER_CONST_INVARIANT_CHECK | ( | iter | ) |
Definition at line 420 of file template.h.
| #define ITER_INVARIANT_CHECK | ( | iter | ) |
Definition at line 331 of file template.h.
Definition at line 323 of file template.h.
| #define IV_PAIR_CONST NS(ITER_CONST, item) |
Definition at line 412 of file template.h.
Definition at line 65 of file template.h.
| #define SLOT_INDEX_TYPE INDEX_TYPE |
Definition at line 67 of file template.h.
| #define SLOT_VALUE VALUE |
Definition at line 68 of file template.h.
| #define SLOT_VALUE_CLONE VALUE_CLONE |
Definition at line 69 of file template.h.
| #define SLOT_VALUE_CLONE VALUE_CLONE |
Definition at line 69 of file template.h.
| #define SLOT_VALUE_DELETE VALUE_DELETE |
Definition at line 71 of file template.h.
| #define VALUE value_t |
Definition at line 33 of file template.h.
| #define VALUE_CLONE value_clone |
Definition at line 39 of file template.h.
| #define VALUE_DEBUG value_debug |
Definition at line 41 of file template.h.
| #define VALUE_DELETE value_delete |
Definition at line 37 of file template.h.
Definition at line 63 of file template.h.
| typedef SLOT PRIV(block)[DC_ARENA_CHUNKED_BLOCK_SIZE(BLOCK_INDEX_BITS)] |
Definition at line 75 of file template.h.
| typedef VALUE value_t |
Definition at line 62 of file template.h.
Definition at line 215 of file template.h.
| DC_STATIC_ASSERT | ( | BLOCK_INDEX_BITS | , |
| 0 | , | ||
| "Cannot have zero block index bits" | ) |
| DC_STATIC_ASSERT | ( | INDEX_BITS | , |
| 0 | , | ||
| "Cannot have zero index bits" | ) |
| DC_STATIC_ASSERT | ( | INDEX_BITS | , |
| BLOCK_INDEX_BITS | , | ||
| "The number of bits for offset within a block must be " "less than the number of bits used for an index" | ) |
| DC_STATIC_ASSERT | ( | sizeof(VALUE) | , |
| "VALUE must be a non-zero sized type" | ) |
| DC_TRAIT_ARENA | ( | SELF | ) |
|
static |
Definition at line 482 of file template.h.
Definition at line 391 of file template.h.
Definition at line 349 of file template.h.
|
static |
Definition at line 440 of file template.h.
Definition at line 347 of file template.h.
|
static |
Definition at line 436 of file template.h.
Definition at line 257 of file template.h.
Definition at line 373 of file template.h.
|
static |
Definition at line 464 of file template.h.
Definition at line 126 of file template.h.
|
static |
Definition at line 432 of file template.h.
Definition at line 343 of file template.h.
Definition at line 101 of file template.h.
Definition at line 355 of file template.h.
|
static |
Definition at line 446 of file template.h.
Definition at line 302 of file template.h.
Definition at line 199 of file template.h.
Definition at line 292 of file template.h.
Definition at line 252 of file template.h.
Definition at line 180 of file template.h.
Definition at line 264 of file template.h.
Definition at line 40 of file template.h.
|
static |
Definition at line 42 of file template.h.
|
static |
Definition at line 38 of file template.h.
Definition at line 209 of file template.h.
|
static |
Definition at line 262 of file template.h.