1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QSCXMLCOMPILER_H
5#define QSCXMLCOMPILER_H
6
7#include <QtScxml/qscxmlerror.h>
8#include <QtCore/qstring.h>
9
10QT_BEGIN_NAMESPACE
11class QXmlStreamReader;
12class QScxmlStateMachine;
13
14class QScxmlCompilerPrivate;
15class Q_SCXML_EXPORT QScxmlCompiler
16{
17public:
18 class Q_SCXML_EXPORT Loader
19 {
20 public:
21 Loader();
22 virtual ~Loader();
23 virtual QByteArray load(const QString &name,
24 const QString &baseDir,
25 QStringList *errors) = 0;
26 };
27
28public:
29 QScxmlCompiler(QXmlStreamReader *xmlReader);
30 ~QScxmlCompiler();
31
32 QString fileName() const;
33 void setFileName(const QString &fileName);
34
35 Loader *loader() const;
36 void setLoader(Loader *newLoader);
37
38 QScxmlStateMachine *compile();
39 QList<QScxmlError> errors() const;
40
41private:
42 friend class QScxmlCompilerPrivate;
43 QScxmlCompilerPrivate *d;
44};
45
46QT_END_NAMESPACE
47
48#endif // QSCXMLCOMPILER_H
49

source code of qtscxml/src/scxml/qscxmlcompiler.h