A singleton that can be used to observe the available libraries in the system. More...
#include <LibraryManager.h>
Public Member Functions | |
bool | exists (const std::string &name) |
Checks if a LibraryEntry exists from a given name. More... | |
const LibraryEntry & | get (const std::string &name) |
Return a null pointer if a library doesnt't exist. More... | |
void | insert (const LibraryEntry &entry) |
It inserts a LibraryEntry to the manager. More... | |
bool | isInitialized (const std::string &name) |
The current state of the LibraryEntry. More... | |
void | remove (const std::string &name) |
It removes a LibraryEntry from the manager. More... | |
Static Public Member Functions | |
static LibraryManager & | instance () |
It returns a reference to the singleton instance. More... | |
Protected Member Functions | |
LibraryManager () | |
Singleton constructor must be private or protected. More... | |
LibraryManager (const LibraryManager &) | |
LibraryManager & | operator= (const LibraryManager &) |
~LibraryManager () | |
Singleton destructor must be private or protected. More... | |
Private Attributes | |
Impl * | m_pimpl |
A singleton that can be used to observe the available libraries in the system.
This singleton doesn't control the libraries lifetime, it just make smart references to them. These references will be automatically removed when a library goes out of scope (or been destroyed). Actually it works like an observer of known libraries.
Definition at line 79 of file LibraryManager.h.
|
protected |
Singleton constructor must be private or protected.
|
protected |
Singleton destructor must be private or protected.
|
protected |
bool te::core::LibraryManager::exists | ( | const std::string & | name | ) |
Checks if a LibraryEntry exists from a given name.
name | The name of the LibraryEntry |
const LibraryEntry& te::core::LibraryManager::get | ( | const std::string & | name | ) |
Return a null pointer if a library doesnt't exist.
name | The LibraryEntry name. |
te::OutOfRangeException | If a LibraryEntry with the given name is not registered. |
void te::core::LibraryManager::insert | ( | const LibraryEntry & | entry | ) |
It inserts a LibraryEntry to the manager.
entry | LibraryEntry to be managed. |
te::InvalidArgumentException | If a LibraryEntry with the given name is already registered. |
|
static |
It returns a reference to the singleton instance.
bool te::core::LibraryManager::isInitialized | ( | const std::string & | name | ) |
The current state of the LibraryEntry.
name | The name of the LibraryEntry. |
te::OutOfRangeException | If a LibraryEntry with the given name is not registered. |
|
protected |
void te::core::LibraryManager::remove | ( | const std::string & | name | ) |
It removes a LibraryEntry from the manager.
name | The name of the LibraryEntry. |
te::OutOfRangeException | If a LibraryEntry with the given name is not registered., |
te::Exception | If trying to remove a initialized library. |
|
private |
Definition at line 154 of file LibraryManager.h.