Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
TYPluginManager Class Reference

#include <TYPluginManager.h>

Inheritance diagram for TYPluginManager:
Inheritance graph
[legend]
Collaboration diagram for TYPluginManager:
Collaboration graph
[legend]

Public Types

typedef std::list< TYPluginData * > TYPluginList
 

Public Member Functions

 TYPluginManager ()
 
 ~TYPluginManager ()
 
bool setAsSingleton ()
 
QFileInfoList getPluginFileList (const QDir &directory) const
 Get the list of dynamic library files to load. More...
 
void createPlugins (const QFileInfoList &file_list)
 Create TYPluginData related to library files to load. More...
 
bool startPlugin (TYPluginData *plugin_data)
 Check the loaded plugin. More...
 
bool loadPlugins (const QString &directory)
 Load, check, create and start plugins. More...
 
void unloadPlugins ()
 
PlugingetPlugin (const OGenID &uuid) const
 
SolverInterfacegetSolver (const OGenID &uuid) const
 
void getInfos (pluginInfos *pInfos, const OGenID &uuid) const
 
QString getInfo (const QString &info, const OGenID &uuid) const
 Retourne une info spécifique du solveur. More...
 
TYPluginListgetPluginList ()
 
bool exist (const OGenID &uuid)
 
bool exist (const QString &solverName)
 
OGenID solverID (const QString &solverName)
 
- Public Member Functions inherited from IRefCount
 IRefCount ()
 
virtual ~IRefCount ()
 
virtual int incRef ()
 
virtual int decRef ()
 
int getRefCount () const
 

Static Public Member Functions

static LPTYPluginManager get ()
 

Private Attributes

TYPluginList _plugins
 

Static Private Attributes

static LPTYPluginManager _pInstance = 0
 

Additional Inherited Members

- Protected Attributes inherited from IRefCount
int m_refCount
 The reference counter. More...
 

Detailed Description

Definition at line 73 of file TYPluginManager.h.

Member Typedef Documentation

◆ TYPluginList

Definition at line 77 of file TYPluginManager.h.

Constructor & Destructor Documentation

◆ TYPluginManager()

TYPluginManager::TYPluginManager ( )

Constructeur par default.

Definition at line 34 of file TYPluginManager.cpp.

Here is the caller graph for this function:

◆ ~TYPluginManager()

TYPluginManager::~TYPluginManager ( )

Destructeur.

Definition at line 36 of file TYPluginManager.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ createPlugins()

void TYPluginManager::createPlugins ( const QFileInfoList &  file_list)

Create TYPluginData related to library files to load.

Create a TYPluginData for each library file and update the list _plugins.

Parameters
file_listList of files to load.

Definition at line 68 of file TYPluginManager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exist() [1/2]

bool TYPluginManager::exist ( const OGenID uuid)

Definition at line 244 of file TYPluginManager.cpp.

Here is the caller graph for this function:

◆ exist() [2/2]

bool TYPluginManager::exist ( const QString &  solverName)

Definition at line 257 of file TYPluginManager.cpp.

◆ get()

LPTYPluginManager TYPluginManager::get ( )
static

Retourne l'instance singleton.

Definition at line 48 of file TYPluginManager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getInfo()

QString TYPluginManager::getInfo ( const QString &  info,
const OGenID uuid 
) const

Retourne une info spécifique du solveur.

Definition at line 217 of file TYPluginManager.cpp.

Here is the call graph for this function:

◆ getInfos()

void TYPluginManager::getInfos ( pluginInfos pInfos,
const OGenID uuid 
) const

Definition at line 208 of file TYPluginManager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPlugin()

Plugin * TYPluginManager::getPlugin ( const OGenID uuid) const

Definition at line 197 of file TYPluginManager.cpp.

Here is the caller graph for this function:

◆ getPluginFileList()

QFileInfoList TYPluginManager::getPluginFileList ( const QDir &  directory) const

Get the list of dynamic library files to load.

These files are different available solvers.

Parameters
directoryThe directory where there are the library files.
Returns
The list of the dynamic library files.

Definition at line 58 of file TYPluginManager.cpp.

Here is the caller graph for this function:

◆ getPluginList()

TYPluginManager::TYPluginList & TYPluginManager::getPluginList ( )

Definition at line 239 of file TYPluginManager.cpp.

◆ getSolver()

SolverInterface * TYPluginManager::getSolver ( const OGenID uuid) const

Definition at line 189 of file TYPluginManager.cpp.

Here is the call graph for this function:

◆ loadPlugins()

bool TYPluginManager::loadPlugins ( const QString &  directory)

Load, check, create and start plugins.

Parameters
directoryPath to the dynamic library files (aka plugins) to load.

Definition at line 140 of file TYPluginManager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAsSingleton()

bool TYPluginManager::setAsSingleton ( )

Definit cette instance comme singleton. Attention : cette instance doit absolument avoir ete creee sur la heap (operateur new).

Returns
Indique si un singleton etait deja defini ou pas.

Definition at line 41 of file TYPluginManager.cpp.

Here is the caller graph for this function:

◆ solverID()

OGenID TYPluginManager::solverID ( const QString &  solverName)

Definition at line 270 of file TYPluginManager.cpp.

◆ startPlugin()

bool TYPluginManager::startPlugin ( TYPluginData plugin_data)

Check the loaded plugin.

Check if the loaded object has the good methods.

Parameters
plugin_dataThe Plugin data related to the plugin to create.
Returns
Start with success?

Definition at line 123 of file TYPluginManager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unloadPlugins()

void TYPluginManager::unloadPlugins ( )

Definition at line 175 of file TYPluginManager.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ _pInstance

LPTYPluginManager TYPluginManager::_pInstance = 0
staticprivate

Definition at line 161 of file TYPluginManager.h.

◆ _plugins

TYPluginList TYPluginManager::_plugins
private

Definition at line 158 of file TYPluginManager.h.


The documentation for this class was generated from the following files: