taskrambler
0.1.8
Web server and task management solution.
|
#include <sys/types.h>
Go to the source code of this file.
Data Structures | |
struct | interface |
struct | iface_impl_ptr |
Macros | |
#define | MAX_IFACE 32 |
#define | IFACE(name) ((const struct i_##name const*)&i_##name##_impl) |
#define | INIT_IFACE(name, ...) static const struct i_##name i_##name##_impl = {&i_##name,__VA_ARGS__} |
#define | NUMARGS(...) (sizeof((const void*[]){__VA_ARGS__})/sizeof(void*)) |
#define | INIT_IFACE_IMPL(...) {NUMARGS(__VA_ARGS__), 0, {__VA_ARGS__}} |
Typedefs | |
typedef const struct interface * | iface_ptr |
Functions | |
iface_ptr | interfaceGet (iface_impl_ptr, const iface_ptr) |
Interface definition code. Each interface is a set of selector functions as well as a data structure where the concrete implementation will be stored. This structure is the intergrated in the class that implements the interface.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file interface.h.
struct interface |
Definition at line 42 of file interface.h.
Data Fields | ||
---|---|---|
const char * | name | |
const size_t | nmethods |
struct iface_impl |
Definition at line 48 of file interface.h.
Data Fields | ||
---|---|---|
const void * | impl[MAX_IFACE] | |
const size_t | nimpl | |
char | simpl |
#define IFACE | ( | name | ) | ((const struct i_##name const*)&i_##name##_impl) |
Definition at line 34 of file interface.h.
#define INIT_IFACE | ( | name, | |
... | |||
) | static const struct i_##name i_##name##_impl = {&i_##name,__VA_ARGS__} |
Definition at line 35 of file interface.h.
#define INIT_IFACE_IMPL | ( | ... | ) | {NUMARGS(__VA_ARGS__), 0, {__VA_ARGS__}} |
Definition at line 39 of file interface.h.
#define MAX_IFACE 32 |
Definition at line 32 of file interface.h.
#define NUMARGS | ( | ... | ) | (sizeof((const void*[]){__VA_ARGS__})/sizeof(void*)) |
Definition at line 38 of file interface.h.
Definition at line 46 of file interface.h.
this one is important in selector functions to get the correct interface implementation of a class.
Definition at line 44 of file interface.c.