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_QUEUE(SELF)

Macro Definition Documentation

◆ TRAIT_QUEUE

#define TRAIT_QUEUE ( SELF)
Value:
REQUIRE_METHOD(bool, SELF, empty, (SELF const*)); \
REQUIRE_METHOD(size_t, SELF, size, (SELF const*)); \
REQUIRE_METHOD(void, SELF, push_front, (SELF*, NS(SELF, item_t))); \
REQUIRE_METHOD(void, SELF, push_back, (SELF*, NS(SELF, item_t))); \
REQUIRE_METHOD(NS(SELF, item_t), SELF, pop_front, (SELF*)); \
REQUIRE_METHOD(NS(SELF, item_t), SELF, pop_back, (SELF*)); \
TRAIT_ITERABLE(SELF); \
TRAIT_DELETABLE(SELF); \
TRAIT_CLONEABLE(SELF);
static bool empty(ITER const *iter)
Definition template.h:361
static INDEX_TYPE size(SELF const *self)
Definition template.h:275
static ITEM pop_front(SELF *self)
Definition template.h:216
static ITEM pop_back(SELF *self)
Definition template.h:235
static void push_back(SELF *self, ITEM item)
Definition template.h:184
static void push_front(SELF *self, ITEM item)
Definition template.h:198
#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_QUEUE(SELF) \
7 REQUIRE_TYPE(SELF, item_t); \
8 REQUIRE_METHOD(bool, SELF, empty, (SELF const*)); \
9 REQUIRE_METHOD(size_t, SELF, size, (SELF const*)); \
10 REQUIRE_METHOD(void, SELF, push_front, (SELF*, NS(SELF, item_t))); \
11 REQUIRE_METHOD(void, SELF, push_back, (SELF*, NS(SELF, item_t))); \
12 REQUIRE_METHOD(NS(SELF, item_t), SELF, pop_front, (SELF*)); \
13 REQUIRE_METHOD(NS(SELF, item_t), SELF, pop_back, (SELF*)); \
14 TRAIT_ITERABLE(SELF); \
15 TRAIT_DELETABLE(SELF); \
16 TRAIT_CLONEABLE(SELF);