kodi
ControllerLayout.h
1 /*
2  * Copyright (C) 2015-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include <memory>
12 #include <string>
13 #include <vector>
14 
15 namespace tinyxml2
16 {
17 class XMLElement;
18 }
19 
20 namespace KODI
21 {
22 namespace GAME
23 {
24 class CController;
25 class CPhysicalFeature;
26 class CPhysicalTopology;
27 
32 {
33 public:
37 
38  void Reset(void);
39 
40  int LabelID(void) const { return m_labelId; }
41  const std::string& Icon(void) const { return m_icon; }
42  const std::string& Image(void) const { return m_strImage; }
43 
51  bool IsValid(bool bLog) const;
52 
58  std::string Label(void) const;
59 
65  std::string ImagePath(void) const;
66 
76  const CPhysicalTopology& Topology(void) const { return *m_topology; }
77 
85  void Deserialize(const tinyxml2::XMLElement* pLayoutElement,
86  const CController* controller,
87  std::vector<CPhysicalFeature>& features);
88 
89 private:
90  const CController* m_controller = nullptr;
91  int m_labelId = -1;
92  std::string m_icon;
93  std::string m_strImage;
94  std::unique_ptr<CPhysicalTopology> m_topology;
95 };
96 
97 } // namespace GAME
98 } // namespace KODI
Represents the physical topology of controller add-ons.
Definition: PhysicalTopology.h:34
Definition: ControllerLayout.h:31
Definition: SkinTimerManager.h:18
Definition: AudioDecoder.h:18
Definition: Controller.h:33
const CPhysicalTopology & Topology(void) const
Get the physical topology of this controller.
Definition: ControllerLayout.h:76