CuteHMI - Data Acquisition (CuteHMI.DataAcquisition.0)
TableNameTraits.hpp
1 #ifndef H_EXTENSIONS_CUTEHMI_DATAACQUISITION_0_INCLUDE_CUTEHMI_DATAACQUISITION_INTERNAL_TABLENAMETRAITS_HPP
2 #define H_EXTENSIONS_CUTEHMI_DATAACQUISITION_0_INCLUDE_CUTEHMI_DATAACQUISITION_INTERNAL_TABLENAMETRAITS_HPP
3 
4 #include <QString>
5 
6 namespace cutehmi {
7 namespace dataacquisition {
8 namespace internal {
9 
10 template <typename T>
12 {
13  static QString Affixed(const QString & name);
14 };
15 
16 template <>
17 struct TableNameTraits<double>
18 {
19  static QString Affixed(const QString & name) {
20  return name + "_real";
21  }
22 };
23 
24 template <>
25 struct TableNameTraits<int>
26 {
27  static QString Affixed(const QString & name) {
28  return name + "_int";
29  }
30 };
31 
32 template <>
33 struct TableNameTraits<bool>
34 {
35  static QString Affixed(const QString & name) {
36  return name + "_bool";
37  }
38 };
39 
40 }
41 }
42 }
43 
44 #endif
45 
46 //(c)C: Copyright © 2020, Michał Policht <michal@policht.pl>. All rights reserved.
47 //(c)C: This file is a part of CuteHMI.
48 //(c)C: CuteHMI is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
49 //(c)C: CuteHMI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
50 //(c)C: You should have received a copy of the GNU Lesser General Public License along with CuteHMI. If not, see <https://www.gnu.org/licenses/>.
cutehmi::dataacquisition::internal::TableNameTraits::Affixed
static QString Affixed(const QString &name)
cutehmi::dataacquisition::internal::TableNameTraits< bool >::Affixed
static QString Affixed(const QString &name)
Definition: TableNameTraits.hpp:35
cutehmi
QString
cutehmi::dataacquisition::internal::TableNameTraits< int >::Affixed
static QString Affixed(const QString &name)
Definition: TableNameTraits.hpp:27
cutehmi::dataacquisition::internal::TableNameTraits
Definition: TableNameTraits.hpp:11
std::internal
T internal(T... args)
cutehmi::dataacquisition::internal::TableNameTraits< double >::Affixed
static QString Affixed(const QString &name)
Definition: TableNameTraits.hpp:19