Preliminary doc changes to reflect addition of buffers.

This commit is contained in:
Beman
2014-11-19 15:58:15 -05:00
parent fc7733ade1
commit 8a9ea6747d
3 changed files with 174 additions and 158 deletions

View File

@@ -5,7 +5,7 @@
<meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document"> <meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Endian Integers</title> <title>Endian Arithmetic Types</title>
<link href="styles.css" rel="stylesheet"> <link href="styles.css" rel="stylesheet">
</style> </style>
</head> </head>
@@ -13,13 +13,14 @@
<body> <body>
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="710"> <table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr> <tr>
<td width="277"> <td>
<a href="../../../index.html"> <a href="../../../index.html">
<img src="../../../boost.png" alt="boost.png (6897 bytes)" align="middle" width="277" height="86" border="0"></a></td> <img src="../../../boost.png" alt="boost.png (6897 bytes)" align="middle" border="0" width="277" height="86"></a></td>
<td width="413" align="middle"> <td align="middle">
<font size="7">Endian Types</font> <b>
<font size="6">Endian Arithmetic Types</font> </b>
</td> </td>
</tr> </tr>
</table> </table>
@@ -29,7 +30,8 @@
<td><b><a href="../../../index.htm">Boost Home</a>&nbsp;&nbsp;&nbsp;&nbsp; <td><b><a href="../../../index.htm">Boost Home</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="index.html">Endian Home</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="index.html">Endian Home</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="conversion.html">Conversion Functions</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="conversion.html">Conversion Functions</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="types.html">Endian Types</a></b></td> <a href="arithmetic.html">Arithmetic Types</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="buffers.html">Buffer Types</a></b></td>
</tr> </tr>
</table> </table>
@@ -69,7 +71,7 @@
<tr> <tr>
<td width="100%" bgcolor="#E8F5FF"> <td width="100%" bgcolor="#E8F5FF">
<a href="../include/boost/endian/conversion.hpp">&lt;boost/endian/conversion.hpp&gt;</a><br> <a href="../include/boost/endian/conversion.hpp">&lt;boost/endian/conversion.hpp&gt;</a><br>
<a href="../include/boost/endian/types.hpp">&lt;boost/endian/types.hpp&gt;</a></td> <a href="../include/boost/endian/arithmetic.hpp">&lt;boost/endian/arithmetic.hpp&gt;</a></td>
</tr> </tr>
</table> </table>
<h2><a name="Introduction">Introduction</a></h2> <h2><a name="Introduction">Introduction</a></h2>
@@ -108,7 +110,7 @@ binary file containing four byte big-endian and little-endian integers:</p>
<blockquote> <blockquote>
<pre>#include &lt;iostream&gt; <pre>#include &lt;iostream&gt;
#include &lt;cstdio&gt; #include &lt;cstdio&gt;
#include &lt;boost/endian/types.hpp&gt; #include &lt;boost/endian/arithmetic.hpp&gt;
#include &lt;boost/static_assert.hpp&gt; #include &lt;boost/static_assert.hpp&gt;
using namespace boost::endian; using namespace boost::endian;
@@ -212,7 +214,7 @@ enum class align {no, yes}; </pre>
<p>One class template is provided:</p> <p>One class template is provided:</p>
<blockquote> <blockquote>
<pre>template &lt;order Order, typename T, std::size_t n_bits, align A = align::no&gt; <pre>template &lt;order Order, typename T, std::size_t n_bits, align A = align::no&gt;
class endian; class endian_arithmetic;
</pre> </pre>
</blockquote> </blockquote>
<p>Typedefs, such as <code>big_int32_t</code>, provide convenient naming <p>Typedefs, such as <code>big_int32_t</code>, provide convenient naming
@@ -227,112 +229,112 @@ conventions for common use cases:</p>
<td width="15%" align="center"><b><i>Sizes in bits (n)</i></b></td> <td width="15%" align="center"><b><i>Sizes in bits (n)</i></b></td>
</tr> </tr>
<tr> <tr>
<td width="18%"><code>big_align_int</code><i><b>n</b></i><code>_t</code></td> <td width="18%"><code>big_int</code><i><b>n</b></i><code>_t</code></td>
<td width="10%" align="center"><code>big</code></td> <td width="10%" align="center"><code>big</code></td>
<td width="49%" align="center"><code>yes</code></td> <td width="49%" align="center"><code>yes</code></td>
<td width="10%" align="center">signed</td> <td width="10%" align="center">signed</td>
<td width="15%">16,32,64</td> <td width="15%">16,32,64</td>
</tr> </tr>
<tr>
<td width="18%"><code>big_align_uint</code><i><b>n</b></i><code>_t</code></td>
<td width="10%" align="center"><code>big</code></td>
<td width="49%" align="center"><code>yes</code></td>
<td width="10%" align="center">unsigned</td>
<td width="15%">16,32,64</td>
</tr>
<tr>
<td width="18%"><code>big_align_float</code><i><b>n</b></i><code>_t</code></td>
<td width="10%" align="center"><code>big</code></td>
<td width="49%" align="center"><code>yes</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">32,64</td>
</tr>
<tr>
<td width="18%"><code>big_int</code><b><i>n</i></b><code>_t</code></td>
<td width="10%" align="center"><code>big</code></td>
<td width="49%" align="center"><code>no</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">8,16,24,32,40,48,56,64</td>
</tr>
<tr> <tr>
<td width="18%"><code>big_uint</code><i><b>n</b></i><code>_t</code></td> <td width="18%"><code>big_uint</code><i><b>n</b></i><code>_t</code></td>
<td width="10%" align="center"><code>big</code></td> <td width="10%" align="center"><code>big</code></td>
<td width="49%" align="center"><code>yes</code></td>
<td width="10%" align="center">unsigned</td>
<td width="15%">16,32,64</td>
</tr>
<tr>
<td width="18%"><code>big_float</code><i><b>n</b></i><code>_t</code></td>
<td width="10%" align="center"><code>big</code></td>
<td width="49%" align="center"><code>yes</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">32,64</td>
</tr>
<tr>
<td width="18%"><code>big_int</code><b><i>n</i></b><code>_ut</code></td>
<td width="10%" align="center"><code>big</code></td>
<td width="49%" align="center"><code>no</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">8,16,24,32,40,48,56,64</td>
</tr>
<tr>
<td width="18%"><code>big_uint</code><i><b>n</b></i><code>_ut</code></td>
<td width="10%" align="center"><code>big</code></td>
<td width="49%" align="center"><code>no</code></td> <td width="49%" align="center"><code>no</code></td>
<td width="10%" align="center">unsigned</td> <td width="10%" align="center">unsigned</td>
<td width="15%">8,16,24,32,40,48,56,64</td> <td width="15%">8,16,24,32,40,48,56,64</td>
</tr> </tr>
<tr> <tr>
<td width="18%"><code>big_float</code><i><b>n</b></i><code>_t</code></td> <td width="18%"><code>big_float</code><i><b>n</b></i><code>_ut</code></td>
<td width="10%" align="center"><code>big</code></td> <td width="10%" align="center"><code>big</code></td>
<td width="49%" align="center"><code>no</code></td> <td width="49%" align="center"><code>no</code></td>
<td width="10%" align="center">signed</td> <td width="10%" align="center">signed</td>
<td width="15%">32,64</td> <td width="15%">32,64</td>
</tr> </tr>
<tr> <tr>
<td width="18%"><code>little_align_int</code><i><b>n</b></i><code>_t</code></td> <td width="18%"><code>little_int</code><i><b>n</b></i><code>_t</code></td>
<td width="10%" align="center"><code>little</code></td> <td width="10%" align="center"><code>little</code></td>
<td width="49%" align="center"><code>yes</code></td> <td width="49%" align="center"><code>yes</code></td>
<td width="10%" align="center">signed</td> <td width="10%" align="center">signed</td>
<td width="15%">16,32,64</td> <td width="15%">16,32,64</td>
</tr> </tr>
<tr> <tr>
<td width="18%"><code>little_align_uint</code><i><b>n</b></i><code>_t</code></td> <td width="18%"><code>little_uint</code><i><b>n</b></i><code>_t</code></td>
<td width="10%" align="center"><code>little</code></td> <td width="10%" align="center"><code>little</code></td>
<td width="49%" align="center"><code>yes</code></td> <td width="49%" align="center"><code>yes</code></td>
<td width="10%" align="center">unsigned</td> <td width="10%" align="center">unsigned</td>
<td width="15%">16,32,64</td> <td width="15%">16,32,64</td>
</tr> </tr>
<tr>
<td width="18%"><code>little_align_float</code><i><b>n</b></i><code>_t</code></td>
<td width="10%" align="center"><code>little</code></td>
<td width="49%" align="center"><code>yes</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">32,64</td>
</tr>
<tr>
<td width="18%"><code>little_int</code><i><b>n</b></i><code>_</code><code>t</code></td>
<td width="10%" align="center"><code>little</code></td>
<td width="49%" align="center"><code>no</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">8,16,24,32,40,48,56,64</td>
</tr>
<tr>
<td width="18%"><code>little_uint</code><i><b>n</b></i><code>_</code><code>t</code></td>
<td width="10%" align="center"><code>little</code></td>
<td width="49%" align="center"><code>no</code></td>
<td width="10%" align="center">unsigned</td>
<td width="15%">8,16,24,32,40,48,56,64</td>
</tr>
<tr> <tr>
<td width="18%"><code>little_float</code><i><b>n</b></i><code>_t</code></td> <td width="18%"><code>little_float</code><i><b>n</b></i><code>_t</code></td>
<td width="10%" align="center"><code>little</code></td> <td width="10%" align="center"><code>little</code></td>
<td width="49%" align="center"><code>yes</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">32,64</td>
</tr>
<tr>
<td width="18%"><code>little_int</code><i><b>n</b></i><code>_ut</code></td>
<td width="10%" align="center"><code>little</code></td>
<td width="49%" align="center"><code>no</code></td>
<td width="10%" align="center">signed</td>
<td width="15%">8,16,24,32,40,48,56,64</td>
</tr>
<tr>
<td width="18%"><code>little_uint</code><i><b>n</b></i><code>_ut</code></td>
<td width="10%" align="center"><code>little</code></td>
<td width="49%" align="center"><code>no</code></td>
<td width="10%" align="center">unsigned</td>
<td width="15%">8,16,24,32,40,48,56,64</td>
</tr>
<tr>
<td width="18%"><code>little_float</code><i><b>n</b></i><code>_ut</code></td>
<td width="10%" align="center"><code>little</code></td>
<td width="49%" align="center"><code>no</code></td> <td width="49%" align="center"><code>no</code></td>
<td width="10%" align="center">signed</td> <td width="10%" align="center">signed</td>
<td width="15%">32,64</td> <td width="15%">32,64</td>
</tr> </tr>
<tr> <tr>
<td width="18%"><code>native_align_float</code><i><b>n</b></i><code>_t</code></td> <td width="18%"><code>native_float</code><i><b>n</b></i><code>_t</code></td>
<td width="10%" align="center"><code>native</code></td> <td width="10%" align="center"><code>native</code></td>
<td width="49%" align="center"><code>yes</code></td> <td width="49%" align="center"><code>yes</code></td>
<td width="10%" align="center">signed</td> <td width="10%" align="center">signed</td>
<td width="15%">32,64</td> <td width="15%">32,64</td>
</tr> </tr>
<tr> <tr>
<td width="18%"><code>native_int</code><i><b>n</b></i><code>_</code><code>t</code></td> <td width="18%"><code>native_int</code><i><b>n</b></i><code>_ut</code></td>
<td width="10%" align="center"><code>native</code></td> <td width="10%" align="center"><code>native</code></td>
<td width="49%" align="center"><code>no</code></td> <td width="49%" align="center"><code>no</code></td>
<td width="10%" align="center">signed</td> <td width="10%" align="center">signed</td>
<td width="15%">8,16,24,32,40,48,56,64</td> <td width="15%">8,16,24,32,40,48,56,64</td>
</tr> </tr>
<tr> <tr>
<td width="18%"><code>native_uint</code><i><b>n</b></i><code>_</code><code>t</code></td> <td width="18%"><code>native_uint</code><i><b>n</b></i><code>_ut</code></td>
<td width="10%" align="center"><code>native</code></td> <td width="10%" align="center"><code>native</code></td>
<td width="49%" align="center"><code>no</code></td> <td width="49%" align="center"><code>no</code></td>
<td width="10%" align="center">unsigned</td> <td width="10%" align="center">unsigned</td>
<td width="15%">8,16,24,32,40,48,56,64</td> <td width="15%">8,16,24,32,40,48,56,64</td>
</tr> </tr>
<tr> <tr>
<td width="18%"><code>native_float</code><i><b>n</b></i><code>_t</code></td> <td width="18%"><code>native_float</code><i><b>n</b></i><code>_ut</code></td>
<td width="10%" align="center"><code>native</code></td> <td width="10%" align="center"><code>native</code></td>
<td width="49%" align="center"><code>no</code></td> <td width="49%" align="center"><code>no</code></td>
<td width="10%" align="center">signed</td> <td width="10%" align="center">signed</td>
@@ -352,7 +354,7 @@ are only available on architectures with 16, 32, and 64-bit integer types. </p>
<p><b><i>Note:</i></b> One-byte types <p><b><i>Note:</i></b> One-byte types
have identical have identical
functionality. They are provided to improve code readability and searchability.</p> functionality. They are provided to improve code readability and searchability.</p>
<h2><a name="Class_template_endian">Class template <code>endian</code></a></h2> <h2><a name="Class_template_endian">Class template <code>endian</code></a><code>_arithmetic</code></h2>
<p>An endian is an integer byte-holder with user-specified <a href="#endianness"> <p>An endian is an integer byte-holder with user-specified <a href="#endianness">
endianness</a>, value type, size, and <a href="#alignment">alignment</a>. The endianness</a>, value type, size, and <a href="#alignment">alignment</a>. The
usual operations on integers are supplied.</p> usual operations on integers are supplied.</p>
@@ -421,12 +423,12 @@ usual operations on integers are supplied.</p>
// typedefs // typedefs
// aligned big endian floating point types // aligned big endian floating point types
typedef endian&lt;order::big, float, 32, align::yes&gt; big_align_float32_t; typedef endian&lt;order::big, float, 32, align::yes&gt; big_float32_t;
typedef endian&lt;order::big, double, 64, align::yes&gt; big_align_float64_t; typedef endian&lt;order::big, double, 64, align::yes&gt; big_float64_t;
// aligned little endian floating point types // aligned little endian floating point types
typedef endian&lt;order::little, float, 32, align::yes&gt; little_align_float32_t; typedef endian&lt;order::little, float, 32, align::yes&gt; little_float32_t;
typedef endian&lt;order::little, double, 64, align::yes&gt; little_align_float64_t; typedef endian&lt;order::little, double, 64, align::yes&gt; little_float64_t;
// unaligned big endian floating point types // unaligned big endian floating point types
typedef endian&lt;order::big, float, 32, align::no&gt; big_float32un_t; typedef endian&lt;order::big, float, 32, align::no&gt; big_float32un_t;
@@ -437,87 +439,87 @@ usual operations on integers are supplied.</p>
typedef endian&lt;order::little, double, 64, align::no&gt; little_float64un_t; typedef endian&lt;order::little, double, 64, align::no&gt; little_float64un_t;
// aligned big endian signed integer types // aligned big endian signed integer types
typedef endian&lt;order::big, int16_t, 16, align::yes&gt; big_align_int16_t; typedef endian&lt;order::big, int16_t, 16, align::yes&gt; big_int16_t;
typedef endian&lt;order::big, int32_t, 32, align::yes&gt; big_align_int32_t; typedef endian&lt;order::big, int32_t, 32, align::yes&gt; big_int32_t;
typedef endian&lt;order::big, int64_t, 64, align::yes&gt; big_align_int64_t; typedef endian&lt;order::big, int64_t, 64, align::yes&gt; big_int64_t;
// aligned big endian unsigned integer types // aligned big endian unsigned integer types
typedef endian&lt;order::big, uint16_t, 16, align::yes&gt; big_align_uint16_t; typedef endian&lt;order::big, uint16_t, 16, align::yes&gt; big_uint16_t;
typedef endian&lt;order::big, uint32_t, 32, align::yes&gt; big_align_uint32_t; typedef endian&lt;order::big, uint32_t, 32, align::yes&gt; big_uint32_t;
typedef endian&lt;order::big, uint64_t, 64, align::yes&gt; big_align_uint64_t; typedef endian&lt;order::big, uint64_t, 64, align::yes&gt; big_uint64_t;
// aligned little endian signed integer types // aligned little endian signed integer types
typedef endian&lt;order::little, int16_t, 16, align::yes&gt; little_align_int16_t; typedef endian&lt;order::little, int16_t, 16, align::yes&gt; little_int16_t;
typedef endian&lt;order::little, int32_t, 32, align::yes&gt; little_align_int32_t; typedef endian&lt;order::little, int32_t, 32, align::yes&gt; little_int32_t;
typedef endian&lt;order::little, int64_t, 64, align::yes&gt; little_align_int64_t; typedef endian&lt;order::little, int64_t, 64, align::yes&gt; little_int64_t;
// aligned little endian unsigned integer types // aligned little endian unsigned integer types
typedef endian&lt;order::little, uint16_t, 16, align::yes&gt; little_align_uint16_t; typedef endian&lt;order::little, uint16_t, 16, align::yes&gt; little_uint16_t;
typedef endian&lt;order::little, uint32_t, 32, align::yes&gt; little_align_uint32_t; typedef endian&lt;order::little, uint32_t, 32, align::yes&gt; little_uint32_t;
typedef endian&lt;order::little, uint64_t, 64, align::yes&gt; little_align_uint64_t; typedef endian&lt;order::little, uint64_t, 64, align::yes&gt; little_uint64_t;
// aligned native endian typedefs are not provided because // aligned native endian typedefs are not provided because
// &lt;cstdint&gt; types are superior for that use case // &lt;cstdint&gt; types are superior for that use case
// unaligned big endian signed integer types // unaligned big endian signed integer types
typedef endian&lt;order::big, int_least8_t, 8&gt; big_int8_t; typedef endian&lt;order::big, int_least8_t, 8&gt; big_int8_ut;
typedef endian&lt;order::big, int_least16_t, 16&gt; big_int16_t; typedef endian&lt;order::big, int_least16_t, 16&gt; big_int16_ut;
typedef endian&lt;order::big, int_least32_t, 24&gt; big_int24_t; typedef endian&lt;order::big, int_least32_t, 24&gt; big_int24_ut;
typedef endian&lt;order::big, int_least32_t, 32&gt; big_int32_t; typedef endian&lt;order::big, int_least32_t, 32&gt; big_int32_ut;
typedef endian&lt;order::big, int_least64_t, 40&gt; big_int40_t; typedef endian&lt;order::big, int_least64_t, 40&gt; big_int40_ut;
typedef endian&lt;order::big, int_least64_t, 48&gt; big_int48_t; typedef endian&lt;order::big, int_least64_t, 48&gt; big_int48_ut;
typedef endian&lt;order::big, int_least64_t, 56&gt; big_int56_t; typedef endian&lt;order::big, int_least64_t, 56&gt; big_int56_ut;
typedef endian&lt;order::big, int_least64_t, 64&gt; big_int64_t; typedef endian&lt;order::big, int_least64_t, 64&gt; big_int64_ut;
// unaligned big endian unsigned integer types // unaligned big endian unsigned integer types
typedef endian&lt;order::big, uint_least8_t, 8&gt; big_uint8_t; typedef endian&lt;order::big, uint_least8_t, 8&gt; big_uint8_ut;
typedef endian&lt;order::big, uint_least16_t, 16&gt; big_uint16_t; typedef endian&lt;order::big, uint_least16_t, 16&gt; big_uint16_ut;
typedef endian&lt;order::big, uint_least32_t, 24&gt; big_uint24_t; typedef endian&lt;order::big, uint_least32_t, 24&gt; big_uint24_ut;
typedef endian&lt;order::big, uint_least32_t, 32&gt; big_uint32_t; typedef endian&lt;order::big, uint_least32_t, 32&gt; big_uint32_ut;
typedef endian&lt;order::big, uint_least64_t, 40&gt; big_uint40_t; typedef endian&lt;order::big, uint_least64_t, 40&gt; big_uint40_ut;
typedef endian&lt;order::big, uint_least64_t, 48&gt; big_uint48_t; typedef endian&lt;order::big, uint_least64_t, 48&gt; big_uint48_ut;
typedef endian&lt;order::big, uint_least64_t, 56&gt; big_uint56_t; typedef endian&lt;order::big, uint_least64_t, 56&gt; big_uint56_ut;
typedef endian&lt;order::big, uint_least64_t, 64&gt; big_uint64_t; typedef endian&lt;order::big, uint_least64_t, 64&gt; big_uint64_ut;
// unaligned little endian signed integer types // unaligned little endian signed integer types
typedef endian&lt;order::little, int_least8_t, 8&gt; little_int8_t; typedef endian&lt;order::little, int_least8_t, 8&gt; little_int8_ut;
typedef endian&lt;order::little, int_least16_t, 16&gt; little_int16_t; typedef endian&lt;order::little, int_least16_t, 16&gt; little_int16_ut;
typedef endian&lt;order::little, int_least32_t, 24&gt; little_int24_t; typedef endian&lt;order::little, int_least32_t, 24&gt; little_int24_ut;
typedef endian&lt;order::little, int_least32_t, 32&gt; little_int32_t; typedef endian&lt;order::little, int_least32_t, 32&gt; little_int32_ut;
typedef endian&lt;order::little, int_least64_t, 40&gt; little_int40_t; typedef endian&lt;order::little, int_least64_t, 40&gt; little_int40_ut;
typedef endian&lt;order::little, int_least64_t, 48&gt; little_int48_t; typedef endian&lt;order::little, int_least64_t, 48&gt; little_int48_ut;
typedef endian&lt;order::little, int_least64_t, 56&gt; little_int56_t; typedef endian&lt;order::little, int_least64_t, 56&gt; little_int56_ut;
typedef endian&lt;order::little, int_least64_t, 64&gt; little_int64_t; typedef endian&lt;order::little, int_least64_t, 64&gt; little_int64_ut;
// unaligned little endian unsigned integer types // unaligned little endian unsigned integer types
typedef endian&lt;order::little, uint_least8_t, 8&gt; little_uint8_t; typedef endian&lt;order::little, uint_least8_t, 8&gt; little_uint8_ut;
typedef endian&lt;order::little, uint_least16_t, 16&gt; little_uint16_t; typedef endian&lt;order::little, uint_least16_t, 16&gt; little_uint16_ut;
typedef endian&lt;order::little, uint_least32_t, 24&gt; little_uint24_t; typedef endian&lt;order::little, uint_least32_t, 24&gt; little_uint24_ut;
typedef endian&lt;order::little, uint_least32_t, 32&gt; little_uint32_t; typedef endian&lt;order::little, uint_least32_t, 32&gt; little_uint32_ut;
typedef endian&lt;order::little, uint_least64_t, 40&gt; little_uint40_t; typedef endian&lt;order::little, uint_least64_t, 40&gt; little_uint40_ut;
typedef endian&lt;order::little, uint_least64_t, 48&gt; little_uint48_t; typedef endian&lt;order::little, uint_least64_t, 48&gt; little_uint48_ut;
typedef endian&lt;order::little, uint_least64_t, 56&gt; little_uint56_t; typedef endian&lt;order::little, uint_least64_t, 56&gt; little_uint56_ut;
typedef endian&lt;order::little, uint_least64_t, 64&gt; little_uint64_t; typedef endian&lt;order::little, uint_least64_t, 64&gt; little_uint64_ut;
// unaligned native endian signed integer types // unaligned native endian signed integer types
typedef <b><i>implementation-defined</i></b>_int8_t native_int8_t; typedef <b><i>implementation-defined</i></b>_int8_t native_int8_ut;
typedef <b><i>implementation-defined</i></b>_int16_t native_int16_t; typedef <b><i>implementation-defined</i></b>_int16_t native_int16_ut;
typedef <b><i>implementation-defined</i></b>_int24_t native_int24_t; typedef <b><i>implementation-defined</i></b>_int24_t native_int24_ut;
typedef <b><i>implementation-defined</i></b>_int32_t native_int32_t; typedef <b><i>implementation-defined</i></b>_int32_t native_int32_ut;
typedef <b><i>implementation-defined</i></b>_int40_t native_int40_t; typedef <b><i>implementation-defined</i></b>_int40_t native_int40_ut;
typedef <b><i>implementation-defined</i></b>_int48_t native_int48_t; typedef <b><i>implementation-defined</i></b>_int48_t native_int48_ut;
typedef <b><i>implementation-defined</i></b>_int56_t native_int56_t; typedef <b><i>implementation-defined</i></b>_int56_t native_int56_ut;
typedef <b><i>implementation-defined</i></b>_int64_t native_int64_t; typedef <b><i>implementation-defined</i></b>_int64_t native_int64_ut;
// unaligned native endian unsigned integer types // unaligned native endian unsigned integer types
typedef <b><i>implementation-defined</i></b>_uint8_t native_uint8_t; typedef <b><i>implementation-defined</i></b>_uint8_t native_uint8_ut;
typedef <b><i>implementation-defined</i></b>_uint16_t native_uint16_t; typedef <b><i>implementation-defined</i></b>_uint16_t native_uint16_ut;
typedef <b><i>implementation-defined</i></b>_uint24_t native_uint24_t; typedef <b><i>implementation-defined</i></b>_uint24_t native_uint24_ut;
typedef <b><i>implementation-defined</i></b>_uint32_t native_uint32_t; typedef <b><i>implementation-defined</i></b>_uint32_t native_uint32_ut;
typedef <b><i>implementation-defined</i></b>_uint40_t native_uint40_t; typedef <b><i>implementation-defined</i></b>_uint40_t native_uint40_ut;
typedef <b><i>implementation-defined</i></b>_uint48_t native_uint48_t; typedef <b><i>implementation-defined</i></b>_uint48_t native_uint48_ut;
typedef <b><i>implementation-defined</i></b>_uint56_t native_uint56_t; typedef <b><i>implementation-defined</i></b>_uint56_t native_uint56_ut;
typedef <b><i>implementation-defined</i></b>_uint64_t native_uint64_t; typedef <b><i>implementation-defined</i></b>_uint64_t native_uint64_ut;
} // namespace endian } // namespace endian
} // namespace boost</pre> } // namespace boost</pre>
@@ -676,7 +678,7 @@ differs from endian representation size. Vicente Botet and other reviewers
suggested supporting floating point types.</p> suggested supporting floating point types.</p>
<hr> <hr>
<p>Last revised: <p>Last revised:
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->12 November, 2014<!--webbot bot="Timestamp" endspan i-checksum="39485" --></p> <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->19 November, 2014<!--webbot bot="Timestamp" endspan i-checksum="39499" --></p>
<p>© Copyright Beman Dawes, 2006-2009, 2013</p> <p>© Copyright Beman Dawes, 2006-2009, 2013</p>
<p>Distributed under the Boost Software License, Version 1.0. See <p>Distributed under the Boost Software License, Version 1.0. See
<a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/ LICENSE_1_0.txt</a></p> <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/ LICENSE_1_0.txt</a></p>

View File

@@ -15,10 +15,10 @@
<tr> <tr>
<td> <td>
<a href="../../../index.html"> <a href="../../../index.html">
<img src="../../../boost.png" alt="boost.png (6897 bytes)" align="middle" width="277" height="86" border="0"></a></td> <img src="../../../boost.png" alt="boost.png (6897 bytes)" align="middle" border="0" width="277" height="86" ></a></td>
<td align="middle"> <td align="middle">
<font size="7">Endian Conversion<br> <b>
Functions</font></td> <font size="6">Endian Conversion Functions</font></b></td>
</tr> </tr>
</table> </table>
@@ -27,7 +27,8 @@
<td><b><a href="../../../index.htm">Boost Home</a>&nbsp;&nbsp;&nbsp;&nbsp; <td><b><a href="../../../index.htm">Boost Home</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="index.html">Endian Home</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="index.html">Endian Home</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="conversion.html">Conversion Functions</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="conversion.html">Conversion Functions</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="types.html">Endian Types</a></b></td> <a href="arithmetic.html">Arithmetic Types</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="buffers.html">Buffer Types</a></b></td>
</tr> </tr>
</table> </table>
@@ -55,7 +56,7 @@
<tr> <tr>
<td width="100%" bgcolor="#E8F5FF"> <td width="100%" bgcolor="#E8F5FF">
<a href="../include/boost/endian/conversion.hpp">&lt;boost/endian/conversion.hpp&gt;</a><br> <a href="../include/boost/endian/conversion.hpp">&lt;boost/endian/conversion.hpp&gt;</a><br>
<a href="../include/boost/endian/types.hpp">&lt;boost/endian/types.hpp&gt;</a></td> <a href="../include/boost/endian/arithmetic.hpp">&lt;boost/endian/arithmetic.hpp&gt;</a></td>
</tr> </tr>
</table> </table>
@@ -333,7 +334,7 @@ Pierre Talbot provided the <code>int8_t reverse_value()</code> and templated
<code>reverse()</code> implementations.</p> <code>reverse()</code> implementations.</p>
<hr> <hr>
<p>Last revised: <p>Last revised:
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->12 November, 2014<!--webbot bot="Timestamp" endspan i-checksum="39485" --></p> <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->19 November, 2014<!--webbot bot="Timestamp" endspan i-checksum="39499" --></p>
<p>© Copyright Beman Dawes, 2011, 2013</p> <p>© Copyright Beman Dawes, 2011, 2013</p>
<p>Distributed under the Boost Software License, Version 1.0. See <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/ LICENSE_1_0.txt</a></p> <p>Distributed under the Boost Software License, Version 1.0. See <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/ LICENSE_1_0.txt</a></p>

View File

@@ -13,11 +13,12 @@
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr> <tr>
<td> <td width="339">
<a href="../../../index.html"> <a href="../../../index.html">
<img src="../../../boost.png" alt="boost.png (6897 bytes)" align="middle" border="0" width="277" height="86"></a></td> <img src="../../../boost.png" alt="boost.png (6897 bytes)" align="middle" border="0" width="277" height="86"></a></td>
<td align="middle"> <td align="middle" width="1253">
<font size="7">Endian Library</font></td> <b>
<font size="6">Endian Library</font></b></td>
</tr> </tr>
</table> </table>
@@ -26,7 +27,8 @@
<td><b><a href="../../../index.htm">Boost Home</a>&nbsp;&nbsp;&nbsp;&nbsp; <td><b><a href="../../../index.htm">Boost Home</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="index.html">Endian Home</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="index.html">Endian Home</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="conversion.html">Conversion Functions</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="conversion.html">Conversion Functions</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="types.html">Endian Types</a></b></td> <a href="arithmetic.html">Arithmetic Types</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="buffers.html">Buffer Types</a></b></td>
</tr> </tr>
</table> </table>
<p></p> <p></p>
@@ -56,7 +58,7 @@
<tr> <tr>
<td width="100%" bgcolor="#E8F5FF"> <td width="100%" bgcolor="#E8F5FF">
<a href="../include/boost/endian/conversion.hpp">&lt;boost/endian/conversion.hpp&gt;</a><br> <a href="../include/boost/endian/conversion.hpp">&lt;boost/endian/conversion.hpp&gt;</a><br>
<a href="../include/boost/endian/types.hpp">&lt;boost/endian/types.hpp&gt;</a></td> <a href="../include/boost/endian/arithmetic.hpp">&lt;boost/endian/arithmetic.hpp&gt;</a></td>
</tr> </tr>
</table> </table>
@@ -68,12 +70,12 @@ floating point, and user defined data.</p>
<li>The primary use case is binary I/O for portable data exchange with <li>The primary use case is binary I/O for portable data exchange with
other systems, via either external media or network transmission.<br> other systems, via either external media or network transmission.<br>
&nbsp;</li> &nbsp;</li>
<li>A second use case is minimizing storage size via sizes and/or <li>An additional use case is minimizing storage size via sizes and/or
alignments not supported by the built-in types.<br> alignments not supported by the built-in types.<br>
&nbsp;</li> &nbsp;</li>
<li>Two distinct approaches to dealing with endianness are provided. Each approach has a <li>Three distinct approaches to dealing with endianness are provided. Each approach has a
long history of successful use, and each approach has use cases where it is long history of successful use, and each approach has use cases where it is
superior to the other approach.</li> preferred over the other approaches.</li>
</ul> </ul>
<h2><a name="Introduction-to-endianness">Introduction to endianness</a></h2> <h2><a name="Introduction-to-endianness">Introduction to endianness</a></h2>
@@ -111,42 +113,53 @@ at different ends.</p>
<p>See the Wikipedia's <p>See the Wikipedia's
<a href="http://en.wikipedia.org/wiki/Endianness">Endianness</a> article for an <a href="http://en.wikipedia.org/wiki/Endianness">Endianness</a> article for an
extensive discussion of endianness.</p> extensive discussion of endianness.</p>
<p>Most programmers can ignore endianness, except perhaps for reading a core <p>Programmers can usually ignore endianness, except perhaps for reading a core
dump on little-endian systems. Programmers have to deal with endianness in their dump on little-endian systems. But programmers will have to deal with endianness when exchanging binary integers and binary floating point
code when exchanging binary integers and binary floating point values between computer systems with differing endianness, whether by physical file transfer or over a network.
values between computer systems with differing endianness, whether by physical file transfer or over a network, And programmers may want to use the library if minimizing either internal or
. </p> external data sizes is advantagous.</p>
<h2><a name="Introduction">Introduction</a> to the Boost.Endian library</h2> <h2><a name="Introduction">Introduction</a> to the Boost.Endian library</h2>
<p>The Boost.Endian library provides two different approaches to dealing with <p>The Boost.Endian library provides three different approaches to dealing with
integer endianness. Both approaches support integers, floating point types
endianness. All three approaches support integers, floating point types
except&nbsp; <code>long double</code>, and user defined types (UDTs).</p> except&nbsp; <code>long double</code>, and user defined types (UDTs).</p>
<p>Each approach has a long history of successful use, and each approach has use <p>Each approach has a long history of successful use, and each approach has use
cases where it is superior to the other approach.</p> cases where it is preferred to the other approaches.</p>
<blockquote> <blockquote>
<p><b><a href="types.html">Endian types</a> -</b> The application uses the provided endian types
which mimic the
built-in integer types. For example, <code>big_int32_t</code> or <code>little_float64_t</code>.
Integer types with lengths of 1 through 8 bytes are supported, rather than just
2, 4, and 8 byte integers. The types may be aligned or unaligned.</p>
<p><b><a href="conversion.html">Endian conversion functions</a> -</b> The <p><b><a href="conversion.html">Endian conversion functions</a> -</b> The
application uses the built-in integer and floating point types, and calls the application uses the built-in integer and floating point types, and calls the
provided conversion functions to convert byte ordering as needed. Both mutating provided conversion functions to convert byte ordering as needed. Both mutating
and non-mutating conversions are supplied, and each comes in unconditional and and non-mutating conversions are supplied, and each comes in unconditional and
conditional variants.</p> conditional variants.</p>
<p><b><a href="buffers.html">Endian buffer types</a> -</b> The application uses the provided endian
buffer types
which mimic the
built-in integer types. For example, <code>big_buf32_t</code> or <code>little_floatbuf64_t</code>.
Buffer types with lengths of 1 through 8 bytes are supported, rather than just
2, 4, and 8 bytes. The types may be aligned (name suffix <code>_t</code>) or unaligned
(name suffix <code>_ut</code>).</p>
<p><b><a href="arithmetic.html">Endian arithmetic types</a> -</b> The application uses the provided endian
arithmetic types
which mimic the
built-in arithmetic types. For example, <code>big_int32_t</code> or <code>little_float64_t</code>.
Arithmetic integer types with lengths of 1 through 8 bytes are supported, rather than just
2, 4, and 8 byte integers. The types may be aligned (name suffix <code>_t</code>) or unaligned
(name suffix <code>_ut</code>).</p>
</blockquote> </blockquote>
<p>Boost Endian is a header-only library.</p> <p>Boost Endian is a header-only library.</p>
<h2><a name="Choosing">Choosing</a> between endian types and endian <h2><a name="Choosing">Choosing</a> between conversion functions, buffers types,
conversion functions</h2> and arithmetic types</h2>
<p>Which approach is better for dealing with endianness depends on <p>Which endianness approach is best depends on
application needs.</p> application needs.</p>
<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111"> <table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
@@ -688,7 +701,7 @@ Blechmann, Tim Moore, tymofey, Tomas Puverle, Vincente Botet, Yuval Ronen and
Vitaly Budovski,.</p> Vitaly Budovski,.</p>
<hr> <hr>
<p>Last revised: <p>Last revised:
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->12 November, 2014<!--webbot bot="Timestamp" endspan i-checksum="39485" --></p> <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->19 November, 2014<!--webbot bot="Timestamp" endspan i-checksum="39499" --></p>
<p>© Copyright Beman Dawes, 2011, 2013</p> <p>© Copyright Beman Dawes, 2011, 2013</p>
<p>Distributed under the Boost Software License, Version 1.0. See <p>Distributed under the Boost Software License, Version 1.0. See
<a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/ LICENSE_1_0.txt</a></p> <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/ LICENSE_1_0.txt</a></p>