• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

traintastic / traintastic / 20096984680

10 Dec 2025 11:25AM UTC coverage: 27.556%. Remained the same
20096984680

push

github

reinder
[translation] update French

7842 of 28458 relevant lines covered (27.56%)

192.6 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

28.57
/server/src/hardware/decoder/decoderchangeflags.hpp
1
/**
2
 * server/src/hardware/decoder/decoderchangeflags.hpp
3
 *
4
 * This file is part of the traintastic source code.
5
 *
6
 * Copyright (C) 2019-2020 Reinder Feenstra
7
 *
8
 * This program is free software; you can redistribute it and/or
9
 * modify it under the terms of the GNU General Public License
10
 * as published by the Free Software Foundation; either version 2
11
 * of the License, or (at your option) any later version.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with this program; if not, write to the Free Software
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21
 */
22

23
#ifndef TRAINTASTIC_SERVER_HARDWARE_DECODER_DECODERCHANGEFLAGS_HPP
24
#define TRAINTASTIC_SERVER_HARDWARE_DECODER_DECODERCHANGEFLAGS_HPP
25

26
#include <type_traits>
27

28
enum class DecoderChangeFlags
29
{
30
  EmergencyStop = 1 << 0,
31
  Direction = 1 << 1,
32
  Throttle = 1 << 2,
33
  SpeedSteps = 1 << 3,
34
  FunctionValue = 1 << 4,
35
};
36

37
constexpr DecoderChangeFlags operator| (const DecoderChangeFlags& lhs, const DecoderChangeFlags& rhs)
12✔
38
{
39
  return static_cast<DecoderChangeFlags>(static_cast<std::underlying_type_t<DecoderChangeFlags>>(lhs) | static_cast<std::underlying_type_t<DecoderChangeFlags>>(rhs));
12✔
40
}
41

42
constexpr void operator|= (DecoderChangeFlags& lhs, const DecoderChangeFlags& rhs)
×
43
{
44
  lhs = lhs | rhs;
×
45
}
×
46

47
constexpr bool has(const DecoderChangeFlags& value, const DecoderChangeFlags& mask)
×
48
{
49
  return (static_cast<std::underlying_type_t<DecoderChangeFlags>>(value) & static_cast<std::underlying_type_t<DecoderChangeFlags>>(mask)) != 0;
×
50
}
51

52
#endif
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc