QScxmlCompiler Class

QScxmlCompiler クラスは SCXML ファイルのコンパイラです。詳細...

ヘッダ #include <QScxmlCompiler>
CMake: find_package(Qt6 REQUIRED COMPONENTS Scxml)
target_link_libraries(mytarget PRIVATE Qt6::Scxml)
qmake: QT += scxml

パブリックな型

class Loader

パブリック関数

QScxmlCompiler(QXmlStreamReader *reader)
~QScxmlCompiler()
QScxmlStateMachine *compile()
QList<QScxmlError> errors() const
QString fileName() const
QScxmlCompiler::Loader *loader() const
void setFileName(const QString &fileName)
void setLoader(QScxmlCompiler::Loader *newLoader)

詳細な説明

SCXMLファイルを解析し、解析に成功した SCXML ファイルのステートマシンを動的にインスタンス化します。解析に失敗した場合、新しいステートマシンは起動できません。すべてのエラーはQScxmlStateMachine::parseErrors() で返されます。

SCXML ファイルをロードするには、QScxmlStateMachine::fromFile またはQScxmlStateMachine::fromData を使用します。QScxmlCompiler を直接使用する必要があるのは、コンパイラがカスタムQScxmlCompiler::Loader を使用する必要がある場合のみです。

メンバ関数ドキュメント

QScxmlCompiler::QScxmlCompiler(QXmlStreamReader *reader)

指定されたreader に対して新しい SCXML コンパイラを作成します。

[noexcept] QScxmlCompiler::~QScxmlCompiler()

SCXML コンパイラを破棄します。

QScxmlStateMachine *QScxmlCompiler::compile()

SCXML ファイルを解析し、そこから新しいステートマシンを作成します。

パースに成功すると、ステートマシンを初期化して起動することができます。パースに失敗した場合は、QScxmlStateMachine::parseErrors() を使用してエラーの一覧を取得できます。

QList<QScxmlError> QScxmlCompiler::errors() const

パースエラーのリストを返す。

QString QScxmlCompiler::fileName() const

現在の入力に関連付けられたファイル名を返す。

setFileName()も参照

QScxmlCompiler::Loader *QScxmlCompiler::loader() const

SCXML コンパイラの URI の解決と読み込みに現在使用しているローダを返します。

setLoader()も参照 ください。

void QScxmlCompiler::setFileName(const QString &fileName)

現在の入力のファイル名をfileName に設定する。

このファイル名はエラー報告と相対パス URI の解決に使用される。

fileName()も参照のこと

void QScxmlCompiler::setLoader(QScxmlCompiler::Loader *newLoader)

SCXML コンパイラの URI の解決と読み込みに使用するnewLoader を設定します。

loader()も参照してください

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.