16#define CE_MK_SAFE_CAST
18#define CE_MK_POOLED(T) \
19 using Allocator = VKObjectAllocator; \
20 [[nodiscard]] static Allocator& getAllocator() noexcept; \
21 [[nodiscard]] static void* operator new(size_t size) noexcept; \
22 static void operator delete(void* p, std::size_t size) noexcept;
26#define CE_MK_RENDER_API_OBJECT_FORWARD(N) \
28 using MK##N##Ptr = RC<MK##N>;
30#undef CE_MK_RENDER_API_OBJECT_FORWARD
32 template<
typename ChildTypeName,
typename ParentType =
void>
class MKObject {
39#if defined(CE_MK_SAFE_CAST)
59#if defined(CE_MK_SAFE_CAST)
71#if defined(CE_MK_SAFE_CAST)
83#if defined(CE_MK_SAFE_CAST)
95#if defined(CE_MK_SAFE_CAST)
117 template<
typename ChildTypeName,
typename ParentType =
void>
class MKDeviceObject :
public MKObject<ChildTypeName, ParentType> {
#define CE_MK_RENDER_API_OBJECT_FORWARD(N)
Definition MKCommon.hpp:26
#define CE_RENDER_API_OBJECT_EACH(F)
A macro that invokes the function-macro F for every RenderAPI object type.
Definition Forward.hpp:18
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
Pointer get() const noexcept
Definition SmartPtr.hpp:244
Mock RenderAPI device object.
Definition MKDevice.hpp:32
Definition MKCommon.hpp:117
MKDevice & deviceMK
The owning MKDevice instance.
Definition MKCommon.hpp:120
MKDeviceObject(MKDevicePtr device)
Creates a new MKDeviceObject from the given device.
Definition MKCommon.hpp:125
Definition MKCommon.hpp:32
static const ChildTypeName & cast(const ParentType &object)
Casts a object of type ParentType to a object of type ChildTypeName.
Definition MKCommon.hpp:70
static RC< ChildTypeName > cast(const RC< ParentType > &ptr)
Casts a RC containing a ParentType pointer to a pointer to a pointer to a ChildTypeName.
Definition MKCommon.hpp:38
static ChildTypeName * cast(ParentType *object)
Casts a object of type ParentType to a object of type ChildTypeName.
Definition MKCommon.hpp:82
static ChildTypeName & cast(ParentType &object)
Casts a object of type ParentType to a object of type ChildTypeName.
Definition MKCommon.hpp:58
static ChildTypeName * safeCast(ParentType *object)
Casts a object of type ParentType to a object of type ChildTypeName.
Definition MKCommon.hpp:106
static const ChildTypeName * safeCast(const ParentType *object)
Casts a object of type ParentType to a object of type ChildTypeName.
Definition MKCommon.hpp:112
static RC< ChildTypeName > safeCast(const RC< ParentType > &ptr)
Safely casts a RC containing a ParentType pointer to a pointer to a pointer to a ChildTypeName.
Definition MKCommon.hpp:50
static const ChildTypeName * cast(const ParentType *object)
Casts a object of type ParentType to a object of type ChildTypeName.
Definition MKCommon.hpp:94
Definition Application.hpp:19
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Definition GPUGraphicsPipeline.hpp:281
Definition GPUGraphicsPipeline.hpp:214