summaryrefslogtreecommitdiffstats
path: root/tools/repc/repcodegenerator.h
diff options
context:
space:
mode:
authorBrett Stottlemyer <bstottle@ford.com>2021-03-07 10:51:50 -0500
committerBrett Stottlemyer <bstottle@ford.com>2021-07-15 14:44:24 -0400
commit0ab10b008f4b713b7a58206b796668e05e80c2c6 (patch)
tree6795aadfd8e9d74d962ccd8709342dc414fd6065 /tools/repc/repcodegenerator.h
parentd8b6dce0d2cf91e20905856aef06c77c8659da98 (diff)
Add example of reading CBOR data from pythonwip/serialization
This is currently a test harness that will expand as the CBOR functionality is prototyped. A start at changes to repc to autogenerate python code for Replica types is also included. Change-Id: I97c3ad4c62c7d747c1918f88be41fb7643bbb46d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'tools/repc/repcodegenerator.h')
-rw-r--r--tools/repc/repcodegenerator.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/tools/repc/repcodegenerator.h b/tools/repc/repcodegenerator.h
index 7a727e4..d345405 100644
--- a/tools/repc/repcodegenerator.h
+++ b/tools/repc/repcodegenerator.h
@@ -33,6 +33,8 @@
#include <QSet>
#include <QString>
+#include "utils.h"
+
QT_BEGIN_NAMESPACE
struct AST;
struct ASTClass;
@@ -43,22 +45,13 @@ struct ASTProperty;
class QIODevice;
class QTextStream;
-class RepCodeGenerator
+class RepCodeGenerator : public GeneratorBase
{
public:
- enum Mode
- {
- REPLICA,
- SOURCE,
- SIMPLE_SOURCE,
- MERGED
- };
-
explicit RepCodeGenerator(QIODevice *outputDevice);
void generate(const AST &ast, Mode mode, QString fileName);
- QByteArray classSignature(const ASTClass &ac);
private:
void generateHeader(Mode mode, QTextStream &out, const AST &ast);
QString generateMetaTypeRegistration(const QSet<QString> &metaTypes);
@@ -85,7 +78,6 @@ private:
private:
QIODevice *m_outputDevice;
- QHash<QString, QByteArray> m_globalEnumsPODs;
};
QT_END_NAMESPACE