#pragma once #include #include #include #include class PluginManager { private: static bool unRegisterPlugin(std::string name); static bool loadPluginPackage(const std::string& dirPath, const std::string& packagePath, bool isHotLoad = false); public: static bool loadPlugin(const std::string& fileOrDirPath, bool isHotLoad = false, bool mustBeCurrectModule = false); static bool unloadPlugin(const std::string& name); static bool reloadPlugin(const std::string& name); static bool reloadAllPlugins(); static LL::Plugin* getPlugin(std::string name); static std::unordered_map getLocalPlugins(); static std::unordered_map getAllScriptPlugins(); static std::unordered_map getAllPlugins(); static std::string getPluginBackendType(const std::string &path); static bool registerPlugin(std::string filePath, std::string name, std::string desc, LL::Version version, std::map others); };