Go to the documentation of this file.
33 #include "../../Primitives/interface/Object.h"
40 #define IMPLEMENT_QUERY_INTERFACE_BODY(InterfaceID, ParentClassName) \
42 if (ppInterface == nullptr) \
44 if (IID == InterfaceID) \
46 *ppInterface = this; \
47 (*ppInterface)->AddRef(); \
51 ParentClassName::QueryInterface(IID, ppInterface); \
55 #define IMPLEMENT_QUERY_INTERFACE(ClassName, InterfaceID, ParentClassName) \
56 void ClassName::QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) \
57 IMPLEMENT_QUERY_INTERFACE_BODY(InterfaceID, ParentClassName)
59 #define IMPLEMENT_QUERY_INTERFACE_IN_PLACE(InterfaceID, ParentClassName) \
60 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override \
61 IMPLEMENT_QUERY_INTERFACE_BODY(InterfaceID, ParentClassName)
65 template <
typename BaseInterface>
75 if (ppInterface ==
nullptr)
78 *ppInterface =
nullptr;
79 if (IID == IID_Unknown)
Base interface for a reference counter object that stores the number of strong and weak references an...
Definition: ReferenceCounters.h:44
Base interface for all dynamic objects in the engine.
Definition: Object.h:41
Template class implementing base functionality for an object.
Definition: ObjectBase.hpp:66
Unique interface identifier.
Definition: InterfaceID.h:37
virtual ReferenceCounterValueType AddRef()=0
Increments the number of strong references by 1.
#define DILIGENT_CALL_TYPE
Definition: CommonDefinitions.h:45
ObjectBase(IReferenceCounters *pRefCounters)
Definition: ObjectBase.hpp:69
Base class for all reference counting objects.
Definition: RefCountedObjectImpl.hpp:499
virtual void QueryInterface(const INTERFACE_ID &IID, IObject **ppInterface)
Definition: ObjectBase.hpp:73
The library uses Direct3D-style math:
Definition: AdvancedMath.hpp:37