LibrePCB Developers Documentation
componentcheckmessages.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_COMPONENTCHECKMESSAGES_H
21 #define LIBREPCB_CORE_COMPONENTCHECKMESSAGES_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 ComponentSignal;
36 class ComponentSymbolVariant;
37 
38 /*******************************************************************************
39  * Class MsgDuplicateSignalName
40  ******************************************************************************/
41 
46  Q_DECLARE_TR_FUNCTIONS(MsgDuplicateSignalName)
47 
48 public:
49  // Constructors / Destructor
50  MsgDuplicateSignalName() = delete;
51  explicit MsgDuplicateSignalName(const ComponentSignal& signal) noexcept;
53  : RuleCheckMessage(other) {}
54  virtual ~MsgDuplicateSignalName() noexcept {}
55 };
56 
57 /*******************************************************************************
58  * Class MsgMissingComponentDefaultValue
59  ******************************************************************************/
60 
65  Q_DECLARE_TR_FUNCTIONS(MsgMissingComponentDefaultValue)
66 
67 public:
68  // Constructors / Destructor
71  const MsgMissingComponentDefaultValue& other) noexcept
72  : RuleCheckMessage(other) {}
73  virtual ~MsgMissingComponentDefaultValue() noexcept {}
74 };
75 
76 /*******************************************************************************
77  * Class MsgMissingComponentPrefix
78  ******************************************************************************/
79 
84  Q_DECLARE_TR_FUNCTIONS(MsgMissingComponentPrefix)
85 
86 public:
87  // Constructors / Destructor
88  MsgMissingComponentPrefix() noexcept;
90  : RuleCheckMessage(other) {}
91  virtual ~MsgMissingComponentPrefix() noexcept {}
92 };
93 
94 /*******************************************************************************
95  * Class MsgMissingSymbolVariant
96  ******************************************************************************/
97 
102  Q_DECLARE_TR_FUNCTIONS(MsgMissingSymbolVariant)
103 
104 public:
105  // Constructors / Destructor
106  MsgMissingSymbolVariant() noexcept;
108  : RuleCheckMessage(other) {}
109  virtual ~MsgMissingSymbolVariant() noexcept {}
110 };
111 
112 /*******************************************************************************
113  * Class MsgMissingSymbolVariantItem
114  ******************************************************************************/
115 
120  Q_DECLARE_TR_FUNCTIONS(MsgMissingSymbolVariantItem)
121 
122 public:
123  // Constructors / Destructor
124  MsgMissingSymbolVariantItem() noexcept;
126  std::shared_ptr<const ComponentSymbolVariant> symbVar) noexcept;
128  : RuleCheckMessage(other), mSymbVar(other.mSymbVar) {}
129  virtual ~MsgMissingSymbolVariantItem() noexcept {}
130 
131  // Getters
132  std::shared_ptr<const ComponentSymbolVariant> getSymbVar() const noexcept {
133  return mSymbVar;
134  }
135 
136 private:
137  std::shared_ptr<const ComponentSymbolVariant> mSymbVar;
138 };
139 
140 /*******************************************************************************
141  * Class MsgNonFunctionalComponentSignalInversionSign
142  ******************************************************************************/
143 
148  : public RuleCheckMessage {
149  Q_DECLARE_TR_FUNCTIONS(MsgNonFunctionalComponentSignalInversionSign)
150 
151 public:
152  // Constructors / Destructor
155  std::shared_ptr<const ComponentSignal> signal) noexcept;
157  const MsgNonFunctionalComponentSignalInversionSign& other) noexcept
158  : RuleCheckMessage(other), mSignal(other.mSignal) {}
160 
161  // Getters
162  const std::shared_ptr<const ComponentSignal>& getSignal() const noexcept {
163  return mSignal;
164  }
165 
166 private:
167  std::shared_ptr<const ComponentSignal> mSignal;
168 };
169 
170 /*******************************************************************************
171  * End of File
172  ******************************************************************************/
173 
174 } // namespace librepcb
175 
176 #endif
The MsgMissingComponentDefaultValue class.
Definition: componentcheckmessages.h:64
std::shared_ptr< const ComponentSignal > mSignal
Definition: componentcheckmessages.h:167
const std::shared_ptr< const ComponentSignal > & getSignal() const noexcept
Definition: componentcheckmessages.h:162
The MsgNonFunctionalComponentSignalInversionSign class.
Definition: componentcheckmessages.h:147
std::shared_ptr< const ComponentSymbolVariant > mSymbVar
Definition: componentcheckmessages.h:137
Definition: occmodel.cpp:76
virtual ~MsgNonFunctionalComponentSignalInversionSign() noexcept
Definition: componentcheckmessages.h:159
The MsgMissingSymbolVariant class.
Definition: componentcheckmessages.h:101
std::shared_ptr< const ComponentSymbolVariant > getSymbVar() const noexcept
Definition: componentcheckmessages.h:132
The MsgMissingSymbolVariantItem class.
Definition: componentcheckmessages.h:119
virtual ~MsgMissingComponentDefaultValue() noexcept
Definition: componentcheckmessages.h:73
MsgDuplicateSignalName(const MsgDuplicateSignalName &other) noexcept
Definition: componentcheckmessages.h:52
The MsgDuplicateSignalName class.
Definition: componentcheckmessages.h:45
virtual ~MsgMissingSymbolVariant() noexcept
Definition: componentcheckmessages.h:109
MsgNonFunctionalComponentSignalInversionSign(const MsgNonFunctionalComponentSignalInversionSign &other) noexcept
Definition: componentcheckmessages.h:156
virtual ~MsgMissingComponentPrefix() noexcept
Definition: componentcheckmessages.h:91
virtual ~MsgMissingSymbolVariantItem() noexcept
Definition: componentcheckmessages.h:129
MsgMissingSymbolVariant(const MsgMissingSymbolVariant &other) noexcept
Definition: componentcheckmessages.h:107
MsgMissingComponentDefaultValue(const MsgMissingComponentDefaultValue &other) noexcept
Definition: componentcheckmessages.h:70
MsgMissingSymbolVariantItem(const MsgMissingSymbolVariantItem &other) noexcept
Definition: componentcheckmessages.h:127
The RuleCheckMessage class.
Definition: rulecheckmessage.h:45
MsgMissingComponentPrefix(const MsgMissingComponentPrefix &other) noexcept
Definition: componentcheckmessages.h:89
The ComponentSignal class represents one signal of a component.
Definition: componentsignal.h:45
The MsgMissingComponentPrefix class.
Definition: componentcheckmessages.h:83
virtual ~MsgDuplicateSignalName() noexcept
Definition: componentcheckmessages.h:54