11 #include <OpenMS/config.h>
62 template <
typename Type>
65 #if ! defined(OPENMS_PRETTY_FUNCTION)
66 return "[ Sorry, OpenMS::typeAsString() relies upon extension OPENMS_PRETTY_FUNCTION ]";
68 std::string pretty(OPENMS_PRETTY_FUNCTION);
69 static char const context_left[] =
"with Type =";
70 static char const context_right[] =
"]";
71 size_t left = pretty.find(context_left);
72 left +=
sizeof(context_left);
73 size_t right = pretty.rfind(context_right);
74 if (right <= left || right == std::string::npos || left == std::string::npos)
77 return pretty.substr(left, right - left);
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22
std::string typeAsString(const Type &=Type())
Returns the Type as as std::string.
Definition: TypeAsString.h:63