KiCad PCB EDA Suite
erc.h
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2009 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
6  * Copyright (C) 2009-2020 KiCad Developers, see change_log.txt for contributors.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
30 #ifndef _ERC_H
31 #define _ERC_H
32 
33 #include <erc_settings.h>
34 
35 
36 class NETLIST_OBJECT;
38 class SCH_SHEET_LIST;
39 class SCHEMATIC;
40 
41 namespace KIGFX
42 {
43 class WS_PROXY_VIEW_ITEM;
44 }
45 
46 
47 extern const wxString CommentERC_H[];
48 extern const wxString CommentERC_V[];
49 
50 
52 {
53 public:
54 
55  ERC_TESTER( SCHEMATIC* aSchematic ) :
56  m_schematic( aSchematic )
57  {
58  }
59 
69  void TestOthersItems( NETLIST_OBJECT_LIST* aList, unsigned aNetItemRef, unsigned aNetStart,
70  int* aMinConnexion );
71 
79  int TestDuplicateSheetNames( bool aCreateMarker );
80 
84  void TestTextVars( KIGFX::WS_PROXY_VIEW_ITEM* aWorksheet );
85 
95 
101 
107  int TestNoConnectPins();
108 
109 private:
115  void diagnose( NETLIST_OBJECT* NetItemRef, NETLIST_OBJECT* NetItemTst, int MinConnexion,
116  PIN_ERROR Diag );
117 
119 };
120 
121 
122 #endif // _ERC_H
SCH_SHEET_LIST.
Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer.
Definition: color4d.cpp:175
Holds all the data relating to one schematic A schematic may consist of one or more sheets (and one r...
Definition: schematic.h:42
void diagnose(NETLIST_OBJECT *NetItemRef, NETLIST_OBJECT *NetItemTst, int MinConnexion, PIN_ERROR Diag)
Performs ERC testing and creates an ERC marker to show the ERC problem for aNetItemRef or between aNe...
const wxString CommentERC_H[]
void TestOthersItems(NETLIST_OBJECT_LIST *aList, unsigned aNetItemRef, unsigned aNetStart, int *aMinConnexion)
Perform ERC testing for electrical conflicts between NetItemRef and other items (mainly pin) on the s...
void TestTextVars(KIGFX::WS_PROXY_VIEW_ITEM *aWorksheet)
Checks for any unresolved text variable references.
Definition: erc.h:51
PIN_ERROR
The values a pin-to-pin entry in the pin matrix can take on.
Definition: erc_settings.h:66
NETLIST_OBJECT_LIST is a container holding and owning NETLIST_OBJECTs, which are connected items in a...
int TestConflictingBusAliases()
Checks that there are not conflicting bus alias definitions in the schematic.
int TestMultiunitFootprints()
Test if all units of each multiunit component have the same footprint assigned.
const wxString CommentERC_V[]
ERC_TESTER(SCHEMATIC *aSchematic)
Definition: erc.h:55
SCHEMATIC * m_schematic
Definition: erc.h:118
int TestNoConnectPins()
In KiCad 5 and earlier, you could connect stuff up to pins with NC electrical type.
int TestDuplicateSheetNames(bool aCreateMarker)
inside a given sheet, one cannot have sheets with duplicate names (file names can be duplicated).