Base Framework
Static Public Member Functions | List of all members
TypeInfo Class Reference

Type name. More...

#include <base/TypeInfo.h>

Static Public Member Functions

static String demangleName (const char *mangled)
 
template<class TYPE >
static String getTypename () noexcept
 
template<class TYPE >
static String getTypename (const TYPE &object) noexcept
 
static String getTypename (const Type &type) noexcept
 

Detailed Description

Type name.

This class provides type name demangling support.

Version
1.0

Member Function Documentation

◆ demangleName()

static String TypeInfo::demangleName ( const char *  mangled)
static

Demangles the specified NULL-terminated string. Normally, you shouldn't use this function directly. Instead you should use the getTypename<TYPE>() and getTypename<TYPE>(const TYPE&) functions. If the specified mangled string isn't a valid mangled name the result is unspecified.

Parameters
mangledThe mangled name (compiler specific).
See also
getTypename

◆ getTypename() [1/3]

template<class TYPE >
static String TypeInfo::getTypename ( )
inlinestaticnoexcept

Returns the demangled type name of the specified type. The result is the string representation of the fully qualified name of the type (e.g. "base::String").

Examples
testsuite/Array.cpp.

◆ getTypename() [2/3]

template<class TYPE >
static String TypeInfo::getTypename ( const TYPE &  object)
inlinestaticnoexcept

Returns the demangled type name of the type of the specified object. The result is the string representation of the fully qualified name of the type (e.g. "base::String").

◆ getTypename() [3/3]

static String TypeInfo::getTypename ( const Type type)
inlinestaticnoexcept

Returns the demangled type name of the specified type. The result is the string representation of the fully qualified name of the type (e.g. "base::String").

Parameters
typeThe type.