rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
service_catalog.hpp
1// SPDX-License-Identifier: GPL-3.0-only
2
3#pragma once
4
5#include "service_manager.hpp"
6#include "platform/dynamic_shared_object.h"
7
8#include <memory>
9#include <typeindex>
10#include <type_traits>
11
12namespace rexlib
13{
14
23{
24public:
33 explicit service_catalog(bool register_builtin_backends = true);
34 service_catalog(const service_catalog &other) = delete;
37
38 service_catalog &operator=(const service_catalog &other) = delete;
40 service_catalog &operator=(service_catalog &&other) noexcept;
41
57 template <typename T>
58 std::shared_ptr<T> get_service_manager();
59
60private:
61 class implementation;
62 std::unique_ptr<implementation> m_implementation;
63
65 std::shared_ptr<service_manager> get_service_manager(std::type_index key);
66
68 void create_service_manager(
69 std::type_index key,
70 std::shared_ptr<service_manager> manager
71 );
72};
73
74} // namespace rexlib
75
76#include "service_catalog.inl"
Container for multidimensional numeric data.
Definition array.hpp:31
Stores a single instance of each type service_manager.
Definition service_catalog.hpp:23
std::shared_ptr< T > get_service_manager()
Retrieve the unique instance of a concrete service_manager.
service_catalog(bool register_builtin_backends=true)
Construct a new interface catalog object.
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10