1 | #ifndef DOMLocator_HEADER_GUARD_
|
---|
2 | #define DOMLocator_HEADER_GUARD_
|
---|
3 |
|
---|
4 | /*
|
---|
5 | * Copyright 2002,2004 The Apache Software Foundation.
|
---|
6 | *
|
---|
7 | * Licensed under the Apache License, Version 2.0 (the "License");
|
---|
8 | * you may not use this file except in compliance with the License.
|
---|
9 | * You may obtain a copy of the License at
|
---|
10 | *
|
---|
11 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
12 | *
|
---|
13 | * Unless required by applicable law or agreed to in writing, software
|
---|
14 | * distributed under the License is distributed on an "AS IS" BASIS,
|
---|
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
16 | * See the License for the specific language governing permissions and
|
---|
17 | * limitations under the License.
|
---|
18 | */
|
---|
19 |
|
---|
20 | /*
|
---|
21 | * $Log: DOMLocator.hpp,v $
|
---|
22 | * Revision 1.8 2004/09/08 13:55:39 peiyongz
|
---|
23 | * Apache License Version 2.0
|
---|
24 | *
|
---|
25 | * Revision 1.7 2003/03/07 19:59:05 tng
|
---|
26 | * [Bug 11692] Unimplement the hidden constructors and assignment operator to remove warnings from gcc.
|
---|
27 | *
|
---|
28 | * Revision 1.6 2002/11/04 15:09:24 tng
|
---|
29 | * C++ Namespace Support.
|
---|
30 | *
|
---|
31 | * Revision 1.5 2002/08/22 15:04:57 tng
|
---|
32 | * Remove unused parameter variables in inline functions.
|
---|
33 | *
|
---|
34 | * Revision 1.4 2002/06/06 20:53:06 tng
|
---|
35 | * Documentation Fix: Update the API Documentation for DOM headers
|
---|
36 | *
|
---|
37 | * Revision 1.3 2002/05/30 19:24:48 knoaman
|
---|
38 | * documentation update
|
---|
39 | *
|
---|
40 | * Revision 1.2 2002/05/27 18:28:26 tng
|
---|
41 | * To get ready for 64 bit large file, use XMLSSize_t to represent line and column number.
|
---|
42 | *
|
---|
43 | * Revision 1.1 2002/05/23 15:47:24 knoaman
|
---|
44 | * DOM L3 core - support for DOMError, DOMErrorHandler and DOMLocator
|
---|
45 | *
|
---|
46 | */
|
---|
47 |
|
---|
48 | #include <xercesc/util/XercesDefs.hpp>
|
---|
49 |
|
---|
50 | XERCES_CPP_NAMESPACE_BEGIN
|
---|
51 |
|
---|
52 |
|
---|
53 | class DOMNode;
|
---|
54 |
|
---|
55 |
|
---|
56 | /**
|
---|
57 | * DOMLocator is an interface that describes a location. (e.g. where an error
|
---|
58 | * occured).
|
---|
59 | *
|
---|
60 | * @see DOMError#DOMError
|
---|
61 | * @since DOM Level 3
|
---|
62 | */
|
---|
63 |
|
---|
64 | class CDOM_EXPORT DOMLocator
|
---|
65 | {
|
---|
66 | protected:
|
---|
67 | // -----------------------------------------------------------------------
|
---|
68 | // Hidden constructors
|
---|
69 | // -----------------------------------------------------------------------
|
---|
70 | /** @name Hidden constructors */
|
---|
71 | //@{
|
---|
72 | DOMLocator() {};
|
---|
73 | //@}
|
---|
74 |
|
---|
75 | private:
|
---|
76 | // -----------------------------------------------------------------------
|
---|
77 | // Unimplemented constructors and operators
|
---|
78 | // -----------------------------------------------------------------------
|
---|
79 | /** @name Unimplemented constructors and operators */
|
---|
80 | //@{
|
---|
81 | DOMLocator(const DOMLocator &);
|
---|
82 | DOMLocator & operator = (const DOMLocator &);
|
---|
83 | //@}
|
---|
84 |
|
---|
85 | public:
|
---|
86 | // -----------------------------------------------------------------------
|
---|
87 | // All constructors are hidden, just the destructor is available
|
---|
88 | // -----------------------------------------------------------------------
|
---|
89 | /** @name Destructor */
|
---|
90 | //@{
|
---|
91 | /**
|
---|
92 | * Destructor
|
---|
93 | *
|
---|
94 | */
|
---|
95 | virtual ~DOMLocator() {};
|
---|
96 | //@}
|
---|
97 |
|
---|
98 | // -----------------------------------------------------------------------
|
---|
99 | // Virtual DOMLocator interface
|
---|
100 | // -----------------------------------------------------------------------
|
---|
101 | /** @name Functions introduced in DOM Level 3 */
|
---|
102 | //@{
|
---|
103 | // -----------------------------------------------------------------------
|
---|
104 | // Getter methods
|
---|
105 | // -----------------------------------------------------------------------
|
---|
106 | /**
|
---|
107 | * Get the line number where the error occured. The value is -1 if there is
|
---|
108 | * no line number available.
|
---|
109 | *
|
---|
110 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
111 | *
|
---|
112 | * @see #setLineNumber
|
---|
113 | * @since DOM Level 3
|
---|
114 | */
|
---|
115 | virtual XMLSSize_t getLineNumber() const = 0;
|
---|
116 |
|
---|
117 | /**
|
---|
118 | * Get the column number where the error occured. The value is -1 if there
|
---|
119 | * is no column number available.
|
---|
120 | *
|
---|
121 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
122 | *
|
---|
123 | * @see #setColumnNumber
|
---|
124 | * @since DOM Level 3
|
---|
125 | */
|
---|
126 | virtual XMLSSize_t getColumnNumber() const = 0;
|
---|
127 |
|
---|
128 | /**
|
---|
129 | * Get the byte or character offset into the input source, if we're parsing
|
---|
130 | * a file or a byte stream then this will be the byte offset into that
|
---|
131 | * stream, but if a character media is parsed then the offset will be the
|
---|
132 | * character offset. The value is -1 if there is no offset available.
|
---|
133 | *
|
---|
134 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
135 | *
|
---|
136 | * @see #setOffset
|
---|
137 | * @since DOM Level 3
|
---|
138 | */
|
---|
139 | virtual XMLSSize_t getOffset() const = 0;
|
---|
140 |
|
---|
141 | /**
|
---|
142 | * Get the DOMNode where the error occured, or <code>null</code> if there
|
---|
143 | * is no node available.
|
---|
144 | *
|
---|
145 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
146 | *
|
---|
147 | * @see #setErrorNode
|
---|
148 | * @since DOM Level 3
|
---|
149 | */
|
---|
150 | virtual DOMNode* getErrorNode() const = 0;
|
---|
151 |
|
---|
152 | /**
|
---|
153 | * Get the URI where the error occured, or <code>null</code> if there is no
|
---|
154 | * URI available.
|
---|
155 | *
|
---|
156 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
157 | *
|
---|
158 | * @see #setURI
|
---|
159 | * @since DOM Level 3
|
---|
160 | */
|
---|
161 | virtual const XMLCh* getURI() const = 0;
|
---|
162 |
|
---|
163 | // -----------------------------------------------------------------------
|
---|
164 | // Setter methods
|
---|
165 | // -----------------------------------------------------------------------
|
---|
166 | /**
|
---|
167 | * Set the line number of the error
|
---|
168 | *
|
---|
169 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
170 | *
|
---|
171 | * @param lineNumber the line number to set
|
---|
172 | *
|
---|
173 | * @see #getLinNumner
|
---|
174 | * @since DOM Level 3
|
---|
175 | */
|
---|
176 | virtual void setLineNumber(const XMLSSize_t lineNumber) = 0;
|
---|
177 |
|
---|
178 | /**
|
---|
179 | * Set the column number of the error
|
---|
180 | *
|
---|
181 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
182 | *
|
---|
183 | * @param columnNumber the column number to set.
|
---|
184 | *
|
---|
185 | * @see #getColumnNumner
|
---|
186 | * @since DOM Level 3
|
---|
187 | */
|
---|
188 | virtual void setColumnNumber(const XMLSSize_t columnNumber) = 0;
|
---|
189 |
|
---|
190 | /**
|
---|
191 | * Set the byte/character offset.
|
---|
192 | *
|
---|
193 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
194 | *
|
---|
195 | * @param offset the byte/characte offset to set.
|
---|
196 | *
|
---|
197 | * @see #getOffset
|
---|
198 | * @since DOM Level 3
|
---|
199 | */
|
---|
200 | virtual void setOffset(const XMLSSize_t offset) = 0;
|
---|
201 |
|
---|
202 | /**
|
---|
203 | * Set the DOMNode where the error occured
|
---|
204 | *
|
---|
205 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
206 | *
|
---|
207 | * @param errorNode the DOMNode to set
|
---|
208 | *
|
---|
209 | * @see #getErrorNode
|
---|
210 | * @since DOM Level 3
|
---|
211 | */
|
---|
212 | virtual void setErrorNode(DOMNode* const errorNode) = 0;
|
---|
213 |
|
---|
214 | /**
|
---|
215 | * Set the URI where the error occured
|
---|
216 | *
|
---|
217 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
218 | *
|
---|
219 | * @param uri the URI to set.
|
---|
220 | *
|
---|
221 | * @see #getURI
|
---|
222 | * @since DOM Level 3
|
---|
223 | */
|
---|
224 | virtual void setURI(const XMLCh* const uri) = 0;
|
---|
225 |
|
---|
226 | //@}
|
---|
227 | };
|
---|
228 |
|
---|
229 | XERCES_CPP_NAMESPACE_END
|
---|
230 |
|
---|
231 | #endif
|
---|