QScxmlInvokableService Class
QScxmlInvokableService 类是状态机调用服务的基类。更多内容...
| 头文件: | #include <QScxmlInvokableService> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Scxml) target_link_libraries(mytarget PRIVATE Qt6::Scxml) |
| qmake: | QT += scxml |
| 继承自: | QObject |
属性
- id : const QString
- name : const QString
- parentStateMachine : QScxmlStateMachine* const
公共函数
| virtual QString | id() const = 0 |
| virtual QString | name() const = 0 |
| QScxmlStateMachine * | parentStateMachine() const |
| virtual void | postEvent(QScxmlEvent *event) = 0 |
| virtual bool | start() = 0 |
详细说明
这些服务是通过《SCXML规范》第6.4节<invoke>中描述的机制,由状态机调用的。本类表示被调用的服务的实际实例。
属性文档
[read-only] id : const QString
该属性存储可调用服务的ID。
该 ID 由 `<invoke> ` 元素的 `id ` 属性指定。
访问函数:
| virtual QString | id() const = 0 |
[read-only] name : const QString
该属性存储被调用的服务名称。
访问函数:
| virtual QString | name() const = 0 |
[read-only] parentStateMachine : QScxmlStateMachine* const
该属性存储了调用该服务的 SCXML 状态机。
访问函数:
| QScxmlStateMachine * | parentStateMachine() const |
成员函数文档
[pure virtual] void QScxmlInvokableService::postEvent(QScxmlEvent *event)
向该服务发送一个event 。
[pure virtual] bool QScxmlInvokableService::start()
启动可调用服务。成功时返回true ,调用失败时返回false 。
© 2026 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.