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

Go to the source code of this file.

Macros

#define DC_TRAIT_SET(SELF)

Macro Definition Documentation

◆ DC_TRAIT_SET

#define DC_TRAIT_SET ( SELF)
Value:
DC_REQUIRE_CONSTANT(SELF, max_capacity, size_t); \
DC_REQUIRE_METHOD(bool, SELF, try_add, (SELF*, NS(SELF, item_t))); \
DC_REQUIRE_METHOD(void, SELF, add, (SELF*, NS(SELF, item_t))); \
DC_REQUIRE_METHOD(bool, SELF, contains, (SELF const*, NS(SELF, item_t))); \
DC_REQUIRE_METHOD(bool, SELF, try_remove, (SELF*, NS(SELF, item_t))); \
DC_REQUIRE_METHOD(void, SELF, remove, (SELF*, NS(SELF, item_t))); \
DC_REQUIRE_METHOD(size_t, SELF, size, (SELF const*)); \
DC_TRAIT_CONST_ITERABLE(SELF); \
DC_TRAIT_CLONEABLE(SELF); \
DC_TRAIT_DELETABLE(SELF); \
DC_TRAIT_DEBUGABLE(SELF)
static DC_PUBLIC bool try_remove(SELF *self, INDEX index, VALUE *destination)
Definition template.h:264
static DC_PUBLIC VALUE remove(SELF *self, INDEX index)
Definition template.h:292
static DC_PUBLIC size_t size(SELF const *self)
Definition template.h:252
DC_STATIC_CONSTANT size_t max_capacity
Definition template.h:130
static DC_PUBLIC void add(SELF *self, ITEM item)
Definition template.h:97
static DC_PUBLIC bool try_add(SELF *self, ITEM item)
Definition template.h:93
static DC_PUBLIC bool contains(SELF const *self, ITEM item)
Definition template.h:102
#define SELF
Definition def.h:52
#define NS(pre, post)
Definition namespace.h:14
#define DC_REQUIRE_TYPE(obj, name)
Definition require.h:25
A queue comprised of an extendable circular buffer.
Definition template.h:16

Definition at line 5 of file trait.h.

5#define DC_TRAIT_SET(SELF) \
6 DC_REQUIRE_TYPE(SELF, item_t); \
7 DC_REQUIRE_CONSTANT(SELF, max_capacity, size_t); \
8 DC_REQUIRE_METHOD(bool, SELF, try_add, (SELF*, NS(SELF, item_t))); \
9 DC_REQUIRE_METHOD(void, SELF, add, (SELF*, NS(SELF, item_t))); \
10 DC_REQUIRE_METHOD(bool, SELF, contains, (SELF const*, NS(SELF, item_t))); \
11 DC_REQUIRE_METHOD(bool, SELF, try_remove, (SELF*, NS(SELF, item_t))); \
12 DC_REQUIRE_METHOD(void, SELF, remove, (SELF*, NS(SELF, item_t))); \
13 DC_REQUIRE_METHOD(size_t, SELF, size, (SELF const*)); \
14 DC_TRAIT_CONST_ITERABLE(SELF); \
15 DC_TRAIT_CLONEABLE(SELF); \
16 DC_TRAIT_DELETABLE(SELF); \
17 DC_TRAIT_DEBUGABLE(SELF)