LibrePCB Developers Documentation
Loading...
Searching...
No Matches
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_BusSegment;
39class SI_NetSegment;
40class SI_Symbol;
41class Schematic;
42
43/*******************************************************************************
44 * Class ElectricalRuleCheck
45 ******************************************************************************/
46
52public:
53 // Constructors / Destructor
54 explicit ElectricalRuleCheck(const Project& project) noexcept;
55 ~ElectricalRuleCheck() noexcept;
56
57 // General Methods
59
60private: // Methods
61 void checkNetClasses(RuleCheckMessageList& msgs) const;
62 void checkNetSignals(RuleCheckMessageList& msgs) const;
63 void checkBuses(RuleCheckMessageList& msgs) const;
64 void checkComponents(RuleCheckMessageList& msgs) const;
66 RuleCheckMessageList& msgs) const;
67 void checkSchematics(RuleCheckMessageList& msgs) const;
68 void checkSymbols(const Schematic& schematic,
69 RuleCheckMessageList& msgs) const;
70 void checkPins(const SI_Symbol& symbol, RuleCheckMessageList& msgs) const;
71 void checkNetSegments(const Schematic& schematic,
72 RuleCheckMessageList& msgs) const;
73 void checkNetPoints(const SI_NetSegment& netSegment,
74 RuleCheckMessageList& msgs) const;
75 void checkBusSegments(const Schematic& schematic,
76 RuleCheckMessageList& msgs) const;
77 void checkBusJunctions(const SI_BusSegment& segment,
78 RuleCheckMessageList& msgs) const;
79
80private: // Data
82 mutable QSet<const NetSignal*> mOpenNetSignals;
83};
84
85/*******************************************************************************
86 * End of File
87 ******************************************************************************/
88
89} // namespace librepcb
90
91#endif
The ComponentInstance class.
Definition componentinstance.h:54
The ElectricalRuleCheck class checks a librepcb::Board for design rule violations.
Definition electricalrulecheck.h:51
void checkNetSegments(const Schematic &schematic, RuleCheckMessageList &msgs) const
Definition electricalrulecheck.cpp:210
~ElectricalRuleCheck() noexcept
Definition electricalrulecheck.cpp:58
void checkComponentSignals(const ComponentInstance &cmp, RuleCheckMessageList &msgs) const
Definition electricalrulecheck.cpp:171
void checkBusSegments(const Schematic &schematic, RuleCheckMessageList &msgs) const
Definition electricalrulecheck.cpp:240
void checkSchematics(RuleCheckMessageList &msgs) const
Definition electricalrulecheck.cpp:186
void checkComponents(RuleCheckMessageList &msgs) const
Definition electricalrulecheck.cpp:152
void checkBusJunctions(const SI_BusSegment &segment, RuleCheckMessageList &msgs) const
Definition electricalrulecheck.cpp:247
void checkBuses(RuleCheckMessageList &msgs) const
Definition electricalrulecheck.cpp:117
const Project & mProject
Definition electricalrulecheck.h:81
QSet< const NetSignal * > mOpenNetSignals
Definition electricalrulecheck.h:82
void checkSymbols(const Schematic &schematic, RuleCheckMessageList &msgs) const
Definition electricalrulecheck.cpp:194
void checkPins(const SI_Symbol &symbol, RuleCheckMessageList &msgs) const
Definition electricalrulecheck.cpp:201
void checkNetPoints(const SI_NetSegment &netSegment, RuleCheckMessageList &msgs) const
Definition electricalrulecheck.cpp:231
void checkNetSignals(RuleCheckMessageList &msgs) const
Definition electricalrulecheck.cpp:95
void checkNetClasses(RuleCheckMessageList &msgs) const
Definition electricalrulecheck.cpp:81
RuleCheckMessageList runChecks() const
Definition electricalrulecheck.cpp:65
The Project class represents a whole (opened) project with all its content.
Definition project.h:71
The SI_BusSegment class.
Definition si_bussegment.h:52
The SI_NetSegment class.
Definition si_netsegment.h:55
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:81
Definition occmodel.cpp:77
QVector< std::shared_ptr< const RuleCheckMessage > > RuleCheckMessageList
Definition rulecheckmessage.h:104