From 46cd570358601d83be0e23a378fc688d8ed706b6 Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Wed, 14 Apr 2010 16:44:37 -0300 Subject: Include class moved to its own .h/.cpp file. --- typesystem.h | 42 +++--------------------------------------- 1 file changed, 3 insertions(+), 39 deletions(-) (limited to 'typesystem.h') diff --git a/typesystem.h b/typesystem.h index ce5104f9f..1c1c08299 100644 --- a/typesystem.h +++ b/typesystem.h @@ -30,6 +30,7 @@ #include #include #include "apiextractormacros.h" +#include "include.h" class Indentor; @@ -39,43 +40,6 @@ class QTextStream; class EnumTypeEntry; class FlagsTypeEntry; -struct APIEXTRACTOR_API Include -{ - enum IncludeType { - IncludePath, - LocalPath, - TargetLangImport - }; - - Include() : type(IncludePath) {} - Include(IncludeType t, const QString &nam) : type(t), name(nam) {}; - - bool isValid() const - { - return !name.isEmpty(); - } - - IncludeType type; - QString name; - - QString toString() 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 IncludeList; - typedef QMap ArgumentMap; class TemplateInstance; @@ -883,9 +847,9 @@ public: } void addExtraInclude(const Include &include) { - if (!m_includesUsed.value(include.name, false)) { + if (!m_includesUsed.value(include.name(), false)) { m_extraIncludes << include; - m_includesUsed[include.name] = true; + m_includesUsed[include.name()] = true; } } -- cgit v1.2.3