2#include <Core/RaCore.hpp>
3#include <Core/Utils/StringUtils.hpp>
25std::
string demangleType( const T& ) noexcept;
28RA_CORE_API
std::
string demangleType( const
std::type_index& typeName ) noexcept;
32auto simplifiedDemangledType() noexcept ->
std::
string;
36auto simplifiedDemangledType( const T& ) noexcept ->
std::
string;
42RA_CORE_API auto simplifiedDemangledType( const
std::type_index& typeName ) noexcept ->
std::
string;
52auto is_container_impl(
int )
68using is_container =
decltype( detail::is_container_impl<T>( 0 ) );
73namespace TypeInternal {
78auto simplifiedDemangledType() noexcept ->
std::
string {
79 static auto demangled_name = []() {
81 TypeInternal::makeTypeReadable( Ra::Core::Utils::demangleType<T>() );
84 return demangled_name;
88auto simplifiedDemangledType(
const T& )
noexcept ->
std::string {
89 return simplifiedDemangledType<T>();
93 return TypeInternal::makeTypeReadable( Ra::Core::Utils::demangleType( typeName ) );
101template <
typename... Ts>
104namespace TypeListInternal {
110template <
typename ListT,
typename... Ts>
117template <
typename... Ts,
typename... OtherTs>
119 using type = TypeList<Ts..., OtherTs...>;
126template <
typename... Ts,
typename... OtherTs>
128 using type = TypeList<Ts..., OtherTs...>;
133template <
typename... Ts>
136 using Self = TypeList;
138 static constexpr size_t Size =
sizeof...( Ts );
155 template <
typename... TypesToAppend>
164 removeAllInString( retval,
"class " );
165 removeAllInString( retval,
"struct " );
166 removeAllInString( retval,
"__cdecl" );
167 replaceAllInString( retval,
"& __ptr64",
"&" );
168 replaceAllInString( retval,
",",
", " );
169 replaceAllInString( retval,
" >",
">" );
170 replaceAllInString( retval,
"__int64",
"long" );
171 replaceAllInString( retval,
"const &",
"const&" );
179 char* name = abi::__cxa_demangle( typeIndex.name(), 0, 0, &error );
180 if ( error == 0 ) { retval = name; }
188 removeAllInString( retval,
"__1::" );
189 replaceAllInString( retval,
" >",
">" );
196 static auto demangled_name = demangleType(
std::type_index(
typeid( T ) ) );
197 return demangled_name;
203 return demangleType<T>();
hepler function to manage enum as underlying types in VariableSet
Append any number of types to a TypeList.