21 mXmlPluginTagName(
"Plugin"),
22 mSingletonHolder(this)
46 mIsInitialise =
false;
60 MYGUI_LOG(Error,
"Plugin '" << _file <<
"' not found");
68 MYGUI_LOG(Error,
"Cannot find symbol 'dllStartPlugin' in library " << _file);
85 DynLibList::iterator it = mLibs.find(_file);
86 if (it != mLibs.end())
112 else if (node->
getName() ==
"Plugin")
117 while (source_node.next(
"Source"))
120#if MYGUI_DEBUG_MODE == 1
121 if (build ==
"Debug")
122 source = source_node->getContent();
124 if (build !=
"Debug")
125 source = source_node->getContent();
140 mPlugins.insert(_plugin);
145 MYGUI_LOG(Info,
"Plugin successfully installed");
153 PluginList::iterator it = mPlugins.find(_plugin);
154 if (it != mPlugins.end())
160 MYGUI_LOG(Info,
"Plugin successfully uninstalled");
165 while (!mLibs.empty())
#define MYGUI_ASSERT(exp, dest)
#define MYGUI_LOG(level, text)
Resource holding data about a dynamic library.
void * getSymbol(const std::string &strName) const noexcept
void unload(DynLib *library)
Unload library.
DynLib * load(const std::string &fileName)
Load library.
static DynLibManager & getInstance()
virtual void initialize()=0
virtual const std::string & getName() const =0
virtual void shutdown()=0
virtual void uninstall()=0
Plugin manager. Load/unload and register plugins.
void unloadPlugin(const std::string &_file)
Unload plugin.
void installPlugin(IPlugin *_plugin)
void uninstallPlugin(IPlugin *_plugin)
void unloadAllPlugins()
Unload all plugins.
bool loadPlugin(const std::string &_file)
Load plugin.
static const char * getClassTypeName()
void unregisterLoadXmlDelegate(const std::string &_key)
static ResourceManager & getInstance()
LoadXmlDelegate & registerLoadXmlDelegate(const std::string &_key)
ElementEnumerator getElementEnumerator()
const std::string & getName() const
bool findAttribute(const std::string &_name, std::string &_value)
void(*)() DLL_START_PLUGIN
delegates::DelegateFunction< Args... > * newDelegate(void(*_func)(Args... args))
MYGUI_SINGLETON_DEFINITION(ClipboardManager)
void(*)() DLL_STOP_PLUGIN