CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
Demangle Class Reference

#include <ClassName.h>

Public Member Functions

 Demangle (const char *sc)
 
const char * operator() () const
 
 ~Demangle ()
 

Private Attributes

char * demangle
 

Detailed Description

Definition at line 15 of file ClassName.h.

Constructor & Destructor Documentation

Demangle::Demangle ( const char *  sc)

Definition at line 5 of file ClassName.cc.

References demangle, and mps_update::status.

Referenced by className(), and ClassName< T >::name().

5  : demangle(nullptr) {
6  if (sc==nullptr) return;
7  int status;
8  demangle = abi::__cxa_demangle(sc, nullptr, nullptr, &status);
9  if(status == 0) return;
10  demangle = nullptr;
11  if(status == -1)
12  throw std::bad_alloc();
13  else if(status == -2) {
14  demangle = strdup(sc);
15  }
16 }
char * demangle
Definition: ClassName.h:25
Demangle::~Demangle ( )
inline

Definition at line 21 of file ClassName.h.

References demangle.

21 { if (demangle) free((void*)demangle); }
char * demangle
Definition: ClassName.h:25

Member Function Documentation

const char* Demangle::operator() ( ) const
inline

Definition at line 19 of file ClassName.h.

References demangle.

19 { return demangle;}
char * demangle
Definition: ClassName.h:25

Member Data Documentation

char* Demangle::demangle
private

Definition at line 25 of file ClassName.h.

Referenced by Demangle(), operator()(), and ~Demangle().