diff options
-rw-r--r-- | typesystem.cpp | 12 | ||||
-rw-r--r-- | typesystem.h | 11 |
2 files changed, 22 insertions, 1 deletions
diff --git a/typesystem.cpp b/typesystem.cpp index 837a0e0d0..4f696c10c 100644 --- a/typesystem.cpp +++ b/typesystem.cpp @@ -2239,6 +2239,18 @@ QString ContainerTypeEntry::typeName() const } } +uint qHash(const Include& inc) +{ + return qHash(inc.name); +} + +QTextStream& operator<<(QTextStream& out, const Include& include) +{ + if (include.isValid()) + out << include.toString() << endl; + return out; +} + /* static void injectCode(ComplexTypeEntry *e, const char *signature, diff --git a/typesystem.h b/typesystem.h index be2852bd9..b47a20030 100644 --- a/typesystem.h +++ b/typesystem.h @@ -60,11 +60,20 @@ struct APIEXTRACTOR_API Include QString toString() const; - bool operator<(const Include &other) const + bool operator<(const Include& other) const { return name < other.name; } + + bool operator==(const Include& other) const + { + return type == other.type && name == other.name; + } }; + +APIEXTRACTOR_API uint qHash(const Include& inc); +APIEXTRACTOR_API QTextStream& operator<<(QTextStream& out, const Include& include); + typedef QList<Include> IncludeList; typedef QMap<int, QString> ArgumentMap; |