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::Demangle ( const char *  sc)

Definition at line 5 of file ClassName.cc.

5  : demangle(nullptr) {
6  if (sc == nullptr)
7  return;
8  int status;
9  demangle = abi::__cxa_demangle(sc, nullptr, nullptr, &status);
10  if (status == 0)
11  return;
12  demangle = nullptr;
13  if (status == -1)
14  throw std::bad_alloc();
15  else if (status == -2) {
16  demangle = strdup(sc);
17  }
18 }

References demangle, and mps_update::status.

◆ ~Demangle()

Demangle::~Demangle ( )
inline

Definition at line 21 of file ClassName.h.

21  {
22  if (demangle)
23  free((void*)demangle);
24  }

References demangle.

Member Function Documentation

◆ operator()()

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

Definition at line 19 of file ClassName.h.

19 { return demangle; }

References demangle.

Member Data Documentation

◆ demangle

char* Demangle::demangle
private

Definition at line 27 of file ClassName.h.

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

mps_update.status
status
Definition: mps_update.py:69
Demangle::demangle
char * demangle
Definition: ClassName.h:27