CMS 3D CMS Logo

Public Member Functions | Private Attributes

Demangle Class Reference

#include <ClassName.h>

List of all members.

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 ntuplemaker::status.

                                  : demangle(0) {
  if (sc==0) return;
  int status;
  demangle = abi::__cxa_demangle(sc,  0, 0, &status);
  if(status == 0) return;  
  demangle = 0;
  if(status == -1)
    throw std::bad_alloc();
  else if(status == -2) {
    demangle = strdup(sc);
  }
}
Demangle::~Demangle ( ) [inline]

Definition at line 21 of file ClassName.h.

References demangle.

{ if (demangle) free((void*)demangle); }

Member Function Documentation

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

Definition at line 19 of file ClassName.h.

References demangle.

{ return demangle;}

Member Data Documentation

char* Demangle::demangle [private]

Definition at line 25 of file ClassName.h.

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