plugify 1.0.0.0
Loading...
Searching...
No Matches
method.hpp
1#pragma once
2
3#include <optional>
4#include <plugify/reference_wrapper.hpp>
5#include <plugify/value_type.hpp>
6#include <plugify_export.h>
7#include <span>
8#include <string>
9
10namespace plugify {
11 struct EnumValue;
12 struct Enum;
13 struct Method;
14 struct Property;
15 class MethodRef;
16
24 class PLUGIFY_API EnumValueRef : public Ref<const EnumValue> {
25 using Ref::Ref;
26 public:
32 std::string_view GetName() const noexcept;
33
39 int64_t GetValue() const noexcept;
40 };
41 static_assert(is_ref_v<EnumValueRef>);
42
49 class PLUGIFY_API EnumRef : public Ref<const Enum> {
50 using Ref::Ref;
51 public:
57 std::string_view GetName() const noexcept;
58
64 std::span<const EnumValueRef> GetValues() const noexcept;
65 };
66 static_assert(is_ref_v<EnumRef>);
67
75 class PLUGIFY_API PropertyRef : public Ref<const Property> {
76 using Ref::Ref;
77 public:
83 ValueType GetType() const noexcept;
84
90 bool IsReference() const noexcept;
91
98 std::optional<MethodRef> GetPrototype() const noexcept;
99
106 std::optional<EnumRef> GetEnum() const noexcept;
107 };
108 static_assert(is_ref_v<PropertyRef>);
109
118 class PLUGIFY_API MethodRef : public Ref<const Method> {
119 using Ref::Ref;
120 public:
126 std::string_view GetName() const noexcept;
127
133 std::string_view GetFunctionName() const noexcept;
134
140 std::string_view GetCallingConvention() const noexcept;
141
147 std::span<const PropertyRef> GetParamTypes() const noexcept;
148
154 PropertyRef GetReturnType() const noexcept;
155
161 uint8_t GetVarIndex() const noexcept;
162
184 std::optional<MethodRef> FindPrototype(std::string_view name) const noexcept;
185 };
186 static_assert(is_ref_v<MethodRef>);
187
188
189} // namespace plugify
A reference class for the Enum structure.
Definition method.hpp:49
std::string_view GetName() const noexcept
< Inherit constructors from Ref<const Enum>.
A reference class for an EnumValue structure.
Definition method.hpp:24
std::string_view GetName() const noexcept
< Inherit constructors from Ref<const EnumValue>.
A reference class for the Method structure.
Definition method.hpp:118
std::string_view GetName() const noexcept
< Inherit constructors from Ref<const Method>.
A reference class for the Property structure.
Definition method.hpp:75
ValueType GetType() const noexcept
< Inherit constructors from Ref<const Property>.
A lightweight reference wrapper for objects of type T.