ALib C++ Library
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 \ref mainpage_license "Boost Software 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/// Module \alib_strings functor
20/// \alib{strings::APPENDABLES;AppendableTraits<std::type_info,TChar,TAllocator>} in debug-compilations,
21/// which internally makes use of this type. This allows appending the result of keyword \c typeid
22/// directly to \b AString instances.
23//==================================================================================================
25{
26 protected:
27 const char* name; ///< The translated name.
28 bool failed; ///< If \c true, demangling failed.
29
30 public:
31 /// Constructor
32 /// @param typeInfo The information struct on the C++ type.
34 DbgTypeDemangler( const std::type_info& typeInfo );
35
36 #if defined(__GNUC__) || defined(__clang__)
37 /// Destructor
40 #endif
41
42 /// Returns the demangled, human-readable name of the type which was provided in the
43 /// constructor.
44 /// @return The demangled type name.
46 const char* Get();
47
48}; // class DbgTypeDemangler
49
50} // namespace [alib::lang]
51
52#endif // ALIB_DEBUG
ALIB_DLL ~DbgTypeDemangler()
Destructor.
ALIB_DLL const char * Get()
ALIB_DLL DbgTypeDemangler(const std::type_info &typeInfo)
bool failed
If true, demangling failed.
const char * name
The translated name.
#define ALIB_DLL
Definition alib.inl:503
#define ALIB_EXPORT
Definition alib.inl:497