QScxmlDynamicScxmlServiceFactory Class
QScxmlDynamicScxmlServiceFactory 类从运行时加载的文档中创建 SCXML 服务实例。更多
Header: | #include <QScxmlDynamicScxmlServiceFactory> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Scxml) target_link_libraries(mytarget PRIVATE Qt6::Scxml) |
qmake: | QT += scxml |
继承: | QScxmlInvokableServiceFactory |
公共函数
QScxmlDynamicScxmlServiceFactory(const QScxmlExecutableContent::InvokeInfo &invokeInfo, const QList<QScxmlExecutableContent::StringId> &names, const QList<QScxmlExecutableContent::ParameterInfo> ¶meters, QObject *parent = nullptr) |
重新实现的公共函数
virtual QScxmlInvokableService * | invoke(QScxmlStateMachine *parentStateMachine) override |
详细说明
动态解析服务用于从父级状态机在运行时通过<invoke>
元素中的srcexpr
属性请求的文件加载SCXML内容。
成员函数文档
QScxmlDynamicScxmlServiceFactory::QScxmlDynamicScxmlServiceFactory(const QScxmlExecutableContent::InvokeInfo &invokeInfo, const QList<QScxmlExecutableContent::StringId> &names, const QList<QScxmlExecutableContent::ParameterInfo> ¶meters, QObject *parent = nullptr)
为动态解析服务创建一个工厂,将<invoke>
元素的属性作为invokeInfo 传递,将任何<param>
子元素作为parameters 传递,将names
属性的内容作为names 传递,将QObject 父元素作为parent 传递。
[override virtual]
QScxmlInvokableService *QScxmlDynamicScxmlServiceFactory::invoke(QScxmlStateMachine *parentStateMachine)
重实现:QScxmlInvokableServiceFactory::invoke(QScxmlStateMachine *parentStateMachine).
© 2025 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.