Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
RemoteLocal.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_MIMICS_MODEL_TRAITS_REMOTELOCAL_HPP_
2#define IV_SRC_MIMICS_MODEL_TRAITS_REMOTELOCAL_HPP_
3
5#include "mimics/structs.hpp"
7
8namespace iv::mimics::traits
9{
10
11enum class eRemoteState
12{
13 NoValue,
14 Remote,
15 Local,
17};
18
20{
21public:
23
24 bool loadRemoteLocal(const iv::file::xml::node &nodeRemoteLocal);
25 bool saveRemoteLocal(iv::file::xml::node &nodeRemoteLocal) const;
26
27 //Controller
29 const std::shared_ptr<std::vector<std::weak_ptr<iv::channels::AbstractChannel>>> &channelsInControl) const;
30 void mapChannelsRemoteLocal(const std::function<void(std::weak_ptr<iv::channels::AbstractChannel> &)> &mapFunction);
31 [[nodiscard]] eRemoteState getState() const;
32
33 // Processed UI Gets
34 [[nodiscard]] std::string_view getIconState() const;
35
36 // UI
38
41
43
44private:
45 struct Keys
46 {
47 static constexpr std::string_view hasLocalFeedback {"HasLocalFeedback"};
48 };
50 {
51 static constexpr bool hasLocalFeedback {false};
52 };
53 struct Sections
54 {
55 static constexpr std::string_view remoteFeedback {"RemoteFeedback"};
56 static constexpr std::string_view localFeedback {"LocalFeedback"};
57 };
58};
59
60}// namespace iv::mimics::traits
61
62#endif//IV_SRC_MIMICS_MODEL_TRAITS_REMOTELOCAL_HPP_
Definition AbstractComponentGUI.hpp:30
Definition xmlFile.hpp:15
Definition Channel.hpp:12
Definition RemoteLocal.hpp:20
iv::mimics::Channel m_remoteFeedback
Definition RemoteLocal.hpp:39
eRemoteState getState() const
Definition RemoteLocal.cpp:104
void getChannelsRemoteLocal(const std::shared_ptr< std::vector< std::weak_ptr< iv::channels::AbstractChannel > > > &channelsInControl) const
Definition RemoteLocal.cpp:45
bool m_hasLocalFeedback
Definition RemoteLocal.hpp:40
bool loadRemoteLocal(const iv::file::xml::node &nodeRemoteLocal)
Definition RemoteLocal.cpp:17
std::string_view getIconState() const
Definition RemoteLocal.cpp:69
iv::mimics::Channel m_localFeedback
Definition RemoteLocal.hpp:42
void mapChannelsRemoteLocal(const std::function< void(std::weak_ptr< iv::channels::AbstractChannel > &)> &mapFunction)
Definition RemoteLocal.cpp:58
RemoteLocal()
Definition RemoteLocal.cpp:12
bool saveRemoteLocal(iv::file::xml::node &nodeRemoteLocal) const
Definition RemoteLocal.cpp:31
AbstractComponentGUI * panelEditRemoteLocal()
Definition RemoteLocal.cpp:82
Definition enums.hpp:200
eRemoteState
Definition RemoteLocal.hpp:12
static constexpr bool hasLocalFeedback
Definition RemoteLocal.hpp:51
Definition RemoteLocal.hpp:46
static constexpr std::string_view hasLocalFeedback
Definition RemoteLocal.hpp:47
Definition RemoteLocal.hpp:54
static constexpr std::string_view localFeedback
Definition RemoteLocal.hpp:56
static constexpr std::string_view remoteFeedback
Definition RemoteLocal.hpp:55