DC_TRAIT_CONST_ITERABLE(
SELF); \
DC_TRAIT_CLONEABLE(
SELF); \
DC_TRAIT_DELETABLE(
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 size_t size(SELF const *self)
DC_STATIC_CONSTANT size_t max_capacity
static DC_PUBLIC void add(SELF *self, ITEM item)
static DC_PUBLIC bool try_add(SELF *self, ITEM item)
static DC_PUBLIC bool contains(SELF const *self, ITEM item)
#define DC_REQUIRE_TYPE(obj, name)
A queue comprised of an extendable circular buffer.
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)