LibrePCB Developers Documentation
packagecheck.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_PACKAGECHECK_H
21 #define LIBREPCB_CORE_PACKAGECHECK_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
26 #include "../libraryelementcheck.h"
27 
28 #include <QtCore>
29 
30 /*******************************************************************************
31  * Namespace / Forward Declarations
32  ******************************************************************************/
33 namespace librepcb {
34 
35 class Package;
36 
37 /*******************************************************************************
38  * Class PackageCheck
39  ******************************************************************************/
40 
45 public:
46  // Constructors / Destructor
47  PackageCheck() = delete;
48  PackageCheck(const PackageCheck& other) = delete;
49  explicit PackageCheck(const Package& package) noexcept;
50  virtual ~PackageCheck() noexcept;
51 
52  // General Methods
53  virtual RuleCheckMessageList runChecks() const override;
54 
55  // Operator Overloadings
56  PackageCheck& operator=(const PackageCheck& rhs) = delete;
57 
58 protected: // Methods
59  void checkAssemblyType(MsgList& msgs) const;
60  void checkDuplicatePadNames(MsgList& msgs) const;
61  void checkMissingFootprint(MsgList& msgs) const;
62  void checkMissingTexts(MsgList& msgs) const;
63  void checkWrongTextLayers(MsgList& msgs) const;
64  void checkPackageOutlines(MsgList& msgs) const;
65  void checkCourtyards(MsgList& msgs) const;
66  void checkPadsClearanceToPads(MsgList& msgs) const;
67  void checkPadsClearanceToLegend(MsgList& msgs) const;
68  void checkPadsAnnularRing(MsgList& msgs) const;
69  void checkPadsConnectionPoint(MsgList& msgs) const;
70  void checkCustomPadOutline(MsgList& msgs) const;
71  void checkStopMaskOnPads(MsgList& msgs) const;
72  void checkSolderPasteOnPads(MsgList& msgs) const;
73  void checkCopperClearanceOnPads(MsgList& msgs) const;
74  void checkPadFunctions(MsgList& msgs) const;
75  void checkHolesStopMask(MsgList& msgs) const;
76  void checkZones(MsgList& msgs) const;
77  void checkFootprintModels(MsgList& msgs) const;
78 
79 private: // Data
80  const Package& mPackage;
81 };
82 
83 /*******************************************************************************
84  * End of File
85  ******************************************************************************/
86 
87 } // namespace librepcb
88 
89 #endif
The LibraryElementCheck class.
Definition: libraryelementcheck.h:44
void checkCopperClearanceOnPads(MsgList &msgs) const
Definition: packagecheck.cpp:486
void checkAssemblyType(MsgList &msgs) const
Definition: packagecheck.cpp:80
void checkStopMaskOnPads(MsgList &msgs) const
Definition: packagecheck.cpp:438
void checkMissingFootprint(MsgList &msgs) const
Definition: packagecheck.cpp:106
void checkPadFunctions(MsgList &msgs) const
Definition: packagecheck.cpp:509
Definition: occmodel.cpp:76
void checkMissingTexts(MsgList &msgs) const
Definition: packagecheck.cpp:112
QVector< std::shared_ptr< const RuleCheckMessage > > RuleCheckMessageList
Definition: rulecheckmessage.h:104
void checkPadsAnnularRing(MsgList &msgs) const
Definition: packagecheck.cpp:319
The Package class represents a package of a component (including footprint and 3D model) ...
Definition: package.h:59
void checkPadsClearanceToPads(MsgList &msgs) const
Definition: packagecheck.cpp:195
void checkHolesStopMask(MsgList &msgs) const
Definition: packagecheck.cpp:548
void checkPackageOutlines(MsgList &msgs) const
Definition: packagecheck.cpp:147
void checkZones(MsgList &msgs) const
Definition: packagecheck.cpp:562
The PackageCheck class.
Definition: packagecheck.h:44
virtual ~PackageCheck() noexcept
Definition: packagecheck.cpp:45
void checkDuplicatePadNames(MsgList &msgs) const
Definition: packagecheck.cpp:95
virtual RuleCheckMessageList runChecks() const override
Definition: packagecheck.cpp:52
void checkPadsClearanceToLegend(MsgList &msgs) const
Definition: packagecheck.cpp:265
RuleCheckMessageList MsgList
Definition: librarybaseelementcheck.h:60
const Package & mPackage
Definition: packagecheck.h:80
void checkPadsConnectionPoint(MsgList &msgs) const
Definition: packagecheck.cpp:394
void checkCustomPadOutline(MsgList &msgs) const
Definition: packagecheck.cpp:415
void checkFootprintModels(MsgList &msgs) const
Definition: packagecheck.cpp:579
PackageCheck & operator=(const PackageCheck &rhs)=delete
void checkSolderPasteOnPads(MsgList &msgs) const
Definition: packagecheck.cpp:460
void checkWrongTextLayers(MsgList &msgs) const
Definition: packagecheck.cpp:129
void checkCourtyards(MsgList &msgs) const
Definition: packagecheck.cpp:171