<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qscxmlinvokableservice.cpp --> <title>QScxmlInvokableService Class | Qt SCXML 5.9</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td >Qt 5.9</td><td ><a href="qtscxml-index.html">Qt SCXML</a></td><td ><a href="qtscxml-module.html">C++ Classes</a></td><td >QScxmlInvokableService</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#properties">Properties</a></li> <li class="level1"><a href="#public-functions">Public Functions</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">QScxmlInvokableService Class</h1> <!-- $$$QScxmlInvokableService-brief --> <p>The <a href="qscxmlinvokableservice.html">QScxmlInvokableService</a> class is the base class for services called from state machines. <a href="#details">More...</a></p> <!-- @@@QScxmlInvokableService --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QScxmlInvokableService></span> </td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += scxml</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 5.8</td></tr></table></div><ul> <li><a href="qscxmlinvokableservice-members.html">List of all members, including inherited members</a></li> </ul> <a name="properties"></a> <h2 id="properties">Properties</h2> <ul> <li class="fn"><b><a href="qscxmlinvokableservice.html#id-prop">id</a></b> : const QString</li> <li class="fn"><b><a href="qscxmlinvokableservice.html#name-prop">name</a></b> : const QString</li> <li class="fn"><b><a href="qscxmlinvokableservice.html#parentStateMachine-prop">parentStateMachine</a></b> : QScxmlStateMachine * const</li> </ul> <a name="public-functions"></a> <h2 id="public-functions">Public Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qscxmlinvokableservice.html#QScxmlInvokableService">QScxmlInvokableService</a></b>(QScxmlStateMachine *<i>parentStateMachine</i>, QScxmlInvokableServiceFactory *<i>parent</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual QString </td><td class="memItemRight bottomAlign"><b><a href="qscxmlinvokableservice.html#id-prop">id</a></b>() const = 0</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual QString </td><td class="memItemRight bottomAlign"><b><a href="qscxmlinvokableservice.html#name-prop">name</a></b>() const = 0</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QScxmlStateMachine *</td><td class="memItemRight bottomAlign"><b><a href="qscxmlinvokableservice.html#parentStateMachine-prop">parentStateMachine</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qscxmlinvokableservice.html#postEvent">postEvent</a></b>(QScxmlEvent *<i>event</i>) = 0</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qscxmlinvokableservice.html#start">start</a></b>() = 0</td></tr> </table></div> <a name="details"></a> <!-- $$$QScxmlInvokableService-description --> <div class="descr"> <h2 id="details">Detailed Description</h2> <p>The <a href="qscxmlinvokableservice.html">QScxmlInvokableService</a> class is the base class for services called from state machines.</p> <p>The services are called from state machines via the mechanism described in <a href="https://www.w3.org/TR/scxml/#invoke">SCXML Specification - 6.4 <invoke></a>. This class represents an actual instance of an invoked service.</p> </div> <!-- @@@QScxmlInvokableService --> <div class="prop"> <h2>Property Documentation</h2> <!-- $$$id-prop$$$id --> <h3 class="fn" id="id-prop"><a name="id-prop"></a><span class="name">id</span> : const <span class="type">QString</span></h3> <p>This property holds the ID of the invokable service.</p> <p>The ID is specified by the <code>id</code> attribute of the <code><invoke></code> element.</p> <p><b>Access functions:</b></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> virtual QString </td><td class="memItemRight bottomAlign"><span class="name"><b>id</b></span>() const = 0</td></tr> </table></div> <!-- @@@id --> <!-- $$$name-prop$$$name --> <h3 class="fn" id="name-prop"><a name="name-prop"></a><span class="name">name</span> : const <span class="type">QString</span></h3> <p>This property holds the name of the service being invoked.</p> <p><b>Access functions:</b></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> virtual QString </td><td class="memItemRight bottomAlign"><span class="name"><b>name</b></span>() const = 0</td></tr> </table></div> <!-- @@@name --> <!-- $$$parentStateMachine-prop$$$parentStateMachine --> <h3 class="fn" id="parentStateMachine-prop"><a name="parentStateMachine-prop"></a><span class="name">parentStateMachine</span> : <span class="type"><a href="qscxmlstatemachine.html">QScxmlStateMachine</a></span> * const</h3> <p>This property holds the SCXML state machine that invoked the service.</p> <p><b>Access functions:</b></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> QScxmlStateMachine *</td><td class="memItemRight bottomAlign"><span class="name"><b>parentStateMachine</b></span>() const</td></tr> </table></div> <!-- @@@parentStateMachine --> </div> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$QScxmlInvokableService[overload1]$$$QScxmlInvokableServiceQScxmlStateMachine*QScxmlInvokableServiceFactory* --> <h3 class="fn" id="QScxmlInvokableService"><a name="QScxmlInvokableService"></a>QScxmlInvokableService::<span class="name">QScxmlInvokableService</span>(<span class="type"><a href="qscxmlstatemachine.html">QScxmlStateMachine</a></span> *<i>parentStateMachine</i>, <span class="type"><a href="qscxmlinvokableservicefactory.html">QScxmlInvokableServiceFactory</a></span> *<i>parent</i>)</h3> <p>Default constructs an instance of QScxmlInvokableService.</p><!-- @@@QScxmlInvokableService --> <!-- $$$postEvent[overload1]$$$postEventQScxmlEvent* --> <h3 class="fn" id="postEvent"><a name="postEvent"></a><code>[pure virtual] </code><span class="type">void</span> QScxmlInvokableService::<span class="name">postEvent</span>(<span class="type"><a href="qscxmlevent.html">QScxmlEvent</a></span> *<i>event</i>)</h3> <p>Sends an <i>event</i> to the service.</p> <!-- @@@postEvent --> <!-- $$$start[overload1]$$$start --> <h3 class="fn" id="start"><a name="start"></a><code>[pure virtual] </code><span class="type">bool</span> QScxmlInvokableService::<span class="name">start</span>()</h3> <p>Starts the invokable service. Returns <code>true</code> on success, or <code>false</code> if the invocation fails.</p> <!-- @@@start --> </div> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br> 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. </p> </div> </body> </html>