CuteHMI - Data Acquisition (CuteHMI.DataAcquisition.0)
EventCollective.hpp
1 #ifndef H_EXTENSIONS_CUTEHMI_DATAACQUISITION_0_INCLUDE_CUTEHMI_DATAACQUISITION_INTERNAL_EVENTCOLLECTIVE_HPP
2 #define H_EXTENSIONS_CUTEHMI_DATAACQUISITION_0_INCLUDE_CUTEHMI_DATAACQUISITION_INTERNAL_EVENTCOLLECTIVE_HPP
3 
4 #include "common.hpp"
5 #include "TagCache.hpp"
6 #include "EventTable.hpp"
7 #include "TableCollective.hpp"
8 
9 namespace cutehmi {
10 namespace dataacquisition {
11 
12 class TagValue;
13 
14 namespace internal {
15 
16 class CUTEHMI_DATAACQUISITION_PRIVATE EventCollective:
17  public TableCollective
18 {
19  Q_OBJECT
20 
21  public:
23 
24  void insert(const TagValue & tag);
25 
26  protected:
27  void updateSchema(Schema * schema) override;
28 
29  private:
30  template <typename T>
31  void insertIntoTable(const TagValue & tag, std::unique_ptr<EventTable<T>> & table);
32 
33  struct Members
34  {
39  };
40 
41  MPtr<Members> m;
42 };
43 
44 }
45 }
46 }
47 
48 #endif
49 
50 //(c)C: Copyright © 2020, Michał Policht <michal@policht.pl>. All rights reserved.
51 //(c)C: This file is a part of CuteHMI.
52 //(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.
53 //(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.
54 //(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::TableCollective
Definition: TableCollective.hpp:13
cutehmi::MPtr< Members >
cutehmi
cutehmi::dataacquisition::internal::EventCollective
Definition: EventCollective.hpp:16
cutehmi::dataacquisition::TagValue
Tag value.
Definition: TagValue.hpp:15
cutehmi::dataacquisition::internal::EventTable
Definition: EventTable.hpp:16
cutehmi::dataacquisition::Schema
Database schema.
Definition: Schema.hpp:13
std::unique_ptr