ALib C++ Library
Library Version: 2510 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 //==========================================================================================
32 /// Constructor
33 /// @param typeInfo The information struct on the C++ type.
34 //==========================================================================================
36 DbgTypeDemangler( const std::type_info& typeInfo );
37
38 #if defined(__GNUC__) || defined(__clang__)
39 //==========================================================================================
40 /// Destructor
41 //==========================================================================================
44 #endif
45
46 //==========================================================================================
47 /// Returns the demangled, human-readable name of the type which was provided in the
48 /// constructor.
49 /// @return The demangled type name.
50 //==========================================================================================
52 const char* Get();
53
54}; // class DbgTypeDemangler
55
56} // namespace [alib::lang]
57
58#endif // ALIB_DEBUG
59
60
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:496
#define ALIB_EXPORT
Definition alib.inl:488