Derive-C
Loading...
Searching...
No Matches
trait.h
Go to the documentation of this file.
1#pragma once
2
4#include <stdbool.h>
5
6#define DC_TRAIT_BITSET(SELF) \
7 DC_REQUIRE_TYPE(SELF, index_t); \
8 DC_REQUIRE_METHOD(NS(SELF, index_t), SELF, max_index, (void)); \
9 DC_REQUIRE_METHOD(NS(SELF, index_t), SELF, min_index, (void)); \
10 DC_REQUIRE_METHOD(bool, SELF, try_set, (SELF*, NS(SELF, index_t), bool)); \
11 DC_REQUIRE_METHOD(void, SELF, set, (SELF*, NS(SELF, index_t), bool)); \
12 DC_REQUIRE_METHOD(bool, SELF, get, (SELF const*, NS(SELF, index_t))); \
13 DC_REQUIRE_METHOD(NS(SELF, index_t), SELF, size, (SELF const*)); \
14 DC_TRAIT_ITERABLE(SELF); \
15 DC_TRAIT_CLONEABLE(SELF); \
16 DC_TRAIT_DELETABLE(SELF); \
17 DC_TRAIT_DEBUGABLE(SELF);