generic_iterators
1.0.0
Demonstration of implementing and using type safe generic iterators in pure, standard C
|
Utilities to define a typeclass and its instance. More...
Go to the source code of this file.
Macros | |
#define | typeclass(funcs) |
Define a typeclass with the given functions. More... | |
#define | typeclass_instance(Typeclass) |
Define a typeclass instance for the given typeclass. More... | |
Utilities to define a typeclass and its instance.
#define typeclass | ( | funcs | ) |
Define a typeclass with the given functions.
funcs | A semicolon separated list of typeclass functions. |
self
from the typeclass instance (and possibly more arguments). #define typeclass_instance | ( | Typeclass | ) |
Define a typeclass instance for the given typeclass.
This just contains a void* self
member and the typeclass itself.
Typeclass | The semantic type (C type) of the typeclass defined with typeclass(funcs). |