QScxmlCompiler

The QScxmlCompiler class is a compiler for SCXML files. More

Inheritance diagram of PySide6.QtScxml.QScxmlCompiler

Synopsis

Functions

Detailed Description

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 PySide6.QtScxml.QScxmlCompiler(xmlReader)
Parameters

xmlReaderPySide6.QtCore.QXmlStreamReader

Creates a new SCXML compiler for the specified reader.

PySide6.QtScxml.QScxmlCompiler.compile()
Return type

PySide6.QtScxml.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.

PySide6.QtScxml.QScxmlCompiler.errors()
Return type

Returns the list of parse errors.

PySide6.QtScxml.QScxmlCompiler.fileName()
Return type

str

Returns the file name associated with the current input.

See also

setFileName()

PySide6.QtScxml.QScxmlCompiler.loader()
Return type

PySide6.QtScxml.QScxmlCompiler.Loader

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

See also

setLoader()

PySide6.QtScxml.QScxmlCompiler.setFileName(fileName)
Parameters

fileName – str

Sets the file name for the current input to fileName.

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

See also

fileName()

PySide6.QtScxml.QScxmlCompiler.setLoader(newLoader)
Parameters

newLoaderPySide6.QtScxml.QScxmlCompiler.Loader

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

See also

loader()