/usr/include/unicode
NameSizeModeActions
basictz.h89130644editdlrm
bms.h86640644editdlrm
bmsearch.h73160644editdlrm
brkiter.h230010644editdlrm
bytestream.h85310644editdlrm
calendar.h906590644editdlrm
caniter.h72880644editdlrm
chariter.h241860644editdlrm
choicfmt.h295280644editdlrm
coleitr.h129900644editdlrm
coll.h484680644editdlrm
colldata.h119570644editdlrm
curramt.h36590644editdlrm
currpinf.h70610644editdlrm
currunit.h30570644editdlrm
datefmt.h279460644editdlrm
dbbi.h9660644editdlrm
dcfmtsym.h140400644editdlrm
decimfmt.h886120644editdlrm
docmain.h60030644editdlrm
dtfmtsym.h261450644editdlrm
dtintrv.h37340644editdlrm
dtitvfmt.h397000644editdlrm
dtitvinf.h187040644editdlrm
dtptngen.h173030644editdlrm
dtrule.h87180644editdlrm
errorcode.h43610644editdlrm
fieldpos.h87130644editdlrm
fmtable.h187940644editdlrm
format.h120830644editdlrm
gregocal.h337970644editdlrm
locid.h302410644editdlrm
measfmt.h18970644editdlrm
measunit.h16350644editdlrm
measure.h33210644editdlrm
msgfmt.h394350644editdlrm
normlzr.h303370644editdlrm
numfmt.h339870644editdlrm
numsys.h50040644editdlrm
parseerr.h30440644editdlrm
parsepos.h54680644editdlrm
platform.h99610644editdlrm
plurfmt.h230790644editdlrm
plurrule.h99010644editdlrm
ppalmos.h69920644editdlrm
putil.h66860644editdlrm
pwin32.h86680644editdlrm
rbbi.h269930644editdlrm
rbnf.h456810644editdlrm
rbtz.h156950644editdlrm
regex.h523160644editdlrm
rep.h95590644editdlrm
resbund.h181300644editdlrm
schriter.h62930644editdlrm
search.h223570644editdlrm
simpletz.h461790644editdlrm
smpdtfmt.h483250644editdlrm
sortkey.h111110644editdlrm
std_string.h17690644editdlrm
strenum.h98880644editdlrm
stringpiece.h54840644editdlrm
stsearch.h222870644editdlrm
symtable.h41990644editdlrm
tblcoll.h381990644editdlrm
timezone.h345840644editdlrm
tmunit.h34540644editdlrm
tmutamt.h47870644editdlrm
tmutfmt.h86690644editdlrm
translit.h547800644editdlrm
tzrule.h360570644editdlrm
tztrans.h61010644editdlrm
ubidi.h830920644editdlrm
ubrk.h176880644editdlrm
ucal.h401770644editdlrm
ucasemap.h164200644editdlrm
ucat.h53710644editdlrm
uchar.h1110620644editdlrm
uchriter.h131320644editdlrm
uclean.h118550644editdlrm
ucnv.h831110644editdlrm
ucnvsel.h56300644editdlrm
ucnv_cb.h66350644editdlrm
ucnv_err.h213750644editdlrm
ucol.h488260644editdlrm
ucoleitr.h123560644editdlrm
uconfig.h60350644editdlrm
ucsdet.h124640644editdlrm
ucurr.h115720644editdlrm
udat.h344960644editdlrm
udata.h142650644editdlrm
udatpg.h187150644editdlrm
udeprctd.h22840644editdlrm
udraft.h76000644editdlrm
uenum.h57960644editdlrm
uidna.h159180644editdlrm
uintrnal.h157520644editdlrm
uiter.h232340644editdlrm
uloc.h445480644editdlrm
ulocdata.h97390644editdlrm
umachine.h113600644editdlrm
umisc.h12550644editdlrm
umsg.h260760644editdlrm
unifilt.h37700644editdlrm
unifunct.h39660644editdlrm
unimatch.h60710644editdlrm
unirepl.h32900644editdlrm
uniset.h617710644editdlrm
unistr.h1613210644editdlrm
unorm.h236210644editdlrm
unum.h321450644editdlrm
uobject.h113930644editdlrm
uobslete.h8520644editdlrm
uregex.h439480644editdlrm
urename.h925380644editdlrm
urep.h53940644editdlrm
ures.h363480644editdlrm
uscript.h113600644editdlrm
usearch.h342230644editdlrm
uset.h398680644editdlrm
usetiter.h96060644editdlrm
ushape.h179070644editdlrm
uspoof.h387520644editdlrm
usprep.h77500644editdlrm
ustdio.h353330644editdlrm
ustream.h18910644editdlrm
ustring.h693830644editdlrm
usystem.h19250644editdlrm
utext.h583940644editdlrm
utf.h82730644editdlrm
utf8.h205120644editdlrm
utf16.h187760644editdlrm
utf32.h6530644editdlrm
utf_old.h436460644editdlrm
utmscale.h136890644editdlrm
utrace.h133550644editdlrm
utrans.h231290644editdlrm
utypes.h345130644editdlrm
uversion.h109020644editdlrm
vtzone.h200480644editdlrm
Edit: /usr/include/unicode/parsepos.h (5468B)
/* * Copyright (C) 1997-2005, International Business Machines Corporation and others. All Rights Reserved. ******************************************************************************* * * File PARSEPOS.H * * Modification History: * * Date Name Description * 07/09/97 helena Converted from java. * 07/17/98 stephen Added errorIndex support. * 05/11/99 stephen Cleaned up. ******************************************************************************* */ #ifndef PARSEPOS_H #define PARSEPOS_H #include "unicode/utypes.h" #include "unicode/uobject.h" U_NAMESPACE_BEGIN /** * \file * \brief C++ API: Canonical Iterator */ /** * ParsePosition is a simple class used by Format * and its subclasses to keep track of the current position during parsing. * The parseObject method in the various Format * classes requires a ParsePosition object as an argument. * *

* By design, as you parse through a string with different formats, * you can use the same ParsePosition, since the index parameter * records the current position. * * The ParsePosition class is not suitable for subclassing. * * @version 1.3 10/30/97 * @author Mark Davis, Helena Shih * @see java.text.Format */ class U_COMMON_API ParsePosition : public UObject { public: /** * Default constructor, the index starts with 0 as default. * @stable ICU 2.0 */ ParsePosition() : UObject(), index(0), errorIndex(-1) {} /** * Create a new ParsePosition with the given initial index. * @param newIndex the new text offset. * @stable ICU 2.0 */ ParsePosition(int32_t newIndex) : UObject(), index(newIndex), errorIndex(-1) {} /** * Copy constructor * @param copy the object to be copied from. * @stable ICU 2.0 */ ParsePosition(const ParsePosition& copy) : UObject(copy), index(copy.index), errorIndex(copy.errorIndex) {} /** * Destructor * @stable ICU 2.0 */ virtual ~ParsePosition(); /** * Assignment operator * @stable ICU 2.0 */ ParsePosition& operator=(const ParsePosition& copy); /** * Equality operator. * @return TRUE if the two parse positions are equal, FALSE otherwise. * @stable ICU 2.0 */ UBool operator==(const ParsePosition& that) const; /** * Equality operator. * @return TRUE if the two parse positions are not equal, FALSE otherwise. * @stable ICU 2.0 */ UBool operator!=(const ParsePosition& that) const; /** * Clone this object. * Clones can be used concurrently in multiple threads. * If an error occurs, then NULL is returned. * The caller must delete the clone. * * @return a clone of this object * * @see getDynamicClassID * @stable ICU 2.8 */ ParsePosition *clone() const; /** * Retrieve the current parse position. On input to a parse method, this * is the index of the character at which parsing will begin; on output, it * is the index of the character following the last character parsed. * @return the current index. * @stable ICU 2.0 */ int32_t getIndex(void) const; /** * Set the current parse position. * @param index the new index. * @stable ICU 2.0 */ void setIndex(int32_t index); /** * Set the index at which a parse error occurred. Formatters * should set this before returning an error code from their * parseObject method. The default value is -1 if this is not * set. * @stable ICU 2.0 */ void setErrorIndex(int32_t ei); /** * Retrieve the index at which an error occurred, or -1 if the * error index has not been set. * @stable ICU 2.0 */ int32_t getErrorIndex(void) const; /** * ICU "poor man's RTTI", returns a UClassID for this class. * * @stable ICU 2.2 */ static UClassID U_EXPORT2 getStaticClassID(); /** * ICU "poor man's RTTI", returns a UClassID for the actual class. * * @stable ICU 2.2 */ virtual UClassID getDynamicClassID() const; private: /** * Input: the place you start parsing. *
Output: position where the parse stopped. * This is designed to be used serially, * with each call setting index up for the next one. */ int32_t index; /** * The index at which a parse error occurred. */ int32_t errorIndex; }; inline ParsePosition& ParsePosition::operator=(const ParsePosition& copy) { index = copy.index; errorIndex = copy.errorIndex; return *this; } inline UBool ParsePosition::operator==(const ParsePosition& copy) const { if(index != copy.index || errorIndex != copy.errorIndex) return FALSE; else return TRUE; } inline UBool ParsePosition::operator!=(const ParsePosition& copy) const { return !operator==(copy); } inline int32_t ParsePosition::getIndex() const { return index; } inline void ParsePosition::setIndex(int32_t offset) { this->index = offset; } inline int32_t ParsePosition::getErrorIndex() const { return errorIndex; } inline void ParsePosition::setErrorIndex(int32_t ei) { this->errorIndex = ei; } U_NAMESPACE_END #endif