7 #include "vtkCxxABIConfigure.h"
17 VTK_ABI_NAMESPACE_BEGIN
19 template <
typename ObjectType>
25 #ifdef VTK_HAS_CXXABI_DEMANGLE
28 char* demangledSymbol = abi::__cxa_demangle(result.c_str(),
nullptr, &
size, &status);
29 if (!status && size > 0)
31 result = demangledSymbol;
33 free(demangledSymbol);
38 #ifdef VTK_COMPILER_MSVC
43 for (std::string::size_type pos = result.find(
"class "); pos != std::string::npos;
44 pos = result.find(
"class ", pos + 1))
46 result = result.substr(0, pos) + result.substr(pos + 6);
48 for (std::string::size_type pos = result.find(
"struct "); pos != std::string::npos;
49 pos = result.find(
"struct ", pos + 1))
51 result = result.substr(0, pos) + result.substr(pos + 7);
56 for (std::string::size_type pos = result.find(
"`anonymous namespace'");
57 pos != std::string::npos; pos = result.find(
"`anonymous namespace'", pos + 1))
59 result = result.substr(0, pos) +
"(anonymous namespace)" + result.substr(pos + 21);
63 for (std::string::size_type pos = result.find(
','); pos != std::string::npos;
64 pos = result.find(
',', pos + 1))
66 result = result.substr(0, pos) +
", " + result.substr(pos + 1);
89 VTK_ABI_NAMESPACE_BEGIN
97 template <
typename ObjectType>
113 template <
typename ObjectType>
119 VTK_ABI_NAMESPACE_END
122 #endif // vtkTypeName_h
static std::string value()
static vtkStringToken::Hash token()
Return an integer hash of the ObjectType's typename.
Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.
std::string TypeName()
Return the demangled type-name of the provided ObjectType.
vtkStringToken TypeToken()
Return a string token holding a hash of the demangled type-name of the provided ObjectType.
Represent a string by its integer hash.
static constexpr Hash StringHash(const char *data, std::size_t size) noexcept
Return the hash of a string This is used internally but also by the ""_token() literal operator...