aboutsummaryrefslogtreecommitdiffstats
path: root/generator.h
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2009-08-21 14:21:39 -0300
committerHugo Lima <hugo.lima@openbossa.org>2009-08-25 16:23:11 -0300
commit86c00c1d694cfc69b58ac2fbd0d7744c7f95e39a (patch)
tree1d3f8aef0d325780a382a7a427c12cf5cec53022 /generator.h
parent425c1eba27766b4382ace8f10daeaa548c9eb0d6 (diff)
Added boostpython as a generator plugin.
Diffstat (limited to 'generator.h')
-rw-r--r--generator.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/generator.h b/generator.h
index 14526d7f0..f9e0c714e 100644
--- a/generator.h
+++ b/generator.h
@@ -26,12 +26,19 @@
#include <QtCore/QObject>
#include <QtCore/QDir>
-#include "abstractmetalang.h"
+#include <QtCore/QLinkedList>
+#include <apiextractor/abstractmetalang.h>
class ApiExtractor;
class AbstractMetaBuilder;
class QFile;
+#define EXPORT_GENERATOR_PLUGIN(X)\
+extern "C" Q_DECL_EXPORT GeneratorList getGenerators()\
+{\
+ return GeneratorList() << X;\
+}\
+
/**
* Base class for all generators. The default implementations does nothing,
* you must subclass this to create your own generators.
@@ -245,7 +252,7 @@ protected:
*/
virtual QString fileNameForClass(const AbstractMetaClass* metaClass) const = 0;
- virtual bool doSetup(QMap<QString, QString> args) = 0;
+ virtual bool doSetup(const QMap<QString, QString>& args) = 0;
/**
* Returns the subdirectory path for a given package
@@ -293,6 +300,8 @@ private:
QString m_licenseComment;
};
+typedef QLinkedList<Generator*> GeneratorList;
+
/**
* Utility class to store the identation level, use it in a QTextStream.
*/