Debian Codegraph @

src/core/components/controls/amd/pm/fixed/pmfixedxmlparser.h

raw symbols SCIP
1 // SPDX-License-Identifier: GPL-3.0-or-later
2 // Copyright 2019 Juan Palacios <[email protected]>
3
4 #pragma once
5
6 #include "core/profilepartxmlparser.h"
7 #include "pmfixedprofilepart.h"
8 #include <string>
9
10 namespace AMD {
11
12 class PMFixedXMLParser final
13 : public ProfilePartXMLParser
14 , public AMD::PMFixedProfilePart::Exporter
15 , public AMD::PMFixedProfilePart::Importer
16 {
17 public:
18 PMFixedXMLParser() noexcept;
19
20 std::unique_ptr<Exportable::Exporter> factory(
21 IProfilePartXMLParserProvider const &profilePartParserProvider) override;
22 std::unique_ptr<Exportable::Exporter> initializer() override;
23
24 std::optional<std::reference_wrapper<Exportable::Exporter>>
25 provideExporter(Item const &i) override;
26 std::optional<std::reference_wrapper<Importable::Importer>>
27 provideImporter(Item const &i) override;
28
29 void takeActive(bool active) override;
30 bool provideActive() const override;
31
32 void takePMFixedMode(std::string const &mode) override;
33 std::string const &providePMFixedMode() const override;
34
35 void appendTo(pugi::xml_node &parentNode) override;
36
37 protected:
38 void resetAttributes() override;
39 void loadPartFrom(pugi::xml_node const &parentNode) override;
40
41 private:
42 class Initializer;
43
44 bool active_;
45 bool activeDefault_;
46
47 std::string mode_;
48 std::string modeDefault_;
49
50 static bool const registered_;
51 };
52
53 } // namespace AMD