Derive-C
Loading...
Searching...
No Matches
trait.h
Go to the documentation of this file.
1#pragma once
2
4
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)