30 #include "RefCountedObjectImpl.h" 36 #define IMPLEMENT_QUERY_INTERFACE_BODY(InterfaceID, ParentClassName) \ 38 if( ppInterface == nullptr ) \ 40 if( IID == InterfaceID ) \ 42 *ppInterface = this; \ 43 (*ppInterface)->AddRef(); \ 47 ParentClassName::QueryInterface( IID, ppInterface ); \ 51 #define IMPLEMENT_QUERY_INTERFACE(ClassName, InterfaceID, ParentClassName) \ 52 void ClassName :: QueryInterface(const Diligent::INTERFACE_ID &IID, IObject **ppInterface) \ 53 IMPLEMENT_QUERY_INTERFACE_BODY(InterfaceID, ParentClassName) 55 #define IMPLEMENT_QUERY_INTERFACE_IN_PLACE(InterfaceID, ParentClassName) \ 56 virtual void QueryInterface(const Diligent::INTERFACE_ID &IID, IObject **ppInterface)override \ 57 IMPLEMENT_QUERY_INTERFACE_BODY(InterfaceID, ParentClassName) 61 template<
typename BaseInterface>
69 virtual void QueryInterface(
const Diligent::INTERFACE_ID &IID, IObject **ppInterface )
71 if( ppInterface ==
nullptr )
74 *ppInterface =
nullptr;
75 if( IID == Diligent::IID_Unknown )
78 (*ppInterface)->AddRef();
Template class implementing base functionality for an object.
Definition: ObjectBase.h:62
Namespace for the OpenGL implementation of the graphics engine.
Definition: BufferD3D11Impl.h:34
Base class for all reference counting objects.
Definition: RefCountedObjectImpl.h:470