| 1 | // SPDX-License-Identifier: GPL-3.0-or-latercxx . . $ `<file>/src/core/profilepart.h`/ |
| 2 | // Copyright 2019 Juan Palacios <[email protected]> |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include "exportable.h"cxx . . $ `<file>/src/core/exportable.h`/ |
| 7 | #include "iprofilepart.h"cxx . . $ `<file>/src/core/iprofilepart.h`/ |
| 8 | #include "iprofilepartprovider.h"cxx . . $ `<file>/src/core/iprofilepartprovider.h`/ |
| 9 | #include <functional> |
| 10 | #include <memory> |
| 11 | #include <optional> |
| 12 | #include <string> |
| 13 | #include <vector> |
| 14 | |
| 15 | class ProfilePartcxx . . $ ProfilePart# : public IProfilePartcxx . . $ IProfilePart# |
| 16 | { |
| 17 | public: |
| 18 | ProfilePartcxx . . $ ProfilePart#ProfilePart(49f6e7a06ebc5aa8).() = default; |
| 19 | ProfilePartcxx . . $ ProfilePart#ProfilePart(1050b240cb008c8f).(ProfilePartcxx . . $ ProfilePart# const &) = delete; |
| 20 | ProfilePartcxx . . $ ProfilePart# &operatorcxx . . $ ProfilePart#`operator=`(636254733be8112e).=(ProfilePartcxx . . $ ProfilePart# const &) = delete; |
| 21 | |
| 22 | bool activecxx . . $ ProfilePart#active(50ce9a9e25b4a850).() const final override; |
| 23 | void activatecxx . . $ ProfilePart#activate(b45ddcbc8423892c).(bool active) final override; |
| 24 | |
| 25 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfilePartcxx . . $ IProfilePart#> clonecxx . . $ ProfilePart#clone(1378fcc1caef3e7b).() const final override; |
| 26 | |
| 27 | void importWithcxx . . $ ProfilePart#importWith(94eddebf9440278).(Importablecxx . . $ Importable#::Importercxx . . $ Importable#Importer# &i) final override; |
| 28 | void exportWithcxx . . $ ProfilePart#exportWith(5b5c94ff60635419).(Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter# &e) const final override; |
| 29 | |
| 30 | class Factorycxx . . $ ProfilePart#Factory# |
| 31 | { |
| 32 | public: |
| 33 | Factorycxx . . $ ProfilePart#Factory#Factory(d795475d23b535dc).(IProfilePartProvidercxx . . $ IProfilePartProvider# const &profilePartProvider) noexcept; |
| 34 | |
| 35 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::reference_wrappercxx . . $ std/reference_wrapper#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#>> |
| 36 | factorycxx . . $ ProfilePart#Factory#factory(f4c9227945a043b8).(stdcxx . . $ std/::stringcxx . . $ std/string# const &componentID); |
| 37 | |
| 38 | virtual void takeProfilePartcxx . . $ ProfilePart#Factory#takeProfilePart(8c7717026cb6ec4).(stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfilePartcxx . . $ IProfilePart#> &&part) = 0; |
| 39 | virtual ~cxx . . $ ProfilePart#Factory#`~Factory`(ced63f7c635d850d).Factorycxx . . $ ProfilePart#Factory#() = default; |
| 40 | |
| 41 | protected: |
| 42 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfilePartcxx . . $ IProfilePart#> createPartcxx . . $ ProfilePart#Factory#createPart(eebc246fe191e829).(stdcxx . . $ std/::stringcxx . . $ std/string# const &componentID) const; |
| 43 | |
| 44 | private: |
| 45 | IProfilePartProvidercxx . . $ IProfilePartProvider# const &profilePartProvider_cxx . . $ ProfilePart#Factory#profilePartProvider_.; |
| 46 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#>> factories_cxx . . $ ProfilePart#Factory#factories_.; |
| 47 | }; |
| 48 | |
| 49 | protected: |
| 50 | virtual void importProfilePartcxx . . $ ProfilePart#importProfilePart(d62b6a6dfe9fe695).(IProfilePartcxx . . $ IProfilePart#::Importercxx . . $ IProfilePart#Importer# &i) = 0; |
| 51 | virtual void exportProfilePartcxx . . $ ProfilePart#exportProfilePart(702e13e8794d0da4).(IProfilePartcxx . . $ IProfilePart#::Exportercxx . . $ IProfilePart#Exporter# &e) const = 0; |
| 52 | virtual stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfilePartcxx . . $ IProfilePart#> cloneProfilePartcxx . . $ ProfilePart#cloneProfilePart(1378fcc1caef3e7b).() const = 0; |
| 53 | |
| 54 | private: |
| 55 | bool active_cxx . . $ ProfilePart#active_.{true}; |
| 56 | }; |