Sophie

Sophie

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

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: format.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>format.h</h1><a href="format_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-2010, International Business Machines Corporation and others.</span>
<a name="l00004"></a>00004 <span class="comment">* 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 <span class="comment">* File FORMAT.H</span>
<a name="l00008"></a>00008 <span class="comment">*</span>
<a name="l00009"></a>00009 <span class="comment">* Modification History:</span>
<a name="l00010"></a>00010 <span class="comment">*</span>
<a name="l00011"></a>00011 <span class="comment">*   Date        Name        Description</span>
<a name="l00012"></a>00012 <span class="comment">*   02/19/97    aliu        Converted from java.</span>
<a name="l00013"></a>00013 <span class="comment">*   03/17/97    clhuang     Updated per C++ implementation.</span>
<a name="l00014"></a>00014 <span class="comment">*   03/27/97    helena      Updated to pass the simple test after code review.</span>
<a name="l00015"></a>00015 <span class="comment">********************************************************************************</span>
<a name="l00016"></a>00016 <span class="comment">*/</span>
<a name="l00017"></a>00017 <span class="comment">// *****************************************************************************</span>
<a name="l00018"></a>00018 <span class="comment">// This file was generated from the java source file Format.java</span>
<a name="l00019"></a>00019 <span class="comment">// *****************************************************************************</span>
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="preprocessor">#ifndef FORMAT_H</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define FORMAT_H</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span>
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 <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="l00026"></a>00026 
<a name="l00032"></a>00032 <span class="preprocessor">#if !UCONFIG_NO_FORMATTING</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &quot;<a class="code" href="unistr_8h.html" title="C++ API: Unicode String.">unicode/unistr.h</a>&quot;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &quot;<a class="code" href="fmtable_8h.html" title="C++ API: Formattable is a thin wrapper for primitive numeric types.">unicode/fmtable.h</a>&quot;</span>
<a name="l00036"></a>00036 <span class="preprocessor">#include &quot;<a class="code" href="fieldpos_8h.html" title="C++ API: FieldPosition identifies the fields in a formatted output.">unicode/fieldpos.h</a>&quot;</span>
<a name="l00037"></a>00037 <span class="preprocessor">#include &quot;<a class="code" href="fpositer_8h.html" title="C++ API: FieldPosition Iterator.">unicode/fpositer.h</a>&quot;</span>
<a name="l00038"></a>00038 <span class="preprocessor">#include &quot;<a class="code" href="parsepos_8h.html" title="C++ API: Canonical Iterator.">unicode/parsepos.h</a>&quot;</span>
<a name="l00039"></a>00039 <span class="preprocessor">#include &quot;<a class="code" href="parseerr_8h.html" title="C API: Parse Error Information.">unicode/parseerr.h</a>&quot;</span> 
<a name="l00040"></a>00040 <span class="preprocessor">#include &quot;<a class="code" href="locid_8h.html" title="C++ API: Locale ID object.">unicode/locid.h</a>&quot;</span>
<a name="l00041"></a>00041 
<a name="l00042"></a>00042 <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="l00043"></a>00043 
<a name="l00094"></a><a class="code" href="classFormat.html">00094</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="classFormat.html" title="Base class for all formats.">Format</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="l00095"></a>00095 <span class="keyword">public</span>:
<a name="l00096"></a>00096 
<a name="l00100"></a>00100     <span class="keyword">virtual</span> ~<a class="code" href="classFormat.html" title="Base class for all formats.">Format</a>();
<a name="l00101"></a>00101 
<a name="l00110"></a>00110     <span class="keyword">virtual</span> <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="classFormat.html" title="Base class for all formats.">Format</a>&amp; other) <span class="keyword">const</span> = 0;
<a name="l00111"></a>00111 
<a name="l00119"></a><a class="code" href="classFormat.html#a4f65d87226814931dde8b035f47b69f3">00119</a>     <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> <a class="code" href="classFormat.html#a4f65d87226814931dde8b035f47b69f3" title="Return true if the given Format objects are not semantically equal.">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classFormat.html" title="Base class for all formats.">Format</a>&amp; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> !<a class="code" href="stringpiece_8h.html#a7652049cbac0bfeae2cd2aa4514a3352" title="Global operator == for StringPiece.">operator==</a>(other); }
<a name="l00120"></a>00120 
<a name="l00127"></a>00127     <span class="keyword">virtual</span> <a class="code" href="classFormat.html" title="Base class for all formats.">Format</a>* clone() <span class="keyword">const</span> = 0;
<a name="l00128"></a>00128 
<a name="l00139"></a>00139     <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>&amp; format(<span class="keyword">const</span> <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>&amp; obj,
<a name="l00140"></a>00140                           <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>&amp; appendTo,
<a name="l00141"></a>00141                           <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) <span class="keyword">const</span>;
<a name="l00142"></a>00142 
<a name="l00159"></a>00159     <span class="keyword">virtual</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>&amp; format(<span class="keyword">const</span> <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>&amp; obj,
<a name="l00160"></a>00160                                   <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>&amp; appendTo,
<a name="l00161"></a>00161                                   <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>&amp; pos,
<a name="l00162"></a>00162                                   <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) <span class="keyword">const</span> = 0;
<a name="l00179"></a>00179     <span class="keyword">virtual</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>&amp; format(<span class="keyword">const</span> <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>&amp; obj,
<a name="l00180"></a>00180                                   <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>&amp; appendTo,
<a name="l00181"></a>00181                                   <a class="code" href="classFieldPositionIterator.html" title="FieldPositionIterator returns the field ids and their start/limit positions generated...">FieldPositionIterator</a>* posIter,
<a name="l00182"></a>00182                                   <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) <span class="keyword">const</span>;
<a name="l00183"></a>00183 
<a name="l00223"></a>00223     <span class="keyword">virtual</span> <span class="keywordtype">void</span> parseObject(<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; source,
<a name="l00224"></a>00224                              <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>&amp; result,
<a name="l00225"></a>00225                              <a class="code" href="classParsePosition.html" title="ParsePosition is a simple class used by Format and its subclasses to keep track of...">ParsePosition</a>&amp; parse_pos) <span class="keyword">const</span> = 0;
<a name="l00226"></a>00226 
<a name="l00239"></a>00239     <span class="keywordtype">void</span> parseObject(<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; source,
<a name="l00240"></a>00240                      <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>&amp; result,
<a name="l00241"></a>00241                      <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) <span class="keyword">const</span>;
<a name="l00242"></a>00242 
<a name="l00255"></a>00255     <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> = 0;
<a name="l00256"></a>00256 
<a name="l00263"></a>00263     <a class="code" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region...">Locale</a> getLocale(<a class="code" href="uloc_8h.html#adf053345d343f8d82ae080f7a5871f34" title="Constants for *_getLocale() Allow user to select whether she wants information on...">ULocDataLocaleType</a> type, <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) <span class="keyword">const</span>;
<a name="l00264"></a>00264 
<a name="l00271"></a>00271     <span class="keyword">const</span> <span class="keywordtype">char</span>* getLocaleID(<a class="code" href="uloc_8h.html#adf053345d343f8d82ae080f7a5871f34" title="Constants for *_getLocale() Allow user to select whether she wants information on...">ULocDataLocaleType</a> type, <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) <span class="keyword">const</span>;
<a name="l00272"></a>00272 
<a name="l00273"></a>00273  <span class="keyword">protected</span>:
<a name="l00275"></a>00275     <span class="keywordtype">void</span> setLocaleIDs(<span class="keyword">const</span> <span class="keywordtype">char</span>* valid, <span class="keyword">const</span> <span class="keywordtype">char</span>* actual);
<a name="l00276"></a>00276 
<a name="l00277"></a>00277 <span class="keyword">protected</span>:
<a name="l00282"></a>00282     <a class="code" href="classFormat.html" title="Base class for all formats.">Format</a>();
<a name="l00283"></a>00283 
<a name="l00287"></a>00287     <a class="code" href="classFormat.html" title="Base class for all formats.">Format</a>(<span class="keyword">const</span> <a class="code" href="classFormat.html" title="Base class for all formats.">Format</a>&amp;); <span class="comment">// Does nothing; for subclasses only</span>
<a name="l00288"></a>00288 
<a name="l00292"></a>00292     <a class="code" href="classFormat.html" title="Base class for all formats.">Format</a>&amp; operator=(<span class="keyword">const</span> <a class="code" href="classFormat.html" title="Base class for all formats.">Format</a>&amp;); <span class="comment">// Does nothing; for subclasses</span>
<a name="l00293"></a>00293 
<a name="l00294"></a>00294        
<a name="l00303"></a>00303     <span class="keyword">static</span> <span class="keywordtype">void</span> syntaxError(<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; pattern,
<a name="l00304"></a>00304                             int32_t pos,
<a name="l00305"></a>00305                             <a class="code" href="structUParseError.html" title="A UParseError struct is used to returned detailed information about parsing errors...">UParseError</a>&amp; parseError);
<a name="l00306"></a>00306 
<a name="l00307"></a>00307  <span class="keyword">private</span>:
<a name="l00308"></a>00308     <span class="keywordtype">char</span> actualLocale[<a class="code" href="uloc_8h.html#ac070d94b27bb71f73bafd4c31ed53081" title="Useful constant for the maximum size of the whole locale ID (including the terminating...">ULOC_FULLNAME_CAPACITY</a>];
<a name="l00309"></a>00309     <span class="keywordtype">char</span> validLocale[<a class="code" href="uloc_8h.html#ac070d94b27bb71f73bafd4c31ed53081" title="Useful constant for the maximum size of the whole locale ID (including the terminating...">ULOC_FULLNAME_CAPACITY</a>];
<a name="l00310"></a>00310 };
<a name="l00311"></a>00311 
<a name="l00312"></a>00312 <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="l00313"></a>00313 
<a name="l00314"></a>00314 <span class="preprocessor">#endif </span><span class="comment">/* #if !UCONFIG_NO_FORMATTING */</span>
<a name="l00315"></a>00315 
<a name="l00316"></a>00316 <span class="preprocessor">#endif // _FORMAT</span>
<a name="l00317"></a>00317 <span class="preprocessor"></span><span class="comment">//eof</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>