plugify 1.0.0.0
Loading...
Searching...
No Matches
method.hpp
1#pragma once
2
3#include <span>
4#include <string>
5
6#include "handle.hpp"
7#include "value_type.hpp"
8#include "mem_addr.hpp"
9
10#include <plugify_export.h>
11
12namespace plugify {
13 struct EnumValue;
14 struct Enum;
15 struct Method;
16 struct Property;
17 class MethodHandle;
18
23 class PLUGIFY_API EnumValueHandle : public Handle<const EnumValue> {
24 using Handle::Handle;
25 public:
31 std::string_view GetName() const noexcept;
32
38 int64_t GetValue() const noexcept;
39 };
40
45 class PLUGIFY_API EnumHandle : public Handle<const Enum> {
46 using Handle::Handle;
47 public:
53 std::string_view GetName() const noexcept;
54
60 std::span<const EnumValueHandle> GetValues() const noexcept;
61 };
62
67 class PLUGIFY_API PropertyHandle : public Handle<const Property> {
68 using Handle::Handle;
69 public:
75 ValueType GetType() const noexcept;
76
82 bool IsReference() const noexcept;
83
90 MethodHandle GetPrototype() const noexcept;
91
98 EnumHandle GetEnum() const noexcept;
99 };
100
105 class PLUGIFY_API MethodHandle : public Handle<const Method> {
106 using Handle::Handle;
107 public:
113 std::string_view GetName() const noexcept;
114
120 std::string_view GetFunctionName() const noexcept;
121
127 std::string_view GetCallingConvention() const noexcept;
128
134 std::span<const PropertyHandle> GetParamTypes() const noexcept;
135
141 PropertyHandle GetReturnType() const noexcept;
142
148 uint8_t GetVarIndex() const noexcept;
149
171 MethodHandle FindPrototype(std::string_view name) const noexcept;
172 };
173
186
194 struct MethodTable {
195 bool hasUpdate{};
196 bool hasStart{};
197 bool hasEnd{};
198 bool hasExport{};
199 };
200
201} // namespace plugify
A handle class for the Enum structure.
Definition method.hpp:45
std::string_view GetName() const noexcept
Retrieves the enum name.
A handle class for an EnumValue structure.
Definition method.hpp:23
std::string_view GetName() const noexcept
Retrieves the enum value name.
A generic handle class that manages a pointer to an object of type T.
Definition handle.hpp:18
A wrapper class for memory addresses, providing utility functions for pointer manipulation.
Definition mem_addr.hpp:11
A handle class for the Method structure.
Definition method.hpp:105
std::string_view GetName() const noexcept
Retrieves the method name.
A handle class for the Property structure.
Definition method.hpp:67
ValueType GetType() const noexcept
Retrieves the value type of the property.
Represents data related to a plugin method.
Definition method.hpp:182
MethodHandle method
Handle representing the method.
Definition method.hpp:183
MemAddr addr
Pointer to the method's memory address.
Definition method.hpp:184
Represents a table of method availability flags.
Definition method.hpp:194