libhomegear-base  0.7
Base library for Homegear and Homegear family modules.
UiVariable.h
Go to the documentation of this file.
1 /* Copyright 2013-2019 Homegear GmbH
2  *
3  * libhomegear-base is free software: you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public License as
5  * published by the Free Software Foundation, either version 3 of the
6  * License, or (at your option) any later version.
7  *
8  * libhomegear-base is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with libhomegear-base. If not, see
15  * <http://www.gnu.org/licenses/>.
16  *
17  * In addition, as a special exception, the copyright holders give
18  * permission to link the code of portions of this program with the
19  * OpenSSL library under certain conditions as described in each
20  * individual source file, and distribute linked combinations
21  * including the two.
22  * You must obey the GNU Lesser General Public License in all respects
23  * for all of the code used other than OpenSSL. If you modify
24  * file(s) with this exception, you may extend this exception to your
25  * version of the file(s), but you are not obligated to do so. If you
26  * do not wish to do so, delete this exception statement from your
27  * version. If you delete this exception statement from all source
28  * files in the program, then also delete it here.
29 */
30 
31 #ifndef UIVARIABLE_H_
32 #define UIVARIABLE_H_
33 
34 #include "UiCondition.h"
35 #include "../../Variable.h"
36 #include <string>
37 #include <map>
38 #include <list>
39 #include <memory>
40 
41 using namespace rapidxml;
42 
43 namespace BaseLib {
44 
45 class SharedObjects;
46 
47 namespace DeviceDescription {
48 
49 class UiVariable;
50 
51 typedef std::shared_ptr<UiVariable> PUiVariable;
52 
53 class UiVariable {
54  public:
57  UiVariable(UiVariable const &rhs);
58  virtual ~UiVariable() = default;
59 
60  UiVariable &operator=(const UiVariable &rhs);
61 
62  //Elements
63  int32_t familyId = -1;
64  int32_t deviceTypeId = -1;
65  int32_t channel = -1;
66  std::string name;
68 
69  //Properties
70  std::string label;
71  std::string description;
72  std::string types;
73  uint32_t role = 0;
74  bool visualizeInOverview = true;
75  std::string unit;
81 
82  //Rendering
83  std::list<PUiCondition> rendering;
84 
85  //Helpers
86  uint64_t peerId = 0;
87  protected:
88  BaseLib::SharedObjects *_bl = nullptr;
89 };
90 
91 }
92 }
93 
94 #endif
This is the base library main class.
Definition: BaseLib.h:95
Definition: BaseLib.cpp:34
PVariable minimumValueScaled
Definition: UiVariable.h:78
PVariable automationInfo
Definition: UiVariable.h:80
std::string name
Definition: UiVariable.h:66
Definition: UiVariable.h:53
std::list< PUiCondition > rendering
Definition: UiVariable.h:83
std::string unit
Definition: UiVariable.h:75
std::string description
Definition: UiVariable.h:71
PVariable value
Definition: UiVariable.h:67
std::shared_ptr< Variable > PVariable
Definition: PhysicalInterfaceSettings.h:41
PVariable maximumValue
Definition: UiVariable.h:77
int32_t channel
Definition: UiElements.h:215
std::shared_ptr< UiVariable > PUiVariable
Definition: UiVariable.h:49
uint64_t peerId
Definition: UiElements.h:214
std::string types
Definition: UiVariable.h:72
int32_t familyId
Definition: Licensing.h:380
std::string label
Definition: UiVariable.h:70
PVariable maximumValueScaled
Definition: UiVariable.h:79
Class representing a node of XML document.
Definition: rapidxml.h:539
Definition: BinaryPayload.h:38
PVariable minimumValue
Definition: UiVariable.h:76