LibrePCB Developers Documentation
electricalrulecheck.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_ELECTRICALRULECHECK_H
21#define LIBREPCB_CORE_ELECTRICALRULECHECK_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include "../../rulecheck/rulecheckmessage.h"
27
28#include <QtCore>
29
30/*******************************************************************************
31 * Namespace / Forward Declarations
32 ******************************************************************************/
33namespace librepcb {
34
35class ComponentInstance;
36class NetSignal;
37class Project;
38class SI_NetSegment;
39class SI_Symbol;
40class Schematic;
41
42/*******************************************************************************
43 * Class ElectricalRuleCheck
44 ******************************************************************************/
45
51public:
52 // Constructors / Destructor
53 explicit ElectricalRuleCheck(const Project& project) noexcept;
54 ~ElectricalRuleCheck() noexcept;
55
56 // General Methods
58
59private: // Methods
60 void checkNetClasses(RuleCheckMessageList& msgs) const;
61 void checkNetSignals(RuleCheckMessageList& msgs) const;
62 void checkComponents(RuleCheckMessageList& msgs) const;
64 RuleCheckMessageList& msgs) const;
65 void checkSchematics(RuleCheckMessageList& msgs) const;
66 void checkSymbols(const Schematic& schematic,
67 RuleCheckMessageList& msgs) const;
68 void checkPins(const SI_Symbol& symbol, RuleCheckMessageList& msgs) const;
69 void checkNetSegments(const Schematic& schematic,
70 RuleCheckMessageList& msgs) const;
71 void checkNetPoints(const SI_NetSegment& netSegment,
72 RuleCheckMessageList& msgs) const;
73
74private: // Data
76 mutable QSet<const NetSignal*> mOpenNetSignals;
77};
78
79/*******************************************************************************
80 * End of File
81 ******************************************************************************/
82
83} // namespace librepcb
84
85#endif
The ComponentInstance class.
Definition: componentinstance.h:54
The ElectricalRuleCheck class checks a librepcb::Board for design rule violations.
Definition: electricalrulecheck.h:50
void checkNetSegments(const Schematic &schematic, RuleCheckMessageList &msgs) const
Definition: electricalrulecheck.cpp:170
~ElectricalRuleCheck() noexcept
Definition: electricalrulecheck.cpp:55
void checkComponentSignals(const ComponentInstance &cmp, RuleCheckMessageList &msgs) const
Definition: electricalrulecheck.cpp:132
void checkSchematics(RuleCheckMessageList &msgs) const
Definition: electricalrulecheck.cpp:147
void checkComponents(RuleCheckMessageList &msgs) const
Definition: electricalrulecheck.cpp:113
const Project & mProject
Definition: electricalrulecheck.h:75
QSet< const NetSignal * > mOpenNetSignals
Definition: electricalrulecheck.h:76
void checkSymbols(const Schematic &schematic, RuleCheckMessageList &msgs) const
Definition: electricalrulecheck.cpp:154
void checkPins(const SI_Symbol &symbol, RuleCheckMessageList &msgs) const
Definition: electricalrulecheck.cpp:161
ElectricalRuleCheck(const Project &project) noexcept
Definition: electricalrulecheck.cpp:51
void checkNetPoints(const SI_NetSegment &netSegment, RuleCheckMessageList &msgs) const
Definition: electricalrulecheck.cpp:191
void checkNetSignals(RuleCheckMessageList &msgs) const
Definition: electricalrulecheck.cpp:91
void checkNetClasses(RuleCheckMessageList &msgs) const
Definition: electricalrulecheck.cpp:77
RuleCheckMessageList runChecks() const
Definition: electricalrulecheck.cpp:62
The Project class represents a whole (opened) project with all its content.
Definition: project.h:71
The SI_NetSegment class.
Definition: si_netsegment.h:53
The SI_Symbol class.
Definition: si_symbol.h:54
The Schematic class represents one schematic page of a project and is always part of a circuit.
Definition: schematic.h:74
Definition: occmodel.cpp:77
QVector< std::shared_ptr< const RuleCheckMessage > > RuleCheckMessageList
Definition: rulecheckmessage.h:104