Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
Attempts.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_MIMICS_MODEL_TRAITS_ATTEMPTS_HPP_
2#define IV_SRC_MIMICS_MODEL_TRAITS_ATTEMPTS_HPP_
3
6
7namespace iv::mimics::traits
8{
9
11{
12public:
13 Attempts();
14
15 bool loadAttempts(const iv::file::xml::node &nodeAttempt);
16 bool saveAttempts(iv::file::xml::node &nodeAttempt) const;
17
18 //controller
20 const std::shared_ptr<std::vector<std::weak_ptr<iv::channels::AbstractChannel>>> &channelsInControl) const;
21 void mapChannelsAttempts(const std::function<void(std::weak_ptr<iv::channels::AbstractChannel> &)> &mapFunction);
22
23 // UI
25
27
30
31private:
32 struct Keys
33 {
34 static constexpr std::string_view hasAttempts {"HasAttempts"};
35 };
37 {
38 static constexpr bool hasAttempts {false};
39 };
40 struct Sections
41 {
42 static constexpr std::string_view attemptsToStart {"AttemptsToStart"};
43 static constexpr std::string_view resetAttemptsToStartCommand {"ResetAttemptsToStartCommand"};
44 };
45};
46
47}// namespace iv::mimics::traits
48
49#endif//IV_SRC_MIMICS_MODEL_TRAITS_ATTEMPTS_HPP_
Definition AbstractComponentGUI.hpp:30
Definition xmlFile.hpp:15
Definition Channel.hpp:12
Definition Attempts.hpp:11
iv::mimics::Channel m_resetAttemptsToStartCommand
Definition Attempts.hpp:29
AbstractComponentGUI * panelEditAttempt()
Definition Attempts.cpp:68
Attempts()
Definition Attempts.cpp:11
void mapChannelsAttempts(const std::function< void(std::weak_ptr< iv::channels::AbstractChannel > &)> &mapFunction)
Definition Attempts.cpp:57
void getChannelsAttempts(const std::shared_ptr< std::vector< std::weak_ptr< iv::channels::AbstractChannel > > > &channelsInControl) const
Definition Attempts.cpp:44
iv::mimics::Channel m_attemptsToStart
Definition Attempts.hpp:28
bool saveAttempts(iv::file::xml::node &nodeAttempt) const
Definition Attempts.cpp:30
bool m_hasAttempts
Definition Attempts.hpp:26
bool loadAttempts(const iv::file::xml::node &nodeAttempt)
Definition Attempts.cpp:16
Definition enums.hpp:200
static constexpr bool hasAttempts
Definition Attempts.hpp:38
Definition Attempts.hpp:33
static constexpr std::string_view hasAttempts
Definition Attempts.hpp:34
Definition Attempts.hpp:41
static constexpr std::string_view attemptsToStart
Definition Attempts.hpp:42
static constexpr std::string_view resetAttemptsToStartCommand
Definition Attempts.hpp:43