LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
msgoverlappingsymbolpins.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_LIBRARY_MSGOVERLAPPINGSYMBOLPINS_H
21 #define LIBREPCB_LIBRARY_MSGOVERLAPPINGSYMBOLPINS_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
26 #include "../../msg/libraryelementcheckmessage.h"
27 
29 
30 #include <QtCore>
31 
32 /*******************************************************************************
33  * Namespace / Forward Declarations
34  ******************************************************************************/
35 namespace librepcb {
36 namespace library {
37 
38 class SymbolPin;
39 
40 /*******************************************************************************
41  * Class MsgOverlappingSymbolPins
42  ******************************************************************************/
43 
48  Q_DECLARE_TR_FUNCTIONS(MsgOverlappingSymbolPins)
49 
50 public:
51  // Constructors / Destructor
52  MsgOverlappingSymbolPins() = delete;
54  QVector<std::shared_ptr<const SymbolPin>> pins) noexcept;
56  : LibraryElementCheckMessage(other), mPins(other.mPins) {}
57  virtual ~MsgOverlappingSymbolPins() noexcept;
58 
59  // Getters
60  const QVector<std::shared_ptr<const SymbolPin>>& getPins() const noexcept {
61  return mPins;
62  }
63 
64 private:
65  static QString buildMessage(
66  const QVector<std::shared_ptr<const SymbolPin>>& pins) noexcept;
67 
68 private: // Data
69  QVector<std::shared_ptr<const SymbolPin>> mPins;
70 };
71 
72 /*******************************************************************************
73  * End of File
74  ******************************************************************************/
75 
76 } // namespace library
77 } // namespace librepcb
78 
79 #endif // LIBREPCB_LIBRARY_MSGOVERLAPPINGSYMBOLPINS_H
QVector< std::shared_ptr< const SymbolPin > > mPins
Definition: msgoverlappingsymbolpins.h:69
The LibraryElementCheckMessage class.
Definition: libraryelementcheckmessage.h:44
virtual ~MsgOverlappingSymbolPins() noexcept
Definition: msgoverlappingsymbolpins.cpp:49
static QString buildMessage(const QVector< std::shared_ptr< const SymbolPin >> &pins) noexcept
Definition: msgoverlappingsymbolpins.cpp:56
const QVector< std::shared_ptr< const SymbolPin > > & getPins() const noexcept
Definition: msgoverlappingsymbolpins.h:60
The SymbolPin class represents one pin of a symbol.
Definition: symbolpin.h:54
MsgOverlappingSymbolPins(const MsgOverlappingSymbolPins &other) noexcept
Definition: msgoverlappingsymbolpins.h:55
The MsgOverlappingSymbolPins class.
Definition: msgoverlappingsymbolpins.h:47