16 #ifndef __TY_PLUGINMANAGER__
17 #define __TY_PLUGINMANAGER__
23 #include <qstringlist.h>
30 #if TY_COMPILER == TY_COMPILER_MSVC
31 #define LIB_HANDLE hInstance
32 #define LIB_LOAD(a) LoadLibraryA(a)
33 #define LIB_GETSYM(a, b) GetProcAddress(a, b)
34 #define LIB_UNLOAD(a) FreeLibrary(a)
40 #define LIB_HANDLE void*
41 #define LIB_LOAD(a) dlopen(a, RTLD_LAZY | RTLD_LOCAL)
42 #define LIB_GETSYM(a, b) dlsym(a, b)
43 #define LIB_UNLOAD(a) dlclose(a)
71 #define DEFAULT_SOLVER_UUID "{A98B320C-44C4-47a9-B689-1DD352DAA8B2}"
143 QString
getInfo(
const QString& info,
const OGenID& uuid)
const;
152 bool exist(
const QString& solverName);
struct HINSTANCE__ * hInstance
void(* TYPGStartPlugin)()
SmartPtr< TYPluginManager > LPTYPluginManager
Plugin *(* TYPGGetPlugin)()
Interface class for solvers.
bool exist(const OGenID &uuid)
OGenID solverID(const QString &solverName)
bool loadPlugins(const QString &directory)
Load, check, create and start plugins.
static LPTYPluginManager _pInstance
QString getInfo(const QString &info, const OGenID &uuid) const
Retourne une info spécifique du solveur.
TYPluginList & getPluginList()
void createPlugins(const QFileInfoList &file_list)
Create TYPluginData related to library files to load.
std::list< TYPluginData * > TYPluginList
bool startPlugin(TYPluginData *plugin_data)
Check the loaded plugin.
Plugin * getPlugin(const OGenID &uuid) const
SolverInterface * getSolver(const OGenID &uuid) const
QFileInfoList getPluginFileList(const QDir &directory) const
Get the list of dynamic library files to load.
void getInfos(pluginInfos *pInfos, const OGenID &uuid) const
static LPTYPluginManager get()
OGenID solver_id(std::string name)
Return the id of the solver named name (a previous call to tympan::load_solvers() is.
SolverInterface * select_solver(OGenID uuid)
Select a solver amongst the loaded solvers (a previous call to tympan::load_solvers() is.
void load_solvers(const char *path)
Load the solver plugins found in path
TYPGStopPlugin stopPlugin
TYPGStartPlugin startPlugin
LIB_HANDLE pluginDllInstance