7#include "vtkCxxABIConfigure.h"
17VTK_ABI_NAMESPACE_BEGIN
19template <
typename ObjectType>
22 inline static std::string
value()
24 std::string result =
typeid(ObjectType).name();
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);
89VTK_ABI_NAMESPACE_BEGIN
97template <
typename ObjectType>
113template <
typename 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.
Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.
vtkStringToken TypeToken()
Return a string token holding a hash of the demangled type-name of the provided ObjectType.
std::string TypeName()
Return the demangled type-name of the provided ObjectType.
static vtkStringToken::Hash token()
Return an integer hash of the ObjectType's typename.
static std::string value()