ALib C++ Framework
by
Library Version:
2511 R0
Documentation generated by
Loading...
Searching...
No Matches
A-Worx
ALib
src
alib
lang
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
13
ALIB_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
//==================================================================================================
23
class
DbgTypeDemangler
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.
32
ALIB_DLL
33
DbgTypeDemangler
(
const
std::type_info& typeInfo );
34
35
#if defined(__GNUC__) || defined(__clang__)
36
/// Destructor
37
ALIB_DLL
38
~DbgTypeDemangler
();
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.
44
ALIB_DLL
45
const
char
*
Get
();
46
47
};
// class DbgTypeDemangler
48
49
}
// namespace [alib::lang]
50
51
#endif
// ALIB_DEBUG
ALIB_DLL
#define ALIB_DLL
Definition
alib.inl:573
ALIB_EXPORT
#define ALIB_EXPORT
Definition
alib.inl:562
alib::lang::DbgTypeDemangler::~DbgTypeDemangler
~DbgTypeDemangler()
Destructor.
alib::lang::DbgTypeDemangler::DbgTypeDemangler
DbgTypeDemangler(const std::type_info &typeInfo)
alib::lang::DbgTypeDemangler::failed
bool failed
If true, demangling failed.
Definition
dbgtypedemangler.inl:27
alib::lang::DbgTypeDemangler::Get
const char * Get()
alib::lang::DbgTypeDemangler::name
const char * name
The translated name.
Definition
dbgtypedemangler.inl:26
alib::lang
Definition
allocation.inl:8