string to detector type

This commit is contained in:
Erik Frojdh
2019-10-01 13:56:35 +02:00
parent aaade64e0b
commit b4f3c0586f
2 changed files with 26 additions and 9 deletions

View File

@ -164,6 +164,11 @@ template <typename T> T StringTo(std::string t) {
return StringTo<T>(t, unit);
}
template <>
inline slsDetectorDefs::detectorType StringTo(std::string s){
return slsDetectorDefs::detectorTypeToEnum(s);
}
/** For types with a .str() method use this for conversion */
template <typename T>
typename std::enable_if<has_str<T>::value, std::string>::type