Sophie

Sophie

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

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: CollatorFactory 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>CollatorFactory Class Reference</h1><!-- doxytag: class="CollatorFactory" --><!-- doxytag: inherits="UObject" -->
<p>A factory, used with registerFactory, the creates multiple collators and provides display names for them.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="coll_8h_source.html">coll.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for CollatorFactory:</div>
<div class="dynsection">
 <div class="center">
  <img src="classCollatorFactory.gif" usemap="#CollatorFactory_map" alt=""/>
  <map id="CollatorFactory_map" name="CollatorFactory_map">
<area href="classUObject.html" alt="UObject" shape="rect" coords="0,56,100,80"/>
<area href="classUMemory.html" alt="UMemory" shape="rect" coords="0,0,100,24"/>
</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="classCollatorFactory.html#a965c8077151efec8a169dbf534315b57">~CollatorFactory</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#a965c8077151efec8a169dbf534315b57"></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="classCollatorFactory.html#ad7a91609868c9c9da9fd76bbe51e6027">visible</a> (void) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return true if this factory is visible.  <a href="#ad7a91609868c9c9da9fd76bbe51e6027"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classCollator.html">Collator</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollatorFactory.html#ab1ba9eec8827e0432cba88fad9afc051">createCollator</a> (const <a class="el" href="classLocale.html">Locale</a> &amp;loc)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a collator for the provided locale.  <a href="#ab1ba9eec8827e0432cba88fad9afc051"></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="classCollatorFactory.html#a721690212a243922f1604fdbb5b93880">getDisplayName</a> (const <a class="el" href="classLocale.html">Locale</a> &amp;objectLocale, const <a class="el" href="classLocale.html">Locale</a> &amp;displayLocale, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;result)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the name of the collator for the objectLocale, localized for the displayLocale.  <a href="#a721690212a243922f1604fdbb5b93880"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="classUnicodeString.html">UnicodeString</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollatorFactory.html#a47f4f598d9d27e2892b4c2bf2ad14d7e">getSupportedIDs</a> (int32_t &amp;count, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return an array of all the locale names directly supported by this factory.  <a href="#a47f4f598d9d27e2892b4c2bf2ad14d7e"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A factory, used with registerFactory, the creates multiple collators and provides display names for them. </p>
<p>A factory supports some number of locales-- these are the locales for which it can create collators. The factory can be visible, in which case the supported locales will be enumerated by getAvailableLocales, or invisible, in which they are not. Invisible locales are still supported, they are just not listed by getAvailableLocales. </p>
<p>If standard locale display names are sufficient, <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a> instances can be registered using registerInstance instead. </p>
<p>Note: if the collators are to be used from C APIs, they must be instances of <a class="el" href="classRuleBasedCollator.html" title="The RuleBasedCollator class provides the simple implementation of Collator, using...">RuleBasedCollator</a>.</p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002289">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

<p>Definition at line <a class="el" href="coll_8h_source.html#l01029">1029</a> of file <a class="el" href="coll_8h_source.html">coll.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a965c8077151efec8a169dbf534315b57"></a><!-- doxytag: member="CollatorFactory::~CollatorFactory" ref="a965c8077151efec8a169dbf534315b57" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual CollatorFactory::~CollatorFactory </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#_stable002332">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ab1ba9eec8827e0432cba88fad9afc051"></a><!-- doxytag: member="CollatorFactory::createCollator" ref="ab1ba9eec8827e0432cba88fad9afc051" args="(const Locale &amp;loc)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classCollator.html">Collator</a>* CollatorFactory::createCollator </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>loc</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return a collator for the provided locale. </p>
<p>If the locale is not supported, return NULL. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>loc</em>&nbsp;</td><td>the locale identifying the collator to be created. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a new collator if the locale is supported, otherwise NULL. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002334">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a721690212a243922f1604fdbb5b93880"></a><!-- doxytag: member="CollatorFactory::getDisplayName" ref="a721690212a243922f1604fdbb5b93880" args="(const Locale &amp;objectLocale, const Locale &amp;displayLocale, UnicodeString &amp;result)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; CollatorFactory::getDisplayName </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>objectLocale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>displayLocale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>result</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return the name of the collator for the objectLocale, localized for the displayLocale. </p>
<p>If objectLocale is not supported, or the factory is not visible, set the result string to bogus. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>objectLocale</em>&nbsp;</td><td>the locale identifying the collator </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>displayLocale</em>&nbsp;</td><td>the locale for which the display name of the collator should be localized </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td>an output parameter for the display name, set to bogus if not supported. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the display name </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002335">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a47f4f598d9d27e2892b4c2bf2ad14d7e"></a><!-- doxytag: member="CollatorFactory::getSupportedIDs" ref="a47f4f598d9d27e2892b4c2bf2ad14d7e" args="(int32_t &amp;count, UErrorCode &amp;status)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="classUnicodeString.html">UnicodeString</a>* CollatorFactory::getSupportedIDs </td>
          <td>(</td>
          <td class="paramtype">int32_t &amp;&nbsp;</td>
          <td class="paramname"> <em>count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</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 an array of all the locale names directly supported by this factory. </p>
<p>The number of names is returned in count. This array is owned by the factory. Its contents must never change. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>output parameter for the number of locales supported by the factory </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>the in/out error code </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a pointer to an array of count UnicodeStrings. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002336">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div>
<a class="anchor" id="ad7a91609868c9c9da9fd76bbe51e6027"></a><!-- doxytag: member="CollatorFactory::visible" ref="ad7a91609868c9c9da9fd76bbe51e6027" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> CollatorFactory::visible </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return true if this factory is visible. </p>
<p>Default is true. If not visible, the locales supported by this factory will not be listed by getAvailableLocales. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the factory is visible. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002333">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

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