aboutsummaryrefslogtreecommitdiffstats
path: root/typesystem.h
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.lima@openbossa.org>2010-04-14 16:44:37 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:09:59 -0300
commit46cd570358601d83be0e23a378fc688d8ed706b6 (patch)
treeb840837b15f6b4b1ebd1fc79269345778dffcefb /typesystem.h
parent97bff103c6de76a80088083ed2b909527f32c50f (diff)
Include class moved to its own .h/.cpp file.
Diffstat (limited to 'typesystem.h')
-rw-r--r--typesystem.h42
1 files changed, 3 insertions, 39 deletions
diff --git a/typesystem.h b/typesystem.h
index ce5104f9f..1c1c08299 100644
--- a/typesystem.h
+++ b/typesystem.h
@@ -30,6 +30,7 @@
#include <QtCore/QMap>
#include <QtCore/QDebug>
#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<Include> IncludeList;
-
typedef QMap<int, QString> 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;
}
}