| 1 | // SPDX-License-Identifier: GPL-3.0-or-latercxx . . $ `<file>/src/core/iprofile.h`/ |
| 2 | // Copyright 2019 Juan Palacios <[email protected]> |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include "core/exportable.h"cxx . . $ `<file>/src/core/exportable.h`/ |
| 7 | #include "core/importable.h"cxx . . $ `<file>/src/core/importable.h`/ |
| 8 | #include "core/item.h"cxx . . $ `<file>/src/core/item.h`/ |
| 9 | #include <memory> |
| 10 | #include <string> |
| 11 | #include <string_view> |
| 12 | |
| 13 | class IProfilecxx . . $ IProfile# |
| 14 | : public Itemcxx . . $ Item# |
| 15 | , public Importablecxx . . $ Importable# |
| 16 | , public Exportablecxx . . $ Exportable# |
| 17 | { |
| 18 | public: |
| 19 | static constexpr stdcxx . . $ std/::string_viewcxx . . $ std/string_view# ItemIDcxx . . $ std/basic_string_view#basic_string_view(837a1ee5a10cb792).{"PROFILE"}; |
| 20 | |
| 21 | struct Infocxx . . $ IProfile#Info# |
| 22 | { |
| 23 | static constexpr stdcxx . . $ std/::string_viewcxx . . $ std/string_view# GlobalIDcxx . . $ std/basic_string_view#basic_string_view(837a1ee5a10cb792).{"_global_"}; |
| 24 | static constexpr stdcxx . . $ std/::string_viewcxx . . $ std/string_view# ManualIDcxx . . $ IProfile#Info#ManualID.{"_manual_"}; |
| 25 | static constexpr stdcxx . . $ std/::string_viewcxx . . $ std/string_view# GlobalIconURLcxx . . $ std/basic_string_view#basic_string_view(837a1ee5a10cb792).{":/images/GlobalIcon"}; |
| 26 | static constexpr stdcxx . . $ std/::string_viewcxx . . $ std/string_view# DefaultIconURLcxx . . $ IProfile#Info#DefaultIconURL.{":/images/DefaultIcon"}; |
| 27 | |
| 28 | Infocxx . . $ IProfile#Info#Info(b078d394f433f1d4).(stdcxx . . $ std/::stringcxx . . $ std/string# name = ""cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d)., stdcxx . . $ std/::stringcxx . . $ std/string# exe = ""cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d)., |
| 29 | stdcxx . . $ std/::stringcxx . . $ std/string# iconURL = stdcxx . . $ std/::stringcxx . . $ std/string#(DefaultIconURLcxx . . $ IProfile#Info#DefaultIconURL.)) |
| 30 | : namecxx . . $ std/__cxx11/basic_string#basic_string(a47f53d4115f6ce5).(name) |
| 31 | , execxx . . $ IProfile#Info#exe.(exe) |
| 32 | , iconURLcxx . . $ IProfile#Info#iconURL.(iconURL) |
| 33 | { |
| 34 | } |
| 35 | |
| 36 | bool hasCustomIconcxx . . $ IProfile#Info#hasCustomIcon(50ce9a9e25b4a850).() const |
| 37 | { |
| 38 | return iconURLcxx . . $ IProfile#Info#iconURL. != IProfilecxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02).::Infocxx . . $ IProfile#Info#::DefaultIconURLcxx . . $ IProfile#Info#DefaultIconURL. && |
| 39 | iconURLcxx . . $ IProfile#Info#iconURL. != IProfilecxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02).::Infocxx . . $ IProfile#Info#::GlobalIconURLcxx . . $ IProfile#Info#GlobalIconURL.; |
| 40 | } |
| 41 | |
| 42 | stdcxx . . $ std/::stringcxx . . $ std/string# namecxx . . $ IProfile#Info#name.{cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).""}; |
| 43 | stdcxx . . $ std/::stringcxx . . $ std/string# execxx . . $ IProfile#Info#exe.{cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).""}; |
| 44 | stdcxx . . $ std/::stringcxx . . $ std/string# iconURLcxx . . $ IProfile#Info#iconURL.{cxx . . $ std/__cxx11/basic_string#basic_string(bf1c47f775a49a2c).DefaultIconURLcxx . . $ IProfile#Info#DefaultIconURL.}; |
| 45 | }; |
| 46 | |
| 47 | class Importercxx . . $ IProfile#Importer# : public Importablecxx . . $ Importable#::Importercxx . . $ Importable#Importer# |
| 48 | { |
| 49 | public: |
| 50 | virtual bool provideActivecxx . . $ IProfile#Importer#provideActive(50ce9a9e25b4a850).() const = 0; |
| 51 | virtual IProfilecxx . . $ IProfile#::Infocxx . . $ IProfile#Info# const &provideInfocxx . . $ IProfile#Importer#provideInfo(ad075d653bfbbbea).() const = 0; |
| 52 | |
| 53 | virtual ~cxx . . $ IProfile#Importer#`~Importer`(ced63f7c635d850d).Importercxx . . $ IProfile#Importer#() = default; |
| 54 | }; |
| 55 | |
| 56 | class Exportercxx . . $ IProfile#Exporter# : public Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter# |
| 57 | { |
| 58 | public: |
| 59 | virtual void takeActivecxx . . $ IProfile#Exporter#takeActive(b45ddcbc8423892c).(bool active) = 0; |
| 60 | virtual void takeInfocxx . . $ IProfile#Exporter#takeInfo(7a3f345cc6258353).(Infocxx . . $ IProfile#Info# const &info) = 0; |
| 61 | |
| 62 | virtual ~cxx . . $ IProfile#Exporter#`~Exporter`(ced63f7c635d850d).Exportercxx . . $ IProfile#Exporter#() = default; |
| 63 | }; |
| 64 | |
| 65 | virtual stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#> initializercxx . . $ IProfile#initializer(6b4e1016740e578).() = 0; |
| 66 | |
| 67 | virtual bool activecxx . . $ IProfile#active(50ce9a9e25b4a850).() const = 0; |
| 68 | virtual void activatecxx . . $ IProfile#activate(b45ddcbc8423892c).(bool active) = 0; |
| 69 | |
| 70 | virtual IProfilecxx . . $ IProfile#::Infocxx . . $ IProfile#Info# const &infocxx . . $ IProfile#info(ad075d653bfbbbea).() const = 0; |
| 71 | virtual void infocxx . . $ IProfile#info(7a3f345cc6258353).(IProfilecxx . . $ IProfile#::Infocxx . . $ IProfile#Info# const &info) = 0; |
| 72 | |
| 73 | virtual stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfilecxx . . $ IProfile#> clonecxx . . $ IProfile#clone(f422f8feab2476b6).() const = 0; |
| 74 | |
| 75 | virtual ~cxx . . $ IProfile#`~IProfile`(ced63f7c635d850d).IProfilecxx . . $ IProfile#() = default; |
| 76 | }; |