21 #include <QStringList>
24 #if __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ > 0 )
25 #define GCC_USEDEMANGLE
28 #ifdef GCC_USEDEMANGLE
33 #if defined(_WIN32) && defined(NDEBUG)
36 char * __unDName(
char * outputString,
const char * name,
int maxStringLength,
37 void * (* pAlloc )(
size_t),
void (* pFree )(
void *),
38 unsigned short disableFlags);
43 namespace Reflection {
47 QString name(mangledName);
48 #ifdef GCC_USEDEMANGLE
50 char* unmangled = abi::__cxa_demangle(mangledName,
nullptr,
nullptr, &status);
54 name = QString(unmangled);
57 #elif defined(_WIN32) && defined(NDEBUG)
58 char *
const unmangled = __unDName(0, mangledName, 0, malloc, free, 0x2800);
61 QString unmangledName(unmangled);
62 name = unmangledName.split(
' ', QString::SkipEmptyParts).back();
66 name = name.split(
' ', QString::SkipEmptyParts).back();
78 return DemangleName(
typeid(*const_cast<Object*>(obj)).name());
81 TypeInfo::Concept::~Concept(){}
84 struct TypeInfo::Model<EmptyType> : Concept {
85 QString
GetName()
const override {
return QString(); }
86 QList<TypeInfo>
GetSuperclasses()
const override {
return QList<TypeInfo>(); }
101 return m_Self->GetName();
106 return m_Self->GetSuperclasses();
QString GetClassName(const Object *obj)
bool operator==(const TypeInfo &other) const
Light weight base class for most BlueBerry classes.
QString DemangleName(const char *mangledName)
QList< TypeInfo > GetSuperclasses() const