| 1 | // SPDX-License-Identifier: GPL-3.0-or-latercxx . . $ `<file>/src/core/profilepartxmlparser.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 "importable.h"cxx . . $ `<file>/src/core/importable.h`/ |
| 8 | #include "iprofilepartxmlparser.h"cxx . . $ `<file>/src/core/iprofilepartxmlparser.h`/ |
| 9 | #include <functional> |
| 10 | #include <memory> |
| 11 | #include <optional> |
| 12 | #include <pugixml.hpp> |
| 13 | #include <string> |
| 14 | #include <string_view> |
| 15 | #include <vector> |
| 16 | |
| 17 | class Itemcxx . . $ Item#; |
| 18 | class IProfilePartXMLParserProvidercxx . . $ IProfilePartXMLParserProvider#; |
| 19 | |
| 20 | class ProfilePartXMLParsercxx . . $ ProfilePartXMLParser# : public IProfilePartXMLParsercxx . . $ IProfilePartXMLParser# |
| 21 | { |
| 22 | public: |
| 23 | ProfilePartXMLParsercxx . . $ ProfilePartXMLParser#ProfilePartXMLParser(17afe9b104c679a8).(stdcxx . . $ std/::string_viewcxx . . $ std/string_view# id, |
| 24 | Importablecxx . . $ Importable#::Importercxx . . $ Importable#Importer# &profilePartImporter, |
| 25 | Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter# &profilePartExporter) noexcept; |
| 26 | |
| 27 | stdcxx . . $ std/::stringcxx . . $ std/string# const &IDcxx . . $ ProfilePartXMLParser#ID(f4fff0029955a25f).() const final override; |
| 28 | |
| 29 | void loadFromcxx . . $ ProfilePartXMLParser#loadFrom(ad773084382c4c72).(pugicxx . . $ pugi/::xml_nodecxx . . $ pugi/xml_node# const &parentNode) final override; |
| 30 | Importablecxx . . $ Importable#::Importercxx . . $ Importable#Importer# &profilePartImportercxx . . $ ProfilePartXMLParser#profilePartImporter(c6a8a54be61afbf2).() const final override; |
| 31 | Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter# &profilePartExportercxx . . $ ProfilePartXMLParser#profilePartExporter(611f04e96fb8b68a).() const final override; |
| 32 | |
| 33 | class Factorycxx . . $ ProfilePartXMLParser#Factory# |
| 34 | { |
| 35 | public: |
| 36 | Factorycxx . . $ ProfilePartXMLParser#Factory#Factory(28529ca9397dceb8).(IProfilePartXMLParserProvidercxx . . $ IProfilePartXMLParserProvider# const &profilePartParserProvider) noexcept; |
| 37 | |
| 38 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::reference_wrappercxx . . $ std/reference_wrapper#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#>> |
| 39 | factorycxx . . $ ProfilePartXMLParser#Factory#factory(3acccbde2694e33a).(Itemcxx . . $ Item# const &i); |
| 40 | |
| 41 | virtual void takePartParsercxx . . $ ProfilePartXMLParser#Factory#takePartParser(4ce663d5ecbeb887).(Itemcxx . . $ Item# const &i, |
| 42 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfilePartXMLParsercxx . . $ IProfilePartXMLParser#> &&part) = 0; |
| 43 | virtual ~cxx . . $ ProfilePartXMLParser#Factory#`~Factory`(ced63f7c635d850d).Factorycxx . . $ ProfilePartXMLParser#Factory#() = default; |
| 44 | |
| 45 | private: |
| 46 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfilePartXMLParsercxx . . $ IProfilePartXMLParser#> |
| 47 | createPartParsercxx . . $ ProfilePartXMLParser#Factory#createPartParser(d9f4e02a04a433bb).(stdcxx . . $ std/::stringcxx . . $ std/string# const &componentID) const; |
| 48 | |
| 49 | IProfilePartXMLParserProvidercxx . . $ IProfilePartXMLParserProvider# const &profilePartParserProvider_cxx . . $ ProfilePartXMLParser#Factory#profilePartParserProvider_.; |
| 50 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#>> factories_cxx . . $ ProfilePartXMLParser#Factory#factories_.; |
| 51 | }; |
| 52 | |
| 53 | protected: |
| 54 | virtual void resetAttributescxx . . $ ProfilePartXMLParser#resetAttributes(49f6e7a06ebc5aa8).() = 0; |
| 55 | virtual void loadPartFromcxx . . $ ProfilePartXMLParser#loadPartFrom(ad773084382c4c72).(pugicxx . . $ pugi/::xml_nodecxx . . $ pugi/xml_node# const &parentNode) = 0; |
| 56 | |
| 57 | private: |
| 58 | stdcxx . . $ std/::stringcxx . . $ std/string# const id_cxx . . $ ProfilePartXMLParser#id_.; |
| 59 | Importablecxx . . $ Importable#::Importercxx . . $ Importable#Importer# &importer_cxx . . $ ProfilePartXMLParser#importer_.; |
| 60 | Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter# &exporter_cxx . . $ ProfilePartXMLParser#exporter_.; |
| 61 | }; |