이 페이지에서

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()도 참조하십시오 .

© 2026 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.