Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
structs.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_CORE_STRUCTS_HPP_
2#define IV_SRC_CORE_STRUCTS_HPP_
3
4#include "core/enums.hpp"
6#include "channels/enums.hpp"
7
8#include <cstdint>
9#include <string>
10
11namespace iv
12{
13
15{
16 std::uint16_t year;
17 std::uint16_t month;
18 std::uint16_t day;
19 std::uint16_t hour;
20 std::uint16_t minute;
21 std::uint16_t second;
22};
23
25{
26 MeasurementUnit(const MeasurementUnit &other) = delete;
27 MeasurementUnit(MeasurementUnit &&other) noexcept = delete;
28 ~MeasurementUnit() = default;
29
30 MeasurementUnit &operator=(const MeasurementUnit &other) = delete;
31 MeasurementUnit &operator=(MeasurementUnit &&other) noexcept = delete;
32
33 [[nodiscard]] static MeasurementUnit get(const iv::eMeasurementUnit &unit);
34
35 std::string name;
36 std::string symbol;
37
38private:
39 MeasurementUnit() = default;
40 MeasurementUnit(std::string_view _name, std::string_view _symbol);
41};
42
44{
46 PrinterDevice(bool _isActive, std::string _device);
48 PrinterDevice(PrinterDevice &&other) noexcept;
50
52 PrinterDevice &operator=(PrinterDevice &&other) noexcept;
53
54 bool load(const iv::file::xml::node &nodePrinter);
55 bool save(iv::file::xml::node &nodePrinter) const;
56
58 std::string device;
59
60private:
61 struct Keys
62 {
63 static constexpr std::string_view IsActive {"Enabled"};
64 static constexpr std::string_view Device {"Device"};
65 };
66
68 {
69 static constexpr bool isActive {false};
70 static constexpr std::string device {};
71 };
72};
73
93
94}// namespace iv
95
96#endif//IV_SRC_CORE_STRUCTS_HPP_
Definition xmlFile.hpp:15
eChannelArea
Definition enums.hpp:55
Definition AlarmsManager.cpp:18
eMeasurementUnit
Definition enums.hpp:103
Definition structs.hpp:75
AttributesForReportsChannels()
Definition structs.hpp:76
bool _isSensorRange
Definition structs.hpp:87
bool _isLimitsAlarm
Definition structs.hpp:84
bool _showShipyardTagInsteadOfChannelId
Definition structs.hpp:90
bool _onlyWithAlarms
Definition structs.hpp:89
bool _isAlarmParameters
Definition structs.hpp:85
iv::channels::eChannelArea _areaSelected
Definition structs.hpp:91
bool _isAlarmGroup
Definition structs.hpp:86
bool _isSerialLine
Definition structs.hpp:88
bool _isArea
Definition structs.hpp:83
Definition structs.hpp:15
std::uint16_t minute
Definition structs.hpp:20
std::uint16_t day
Definition structs.hpp:18
std::uint16_t month
Definition structs.hpp:17
std::uint16_t year
Definition structs.hpp:16
std::uint16_t hour
Definition structs.hpp:19
std::uint16_t second
Definition structs.hpp:21
Definition structs.hpp:25
MeasurementUnit()=default
static MeasurementUnit get(const iv::eMeasurementUnit &unit)
Definition structs.cpp:102
std::string name
Definition structs.hpp:35
MeasurementUnit & operator=(const MeasurementUnit &other)=delete
~MeasurementUnit()=default
MeasurementUnit(const MeasurementUnit &other)=delete
MeasurementUnit(MeasurementUnit &&other) noexcept=delete
std::string symbol
Definition structs.hpp:36
MeasurementUnit & operator=(MeasurementUnit &&other) noexcept=delete
Definition structs.hpp:68
static constexpr bool isActive
Definition structs.hpp:69
static constexpr std::string device
Definition structs.hpp:70
Definition structs.hpp:62
static constexpr std::string_view Device
Definition structs.hpp:64
static constexpr std::string_view IsActive
Definition structs.hpp:63
Definition structs.hpp:44
std::string device
Definition structs.hpp:58
bool save(iv::file::xml::node &nodePrinter) const
Definition structs.cpp:275
PrinterDevice & operator=(const PrinterDevice &other)
Definition structs.cpp:245
bool isActive
Definition structs.hpp:57
bool load(const iv::file::xml::node &nodePrinter)
Definition structs.cpp:267
PrinterDevice()
Definition structs.cpp:228
PrinterDevice(const PrinterDevice &other)