TSDuck v3.40-3963
MPEG Transport Stream Toolkit
|
A global repository of general-purpose base class for polymophic objects. More...
#include <tsObjectRepository.h>
Public Member Functions | |
void | erase (const UString &name) |
Erase an object from the repository. | |
ObjectPtr | retrieve (const UString &name) |
Get the safe pointer to an Object in the repository. | |
ObjectPtr | store (const UString &name, const ObjectPtr &value) |
Store a safe pointer to an Object (or typically a subclass thereof) in the repository. | |
Static Public Member Functions | |
static ObjectRepository & | Instance () |
Get the instance of the singleton of this class. | |
A global repository of general-purpose base class for polymophic objects.
The repository is a thread-safe singleton. It can be used as a central repository of user-defined objects which is shared by all modules, all plugins, all threads.
|
inlinestatic |
Get the instance of the singleton of this class.
Store a safe pointer to an Object (or typically a subclass thereof) in the repository.
[in] | name | Each stored pointer is associated to a name. |
[in] | value | Safe-pointer to the object to store. |
Get the safe pointer to an Object in the repository.
[in] | name | Name which is associated to the object. |
void ts::ObjectRepository::erase | ( | const UString & | name | ) |
Erase an object from the repository.
[in] | name | Name which is associated to the object to erase. |