KiCad PCB EDA Suite
PARAM_CFG_SEVERITIES Class Reference
Inheritance diagram for PARAM_CFG_SEVERITIES:
PARAM_CFG

Public Member Functions

 PARAM_CFG_SEVERITIES (ERC_SETTINGS *ptparam, const wxChar *group=nullptr)
 
void ReadParam (wxConfigBase *aConfig) const override
 Function ReadParam reads the value of the parameter stored in aConfig. More...
 
void SaveParam (wxConfigBase *aConfig) const override
 Function SaveParam saves the value of the parameter stored in aConfig. More...
 

Public Attributes

wxString m_Ident
 Keyword in config data. More...
 
paramcfg_id m_Type
 Type of parameter. More...
 
wxString m_Group
 Group name (this is like a path in the config data) More...
 
bool m_Setup
 Install or Project based parameter, true == install. More...
 
wxString m_Ident_legacy
 

Protected Attributes

ERC_SETTINGSm_Pt_param
 Pointer to the parameter value. More...
 

Detailed Description

Definition at line 100 of file eeschema_config.cpp.

Constructor & Destructor Documentation

◆ PARAM_CFG_SEVERITIES()

PARAM_CFG_SEVERITIES::PARAM_CFG_SEVERITIES ( ERC_SETTINGS ptparam,
const wxChar *  group = nullptr 
)
inline

Definition at line 106 of file eeschema_config.cpp.

106  :
107  PARAM_CFG( wxEmptyString, PARAM_SEVERITIES, group )
108  {
109  m_Pt_param = ptparam;
110  }
ERC_SETTINGS * m_Pt_param
Pointer to the parameter value.
PARAM_CFG(const wxString &ident, const paramcfg_id type, const wxChar *group=NULL, const wxString &legacy_ident=wxEmptyString)

References m_Pt_param.

Member Function Documentation

◆ ReadParam()

void PARAM_CFG_SEVERITIES::ReadParam ( wxConfigBase *  aConfig) const
inlineoverridevirtual

Function ReadParam reads the value of the parameter stored in aConfig.

Parameters
aConfig= the wxConfigBase that holds the parameter

Reimplemented from PARAM_CFG.

Definition at line 112 of file eeschema_config.cpp.

113  {
114  if( !m_Pt_param || !aConfig )
115  return;
116 
117  wxString oldPath = aConfig->GetPath();
118 
119  // Read legacy settings first so that modern settings will overwrite them
120  bool flag;
121 
122  if( aConfig->Read( wxT( "ERC_TestSimilarLabels" ), &flag, true ) )
123  {
124  if( flag )
126  else
128  }
129 
130  if( aConfig->Read( wxT( "ERC_CheckUniqueGlobalLabels" ), &flag, true ) )
131  {
132  if( flag )
134  else
136  }
137 
138  if( aConfig->Read( wxT( "ERC_CheckBusDriverConflicts" ), &flag, true ) )
139  {
140  if( flag )
142  else
144  }
145 
146  if( aConfig->Read( wxT( "ERC_CheckBusEntryConflicts" ), &flag, true ) )
147  {
148  if( flag )
150  else
152  }
153 
154  if( aConfig->Read( wxT( "ERC_CheckBusToBusConflicts" ), &flag, true ) )
155  {
156  if( flag )
158  else
160  }
161 
162  if( aConfig->Read( wxT( "ERC_CheckBusToNetConflicts" ), &flag, true ) )
163  {
164  if( flag )
166  else
168  }
169 
170  // TO DO: figure out what we're going to use as keys here so we can read/write these....
171 
172  aConfig->SetPath( oldPath );
173  }
A connection between bus objects doesn't share at least one net.
Definition: erc_settings.h:55
A bus wire is graphically connected to a net port/pin (or vice versa).
Definition: erc_settings.h:57
ERC_SETTINGS * m_Pt_param
Pointer to the parameter value.
2 labels are equal for case insensitive comparisons.
Definition: erc_settings.h:46
std::map< int, int > m_Severities
Definition: erc_settings.h:154
A wire connected to a bus doesn't match the bus.
Definition: erc_settings.h:53
A global label is unique.
Definition: erc_settings.h:59
Conflicting drivers (labels, etc) on a subgraph.
Definition: erc_settings.h:52

References ERCE_BUS_ENTRY_CONFLICT, ERCE_BUS_TO_BUS_CONFLICT, ERCE_BUS_TO_NET_CONFLICT, ERCE_DRIVER_CONFLICT, ERCE_GLOBLABEL, ERCE_SIMILAR_LABELS, m_Pt_param, ERC_SETTINGS::m_Severities, RPT_SEVERITY_ERROR, RPT_SEVERITY_IGNORE, and RPT_SEVERITY_WARNING.

◆ SaveParam()

void PARAM_CFG_SEVERITIES::SaveParam ( wxConfigBase *  aConfig) const
inlineoverridevirtual

Function SaveParam saves the value of the parameter stored in aConfig.

Parameters
aConfig= the wxConfigBase that can store the parameter

Reimplemented from PARAM_CFG.

Definition at line 175 of file eeschema_config.cpp.

176  {
177  if( !m_Pt_param || !aConfig )
178  return;
179 
180  wxString oldPath = aConfig->GetPath();
181 
182  // TO DO: figure out what we're going to use as keys here so we can read/write these....
183 
184  // TO DO: for now just write out the legacy ones so we don't lose them
185  // TO DO: remove this once the new scheme is in place
186  aConfig->Write( wxT( "ERC_TestSimilarLabels" ),
188  aConfig->Write( wxT( "ERC_CheckUniqueGlobalLabels" ),
190  aConfig->Write( wxT( "ERC_CheckBusDriverConflicts" ),
192  aConfig->Write( wxT( "ERC_CheckBusEntryConflicts" ),
194  aConfig->Write( wxT( "ERC_CheckBusToBusConflicts" ),
196  aConfig->Write( wxT( "ERC_CheckBusToNetConflicts" ),
198 
199  aConfig->SetPath( oldPath );
200  }
A connection between bus objects doesn't share at least one net.
Definition: erc_settings.h:55
bool IsTestEnabled(int aErrorCode) const
Definition: erc_settings.h:111
A bus wire is graphically connected to a net port/pin (or vice versa).
Definition: erc_settings.h:57
ERC_SETTINGS * m_Pt_param
Pointer to the parameter value.
2 labels are equal for case insensitive comparisons.
Definition: erc_settings.h:46
A wire connected to a bus doesn't match the bus.
Definition: erc_settings.h:53
A global label is unique.
Definition: erc_settings.h:59
Conflicting drivers (labels, etc) on a subgraph.
Definition: erc_settings.h:52

References ERCE_BUS_ENTRY_CONFLICT, ERCE_BUS_TO_BUS_CONFLICT, ERCE_BUS_TO_NET_CONFLICT, ERCE_DRIVER_CONFLICT, ERCE_GLOBLABEL, ERCE_SIMILAR_LABELS, ERC_SETTINGS::IsTestEnabled(), and m_Pt_param.

Member Data Documentation

◆ m_Group

wxString PARAM_CFG::m_Group
inherited

Group name (this is like a path in the config data)

Definition at line 90 of file config_params.h.

Referenced by PARAM_CFG::PARAM_CFG().

◆ m_Ident

◆ m_Ident_legacy

wxString PARAM_CFG::m_Ident_legacy
inherited

◆ m_Pt_param

ERC_SETTINGS* PARAM_CFG_SEVERITIES::m_Pt_param
protected

Pointer to the parameter value.

Definition at line 103 of file eeschema_config.cpp.

Referenced by PARAM_CFG_SEVERITIES(), ReadParam(), and SaveParam().

◆ m_Setup

◆ m_Type

paramcfg_id PARAM_CFG::m_Type
inherited

Type of parameter.

Definition at line 89 of file config_params.h.

Referenced by dumpParamCfg(), PARAM_CFG::PARAM_CFG(), and PARAM_CFG_INT_WITH_SCALE::PARAM_CFG_INT_WITH_SCALE().


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