Sophie

Sophie

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

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" />
<!-- qconnectionfactories.cpp -->
  <title>QtROServerFactory 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 >QtROServerFactory</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-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#related-non-members">Related Non-Members</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">QtROServerFactory Class</h1>
<!-- $$$QtROServerFactory-brief -->
<p>A class holding information about server backends available on the Qt Remote Objects network. <a href="#details">More...</a></p>
<!-- @@@QtROServerFactory -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QtROServerFactory&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += remoteobjects</td></tr></table></div><ul>
<li><a href="qtroserverfactory-members.html">List of all members, including inherited members</a></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"> QConnectionAbstractServer *</td><td class="memItemRight bottomAlign"><b><a href="qtroserverfactory.html#create">create</a></b>(const QUrl &amp;<i>url</i>, QObject *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtroserverfactory.html#isValid">isValid</a></b>(const QUrl &amp;<i>url</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtroserverfactory.html#registerType">registerType</a></b>(const QString &amp;<i>id</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"> QtROServerFactory *</td><td class="memItemRight bottomAlign"><b><a href="qtroserverfactory.html#instance">instance</a></b>()</td></tr>
</table></div>
<a name="related-non-members"></a>
<h2 id="related-non-members">Related Non-Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtroserverfactory.html#qRegisterRemoteObjectsServer">qRegisterRemoteObjectsServer</a></b>(const QString &amp;<i>id</i>)</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QtROServerFactory-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>A class holding information about server backends available on the Qt Remote Objects network.</p>
</div>
<!-- @@@QtROServerFactory -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$create[overload1]$$$createconstQUrl&QObject* -->
<h3 class="fn" id="create"><a name="create"></a><span class="type">QConnectionAbstractServer</span> *QtROServerFactory::<span class="name">create</span>(const <span class="type">QUrl</span> &amp;<i>url</i>, <span class="type">QObject</span> *<i>parent</i> = nullptr)</h3>
<!-- @@@create -->
<!-- $$$instance[overload1]$$$instance -->
<h3 class="fn" id="instance"><a name="instance"></a><code>[static] </code><span class="type">QtROServerFactory</span> *QtROServerFactory::<span class="name">instance</span>()</h3>
<!-- @@@instance -->
<!-- $$$isValid[overload1]$$$isValidconstQUrl& -->
<h3 class="fn" id="isValid"><a name="isValid"></a><span class="type">bool</span> QtROServerFactory::<span class="name">isValid</span>(const <span class="type">QUrl</span> &amp;<i>url</i>)</h3>
<!-- @@@isValid -->
<!-- $$$registerType[overload1]$$$registerTypeconstQString& -->
<h3 class="fn" id="registerType"><a name="registerType"></a><span class="type">void</span> QtROServerFactory::<span class="name">registerType</span>(const <span class="type">QString</span> &amp;<i>id</i>)</h3>
<!-- @@@registerType -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$qRegisterRemoteObjectsServer[overload1]$$$qRegisterRemoteObjectsServerconstQString& -->
<h3 class="fn" id="qRegisterRemoteObjectsServer"><a name="qRegisterRemoteObjectsServer"></a><span class="type">void</span> <span class="name">qRegisterRemoteObjectsServer</span>(const <span class="type">QString</span> &amp;<i>id</i>)</h3>
<p>Registers the Remote Objects server <i>id</i> for the type <code>T</code>.</p>
<p>If you need a custom transport protocol for Qt Remote Objects, you need to register the client &amp; server implementation here.</p>
<p><b>Note: </b>This function requires that <code>T</code> is a fully defined type at the point where the function is called.</p><p>This example registers the class <code>CustomServerImpl</code> as <code>&quot;myprotocol&quot;</code>:</p>
<pre class="cpp">

  qRegisterRemoteObjectsServer<span class="operator">&lt;</span>CustomServerImpl<span class="operator">&gt;</span>(<span class="type">QStringLiteral</span>(<span class="string">&quot;myprotocol&quot;</span>));

</pre>
<p>With this in place, you can now instantiate nodes using this new custom protocol:</p>
<pre class="cpp">

  <span class="type"><a href="qremoteobjectnode.html">QRemoteObjectNode</a></span> client(<span class="type">QUrl</span>(<span class="type">QStringLiteral</span>(<span class="string">&quot;myprotocol:registry&quot;</span>)));

</pre>
<p><b>See also </b>qRegisterRemoteObjectsServer.</p>
<!-- @@@qRegisterRemoteObjectsServer -->
</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>