Derive-C
Loading...
Searching...
No Matches
trait.h File Reference
Include dependency graph for trait.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TRAIT_VECTOR(SELF)

Macro Definition Documentation

◆ TRAIT_VECTOR

#define TRAIT_VECTOR ( SELF)
Value:
REQUIRE_TYPE(SELF, index_t); \
REQUIRE_METHOD(NS(SELF, item_t) const*, SELF, read, (SELF const*, NS(SELF, index_t))); \
REQUIRE_METHOD(NS(SELF, item_t) const*, SELF, try_read, (SELF const*, NS(SELF, index_t))); \
REQUIRE_METHOD(NS(SELF, item_t)*, SELF, write, (SELF*, NS(SELF, index_t))); \
REQUIRE_METHOD(NS(SELF, item_t)*, SELF, try_write, (SELF*, NS(SELF, index_t))); \
REQUIRE_METHOD(void, SELF, remove_at, (SELF*, NS(SELF, index_t), NS(SELF, index_t))); \
REQUIRE_METHOD(bool, SELF, try_pop, (SELF*, NS(SELF, item_t)*)); \
REQUIRE_METHOD(NS(SELF, item_t), SELF, pop, (SELF*)); \
REQUIRE_METHOD(NS(SELF, item_t)*, SELF, push, (SELF*, NS(SELF, item_t))); \
REQUIRE_METHOD(NS(SELF, index_t), SELF, size, (SELF const*)); \
TRAIT_ITERABLE(SELF); \
TRAIT_DELETABLE(SELF); \
TRAIT_CLONEABLE(SELF);
static INDEX_TYPE size(SELF const *self)
Definition template.h:275
static VALUE * try_write(SELF *self, INDEX index)
Definition template.h:210
static VALUE const * read(SELF const *self, INDEX index)
Definition template.h:240
static VALUE * write(SELF *self, INDEX index)
Definition template.h:222
static VALUE const * try_read(SELF const *self, INDEX index)
Definition template.h:228
static void remove_at(SELF *self, size_t at, size_t count)
Definition template.h:195
static ITEM * push(SELF *self, ITEM item)
Definition template.h:214
size_t index_t
Definition template.h:40
static bool try_pop(SELF *self, ITEM *destination)
Definition template.h:245
static ITEM pop(SELF *self)
Definition template.h:264
#define NS(pre, post)
Definition namespace.h:4
#define REQUIRE_TYPE(obj, name)
Definition require.h:21
#define SELF
Definition def.h:52
A queue comprised of an extendable circular buffer.
Definition template.h:22

Definition at line 6 of file trait.h.

6#define TRAIT_VECTOR(SELF) \
7 REQUIRE_TYPE(SELF, item_t); \
8 REQUIRE_TYPE(SELF, index_t); \
9 REQUIRE_METHOD(NS(SELF, item_t) const*, SELF, read, (SELF const*, NS(SELF, index_t))); \
10 REQUIRE_METHOD(NS(SELF, item_t) const*, SELF, try_read, (SELF const*, NS(SELF, index_t))); \
11 REQUIRE_METHOD(NS(SELF, item_t)*, SELF, write, (SELF*, NS(SELF, index_t))); \
12 REQUIRE_METHOD(NS(SELF, item_t)*, SELF, try_write, (SELF*, NS(SELF, index_t))); \
13 REQUIRE_METHOD(void, SELF, remove_at, (SELF*, NS(SELF, index_t), NS(SELF, index_t))); \
14 REQUIRE_METHOD(bool, SELF, try_pop, (SELF*, NS(SELF, item_t)*)); \
15 REQUIRE_METHOD(NS(SELF, item_t), SELF, pop, (SELF*)); \
16 REQUIRE_METHOD(NS(SELF, item_t)*, SELF, push, (SELF*, NS(SELF, item_t))); \
17 REQUIRE_METHOD(NS(SELF, index_t), SELF, size, (SELF const*)); \
18 TRAIT_ITERABLE(SELF); \
19 TRAIT_DELETABLE(SELF); \
20 TRAIT_CLONEABLE(SELF);