Sophie

Sophie

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

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: UnicodeMatcher Class Reference</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 class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><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="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&nbsp;Structure&nbsp;Index</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>
</div>
<div class="contents">
<h1>UnicodeMatcher Class Reference</h1><!-- doxytag: class="UnicodeMatcher" -->
<p><code><a class="el" href="classUnicodeMatcher.html" title="UnicodeMatcher defines a protocol for objects that can match a range of characters...">UnicodeMatcher</a></code> defines a protocol for objects that can match a range of characters in a <a class="el" href="classReplaceable.html" title="Replaceable is an abstract base class representing a string of characters that supports...">Replaceable</a> string.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="unimatch_8h_source.html">unimatch.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for UnicodeMatcher:</div>
<div class="dynsection">
 <div class="center">
  <img src="classUnicodeMatcher.gif" usemap="#UnicodeMatcher_map" alt=""/>
  <map id="UnicodeMatcher_map" name="UnicodeMatcher_map">
<area href="classUnicodeFilter.html" alt="UnicodeFilter" shape="rect" coords="0,56,105,80"/>
<area href="classUnicodeSet.html" alt="UnicodeSet" shape="rect" coords="0,112,105,136"/>
</map>
 </div>
</div>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnicodeMatcher.html#a76c6ac0d0cd5b903478d73527aaeba4d">~UnicodeMatcher</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#a76c6ac0d0cd5b903478d73527aaeba4d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="unimatch_8h.html#aa87e5322490b3e89e6913bfabd0390e6">UMatchDegree</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnicodeMatcher.html#ab712e496c0023237fbe38184d0424310">matches</a> (const <a class="el" href="classReplaceable.html">Replaceable</a> &amp;text, int32_t &amp;offset, int32_t limit, <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> incremental)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a UMatchDegree value indicating the degree of match for the given text at the given offset.  <a href="#ab712e496c0023237fbe38184d0424310"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnicodeMatcher.html#a0f8d0182d1e2949ea9adfd2b615e94dd">toPattern</a> (<a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;result, <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> escapeUnprintable=FALSE) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a string representation of this matcher.  <a href="#a0f8d0182d1e2949ea9adfd2b615e94dd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnicodeMatcher.html#a77a01adbdb969d73ac257c75eb63bed6">matchesIndexValue</a> (uint8_t v) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns TRUE if this matcher will match a character c, where c &amp; 0xFF == v, at offset, in the forward direction (with limit &gt; offset).  <a href="#a77a01adbdb969d73ac257c75eb63bed6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnicodeMatcher.html#a23f055516112c25dffdc836ffa16cd0e">addMatchSetTo</a> (<a class="el" href="classUnicodeSet.html">UnicodeSet</a> &amp;toUnionTo) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Union the set of all characters that may be matched by this object into the given set.  <a href="#a23f055516112c25dffdc836ffa16cd0e"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p><code><a class="el" href="classUnicodeMatcher.html" title="UnicodeMatcher defines a protocol for objects that can match a range of characters...">UnicodeMatcher</a></code> defines a protocol for objects that can match a range of characters in a <a class="el" href="classReplaceable.html" title="Replaceable is an abstract base class representing a string of characters that supports...">Replaceable</a> string. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001352">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="unimatch_8h_source.html#l00068">68</a> of file <a class="el" href="unimatch_8h_source.html">unimatch.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a76c6ac0d0cd5b903478d73527aaeba4d"></a><!-- doxytag: member="UnicodeMatcher::~UnicodeMatcher" ref="a76c6ac0d0cd5b903478d73527aaeba4d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual UnicodeMatcher::~UnicodeMatcher </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001356">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a23f055516112c25dffdc836ffa16cd0e"></a><!-- doxytag: member="UnicodeMatcher::addMatchSetTo" ref="a23f055516112c25dffdc836ffa16cd0e" args="(UnicodeSet &amp;toUnionTo) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void UnicodeMatcher::addMatchSetTo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classUnicodeSet.html">UnicodeSet</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>toUnionTo</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Union the set of all characters that may be matched by this object into the given set. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>toUnionTo</em>&nbsp;</td><td>the set into which to union the source characters </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001360">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="ab712e496c0023237fbe38184d0424310"></a><!-- doxytag: member="UnicodeMatcher::matches" ref="ab712e496c0023237fbe38184d0424310" args="(const Replaceable &amp;text, int32_t &amp;offset, int32_t limit, UBool incremental)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="unimatch_8h.html#aa87e5322490b3e89e6913bfabd0390e6">UMatchDegree</a> UnicodeMatcher::matches </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classReplaceable.html">Replaceable</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t &amp;&nbsp;</td>
          <td class="paramname"> <em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>limit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td>
          <td class="paramname"> <em>incremental</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return a UMatchDegree value indicating the degree of match for the given text at the given offset. </p>
<p>Zero, one, or more characters may be matched.</p>
<p>Matching in the forward direction is indicated by limit &gt; offset. Characters from offset forwards to limit-1 will be considered for matching.</p>
<p>Matching in the reverse direction is indicated by limit &lt; offset. Characters from offset backwards to limit+1 will be considered for matching.</p>
<p>If limit == offset then the only match possible is a zero character match (which subclasses may implement if desired).</p>
<p>As a side effect, advance the offset parameter to the limit of the matched substring. In the forward direction, this will be the index of the last matched character plus one. In the reverse direction, this will be the index of the last matched character minus one.</p>
<p>Note: This method is not const because some classes may modify their state as the result of a match.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>the text to be matched </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>offset</em>&nbsp;</td><td>on input, the index into text at which to begin matching. On output, the limit of the matched text. The number of matched characters is the output value of offset minus the input value. Offset should always point to the HIGH SURROGATE (leading code unit) of a pair of surrogates, both on entry and upon return. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>limit</em>&nbsp;</td><td>the limit index of text to be matched. Greater than offset for a forward direction match, less than offset for a backward direction match. The last character to be considered for matching will be text.charAt(limit-1) in the forward direction or text.charAt(limit+1) in the backward direction. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>incremental</em>&nbsp;</td><td>if TRUE, then assume further characters may be inserted at limit and check for partial matching. Otherwise assume the text as given is complete. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a match degree value indicating a full match, a partial match, or a mismatch. If incremental is FALSE then U_PARTIAL_MATCH should never be returned. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001357">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Implemented in <a class="el" href="classUnicodeFilter.html#aea7e423b6ea7e4588bf7f5aa220e665c">UnicodeFilter</a>, and <a class="el" href="classUnicodeSet.html#a3acd6cd4268004b9f3740a2373f411c4">UnicodeSet</a>.</p>

</div>
</div>
<a class="anchor" id="a77a01adbdb969d73ac257c75eb63bed6"></a><!-- doxytag: member="UnicodeMatcher::matchesIndexValue" ref="a77a01adbdb969d73ac257c75eb63bed6" args="(uint8_t v) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> UnicodeMatcher::matchesIndexValue </td>
          <td>(</td>
          <td class="paramtype">uint8_t&nbsp;</td>
          <td class="paramname"> <em>v</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns TRUE if this matcher will match a character c, where c &amp; 0xFF == v, at offset, in the forward direction (with limit &gt; offset). </p>
<p>This is used by <code>RuleBasedTransliterator</code> for indexing. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001359">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a0f8d0182d1e2949ea9adfd2b615e94dd"></a><!-- doxytag: member="UnicodeMatcher::toPattern" ref="a0f8d0182d1e2949ea9adfd2b615e94dd" args="(UnicodeString &amp;result, UBool escapeUnprintable=FALSE) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; UnicodeMatcher::toPattern </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td>
          <td class="paramname"> <em>escapeUnprintable</em> = <code>FALSE</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns a string representation of this matcher. </p>
<p>If the result of calling this function is passed to the appropriate parser, it will produce another matcher that is equal to this one. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td>the string to receive the pattern. Previous contents will be deleted. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>escapeUnprintable</em>&nbsp;</td><td>if TRUE then convert unprintable character to their hex escape representations, \uxxxx or \Uxxxxxxxx. Unprintable characters are those other than U+000A, U+0020..U+007E. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001358">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Implemented in <a class="el" href="classUnicodeSet.html#a7aa98466d94bcbdcfcf79f57e171c8e7">UnicodeSet</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="unimatch_8h_source.html">unimatch.h</a></li>
</ul>
</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>