Derive-C
Loading...
Searching...
No Matches
trait.h File Reference

Go to the source code of this file.

Macros

#define DC_TRAIT_ARENA(SELF)

Macro Definition Documentation

◆ DC_TRAIT_ARENA

#define DC_TRAIT_ARENA ( SELF)
Value:
DC_REQUIRE_TYPE(SELF, value_t); \
DC_REQUIRE_METHOD(NS(SELF, index_t), SELF, insert, (SELF*, NS(SELF, value_t))); \
DC_REQUIRE_METHOD(NS(SELF, value_t)*, SELF, write, (SELF*, NS(SELF, index_t))); \
DC_REQUIRE_METHOD(NS(SELF, value_t)*, SELF, try_write, (SELF*, NS(SELF, index_t))); \
DC_REQUIRE_METHOD(NS(SELF, value_t) const*, SELF, read, (SELF const*, NS(SELF, index_t))); \
DC_REQUIRE_METHOD(NS(SELF, value_t) const*, SELF, try_read, (SELF const*, NS(SELF, index_t))); \
DC_REQUIRE_METHOD(bool, SELF, try_remove, (SELF*, NS(SELF, index_t), NS(SELF, value_t)*)); \
DC_REQUIRE_METHOD(NS(SELF, value_t), SELF, remove, (SELF*, NS(SELF, index_t))); \
DC_TRAIT_ITERABLE(SELF); \
DC_TRAIT_CLONEABLE(SELF); \
DC_TRAIT_DELETABLE(SELF); \
DC_TRAIT_DEBUGABLE(SELF);
static INDEX insert(SELF *self, VALUE value)
Definition template.h:127
static VALUE remove(SELF *self, INDEX index)
Definition template.h:292
static VALUE * try_write(SELF *self, INDEX index)
Definition template.h:205
static VALUE const * read(SELF const *self, INDEX index)
Definition template.h:199
static VALUE * write(SELF *self, INDEX index)
Definition template.h:209
static bool try_remove(SELF *self, INDEX index, VALUE *destination)
Definition template.h:264
static VALUE const * try_read(SELF const *self, INDEX index)
Definition template.h:180
INDEX_TYPE index_t
Definition template.h:32
#define NS(pre, post)
Definition namespace.h:4
#define DC_REQUIRE_TYPE(obj, name)
Definition require.h:21
#define SELF
Definition def.h:52

Definition at line 5 of file trait.h.

5#define DC_TRAIT_ARENA(SELF) \
6 DC_REQUIRE_TYPE(SELF, index_t); \
7 DC_REQUIRE_TYPE(SELF, value_t); \
8 DC_REQUIRE_METHOD(NS(SELF, index_t), SELF, insert, (SELF*, NS(SELF, value_t))); \
9 DC_REQUIRE_METHOD(NS(SELF, value_t)*, SELF, write, (SELF*, NS(SELF, index_t))); \
10 DC_REQUIRE_METHOD(NS(SELF, value_t)*, SELF, try_write, (SELF*, NS(SELF, index_t))); \
11 DC_REQUIRE_METHOD(NS(SELF, value_t) const*, SELF, read, (SELF const*, NS(SELF, index_t))); \
12 DC_REQUIRE_METHOD(NS(SELF, value_t) const*, SELF, try_read, (SELF const*, NS(SELF, index_t))); \
13 DC_REQUIRE_METHOD(bool, SELF, try_remove, (SELF*, NS(SELF, index_t), NS(SELF, value_t)*)); \
14 DC_REQUIRE_METHOD(NS(SELF, value_t), SELF, remove, (SELF*, NS(SELF, index_t))); \
15 DC_TRAIT_ITERABLE(SELF); \
16 DC_TRAIT_CLONEABLE(SELF); \
17 DC_TRAIT_DELETABLE(SELF); \
18 DC_TRAIT_DEBUGABLE(SELF);