Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 768f7d9f703884aa2562bf0a651086df > files > 1812

qtbase5-doc-5.9.4-1.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" />
<!-- qnetworkinterface.cpp -->
  <title>QNetworkAddressEntry Class | Qt Network 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="qtnetwork-index.html">Qt Network</a></td><td ><a href="qtnetwork-module.html">C++ Classes</a></td><td >QNetworkAddressEntry</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-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">QNetworkAddressEntry Class</h1>
<!-- $$$QNetworkAddressEntry-brief -->
<p>The <a href="qnetworkaddressentry.html">QNetworkAddressEntry</a> class stores one IP address supported by a network interface, along with its associated netmask and broadcast address. <a href="#details">More...</a></p>
<!-- @@@QNetworkAddressEntry -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QNetworkAddressEntry&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += network</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 4.2</td></tr></table></div><ul>
<li><a href="qnetworkaddressentry-members.html">List of all members, including inherited members</a></li>
</ul>
<p><b>Note:</b> All functions in this class are reentrant.</p>
<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="qnetworkaddressentry.html#QNetworkAddressEntry">QNetworkAddressEntry</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qnetworkaddressentry.html#QNetworkAddressEntry-1">QNetworkAddressEntry</a></b>(const QNetworkAddressEntry &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qnetworkaddressentry.html#dtor.QNetworkAddressEntry">~QNetworkAddressEntry</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QHostAddress </td><td class="memItemRight bottomAlign"><b><a href="qnetworkaddressentry.html#broadcast">broadcast</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QHostAddress </td><td class="memItemRight bottomAlign"><b><a href="qnetworkaddressentry.html#ip">ip</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QHostAddress </td><td class="memItemRight bottomAlign"><b><a href="qnetworkaddressentry.html#netmask">netmask</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qnetworkaddressentry.html#prefixLength">prefixLength</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qnetworkaddressentry.html#setBroadcast">setBroadcast</a></b>(const QHostAddress &amp;<i>newBroadcast</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qnetworkaddressentry.html#setIp">setIp</a></b>(const QHostAddress &amp;<i>newIp</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qnetworkaddressentry.html#setNetmask">setNetmask</a></b>(const QHostAddress &amp;<i>newNetmask</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qnetworkaddressentry.html#setPrefixLength">setPrefixLength</a></b>(int <i>length</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qnetworkaddressentry.html#swap">swap</a></b>(QNetworkAddressEntry &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qnetworkaddressentry.html#operator-not-eq">operator!=</a></b>(const QNetworkAddressEntry &amp;<i>other</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QNetworkAddressEntry &amp;</td><td class="memItemRight bottomAlign"><b><a href="qnetworkaddressentry.html#operator-eq">operator=</a></b>(QNetworkAddressEntry &amp;&amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QNetworkAddressEntry &amp;</td><td class="memItemRight bottomAlign"><b><a href="qnetworkaddressentry.html#operator-eq-1">operator=</a></b>(const QNetworkAddressEntry &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qnetworkaddressentry.html#operator-eq-eq">operator==</a></b>(const QNetworkAddressEntry &amp;<i>other</i>) const</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QNetworkAddressEntry-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qnetworkaddressentry.html">QNetworkAddressEntry</a> class stores one IP address supported by a network interface, along with its associated netmask and broadcast address.</p>
<p>Each network interface can contain zero or more IP addresses, which in turn can be associated with a netmask and/or a broadcast address (depending on support from the operating system).</p>
<p>This class represents one such group.</p>
</div>
<!-- @@@QNetworkAddressEntry -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QNetworkAddressEntry[overload1]$$$QNetworkAddressEntry -->
<h3 class="fn" id="QNetworkAddressEntry"><a name="QNetworkAddressEntry"></a>QNetworkAddressEntry::<span class="name">QNetworkAddressEntry</span>()</h3>
<p>Constructs an empty <a href="qnetworkaddressentry.html">QNetworkAddressEntry</a> object.</p>
<!-- @@@QNetworkAddressEntry -->
<!-- $$$QNetworkAddressEntry$$$QNetworkAddressEntryconstQNetworkAddressEntry& -->
<h3 class="fn" id="QNetworkAddressEntry-1"><a name="QNetworkAddressEntry-1"></a>QNetworkAddressEntry::<span class="name">QNetworkAddressEntry</span>(const <span class="type"><a href="qnetworkaddressentry.html#QNetworkAddressEntry">QNetworkAddressEntry</a></span> &amp;<i>other</i>)</h3>
<p>Constructs a <a href="qnetworkaddressentry.html">QNetworkAddressEntry</a> object that is a copy of the object <i>other</i>.</p>
<!-- @@@QNetworkAddressEntry -->
<!-- $$$~QNetworkAddressEntry[overload1]$$$~QNetworkAddressEntry -->
<h3 class="fn" id="dtor.QNetworkAddressEntry"><a name="dtor.QNetworkAddressEntry"></a>QNetworkAddressEntry::<span class="name">~QNetworkAddressEntry</span>()</h3>
<p>Destroys this <a href="qnetworkaddressentry.html">QNetworkAddressEntry</a> object.</p>
<!-- @@@~QNetworkAddressEntry -->
<!-- $$$broadcast[overload1]$$$broadcast -->
<h3 class="fn" id="broadcast"><a name="broadcast"></a><span class="type"><a href="qhostaddress.html">QHostAddress</a></span> QNetworkAddressEntry::<span class="name">broadcast</span>() const</h3>
<p>Returns the broadcast address associated with the IPv4 address and netmask. It can usually be derived from those two by setting to 1 the bits of the IP address where the netmask contains a 0. (In other words, by bitwise-OR'ing the IP address with the inverse of the netmask)</p>
<p>This member is always empty for IPv6 addresses, since the concept of broadcast has been abandoned in that system in favor of multicast. In particular, the group of hosts corresponding to all the nodes in the local network can be reached by the &quot;all-nodes&quot; special multicast group (address FF02::1).</p>
<p><b>See also </b><a href="qnetworkaddressentry.html#setBroadcast">setBroadcast</a>().</p>
<!-- @@@broadcast -->
<!-- $$$ip[overload1]$$$ip -->
<h3 class="fn" id="ip"><a name="ip"></a><span class="type"><a href="qhostaddress.html">QHostAddress</a></span> QNetworkAddressEntry::<span class="name">ip</span>() const</h3>
<p>This function returns one IPv4 or IPv6 address found, that was found in a network interface.</p>
<p><b>See also </b><a href="qnetworkaddressentry.html#setIp">setIp</a>().</p>
<!-- @@@ip -->
<!-- $$$netmask[overload1]$$$netmask -->
<h3 class="fn" id="netmask"><a name="netmask"></a><span class="type"><a href="qhostaddress.html">QHostAddress</a></span> QNetworkAddressEntry::<span class="name">netmask</span>() const</h3>
<p>Returns the netmask associated with the IP address. The netmask is expressed in the form of an IP address, such as 255.255.0&#x2e;0&#x2e;</p>
<p>For IPv6 addresses, the prefix length is converted to an address where the number of bits set to 1 is equal to the prefix length. For a prefix length of 64 bits (the most common value), the netmask will be expressed as a <a href="qhostaddress.html">QHostAddress</a> holding the address FFFF:FFFF:FFFF:FFFF::</p>
<p><b>See also </b><a href="qnetworkaddressentry.html#setNetmask">setNetmask</a>() and <a href="qnetworkaddressentry.html#prefixLength">prefixLength</a>().</p>
<!-- @@@netmask -->
<!-- $$$prefixLength[overload1]$$$prefixLength -->
<h3 class="fn" id="prefixLength"><a name="prefixLength"></a><span class="type">int</span> QNetworkAddressEntry::<span class="name">prefixLength</span>() const</h3>
<p>Returns the prefix length of this IP address. The prefix length matches the number of bits set to 1 in the netmask (see <a href="qnetworkaddressentry.html#netmask">netmask</a>()). For IPv4 addresses, the value is between 0 and 32. For IPv6 addresses, it's contained between 0 and 128 and is the preferred form of representing addresses.</p>
<p>This function returns -1 if the prefix length could not be determined (i.e&#x2e;, <a href="qnetworkaddressentry.html#netmask">netmask</a>() returns a null QHostAddress()).</p>
<p>This function was introduced in  Qt 4.5.</p>
<p><b>See also </b><a href="qnetworkaddressentry.html#setPrefixLength">setPrefixLength</a>() and <a href="qnetworkaddressentry.html#netmask">netmask</a>().</p>
<!-- @@@prefixLength -->
<!-- $$$setBroadcast[overload1]$$$setBroadcastconstQHostAddress& -->
<h3 class="fn" id="setBroadcast"><a name="setBroadcast"></a><span class="type">void</span> QNetworkAddressEntry::<span class="name">setBroadcast</span>(const <span class="type"><a href="qhostaddress.html">QHostAddress</a></span> &amp;<i>newBroadcast</i>)</h3>
<p>Sets the broadcast IP address of this <a href="qnetworkaddressentry.html">QNetworkAddressEntry</a> object to <i>newBroadcast</i>.</p>
<p><b>See also </b><a href="qnetworkaddressentry.html#broadcast">broadcast</a>().</p>
<!-- @@@setBroadcast -->
<!-- $$$setIp[overload1]$$$setIpconstQHostAddress& -->
<h3 class="fn" id="setIp"><a name="setIp"></a><span class="type">void</span> QNetworkAddressEntry::<span class="name">setIp</span>(const <span class="type"><a href="qhostaddress.html">QHostAddress</a></span> &amp;<i>newIp</i>)</h3>
<p>Sets the IP address the <a href="qnetworkaddressentry.html">QNetworkAddressEntry</a> object contains to <i>newIp</i>.</p>
<p><b>See also </b><a href="qnetworkaddressentry.html#ip">ip</a>().</p>
<!-- @@@setIp -->
<!-- $$$setNetmask[overload1]$$$setNetmaskconstQHostAddress& -->
<h3 class="fn" id="setNetmask"><a name="setNetmask"></a><span class="type">void</span> QNetworkAddressEntry::<span class="name">setNetmask</span>(const <span class="type"><a href="qhostaddress.html">QHostAddress</a></span> &amp;<i>newNetmask</i>)</h3>
<p>Sets the netmask that this <a href="qnetworkaddressentry.html">QNetworkAddressEntry</a> object contains to <i>newNetmask</i>. Setting the netmask also sets the prefix length to match the new netmask.</p>
<p><b>See also </b><a href="qnetworkaddressentry.html#netmask">netmask</a>() and <a href="qnetworkaddressentry.html#setPrefixLength">setPrefixLength</a>().</p>
<!-- @@@setNetmask -->
<!-- $$$setPrefixLength[overload1]$$$setPrefixLengthint -->
<h3 class="fn" id="setPrefixLength"><a name="setPrefixLength"></a><span class="type">void</span> QNetworkAddressEntry::<span class="name">setPrefixLength</span>(<span class="type">int</span> <i>length</i>)</h3>
<p>Sets the prefix length of this IP address to <i>length</i>. The value of <i>length</i> must be valid for this type of IP address: between 0 and 32 for IPv4 addresses, between 0 and 128 for IPv6 addresses. Setting to any invalid value is equivalent to setting to -1, which means &quot;no prefix length&quot;.</p>
<p>Setting the prefix length also sets the netmask (see <a href="qnetworkaddressentry.html#netmask">netmask</a>()).</p>
<p>This function was introduced in  Qt 4.5.</p>
<p><b>See also </b><a href="qnetworkaddressentry.html#prefixLength">prefixLength</a>() and <a href="qnetworkaddressentry.html#setNetmask">setNetmask</a>().</p>
<!-- @@@setPrefixLength -->
<!-- $$$swap[overload1]$$$swapQNetworkAddressEntry& -->
<h3 class="fn" id="swap"><a name="swap"></a><span class="type">void</span> QNetworkAddressEntry::<span class="name">swap</span>(<span class="type"><a href="qnetworkaddressentry.html#QNetworkAddressEntry">QNetworkAddressEntry</a></span> &amp;<i>other</i>)</h3>
<p>Swaps this network address entry instance with <i>other</i>. This function is very fast and never fails.</p>
<p>This function was introduced in  Qt 5.0.</p>
<!-- @@@swap -->
<!-- $$$operator!=[overload1]$$$operator!=constQNetworkAddressEntry& -->
<h3 class="fn" id="operator-not-eq"><a name="operator-not-eq"></a><span class="type">bool</span> QNetworkAddressEntry::<span class="name">operator!=</span>(const <span class="type"><a href="qnetworkaddressentry.html#QNetworkAddressEntry">QNetworkAddressEntry</a></span> &amp;<i>other</i>) const</h3>
<p>Returns <code>true</code> if this network address entry is different from <i>other</i>.</p>
<!-- @@@operator!= -->
<!-- $$$operator=[overload1]$$$operator=QNetworkAddressEntry&& -->
<h3 class="fn" id="operator-eq"><a name="operator-eq"></a><span class="type"><a href="qnetworkaddressentry.html#QNetworkAddressEntry">QNetworkAddressEntry</a></span> &amp;QNetworkAddressEntry::<span class="name">operator=</span>(<span class="type"><a href="qnetworkaddressentry.html#QNetworkAddressEntry">QNetworkAddressEntry</a></span> &amp;&amp;<i>other</i>)</h3>
<p>Move-assignment operator.</p><!-- @@@operator= -->
<!-- $$$operator=$$$operator=constQNetworkAddressEntry& -->
<h3 class="fn" id="operator-eq-1"><a name="operator-eq-1"></a><span class="type"><a href="qnetworkaddressentry.html#QNetworkAddressEntry">QNetworkAddressEntry</a></span> &amp;QNetworkAddressEntry::<span class="name">operator=</span>(const <span class="type"><a href="qnetworkaddressentry.html#QNetworkAddressEntry">QNetworkAddressEntry</a></span> &amp;<i>other</i>)</h3>
<p>Makes a copy of the <a href="qnetworkaddressentry.html">QNetworkAddressEntry</a> object <i>other</i>.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQNetworkAddressEntry& -->
<h3 class="fn" id="operator-eq-eq"><a name="operator-eq-eq"></a><span class="type">bool</span> QNetworkAddressEntry::<span class="name">operator==</span>(const <span class="type"><a href="qnetworkaddressentry.html#QNetworkAddressEntry">QNetworkAddressEntry</a></span> &amp;<i>other</i>) const</h3>
<p>Returns <code>true</code> if this network address entry is the same as <i>other</i>.</p>
<!-- @@@operator== -->
</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>