Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > c61c536f80c3d067f7ca643389c560f9 > files > 36

qtremoteobjects5-doc-5.12.2-2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qremoteobjectreplica.cpp -->
  <title>QRemoteObjectReplica Class | Qt Remote Objects 5.12.2</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.12</td><td ><a href="qtremoteobjects-index.html">Qt Remote Objects</a></td><td ><a href="qtremoteobjects-module.html">C++ Classes</a></td><td >QRemoteObjectReplica</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtremoteobjects-index.html">Qt 5.12.2 Reference Documentation</a></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="#public-types">Public Types</a></li>
<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="#signals">Signals</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#protected-variables">Protected Variables</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">QRemoteObjectReplica Class</h1>
<!-- $$$QRemoteObjectReplica-brief -->
<p>A class interacting with (but not implementing) a Qt API on the Remote Object network. <a href="#details">More...</a></p>
<!-- @@@QRemoteObjectReplica -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QRemoteObjectReplica&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += remoteobjects</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qremoteobjectdynamicreplica.html">QRemoteObjectDynamicReplica</a> and <a href="qremoteobjectregistry.html">QRemoteObjectRegistry</a></p>
</td></tr></table></div><ul>
<li><a href="qremoteobjectreplica-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectreplica.html#State-enum">State</a></b> { Uninitialized, Default, Valid, Suspect, SignatureMismatch }</td></tr>
</table></div>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><a href="qremoteobjectreplica.html#node-prop">node</a></b> : QRemoteObjectNode*</li>
<li class="fn"><b><a href="qremoteobjectreplica.html#state-prop">state</a></b> : const State</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"> bool </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectreplica.html#isInitialized">isInitialized</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectreplica.html#isReplicaValid">isReplicaValid</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRemoteObjectNode *</td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectreplica.html#node-prop">node</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectreplica.html#node-prop">setNode</a></b>(QRemoteObjectNode *<i>node</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRemoteObjectReplica::State </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectreplica.html#state">state</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectreplica.html#waitForSource">waitForSource</a></b>(int <i>timeout</i> = 30000)</td></tr>
</table></div>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectreplica.html#initialized">initialized</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectreplica.html#state-prop">stateChanged</a></b>(QRemoteObjectReplica::State <i>state</i>, QRemoteObjectReplica::State <i>oldState</i>)</td></tr>
</table></div>
<a name="static-public-members"></a>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> const QMetaObject </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectreplica.html#staticMetaObject-var">staticMetaObject</a></b></td></tr>
</table></div>
<a name="protected-functions"></a>
<h2 id="protected-functions">Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectreplica.html#QRemoteObjectReplica">QRemoteObjectReplica</a></b>(QObjectPrivate &amp;<i>dptr</i>, QObject *<i>parent</i>)</td></tr>
</table></div>
<a name="protected-variables"></a>
<h2 id="protected-variables">Protected Variables</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QSharedPointer&lt;QReplicaImplementationInterface&gt; </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectreplica.html#d_impl-var">d_impl</a></b></td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QRemoteObjectReplica-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>A class interacting with (but not implementing) a Qt API on the Remote Object network.</p>
<p>A Remote Object Replica is a QObject proxy for another QObject (called the <a href="qtremoteobjects-source.html#source">Source</a> object). Once initialized, a replica can be considered a &quot;latent copy&quot; of the <a href="qtremoteobjects-source.html#source">Source</a> object. That is, every change to a Q_PROPERTY on the <a href="qtremoteobjects-source.html#source">Source</a>, or signal emitted by the <a href="qtremoteobjects-source.html#source">Source</a> will be updated/emitted by all <a href="qtremoteobjects-replica.html#replica">Replica</a> objects. Latency is introduced by process scheduling by any OSes involved and network communication latency. As long as the replica has been initialized and the communication is not disrupted, receipt and order of changes is guaranteed.</p>
<p>The <a href="qremoteobjectreplica.html#isInitialized">isInitialized</a> and <a href="qremoteobjectreplica.html#state-prop">state</a> properties (and corresponding <a href="qremoteobjectreplica.html#initialized">initialized</a>()/<a href="qremoteobjectreplica.html#state-prop">stateChanged</a>() signals) allow the state of a <a href="qtremoteobjects-replica.html#replica">Replica</a> to be determined.</p>
<p>While Qt Remote Objects (QtRO) handles the initialization and synchronization of <a href="qtremoteobjects-replica.html#replica">Replica</a> objects, there are numerous steps happening behind the scenes which can fail and that aren't encountered in single process Qt applications. See <a href="qtremoteobjects-troubleshooting.html#troubleshooting">Troubleshooting</a> for advice on how to handle such issues when using a remote objects network.</p>
</div>
<!-- @@@QRemoteObjectReplica -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$State$$$Uninitialized$$$Default$$$Valid$$$Suspect$$$SignatureMismatch -->
<h3 class="fn" id="State-enum"><a name="State-enum"></a>enum QRemoteObjectReplica::<span class="name">State</span></h3>
<p>This enum type specifies the various state codes associated with <a href="qremoteobjectreplica.html">QRemoteObjectReplica</a> states:</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QRemoteObjectReplica::Uninitialized</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">initial value of DynamicReplica, where nothing is known about the replica before connection to source.</td></tr>
<tr><td class="topAlign"><code>QRemoteObjectReplica::Default</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">initial value of static replica, where any defaults set in the .rep file are available so it can be used if necessary.</td></tr>
<tr><td class="topAlign"><code>QRemoteObjectReplica::Valid</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">indicates the replica is connected, has good property values and can be interacted with.</td></tr>
<tr><td class="topAlign"><code>QRemoteObjectReplica::Suspect</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">error state that occurs if the connection to the source is lost after it is initialized.</td></tr>
<tr><td class="topAlign"><code>QRemoteObjectReplica::SignatureMismatch</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">error state that occurs if a connection to the source is made, but the source and replica are not derived from the same .rep (only possible for static Replicas).</td></tr>
</table></div>
<!-- @@@State -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$node-prop$$$node$$$setNodeQRemoteObjectNode* -->
<h3 class="fn" id="node-prop"><a name="node-prop"></a><span class="name">node</span> : <span class="type"><a href="qremoteobjectnode.html">QRemoteObjectNode</a></span>*</h3>
<p>This property holds a pointer to the node this object was acquired from.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QRemoteObjectNode *</td><td class="memItemRight bottomAlign"><span class="name"><b>node</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setNode</b></span>(QRemoteObjectNode *<i>node</i>)</td></tr>
</table></div>
<!-- @@@node -->
<!-- $$$state-prop$$$state$$$stateChangedQRemoteObjectReplica::StateQRemoteObjectReplica::State -->
<h3 class="fn" id="state-prop"><a name="state-prop"></a><span class="name">state</span> : const <span class="type"><a href="qremoteobjectreplica.html#State-enum">State</a></span></h3>
<p>Returns the replica state.</p>
<p>This property holds the replica <a href="qremoteobjectreplica.html#State-enum">QRemoteObjectReplica::State</a>.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QRemoteObjectReplica::State </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qremoteobjectreplica.html#state">state</a></b></span>() const</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>stateChanged</b></span>(QRemoteObjectReplica::State <i>state</i>, QRemoteObjectReplica::State <i>oldState</i>)</td></tr>
</table></div>
<!-- @@@state -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QRemoteObjectReplica[overload1]$$$QRemoteObjectReplicaQObjectPrivate&QObject* -->
<h3 class="fn" id="QRemoteObjectReplica"><a name="QRemoteObjectReplica"></a><code>[protected] </code>QRemoteObjectReplica::<span class="name">QRemoteObjectReplica</span>(<span class="type">QObjectPrivate</span> &amp;<i>dptr</i>, <span class="type">QObject</span> *<i>parent</i>)</h3>
<p>Default constructs an instance of QRemoteObjectReplica.</p><!-- @@@QRemoteObjectReplica -->
<!-- $$$initialized[overload1]$$$initialized -->
<h3 class="fn" id="initialized"><a name="initialized"></a><code>[signal] </code><span class="type">void</span> QRemoteObjectReplica::<span class="name">initialized</span>()</h3>
<!-- @@@initialized -->
<!-- $$$isInitialized[overload1]$$$isInitialized -->
<h3 class="fn" id="isInitialized"><a name="isInitialized"></a><span class="type">bool</span> QRemoteObjectReplica::<span class="name">isInitialized</span>() const</h3>
<p>Returns <code>true</code> if this replica has been initialized with data from the <a href="qtremoteobjects-source.html#source">Source</a> object. Returns <code>false</code> otherwise.</p>
<p><b>See also </b><a href="qremoteobjectreplica.html#state">state</a>().</p>
<!-- @@@isInitialized -->
<!-- $$$isReplicaValid[overload1]$$$isReplicaValid -->
<h3 class="fn" id="isReplicaValid"><a name="isReplicaValid"></a><span class="type">bool</span> QRemoteObjectReplica::<span class="name">isReplicaValid</span>() const</h3>
<p>Returns <code>true</code> if this replica has been initialized and has a valid connection with the <a href="qremoteobjectnode.html">node</a> hosting the <a href="qtremoteobjects-source.html#source">Source</a>. Returns <code>false</code> otherwise.</p>
<p><b>See also </b><a href="qremoteobjectreplica.html#isInitialized">isInitialized</a>().</p>
<!-- @@@isReplicaValid -->
<!-- $$$state -->
<h3 class="fn" id="state"><a name="state"></a><span class="type"><a href="qremoteobjectreplica.html#State-enum">QRemoteObjectReplica::State</a></span> QRemoteObjectReplica::<span class="name">state</span>() const</h3>
<p>Returns <code>true</code> if this replica has been initialized with data from the <a href="qtremoteobjects-source.html#source">Source</a> object. Returns <code>false</code> otherwise.</p>
<p><b>Note:</b> Getter function for property <a href="qremoteobjectreplica.html#state-prop">state</a>. </p><p><b>See also </b><a href="qremoteobjectreplica.html#isInitialized">isInitialized</a>().</p>
<!-- @@@state -->
<!-- $$$waitForSource[overload1]$$$waitForSourceint -->
<h3 class="fn" id="waitForSource"><a name="waitForSource"></a><span class="type">bool</span> QRemoteObjectReplica::<span class="name">waitForSource</span>(<span class="type">int</span> <i>timeout</i> = 30000)</h3>
<p>Blocking call that waits for the replica to become initialized or until the <i>timeout</i> (in ms) expires. Returns <code>true</code> if the replica is initialized when the call completes, <code>false</code> otherwise.</p>
<p>If <i>timeout</i> is -1, this function will not time out.</p>
<p><b>See also </b><a href="qremoteobjectreplica.html#isInitialized">isInitialized</a>() and <a href="qremoteobjectreplica.html#initialized">initialized</a>().</p>
<!-- @@@waitForSource -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 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>