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