KiCad PCB EDA Suite
ERC_SETTINGS Class Reference

Container for ERC settings. More...

#include <erc_settings.h>

Public Member Functions

 ERC_SETTINGS ()
 
void LoadDefaults ()
 
bool operator== (const ERC_SETTINGS &other) const
 
bool operator!= (const ERC_SETTINGS &other) const
 
bool IsTestEnabled (int aErrorCode) const
 
std::vector< PARAM_CFG * > GetProjectFileParameters ()
 

Public Attributes

std::map< int, int > m_Severities
 

Detailed Description

Container for ERC settings.

Currently only stores flags about checks to run, but could later be expanded to contain the matrix of electrical pin types.

Definition at line 37 of file erc_settings.h.

Constructor & Destructor Documentation

◆ ERC_SETTINGS()

ERC_SETTINGS::ERC_SETTINGS ( )
inline

Definition at line 40 of file erc_settings.h.

41  {
42  for( int i = ERCE_FIRST; i <= ERCE_LAST; ++i )
44 
46  }
Definition: erc.h:55
Definition: erc.h:75
std::map< int, int > m_Severities
Definition: erc_settings.h:75

References ERCE_FIRST, ERCE_LAST, ERCE_UNSPECIFIED, m_Severities, RPT_SEVERITY_ERROR, and RPT_SEVERITY_UNDEFINED.

Member Function Documentation

◆ GetProjectFileParameters()

std::vector< PARAM_CFG * > ERC_SETTINGS::GetProjectFileParameters ( void  )

Definition at line 429 of file eeschema_config.cpp.

430 {
431  std::vector<PARAM_CFG*> params;
432 
433  params.push_back( new PARAM_CFG_SEVERITIES( this ) );
434 
435  return params;
436 }

Referenced by DIALOG_SCHEMATIC_SETUP::OnAuxiliaryAction().

◆ IsTestEnabled()

bool ERC_SETTINGS::IsTestEnabled ( int  aErrorCode) const
inline

Definition at line 68 of file erc_settings.h.

69  {
70  return m_Severities.at( aErrorCode ) != RPT_SEVERITY_IGNORE;
71  }
std::map< int, int > m_Severities
Definition: erc_settings.h:75

References m_Severities, and RPT_SEVERITY_IGNORE.

Referenced by CONNECTION_GRAPH::ercCheckLabels(), CONNECTION_GRAPH::RunERC(), PARAM_CFG_SEVERITIES::SaveParam(), and DIALOG_ERC::TestErc().

◆ LoadDefaults()

◆ operator!=()

bool ERC_SETTINGS::operator!= ( const ERC_SETTINGS other) const
inline

Definition at line 63 of file erc_settings.h.

64  {
65  return !( other == *this );
66  }

◆ operator==()

bool ERC_SETTINGS::operator== ( const ERC_SETTINGS other) const
inline

Definition at line 58 of file erc_settings.h.

59  {
60  return ( other.m_Severities == m_Severities );
61  }
std::map< int, int > m_Severities
Definition: erc_settings.h:75

References m_Severities.

Member Data Documentation

◆ m_Severities


The documentation for this class was generated from the following files: