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

Go to the source code of this file.

Macros

#define DC_TRAIT_ITER(SELF)
#define DC_TRAIT_CONST_ITERABLE(SELF)
#define DC_TRAIT_ITERABLE(SELF)

Macro Definition Documentation

◆ DC_TRAIT_CONST_ITERABLE

#define DC_TRAIT_CONST_ITERABLE ( SELF)
Value:
DC_REQUIRE_TYPE(SELF, iter_const); \
DC_REQUIRE_METHOD(NS(SELF, iter_const), SELF, get_iter_const, (SELF const*)); \
DC_TRAIT_ITER(NS(SELF, iter_const))
static DC_PUBLIC ITER_CONST get_iter_const(SELF const *self)
Definition template.h:464
#define SELF
Definition def.h:52
#define NS(pre, post)
Definition namespace.h:14
#define DC_REQUIRE_TYPE(obj, name)
Definition require.h:25

Definition at line 12 of file iter.h.

12#define DC_TRAIT_CONST_ITERABLE(SELF) \
13 DC_REQUIRE_TYPE(SELF, iter_const); \
14 DC_REQUIRE_METHOD(NS(SELF, iter_const), SELF, get_iter_const, (SELF const*)); \
15 DC_TRAIT_ITER(NS(SELF, iter_const))

◆ DC_TRAIT_ITER

#define DC_TRAIT_ITER ( SELF)
Value:
DC_REQUIRE_METHOD(NS(SELF, item), SELF, next, (SELF*)); \
DC_REQUIRE_METHOD(bool, SELF, empty, (SELF const*)); \
DC_REQUIRE_METHOD(bool, SELF, empty_item, (NS(SELF, item) const*))
static DC_PUBLIC IV_PAIR next(ITER *iter)
Definition template.h:355
static DC_PUBLIC bool empty(ITER const *iter)
Definition template.h:349
static DC_PUBLIC bool empty_item(IV_PAIR const *item)
Definition template.h:347
IV_PAIR item
Definition template.h:281

Definition at line 6 of file iter.h.

6#define DC_TRAIT_ITER(SELF) \
7 DC_REQUIRE_TYPE(SELF, item); \
8 DC_REQUIRE_METHOD(NS(SELF, item), SELF, next, (SELF*)); \
9 DC_REQUIRE_METHOD(bool, SELF, empty, (SELF const*)); \
10 DC_REQUIRE_METHOD(bool, SELF, empty_item, (NS(SELF, item) const*))

◆ DC_TRAIT_ITERABLE

#define DC_TRAIT_ITERABLE ( SELF)
Value:
DC_REQUIRE_METHOD(NS(SELF, iter), SELF, get_iter, (SELF*)); \
DC_TRAIT_ITER(NS(SELF, iter))
static DC_PUBLIC ITER get_iter(SELF *self)
Definition template.h:373

Definition at line 17 of file iter.h.

17#define DC_TRAIT_ITERABLE(SELF) \
18 DC_REQUIRE_TYPE(SELF, iter); \
19 DC_REQUIRE_METHOD(NS(SELF, iter), SELF, get_iter, (SELF*)); \
20 DC_TRAIT_ITER(NS(SELF, iter))