|
rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
|
Stores a single instance of each type service_manager. More...
#include <rexlib/core/service_catalog.hpp>
Public Member Functions | |
| service_catalog (bool register_builtin_backends=true) | |
| Construct a new interface catalog object. | |
| service_catalog (const service_catalog &other)=delete | |
| service_catalog (service_catalog &&other) noexcept | |
| service_catalog & | operator= (const service_catalog &other)=delete |
| service_catalog & | operator= (service_catalog &&other) noexcept |
| template<typename T > | |
| std::shared_ptr< T > | get_service_manager () |
| Retrieve the unique instance of a concrete service_manager. | |
Stores a single instance of each type service_manager.
The interface catalog allows to centralize interface managers.
Construct a new interface catalog object.
| register_builtin_backends | This parameters controls whether the interface catalog should load the backends bundled with the core. |
Retrieve the unique instance of a concrete service_manager.
Always returns the same instance of T held by this catalog, constructing it on first access, so within a given catalog the returned pointer behaves like a singleton. These are not true singletons: the uniqueness is scoped to the owning service_catalog rather than to the whole process, which keeps service_manager instances out of global state.
| T | Concrete type derived from service_manager to retrieve. |
T. Never null.