PySide6.QtScxml.QScxmlCompiler¶
- class QScxmlCompiler¶
- The - QScxmlCompilerclass is a compiler for SCXML files. More_…- Synopsis¶- Methods¶- def - __init__()
- def - compile()
- def - errors()
- def - fileName()
- def - loader()
- def - setFileName()
- def - setLoader()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - 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, - fromFileor- fromDatashould be used. Using- QScxmlCompilerdirectly is only needed when the compiler needs to use a custom- Loader.- __init__(xmlReader)¶
- Parameters:
- xmlReader – - QXmlStreamReader
 
 - Creates a new SCXML compiler for the specified - reader.- compile()¶
- Return type:
 
 - 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.- errors()¶
- Return type:
- .list of QScxmlError 
 
 - Returns the list of parse errors. - fileName()¶
- Return type:
- str 
 
 - Returns the file name associated with the current input. - See also - Returns the loader that is currently used to resolve and load URIs for the SCXML compiler. - See also - 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 - Sets - newLoaderto be used for resolving and loading URIs for the SCXML compiler.- See also - class Loader¶
- The Loader class is a URI resolver and resource loader for an SCXML compiler. More_… - Synopsis¶- Methods¶- def - __init__()
 - Virtual methods¶- def - load()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Detailed Description¶- __init__()¶
 - Creates a new loader. - abstract load(name, baseDir, errors)¶
- Parameters:
- name – str 
- baseDir – str 
- errors – list of strings 
 
- Return type:
 
 - Resolves the URI - nameand loads an SCXML file from the directory specified by- baseDir.- errorscontains information about the errors that might have occurred.- Returns a QByteArray that stores the contents of the file.