KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PARAM_CFG_INT Class Reference

Configuration object for integers. More...

#include <config_params.h>

Inheritance diagram for PARAM_CFG_INT:
PARAM_CFG PARAM_CFG_INT_WITH_SCALE

Public Member Functions

 PARAM_CFG_INT (const wxString &ident, int *ptparam, int default_val=0, int min=std::numeric_limits< int >::min(), int max=std::numeric_limits< int >::max(), const wxChar *group=nullptr, const wxString &legacy_ident=wxEmptyString)
 
 PARAM_CFG_INT (bool Insetup, const wxString &ident, int *ptparam, int default_val=0, int min=std::numeric_limits< int >::min(), int max=std::numeric_limits< int >::max(), const wxChar *group=nullptr, const wxString &legacy_ident=wxEmptyString)
 
virtual void ReadParam (wxConfigBase *aConfig) const override
 Read the value of the parameter stored in aConfig.
 
virtual void SaveParam (wxConfigBase *aConfig) const override
 Save the value of the parameter stored in aConfig.
 

Public Attributes

int * m_Pt_param
 Pointer to the parameter value.
 
int m_Min
 
int m_Max
 Minimum and maximum values of the param type.
 
int m_Default
 The default value of the parameter.
 
wxString m_Ident
 Keyword in config data.
 
paramcfg_id m_Type
 Type of parameter.
 
wxString m_Group
 Group name (this is like a path in the config data)
 
bool m_Setup
 Install or Project based parameter, true == install.
 
wxString m_Ident_legacy
 

Detailed Description

Configuration object for integers.

Definition at line 114 of file config_params.h.

Constructor & Destructor Documentation

◆ PARAM_CFG_INT() [1/2]

PARAM_CFG_INT::PARAM_CFG_INT ( const wxString &  ident,
int *  ptparam,
int  default_val = 0,
int  min = std::numeric_limits<int>::min(),
int  max = std::numeric_limits<int>::max(),
const wxChar *  group = nullptr,
const wxString &  legacy_ident = wxEmptyString 
)

Definition at line 141 of file config_params.cpp.

References m_Default, m_Max, m_Min, and m_Pt_param.

◆ PARAM_CFG_INT() [2/2]

PARAM_CFG_INT::PARAM_CFG_INT ( bool  Insetup,
const wxString &  ident,
int *  ptparam,
int  default_val = 0,
int  min = std::numeric_limits<int>::min(),
int  max = std::numeric_limits<int>::max(),
const wxChar *  group = nullptr,
const wxString &  legacy_ident = wxEmptyString 
)

Definition at line 152 of file config_params.cpp.

References m_Default, m_Max, m_Min, m_Pt_param, and PARAM_CFG::m_Setup.

Member Function Documentation

◆ ReadParam()

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

Read the value of the parameter stored in aConfig.

Parameters
aConfigthe wxConfigBase that holds the parameter.

Reimplemented from PARAM_CFG.

Reimplemented in PARAM_CFG_INT_WITH_SCALE.

Definition at line 164 of file config_params.cpp.

References m_Default, PARAM_CFG::m_Ident, PARAM_CFG::m_Ident_legacy, m_Max, m_Min, and m_Pt_param.

◆ SaveParam()

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

Save the value of the parameter stored in aConfig.

Parameters
aConfigthe wxConfigBase that can store the parameter.

Reimplemented from PARAM_CFG.

Reimplemented in PARAM_CFG_INT_WITH_SCALE.

Definition at line 181 of file config_params.cpp.

References PARAM_CFG::m_Ident, and m_Pt_param.

Member Data Documentation

◆ m_Default

int PARAM_CFG_INT::m_Default

The default value of the parameter.

Definition at line 133 of file config_params.h.

Referenced by PARAM_CFG_INT(), ReadParam(), and PARAM_CFG_INT_WITH_SCALE::ReadParam().

◆ m_Group

wxString PARAM_CFG::m_Group
inherited

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

Definition at line 102 of file config_params.h.

Referenced by PARAM_CFG::PARAM_CFG().

◆ m_Ident

◆ m_Ident_legacy

wxString PARAM_CFG::m_Ident_legacy
inherited

◆ m_Max

int PARAM_CFG_INT::m_Max

Minimum and maximum values of the param type.

Definition at line 132 of file config_params.h.

Referenced by PARAM_CFG_INT(), ReadParam(), and PARAM_CFG_INT_WITH_SCALE::ReadParam().

◆ m_Min

int PARAM_CFG_INT::m_Min

Definition at line 132 of file config_params.h.

Referenced by PARAM_CFG_INT(), ReadParam(), and PARAM_CFG_INT_WITH_SCALE::ReadParam().

◆ m_Pt_param

int* PARAM_CFG_INT::m_Pt_param

Pointer to the parameter value.

Definition at line 131 of file config_params.h.

Referenced by PARAM_CFG_INT(), ReadParam(), PARAM_CFG_INT_WITH_SCALE::ReadParam(), SaveParam(), and PARAM_CFG_INT_WITH_SCALE::SaveParam().

◆ m_Setup

bool PARAM_CFG::m_Setup
inherited

◆ m_Type

paramcfg_id PARAM_CFG::m_Type
inherited

Type of parameter.

Definition at line 101 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: