Debian Codegraph @

Source/Core/InputCommon/ControllerEmu/Control/Control.h

raw symbols SCIP
1 // Copyright 2017 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include <memory>
7 #include <string>
8
9 #include "InputCommon/ControlReference/ControlReference.h"
10
11 namespace ControllerEmu
12 {
13 enum class Translatability
14 {
15 DoNotTranslate,
16 Translate
17 };
18
19 class Control
20 {
21 public:
22 virtual ~Control();
23
24 template <typename T = ControlState>
25 T GetState() const
26 {
27 return control_ref->GetState<T>();
28 }
29
30 std::unique_ptr<ControlReference> const control_ref;
31 const Translatability translate;
32 const std::string name;
33 const std::string ui_name;
34
35 protected:
36 Control(std::unique_ptr<ControlReference> ref, Translatability translate, std::string name,
37 std::string ui_name);
38 Control(std::unique_ptr<ControlReference> ref, Translatability translate, std::string name);
39 };
40
41 } // namespace ControllerEmu