Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
Breaker.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_MIMICS_INDICATORS_BREAKER_HPP_
2#define IV_SRC_MIMICS_INDICATORS_BREAKER_HPP_
3
14
16{
17
26{
27public:
28 Breaker();
29 ~Breaker() override = default;
30
31 bool load(const iv::file::xml::node &nodeControlMimic) override;
32 bool save(iv::file::xml::node &nodeControlMimic) const override;
33
34 // Controller
35 void getChannels(const std::shared_ptr<std::vector<std::weak_ptr<iv::channels::AbstractChannel>>>
36 &channelsInControl) const override;
37 void mapChannels(const std::function<void(std::weak_ptr<iv::channels::AbstractChannel> &)> &mapFunction) override;
38 [[nodiscard]] std::shared_ptr<iv::mimics::AbstractMimicElement> clone() const override;
39 void executeCommand(const std::string &strAction) const override;
40
41 // View
42 void drawSpecific(IGraphics *graphics, std::optional<iv::types::color> colorWorkingState,
43 std::optional<iv::types::color> colorControlState, iv::eLanguage drawingLanguage) override;
44
45 [[nodiscard]] std::optional<iv::types::color> getColorWorkingState() const override;
46 [[nodiscard]] std::optional<std::string> getStringWorkingState() const override;
47 [[nodiscard]] std::optional<iv::mimics::eAlarmState> getAlarmState() const override;
48
49 // UI
51 void addOptionsMenu(const std::shared_ptr<iv::mimics::MimicControlMenu> &menu) override;
52
53protected:
55 Breaker(const Breaker &other);
56
57 // View
58 std::unique_ptr<CRectangleGraphics> m_rectangleOpt {nullptr};
59
62
63private:
77 struct Keys
78 {
79 static constexpr std::string_view isControl {"IsControl"};
80 };
81 struct Sections
82 {
83 static constexpr std::string_view breaker {"Breaker"};
84 static constexpr std::string_view maintenance {"Maintenance"};
85 static constexpr std::string_view feedbackOpCl {"FeedbackOpCl"};
86 static constexpr std::string_view commandsOpCl {"CommandsOpCl"};
87 static constexpr std::string_view orderOpCl {"OrderOpCl"};
88 static constexpr std::string_view remoteLocal {"RemoteLocal"};
89 static constexpr std::string_view tripReset {"TripReset"};
90 static constexpr std::string_view controlLock {"ControlLock"};
91 static constexpr std::string_view automaticManual {"AutomaticManual"};
92 };
93};
94
95}// namespace iv::mimics::elements
96
97#endif//IV_SRC_MIMICS_INDICATORS_BREAKER_HPP_
Definition AbstractComponentGUI.hpp:30
Definition IGraphics.hpp:20
Definition xmlFile.hpp:15
Definition AbstractMimicElement.hpp:21
Definition Breaker.hpp:26
std::unique_ptr< CRectangleGraphics > m_rectangleOpt
Definition Breaker.hpp:58
void executeCommand(const std::string &strAction) const override
Run actions ///.
Definition Breaker.cpp:307
std::optional< iv::mimics::eAlarmState > getAlarmState() const override
Definition Breaker.cpp:248
void getChannels(const std::shared_ptr< std::vector< std::weak_ptr< iv::channels::AbstractChannel > > > &channelsInControl) const override
AƱade los canales que el MimicElement tiene enlazado.
Definition Breaker.cpp:272
iv::mimics::support::Maintenance m_maintenance
Definition Breaker.hpp:61
void mapChannels(const std::function< void(std::weak_ptr< iv::channels::AbstractChannel > &)> &mapFunction) override
Processed gets ///.
Definition Breaker.cpp:290
Breaker()
Definition Breaker.cpp:16
std::optional< iv::types::color > getColorWorkingState() const override
Retrieves the color representing the current working state of the element.
Definition Breaker.cpp:205
~Breaker() override=default
void drawSpecific(IGraphics *graphics, std::optional< iv::types::color > colorWorkingState, std::optional< iv::types::color > colorControlState, iv::eLanguage drawingLanguage) override
Draws the specific abstract element shape.
Definition Breaker.cpp:110
bool save(iv::file::xml::node &nodeControlMimic) const override
Definition Breaker.cpp:70
AbstractComponentGUI * panelEditControl() override
UI methods ///.
Definition Breaker.cpp:311
std::shared_ptr< iv::mimics::AbstractMimicElement > clone() const override
Definition Breaker.cpp:105
void addOptionsMenu(const std::shared_ptr< iv::mimics::MimicControlMenu > &menu) override
Definition Breaker.cpp:538
std::optional< std::string > getStringWorkingState() const override
Definition Breaker.cpp:241
bool m_isControl
Definition Breaker.hpp:60
bool load(const iv::file::xml::node &nodeControlMimic) override
Definition Breaker.cpp:35
Definition Maintenance.hpp:11
Definition AutomaticSemiAuto.hpp:21
Definition CommandsOpCl.hpp:12
Definition ControlLock.hpp:11
Definition FeedbackOpCl.hpp:12
Definition OrderOpCl.hpp:12
Definition RemoteLocal.hpp:20
Definition TripReset.hpp:12
constexpr iv::types::color SedniElementWorkingGreen
Definition color.hpp:337
constexpr iv::types::color SedniElementNotWorkingGrey
Definition color.hpp:339
constexpr iv::types::color White
Definition color.hpp:222
constexpr iv::types::color SedniElementOfflineGrey
Definition color.hpp:346
constexpr iv::types::color SedniElementUndefined
Definition color.hpp:344
Definition enums.hpp:95
eMimicElementType
Definition enums.hpp:8
uint32_t color
Definition types.hpp:12
eLanguage
Definition enums.hpp:37
static constexpr iv::types::color workingStateOpen
Definition Breaker.hpp:71
static constexpr iv::types::color workingStateOffline
Definition Breaker.hpp:74
static constexpr iv::types::color color
Definition Breaker.hpp:70
static constexpr iv::types::color workingStateClose
Definition Breaker.hpp:72
static constexpr iv::types::color workingStateUndefined
Definition Breaker.hpp:73
static constexpr bool isControl
Definition Breaker.hpp:67
Definition Breaker.hpp:78
static constexpr std::string_view isControl
Definition Breaker.hpp:79
static constexpr std::string_view feedbackOpCl
Definition Breaker.hpp:85
static constexpr std::string_view maintenance
Definition Breaker.hpp:84
static constexpr std::string_view breaker
Definition Breaker.hpp:83
static constexpr std::string_view orderOpCl
Definition Breaker.hpp:87
static constexpr std::string_view remoteLocal
Definition Breaker.hpp:88
static constexpr std::string_view commandsOpCl
Definition Breaker.hpp:86
static constexpr std::string_view controlLock
Definition Breaker.hpp:90
static constexpr std::string_view tripReset
Definition Breaker.hpp:89
static constexpr std::string_view automaticManual
Definition Breaker.hpp:91