Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > f51238514e2abe817779ad2fe01b0759 > files > 241

icu-doc-4.4-2.1mdv2010.2.i586.rpm

<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ICU 4.4: coleitr.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Search" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<h1>coleitr.h</h1><a href="coleitr_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> ******************************************************************************</span>
<a name="l00003"></a>00003 <span class="comment"> *   Copyright (C) 1997-2008, International Business Machines</span>
<a name="l00004"></a>00004 <span class="comment"> *   Corporation and others.  All Rights Reserved.</span>
<a name="l00005"></a>00005 <span class="comment"> ******************************************************************************</span>
<a name="l00006"></a>00006 <span class="comment"> */</span>
<a name="l00007"></a>00007 
<a name="l00032"></a>00032 <span class="preprocessor">#ifndef COLEITR_H</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define COLEITR_H</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &quot;<a class="code" href="utypes_8h.html" title="Basic definitions for ICU, for both C and C++ APIs.">unicode/utypes.h</a>&quot;</span>
<a name="l00036"></a>00036 
<a name="l00037"></a>00037  
<a name="l00038"></a>00038 <span class="preprocessor">#if !UCONFIG_NO_COLLATION</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span>
<a name="l00040"></a>00040 <span class="preprocessor">#include &quot;<a class="code" href="uobject_8h.html" title="C++ API: Common ICU base class UObject.">unicode/uobject.h</a>&quot;</span>
<a name="l00041"></a>00041 <span class="preprocessor">#include &quot;<a class="code" href="tblcoll_8h.html" title="C++ API: RuleBasedCollator class provides the simple implementation of Collator.">unicode/tblcoll.h</a>&quot;</span>
<a name="l00042"></a>00042 <span class="preprocessor">#include &quot;<a class="code" href="ucoleitr_8h.html" title="C API: UCollationElements.">unicode/ucoleitr.h</a>&quot;</span>
<a name="l00043"></a>00043 
<a name="l00049"></a><a class="code" href="coleitr_8h.html#a5f2296c3961afacfbba2a5ee850ca1d5">00049</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="coleitr_8h.html#a5f2296c3961afacfbba2a5ee850ca1d5" title="File coleitr.h.">UCollationElements</a> <a class="code" href="coleitr_8h.html#a5f2296c3961afacfbba2a5ee850ca1d5" title="File coleitr.h.">UCollationElements</a>;
<a name="l00050"></a>00050 
<a name="l00051"></a>00051 <a class="code" href="uversion_8h.html#a7d9374e037299886d4192b763b4c5e8b" title="This is used to begin a declaration of a public ICU C++ API.">U_NAMESPACE_BEGIN</a>
<a name="l00052"></a>00052 
<a name="l00120"></a><a class="code" href="classCollationElementIterator.html">00120</a> <span class="keyword">class </span><a class="code" href="utypes_8h.html#ab9d90a30137b6ec046fe59e79b09745a" title="Set to export library symbols from inside the i18n library, and to import them from...">U_I18N_API</a> <a class="code" href="classCollationElementIterator.html" title="The CollationElementIterator class is used as an iterator to walk through each character...">CollationElementIterator</a> : <span class="keyword">public</span> <a class="code" href="classUObject.html" title="UObject is the common ICU &amp;quot;boilerplate&amp;quot; class.">UObject</a> {
<a name="l00121"></a>00121 <span class="keyword">public</span>: 
<a name="l00122"></a>00122 
<a name="l00123"></a>00123     <span class="comment">// CollationElementIterator public data member ------------------------------</span>
<a name="l00124"></a>00124 
<a name="l00125"></a>00125     <span class="keyword">enum</span> {
<a name="l00130"></a><a class="code" href="classCollationElementIterator.html#ada01fcc497b970a8f6762108caf0b336ae6c5a810a2b83426dfcd03714076d57a">00130</a>         NULLORDER = (int32_t)0xffffffff
<a name="l00131"></a>00131     };
<a name="l00132"></a>00132 
<a name="l00133"></a>00133     <span class="comment">// CollationElementIterator public constructor/destructor -------------------</span>
<a name="l00134"></a>00134 
<a name="l00141"></a>00141     <a class="code" href="classCollationElementIterator.html" title="The CollationElementIterator class is used as an iterator to walk through each character...">CollationElementIterator</a>(<span class="keyword">const</span> <a class="code" href="classCollationElementIterator.html" title="The CollationElementIterator class is used as an iterator to walk through each character...">CollationElementIterator</a>&amp; other);
<a name="l00142"></a>00142 
<a name="l00147"></a>00147     <span class="keyword">virtual</span> ~<a class="code" href="classCollationElementIterator.html" title="The CollationElementIterator class is used as an iterator to walk through each character...">CollationElementIterator</a>();
<a name="l00148"></a>00148 
<a name="l00149"></a>00149     <span class="comment">// CollationElementIterator public methods ----------------------------------</span>
<a name="l00150"></a>00150 
<a name="l00158"></a>00158     <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> <a class="code" href="stringpiece_8h.html#a7652049cbac0bfeae2cd2aa4514a3352" title="Global operator == for StringPiece.">operator==</a>(<span class="keyword">const</span> <a class="code" href="classCollationElementIterator.html" title="The CollationElementIterator class is used as an iterator to walk through each character...">CollationElementIterator</a>&amp; other) <span class="keyword">const</span>;
<a name="l00159"></a>00159 
<a name="l00167"></a>00167     <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> <a class="code" href="stringpiece_8h.html#abf0ccab9536bab551afc07de65eb5d95" title="Global operator != for StringPiece.">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classCollationElementIterator.html" title="The CollationElementIterator class is used as an iterator to walk through each character...">CollationElementIterator</a>&amp; other) <span class="keyword">const</span>;
<a name="l00168"></a>00168 
<a name="l00173"></a>00173     <span class="keywordtype">void</span> reset(<span class="keywordtype">void</span>);
<a name="l00174"></a>00174 
<a name="l00182"></a>00182     int32_t next(<a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>&amp; status);
<a name="l00183"></a>00183 
<a name="l00191"></a>00191     int32_t previous(<a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>&amp; status);
<a name="l00192"></a>00192 
<a name="l00199"></a>00199     <span class="keyword">static</span> <span class="keyword">inline</span> int32_t primaryOrder(int32_t order);
<a name="l00200"></a>00200 
<a name="l00207"></a>00207     <span class="keyword">static</span> <span class="keyword">inline</span> int32_t secondaryOrder(int32_t order);
<a name="l00208"></a>00208 
<a name="l00215"></a>00215     <span class="keyword">static</span> <span class="keyword">inline</span> int32_t tertiaryOrder(int32_t order);
<a name="l00216"></a>00216 
<a name="l00226"></a>00226     int32_t getMaxExpansion(int32_t order) <span class="keyword">const</span>;
<a name="l00227"></a>00227 
<a name="l00234"></a>00234     int32_t strengthOrder(int32_t order) <span class="keyword">const</span>;
<a name="l00235"></a>00235 
<a name="l00242"></a>00242     <span class="keywordtype">void</span> setText(<span class="keyword">const</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>&amp; str, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>&amp; status);
<a name="l00243"></a>00243 
<a name="l00250"></a>00250     <span class="keywordtype">void</span> setText(<a class="code" href="classCharacterIterator.html" title="Abstract class that defines an API for iteration on text objects.">CharacterIterator</a>&amp; str, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>&amp; status);
<a name="l00251"></a>00251 
<a name="l00258"></a>00258     <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> isIgnorable(int32_t order);
<a name="l00259"></a>00259 
<a name="l00265"></a>00265     int32_t getOffset(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
<a name="l00266"></a>00266 
<a name="l00274"></a>00274     <span class="keywordtype">void</span> setOffset(int32_t newOffset, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>&amp; status);
<a name="l00275"></a>00275 
<a name="l00281"></a>00281     <span class="keyword">virtual</span> <a class="code" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f" title="UClassID is used to identify classes without using RTTI, since RTTI is not yet supported...">UClassID</a> <a class="code" href="classUObject.html#a9b1acc95efd89cb86ec31f2dc947a262" title="ICU4C &amp;quot;poor man&amp;#39;s RTTI&amp;quot;, returns a UClassID for the actual ICU class...">getDynamicClassID</a>() <span class="keyword">const</span>;
<a name="l00282"></a>00282 
<a name="l00288"></a>00288     <span class="keyword">static</span> <a class="code" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f" title="UClassID is used to identify classes without using RTTI, since RTTI is not yet supported...">UClassID</a> <a class="code" href="platform_8h.html#a72bf6d8ec0640a37b1915e5d853b2016">U_EXPORT2</a> getStaticClassID();
<a name="l00289"></a>00289 
<a name="l00290"></a>00290 <span class="keyword">protected</span>:
<a name="l00291"></a>00291   
<a name="l00292"></a>00292     <span class="comment">// CollationElementIterator protected constructors --------------------------</span>
<a name="l00296"></a><a class="code" href="classCollationElementIterator.html#a1918e53ed4bb8208fdd6df3ed4ec2548">00296</a> <span class="comment"></span>    <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classRuleBasedCollator.html" title="The RuleBasedCollator class provides the simple implementation of Collator, using...">RuleBasedCollator</a>;
<a name="l00297"></a>00297 
<a name="l00308"></a>00308     <a class="code" href="classRuleBasedCollator.html#a2493a8a45ec3ae69e1bec8355c948519" title="Used to iterate over collation elements in a character source.">CollationElementIterator</a>(<span class="keyword">const</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>&amp; sourceText,
<a name="l00309"></a>00309         <span class="keyword">const</span> <a class="code" href="classRuleBasedCollator.html" title="The RuleBasedCollator class provides the simple implementation of Collator, using...">RuleBasedCollator</a>* order, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>&amp; status);
<a name="l00310"></a>00310 
<a name="l00321"></a>00321     <a class="code" href="classRuleBasedCollator.html#a2493a8a45ec3ae69e1bec8355c948519" title="Used to iterate over collation elements in a character source.">CollationElementIterator</a>(<span class="keyword">const</span> <a class="code" href="classCharacterIterator.html" title="Abstract class that defines an API for iteration on text objects.">CharacterIterator</a>&amp; sourceText,
<a name="l00322"></a>00322         <span class="keyword">const</span> <a class="code" href="classRuleBasedCollator.html" title="The RuleBasedCollator class provides the simple implementation of Collator, using...">RuleBasedCollator</a>* order, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>&amp; status);
<a name="l00323"></a>00323 
<a name="l00324"></a>00324     <span class="comment">// CollationElementIterator protected methods -------------------------------</span>
<a name="l00325"></a>00325 
<a name="l00332"></a>00332     <span class="keyword">const</span> <a class="code" href="classCollationElementIterator.html" title="The CollationElementIterator class is used as an iterator to walk through each character...">CollationElementIterator</a>&amp;
<a name="l00333"></a>00333         <a class="code" href="classRuleBasedCollator.html#a45ad21c50ac6d159d119d2c3a6dcd425" title="Assignment operator.">operator=</a>(<span class="keyword">const</span> <a class="code" href="classCollationElementIterator.html" title="The CollationElementIterator class is used as an iterator to walk through each character...">CollationElementIterator</a>&amp; other);
<a name="l00334"></a>00334 
<a name="l00335"></a>00335 <span class="keyword">private</span>:
<a name="l00336"></a>00336     <a class="code" href="classRuleBasedCollator.html#a2493a8a45ec3ae69e1bec8355c948519" title="Used to iterate over collation elements in a character source.">CollationElementIterator</a>(); <span class="comment">// default constructor not implemented</span>
<a name="l00337"></a>00337 
<a name="l00338"></a>00338     <span class="comment">// CollationElementIterator private data members ----------------------------</span>
<a name="l00339"></a>00339 
<a name="l00343"></a>00343     <a class="code" href="coleitr_8h.html#a5f2296c3961afacfbba2a5ee850ca1d5" title="File coleitr.h.">UCollationElements</a> *m_data_;
<a name="l00344"></a>00344 
<a name="l00348"></a>00348     <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> isDataOwned_;
<a name="l00349"></a>00349 
<a name="l00350"></a>00350 };
<a name="l00351"></a>00351 
<a name="l00352"></a>00352 <span class="comment">// CollationElementIterator inline method defination --------------------------</span>
<a name="l00353"></a>00353 
<a name="l00359"></a><a class="code" href="classCollationElementIterator.html#ae09d16618097b31ed15bd05e99d35e3d">00359</a> <span class="keyword">inline</span> int32_t <a class="code" href="classCollationElementIterator.html#ae09d16618097b31ed15bd05e99d35e3d" title="Gets the primary order of a collation order.">CollationElementIterator::primaryOrder</a>(int32_t order)
<a name="l00360"></a>00360 {
<a name="l00361"></a>00361     order &amp;= RuleBasedCollator::PRIMARYORDERMASK;
<a name="l00362"></a>00362     <span class="keywordflow">return</span> (order &gt;&gt; RuleBasedCollator::PRIMARYORDERSHIFT);
<a name="l00363"></a>00363 }
<a name="l00364"></a>00364 
<a name="l00370"></a><a class="code" href="classCollationElementIterator.html#af13e4d75c867a2d9706e2923cc8c3e6c">00370</a> <span class="keyword">inline</span> int32_t <a class="code" href="classCollationElementIterator.html#af13e4d75c867a2d9706e2923cc8c3e6c" title="Gets the secondary order of a collation order.">CollationElementIterator::secondaryOrder</a>(int32_t order)
<a name="l00371"></a>00371 {
<a name="l00372"></a>00372     order = order &amp; RuleBasedCollator::SECONDARYORDERMASK;
<a name="l00373"></a>00373     <span class="keywordflow">return</span> (order &gt;&gt; RuleBasedCollator::SECONDARYORDERSHIFT);
<a name="l00374"></a>00374 }
<a name="l00375"></a>00375 
<a name="l00381"></a><a class="code" href="classCollationElementIterator.html#ac154c9eceda5c4810241f60208da0684">00381</a> <span class="keyword">inline</span> int32_t <a class="code" href="classCollationElementIterator.html#ac154c9eceda5c4810241f60208da0684" title="Gets the tertiary order of a collation order.">CollationElementIterator::tertiaryOrder</a>(int32_t order)
<a name="l00382"></a>00382 {
<a name="l00383"></a>00383     <span class="keywordflow">return</span> (order &amp;= RuleBasedCollator::TERTIARYORDERMASK);
<a name="l00384"></a>00384 }
<a name="l00385"></a>00385 
<a name="l00386"></a><a class="code" href="classCollationElementIterator.html#ab0cc9747f553df1649021d677061497e">00386</a> <span class="keyword">inline</span> int32_t <a class="code" href="classCollationElementIterator.html#ab0cc9747f553df1649021d677061497e" title="Return the maximum length of any expansion sequences that end with the specified...">CollationElementIterator::getMaxExpansion</a>(int32_t order)<span class="keyword"> const</span>
<a name="l00387"></a>00387 <span class="keyword"></span>{
<a name="l00388"></a>00388     <span class="keywordflow">return</span> <a class="code" href="ucoleitr_8h.html#ab87f69840736227870f8b1d47b6ddffd" title="Get the maximum length of any expansion sequences that end with the specified comparison...">ucol_getMaxExpansion</a>(m_data_, (uint32_t)order);
<a name="l00389"></a>00389 }
<a name="l00390"></a>00390 
<a name="l00391"></a><a class="code" href="classCollationElementIterator.html#aab4a3b39c449460ee7dd6726e257f78e">00391</a> <span class="keyword">inline</span> <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> <a class="code" href="classCollationElementIterator.html#aab4a3b39c449460ee7dd6726e257f78e" title="Checks if a comparison order is ignorable.">CollationElementIterator::isIgnorable</a>(int32_t order)
<a name="l00392"></a>00392 {
<a name="l00393"></a>00393     <span class="keywordflow">return</span> (<a class="code" href="classCollationElementIterator.html#ae09d16618097b31ed15bd05e99d35e3d" title="Gets the primary order of a collation order.">primaryOrder</a>(order) == RuleBasedCollator::PRIMIGNORABLE);
<a name="l00394"></a>00394 }
<a name="l00395"></a>00395 
<a name="l00396"></a>00396 <a class="code" href="uversion_8h.html#a3da1f00f3b02976ac53c014a3e4c0933" title="This is used to end a declaration of a public ICU C++ API.">U_NAMESPACE_END</a>
<a name="l00397"></a>00397 
<a name="l00398"></a>00398 <span class="preprocessor">#endif </span><span class="comment">/* #if !UCONFIG_NO_COLLATION */</span>
<a name="l00399"></a>00399 
<a name="l00400"></a>00400 <span class="preprocessor">#endif</span>
</pre></div></div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr size="1"/><address style="text-align: right;"><small>Generated on 16 Mar 2010 for ICU 4.4 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>