Sophie

Sophie

distrib > Mageia > 6 > armv7hl > by-pkgid > c19b334f4b1b3708af0f61afdc1d3e47 > files > 24

qtremoteobjects5-doc-5.9.4-1.mga6.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" />
<!-- qremoteobjectnode.cpp -->
  <title>QRemoteObjectNode Class | Qt Remote Objects 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="qtremoteobjects-index.html">Qt Remote Objects</a></td><td ><a href="qtremoteobjects-module.html">C++ Classes</a></td><td >QRemoteObjectNode</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="#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="#protected-functions">Protected 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">QRemoteObjectNode Class</h1>
<!-- $$$QRemoteObjectNode-brief -->
<p>A node on a Qt Remote Objects network. <a href="#details">More...</a></p>
<!-- @@@QRemoteObjectNode -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QRemoteObjectNode&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="qremoteobjecthostbase.html">QRemoteObjectHostBase</a></p>
</td></tr></table></div><ul>
<li><a href="qremoteobjectnode-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="qremoteobjectnode.html#ErrorCode-enum">ErrorCode</a></b> { NoError, RegistryNotAcquired, RegistryAlreadyHosted, NodeIsNoServer, ..., HostUrlInvalid }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectnode.html#StorageOwnership-enum">StorageOwnership</a></b> { DoNotPassOwnership, PassOwnershipToNode }</td></tr>
</table></div>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><a href="qremoteobjectnode.html#registryUrl-prop">registryUrl</a></b> : QUrl</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="qremoteobjectnode.html#QRemoteObjectNode">QRemoteObjectNode</a></b>(QObject *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectnode.html#QRemoteObjectNode-1">QRemoteObjectNode</a></b>(const QUrl &amp;<i>registryAddress</i>, QObject *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectnode.html#dtor.QRemoteObjectNode">~QRemoteObjectNode</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> ObjectType *</td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectnode.html#acquire">acquire</a></b>(const QString &amp;<i>name</i> = QString())</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRemoteObjectDynamicReplica *</td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectnode.html#acquireDynamic">acquireDynamic</a></b>(const QString &amp;<i>name</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAbstractItemModelReplica *</td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectnode.html#acquireModel">acquireModel</a></b>(const QString &amp;<i>name</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectnode.html#connectToNode">connectToNode</a></b>(const QUrl &amp;<i>address</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectnode.html#instances">instances</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectnode.html#instances-1">instances</a></b>(const QString &amp;<i>typeName</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> ErrorCode </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectnode.html#lastError">lastError</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QRemoteObjectRegistry *</td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectnode.html#registry">registry</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QUrl </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectnode.html#registryUrl-prop">registryUrl</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectnode.html#setName">setName</a></b>(const QString &amp;<i>name</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectnode.html#setPersistedStore">setPersistedStore</a></b>(QRemoteObjectPersistedStore *<i>store</i>, StorageOwnership <i>ownership</i> = DoNotPassOwnership)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectnode.html#registryUrl-prop">setRegistryUrl</a></b>(const QUrl &amp;<i>registryAddress</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectnode.html#timerEvent">timerEvent</a></b>(<i>QTimerEvent *</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectnode.html#waitForRegistry">waitForRegistry</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="qremoteobjectnode.html#error">error</a></b>(QRemoteObjectNode::ErrorCode <i>errorCode</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectnode.html#remoteObjectAdded">remoteObjectAdded</a></b>(const QRemoteObjectSourceLocation &amp;<i>loc</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectnode.html#remoteObjectRemoved">remoteObjectRemoved</a></b>(const QRemoteObjectSourceLocation &amp;<i>loc</i>)</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="qremoteobjectnode.html#QRemoteObjectNode-2">QRemoteObjectNode</a></b>(<i>QRemoteObjectNodePrivate &amp;</i>, QObject *<i>parent</i>)</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QRemoteObjectNode-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>A node on a Qt Remote Objects network.</p>
<p>The <a href="qremoteobjectnode.html">QRemoteObjectNode</a> class provides an entry point to a <a href="qtremoteobjects-module.html">QtRemoteObjects</a> network. A network can be as simple as two nodes, or an arbitrarily complex set of processes and devices.</p>
<p>A <a href="qremoteobjectnode.html">QRemoteObjectNode</a> does not have a url that other nodes can connect to, and thus is able to acquire replicas only. It is not able to share source objects (only <a href="qremoteobjecthost.html">QRemoteObjectHost</a> and <a href="qremoteobjectregistryhost.html">QRemoteObjectRegistryHost</a> Nodes can share).</p>
<p>Nodes may connect to each other directly using <a href="qremoteobjectnode.html#connectToNode">connectToNode</a>, or they can use the <a href="qremoteobjectregistry.html">QRemoteObjectRegistry</a> to simplify connections.</p>
<p>The <a href="qremoteobjectregistry.html">QRemoteObjectRegistry</a> is a special replica available to every node that connects to the Registry Url. It knows how to connect to every QRemoteObjectSource object on the network.</p>
</div>
<p><b>See also </b><a href="qremoteobjecthost.html">QRemoteObjectHost</a> and <a href="qremoteobjectregistryhost.html">QRemoteObjectRegistryHost</a>.</p>
<!-- @@@QRemoteObjectNode -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ErrorCode$$$NoError$$$RegistryNotAcquired$$$RegistryAlreadyHosted$$$NodeIsNoServer$$$ServerAlreadyCreated$$$UnintendedRegistryHosting$$$OperationNotValidOnClientNode$$$SourceNotRegistered$$$MissingObjectName$$$HostUrlInvalid -->
<h3 class="fn" id="ErrorCode-enum"><a name="ErrorCode-enum"></a>enum QRemoteObjectNode::<span class="name">ErrorCode</span></h3>
<p>This enum type specifies the various error codes associated with <a href="qremoteobjectnode.html">QRemoteObjectNode</a> errors:</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>QRemoteObjectNode::NoError</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">No error.</td></tr>
<tr><td class="topAlign"><code>QRemoteObjectNode::RegistryNotAcquired</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The registry could not be acquired.</td></tr>
<tr><td class="topAlign"><code>QRemoteObjectNode::RegistryAlreadyHosted</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The registry is already defined and hosting Sources.</td></tr>
<tr><td class="topAlign"><code>QRemoteObjectNode::NodeIsNoServer</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">The given <a href="qremoteobjectnode.html">QRemoteObjectNode</a> is not a host node.</td></tr>
<tr><td class="topAlign"><code>QRemoteObjectNode::ServerAlreadyCreated</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">The host node has already been initialized.</td></tr>
<tr><td class="topAlign"><code>QRemoteObjectNode::UnintendedRegistryHosting</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">An attempt was made to create a host <a href="qremoteobjectnode.html">QRemoteObjectNode</a> and connect to itself as the registry.</td></tr>
<tr><td class="topAlign"><code>QRemoteObjectNode::OperationNotValidOnClientNode</code></td><td class="topAlign tblval"><code>6</code></td><td class="topAlign">The attempted operation is not valid on a client <a href="qremoteobjectnode.html">QRemoteObjectNode</a>.</td></tr>
<tr><td class="topAlign"><code>QRemoteObjectNode::SourceNotRegistered</code></td><td class="topAlign tblval"><code>7</code></td><td class="topAlign">The given QRemoteObjectSource is not registered on this node.</td></tr>
<tr><td class="topAlign"><code>QRemoteObjectNode::MissingObjectName</code></td><td class="topAlign tblval"><code>8</code></td><td class="topAlign">The given QObject does not have objectName() set.</td></tr>
<tr><td class="topAlign"><code>QRemoteObjectNode::HostUrlInvalid</code></td><td class="topAlign tblval"><code>9</code></td><td class="topAlign">The given url has an invalid or unrecognized scheme.</td></tr>
</table></div>
<!-- @@@ErrorCode -->
<!-- $$$StorageOwnership$$$DoNotPassOwnership$$$PassOwnershipToNode -->
<h3 class="fn" id="StorageOwnership-enum"><a name="StorageOwnership-enum"></a>enum QRemoteObjectNode::<span class="name">StorageOwnership</span></h3>
<p>Used to tell a node whether it should take ownership of a passed pointer or not:</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>QRemoteObjectNode::DoNotPassOwnership</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The ownership of the object is not passed.</td></tr>
<tr><td class="topAlign"><code>QRemoteObjectNode::PassOwnershipToNode</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The ownership of the object is passed, and the node destructor will call delete.</td></tr>
</table></div>
<!-- @@@StorageOwnership -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$registryUrl-prop$$$registryUrl$$$setRegistryUrlconstQUrl& -->
<h3 class="fn" id="registryUrl-prop"><a name="registryUrl-prop"></a><span class="name">registryUrl</span> : <span class="type">QUrl</span></h3>
<p>This property holds the address of the <a href="qremoteobjectregistry.html">Registry</a> used by this node.</p>
<p>This will be an empty QUrl if there is no registry in use.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QUrl </td><td class="memItemRight bottomAlign"><span class="name"><b>registryUrl</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual bool </td><td class="memItemRight bottomAlign"><span class="name"><b>setRegistryUrl</b></span>(const QUrl &amp;<i>registryAddress</i>)</td></tr>
</table></div>
<!-- @@@registryUrl -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QRemoteObjectNode[overload1]$$$QRemoteObjectNodeQObject* -->
<h3 class="fn" id="QRemoteObjectNode"><a name="QRemoteObjectNode"></a>QRemoteObjectNode::<span class="name">QRemoteObjectNode</span>(<span class="type">QObject</span> *<i>parent</i> = nullptr)</h3>
<p>Default constructor for <a href="qremoteobjectnode.html">QRemoteObjectNode</a> with the given <i>parent</i>. A Node constructed in this manner can not be connected to, and thus can not expose Source objects on the network. It also will not include a <a href="qremoteobjectregistry.html">QRemoteObjectRegistry</a>, unless set manually using <a href="qremoteobjectnode.html#registryUrl-prop">setRegistryUrl</a>.</p>
<p><b>See also </b><a href="qremoteobjectnode.html#connectToNode">connectToNode</a> and <a href="qremoteobjectnode.html#registryUrl-prop">setRegistryUrl</a>.</p>
<!-- @@@QRemoteObjectNode -->
<!-- $$$QRemoteObjectNode$$$QRemoteObjectNodeconstQUrl&QObject* -->
<h3 class="fn" id="QRemoteObjectNode-1"><a name="QRemoteObjectNode-1"></a>QRemoteObjectNode::<span class="name">QRemoteObjectNode</span>(const <span class="type">QUrl</span> &amp;<i>registryAddress</i>, <span class="type">QObject</span> *<i>parent</i> = nullptr)</h3>
<p><a href="qremoteobjectnode.html">QRemoteObjectNode</a> connected to a {<a href="qremoteobjectregistry.html">QRemoteObjectRegistry</a>} {Registry}. A Node constructed in this manner can not be connected to, and thus can not expose Source objects on the network. Finding and connecting to other (Host) Nodes is handled by the <a href="qremoteobjectregistry.html">QRemoteObjectRegistry</a> specified by <i>registryAddress</i>.</p>
<p><b>See also </b><a href="qremoteobjectnode.html#connectToNode">connectToNode</a>, <a href="qremoteobjectnode.html#registryUrl-prop">setRegistryUrl</a>, <a href="qremoteobjecthost.html">QRemoteObjectHost</a>, and <a href="qremoteobjectregistryhost.html">QRemoteObjectRegistryHost</a>.</p>
<!-- @@@QRemoteObjectNode -->
<!-- $$$QRemoteObjectNode$$$QRemoteObjectNodeQRemoteObjectNodePrivate&QObject* -->
<h3 class="fn" id="QRemoteObjectNode-2"><a name="QRemoteObjectNode-2"></a><code>[protected] </code>QRemoteObjectNode::<span class="name">QRemoteObjectNode</span>(<i>QRemoteObjectNodePrivate &amp;</i>, <span class="type">QObject</span> *<i>parent</i>)</h3>
<p>Copy constructor.</p><!-- @@@QRemoteObjectNode -->
<!-- $$$~QRemoteObjectNode[overload1]$$$~QRemoteObjectNode -->
<h3 class="fn" id="dtor.QRemoteObjectNode"><a name="dtor.QRemoteObjectNode"></a><code>[virtual] </code>QRemoteObjectNode::<span class="name">~QRemoteObjectNode</span>()</h3>
<p>Destroys the instance of QRemoteObjectNode. The destructor is virtual.</p><!-- @@@~QRemoteObjectNode -->
<!-- $$$acquire[overload1]$$$acquireconstQString& -->
<h3 class="fn" id="acquire"><a name="acquire"></a><span class="type">ObjectType</span> *QRemoteObjectNode::<span class="name">acquire</span>(const <span class="type">QString</span> &amp;<i>name</i> = QString())</h3>
<p>Returns a pointer to a Replica of type ObjectType (which is a template parameter and must inherit from <a href="qremoteobjectreplica.html">QRemoteObjectReplica</a>). That is, the template parameter must be a <a href="qtremoteobjects-repc.html">repc</a> generated type. The <i>name</i> parameter can be used to specify the <i>name</i> given to the object during the <a href="qremoteobjecthostbase.html#enableRemoting">QRemoteObjectHost::enableRemoting</a>() call.</p>
<!-- @@@acquire -->
<!-- $$$acquireDynamic[overload1]$$$acquireDynamicconstQString& -->
<h3 class="fn" id="acquireDynamic"><a name="acquireDynamic"></a><span class="type"><a href="qremoteobjectdynamicreplica.html">QRemoteObjectDynamicReplica</a></span> *QRemoteObjectNode::<span class="name">acquireDynamic</span>(const <span class="type">QString</span> &amp;<i>name</i>)</h3>
<p>Returns a <a href="qremoteobjectdynamicreplica.html">QRemoteObjectDynamicReplica</a> of the Source <i>name</i>.</p>
<!-- @@@acquireDynamic -->
<!-- $$$acquireModel[overload1]$$$acquireModelconstQString& -->
<h3 class="fn" id="acquireModel"><a name="acquireModel"></a><span class="type">QAbstractItemModelReplica</span> *QRemoteObjectNode::<span class="name">acquireModel</span>(const <span class="type">QString</span> &amp;<i>name</i>)</h3>
<p>Returns a pointer to a Replica which is specifically derived from QAbstractItemModel. The <i>name</i> provided must match the name used with the matching <a href="qremoteobjecthostbase.html#enableRemoting">enableRemoting</a> that put the Model on the network. The returned <code>model</code> will be empty until it is initialized with the <a href="qtremoteobjects-source.html#source">Source</a>.</p>
<!-- @@@acquireModel -->
<!-- $$$connectToNode[overload1]$$$connectToNodeconstQUrl& -->
<h3 class="fn" id="connectToNode"><a name="connectToNode"></a><span class="type">bool</span> QRemoteObjectNode::<span class="name">connectToNode</span>(const <span class="type">QUrl</span> &amp;<i>address</i>)</h3>
<p>Connects a client node to the host node at <i>address</i>.</p>
<p>Connections will remain valid until the host node is deleted or no longer accessible over a network.</p>
<p>Once a client is connected to a host, valid Replicas can then be acquired if the corresponding Source is being remoted.</p>
<p>Return <code>true</code> on success, <code>false</code> otherwise (usually an unrecognized url, or connecting to already connected address).</p>
<!-- @@@connectToNode -->
<!-- $$$error[overload1]$$$errorQRemoteObjectNode::ErrorCode -->
<h3 class="fn" id="error"><a name="error"></a><code>[signal] </code><span class="type">void</span> QRemoteObjectNode::<span class="name">error</span>(<span class="type"><a href="qremoteobjectnode.html#ErrorCode-enum">QRemoteObjectNode::ErrorCode</a></span> <i>errorCode</i>)</h3>
<!-- @@@error -->
<!-- $$$instances[overload1]$$$instances -->
<h3 class="fn" id="instances"><a name="instances"></a><span class="type">QStringList</span> QRemoteObjectNode::<span class="name">instances</span>() const</h3>
<p>This templated function (taking a <a href="qtremoteobjects-repc.html">repc</a> generated type as the template parameter) will return the list of names of every instance of that type on the Remote Objects network. For example, if you have a Shape class defined in a .rep file, and Circle and Square classes inherit from the Source definition, they can be shared on the Remote Objects network using <a href="qremoteobjecthostbase.html#enableRemoting">enableRemoting</a>.</p>
<pre class="cpp">

  Square square;
  Circle circle;
  myHost<span class="operator">.</span>enableRemoting(<span class="operator">&amp;</span>square<span class="operator">,</span> <span class="string">&quot;Square&quot;</span>);
  myHost<span class="operator">.</span>enableRemoting(<span class="operator">&amp;</span>circle<span class="operator">,</span> <span class="string">&quot;Circle&quot;</span>);

</pre>
<p>Then instance can be used to find the available instances of Shape.</p>
<pre class="cpp">

  <span class="type">QStringList</span> instances <span class="operator">=</span> clientNode<span class="operator">.</span>instances<span class="operator">&lt;</span>Shape<span class="operator">&gt;</span>();
  <span class="comment">// will return a QStringList containing &quot;Circle&quot; and &quot;Square&quot;</span>
  <span class="keyword">auto</span> instance1 <span class="operator">=</span> clientNode<span class="operator">.</span>acquire<span class="operator">&lt;</span>Shape<span class="operator">&gt;</span>(<span class="string">&quot;Circle&quot;</span>);
  <span class="keyword">auto</span> instance2 <span class="operator">=</span> clientNode<span class="operator">.</span>acquire<span class="operator">&lt;</span>Shape<span class="operator">&gt;</span>(<span class="string">&quot;Square&quot;</span>);
  <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>

</pre>
<!-- @@@instances -->
<!-- $$$instances$$$instancesconstQString& -->
<h3 class="fn" id="instances-1"><a name="instances-1"></a><span class="type">QStringList</span> QRemoteObjectNode::<span class="name">instances</span>(const <span class="type">QString</span> &amp;<i>typeName</i>) const</h3>
<p>This function overloads <a href="qremoteobjectnode.html#instances">instances</a>().</p>
<p>This convenience function provides the same result as the templated version, but takes the name of the <a href="qtremoteobjects-source.html#source">Source</a> class as a parameter (<i>typeName</i>) rather than deriving it from the class type.</p>
<!-- @@@instances -->
<!-- $$$lastError[overload1]$$$lastError -->
<h3 class="fn" id="lastError"><a name="lastError"></a><span class="type"><a href="qremoteobjectnode.html#ErrorCode-enum">ErrorCode</a></span> QRemoteObjectNode::<span class="name">lastError</span>() const</h3>
<p>Returns the last error set.</p>
<!-- @@@lastError -->
<!-- $$$registry[overload1]$$$registry -->
<h3 class="fn" id="registry"><a name="registry"></a>const <span class="type"><a href="qremoteobjectregistry.html">QRemoteObjectRegistry</a></span> *QRemoteObjectNode::<span class="name">registry</span>() const</h3>
<p>Returns a pointer to the Node's <a href="qremoteobjectregistry.html">QRemoteObjectRegistry</a>, if the Node is using the Registry feature; otherwise it returns 0.</p>
<!-- @@@registry -->
<!-- $$$remoteObjectAdded[overload1]$$$remoteObjectAddedconstQRemoteObjectSourceLocation& -->
<h3 class="fn" id="remoteObjectAdded"><a name="remoteObjectAdded"></a><code>[signal] </code><span class="type">void</span> QRemoteObjectNode::<span class="name">remoteObjectAdded</span>(const <span class="type">QRemoteObjectSourceLocation</span> &amp;<i>loc</i>)</h3>
<p>This signal is emitted whenever a new <a href="qtremoteobjects-source.html#source">Source</a> object is added to the Registry. The signal will not be emitted if there is no Registry set (i.e&#x2e;, Sources over connections made via <a href="qremoteobjectnode.html#connectToNode">connectToNode</a> directly). The <i>loc</i> parameter contains the information about the added Source, including name, type and the QUrl of the hosting Node.</p>
<p><b>See also </b><a href="qremoteobjectnode.html#remoteObjectRemoved">remoteObjectRemoved</a> and <a href="qremoteobjectnode.html#instances">instances</a>.</p>
<!-- @@@remoteObjectAdded -->
<!-- $$$remoteObjectRemoved[overload1]$$$remoteObjectRemovedconstQRemoteObjectSourceLocation& -->
<h3 class="fn" id="remoteObjectRemoved"><a name="remoteObjectRemoved"></a><code>[signal] </code><span class="type">void</span> QRemoteObjectNode::<span class="name">remoteObjectRemoved</span>(const <span class="type">QRemoteObjectSourceLocation</span> &amp;<i>loc</i>)</h3>
<p>This signal is emitted whenever there is a known <a href="qtremoteobjects-source.html#source">Source</a> object is removed from the Registry. The signal will not be emitted if there is no Registry set (i.e&#x2e;, Sources over connections made via <a href="qremoteobjectnode.html#connectToNode">connectToNode</a> directly). The <i>loc</i> parameter contains the information about the removed Source, including name, type and the QUrl of the hosting Node.</p>
<p><b>See also </b><a href="qremoteobjectnode.html#remoteObjectAdded">remoteObjectAdded</a> and <a href="qremoteobjectnode.html#instances">instances</a>.</p>
<!-- @@@remoteObjectRemoved -->
<!-- $$$setName[overload1]$$$setNameconstQString& -->
<h3 class="fn" id="setName"><a name="setName"></a><code>[virtual] </code><span class="type">void</span> QRemoteObjectNode::<span class="name">setName</span>(const <span class="type">QString</span> &amp;<i>name</i>)</h3>
<p>Sets <i>name</i> as the internal name for this Node. This is then output as part of the logging (if enabled). This is primarily useful if you merge log data from multiple nodes.</p>
<!-- @@@setName -->
<!-- $$$setPersistedStore[overload1]$$$setPersistedStoreQRemoteObjectPersistedStore*StorageOwnership -->
<h3 class="fn" id="setPersistedStore"><a name="setPersistedStore"></a><span class="type">void</span> QRemoteObjectNode::<span class="name">setPersistedStore</span>(<span class="type"><a href="qremoteobjectpersistedstore.html">QRemoteObjectPersistedStore</a></span> *<i>store</i>, <span class="type"><a href="qremoteobjectnode.html#StorageOwnership-enum">StorageOwnership</a></span> <i>ownership</i> = DoNotPassOwnership)</h3>
<p>Provides a <a href="qremoteobjectpersistedstore.html">QRemoteObjectPersistedStore</a> <i>store</i> for the node, allowing replica <a href="qtremoteobjects-repc.html#prop">PROP</a> members with the PERSISTED trait of <a href="qtremoteobjects-repc.html#prop">PROP</a> to save their current value when the replica is deleted and restore a stored value the next time the replica is started. Requires a <a href="qremoteobjectpersistedstore.html">QRemoteObjectPersistedStore</a> class implementation to control where and how persistence is handled. Use the <a href="qremoteobjectnode.html#StorageOwnership-enum">QRemoteObjectNode::StorageOwnership</a> enum passed by <i>ownership</i> to determine whether the Node will delete the provided pointer or not.</p>
<p><b>See also </b><a href="qremoteobjectpersistedstore.html">QRemoteObjectPersistedStore</a> and <a href="qremoteobjectnode.html#StorageOwnership-enum">QRemoteObjectNode::StorageOwnership</a>.</p>
<!-- @@@setPersistedStore -->
<!-- $$$timerEvent[overload1]$$$timerEventQTimerEvent* -->
<h3 class="fn" id="timerEvent"><a name="timerEvent"></a><span class="type">void</span> QRemoteObjectNode::<span class="name">timerEvent</span>(<i>QTimerEvent *</i>)</h3>
<!-- @@@timerEvent -->
<!-- $$$waitForRegistry[overload1]$$$waitForRegistryint -->
<h3 class="fn" id="waitForRegistry"><a name="waitForRegistry"></a><span class="type">bool</span> QRemoteObjectNode::<span class="name">waitForRegistry</span>(<span class="type">int</span> <i>timeout</i> = 30000)</h3>
<p>Blocks until this Node's <a href="qtremoteobjects-registry.html#registry">Registry</a> is initialized or <i>timeout</i> (in milliseconds) expires. Returns <code>true</code> if the <a href="qtremoteobjects-registry.html#registry">Registry</a> is successfully initialized upon return, or <code>false</code> otherwise.</p>
<!-- @@@waitForRegistry -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</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>