23 using callback_t = bool(
Mod&);
24 using CallbackFn = std::function<callback_t>;
30 LLNDAPI State getState()
const;
32 LLNDAPI
Manifest const& getManifest()
const;
34 LLNDAPI std::string
const& getName()
const;
36 LLNDAPI std::string
const& getType()
const;
38 LLNDAPI std::filesystem::path
const& getModDir()
const;
40 LLNDAPI std::filesystem::path
const& getDataDir()
const;
42 LLNDAPI std::filesystem::path
const& getConfigDir()
const;
44 LLNDAPI std::filesystem::path
const& getLangDir()
const;
46 LLNDAPI std::filesystem::path
const& getResourceDir()
const;
48 LLNDAPI std::filesystem::path
const& getBehaviorDir()
const;
52 [[nodiscard]]
bool isEnabled()
const {
return getState() == State::Enabled; }
54 [[nodiscard]]
bool isDisabled()
const {
return getState() == State::Disabled; }
57 LLAPI
void onLoad(CallbackFn func)
noexcept;
59 LLAPI
void onUnload(CallbackFn func)
noexcept;
61 LLAPI
void onEnable(CallbackFn func)
noexcept;
63 LLAPI
void onDisable(CallbackFn func)
noexcept;
66 LLAPI
void release()
noexcept;
68 LLAPI
void setState(State state)
const;
71 LLNDAPI
bool hasOnLoad()
const noexcept;
73 LLNDAPI
bool hasOnUnload()
const noexcept;
75 LLNDAPI
bool hasOnEnable()
const noexcept;
77 LLNDAPI
bool hasOnDisable()
const noexcept;
80 LLAPI Expected<> onLoad()
noexcept;
82 LLAPI Expected<> onUnload()
noexcept;
84 LLAPI Expected<> onEnable()
noexcept;
86 LLAPI Expected<> onDisable()
noexcept;
92 std::unique_ptr<Impl> mImpl;