49using CFG_MAP = std::vector<std::pair<T, long> >;
 
   72    long aConf = aMap[0].second;
 
   74    for( 
const auto& mapping : aMap )
 
   76        if( mapping.first == aVal )
 
   78            aConf = mapping.second;
 
 
  101    for( 
const auto& mapping : aMap )
 
  103        if( mapping.second == aConf )
 
  105            aVal = mapping.first;
 
 
A model subscriber implementation using links to represent connections.
 
typename MAP::value_type::first_type CFG_NATIVE_VAL
The "native" type of a CFG_MAP: probably an enum type.
 
std::vector< std::pair< T, long > > CFG_MAP
A config value table is a list of native values (usually enums) to a different set of values,...
 
static long 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 (pro...
 
static CFG_NATIVE_VAL< MAP > GetValFromConfig(const MAP &aMap, long aConf)
Get the native value corresponding to the config value (read from file or UI, probably) and find it i...