The QScxmlInvokableService class is the base class for services called from state machines. 更多...
头: | #include <QScxmlInvokableService> |
CMake: |
find_package(Qt6 COMPONENTS Scxml REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::Scxml) |
qmake: | QT += scxml |
Since: | Qt 5.8 |
继承: | QObject |
virtual QString | id () const = 0 |
virtual QString | name () const = 0 |
QScxmlStateMachine * | parentStateMachine () const |
virtual void | postEvent (QScxmlEvent * event ) = 0 |
virtual bool | start () = 0 |
The services are called from state machines via the mechanism described in SCXML Specification - 6.4 <invoke> . This class represents an actual instance of an invoked service.
[read-only]
id
: const
QString
This property holds the ID of the invokable service.
The ID is specified by the
id
属性在
<invoke>
元素。
访问函数:
virtual QString | id () const = 0 |
[read-only]
name
: const
QString
This property holds the name of the service being invoked.
访问函数:
virtual QString | name () const = 0 |
[read-only]
parentStateMachine
:
QScxmlStateMachine
* const
This property holds the SCXML state machine that invoked the service.
访问函数:
QScxmlStateMachine * | parentStateMachine () const |
[pure virtual]
void
QScxmlInvokableService::
postEvent
(
QScxmlEvent
*
event
)
Sends an event to the service.
[pure virtual]
bool
QScxmlInvokableService::
start
()
Starts the invokable service. Returns
true
当成功时,或
false
if the invocation fails.