MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
demangle.cc File Reference
#include "mbconfig.h"
#include "demangle.h"
#include <cstdlib>
Include dependency graph for demangle.cc:

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)
 

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: