|
Derive-C
|
#include <derive-c/core/includes/def.h>#include "includes.h"#include <derive-c/core/self/def.h>#include <derive-c/core/self/undef.h>#include <derive-c/core/includes/undef.h>Go to the source code of this file.
Data Structures | |
| struct | value_t |
| struct | ENTRY |
| struct | SELF |
| An allocator that prints to stdout when it allocates or frees memory. More... | |
| struct | ITER_CONST |
| struct | KV_PAIR_CONST |
| struct | ITER |
| struct | KV_PAIR |
Macros | |
| #define | CAPACITY 32 |
| A statically allocated map that linearly looks up keys. | |
| #define | KEY map_key_t |
| #define | KEY_EQ DC_MEM_EQ |
| #define | KEY_DELETE DC_NO_DELETE |
| #define | KEY_CLONE DC_COPY_CLONE |
| #define | KEY_DEBUG DC_DEFAULT_DEBUG |
| #define | VALUE value_t |
| #define | VALUE_DELETE DC_NO_DELETE |
| #define | VALUE_CLONE DC_COPY_CLONE |
| #define | VALUE_DEBUG DC_DEFAULT_DEBUG |
| #define | ENTRY NS(SELF, entry_t) |
| #define | INVARIANT_CHECK(self) |
| #define | ITER_CONST NS(SELF, iter_const) |
| #define | KV_PAIR_CONST NS(ITER_CONST, item) |
| #define | ITER NS(SELF, iter) |
| #define | KV_PAIR NS(ITER, item) |
Typedefs | |
| typedef int | KEY |
Functions | |
| DC_STATIC_ASSERT (CAPACITY > 0, DC_EXPAND_STRING(SELF) " CAPACITY cannot be empty") | |
| static DC_PUBLIC SELF | new () |
| static DC_PUBLIC VALUE const * | try_read (SELF const *self, KEY key) |
| static DC_PUBLIC VALUE const * | read (SELF const *self, KEY key) |
| static DC_PUBLIC VALUE * | try_write (SELF *self, KEY key) |
| static DC_PUBLIC VALUE * | write (SELF *self, KEY key) |
| static DC_PUBLIC VALUE * | try_insert (SELF *self, KEY key, VALUE value) |
| static DC_PUBLIC VALUE * | insert (SELF *self, KEY key, VALUE value) |
| static DC_PUBLIC bool | try_remove (SELF *self, KEY key, VALUE *dest) |
| static DC_PUBLIC VALUE | remove (SELF *self, KEY key) |
| static DC_PUBLIC void | delete_entry (SELF *self, KEY key) |
| static DC_PUBLIC size_t | size (SELF const *self) |
| static DC_PUBLIC SELF | clone (SELF const *self) |
| static DC_PUBLIC void | delete (SELF *self) |
| static DC_PUBLIC void | debug (SELF const *self, dc_debug_fmt fmt, FILE *stream) |
| static DC_PUBLIC bool | empty_item (KV_PAIR_CONST const *item) |
| static DC_PUBLIC KV_PAIR_CONST | next (ITER_CONST *iter) |
| static DC_PUBLIC bool | empty (ITER_CONST const *iter) |
| static DC_PUBLIC ITER_CONST | get_iter_const (SELF const *self) |
| static DC_PUBLIC bool | empty_item (KV_PAIR const *item) |
| static DC_PUBLIC KV_PAIR | next (ITER *iter) |
| static DC_PUBLIC bool | empty (ITER const *iter) |
| static DC_PUBLIC ITER | get_iter (SELF *self) |
| DC_TRAIT_MAP (SELF) | |
Variables | |
| DC_STATIC_CONSTANT size_t | max_capacity = (size_t)CAPACITY |
| #define CAPACITY 32 |
A statically allocated map that linearly looks up keys.
Definition at line 14 of file template.h.
Definition at line 68 of file template.h.
| #define INVARIANT_CHECK | ( | self | ) |
Definition at line 84 of file template.h.
Definition at line 280 of file template.h.
Definition at line 227 of file template.h.
| #define KEY map_key_t |
Definition at line 23 of file template.h.
| #define KEY_CLONE DC_COPY_CLONE |
Definition at line 36 of file template.h.
| #define KEY_DEBUG DC_DEFAULT_DEBUG |
Definition at line 40 of file template.h.
| #define KEY_DELETE DC_NO_DELETE |
Definition at line 32 of file template.h.
| #define KEY_EQ DC_MEM_EQ |
Definition at line 28 of file template.h.
Definition at line 281 of file template.h.
| #define KV_PAIR_CONST NS(ITER_CONST, item) |
Definition at line 228 of file template.h.
| #define VALUE value_t |
Definition at line 50 of file template.h.
| #define VALUE_CLONE DC_COPY_CLONE |
Definition at line 58 of file template.h.
| #define VALUE_DEBUG DC_DEFAULT_DEBUG |
Definition at line 62 of file template.h.
| #define VALUE_DELETE DC_NO_DELETE |
Definition at line 54 of file template.h.
| typedef int KEY |
Definition at line 24 of file template.h.
Definition at line 182 of file template.h.
| DC_STATIC_ASSERT | ( | CAPACITY | , |
| 0 | , | ||
| DC_EXPAND_STRING(SELF) " CAPACITY cannot be empty" | ) |
| DC_TRAIT_MAP | ( | SELF | ) |
|
static |
Definition at line 206 of file template.h.
Definition at line 197 of file template.h.
Definition at line 175 of file template.h.
Definition at line 314 of file template.h.
|
static |
Definition at line 261 of file template.h.
Definition at line 294 of file template.h.
|
static |
Definition at line 241 of file template.h.
Definition at line 320 of file template.h.
|
static |
Definition at line 267 of file template.h.
Definition at line 142 of file template.h.
Definition at line 88 of file template.h.
Definition at line 298 of file template.h.
|
static |
Definition at line 245 of file template.h.
Definition at line 107 of file template.h.
Definition at line 168 of file template.h.
Definition at line 180 of file template.h.
Definition at line 123 of file template.h.
Definition at line 97 of file template.h.
Definition at line 149 of file template.h.
| DC_STATIC_CONSTANT size_t max_capacity = (size_t)CAPACITY |
Definition at line 82 of file template.h.