1ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru/*
2ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru* Copyright (C) 1997-2005, International Business Machines Corporation and others. All Rights Reserved.
3ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru*******************************************************************************
4ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru*
5ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru* File PARSEPOS.H
6ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru*
7ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru* Modification History:
8ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru*
9ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru*   Date        Name        Description
10ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru*   07/09/97    helena      Converted from java.
11ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru*   07/17/98    stephen     Added errorIndex support.
12ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru*   05/11/99    stephen     Cleaned up.
13ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru*******************************************************************************
14ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru*/
15ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
16ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#ifndef PARSEPOS_H
17ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#define PARSEPOS_H
18ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
19ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#include "unicode/utypes.h"
20ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#include "unicode/uobject.h"
21ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
22ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
23ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruU_NAMESPACE_BEGIN
24ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
25ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru/**
26ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * \file
27ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * \brief C++ API: Canonical Iterator
28ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru */
29ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru/**
30ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * <code>ParsePosition</code> is a simple class used by <code>Format</code>
31ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * and its subclasses to keep track of the current position during parsing.
32ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * The <code>parseObject</code> method in the various <code>Format</code>
33ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * classes requires a <code>ParsePosition</code> object as an argument.
34ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru *
35ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * <p>
36ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * By design, as you parse through a string with different formats,
37ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * you can use the same <code>ParsePosition</code>, since the index parameter
38ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * records the current position.
39ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru *
40ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * The ParsePosition class is not suitable for subclassing.
41ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru *
42ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * @version     1.3 10/30/97
43ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * @author      Mark Davis, Helena Shih
44ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * @see         java.text.Format
45ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru */
46ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
47ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruclass U_COMMON_API ParsePosition : public UObject {
48ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Querupublic:
49ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
50ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Default constructor, the index starts with 0 as default.
51ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @stable ICU 2.0
52ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
53ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    ParsePosition()
54ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        : UObject(),
55ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        index(0),
56ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        errorIndex(-1)
57ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      {}
58ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
59ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
60ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Create a new ParsePosition with the given initial index.
61ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @param newIndex the new text offset.
62ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @stable ICU 2.0
63ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
64ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    ParsePosition(int32_t newIndex)
65ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        : UObject(),
66ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        index(newIndex),
67ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        errorIndex(-1)
68ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      {}
69ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
70ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
71ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Copy constructor
72ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @param copy the object to be copied from.
73ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @stable ICU 2.0
74ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
75ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    ParsePosition(const ParsePosition& copy)
76ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        : UObject(copy),
77ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        index(copy.index),
78ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        errorIndex(copy.errorIndex)
79ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      {}
80ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
81ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
82ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Destructor
83ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @stable ICU 2.0
84ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
85ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    virtual ~ParsePosition();
86ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
87ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
88ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Assignment operator
89ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @stable ICU 2.0
90ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
91ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    ParsePosition&      operator=(const ParsePosition& copy);
92ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
93ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
94ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Equality operator.
95ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @return TRUE if the two parse positions are equal, FALSE otherwise.
96ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @stable ICU 2.0
97ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
98ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    UBool              operator==(const ParsePosition& that) const;
99ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
100ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
101ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Equality operator.
102ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @return TRUE if the two parse positions are not equal, FALSE otherwise.
103ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @stable ICU 2.0
104ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
105ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    UBool              operator!=(const ParsePosition& that) const;
106ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
107ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
108ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Clone this object.
109ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Clones can be used concurrently in multiple threads.
110ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * If an error occurs, then NULL is returned.
111ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * The caller must delete the clone.
112ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     *
113ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @return a clone of this object
114ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     *
115ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @see getDynamicClassID
116ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @stable ICU 2.8
117ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
118ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    ParsePosition *clone() const;
119ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
120ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
121ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Retrieve the current parse position.  On input to a parse method, this
122ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * is the index of the character at which parsing will begin; on output, it
123ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * is the index of the character following the last character parsed.
124ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @return the current index.
125ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @stable ICU 2.0
126ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
127ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    int32_t getIndex(void) const;
128ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
129ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
130ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Set the current parse position.
131ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @param index the new index.
132ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @stable ICU 2.0
133ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
134ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    void setIndex(int32_t index);
135ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
136ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
137ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Set the index at which a parse error occurred.  Formatters
138ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * should set this before returning an error code from their
139ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * parseObject method.  The default value is -1 if this is not
140ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * set.
141ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @stable ICU 2.0
142ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
143ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    void setErrorIndex(int32_t ei);
144ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
145ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
146ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Retrieve the index at which an error occurred, or -1 if the
147ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * error index has not been set.
148ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @stable ICU 2.0
149ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
150ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    int32_t getErrorIndex(void) const;
151ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
152ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
153ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * ICU "poor man's RTTI", returns a UClassID for this class.
154ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     *
155ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @stable ICU 2.2
156ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
157ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    static UClassID U_EXPORT2 getStaticClassID();
158ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
159ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
160ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * ICU "poor man's RTTI", returns a UClassID for the actual class.
161ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     *
162ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @stable ICU 2.2
163ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
164ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    virtual UClassID getDynamicClassID() const;
165ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
166ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruprivate:
167ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
168ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Input: the place you start parsing.
169ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * <br>Output: position where the parse stopped.
170ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * This is designed to be used serially,
171ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * with each call setting index up for the next one.
172ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
173ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    int32_t index;
174ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
175ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
176ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * The index at which a parse error occurred.
177ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
178ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    int32_t errorIndex;
179ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
180ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru};
181ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
182ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruinline ParsePosition&
183ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruParsePosition::operator=(const ParsePosition& copy)
184ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru{
185ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  index = copy.index;
186ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  errorIndex = copy.errorIndex;
187ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  return *this;
188ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}
189ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
190ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruinline UBool
191ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruParsePosition::operator==(const ParsePosition& copy) const
192ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru{
193ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  if(index != copy.index || errorIndex != copy.errorIndex)
194ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  return FALSE;
195ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  else
196ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  return TRUE;
197ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}
198ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
199ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruinline UBool
200ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruParsePosition::operator!=(const ParsePosition& copy) const
201ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru{
202ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  return !operator==(copy);
203ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}
204ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
205ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruinline int32_t
206ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruParsePosition::getIndex() const
207ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru{
208ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  return index;
209ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}
210ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
211ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruinline void
212ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruParsePosition::setIndex(int32_t offset)
213ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru{
214ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  this->index = offset;
215ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}
216ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
217ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruinline int32_t
218ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruParsePosition::getErrorIndex() const
219ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru{
220ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  return errorIndex;
221ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}
222ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
223ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruinline void
224ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruParsePosition::setErrorIndex(int32_t ei)
225ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru{
226ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  this->errorIndex = ei;
227ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}
228ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruU_NAMESPACE_END
229ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
230ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#endif
231