Using the Qt SCXML Compiler (qscxmlc)
qscxmlc tool reads an .scxml file and produces C++ source and header files, containing a class that implements a state machine as defined in SCXML.
qscxml tool is invoked automatically if the QT variable in the project file includes
scxml, and the .scxml file to use is specified using the
QT += scxml STATECHARTS = MyStatemachine.scxml
By default, the name of the generated class that implements the state machine corresponds with the name attribute of the
<scxml> root element.
qscxmlc tool supports the following command-line options:
|Use no C++11 features in the generated code.|
|Put the generated class(es) in the specified namespace.|
|The base name of the output files. This can include a path. If none is specified, the basename of the input file is used.|
|The name of the output header file. If none is specified, .h is added to the base name.|
|The name of the output header file. If none is specified, .cpp is added to the base name.|
|The class name of the generated state machine. If none is specified, the value of the name attribute of the <scxml> tag is taken. If that attribute is not specified either, the basename (excluding path) is taken from the input file name.|
© 2016 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.