LibrePCB Developers Documentation
electricalrulecheckmessages.h
Go to the documentation of this file.
1 /*
2  * LibrePCB - Professional EDA for everyone!
3  * Copyright (C) 2013 LibrePCB Developers, see AUTHORS.md for contributors.
4  * https://librepcb.org/
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef LIBREPCB_CORE_ELECTRICALRULECHECKMESSAGES_H
21 #define LIBREPCB_CORE_ELECTRICALRULECHECKMESSAGES_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
26 #include "../../rulecheck/rulecheckmessage.h"
27 
28 #include <QtCore>
29 
30 /*******************************************************************************
31  * Namespace / Forward Declarations
32  ******************************************************************************/
33 namespace librepcb {
34 
35 class ComponentInstance;
36 class ComponentSignalInstance;
37 class ComponentSymbolVariantItem;
38 class NetClass;
39 class NetSignal;
40 class SI_NetPoint;
41 class SI_NetSegment;
42 class SI_SymbolPin;
43 
44 /*******************************************************************************
45  * Class ErcMsgUnusedNetClass
46  ******************************************************************************/
47 
51 class ErcMsgUnusedNetClass final : public RuleCheckMessage {
52  Q_DECLARE_TR_FUNCTIONS(ErcMsgUnusedNetClass)
53 
54 public:
55  // Constructors / Destructor
56  ErcMsgUnusedNetClass() = delete;
57  explicit ErcMsgUnusedNetClass(const NetClass& netClass) noexcept;
59  : RuleCheckMessage(other) {}
60  virtual ~ErcMsgUnusedNetClass() noexcept {}
61 };
62 
63 /*******************************************************************************
64  * Class ErcMsgOpenNet
65  ******************************************************************************/
66 
70 class ErcMsgOpenNet final : public RuleCheckMessage {
71  Q_DECLARE_TR_FUNCTIONS(ErcMsgOpenNet)
72 
73 public:
74  // Constructors / Destructor
75  ErcMsgOpenNet() = delete;
76  explicit ErcMsgOpenNet(const NetSignal& net) noexcept;
77  ErcMsgOpenNet(const ErcMsgOpenNet& other) noexcept
78  : RuleCheckMessage(other) {}
79  virtual ~ErcMsgOpenNet() noexcept {}
80 };
81 
82 /*******************************************************************************
83  * Class ErcMsgOpenWireInSegment
84  ******************************************************************************/
85 
90  Q_DECLARE_TR_FUNCTIONS(ErcMsgOpenWireInSegment)
91 
92 public:
93  // Constructors / Destructor
94  ErcMsgOpenWireInSegment() = delete;
95  explicit ErcMsgOpenWireInSegment(const SI_NetSegment& segment) noexcept;
97  : RuleCheckMessage(other) {}
98  virtual ~ErcMsgOpenWireInSegment() noexcept {}
99 };
100 
101 /*******************************************************************************
102  * Class ErcMsgUnconnectedRequiredSignal
103  ******************************************************************************/
104 
109  Q_DECLARE_TR_FUNCTIONS(ErcMsgUnconnectedRequiredSignal)
110 
111 public:
112  // Constructors / Destructor
115  const ComponentSignalInstance& signal) noexcept;
117  const ErcMsgUnconnectedRequiredSignal& other) noexcept
118  : RuleCheckMessage(other) {}
119  virtual ~ErcMsgUnconnectedRequiredSignal() noexcept {}
120 };
121 
122 /*******************************************************************************
123  * Class ErcMsgForcedNetSignalNameConflict
124  ******************************************************************************/
125 
130  Q_DECLARE_TR_FUNCTIONS(ErcMsgForcedNetSignalNameConflict)
131 
132 public:
133  // Constructors / Destructor
136  const ComponentSignalInstance& signal) noexcept;
138  const ErcMsgForcedNetSignalNameConflict& other) noexcept
139  : RuleCheckMessage(other) {}
141 
142 private:
143  static QString getSignalNet(const ComponentSignalInstance& signal) noexcept;
144 };
145 
146 /*******************************************************************************
147  * Class ErcMsgUnplacedRequiredGate
148  ******************************************************************************/
149 
154  Q_DECLARE_TR_FUNCTIONS(ErcMsgUnplacedRequiredSymbol)
155 
156 public:
157  // Constructors / Destructor
158  ErcMsgUnplacedRequiredGate() = delete;
160  const ComponentInstance& component,
161  const ComponentSymbolVariantItem& gate) noexcept;
163  : RuleCheckMessage(other) {}
164  virtual ~ErcMsgUnplacedRequiredGate() noexcept {}
165 };
166 
167 /*******************************************************************************
168  * Class ErcMsgUnplacedOptionalGate
169  ******************************************************************************/
170 
175  Q_DECLARE_TR_FUNCTIONS(ErcMsgUnplacedOptionalSymbol)
176 
177 public:
178  // Constructors / Destructor
179  ErcMsgUnplacedOptionalGate() = delete;
181  const ComponentInstance& component,
182  const ComponentSymbolVariantItem& gate) noexcept;
184  : RuleCheckMessage(other) {}
185  virtual ~ErcMsgUnplacedOptionalGate() noexcept {}
186 };
187 
188 /*******************************************************************************
189  * Class ErcMsgConnectedPinWithoutWire
190  ******************************************************************************/
191 
196  Q_DECLARE_TR_FUNCTIONS(ErcMsgConnectedPinWithoutWire)
197 
198 public:
199  // Constructors / Destructor
201  explicit ErcMsgConnectedPinWithoutWire(const SI_SymbolPin& pin) noexcept;
203  const ErcMsgConnectedPinWithoutWire& other) noexcept
204  : RuleCheckMessage(other) {}
205  virtual ~ErcMsgConnectedPinWithoutWire() noexcept {}
206 };
207 
208 /*******************************************************************************
209  * Class ErcMsgUnconnectedJunction
210  ******************************************************************************/
211 
216  Q_DECLARE_TR_FUNCTIONS(ErcMsgUnconnectedJunction)
217 
218 public:
219  // Constructors / Destructor
220  ErcMsgUnconnectedJunction() = delete;
221  explicit ErcMsgUnconnectedJunction(const SI_NetPoint& netPoint) noexcept;
223  : RuleCheckMessage(other) {}
224  virtual ~ErcMsgUnconnectedJunction() noexcept {}
225 };
226 
227 /*******************************************************************************
228  * End of File
229  ******************************************************************************/
230 
231 } // namespace librepcb
232 
233 #endif
virtual ~ErcMsgUnconnectedRequiredSignal() noexcept
Definition: electricalrulecheckmessages.h:119
Definition: occmodel.cpp:77
virtual ~ErcMsgUnplacedRequiredGate() noexcept
Definition: electricalrulecheckmessages.h:164
ErcMsgUnplacedOptionalGate(const ErcMsgUnplacedOptionalGate &other) noexcept
Definition: electricalrulecheckmessages.h:183
virtual ~ErcMsgUnconnectedJunction() noexcept
Definition: electricalrulecheckmessages.h:224
virtual ~ErcMsgOpenWireInSegment() noexcept
Definition: electricalrulecheckmessages.h:98
ErcMsgUnusedNetClass(const ErcMsgUnusedNetClass &other) noexcept
Definition: electricalrulecheckmessages.h:58
The ComponentSymbolVariantItem class represents one symbol of a component symbol variant.
Definition: componentsymbolvariantitem.h:54
ErcMsgOpenWireInSegment(const ErcMsgOpenWireInSegment &other) noexcept
Definition: electricalrulecheckmessages.h:96
virtual ~ErcMsgUnplacedOptionalGate() noexcept
Definition: electricalrulecheckmessages.h:185
virtual ~ErcMsgConnectedPinWithoutWire() noexcept
Definition: electricalrulecheckmessages.h:205
The ErcMsgConnectedPinWithoutWire class.
Definition: electricalrulecheckmessages.h:195
The ErcMsgUnusedNetClass class.
Definition: electricalrulecheckmessages.h:51
The SI_NetPoint class.
Definition: si_netpoint.h:44
The ErcMsgUnconnectedRequiredSignal class.
Definition: electricalrulecheckmessages.h:108
ErcMsgUnconnectedJunction(const ErcMsgUnconnectedJunction &other) noexcept
Definition: electricalrulecheckmessages.h:222
The ErcMsgOpenNet class.
Definition: electricalrulecheckmessages.h:70
The SI_SymbolPin class.
Definition: si_symbolpin.h:52
The NetSignal class.
Definition: netsignal.h:50
ErcMsgUnconnectedRequiredSignal(const ErcMsgUnconnectedRequiredSignal &other) noexcept
Definition: electricalrulecheckmessages.h:116
The NetClass class.
Definition: netclass.h:46
ErcMsgForcedNetSignalNameConflict(const ErcMsgForcedNetSignalNameConflict &other) noexcept
Definition: electricalrulecheckmessages.h:137
ErcMsgUnplacedRequiredGate(const ErcMsgUnplacedRequiredGate &other) noexcept
Definition: electricalrulecheckmessages.h:162
The ErcMsgForcedNetSignalNameConflict class.
Definition: electricalrulecheckmessages.h:129
virtual ~ErcMsgForcedNetSignalNameConflict() noexcept
Definition: electricalrulecheckmessages.h:140
The ComponentSignalInstance class.
Definition: componentsignalinstance.h:49
The ComponentInstance class.
Definition: componentinstance.h:54
The RuleCheckMessage class.
Definition: rulecheckmessage.h:45
The ErcMsgUnplacedRequiredGate class.
Definition: electricalrulecheckmessages.h:153
The ErcMsgOpenWireInSegment class.
Definition: electricalrulecheckmessages.h:89
virtual ~ErcMsgOpenNet() noexcept
Definition: electricalrulecheckmessages.h:79
ErcMsgOpenNet(const ErcMsgOpenNet &other) noexcept
Definition: electricalrulecheckmessages.h:77
The ErcMsgUnplacedOptionalGate class.
Definition: electricalrulecheckmessages.h:174
virtual ~ErcMsgUnusedNetClass() noexcept
Definition: electricalrulecheckmessages.h:60
The SI_NetSegment class.
Definition: si_netsegment.h:53
The ErcMsgUnconnectedJunction class.
Definition: electricalrulecheckmessages.h:215
ErcMsgConnectedPinWithoutWire(const ErcMsgConnectedPinWithoutWire &other) noexcept
Definition: electricalrulecheckmessages.h:202