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::Loader 를 사용해야 할 때만 QScxmlCompiler를 직접 사용해야 합니다.

멤버 함수 문서

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.