DILIGENT_BEGIN_INTERFACE1 helper
s-ol
2 years ago
68 | 68 | } Iface; \ |
69 | 69 | struct Iface##Methods |
70 | 70 | |
71 | # define DILIGENT_BEGIN_INTERFACE1(Iface) \ | |
72 | typedef struct Iface \ | |
73 | { \ | |
74 | struct Iface##Vtbl* pVtbl; \ | |
75 | } Iface; \ | |
76 | struct Iface##Methods | |
77 | ||
71 | 78 | # define DEFAULT_VALUE(x) |
72 | 79 | |
73 | 80 | # define CALL_IFACE_METHOD(Iface, Method, This, ...) (This)->pVtbl->Iface.Method((I##Iface*)(This), ##__VA_ARGS__) |
95 | 102 | |
96 | 103 | # define DILIGENT_BEGIN_INTERFACE(Name, Base) struct Name : public Base |
97 | 104 | |
105 | # define DILIGENT_BEGIN_INTERFACE1(Name) struct Name | |
106 | ||
98 | 107 | # define DEFAULT_VALUE(x) = x |
99 | 108 | |
100 | 109 | #endif |