aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/typesystemparser.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/ApiExtractor/typesystemparser.h')
-rw-r--r--sources/shiboken2/ApiExtractor/typesystemparser.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/sources/shiboken2/ApiExtractor/typesystemparser.h b/sources/shiboken2/ApiExtractor/typesystemparser.h
index aaf22353e..a36063f54 100644
--- a/sources/shiboken2/ApiExtractor/typesystemparser.h
+++ b/sources/shiboken2/ApiExtractor/typesystemparser.h
@@ -31,6 +31,7 @@
#include "typesystem.h"
#include <QtCore/QStack>
+#include <QtCore/QHash>
#include <QtCore/QScopedPointer>
QT_FORWARD_DECLARE_CLASS(QXmlStreamAttributes)
@@ -86,6 +87,8 @@ class StackElement
NativeToTarget = 0x1100,
TargetToNative = 0x1200,
AddConversion = 0x1300,
+ SystemInclude = 0x1400,
+ Property = 0x1500,
SimpleMask = 0x3f00,
// Code snip tags (0x1000, 0x2000, ... , 0xf000)
@@ -151,6 +154,8 @@ public:
QString errorString() const { return m_error; }
private:
+ bool parseXml(QXmlStreamReader &reader);
+ bool setupSmartPointerInstantiations();
bool startElement(const QXmlStreamReader &reader);
SmartPointerTypeEntry *parseSmartPointerEntry(const QXmlStreamReader &,
const QString &name,
@@ -162,7 +167,10 @@ private:
bool importFileElement(const QXmlStreamAttributes &atts);
- void applyCommonAttributes(TypeEntry *type, QXmlStreamAttributes *attributes) const;
+ const TypeEntry *currentParentTypeEntry() const;
+ bool checkRootElement();
+ void applyCommonAttributes(const QXmlStreamReader &reader, TypeEntry *type,
+ QXmlStreamAttributes *attributes) const;
PrimitiveTypeEntry *
parsePrimitiveTypeEntry(const QXmlStreamReader &, const QString &name,
const QVersionNumber &since, QXmlStreamAttributes *);
@@ -174,17 +182,14 @@ private:
const QVersionNumber &since, QXmlStreamAttributes *);
FlagsTypeEntry *
parseFlagsEntry(const QXmlStreamReader &, EnumTypeEntry *enumEntry,
- const QString &name, QString flagName,
- const QVersionNumber &since, QXmlStreamAttributes *);
+ QString flagName, const QVersionNumber &since,
+ QXmlStreamAttributes *);
NamespaceTypeEntry *
parseNamespaceTypeEntry(const QXmlStreamReader &,
const QString &name, const QVersionNumber &since,
QXmlStreamAttributes *attributes);
- ObjectTypeEntry *
- parseInterfaceTypeEntry(const QXmlStreamReader &, const QString &name,
- const QVersionNumber &since, QXmlStreamAttributes *);
ValueTypeEntry *
parseValueTypeEntry(const QXmlStreamReader &, const QString &name,
const QVersionNumber &since, QXmlStreamAttributes *);
@@ -228,6 +233,8 @@ private:
bool parseModifyField(const QXmlStreamReader &, QXmlStreamAttributes *);
bool parseAddFunction(const QXmlStreamReader &, const StackElement &topElement,
QXmlStreamAttributes *);
+ bool parseProperty(const QXmlStreamReader &, const StackElement &topElement,
+ QXmlStreamAttributes *);
bool parseModifyFunction(const QXmlStreamReader &, const StackElement &topElement,
QXmlStreamAttributes *);
bool parseReplaceDefaultExpression(const QXmlStreamReader &,
@@ -245,6 +252,7 @@ private:
StackElement* element, QXmlStreamAttributes *);
bool parseInclude(const QXmlStreamReader &, const StackElement &topElement,
TypeEntry *entry, QXmlStreamAttributes *);
+ bool parseSystemInclude(const QXmlStreamReader &, QXmlStreamAttributes *);
TemplateInstance
*parseTemplateInstanceEnum(const QXmlStreamReader &, const StackElement &topElement,
QXmlStreamAttributes *);
@@ -268,7 +276,9 @@ private:
QString m_currentSignature;
QString m_currentPath;
+ QString m_currentFile;
QScopedPointer<TypeSystemEntityResolver> m_entityResolver;
+ QHash<SmartPointerTypeEntry *, QString> m_smartPointerInstantiations;
};
#endif // TYPESYSTEMPARSER_H