| 1 | // SPDX-License-Identifier: GPL-3.0-or-latercxx . . $ `<file>/src/core/components/controls/noopxmlparser.cpp`/ |
| 2 | // Copyright 2021 Juan Palacios <[email protected]> |
| 3 | |
| 4 | #include "noopxmlparser.h"cxx . . $ `<file>/src/core/components/controls/noopxmlparser.h`/ |
| 5 | |
| 6 | #include "core/profilepartxmlparserprovider.h"cxx . . $ `<file>/src/core/profilepartxmlparserprovider.h`/ |
| 7 | #include "noop.h"cxx . . $ `<file>/src/core/components/controls/noop.h`/ |
| 8 | #include <memory> |
| 9 | |
| 10 | class NoopXMLParsercxx . . $ NoopXMLParser#::Initializercxx . . $ NoopXMLParser#Initializer# final : public NoopProfilePartcxx . . $ NoopProfilePart#::Exportercxx . . $ NoopProfilePart#Exporter# |
| 11 | { |
| 12 | public: |
| 13 | Initializercxx . . $ NoopXMLParser#Initializer#Initializer(491d7284cdb64423).(NoopXMLParsercxx . . $ NoopXMLParser# &outer) noexcept |
| 14 | : outer_cxx . . $ NoopXMLParser#Initializer#outer_.(outer) |
| 15 | { |
| 16 | } |
| 17 | |
| 18 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::reference_wrappercxx . . $ std/reference_wrapper#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#>> |
| 19 | provideExportercxx . . $ NoopXMLParser#Initializer#provideExporter(3acccbde2694e33a).(Itemcxx . . $ Item# const &) override |
| 20 | { |
| 21 | return {cxx . . $ std/optional#optional(ced63f7c635d850d).}; |
| 22 | } |
| 23 | |
| 24 | void takeActivecxx . . $ NoopXMLParser#Initializer#takeActive(b45ddcbc8423892c).(bool active) override; |
| 25 | |
| 26 | private: |
| 27 | NoopXMLParsercxx . . $ NoopXMLParser# &outer_cxx . . $ NoopXMLParser#Initializer#outer_.; |
| 28 | }; |
| 29 | |
| 30 | void NoopXMLParsercxx . . $ NoopXMLParser#::Initializercxx . . $ NoopXMLParser#Initializer#::takeActivecxx . . $ NoopXMLParser#Initializer#takeActive(b45ddcbc8423892c).(bool active) |
| 31 | { |
| 32 | outer_cxx . . $ NoopXMLParser#Initializer#outer_..active_cxx . . $ NoopXMLParser#active_. = outer_cxx . . $ NoopXMLParser#Initializer#outer_..activeDefault_cxx . . $ NoopXMLParser#activeDefault_. = active; |
| 33 | } |
| 34 | |
| 35 | NoopXMLParsercxx . . $ NoopXMLParser#::NoopXMLParsercxx . . $ NoopXMLParser#NoopXMLParser(ced63f7c635d850d).() noexcept |
| 36 | : ProfilePartXMLParsercxx . . $ ProfilePartXMLParser#(Noopcxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02).::ItemIDcxx . . $ Noop#ItemID., *this, *this) |
| 37 | { |
| 38 | } |
| 39 | |
| 40 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#> |
| 41 | NoopXMLParsercxx . . $ NoopXMLParser#::factorycxx . . $ NoopXMLParser#factory(543373651c38a5a4).(IProfilePartXMLParserProvidercxx . . $ IProfilePartXMLParserProvider# const &) |
| 42 | { |
| 43 | return nullptrcxx . . $ std/unique_ptr#unique_ptr(6d988fd07f070dfc).; |
| 44 | } |
| 45 | |
| 46 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#> NoopXMLParsercxx . . $ NoopXMLParser#::initializercxx . . $ NoopXMLParser#initializer(6b4e1016740e578).() |
| 47 | { |
| 48 | return stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<NoopXMLParsercxx . . $ NoopXMLParser#::Initializercxx . . $ NoopXMLParser#Initializer#>(*this); |
| 49 | } |
| 50 | |
| 51 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::reference_wrappercxx . . $ std/reference_wrapper#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#>> |
| 52 | NoopXMLParsercxx . . $ NoopXMLParser#::provideExportercxx . . $ NoopXMLParser#provideExporter(3acccbde2694e33a).(Itemcxx . . $ Item# const &) |
| 53 | { |
| 54 | return {cxx . . $ std/optional#optional(ced63f7c635d850d).}; |
| 55 | } |
| 56 | |
| 57 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::reference_wrappercxx . . $ std/reference_wrapper#<Importablecxx . . $ Importable#::Importercxx . . $ Importable#Importer#>> |
| 58 | NoopXMLParsercxx . . $ NoopXMLParser#::provideImportercxx . . $ NoopXMLParser#provideImporter(c13a3bcac0db4745).(Itemcxx . . $ Item# const &) |
| 59 | { |
| 60 | return {cxx . . $ std/optional#optional(ced63f7c635d850d).}; |
| 61 | } |
| 62 | |
| 63 | void NoopXMLParsercxx . . $ NoopXMLParser#::takeActivecxx . . $ NoopXMLParser#takeActive(b45ddcbc8423892c).(bool active) |
| 64 | { |
| 65 | active_cxx . . $ NoopXMLParser#active_. = active; |
| 66 | } |
| 67 | |
| 68 | bool NoopXMLParsercxx . . $ NoopXMLParser#::provideActivecxx . . $ NoopXMLParser#provideActive(50ce9a9e25b4a850).() const |
| 69 | { |
| 70 | return active_cxx . . $ NoopXMLParser#active_.; |
| 71 | } |
| 72 | |
| 73 | void NoopXMLParsercxx . . $ NoopXMLParser#::appendTocxx . . $ NoopXMLParser#appendTo(9a62add8cbc6c333).(pugicxx . . $ pugi/::xml_nodecxx . . $ pugi/xml_node# &parentNode) |
| 74 | { |
| 75 | auto pmFixedNode = parentNode.append_childcxx . . $ pugi/xml_node#append_child(625782b904aa9aa5).(IDcxx . . $ ProfilePartXMLParser#ID(f4fff0029955a25f).().c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()); |
| 76 | pmFixedNode.append_attributecxx . . $ pugi/xml_node#append_attribute(ebf82b7b6f96d3a9).("active") =cxx . . $ pugi/xml_attribute#`operator=`(e4ef2dfcdb6b654d). active_cxx . . $ NoopXMLParser#active_.; |
| 77 | } |
| 78 | |
| 79 | void NoopXMLParsercxx . . $ NoopXMLParser#::resetAttributescxx . . $ NoopXMLParser#resetAttributes(49f6e7a06ebc5aa8).() |
| 80 | { |
| 81 | active_cxx . . $ NoopXMLParser#active_. = activeDefault_cxx . . $ NoopXMLParser#activeDefault_.; |
| 82 | } |
| 83 | |
| 84 | void NoopXMLParsercxx . . $ NoopXMLParser#::loadPartFromcxx . . $ NoopXMLParser#loadPartFrom(ad773084382c4c72).(pugicxx . . $ pugi/::xml_nodecxx . . $ pugi/xml_node# const &parentNode) |
| 85 | { |
| 86 | auto pmFixedNode = parentNode.find_childcxx . . $ pugi/xml_node#find_child(4699405ca595259d).( |
| 87 | [&](pugicxx . . $ pugi/::xml_nodecxx . . $ pugi/xml_node# const &node) { return node.namecxx . . $ pugi/xml_node#name(a9f41ea0e82d88cf).() == IDcxx . . $ ProfilePartXMLParser#ID(f4fff0029955a25f).(); }); |
| 88 | |
| 89 | active_cxx . . $ NoopXMLParser#active_. = pmFixedNode.attributecxx . . $ pugi/xml_node#attribute(760b1819de0561d9).("active").as_boolcxx . . $ pugi/xml_attribute#as_bool(962fae8be55e1d9).(activeDefault_cxx . . $ NoopXMLParser#activeDefault_.); |
| 90 | } |
| 91 | |
| 92 | bool const NoopXMLParsercxx . . $ NoopXMLParser#::registered_cxx . . $ NoopXMLParser#registered_. = |
| 93 | ProfilePartXMLParserProvidercxx . . $ ProfilePartXMLParserProvider#::registerProvidercxx . . $ ProfilePartXMLParserProvider#registerProvider(1a5cc5494db8b601).( |
| 94 | Noopcxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02).::ItemIDcxx . . $ Noop#ItemID., [cxx . . $ std/function#function(bdc3712e480e4d04).]() { return stdcxx . . $ std/::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<NoopXMLParsercxx . . $ NoopXMLParser#>(); }); |