ALib C++ Framework
by
Library Version:
2605 R0
Documentation generated by
Loading...
Searching...
No Matches
ALib
src
alib
lang
dbgtypedemangler.hpp
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
/// Copyright 2013-2026 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++ runtime 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 #"%AString" instances.
22
//==================================================================================================
23
class
DbgTypeDemangler
{
24
protected
:
25
const
char
*
name
;
///< The translated name.
26
bool
failed
;
///< If \c true, demangling failed.
27
28
public
:
29
/// Constructor
30
/// @param typeInfo The information struct on the C++ type.
31
ALIB_DLL
32
DbgTypeDemangler
(
const
std::type_info& typeInfo );
33
34
#if defined(__GNUC__) || defined(__clang__)
35
/// Destructor
36
ALIB_DLL
37
~DbgTypeDemangler
();
38
#endif
39
40
/// Returns the demangled, human-readable name of the type which was provided in the
41
/// constructor.
42
/// @return The demangled type name.
43
ALIB_DLL
44
const
char
*
Get
();
45
46
};
// class DbgTypeDemangler
47
48
}
// namespace [alib::lang]
49
50
#endif
// ALIB_DEBUG
ALIB_DLL
#define ALIB_DLL
Definition
alib.prepro.hpp:549
ALIB_EXPORT
#define ALIB_EXPORT
Definition
alib.prepro.hpp:538
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.hpp:26
alib::lang::DbgTypeDemangler::Get
const char * Get()
alib::lang::DbgTypeDemangler::name
const char * name
The translated name.
Definition
dbgtypedemangler.hpp:25
alib::lang
Definition
allocation.hpp:8