KiCad PCB EDA Suite
PARAM_CFG_TRACKWIDTHS Class Reference
Inheritance diagram for PARAM_CFG_TRACKWIDTHS:
PARAM_CFG_BASE

Public Member Functions

 PARAM_CFG_TRACKWIDTHS (std::vector< int > *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

std::vector< int > * m_Pt_param
 Pointer to the parameter value. More...
 

Detailed Description

Definition at line 145 of file board_design_settings.cpp.

Constructor & Destructor Documentation

PARAM_CFG_TRACKWIDTHS::PARAM_CFG_TRACKWIDTHS ( std::vector< int > *  ptparam,
const wxChar *  group = nullptr 
)
inline

Definition at line 151 of file board_design_settings.cpp.

151  :
152  PARAM_CFG_BASE( wxEmptyString, PARAM_TRACKWIDTHS, group )
153  {
154  m_Pt_param = ptparam;
155  }
PARAM_CFG_BASE(const wxString &ident, const paramcfg_id type, const wxChar *group=NULL, const wxString &legacy_ident=wxEmptyString)
std::vector< int > * m_Pt_param
Pointer to the parameter value.

Member Function Documentation

void PARAM_CFG_TRACKWIDTHS::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_BASE.

Definition at line 157 of file board_design_settings.cpp.

References TrackWidthKey.

158  {
159  if( !m_Pt_param || !aConfig )
160  return;
161 
162  m_Pt_param->clear();
163 
164  for( int index = 1; ; ++index )
165  {
166  wxString key = TrackWidthKey;
167  double width;
168 
169  if( !aConfig->Read( key << index, &width ) )
170  break;
171 
172  m_Pt_param->push_back( Millimeter2iu( width ) );
173  }
174  }
#define TrackWidthKey
std::vector< int > * m_Pt_param
Pointer to the parameter value.
void PARAM_CFG_TRACKWIDTHS::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_BASE.

Definition at line 176 of file board_design_settings.cpp.

References TrackWidthKey.

177  {
178  if( !m_Pt_param || !aConfig )
179  return;
180 
181  for( size_t index = 1; index <= m_Pt_param->size(); ++index )
182  {
183  wxString key = TrackWidthKey;
184  aConfig->Write( key << index, Iu2Millimeter( m_Pt_param->at( index - 1 ) ) );
185  }
186  }
#define TrackWidthKey
std::vector< int > * m_Pt_param
Pointer to the parameter value.

Member Data Documentation

wxString PARAM_CFG_BASE::m_Group
inherited

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

Definition at line 104 of file config_params.h.

Referenced by PARAM_CFG_BASE::PARAM_CFG_BASE().

wxString PARAM_CFG_BASE::m_Ident_legacy
inherited
std::vector<int>* PARAM_CFG_TRACKWIDTHS::m_Pt_param
protected

Pointer to the parameter value.

Definition at line 148 of file board_design_settings.cpp.

bool PARAM_CFG_BASE::m_Setup
inherited
paramcfg_id PARAM_CFG_BASE::m_Type
inherited

Type of parameter.

Definition at line 103 of file config_params.h.

Referenced by PARAM_CFG_BASE::PARAM_CFG_BASE(), and PARAM_CFG_INT_WITH_SCALE::PARAM_CFG_INT_WITH_SCALE().


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