aboutsummaryrefslogtreecommitdiffstats
path: root/generator.h
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2009-11-17 11:44:00 -0200
committerHugo Lima <hugo.lima@openbossa.org>2009-11-17 11:44:00 -0200
commitf081e5ff270a23a2ae2dafede0520416f681ff4b (patch)
treedac5b04eeda86a32c6f3bc783dcf1fea75b53160 /generator.h
parent4545d7fc24b016d6456da40298a2cf4581e38ec1 (diff)
Add symbol visibility rules to generator runner.
Diffstat (limited to 'generator.h')
-rw-r--r--generator.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/generator.h b/generator.h
index 7423b25b5..b16694de0 100644
--- a/generator.h
+++ b/generator.h
@@ -28,13 +28,14 @@
#include <QtCore/QDir>
#include <QtCore/QLinkedList>
#include <apiextractor/abstractmetalang.h>
+#include "generatorrunnermacros.h"
class ApiExtractor;
class AbstractMetaBuilder;
class QFile;
#define EXPORT_GENERATOR_PLUGIN(X)\
-extern "C" Q_DECL_EXPORT GeneratorList getGenerators()\
+extern "C" GENRUNNER_API GeneratorList getGenerators()\
{\
return GeneratorList() << X;\
}\
@@ -45,7 +46,7 @@ QTextStream& formatCode(QTextStream &s, const QString& code, Indentor &indentor)
* Base class for all generators. The default implementations does nothing,
* you must subclass this to create your own generators.
*/
-class Generator
+class GENRUNNER_API Generator
{
public:
/// Optiosn used around the generator code
@@ -301,7 +302,7 @@ typedef QLinkedList<Generator*> GeneratorList;
/**
* Utility class to store the identation level, use it in a QTextStream.
*/
-class Indentor
+class GENRUNNER_API Indentor
{
public:
Indentor():
@@ -312,7 +313,7 @@ public:
/**
* Class that use the RAII idiom to set and unset the identation level.
*/
-class Indentation
+class GENRUNNER_API Indentation
{
public:
Indentation(Indentor &indentor) : indentor(indentor)
@@ -328,7 +329,7 @@ private:
Indentor &indentor;
};
-inline QTextStream &operator <<(QTextStream &s, const Indentor &indentor)
+GENRUNNER_API inline QTextStream &operator <<(QTextStream &s, const Indentor &indentor)
{
for (int i = 0; i < indentor.indent; ++i)
s << " ";