Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > 34ae14235711d1471f043ac894a061f9 > files > 78

libicu-doc-3.6-5.16.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>ICU 3.6: LESwaps Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li id="current"><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
  </ul></div>
<h1>LESwaps Class Reference</h1><!-- doxytag: class="LESwaps" -->This class is used to access data which stored in big endian order regardless of the conventions of the platform.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="LESwaps_8h-source.html">LESwaps.h</a>&gt;</code>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="LETypes_8h.html#40c58575d4d703cdff5f0e8751163a05">le_uint8</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classLESwaps.html#b66c22d3b45bf9acd249ff56b45c77e1">isBigEndian</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method detects the endian-ness of the platform by casting a pointer to a word to a pointer to a byte.  <a href="#b66c22d3b45bf9acd249ff56b45c77e1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="LETypes_8h.html#9d0a927b7aeccf16e78abf0824185f50">le_uint16</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classLESwaps.html#ddb9825b93634f7ef030aa3363afd216">swapWord</a> (<a class="el" href="LETypes_8h.html#9d0a927b7aeccf16e78abf0824185f50">le_uint16</a> value)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method does the byte swap required on little endian platforms to correctly access a (16-bit) word.  <a href="#ddb9825b93634f7ef030aa3363afd216"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="LETypes_8h.html#fb0e699435d80d9b8dc119a471bd1537">le_uint32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classLESwaps.html#3b52920e72fd6d15235d3de01bfb3d94">swapLong</a> (<a class="el" href="LETypes_8h.html#fb0e699435d80d9b8dc119a471bd1537">le_uint32</a> value)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method does the byte swapping required on little endian platforms to correctly access a (32-bit) long.  <a href="#3b52920e72fd6d15235d3de01bfb3d94"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This class is used to access data which stored in big endian order regardless of the conventions of the platform. 
<p>
It has been designed to automatically detect the endian-ness of the platform, so that a compilation flag is not needed.<p>
All methods are static and inline in an attempt to induce the compiler to do most of the calculations at compile time.<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable003146">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

<p>

<p>
Definition at line <a class="el" href="LESwaps_8h-source.html#l00063">63</a> of file <a class="el" href="LESwaps_8h-source.html">LESwaps.h</a>.<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="b66c22d3b45bf9acd249ff56b45c77e1"></a><!-- doxytag: member="LESwaps::isBigEndian" ref="b66c22d3b45bf9acd249ff56b45c77e1" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="LETypes_8h.html#40c58575d4d703cdff5f0e8751163a05">le_uint8</a> LESwaps::isBigEndian           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method detects the endian-ness of the platform by casting a pointer to a word to a pointer to a byte. 
<p>
On big endian platforms the FF will be in the byte with the lowest address. On little endian platforms, the FF will be in the byte with the highest address.<p>
<dl compact><dt><b>Returns:</b></dt><dd>TRUE if the platform is big endian</dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable003147">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

<p>
Definition at line <a class="el" href="LESwaps_8h-source.html#l00078">78</a> of file <a class="el" href="LESwaps_8h-source.html">LESwaps.h</a>.
</div>
</div><p>
<a class="anchor" name="3b52920e72fd6d15235d3de01bfb3d94"></a><!-- doxytag: member="LESwaps::swapLong" ref="3b52920e72fd6d15235d3de01bfb3d94" args="(le_uint32 value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="LETypes_8h.html#fb0e699435d80d9b8dc119a471bd1537">le_uint32</a> LESwaps::swapLong           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="LETypes_8h.html#fb0e699435d80d9b8dc119a471bd1537">le_uint32</a>&nbsp;</td>
          <td class="paramname"> <em>value</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method does the byte swapping required on little endian platforms to correctly access a (32-bit) long. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>- the long to be byte swapped</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the byte swapped long</dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable003149">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

<p>
Definition at line <a class="el" href="LESwaps_8h-source.html#l00111">111</a> of file <a class="el" href="LESwaps_8h-source.html">LESwaps.h</a>.
</div>
</div><p>
<a class="anchor" name="ddb9825b93634f7ef030aa3363afd216"></a><!-- doxytag: member="LESwaps::swapWord" ref="ddb9825b93634f7ef030aa3363afd216" args="(le_uint16 value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="LETypes_8h.html#9d0a927b7aeccf16e78abf0824185f50">le_uint16</a> LESwaps::swapWord           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="LETypes_8h.html#9d0a927b7aeccf16e78abf0824185f50">le_uint16</a>&nbsp;</td>
          <td class="paramname"> <em>value</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method does the byte swap required on little endian platforms to correctly access a (16-bit) word. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>- the word to be byte swapped</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the byte swapped word</dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable003148">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

<p>
Definition at line <a class="el" href="LESwaps_8h-source.html#l00096">96</a> of file <a class="el" href="LESwaps_8h-source.html">LESwaps.h</a>.
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="LESwaps_8h-source.html">LESwaps.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Dec 13 17:29:54 2011 for ICU 3.6 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>