Esempio n. 1
0
bool look(libconfig::Setting& setting,std::string place,ValueType &value)
{
	if (setting.exists(place))
	{
		return setting.lookupValue(place, value);

	}
	else std::cout << setting.getPath() + place << " does not exist. Value remains unchanged." << std::endl;
	return false;
}
MillerReciprocalHexIndices readMillerReciprocalHexIndices(const libconfig::Setting& stg)
{
    MillerReciprocalHexIndices index;
	if(stg.isArray() && stg.getLength() == MillerHexIndicesDimension)
	{
			index.H = stg[0];
			index.K = stg[1];
			index.I = stg[2];
			index.L = stg[3];
	}
	else
	{
		throw ProgramSettings::Exception("Check setting: " + toString(stg.getPath()));
	}
	return index;
}
Esempio n. 3
0
void SettingUsageRecorder::markAsUsed(const libconfig::Setting & s){
    used_paths.insert(s.getPath());
}