13#include "Refureku/TypeInfo/Archetypes/GetArchetype.h"
14#include "Refureku/Misc/CopyConstness.h"
15#include "Refureku/Misc/TypeTraits.h"
32 template <
typename TargetClassType,
typename SourceClassType>
33 RFK_NODISCARD TargetClassType*
dynamicCast(SourceClassType* instance)
noexcept;
47 template <
typename TargetClassType>
48 RFK_NODISCARD TargetClassType*
dynamicCast(
typename CopyConstness<TargetClassType, void>::Type* instance,
49 Struct const& instanceStaticArchetype,
50 Struct const& instanceDynamicArchetype,
51 Struct const& targetArchetype)
noexcept;
67 template <
typename TargetClassType>
68 RFK_NODISCARD TargetClassType*
dynamicUpCast(
typename CopyConstness<TargetClassType, void>::Type* instance,
69 Struct const& targetArchetype)
noexcept;
85 template <
typename TargetClassType>
86 RFK_NODISCARD TargetClassType*
dynamicDownCast(
typename CopyConstness<TargetClassType, void>::Type* instance,
87 Struct const& instanceStaticArchetype,
88 Struct const& targetArchetype)
noexcept;
102 RFK_NODISCARD REFUREKU_API
void*
dynamicCast(
void* instance,
103 Struct const& instanceStaticArchetype,
104 Struct const& instanceDynamicArchetype,
105 Struct const& targetArchetype)
noexcept;
118 RFK_NODISCARD REFUREKU_API
void const*
dynamicCast(
void const* instance,
119 Struct const& instanceStaticArchetype,
120 Struct const& instanceDynamicArchetype,
121 Struct const& targetArchetype)
noexcept;
134 RFK_NODISCARD REFUREKU_API
void*
dynamicUpCast(
void* instance,
135 Struct const& instanceStaticArchetype,
136 Struct const& targetArchetype)
noexcept;
150 RFK_NODISCARD REFUREKU_API
void const*
dynamicUpCast(
void const* instance,
151 Struct const& instanceStaticArchetype,
152 Struct const& targetArchetype)
noexcept;
166 Struct const& instanceStaticArchetype,
167 Struct const& targetArchetype)
noexcept;
181 RFK_NODISCARD REFUREKU_API
void const*
dynamicDownCast(
void const* instance,
182 Struct const& instanceStaticArchetype,
183 Struct const& targetArchetype)
noexcept;
186 #include "Refureku/TypeInfo/Cast.inl"
Definition: Allocator.h:16
RFK_NODISCARD TargetClassType * dynamicDownCast(typename CopyConstness< TargetClassType, void >::Type *instance, Struct const &instanceStaticArchetype, Struct const &targetArchetype) noexcept
Adjust the pointer of the provided instance of type instanceStaticArchetype to a pointer to a targetA...
RFK_NODISCARD TargetClassType * dynamicUpCast(typename CopyConstness< TargetClassType, void >::Type *instance, Struct const &targetArchetype) noexcept
Adjust the pointer of the provided instance of type instanceStaticArchetype to a pointer to a targetA...
RFK_NODISCARD TargetClassType * dynamicCast(SourceClassType *instance) noexcept
Adjust the provided pointer to another class pointer if possible.