35 #ifndef OPENMS_CONCEPT_TYPEASSTRING_H 36 #define OPENMS_CONCEPT_TYPEASSTRING_H 38 #include <OpenMS/config.h> 89 template <
typename Type>
92 #if ! defined(OPENMS_PRETTY_FUNCTION) 93 return "[ Sorry, OpenMS::typeAsString() relies upon extension OPENMS_PRETTY_FUNCTION ]";
95 std::string pretty(OPENMS_PRETTY_FUNCTION);
96 static char const context_left[] =
"with Type =";
97 static char const context_right[] =
"]";
98 size_t left = pretty.find(context_left);
99 left +=
sizeof(context_left);
100 size_t right = pretty.rfind(context_right);
101 if (right <= left || right == std::string::npos || left == std::string::npos)
104 return pretty.substr(left, right - left);
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
std::string typeAsString(const Type &=Type())
Returns the Type as as std::string.
Definition: TypeAsString.h:90