SpaIot Library
buttonsettings.h
1/*
2 * SpaIot Library (c) by epsilonrt - epsilonrt@gmail.com
3 * This file is part of SpaIot library <https://github.com/epsilonrt/spaiot-lib>
4 *
5 * SpaIot library is licensed under a
6 * Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
7 *
8 * You should have received a copy of the license along with this
9 * work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
10 *
11 * SpaIot library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY;
13 */
14#pragma once
15
16#include <map>
17#include <string>
18#include "global.h"
19
20namespace SpaIot {
21
26 class ButtonSettings {
27 public:
31 ButtonSettings();
37 ButtonSettings (const std::string & controllerName, int buttonId);
42 const std::string & controllerName() const;
47 void setControllerName (const std::string & name);
52 int id() const;
57 void setId (int id);
62 bool isNull() const;
67 bool operator== (const ButtonSettings &other) const;
72 bool operator!= (const ButtonSettings &other) const;
73
74 private:
75 int m_id;
76 std::string m_controllerName;
77 };
78
82 extern const std::map<int, ButtonSettings> Scip2SspButtons;
86 extern const std::map<int, ButtonSettings> Scip2SjbButtons;
87}
SpaIot name space.
Definition: bussettings.h:21