| 
    KiCad PCB EDA Suite
    
   | 
 
#include <kicommon.h>#include <set>#include <limits>#include <wx/confbase.h>#include <wx/fileconf.h>#include <boost/ptr_container/ptr_vector.hpp>Go to the source code of this file.
Classes | |
| class | PARAM_CFG | 
| A base class which establishes the interface functions ReadParam and SaveParam, which are implemented by a number of derived classes, and these function's doxygen comments are inherited also.  More... | |
| class | PARAM_CFG_INT | 
| Configuration object for integers.  More... | |
| class | PARAM_CFG_INT_WITH_SCALE | 
| Configuration for integers with unit conversion.  More... | |
| class | PARAM_CFG_DOUBLE | 
| Configuration object for double precision floating point numbers.  More... | |
| class | PARAM_CFG_BOOL | 
| Configuration object for booleans.  More... | |
| class | PARAM_CFG_WXSTRING | 
| Configuration object for wxString objects.  More... | |
| class | PARAM_CFG_WXSTRING_SET | 
| Configuration object for a set of wxString objects.  More... | |
| class | PARAM_CFG_FILENAME | 
| Configuration object for a file name object.  More... | |
| class | PARAM_CFG_LIBNAME_LIST | 
Enumerations | |
| enum | paramcfg_id {  PARAM_INT , PARAM_INT_WITH_SCALE , PARAM_DOUBLE , PARAM_BOOL , PARAM_LIBNAME_LIST , PARAM_WXSTRING , PARAM_WXSTRING_SET , PARAM_FILENAME , PARAM_COMMAND_ERASE , PARAM_LAYERS , PARAM_TRACKWIDTHS , PARAM_VIADIMENSIONS , PARAM_DIFFPAIRDIMENSIONS , PARAM_NETCLASSES , PARAM_SEVERITIES }  | 
| Type of parameter in the configuration file.  More... | |
Functions | |
| KICOMMON_API void | ConfigBaseWriteDouble (wxConfigBase *aConfig, const wxString &aKey, double aValue) | 
| A helper function to write doubles in configuration file.   | |
| KICOMMON_API void | wxConfigSaveSetups (wxConfigBase *aCfg, const std::vector< std::unique_ptr< PARAM_CFG > > &aList) | 
| Writes aList of PARAM_CFG objects to aCfg.   | |
| KICOMMON_API void | wxConfigSaveParams (wxConfigBase *aCfg, const std::vector< std::unique_ptr< PARAM_CFG > > &aList, const wxString &aGroup) | 
| Write aList of PARAM_CFG objects aCfg.   | |
| KICOMMON_API void | wxConfigLoadSetups (wxConfigBase *aCfg, const std::vector< std::unique_ptr< PARAM_CFG > > &aList) | 
| Use aList of PARAM_CFG object to load configuration values from aCfg.   | |
| KICOMMON_API void | wxConfigLoadParams (wxConfigBase *aCfg, const std::vector< std::unique_ptr< PARAM_CFG > > &aList, const wxString &aGroup) | 
| Use aList of PARAM_CFG objects to load configuration values from aCfg.   | |
| enum paramcfg_id | 
Type of parameter in the configuration file.
Definition at line 52 of file config_params.h.
| KICOMMON_API void ConfigBaseWriteDouble | ( | wxConfigBase * | aConfig, | 
| const wxString & | aKey, | ||
| double | aValue ) | 
A helper function to write doubles in configuration file.
We cannot use wxConfigBase->Write for a double, because this function uses a format with very few digits in mantissa and truncation issues are frequent. We use here a better floating format.
Definition at line 117 of file config_params.cpp.
Referenced by PARAM_CFG_DOUBLE::SaveParam(), and PARAM_CFG_INT_WITH_SCALE::SaveParam().
| KICOMMON_API void wxConfigLoadParams | ( | wxConfigBase * | aCfg, | 
| const std::vector< std::unique_ptr< PARAM_CFG > > & | aList, | ||
| const wxString & | aGroup ) | 
Use aList of PARAM_CFG objects to load configuration values from aCfg.
Only elements whose m_Setup field is false will be loaded.
| aCfg | where to load from. | 
| aList | holds some configuration parameters, not all of which will necessarily be loaded. | 
| aGroup | indicates in which group the value should be saved, unless the PARAM_CFG provides its own group, in which case it will take precedence. aGroup may be empty. | 
Definition at line 33 of file config_params.cpp.
| KICOMMON_API void wxConfigLoadSetups | ( | wxConfigBase * | aCfg, | 
| const std::vector< std::unique_ptr< PARAM_CFG > > & | aList ) | 
Use aList of PARAM_CFG object to load configuration values from aCfg.
Only elements whose m_Setup field is true will be loaded.
| aCfg | where to load from. | 
| aList | holds some configuration parameters, not all of which will necessarily be loaded. | 
Definition at line 53 of file config_params.cpp.
Referenced by ADVANCED_CFG::loadSettings().
| KICOMMON_API void wxConfigSaveParams | ( | wxConfigBase * | aCfg, | 
| const std::vector< std::unique_ptr< PARAM_CFG > > & | aList, | ||
| const wxString & | aGroup ) | 
Write aList of PARAM_CFG objects aCfg.
Only elements with m_Setup set false will be saved, hence the function name.
| aCfg | where to save. | 
| aList | holds some configuration parameters, not all of which will necessarily be saved. | 
| aGroup | indicates in which group the value should be saved, unless the PARAM_CFG provides its own group, in which case it will take precedence. aGroup may be empty. | 
Definition at line 67 of file config_params.cpp.
References PARAM_COMMAND_ERASE.
| KICOMMON_API void wxConfigSaveSetups | ( | wxConfigBase * | aCfg, | 
| const std::vector< std::unique_ptr< PARAM_CFG > > & | aList ) | 
Writes aList of PARAM_CFG objects to aCfg.
Only elements with m_Setup set true will be saved, hence the function name.
| aCfg | where to save. | 
| aList | holds some configuration parameters, not all of which will necessarily be saved. | 
Definition at line 95 of file config_params.cpp.
References PARAM_COMMAND_ERASE.
Referenced by ADVANCED_CFG::Save().