KiCad PCB EDA Suite
PARAM_CFG_WXSTRING Class Reference

Configuration parameter - wxString Class. More...

#include <config_params.h>

Inheritance diagram for PARAM_CFG_WXSTRING:
PARAM_CFG_BASE

Public Member Functions

 PARAM_CFG_WXSTRING (const wxString &ident, wxString *ptparam, const wxChar *group=NULL)
 
 PARAM_CFG_WXSTRING (bool Insetup, const wxString &ident, wxString *ptparam, const wxString &default_val=wxEmptyString, 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

wxString * m_Pt_param
 Pointer to the parameter value. More...
 
wxString m_default
 The default value of the parameter. 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 - wxString Class.

Definition at line 261 of file config_params.h.

Constructor & Destructor Documentation

◆ PARAM_CFG_WXSTRING() [1/2]

PARAM_CFG_WXSTRING::PARAM_CFG_WXSTRING ( const wxString &  ident,
wxString *  ptparam,
const wxChar *  group = NULL 
)

Definition at line 417 of file config_params.cpp.

418  :
419  PARAM_CFG_BASE( ident, PARAM_WXSTRING, group )
420 {
421  m_Pt_param = ptparam;
422 }
PARAM_CFG_BASE(const wxString &ident, const paramcfg_id type, const wxChar *group=NULL, const wxString &legacy_ident=wxEmptyString)
wxString * m_Pt_param
Pointer to the parameter value.

References m_Pt_param.

◆ PARAM_CFG_WXSTRING() [2/2]

PARAM_CFG_WXSTRING::PARAM_CFG_WXSTRING ( bool  Insetup,
const wxString &  ident,
wxString *  ptparam,
const wxString &  default_val = wxEmptyString,
const wxChar *  group = NULL 
)

Definition at line 425 of file config_params.cpp.

426  :
427  PARAM_CFG_BASE( ident, PARAM_WXSTRING, group )
428 {
429  m_Pt_param = ptparam;
430  m_Setup = Insetup;
431  m_default = default_val;
432 }
wxString m_default
The default value of the parameter.
PARAM_CFG_BASE(const wxString &ident, const paramcfg_id type, const wxChar *group=NULL, const wxString &legacy_ident=wxEmptyString)
bool m_Setup
Install or Project based parameter, true == install.
wxString * m_Pt_param
Pointer to the parameter value.

References m_default, m_Pt_param, and PARAM_CFG_BASE::m_Setup.

Member Function Documentation

◆ ReadParam()

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

Definition at line 435 of file config_params.cpp.

436 {
437  if( !m_Pt_param || !aConfig )
438  return;
439 
440  *m_Pt_param = aConfig->Read( m_Ident, m_default );
441 }
wxString m_default
The default value of the parameter.
wxString * m_Pt_param
Pointer to the parameter value.
wxString m_Ident
Keyword in config data.

References m_default, PARAM_CFG_BASE::m_Ident, and m_Pt_param.

◆ SaveParam()

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

Definition at line 444 of file config_params.cpp.

445 {
446  if( !m_Pt_param || !aConfig )
447  return;
448 
449  aConfig->Write( m_Ident, *m_Pt_param );
450 }
wxString * m_Pt_param
Pointer to the parameter value.
wxString m_Ident
Keyword in config data.

References PARAM_CFG_BASE::m_Ident, and m_Pt_param.

Member Data Documentation

◆ m_default

wxString PARAM_CFG_WXSTRING::m_default

The default value of the parameter.

Definition at line 265 of file config_params.h.

Referenced by PARAM_CFG_WXSTRING(), and ReadParam().

◆ m_Group

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().

◆ m_Ident

◆ m_Ident_legacy

wxString PARAM_CFG_BASE::m_Ident_legacy
inherited

◆ m_Pt_param

wxString* PARAM_CFG_WXSTRING::m_Pt_param

Pointer to the parameter value.

Definition at line 264 of file config_params.h.

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

◆ m_Setup

bool PARAM_CFG_BASE::m_Setup
inherited

◆ m_Type

paramcfg_id PARAM_CFG_BASE::m_Type
inherited

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