An abstract class for plugin engines. More...
#include <CppPluginEngine.h>
Public Member Functions | |
CppPluginEngine () | |
AbstractPlugin * | load (const PluginInfo &pInfo) |
It try to create and load the informed plugin. More... | |
void | unload (AbstractPlugin *plugin) |
It try to unload the informed plugin. More... | |
~CppPluginEngine () | |
Destructor. More... | |
Static Public Member Functions | |
static std::string | getPluginFileName (const std::string &libName) |
This method will help to form the library name wich contains the plugin. More... | |
An abstract class for plugin engines.
A plugin engine for plugins written in C++.
For each kind of programming language there will be an specific engine capable of loading and preparing the plugin before the startup method is called.
,
Definition at line 50 of file CppPluginEngine.h.
te::plugin::CppPluginEngine::CppPluginEngine | ( | ) |
Default construtor.
Definition at line 48 of file CppPluginEngine.cpp.
|
inline |
Destructor.
Definition at line 58 of file CppPluginEngine.h.
|
static |
This method will help to form the library name wich contains the plugin.
This method may append a prefix and suffix that are platform dependent and also the build mode: DEBUG or RELEASE.
Definition at line 224 of file CppPluginEngine.cpp.
References te::common::Library::getNativeName().
|
virtual |
It try to create and load the informed plugin.
pInfo | The information needed to create and load the plugin. |
Exception | It throws an exception if the plugin can not be loaded. |
Implements te::plugin::AbstractPluginEngine.
Definition at line 52 of file CppPluginEngine.cpp.
References te::common::LibraryManager::add(), te::common::Singleton< LibraryManager >::getInstance(), te::plugin::PluginInfo::m_name, te::plugin::PluginInfo::m_resources, and TE_TR.
|
virtual |
It try to unload the informed plugin.
On success the informed plugin will be also destroyed and its pointer will be invalidated.
plugin | The plugin to be unloaded. |
Exception | It throws an exception if the plugin can not be unloaded. |
Implements te::plugin::AbstractPluginEngine.
Definition at line 217 of file CppPluginEngine.cpp.
References te::plugin::AbstractPlugin::getInfo(), and te::plugin::PluginInfo::m_engine.