Debian Codegraph @

src/core/components/controls/controlgroupprofilepart.h

raw symbols SCIP
1 // SPDX-License-Identifier: GPL-3.0-or-later
2 // Copyright 2019 Juan Palacios <[email protected]>
3
4 #pragma once
5
6 #include "controlgroup.h"
7 #include "core/profilepart.h"
8 #include <memory>
9 #include <string>
10 #include <string_view>
11 #include <vector>
12
13 class ControlGroupProfilePart
14 : public ProfilePart
15 , public ControlGroup::Importer
16 {
17 public:
18 class Importer : public IProfilePart::Importer
19 {
20 };
21
22 class Exporter : public IProfilePart::Exporter
23 {
24 };
25
26 ControlGroupProfilePart(std::string_view id) noexcept;
27
28 std::unique_ptr<Exportable::Exporter>
29 factory(IProfilePartProvider const &profilePartProvider) final override;
30 std::unique_ptr<Exportable::Exporter> initializer() final override;
31
32 std::string const &ID() const final override;
33
34 std::optional<std::reference_wrapper<Importable::Importer>>
35 provideImporter(Item const &i) final override;
36
37 bool provideActive() const final override;
38
39 protected:
40 void importProfilePart(IProfilePart::Importer &i) final override;
41 void exportProfilePart(IProfilePart::Exporter &e) const final override;
42 std::unique_ptr<IProfilePart> cloneProfilePart() const final override;
43
44 virtual std::unique_ptr<ControlGroupProfilePart> instance() const = 0;
45
46 private:
47 class Factory;
48 class Initializer;
49
50 std::vector<std::unique_ptr<IProfilePart>> parts_;
51 std::string const id_;
52 };