mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 20:37:15 +02:00
fixed order
This commit is contained in:
@ -20,6 +20,17 @@
|
||||
|
||||
namespace sls {
|
||||
|
||||
|
||||
inline std::string ToString(const slsDetectorDefs::runStatus s){
|
||||
return slsDetectorDefs::runStatusType(s);
|
||||
}
|
||||
|
||||
// in case we already have a string
|
||||
// causes a copy but might be needed in generic code
|
||||
inline std::string ToString(const std::string& s){
|
||||
return s;
|
||||
}
|
||||
|
||||
/** Convert std::chrono::duration with specified output unit */
|
||||
template <typename T, typename Rep = double>
|
||||
typename std::enable_if<is_duration<T>::value, std::string>::type
|
||||
@ -73,6 +84,9 @@ ToString(const T &value) {
|
||||
return std::to_string(value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* For a container loop over all elements and call ToString on the element
|
||||
* Container<std::string> is excluded
|
||||
@ -177,17 +191,8 @@ ToString(const T &obj) {
|
||||
return obj.str();
|
||||
}
|
||||
|
||||
/**
|
||||
* Call ToString with a string, causes copy but might be needed
|
||||
* in generic code.
|
||||
*/
|
||||
inline std::string ToString(const std::string& s){
|
||||
return s;
|
||||
}
|
||||
|
||||
inline std::string ToString(slsDetectorDefs::runStatus s){
|
||||
return slsDetectorDefs::runStatusType(s);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace sls
|
||||
|
Reference in New Issue
Block a user