31 std::string result =
typeid(ObjectType).name();
32#ifdef VTK_HAS_CXXABI_DEMANGLE
35 char* demangledSymbol = abi::__cxa_demangle(result.c_str(),
nullptr, &size, &status);
36 if (!status && size > 0)
38 result = demangledSymbol;
40 free(demangledSymbol);
45#ifdef VTK_COMPILER_MSVC
50 for (std::string::size_type pos = result.find(
"class "); pos != std::string::npos;
51 pos = result.find(
"class ", pos + 1))
53 result = result.substr(0, pos) + result.substr(pos + 6);
55 for (std::string::size_type pos = result.find(
"struct "); pos != std::string::npos;
56 pos = result.find(
"struct ", pos + 1))
58 result = result.substr(0, pos) + result.substr(pos + 7);
63 for (std::string::size_type pos = result.find(
"`anonymous namespace'");
64 pos != std::string::npos; pos = result.find(
"`anonymous namespace'", pos + 1))
66 result = result.substr(0, pos) +
"(anonymous namespace)" + result.substr(pos + 21);
70 for (std::string::size_type pos = result.find(
','); pos != std::string::npos;
71 pos = result.find(
',', pos + 1))
73 result = result.substr(0, pos) +
", " + result.substr(pos + 1);
79#if VTK_HAS_ABI_NAMESPACE
80 const std::size_t nsLen = std::strlen(VTK_ABI_NAMESPACE_STRING);
81 for (std::string::size_type pos = result.find(VTK_ABI_NAMESPACE_STRING);
82 pos != std::string::npos; pos = result.find(VTK_ABI_NAMESPACE_STRING, pos + 1))
84 result = result.substr(0, pos) + result.substr(pos + nsLen);