Sophie

Sophie

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

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" />
<!-- qendian.qdoc -->
  <title>&lt;QtEndian&gt; - Endian Conversion Functions | Qt Core 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="qtcore-index.html">Qt Core</a></td><td >&lt;QtEndian&gt; - Endian Conversion Functions</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="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">&lt;QtEndian&gt; - Endian Conversion Functions</h1>
<span class="subtitle"></span>
<!-- $$$<QtEndian>-brief -->
<p>The &lt;QtEndian&gt; header provides functions to convert between little and big endian representations of numbers. <a href="#details">More...</a></p>
<!-- @@@<QtEndian> -->
<ul>
</ul>
<a name="Functions"></a>
<h2 id="Functions">Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> T </td><td class="memItemRight bottomAlign"><b><a href="qtendian.html#qFromBigEndian">qFromBigEndian</a></b>(T <i>src</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> T </td><td class="memItemRight bottomAlign"><b><a href="qtendian.html#qFromBigEndian">qFromBigEndian</a></b>(const void *<i>src</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> T </td><td class="memItemRight bottomAlign"><b><a href="qtendian.html#qFromLittleEndian">qFromLittleEndian</a></b>(T <i>src</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> T </td><td class="memItemRight bottomAlign"><b><a href="qtendian.html#qFromLittleEndian">qFromLittleEndian</a></b>(const void *<i>src</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> T </td><td class="memItemRight bottomAlign"><b><a href="qtendian.html#qToBigEndian">qToBigEndian</a></b>(T <i>src</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtendian.html#qToBigEndian">qToBigEndian</a></b>(T <i>src</i>, void *<i>dest</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> T </td><td class="memItemRight bottomAlign"><b><a href="qtendian.html#qToLittleEndian">qToLittleEndian</a></b>(T <i>src</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtendian.html#qToLittleEndian">qToLittleEndian</a></b>(T <i>src</i>, void *<i>dest</i>)</td></tr>
</table></div>
<!-- $$$<QtEndian>-description -->
<div class="descr"> <a name="details"></a>
</div>
<!-- @@@<QtEndian> -->
<h2>Function Documentation</h2>
<!-- $$$qFromBigEndian[overload1]$$$qFromBigEndianT -->
<h3 class="fn" id="qFromBigEndian"><a name="qFromBigEndian"></a><span class="type">T</span> <span class="name">qFromBigEndian</span>(<span class="type">T</span> <i>src</i>)</h3>
<p>This is an overloaded function.</p>
<p>Converts <i>src</i> from big-endian byte order and returns the number in host byte order representation of that number. On CPU architectures where the host byte order is little-endian (such as x86) this will return <i>src</i> with the byte order swapped; otherwise it will return <i>src</i> unmodified.</p>
<p>This function was introduced in  Qt 4.3.</p>
<!-- @@@qFromBigEndian -->
<!-- $$$qFromBigEndian[overload1]$$$qFromBigEndianconstvoid* -->
<h3 class="fn" id="qFromBigEndian"><a name="qFromBigEndian"></a><span class="type">T</span> <span class="name">qFromBigEndian</span>(const <span class="type">void</span> *<i>src</i>)</h3>
<p>Reads a big-endian number from memory location <i>src</i> and returns the number in the host byte order representation. On CPU architectures where the host byte order is little-endian (such as x86) this will swap the byte order; otherwise it will just read from <i>src</i>.</p>
<p><b>Note: </b>Template type <code>T</code> can either be a qint16, qint32 or qint64. Other types of integers, e.g&#x2e;, qlong, are not applicable.</p><p><b>Note: </b>Since Qt 5.7, the type of the <i>src</i> parameter is a void pointer.</p><p>There are no data alignment constraints for <i>src</i>.</p>
<p>This function was introduced in  Qt 4.3.</p>
<p><b>See also </b><a href="qtendian.html#qFromLittleEndian">qFromLittleEndian</a>(), <a href="qtendian.html#qToBigEndian">qToBigEndian</a>(), and <a href="qtendian.html#qToLittleEndian">qToLittleEndian</a>().</p>
<!-- @@@qFromBigEndian -->
<!-- $$$qFromLittleEndian[overload1]$$$qFromLittleEndianT -->
<h3 class="fn" id="qFromLittleEndian"><a name="qFromLittleEndian"></a><span class="type">T</span> <span class="name">qFromLittleEndian</span>(<span class="type">T</span> <i>src</i>)</h3>
<p>This is an overloaded function.</p>
<p>Converts <i>src</i> from little-endian byte order and returns the number in host byte order representation of that number. On CPU architectures where the host byte order is big-endian (such as PowerPC) this will return <i>src</i> with the byte order swapped; otherwise it will return <i>src</i> unmodified.</p>
<p>This function was introduced in  Qt 4.3.</p>
<!-- @@@qFromLittleEndian -->
<!-- $$$qFromLittleEndian[overload1]$$$qFromLittleEndianconstvoid* -->
<h3 class="fn" id="qFromLittleEndian"><a name="qFromLittleEndian"></a><span class="type">T</span> <span class="name">qFromLittleEndian</span>(const <span class="type">void</span> *<i>src</i>)</h3>
<p>Reads a little-endian number from memory location <i>src</i> and returns the number in the host byte order representation. On CPU architectures where the host byte order is big-endian (such as PowerPC) this will swap the byte order; otherwise it will just read from <i>src</i>.</p>
<p><b>Note: </b>Template type <code>T</code> can either be a qint16, qint32 or qint64. Other types of integers, e.g&#x2e;, qlong, are not applicable.</p><p><b>Note: </b>Since Qt 5.7, the type of the <i>src</i> parameter is a void pointer.</p><p>There are no data alignment constraints for <i>src</i>.</p>
<p>This function was introduced in  Qt 4.3.</p>
<p><b>See also </b><a href="qtendian.html#qFromBigEndian">qFromBigEndian</a>(), <a href="qtendian.html#qToBigEndian">qToBigEndian</a>(), and <a href="qtendian.html#qToLittleEndian">qToLittleEndian</a>().</p>
<!-- @@@qFromLittleEndian -->
<!-- $$$qToBigEndian[overload1]$$$qToBigEndianT -->
<h3 class="fn" id="qToBigEndian"><a name="qToBigEndian"></a><span class="type">T</span> <span class="name">qToBigEndian</span>(<span class="type">T</span> <i>src</i>)</h3>
<p>This is an overloaded function.</p>
<p>Converts <i>src</i> from host byte order and returns the number in big-endian byte order representation of that number. On CPU architectures where the host byte order is little-endian (such as x86) this will return <i>src</i> with the byte order swapped; otherwise it will return <i>src</i> unmodified.</p>
<p>This function was introduced in  Qt 4.3.</p>
<!-- @@@qToBigEndian -->
<!-- $$$qToBigEndian[overload1]$$$qToBigEndianTvoid* -->
<h3 class="fn" id="qToBigEndian"><a name="qToBigEndian"></a><span class="type">void</span> <span class="name">qToBigEndian</span>(<span class="type">T</span> <i>src</i>, <span class="type">void</span> *<i>dest</i>)</h3>
<p>Writes the number <i>src</i> with template type <code>T</code> to the memory location at <i>dest</i> in big-endian byte order.</p>
<p>Note that template type <code>T</code> can only be an integer data type (signed or unsigned).</p>
<p>There are no data alignment constraints for <i>dest</i>.</p>
<p><b>Note: </b>Since Qt 5.7, the type of the <i>dest</i> parameter is a void pointer.</p><p>This function was introduced in  Qt 4.3.</p>
<p><b>See also </b><a href="qtendian.html#qFromBigEndian">qFromBigEndian</a>(), <a href="qtendian.html#qFromLittleEndian">qFromLittleEndian</a>(), and <a href="qtendian.html#qToLittleEndian">qToLittleEndian</a>().</p>
<!-- @@@qToBigEndian -->
<!-- $$$qToLittleEndian[overload1]$$$qToLittleEndianT -->
<h3 class="fn" id="qToLittleEndian"><a name="qToLittleEndian"></a><span class="type">T</span> <span class="name">qToLittleEndian</span>(<span class="type">T</span> <i>src</i>)</h3>
<p>This is an overloaded function.</p>
<p>Converts <i>src</i> from host byte order and returns the number in little-endian byte order representation of that number. On CPU architectures where the host byte order is big-endian (such as PowerPC) this will return <i>src</i> with the byte order swapped; otherwise it will return <i>src</i> unmodified.</p>
<p>This function was introduced in  Qt 4.3.</p>
<!-- @@@qToLittleEndian -->
<!-- $$$qToLittleEndian[overload1]$$$qToLittleEndianTvoid* -->
<h3 class="fn" id="qToLittleEndian"><a name="qToLittleEndian"></a><span class="type">void</span> <span class="name">qToLittleEndian</span>(<span class="type">T</span> <i>src</i>, <span class="type">void</span> *<i>dest</i>)</h3>
<p>Writes the number <i>src</i> with template type <code>T</code> to the memory location at <i>dest</i> in little-endian byte order.</p>
<p>Note that template type <code>T</code> can only be an integer data type (signed or unsigned).</p>
<p>There are no data alignment constraints for <i>dest</i>.</p>
<p><b>Note: </b>Since Qt 5.7, the type of the <i>dest</i> parameter is a void pointer.</p><p>This function was introduced in  Qt 4.3.</p>
<p><b>See also </b><a href="qtendian.html#qFromBigEndian">qFromBigEndian</a>(), <a href="qtendian.html#qFromLittleEndian">qFromLittleEndian</a>(), and <a href="qtendian.html#qToBigEndian">qToBigEndian</a>().</p>
<!-- @@@qToLittleEndian -->
        </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>