13#include "Refureku/TypeInfo/Cast.h"
14#include "Refureku/TypeInfo/MethodFieldHelpers.h"
15#include "Refureku/TypeInfo/Archetypes/Struct.h"
16#include "Refureku/TypeInfo/Functions/MethodBase.h"
17#include "Refureku/TypeInfo/Functions/MemberFunction.h"
18#include "Refureku/Misc/CopyConstness.h"
19#include "Refureku/Exceptions/InvalidArchetype.h"
26 REFUREKU_INTERNAL
Method(
char const* name,
28 Type const& returnType,
31 Entity const* outerEntity)
noexcept;
33 REFUREKU_INTERNAL
~Method()
noexcept;
56 template <
typename ReturnType = void,
typename CallerType,
typename... ArgTypes,
typename = internal::IsAdjustableInstance<CallerType>>
57 ReturnType
invoke(CallerType& caller, ArgTypes&&... args)
const;
82 template <
typename ReturnType = void,
typename... ArgTypes>
108 template <
typename ReturnType = void,
typename... ArgTypes>
137 template <
typename ReturnType = void,
typename CallerType,
typename... ArgTypes,
typename = internal::IsAdjustableInstance<CallerType>>
170 template <
typename ReturnType = void,
typename... ArgTypes>
203 template <
typename ReturnType = void,
typename... ArgTypes>
216 template <typename FunctionPrototype>
217 class MemberFunctionSafeCallWrapper;
219 template <typename ReturnType, typename... ArgTypes>
220 class MemberFunctionSafeCallWrapper<ReturnType(ArgTypes...)>
223 template <
typename T>
224 using PointerToMemberMethod = ReturnType (T::*)(ArgTypes...);
227 MemberFunctionSafeCallWrapper() =
delete;
241 template <
typename T,
typename = std::enable_if_t<std::is_same_v<T,
void> || std::is_same_v<T,
void const>>>
258 template <
typename ReturnType,
typename... ArgTypes>
259 ReturnType internalInvoke(
void* caller,
260 ArgTypes&&... args)
const;
261 template <
typename ReturnType,
typename... ArgTypes>
262 ReturnType internalInvoke(
void const* caller,
263 ArgTypes&&... args)
const;
276 template <
typename CallerType>
277 RFK_NODISCARD CallerType* adjustCallerPointerAddress(CallerType* caller)
const;
284 RFK_NORETURN REFUREKU_API
void throwConstViolationException()
const;
290 #include "Refureku/TypeInfo/Functions/Method.inl"
Definition: Allocator.h:19
Definition: ICallable.h:13
Definition: MethodBase.h:16
ReturnType invoke(CallerType &caller, ArgTypes &&... args) const
Call the function with the forwarded argument(s) if any, and return the result. Providing bad return ...
ReturnType checkedInvokeUnsafe(void *caller, ArgTypes &&... args) const
Call the function with the forwarded argument(s) if any, and return the result. The return type and a...
ReturnType checkedInvoke(CallerType &caller, ArgTypes &&... args) const
Call the function with the forwarded argument(s) if any, and return the result. The return type and a...
ReturnType invokeUnsafe(void const *caller, ArgTypes &&... args) const
Call the function with the forwarded argument(s) if any, and return the result. Providing bad return ...
REFUREKU_API void inheritBaseMethodProperties() noexcept
Inherit from the properties this method overrides. If the method is not an override,...
ReturnType invokeUnsafe(void *caller, ArgTypes &&... args) const
Call the function with the forwarded argument(s) if any, and return the result. Providing bad return ...
ReturnType checkedInvokeUnsafe(void const *caller, ArgTypes &&... args) const
Call the function with the forwarded argument(s) if any, and return the result. The return type and a...
Definition: Allocator.h:16
EMethodFlags
Definition: EMethodFlags.h:17