16#define CE_NL_SAFE_CAST
18#define CE_NL_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_NL_RENDER_API_OBJECT_FORWARD(N) \
28 using NL##N##Ptr = RC<NL##N>;
30#undef CE_NL_RENDER_API_OBJECT_FORWARD
32 template<
typename ChildTypeName,
typename ParentType =
void>
class NLObject {
39#if defined(CE_NL_SAFE_CAST)
59#if defined(CE_NL_SAFE_CAST)
71#if defined(CE_NL_SAFE_CAST)
83#if defined(CE_NL_SAFE_CAST)
95#if defined(CE_NL_SAFE_CAST)
117 template<
typename ChildTypeName,
typename ParentType =
void>
class NLDeviceObject :
public NLObject<ChildTypeName, ParentType> {
#define CE_NL_RENDER_API_OBJECT_FORWARD(N)
Definition NLCommon.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
Null RenderAPI device object.
Definition NLDevice.hpp:32
Definition NLCommon.hpp:117
NLDevice & deviceNL
The owning NLDevice instance.
Definition NLCommon.hpp:120
NLDeviceObject(NLDevicePtr device)
Creates a new NLDeviceObject from the given device.
Definition NLCommon.hpp:125
Definition NLCommon.hpp:32
static const ChildTypeName * safeCast(const ParentType *object)
Casts a object of type ParentType to a object of type ChildTypeName.
Definition NLCommon.hpp:112
static ChildTypeName * cast(ParentType *object)
Casts a object of type ParentType to a object of type ChildTypeName.
Definition NLCommon.hpp:82
static const ChildTypeName & cast(const ParentType &object)
Casts a object of type ParentType to a object of type ChildTypeName.
Definition NLCommon.hpp:70
static const ChildTypeName * cast(const ParentType *object)
Casts a object of type ParentType to a object of type ChildTypeName.
Definition NLCommon.hpp:94
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 NLCommon.hpp:38
static ChildTypeName & cast(ParentType &object)
Casts a object of type ParentType to a object of type ChildTypeName.
Definition NLCommon.hpp:58
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 NLCommon.hpp:50
static ChildTypeName * safeCast(ParentType *object)
Casts a object of type ParentType to a object of type ChildTypeName.
Definition NLCommon.hpp:106
Definition Application.hpp:19
BasicStringView< char > StringView
Narrow string view used for handling narrow encoded text in UTF-8.
Definition String.hpp:190
BasicString< char > String
Narrow string used for handling narrow encoded text in UTF-8.
Definition String.hpp:163
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Flags< GPUMemoryProperty > GPUMemoryProperties
Flag specifying properties for a memory type.
Definition Forward.hpp:103