Sophie

Sophie

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

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: parsepos.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>parsepos.h</h1><a href="parsepos_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">* Copyright (C) 1997-2005, International Business Machines Corporation and others. All Rights Reserved.</span>
<a name="l00003"></a>00003 <span class="comment">*******************************************************************************</span>
<a name="l00004"></a>00004 <span class="comment">*</span>
<a name="l00005"></a>00005 <span class="comment">* File PARSEPOS.H</span>
<a name="l00006"></a>00006 <span class="comment">*</span>
<a name="l00007"></a>00007 <span class="comment">* Modification History:</span>
<a name="l00008"></a>00008 <span class="comment">*</span>
<a name="l00009"></a>00009 <span class="comment">*   Date        Name        Description</span>
<a name="l00010"></a>00010 <span class="comment">*   07/09/97    helena      Converted from java.</span>
<a name="l00011"></a>00011 <span class="comment">*   07/17/98    stephen     Added errorIndex support.</span>
<a name="l00012"></a>00012 <span class="comment">*   05/11/99    stephen     Cleaned up.</span>
<a name="l00013"></a>00013 <span class="comment">*******************************************************************************</span>
<a name="l00014"></a>00014 <span class="comment">*/</span>
<a name="l00015"></a>00015 
<a name="l00016"></a>00016 <span class="preprocessor">#ifndef PARSEPOS_H</span>
<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#define PARSEPOS_H</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span>
<a name="l00019"></a>00019 <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="l00020"></a>00020 <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="l00021"></a>00021 
<a name="l00022"></a>00022  
<a name="l00023"></a>00023 <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="l00024"></a>00024 
<a name="l00047"></a><a class="code" href="classParsePosition.html">00047</a> <span class="keyword">class </span><a class="code" href="utypes_8h.html#a559955ec3bc692657c5d8b1c6de8e334" title="Set to export library symbols from inside the common library, and to import them...">U_COMMON_API</a> <a class="code" href="classParsePosition.html" title="ParsePosition is a simple class used by Format and its subclasses to keep track of...">ParsePosition</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="l00048"></a>00048 <span class="keyword">public</span>:
<a name="l00053"></a><a class="code" href="classParsePosition.html#a720c03d1ded2e29cdf1abfd987d7bc83">00053</a>     <a class="code" href="classParsePosition.html" title="ParsePosition is a simple class used by Format and its subclasses to keep track of...">ParsePosition</a>()
<a name="l00054"></a>00054         : <a class="code" href="classUObject.html" title="UObject is the common ICU &amp;quot;boilerplate&amp;quot; class.">UObject</a>(),
<a name="l00055"></a>00055         index(0),
<a name="l00056"></a>00056         errorIndex(-1)
<a name="l00057"></a>00057       {}
<a name="l00058"></a>00058 
<a name="l00064"></a><a class="code" href="classParsePosition.html#a459b19ed102710f830784be50840bb52">00064</a>     <a class="code" href="classParsePosition.html" title="ParsePosition is a simple class used by Format and its subclasses to keep track of...">ParsePosition</a>(int32_t newIndex)
<a name="l00065"></a>00065         : <a class="code" href="classUObject.html" title="UObject is the common ICU &amp;quot;boilerplate&amp;quot; class.">UObject</a>(),
<a name="l00066"></a>00066         index(newIndex),
<a name="l00067"></a>00067         errorIndex(-1)
<a name="l00068"></a>00068       {}
<a name="l00069"></a>00069 
<a name="l00075"></a><a class="code" href="classParsePosition.html#a1dd06764f2779bfadf23a28628854016">00075</a>     <a class="code" href="classParsePosition.html" title="ParsePosition is a simple class used by Format and its subclasses to keep track of...">ParsePosition</a>(<span class="keyword">const</span> <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; copy)
<a name="l00076"></a>00076         : <a class="code" href="classUObject.html" title="UObject is the common ICU &amp;quot;boilerplate&amp;quot; class.">UObject</a>(copy),
<a name="l00077"></a>00077         index(copy.index),
<a name="l00078"></a>00078         errorIndex(copy.errorIndex)
<a name="l00079"></a>00079       {}
<a name="l00080"></a>00080 
<a name="l00085"></a>00085     <span class="keyword">virtual</span> ~<a class="code" href="classParsePosition.html" title="ParsePosition is a simple class used by Format and its subclasses to keep track of...">ParsePosition</a>();
<a name="l00086"></a>00086 
<a name="l00091"></a>00091     <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;      operator=(<span class="keyword">const</span> <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; copy);
<a name="l00092"></a>00092 
<a name="l00098"></a>00098     <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="classParsePosition.html" title="ParsePosition is a simple class used by Format and its subclasses to keep track of...">ParsePosition</a>&amp; that) <span class="keyword">const</span>;
<a name="l00099"></a>00099 
<a name="l00105"></a>00105     <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="classParsePosition.html" title="ParsePosition is a simple class used by Format and its subclasses to keep track of...">ParsePosition</a>&amp; that) <span class="keyword">const</span>;
<a name="l00106"></a>00106 
<a name="l00118"></a>00118     <a class="code" href="classParsePosition.html" title="ParsePosition is a simple class used by Format and its subclasses to keep track of...">ParsePosition</a> *clone() <span class="keyword">const</span>;
<a name="l00119"></a>00119 
<a name="l00127"></a>00127     int32_t getIndex(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
<a name="l00128"></a>00128 
<a name="l00134"></a>00134     <span class="keywordtype">void</span> setIndex(int32_t index);
<a name="l00135"></a>00135 
<a name="l00143"></a>00143     <span class="keywordtype">void</span> setErrorIndex(int32_t ei);
<a name="l00144"></a>00144 
<a name="l00150"></a>00150     int32_t getErrorIndex(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
<a name="l00151"></a>00151 
<a name="l00157"></a>00157     <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="l00158"></a>00158 
<a name="l00164"></a>00164     <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="l00165"></a>00165 
<a name="l00166"></a>00166 <span class="keyword">private</span>:
<a name="l00173"></a>00173     int32_t index;
<a name="l00174"></a>00174 
<a name="l00178"></a>00178     int32_t errorIndex;
<a name="l00179"></a>00179 
<a name="l00180"></a>00180 };
<a name="l00181"></a>00181 
<a name="l00182"></a>00182 <span class="keyword">inline</span> <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;
<a name="l00183"></a><a class="code" href="classParsePosition.html#a6fcc5a6b017759640500f94d67a1e21f">00183</a> <a class="code" href="classParsePosition.html#a6fcc5a6b017759640500f94d67a1e21f" title="Assignment operator.">ParsePosition::operator=</a>(<span class="keyword">const</span> <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; copy)
<a name="l00184"></a>00184 {
<a name="l00185"></a>00185   index = copy.index;
<a name="l00186"></a>00186   errorIndex = copy.errorIndex;
<a name="l00187"></a>00187   <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00188"></a>00188 }
<a name="l00189"></a>00189 
<a name="l00190"></a>00190 <span class="keyword">inline</span> <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a>
<a name="l00191"></a><a class="code" href="classParsePosition.html#a61a8d58e675e5e42c89949694a888b92">00191</a> <a class="code" href="classParsePosition.html#a61a8d58e675e5e42c89949694a888b92" title="Equality operator.">ParsePosition::operator==</a>(<span class="keyword">const</span> <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; copy)<span class="keyword"> const</span>
<a name="l00192"></a>00192 <span class="keyword"></span>{
<a name="l00193"></a>00193   <span class="keywordflow">if</span>(index != copy.index || errorIndex != copy.errorIndex)
<a name="l00194"></a>00194   <span class="keywordflow">return</span> <a class="code" href="umachine_8h.html#aa93f0eb578d23995850d61f7d61c55c1" title="The FALSE value of a UBool.">FALSE</a>;
<a name="l00195"></a>00195   <span class="keywordflow">else</span>
<a name="l00196"></a>00196   <span class="keywordflow">return</span> <a class="code" href="umachine_8h.html#aa8cecfc5c5c054d2875c03e77b7be15d" title="The TRUE value of a UBool.">TRUE</a>;
<a name="l00197"></a>00197 }
<a name="l00198"></a>00198 
<a name="l00199"></a>00199 <span class="keyword">inline</span> <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a>
<a name="l00200"></a><a class="code" href="classParsePosition.html#a3d5101a395948da9c233694fe151d20c">00200</a> <a class="code" href="classParsePosition.html#a3d5101a395948da9c233694fe151d20c" title="Equality operator.">ParsePosition::operator!=</a>(<span class="keyword">const</span> <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; copy)<span class="keyword"> const</span>
<a name="l00201"></a>00201 <span class="keyword"></span>{
<a name="l00202"></a>00202   <span class="keywordflow">return</span> !<a class="code" href="classParsePosition.html#a61a8d58e675e5e42c89949694a888b92" title="Equality operator.">operator==</a>(copy);
<a name="l00203"></a>00203 }
<a name="l00204"></a>00204 
<a name="l00205"></a>00205 <span class="keyword">inline</span> int32_t
<a name="l00206"></a><a class="code" href="classParsePosition.html#a96fba5bb98e954d55d416ec24d411759">00206</a> <a class="code" href="classParsePosition.html#a96fba5bb98e954d55d416ec24d411759" title="Retrieve the current parse position.">ParsePosition::getIndex</a>()<span class="keyword"> const</span>
<a name="l00207"></a>00207 <span class="keyword"></span>{
<a name="l00208"></a>00208   <span class="keywordflow">return</span> index;
<a name="l00209"></a>00209 }
<a name="l00210"></a>00210 
<a name="l00211"></a>00211 <span class="keyword">inline</span> <span class="keywordtype">void</span>
<a name="l00212"></a><a class="code" href="classParsePosition.html#ab829e487731a43863e682396f35ea7b6">00212</a> <a class="code" href="classParsePosition.html#ab829e487731a43863e682396f35ea7b6" title="Set the current parse position.">ParsePosition::setIndex</a>(int32_t offset)
<a name="l00213"></a>00213 {
<a name="l00214"></a>00214   this-&gt;index = offset;
<a name="l00215"></a>00215 }
<a name="l00216"></a>00216 
<a name="l00217"></a>00217 <span class="keyword">inline</span> int32_t
<a name="l00218"></a><a class="code" href="classParsePosition.html#ae45548420e7fae72696e94faece728b7">00218</a> <a class="code" href="classParsePosition.html#ae45548420e7fae72696e94faece728b7" title="Retrieve the index at which an error occurred, or -1 if the error index has not been...">ParsePosition::getErrorIndex</a>()<span class="keyword"> const</span>
<a name="l00219"></a>00219 <span class="keyword"></span>{
<a name="l00220"></a>00220   <span class="keywordflow">return</span> errorIndex;
<a name="l00221"></a>00221 }
<a name="l00222"></a>00222 
<a name="l00223"></a>00223 <span class="keyword">inline</span> <span class="keywordtype">void</span>
<a name="l00224"></a><a class="code" href="classParsePosition.html#a3827f98b37e3830ba0361b7c0f42100b">00224</a> <a class="code" href="classParsePosition.html#a3827f98b37e3830ba0361b7c0f42100b" title="Set the index at which a parse error occurred.">ParsePosition::setErrorIndex</a>(int32_t ei)
<a name="l00225"></a>00225 {
<a name="l00226"></a>00226   this-&gt;errorIndex = ei;
<a name="l00227"></a>00227 }
<a name="l00228"></a>00228 <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="l00229"></a>00229 
<a name="l00230"></a>00230 <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>