KiCad PCB EDA Suite
erc_item.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) 2020 KiCad Developers, see AUTHORS.txt for contributors.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (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, you may find one here:
18  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19  * or you may search the http://www.gnu.org website for the version 2 license,
20  * or you may write to the Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22  */
23 
24 #ifndef ERC_ITEM_H
25 #define ERC_ITEM_H
26 
27 #include <rc_item.h>
28 
29 
30 class ERC_ITEM : public RC_ITEM
31 {
32 public:
37  static ERC_ITEM* Create( int aErrorCode );
38 
39  static std::vector<std::reference_wrapper<RC_ITEM>> GetItemsWithSeverities()
40  {
41  return allItemTypes;
42  }
43 
44 private:
45  ERC_ITEM( int aErrorCode = 0, const wxString& aTitle = "", const wxString& aSettingsKey = "" )
46  {
47  m_errorCode = aErrorCode;
48  m_errorTitle = aTitle;
49  m_settingsKey = aSettingsKey;
50  }
51 
53  static std::vector<std::reference_wrapper<RC_ITEM>> allItemTypes;
54 
75 };
76 
77 
78 #endif // ERC_ITEM_H
static ERC_ITEM busToNetConflict
Definition: erc_item.h:73
static ERC_ITEM pinTableError
Definition: erc_item.h:59
static ERC_ITEM noConnectConnected
Definition: erc_item.h:61
wxString m_settingsKey
The key used to describe this type of error in settings.
Definition: rc_item.h:79
static std::vector< std::reference_wrapper< RC_ITEM > > GetItemsWithSeverities()
Definition: erc_item.h:39
RC_ITEM is a holder for a DRC (in Pcbnew) or ERC (in Eeschema) error item.
Definition: rc_item.h:73
static ERC_ITEM differentUnitNet
Definition: erc_item.h:67
static ERC_ITEM busLabelSyntax
Definition: erc_item.h:71
static ERC_ITEM similarLabels
Definition: erc_item.h:65
int m_errorCode
Definition: rc_item.h:76
static ERC_ITEM multipleNetNames
Definition: erc_item.h:69
static ERC_ITEM labelDangling
Definition: erc_item.h:63
static ERC_ITEM noConnectDangling
Definition: erc_item.h:62
static ERC_ITEM pinTableWarning
Definition: erc_item.h:58
static ERC_ITEM unresolvedVariable
Definition: erc_item.h:74
static ERC_ITEM pinNotDriven
Definition: erc_item.h:57
static ERC_ITEM duplicateSheetName
Definition: erc_item.h:55
static ERC_ITEM * Create(int aErrorCode)
Constructs an ERC_ITEM for the given error code.
Definition: erc_item.cpp:144
static ERC_ITEM busDefinitionConflict
Definition: erc_item.h:68
static ERC_ITEM netNotBusMember
Definition: erc_item.h:70
static std::vector< std::reference_wrapper< RC_ITEM > > allItemTypes
A list of all ERC_ITEM types which are valid error codes.
Definition: erc_item.h:53
static ERC_ITEM pinNotConnected
Definition: erc_item.h:56
static ERC_ITEM differentUnitFootprint
Definition: erc_item.h:66
static ERC_ITEM busToBusConflict
Definition: erc_item.h:72
static ERC_ITEM hierLabelMismatch
Definition: erc_item.h:60
static ERC_ITEM globalLabelDangling
Definition: erc_item.h:64
ERC_ITEM(int aErrorCode=0, const wxString &aTitle="", const wxString &aSettingsKey="")
Definition: erc_item.h:45
wxString m_errorTitle
The string describing the type of error.
Definition: rc_item.h:78