Debian Codegraph @

src/core/profilepartxmlparser.cpp

raw symbols SCIP
1 // SPDX-License-Identifier: GPL-3.0-or-latercxx . . $ `<file>/src/core/profilepartxmlparser.cpp`/
2 // Copyright 2019 Juan Palacios <[email protected]>
3
4 #include "profilepartxmlparser.h"cxx . . $ `<file>/src/core/profilepartxmlparser.h`/
5
6 #include "iprofilepartxmlparserprovider.h"cxx . . $ `<file>/src/core/iprofilepartxmlparserprovider.h`/
7 #include "item.h"cxx . . $ `<file>/src/core/item.h`/
8 #include <utility>
9
10 ProfilePartXMLParsercxx . . $ ProfilePartXMLParser#::ProfilePartXMLParsercxx . . $ ProfilePartXMLParser#ProfilePartXMLParser(17afe9b104c679a8).(stdcxx . . $ std/::string_viewcxx . . $ std/string_view# id,
11 Importablecxx . . $ Importable#::Importercxx . . $ Importable#Importer# &importer,
12 Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter# &exporter) noexcept
13 : id_cxx . . $ ProfilePartXMLParser#id_.(id)
14 , importer_cxx . . $ ProfilePartXMLParser#importer_.(importer)
15 , exporter_cxx . . $ ProfilePartXMLParser#exporter_.(exporter)
16 {
17 }
18
19 stdcxx . . $ std/::stringcxx . . $ std/string# const &ProfilePartXMLParsercxx . . $ ProfilePartXMLParser#::IDcxx . . $ ProfilePartXMLParser#ID(f4fff0029955a25f).() const
20 {
21 return id_cxx . . $ ProfilePartXMLParser#id_.;
22 }
23
24 void ProfilePartXMLParsercxx . . $ ProfilePartXMLParser#::loadFromcxx . . $ ProfilePartXMLParser#loadFrom(ad773084382c4c72).(pugicxx . . $ pugi/::xml_nodecxx . . $ pugi/xml_node# const &parentNode)
25 {
26 resetAttributescxx . . $ ProfilePartXMLParser#resetAttributes(49f6e7a06ebc5aa8).();
27 loadPartFromcxx . . $ ProfilePartXMLParser#loadPartFrom(ad773084382c4c72).(parentNode);
28 }
29
30 Importablecxx . . $ Importable#::Importercxx . . $ Importable#Importer# &ProfilePartXMLParsercxx . . $ ProfilePartXMLParser#::profilePartImportercxx . . $ ProfilePartXMLParser#profilePartImporter(c6a8a54be61afbf2).() const
31 {
32 return importer_cxx . . $ ProfilePartXMLParser#importer_.;
33 }
34
35 Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter# &ProfilePartXMLParsercxx . . $ ProfilePartXMLParser#::profilePartExportercxx . . $ ProfilePartXMLParser#profilePartExporter(611f04e96fb8b68a).() const
36 {
37 return exporter_cxx . . $ ProfilePartXMLParser#exporter_.;
38 }
39
40 ProfilePartXMLParsercxx . . $ ProfilePartXMLParser#::Factorycxx . . $ ProfilePartXMLParser#Factory#::Factorycxx . . $ ProfilePartXMLParser#Factory#Factory(28529ca9397dceb8).(
41 IProfilePartXMLParserProvidercxx . . $ IProfilePartXMLParserProvider# const &profilePartParserProvider) noexcept
42 : profilePartParserProvider_cxx . . $ ProfilePartXMLParser#Factory#profilePartParserProvider_.(profilePartParserProvider)
43 {
44 }
45
46 stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::reference_wrappercxx . . $ std/reference_wrapper#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#>>
47 ProfilePartXMLParsercxx . . $ ProfilePartXMLParser#::Factorycxx . . $ ProfilePartXMLParser#Factory#::factorycxx . . $ ProfilePartXMLParser#Factory#factory(3acccbde2694e33a).(Itemcxx . . $ Item# const &i)
48 {
49 auto partParser = createPartParsercxx . . $ ProfilePartXMLParser#Factory#createPartParser(d9f4e02a04a433bb).(i.IDcxx . . $ Item#ID(f4fff0029955a25f).());
50 if (partParser != nullptr) {
51 auto factory = partParser->cxx . . $ std/unique_ptr#`operator->`(ea7391e9eeeaf20e).factorycxx . . $ IProfilePartXMLParser#factory(543373651c38a5a4).(profilePartParserProvider_cxx . . $ ProfilePartXMLParser#Factory#profilePartParserProvider_.);
52 takePartParsercxx . . $ ProfilePartXMLParser#Factory#takePartParser(4ce663d5ecbeb887).(i, stdcxx . . $ std/::movecxx . . $ std/move(e35c19a1ba7baa26).(partParser));
53
54 if (factory != nullptr) {
55 factories_cxx . . $ ProfilePartXMLParser#Factory#factories_..emplace_backcxx . . $ std/vector#emplace_back(a1bcdfdabc3a37df).(stdcxx . . $ std/::movecxx . . $ std/move(e35c19a1ba7baa26).(factory));
56 return *cxx . . $ std/optional#optional(e3f0d6382bd52f24).factories_cxx . . $ ProfilePartXMLParser#Factory#factories_..backcxx . . $ std/vector#back(6baabfa6fc7b3a8e).();
57 }
58 }
59
60 return {cxx . . $ std/optional#optional(ced63f7c635d850d).};
61 }
62
63 stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfilePartXMLParsercxx . . $ IProfilePartXMLParser#>
64 ProfilePartXMLParsercxx . . $ ProfilePartXMLParser#::Factorycxx . . $ ProfilePartXMLParser#Factory#::createPartParsercxx . . $ ProfilePartXMLParser#Factory#createPartParser(d9f4e02a04a433bb).(stdcxx . . $ std/::stringcxx . . $ std/string# const &componentID) const
65 {
66 auto &partParserProviders =
67 profilePartParserProvider_cxx . . $ ProfilePartXMLParser#Factory#profilePartParserProvider_..profilePartParserProviderscxx . . $ IProfilePartXMLParserProvider#profilePartParserProviders(e70311e3611c41c6).();
68 auto const providerIt = partParserProviders.findcxx . . $ std/unordered_map#find(f39fe4bedfa7a693).(componentID);
69 if (providerIt != partParserProviders.cendcxx . . $ std/unordered_map#cend(f3c6e12ee1fe7252).())
70 return providerIt->cxx . . $ std/__detail/_Node_const_iterator#`operator->`(8e614c7de0b1573e).secondcxx . . $ std/pair#second.(cxx . . $ std/function#`operator()`(39e0826ffb540481).);
71
72 return nullptrcxx . . $ std/unique_ptr#unique_ptr(6d988fd07f070dfc).;
73 }