A singleton that can be used to observe the available libraries in the system. More...
#include <LibraryManager.h>
Classes | |
class | Impl |
Public Member Functions | |
void | add (const std::string &id, const LibraryPtr &l) throw () |
It adds a new Library to be managed. More... | |
LibraryPtr | find (const std::string &name) throw () |
Returns a null pointer if a library doesnt't exist. More... | |
Static Public Member Functions | |
static LibraryManager & | getInstance () |
It returns a reference to the singleton instance. More... | |
Protected Member Functions | |
LibraryManager () | |
Consructor. More... | |
~LibraryManager () | |
Destructor. More... | |
Private Attributes | |
Impl * | m_pImpl |
A pointer to the real implementation. More... | |
Friends | |
class | Singleton< LibraryManager > |
A singleton that can be used to observe the available libraries in the system.
Definition at line 56 of file LibraryManager.h.
|
protected |
|
protected |
Destructor.
Definition at line 85 of file LibraryManager.cpp.
void te::common::LibraryManager::add | ( | const std::string & | id, |
const LibraryPtr & | l | ||
) | |||
throw | ( | ||
) |
It adds a new Library to be managed.
This implementaion will keep the library in the manager while there is at least someone pointing to it. As soon as no one keeps a reference to it the manager will be communicated and the library will not be available anymore.
id | An identifier used to search for the library in successive lookups. |
l | The library to be managed. |
Definition at line 69 of file LibraryManager.cpp.
Referenced by te::plugin::CppPluginEngine::load().
te::common::LibraryPtr te::common::LibraryManager::find | ( | const std::string & | name | ) | |
throw | ( | ||||
) |
Returns a null pointer if a library doesnt't exist.
name | The library name. |
Definition at line 74 of file LibraryManager.cpp.
|
staticinherited |
It returns a reference to the singleton instance.
Referenced by te::plugin::CppPluginEngine::load(), and te::common::Module::Module().
|
friend |
Definition at line 58 of file LibraryManager.h.
|
private |
A pointer to the real implementation.
Definition at line 95 of file LibraryManager.h.
Referenced by LibraryManager().