KiCad PCB EDA Suite
config_map.h File Reference
#include <map>

Go to the source code of this file.




template<typename T >
using UTIL::CFG_MAP = std::vector< std::pair< T, long > >
 A config value table is a list of native values (usually enums) to a different set of values, for example, the values used to represent the enum in a config file, or the index used to represent it in a selection list. More...
template<typename MAP >
using UTIL::CFG_NATIVE_VAL = typename MAP::value_type::first_type
 The "native" type of a CFG_MAP: probably an enum type. More...


template<typename MAP >
static long UTIL::GetConfigForVal (const MAP &aMap, CFG_NATIVE_VAL< MAP > aVal)
 Get the mapped config value (the one to write to file, or use in an index) from the given native (probably enum) value. More...
template<typename MAP >
static CFG_NATIVE_VAL< MAP > UTIL::GetValFromConfig (const MAP &aMap, long aConf)
 Get the native value corresponding to the config value (read from file or UI, probably) and find it in the mapping table. More...