LeviLamina
Loading...
Searching...
No Matches
NativeMod.h
1#pragma once
2
3#include <memory>
4#include <string_view>
5
6#include "ll/api/base/Macro.h"
7#include "ll/api/mod/Manifest.h"
8#include "ll/api/mod/Mod.h"
9#include "ll/api/utils/SystemUtils.h"
10
11namespace ll::mod {
12
13class NativeModManager;
14[[maybe_unused]] constexpr std::string_view NativeModManagerName = "native";
15
16class NativeMod : public Mod {
17 friend NativeModManager;
18 struct Impl;
19 std::unique_ptr<Impl> mImpl;
20
21protected:
22 sys_utils::DynamicLibrary& getDynamicLibrary();
23
24public:
25 NativeMod(Manifest manifest, sys_utils::HandleT handle = nullptr);
26 ~NativeMod();
27
28 LLNDAPI sys_utils::HandleT getHandle() const;
29
30 LLNDAPI static std::shared_ptr<NativeMod> getByHandle(sys_utils::HandleT handle);
31
32 LLNDAPI static std::shared_ptr<NativeMod> current(sys_utils::HandleT handle = sys_utils::getCurrentModuleHandle());
33};
34
35} // namespace ll::mod
Definition Mod.h:17
Definition NativeMod.h:16
Definition Manifest.h:31