本页内容

QScxmlInvokableServiceFactory Class

QScxmlInvokableServiceFactory 类用于创建可调用服务实例。更多内容...

标题: #include <QScxmlInvokableServiceFactory>
CMake: find_package(Qt6 REQUIRED COMPONENTS Scxml)
target_link_libraries(mytarget PRIVATE Qt6::Scxml)
qmake: QT += scxml
继承自: QObject
继承自:

QScxmlDynamicScxmlServiceFactory 以及QScxmlStaticScxmlServiceFactory

属性

  • invokeInfo : const QScxmlExecutableContent::InvokeInfo
  • names : const QList<QScxmlExecutableContent::StringId>
  • parameters : const QList<QScxmlExecutableContent::ParameterInfo>

公共函数

virtual QScxmlInvokableService *invoke(QScxmlStateMachine *parentStateMachine) = 0
const QScxmlExecutableContent::InvokeInfo &invokeInfo() const
const QList<QScxmlExecutableContent::StringId> &names() const
const QList<QScxmlExecutableContent::ParameterInfo> &parameters() const

详细说明

每个服务实例代表 SCXML 文档中的一个 `<invoke> ` 元素。每次实际调用该服务时,都会创建一个新的 `QScxmlInvokableService ` 实例。

属性文档

[read-only] invokeInfo : const QScxmlExecutableContent::InvokeInfo

该属性保存传递给构造函数的QScxmlExecutableContent::InvokeInfo 。

访问函数:

const QScxmlExecutableContent::InvokeInfo &invokeInfo() const

[read-only] names : const QList<QScxmlExecutableContent::StringId>

该属性存储传递给构造函数的名称。

访问函数:

const QList<QScxmlExecutableContent::StringId> &names() const

[read-only] parameters : const QList<QScxmlExecutableContent::ParameterInfo>

该属性存储传递给构造函数的参数。

访问函数:

const QList<QScxmlExecutableContent::ParameterInfo> &parameters() const

成员函数文档

[pure virtual] QScxmlInvokableService *QScxmlInvokableServiceFactory::invoke(QScxmlStateMachine *parentStateMachine)

使用构造函数中指定的参数调用该服务,并将 `parentStateMachine ` 作为父对象传入。返回新的可调用服务。

© 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.