Пример #1
0
ProgramSettings::EngineSettings::CalculatorType ProgramSettings::defineCalculatorType(const libconfig::Setting& stg)
{
	std::string calculatorType;

	calculatorType = stg.c_str();
	if(calculatorType.compare("LOCAL_DISPLACEMENT") == 0)
	{
		return EngineSettings::calcLDISPL;
	}
	else if (calculatorType.compare("LOCAL_STRAIN") == 0)
	{
		return EngineSettings::calcLSTRAIN;
	} else if (calculatorType.compare("MEAN_STRAIN") == 0)
	{
		return EngineSettings::calcMSTRAIN;
	} else if (calculatorType.compare("COPLANAR_INTENSITY") == 0)
	{
		return EngineSettings::calcCOINTENSITY;
	}else if (calculatorType.compare("COPLANAR_CORRELATION") == 0)
	{
		return EngineSettings::calcCOCORRELATION;
	}
	else
	{
		return EngineSettings::calcUNKNOWN;
	}
}
Пример #2
0
ProgramSettings::SampleSettings::InterfaceType ProgramSettings::defineInterfaceType(const libconfig::Setting& stg)
{
	std::string interfaceType;

	interfaceType = stg.c_str();
	if (interfaceType.compare("STRAIGHT_GAMMA") == 0)
	{
		return SampleSettings::itfSTRAIGHT_GAMMA;
	}else if(interfaceType.compare("STRAIGHT_GG") == 0)
	{
		return SampleSettings::itfSTRAIGHT_GG;
	}else if(interfaceType.compare("STRAIGHT_GAUSS") == 0)
	{
		return SampleSettings::itfSTRAIGHT_GAUSS;
	}else if(interfaceType.compare("HEXRSH") == 0)
	{
		return SampleSettings::itfHEXRSH;
	}else if(interfaceType.compare("HEXRSO") == 0)
	{
		return SampleSettings::itfHEXRSO;
	}else if(interfaceType.compare("HEXRW") == 0)
	{
		return SampleSettings::itfHEXRW;
	}else if(interfaceType.compare("CONSTFIELD") == 0)
	{
		return SampleSettings::itfCONSTFIELD;
	}else
	{
		return SampleSettings::itfUNKNOWN;
	}
}