ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
DbgTypeDemangler Class Reference

Description:

Retrieves human-readable names from C++ run-time type information.
This class is available only with debug-builds of ALib.

Module ALib Strings functor T_Append<std::type_info,TChar,TAllocator> in debug-compilations, which internally makes use of this type. This allows appending the result of keyword typeid directly to AString instances.

Definition at line 36 of file dbgtypedemangler.hpp.

#include <dbgtypedemangler.hpp>

Public Method Index:

ALIB_API DbgTypeDemangler (const std::type_info &typeInfo)
 
ALIB_API ~DbgTypeDemangler ()
 Destructor.
 
ALIB_API const char * Get ()
 
ALIB_API NAStringGetShort (NAString &target)
 

Protected Field Index:

bool failed
 If true, demangling failed.
 
const char * name
 The translated name.
 

Field Details:

◆ failed

bool failed
protected

If true, demangling failed.

Definition at line 40 of file dbgtypedemangler.hpp.

◆ name

const char* name
protected

The translated name.

Definition at line 39 of file dbgtypedemangler.hpp.

Constructor(s) / Destructor Details:

◆ DbgTypeDemangler()

ALIB_API DbgTypeDemangler ( const std::type_info & typeInfo)

Constructor

Parameters
typeInfoThe information struct on the C++ type.

Method Details:

◆ Get()

ALIB_API const char * Get ( )

Returns the demangled, human-readable name of the type which was provided in the constructor.

Returns
The demangled type name.

◆ GetShort()

ALIB_API NAString & GetShort ( NAString & target)

Removes all namespaces from the type receivable with Get, including those of its nested templates, and writes the result to target.

Availability
This method is available only if the module ALib Strings is included in the ALib Distribution. Note that while method Get always returns a narrow character array, this method accepts the string-type chosen with the ALib Distribution.
Parameters
targetThe target string to write to.
Returns
The given target to allow concatenated operations.

The documentation for this class was generated from the following file: