diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2019-07-23 15:45:29 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2019-07-31 13:12:01 +0000 |
commit | 86747ff36bb162764fd8c2f741a1674d16b0b3cd (patch) | |
tree | ebc9323f57c601ae49af9cff9fe0674fd71bb6ca /src/plugins/generator/iarew/iarewworkspacewriter.h | |
parent | 2363f13f8fbd001a3544acb2a600010893e4cf80 (diff) |
baremetal: Share common generators code
Common code which are used for the 'iarew' and 'keiluv'
generators was moved to the corelib/generators library.
Besides, this code also can be used in future for the
XML-based generators.
Change-Id: I79a21e3e078d563600d7f365785731fe9e847045
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/generator/iarew/iarewworkspacewriter.h')
-rw-r--r-- | src/plugins/generator/iarew/iarewworkspacewriter.h | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/src/plugins/generator/iarew/iarewworkspacewriter.h b/src/plugins/generator/iarew/iarewworkspacewriter.h index 47457dd00..3966744fb 100644 --- a/src/plugins/generator/iarew/iarewworkspacewriter.h +++ b/src/plugins/generator/iarew/iarewworkspacewriter.h @@ -31,32 +31,19 @@ #ifndef QBS_IAREWWORKSPACEWRITER_H #define QBS_IAREWWORKSPACEWRITER_H -#include "iiarewnodevisitor.h" +#include <generators/xmlworkspacewriter.h> namespace qbs { -class IarewWorkspace; - -class IarewWorkspaceWriter final : public IIarewNodeVisitor +class IarewWorkspaceWriter final : public gen::xml::WorkspaceWriter { Q_DISABLE_COPY(IarewWorkspaceWriter) public: explicit IarewWorkspaceWriter(std::ostream *device); - bool write(const IarewWorkspace *workspace); private: - void visitStart(const IarewWorkspace *workspace) final; - void visitEnd(const IarewWorkspace *workspace) final; - - void visitStart(const IarewProperty *property) final; - void visitEnd(const IarewProperty *property) final; - - void visitStart(const IarewPropertyGroup *propertyGroup) final; - void visitEnd(const IarewPropertyGroup *propertyGroup) final; - - std::ostream *m_device = nullptr; - QByteArray m_buffer; - std::unique_ptr<QXmlStreamWriter> m_writer; + void visitStart(const gen::xml::Workspace *workspace) final; + void visitEnd(const gen::xml::Workspace *workspace) final; }; } // namespace qbs |