Debian Codegraph @

Server/Web/HtmlTagSignal.h

raw symbols SCIP
1 /*
2 RailControl - Model Railway Control Software
3
4 Copyright (c) 2017-2025 by Teddy / Dominik Mahrer - www.railcontrol.org
5
6 RailControl is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 3, or (at your option) any
9 later version.
10
11 RailControl is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 See the GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with RailControl; see the file LICENCE. If not see
18 <http://www.gnu.org/licenses/>.
19 */
20
21 #pragma once
22
23 #include <string>
24
25 #include "DataModel/Signal.h"
26 #include "Manager.h"
27 #include "Server/Web/HtmlTagLayoutItem.h"
28
29 class Manager;
30
31 namespace DataModel
32 {
33 class Signal;
34 }
35
36 namespace Server { namespace Web
37 {
38 class HtmlTagSignal : public HtmlTagLayoutItem
39 {
40 public:
41 HtmlTagSignal() = delete;
42 HtmlTagSignal(const HtmlTagSignal&) = delete;
43 HtmlTagSignal& operator=(const HtmlTagSignal&) = delete;
44
45 HtmlTagSignal(const Manager& manager, const DataModel::Signal* const signal);
46
47 virtual ~HtmlTagSignal()
48 {
49 }
50
51 static std::string GetSignalImage(const DataModel::AccessoryState state,
52 const DataModel::Signal* signal);
53
54 private:
55 void MenuEntry(const Languages::TextSelector text,
56 const string& id,
57 const DataModel::AccessoryState state,
58 const string& aspect);
59
60 static std::string GetSignalImagePlain(const DataModel::Signal* const signal);
61 static std::string GetStateClassText(const DataModel::AccessoryState state);
62
63 const DataModel::Signal* const signal;
64 };
65 }} // namespace Server::Web
66