EventAnalysis  1.3.0
Demangler.h
Go to the documentation of this file.
1 /*
2  * Demangler.h
3  *
4  * Created on: 01 Feb 2017
5  * Author: Nicola Mori
6  */
7 
8 #ifndef DEMANGLER_H_
9 #define DEMANGLER_H_
10 
11 #include <cxxabi.h>
12 #include <string>
13 
14 namespace EA {
15 
16 namespace Demangler {
17 
23 std::string Demangle(const std::string &name);
24 
30 template <class T> std::string ClassName(const T &obj) { return Demangle(typeid(obj).name()); }
31 
39 template <class T> std::string ClassName() { return Demangle(typeid(T).name()); }
40 
47 std::string ClassName(const std::type_info &typeInfo);
48 
49 } // namespace Demangler
50 
51 } // namespace EA
52 
53 #endif /* DEMANGLER_H_ */
std::string ClassName(const T &obj)
Function which returns the name of the class.
Definition: Demangler.h:30
IncludeFileExc.h IncludeFileExc class declaration.
Definition: Algorithm.h:21
std::string Demangle(const std::string &name)
A simple name demangler.
Definition: Demangler.cpp:28