MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
demangle.h File Reference
#include <string>
#include <typeinfo>
Include dependency graph for demangle.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::string mbdyn_demangle (const char *name)
 
std::string mbdyn_demangle (const std::type_info &t)
 
template<class T >
std::string mbdyn_demangle (void)
 

Function Documentation

std::string mbdyn_demangle ( const char *  name)

Definition at line 42 of file demangle.cc.

Referenced by mbdyn_demangle().

43 {
44  std::string ret;
45 
46 #ifdef HAVE_CXXABI_H
47  const char* demangled_name = name;
48  int status = -1;
49  char* res = abi::__cxa_demangle(name, NULL, NULL, &status);
50  if (status == 0) {
51  demangled_name = res;
52  }
53  ret = demangled_name;
54 #else
55  ret = name;
56 #endif
57 
58  return ret;
59 }
std::string mbdyn_demangle ( const std::type_info &  t)

Definition at line 62 of file demangle.cc.

References mbdyn_demangle().

63 {
64  return mbdyn_demangle(t.name());
65 }
std::string mbdyn_demangle(const char *name)
Definition: demangle.cc:42

Here is the call graph for this function:

template<class T >
std::string mbdyn_demangle ( void  )

Definition at line 43 of file demangle.h.

References mbdyn_demangle().

44 {
45  return mbdyn_demangle(typeid(T));
46 }
std::string mbdyn_demangle(const char *name)
Definition: demangle.cc:42

Here is the call graph for this function: