ALib C++ Library
by
Library Version:
2510 R0
Documentation generated by
Loading...
Searching...
No Matches
home
dev
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 \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
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
/// 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
//==================================================================================================
24
class
DbgTypeDemangler
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
//==========================================================================================
35
ALIB_DLL
36
DbgTypeDemangler
(
const
std::type_info& typeInfo );
37
38
#if defined(__GNUC__) || defined(__clang__)
39
//==========================================================================================
40
/// Destructor
41
//==========================================================================================
42
ALIB_DLL
43
~DbgTypeDemangler
();
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
//==========================================================================================
51
ALIB_DLL
52
const
char
*
Get
();
53
54
};
// class DbgTypeDemangler
55
56
}
// namespace [alib::lang]
57
58
#endif
// ALIB_DEBUG
59
60
alib::lang::DbgTypeDemangler::~DbgTypeDemangler
ALIB_DLL ~DbgTypeDemangler()
Destructor.
alib::lang::DbgTypeDemangler::Get
ALIB_DLL const char * Get()
alib::lang::DbgTypeDemangler::DbgTypeDemangler
ALIB_DLL DbgTypeDemangler(const std::type_info &typeInfo)
alib::lang::DbgTypeDemangler::failed
bool failed
If true, demangling failed.
Definition
dbgtypedemangler.inl:28
alib::lang::DbgTypeDemangler::name
const char * name
The translated name.
Definition
dbgtypedemangler.inl:27
ALIB_DLL
#define ALIB_DLL
Definition
alib.inl:496
ALIB_EXPORT
#define ALIB_EXPORT
Definition
alib.inl:488
alib::lang
Definition
allocation.inl:8