![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
Singleton registry for discovering output producers by format. More...
#include <outputproducerregistry.h>
Public Member Functions | |
| void | registerProducer (IOutputProducer *producer) |
| Registers producer with this registry. | |
| void | unregisterProducer (IOutputProducer *producer) |
| Unregisters producer from this registry. | |
| IOutputProducer * | producerForFormat (const QString &format) const |
| Returns the producer registered for format, or nullptr if none. | |
| QList< IOutputProducer * > | allProducers () const |
| Returns all registered producers in unspecified order. | |
Static Public Member Functions | |
| static OutputProducerRegistry & | instance () |
| Returns the singleton registry instance. | |
Singleton registry for discovering output producers by format.
Definition at line 15 of file outputproducerregistry.h.
|
nodiscard |
Returns all registered producers in unspecified order.
Definition at line 79 of file outputproducerregistry.cpp.
|
static |
Returns the singleton registry instance.
Definition at line 21 of file outputproducerregistry.cpp.
|
nodiscard |
Returns the producer registered for format, or nullptr if none.
The format comparison is case-sensitive.
Definition at line 71 of file outputproducerregistry.cpp.
| void OutputProducerRegistry::registerProducer | ( | IOutputProducer * | producer | ) |
Registers producer with this registry.
The producer is indexed by its format() identifier, which is case-sensitive (see IOutputProducer::format()). If a producer with the same format is already registered, it will be replaced.
The format identifier must remain constant for the lifetime of the producer; changing it after registration may prevent successful unregistration.
Definition at line 40 of file outputproducerregistry.cpp.
| void OutputProducerRegistry::unregisterProducer | ( | IOutputProducer * | producer | ) |
Unregisters producer from this registry.
The producer is only removed if it is currently the registered producer for its format. This prevents a replaced producer from accidentally unregistering its replacement during destruction.
Definition at line 57 of file outputproducerregistry.cpp.