From 949df6bdb9d838934b0f14316bb6fc715962200d Mon Sep 17 00:00:00 2001 From: s-ol Date: Sat, 27 Mar 2021 09:58:07 +0100 Subject: DILIGENT_BEGIN_INTERFACE1 helper --- Primitives/interface/CommonDefinitions.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Primitives/interface') diff --git a/Primitives/interface/CommonDefinitions.h b/Primitives/interface/CommonDefinitions.h index 483ae86f..8a290076 100644 --- a/Primitives/interface/CommonDefinitions.h +++ b/Primitives/interface/CommonDefinitions.h @@ -69,6 +69,13 @@ } Iface; \ struct Iface##Methods +# define DILIGENT_BEGIN_INTERFACE1(Iface) \ + typedef struct Iface \ + { \ + struct Iface##Vtbl* pVtbl; \ + } Iface; \ + struct Iface##Methods + # define DEFAULT_VALUE(x) # define CALL_IFACE_METHOD(Iface, Method, This, ...) (This)->pVtbl->Iface.Method((I##Iface*)(This), ##__VA_ARGS__) @@ -96,6 +103,8 @@ # define DILIGENT_BEGIN_INTERFACE(Name, Base) struct Name : public Base +# define DILIGENT_BEGIN_INTERFACE1(Name) struct Name + # define DEFAULT_VALUE(x) = x #endif -- cgit v1.2.3