C++ Web Framework  3.0
metaclassparser.h
1 /*
2  Copyright 2017 Herik Lima de Castro and Marcelo Medeiros Eler
3  Distributed under MIT license, or public domain if desired and
4  recognized in your jurisdiction.
5  See file LICENSE for detail.
6 */
7 
8 #ifndef METACLASSPARSER_H
9 #define METACLASSPARSER_H
10 
11 #include <QMap>
12 #include <tuple>
13 #include <QDebug>
14 #include <QString>
15 #include <QObject>
16 #include <iostream>
17 #include <QMetaType>
18 #include <QMetaMethod>
19 #include <QMetaProperty>
20 #include "cppwebframework_global.h"
21 
22 CWF_BEGIN_NAMESPACE
26 class CPPWEBFRAMEWORKSHARED_EXPORT MetaClassParser
27 {
28 public:
29  QMap<std::tuple<QString, QString>, QMetaMethod> methods;
30  QMap<QString, QMetaProperty> properties;
35  explicit MetaClassParser(QObject *object);
41  QString getReturnType(const QString &methodName);
47  QString getParameterType(const QString &methodName);
53  static void *instantiateClassByName(const QByteArray &name);
54 };
55 
56 CWF_END_NAMESPACE
57 
58 #endif // METACLASSPARSER_H
This class extracts all information from a QObject.
Definition: metaclassparser.h:26