Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 280da2a01a3d16776505ea3f476de84f > files > 90

icu-doc-3.8.1-2mdv2008.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.8: 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.5.1 -->
<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#9fbc3ea31db88ab0f10a595c864d385f">le_uint8</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classLESwaps.html#0d9ee622a94099b44ab19f7997373349">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="#0d9ee622a94099b44ab19f7997373349"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="LETypes_8h.html#4d16715b42bdd9be2fa3b6ca600641ce">le_uint16</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classLESwaps.html#7f7f533cacc395454739694b4e6a6e9e">swapWord</a> (<a class="el" href="LETypes_8h.html#4d16715b42bdd9be2fa3b6ca600641ce">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="#7f7f533cacc395454739694b4e6a6e9e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="LETypes_8h.html#8ed46f4fc717cf0a94de62efe109ecae">le_uint32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classLESwaps.html#9c171efa2037bcb97749271e93a956d0">swapLong</a> (<a class="el" href="LETypes_8h.html#8ed46f4fc717cf0a94de62efe109ecae">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="#9c171efa2037bcb97749271e93a956d0"></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#_stable003397">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="0d9ee622a94099b44ab19f7997373349"></a><!-- doxytag: member="LESwaps::isBigEndian" ref="0d9ee622a94099b44ab19f7997373349" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="LETypes_8h.html#9fbc3ea31db88ab0f10a595c864d385f">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 class="return" 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#_stable003398">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="7f7f533cacc395454739694b4e6a6e9e"></a><!-- doxytag: member="LESwaps::swapWord" ref="7f7f533cacc395454739694b4e6a6e9e" 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#4d16715b42bdd9be2fa3b6ca600641ce">le_uint16</a> LESwaps::swapWord           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="LETypes_8h.html#4d16715b42bdd9be2fa3b6ca600641ce">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 class="return" compact><dt><b>Returns:</b></dt><dd>the byte swapped word</dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable003399">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>
<a class="anchor" name="9c171efa2037bcb97749271e93a956d0"></a><!-- doxytag: member="LESwaps::swapLong" ref="9c171efa2037bcb97749271e93a956d0" 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#8ed46f4fc717cf0a94de62efe109ecae">le_uint32</a> LESwaps::swapLong           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="LETypes_8h.html#8ed46f4fc717cf0a94de62efe109ecae">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 class="return" compact><dt><b>Returns:</b></dt><dd>the byte swapped long</dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable003400">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>
<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 Fri Sep 14 12:59:42 2007 for ICU 3.8 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
</body>
</html>