Refureku v2.2.0
C++17 runtime reflection library.
StaticMethod.h
1
8#pragma once
9
10#include "Refureku/TypeInfo/Functions/MethodBase.h"
11#include "Refureku/TypeInfo/Functions/NonMemberFunction.h"
12
13namespace rfk
14{
15 class StaticMethod final : public MethodBase
16 {
17 public:
18 REFUREKU_API StaticMethod(char const* name,
19 std::size_t id,
20 Type const& returnType,
21 ICallable* internalMethod,
22 EMethodFlags flags,
23 Entity const* outerEntity) noexcept;
24 REFUREKU_INTERNAL StaticMethod(StaticMethod&&) noexcept;
25 REFUREKU_API ~StaticMethod() noexcept;
26
43 template <typename ReturnType = void, typename... ArgTypes>
44 ReturnType invoke(ArgTypes&&... args) const;
45
68 template <typename ReturnType = void, typename... ArgTypes>
69 ReturnType checkedInvoke(ArgTypes&&... args) const;
70
71 private:
72 //Forward declaration
73 class StaticMethodImpl;
74
85 template <typename ReturnType, typename... ArgTypes>
86 ReturnType internalInvoke(ArgTypes&&... args) const;
87 };
88
89 REFUREKU_TEMPLATE_API(rfk::Allocator<StaticMethod const*>);
90 REFUREKU_TEMPLATE_API(rfk::Vector<StaticMethod const*, rfk::Allocator<StaticMethod const*>>);
91
92 #include "Refureku/TypeInfo/Functions/StaticMethod.inl"
93}
Definition: Allocator.h:19
Definition: Entity.h:29
Definition: ICallable.h:13
Definition: MethodBase.h:16
Definition: StaticMethod.h:16
ReturnType checkedInvoke(ArgTypes &&... args) const
Call the function with the forwarded argument(s) if any, and return the result. The return type and a...
ReturnType invoke(ArgTypes &&... args) const
Call the function with the forwarded argument(s) if any, and return the result. Providing bad return ...
Definition: Type.h:20
Definition: Vector.h:19
Definition: Allocator.h:16
EMethodFlags
Definition: EMethodFlags.h:17