KiCad PCB EDA Suite
PARAM_CFG_WXSTRING_SET Class Reference

Configuration parameter - std::set<wxString> More...

#include <config_params.h>

Inheritance diagram for PARAM_CFG_WXSTRING_SET:
PARAM_CFG

Public Member Functions

 PARAM_CFG_WXSTRING_SET (const wxString &ident, std::set< wxString > *ptparam, const wxChar *group=NULL)
 
 PARAM_CFG_WXSTRING_SET (bool Insetup, const wxString &ident, std::set< wxString > *ptparam, const wxChar *group=NULL)
 
virtual void ReadParam (wxConfigBase *aConfig) const override
 Function ReadParam reads the value of the parameter stored in aConfig. More...
 
virtual void SaveParam (wxConfigBase *aConfig) const override
 Function SaveParam saves the value of the parameter stored in aConfig. More...
 

Public Attributes

std::set< wxString > * m_Pt_param
 Pointer to the parameter value. More...
 
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
 

Detailed Description

Configuration parameter - std::set<wxString>

Definition at line 250 of file config_params.h.

Constructor & Destructor Documentation

◆ PARAM_CFG_WXSTRING_SET() [1/2]

PARAM_CFG_WXSTRING_SET::PARAM_CFG_WXSTRING_SET ( const wxString &  ident,
std::set< wxString > *  ptparam,
const wxChar *  group = NULL 
)

Definition at line 380 of file config_params.cpp.

381  :
382  PARAM_CFG( ident, PARAM_WXSTRING_SET, group )
383 {
384  m_Pt_param = ptparam;
385 }
std::set< wxString > * 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.

◆ PARAM_CFG_WXSTRING_SET() [2/2]

PARAM_CFG_WXSTRING_SET::PARAM_CFG_WXSTRING_SET ( bool  Insetup,
const wxString &  ident,
std::set< wxString > *  ptparam,
const wxChar *  group = NULL 
)

Definition at line 388 of file config_params.cpp.

389  :
390  PARAM_CFG( ident, PARAM_WXSTRING, group )
391 {
392  m_Pt_param = ptparam;
393  m_Setup = Insetup;
394 }
bool m_Setup
Install or Project based parameter, true == install.
Definition: config_params.h:91
std::set< wxString > * 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, and PARAM_CFG::m_Setup.

Member Function Documentation

◆ ReadParam()

void PARAM_CFG_WXSTRING_SET::ReadParam ( wxConfigBase *  aConfig) const
overridevirtual

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 397 of file config_params.cpp.

398 {
399  if( !m_Pt_param || !aConfig )
400  return;
401 
402  for( int i = 1; true; ++i )
403  {
404  wxString key, data;
405 
406  key = m_Ident;
407  key << i;
408  data = aConfig->Read( key, wxT( "" ) );
409 
410  if( data.IsEmpty() )
411  break;
412 
413  m_Pt_param->insert( data );
414  }
415 }
wxString m_Ident
Keyword in config data.
Definition: config_params.h:88
std::set< wxString > * m_Pt_param
Pointer to the parameter value.

References PARAM_CFG::m_Ident, and m_Pt_param.

◆ SaveParam()

void PARAM_CFG_WXSTRING_SET::SaveParam ( wxConfigBase *  aConfig) const
overridevirtual

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 418 of file config_params.cpp.

419 {
420  if( !m_Pt_param || !aConfig )
421  return;
422 
423  int i = 1;
424 
425  for( const wxString& str : *m_Pt_param )
426  {
427  wxString key, data;
428 
429  key = m_Ident;
430  key << i++;
431 
432  aConfig->Write( key, str );
433  }
434 }
wxString m_Ident
Keyword in config data.
Definition: config_params.h:88
std::set< wxString > * m_Pt_param
Pointer to the parameter value.

References PARAM_CFG::m_Ident, 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

std::set<wxString>* PARAM_CFG_WXSTRING_SET::m_Pt_param

Pointer to the parameter value.

Definition at line 253 of file config_params.h.

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

◆ m_Setup

bool PARAM_CFG::m_Setup
inherited

◆ 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 files: