ALib C++ Framework
by
Library Version: 2511 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
dbgtypedemangler.inl
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/// \emoji :copyright: 2013-2025 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++ run-time 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 \b AString instances.
22//==================================================================================================
24{
25 protected:
26 const char* name; ///< The translated name.
27 bool failed; ///< If \c true, demangling failed.
28
29 public:
30 /// Constructor
31 /// @param typeInfo The information struct on the C++ type.
33 DbgTypeDemangler( const std::type_info& typeInfo );
34
35 #if defined(__GNUC__) || defined(__clang__)
36 /// Destructor
39 #endif
40
41 /// Returns the demangled, human-readable name of the type which was provided in the
42 /// constructor.
43 /// @return The demangled type name.
45 const char* Get();
46
47}; // class DbgTypeDemangler
48
49} // namespace [alib::lang]
50
51#endif // ALIB_DEBUG
#define ALIB_DLL
Definition alib.inl:573
#define ALIB_EXPORT
Definition alib.inl:562
DbgTypeDemangler(const std::type_info &typeInfo)
bool failed
If true, demangling failed.
const char * name
The translated name.