22 void* _address =
nullptr;
29template <
class Ret,
class... Args>
41 return std::bit_cast<
Ret (*)(Args...)>(_address)(std::forward<Args>(
args)...);
45 void* _address =
nullptr;
53template <
class Ret,
class Object,
class... Args>
67 return std::bit_cast<
Ret (*)(
Object*, Args...)>(
vtable[_index])(
object, std::forward<Args>(
args)...);
72 void* _table =
nullptr;
89 if (_value >= 0 && base)
91 std::memcpy(&
out,
static_cast<const uint8_t*
>(base) + _value,
sizeof(
T));
96 void Write(
void* base,
const T& value)
const
98 if (_value >= 0 && base)
100 std::memcpy(
static_cast<uint8_t*
>(base) + _value, &value,
sizeof(
T));
119 const void*
Ptr(
const void* base)
const
121 if (_value < 0 || !base)
125 return static_cast<const uint8_t*
>(base) + _value;
void * Ptr() const noexcept
Address(void *address) noexcept
Ret operator()(Args... args) const
void * Ptr() const noexcept
Fn(void *address) noexcept
constexpr Offset(int value) noexcept
const void * Ptr(const void *base) const
constexpr int Value() const noexcept
constexpr int Value() const noexcept
constexpr Offset(int value) noexcept
T Read(const void *base) const
void Write(void *base, const T &value) const
VirtualFn(int index, void *table) noexcept
void * Table() const noexcept
Ret operator()(Object *object, Args... args) const
int Index() const noexcept
static std::string ReadFile(const std::filesystem::path &path)