内容表

上一话题

QScxmlExecutableContent.ParameterInfo

下一话题

QScxmlCppDataModel

QScxmlCompiler

QScxmlCompiler class is a compiler for SCXML files. 更多

Inheritance diagram of PySide2.QtScxml.QScxmlCompiler

概要

函数

详细描述

Parses an SCXML file and dynamically instantiates a state machine for a successfully parsed SCXML file. If parsing fails, the new state machine cannot start. All errors are returned by parseErrors() .

To load an SCXML file, fromFile or fromData should be used. Using QScxmlCompiler directly is only needed when the compiler needs to use a custom Loader .

class QScxmlCompiler ( xmlReader )
param xmlReader

QXmlStreamReader

Creates a new SCXML compiler for the specified reader .

PySide2.QtScxml.QScxmlCompiler. compile ( )
返回类型

QScxmlStateMachine

Parses an SCXML file and creates a new state machine from it.

If parsing is successful, the returned state machine can be initialized and started. If parsing fails, parseErrors() can be used to retrieve a list of errors.

PySide2.QtScxml.QScxmlCompiler. errors ( )
返回类型

Returns the list of parse errors.

PySide2.QtScxml.QScxmlCompiler. fileName ( )
返回类型

unicode

Returns the file name associated with the current input.

另请参阅

setFileName()

PySide2.QtScxml.QScxmlCompiler. loader ( )
返回类型

Loader

Returns the loader that is currently used to resolve and load URIs for the SCXML compiler.

另请参阅

setLoader()

PySide2.QtScxml.QScxmlCompiler. setFileName ( fileName )
参数

fileName – unicode

Sets the file name for the current input to fileName .

The file name is used for error reporting and for resolving relative path URIs.

另请参阅

fileName()

PySide2.QtScxml.QScxmlCompiler. setLoader ( newLoader )
参数

newLoader Loader

newLoader to be used for resolving and loading URIs for the SCXML compiler.

另请参阅

loader()