Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4Backtrace.hh File Reference
#include "G4Types.hh"
#include "G4String.hh"
#include "G4Threading.hh"
#include <cfenv>
#include <csignal>
#include <type_traits>
#include <array>
#include <functional>
#include <map>
#include <set>
#include <string>
#include <tuple>
#include <vector>

Go to the source code of this file.

Classes

class  G4Backtrace
 
struct  G4Backtrace::fake_siginfo
 
struct  G4Backtrace::fake_sigaction
 
struct  G4Backtrace::actions
 

Macros

#define G4PSIGINFO_AVAILABLE   0
 

Typedefs

template<typename FuncT , typename... ArgTypes>
using G4ResultOf_t = std::invoke_result_t< FuncT, ArgTypes... >
 

Functions

G4String G4Demangle (const char *_str)
 
G4String G4Demangle (const G4String &_str)
 
template<typename Tp >
G4String G4Demangle ()
 

Macro Definition Documentation

◆ G4PSIGINFO_AVAILABLE

#define G4PSIGINFO_AVAILABLE   0

Definition at line 120 of file G4Backtrace.hh.

Typedef Documentation

◆ G4ResultOf_t

template<typename FuncT , typename... ArgTypes>
using G4ResultOf_t = std::invoke_result_t<FuncT, ArgTypes...>

Definition at line 103 of file G4Backtrace.hh.

Function Documentation

◆ G4Demangle() [1/3]

template<typename Tp >
G4String G4Demangle ( )
inline

Definition at line 150 of file G4Backtrace.hh.

151{
152 return G4Demangle(typeid(Tp).name());
153}
G4String G4Demangle()
Definition: G4Backtrace.hh:150
const char * name(G4int ptype)

Referenced by G4Demangle().

◆ G4Demangle() [2/3]

G4String G4Demangle ( const char *  _str)
inline

Definition at line 126 of file G4Backtrace.hh.

127{
128#if defined(G4DEMANGLE_AVAILABLE)
129 // demangling a string when delimiting
130 G4int _status = 0;
131 char* _ret = ::abi::__cxa_demangle(_str, nullptr, nullptr, &_status);
132 if((_ret != nullptr) && _status == 0)
133 return G4String(const_cast<const char*>(_ret));
134 return _str;
135#else
136 return _str;
137#endif
138}
int G4int
Definition: G4Types.hh:85

◆ G4Demangle() [3/3]

G4String G4Demangle ( const G4String _str)
inline

Definition at line 142 of file G4Backtrace.hh.

143{
144 return G4Demangle(_str.c_str());
145}