Diana Software
QDemangle.cc
Go to the documentation of this file.
1 #include "QDemangle.hh"
2 #include <cxxabi.h>
3 
5 
6 std::string CXADemangle(const char* typeid_name, int firstChar)
7 {
8  int status;
9  char* ctmp = abi::__cxa_demangle(typeid_name,0,0,&status);
10  std::string tmp = ctmp;
11  // remove const and "*" labels
12  size_t pos = tmp.find_first_of(" ");
13  if(pos == std::string::npos) {
14  pos = tmp.find_first_of("*");
15  }
16  free(ctmp);
17  return tmp.substr(firstChar,pos);
18 
19 }
20 
Q_BEGIN_NAMESPACE std::string CXADemangle(const char *typeid_name, int firstChar)
Definition: QDemangle.cc:6
#define Q_END_NAMESPACE
Definition: QDiana.hh:22
#define Q_BEGIN_NAMESPACE
Definition: QDiana.hh:20