#pragma once #include "include/llapi/Global.h" #include #include #include namespace LL { struct Plugin; struct Version; class PluginManager { static bool callEventAtHotLoad(std::string pluginName); static bool callEventAtHotUnload(std::string pluginName); public: static LIAPI bool registerPlugin(HMODULE handle, std::string name, std::string desc, LL::Version version, std::map others); static LIAPI LL::Plugin* getPlugin(HMODULE handle); static LIAPI LL::Plugin* getPlugin(std::string name, bool includeScriptPlugin = true); static LIAPI bool hasPlugin(std::string name, bool includeScriptPlugin = true); static LIAPI std::unordered_map getAllPlugins(bool includeScriptPlugin = true); static bool loadPlugin(std::string pluginFilePath, bool outputStatus = false, bool isHotLoad = false); static bool unloadPlugin(std::string pluginName, bool outputStatus = false); static bool reloadPlugin(std::string pluginName, bool outputStatus = false); static int reloadAllPlugins(bool outputStatus = false); static LIAPI bool unRegisterPlugin(std::string name); }; } // namespace LL LIAPI bool RegisterPlugin(HMODULE handle, std::string name, std::string desc, LL::Version version, std::map others);