Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > 280da2a01a3d16776505ea3f476de84f > files > 172

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: UnicodeMatcher 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>UnicodeMatcher Class Reference</h1><!-- doxytag: class="UnicodeMatcher" --><code><a class="el" href="classUnicodeMatcher.html">UnicodeMatcher</a></code> defines a protocol for objects that can match a range of characters in a <a class="el" href="classReplaceable.html">Replaceable</a> string.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="unimatch_8h-source.html">unimatch.h</a>&gt;</code>
<p>
<p>Inheritance diagram for UnicodeMatcher:
<p><center><img src="classUnicodeMatcher.png" usemap="#UnicodeMatcher_map" border="0" alt=""></center>
<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>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnicodeMatcher.html#76c6ac0d0cd5b903478d73527aaeba4d">~UnicodeMatcher</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#76c6ac0d0cd5b903478d73527aaeba4d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="unimatch_8h.html#a87e5322490b3e89e6913bfabd0390e6">UMatchDegree</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnicodeMatcher.html#b712e496c0023237fbe38184d0424310">matches</a> (const <a class="el" href="classReplaceable.html">Replaceable</a> &amp;text, <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> &amp;offset, <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> limit, <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">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="#b712e496c0023237fbe38184d0424310"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap 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#b416e20c42a354c5c9e546f43c5e249b">toPattern</a> (<a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;result, <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">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="#b416e20c42a354c5c9e546f43c5e249b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnicodeMatcher.html#77a01adbdb969d73ac257c75eb63bed6">matchesIndexValue</a> (<a class="el" href="pwin32_8h.html#ba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> 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="#77a01adbdb969d73ac257c75eb63bed6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnicodeMatcher.html#b093e506066d50fc3cf4865c1a3f7d20">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="#b093e506066d50fc3cf4865c1a3f7d20"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<code><a class="el" href="classUnicodeMatcher.html">UnicodeMatcher</a></code> defines a protocol for objects that can match a range of characters in a <a class="el" href="classReplaceable.html">Replaceable</a> string. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable001260">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>

<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>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="76c6ac0d0cd5b903478d73527aaeba4d"></a><!-- doxytag: member="UnicodeMatcher::~UnicodeMatcher" ref="76c6ac0d0cd5b903478d73527aaeba4d" 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 width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="b712e496c0023237fbe38184d0424310"></a><!-- doxytag: member="UnicodeMatcher::matches" ref="b712e496c0023237fbe38184d0424310" 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#a87e5322490b3e89e6913bfabd0390e6">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"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&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#349ef00011f20ccd1d3b424445681aa5">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 width="100%"><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>
Zero, one, or more characters may be matched.<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>
Matching in the reverse direction is indicated by limit &lt; offset. Characters from offset backwards to limit+1 will be considered for matching.<p>
If limit == offset then the only match possible is a zero character match (which subclasses may implement if desired).<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>
Note: This method is not const because some classes may modify their state as the result of a match.<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>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>
</dl>
<dl class="return" compact><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 compact><dt><b><a class="el" href="stable.html#_stable001265">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>
Implemented in <a class="el" href="classUnicodeFilter.html#ea7e423b6ea7e4588bf7f5aa220e665c">UnicodeFilter</a>, and <a class="el" href="classUnicodeSet.html#3acd6cd4268004b9f3740a2373f411c4">UnicodeSet</a>.
</div>
</div><p>
<a class="anchor" name="b416e20c42a354c5c9e546f43c5e249b"></a><!-- doxytag: member="UnicodeMatcher::toPattern" ref="b416e20c42a354c5c9e546f43c5e249b" 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#349ef00011f20ccd1d3b424445681aa5">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 width="100%"> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns a string representation of this matcher. 
<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. <dl compact><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>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001266">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>
Implemented in <a class="el" href="classUnicodeSet.html#d66a3d45f0f6b0d4849894c41c863a25">UnicodeSet</a>.
</div>
</div><p>
<a class="anchor" name="77a01adbdb969d73ac257c75eb63bed6"></a><!-- doxytag: member="UnicodeMatcher::matchesIndexValue" ref="77a01adbdb969d73ac257c75eb63bed6" 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#349ef00011f20ccd1d3b424445681aa5">UBool</a> UnicodeMatcher::matchesIndexValue           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#ba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&nbsp;</td>
          <td class="paramname"> <em>v</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> 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>
This is used by <code>RuleBasedTransliterator</code> for indexing. <dl compact><dt><b><a class="el" href="stable.html#_stable001267">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="b093e506066d50fc3cf4865c1a3f7d20"></a><!-- doxytag: member="UnicodeMatcher::addMatchSetTo" ref="b093e506066d50fc3cf4865c1a3f7d20" 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 width="100%"> 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 compact><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>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001268">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>
Implemented in <a class="el" href="classUnicodeSet.html#3af4ed9507c8e13de2b0bf0f324640bb">UnicodeSet</a>.
</div>
</div><p>
<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></ul>
<hr size="1"><address style="align: right;"><small>Generated on Fri Sep 14 12:59:48 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>