ALib C++ Framework
by
Library Version: 2605 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
dbgtypedemangler.hpp
Go to the documentation of this file.
1//==================================================================================================
2/// \file
3/// This header-file is part of module \alib_lang of the \aliblong.
4///
5/// Copyright 2013-2026 A-Worx GmbH, Germany.
6/// Published under #"mainpage_license".
7///
8/// \note
9/// To reduce complexity, this header is not shown in inclusion graphs of this documentation.
10//==================================================================================================
11#if ALIB_DEBUG
12
13ALIB_EXPORT namespace alib::lang {
14
15//==================================================================================================
16/// Retrieves human-readable names from C++ runtime type information.<br>
17/// This class is available only with debug-builds of \alib.
18///
19/// With debug-builds, functor #"AppendableTraits<std::type_info, TChar, TAllocator>" of
20/// the module \alib_strings, internally makes use of this type .
21/// This allows appending the result of keyword \c typeid directly to #"%AString" instances.
22//==================================================================================================
24 protected:
25 const char* name; ///< The translated name.
26 bool failed; ///< If \c true, demangling failed.
27
28 public:
29 /// Constructor
30 /// @param typeInfo The information struct on the C++ type.
32 DbgTypeDemangler( const std::type_info& typeInfo );
33
34 #if defined(__GNUC__) || defined(__clang__)
35 /// Destructor
38 #endif
39
40 /// Returns the demangled, human-readable name of the type which was provided in the
41 /// constructor.
42 /// @return The demangled type name.
44 const char* Get();
45
46}; // class DbgTypeDemangler
47
48} // namespace [alib::lang]
49
50#endif // ALIB_DEBUG
#define ALIB_DLL
#define ALIB_EXPORT
DbgTypeDemangler(const std::type_info &typeInfo)
bool failed
If true, demangling failed.
const char * name
The translated name.