libDwm-0.9.45
DwmTypeName.hh File Reference

Hackish support for getting the name of a given object's type, since std::type_info::name() returns a mangled name (or a string of length 1 for builtin types). More...

#include <cxxabi.h>
#include <cstdlib>
#include <string>
#include <typeinfo>
Include dependency graph for DwmTypeName.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::string Dwm::BuiltinTypeName (const std::type_info &typeInfo)
 Returns a string holding the demangled name for the given typeInfo.
 
template<typename T >
std::string Dwm::BuiltinTypeName ()
 Returns the name of type T.
 
template<typename T >
std::string Dwm::TypeName (const T &x)
 Returns the name of type T.
 
template<typename T >
std::string Dwm::TypeNameNoNamespace (const T &x)
 Returns the name of type T, sans its namespace.
 
template<typename T >
std::string Dwm::TypeName ()
 Returns the name of type T.
 

Detailed Description

Hackish support for getting the name of a given object's type, since std::type_info::name() returns a mangled name (or a string of length 1 for builtin types).

Function Documentation

◆ BuiltinTypeName()

std::string Dwm::BuiltinTypeName ( const std::type_info & typeInfo)

Returns a string holding the demangled name for the given typeInfo.

For builtin types, we return the literal name by doing a lookup in a map that's set up in this function.

Here is the call graph for this function: