[188] | 1 | #ifndef DOMLocator_HEADER_GUARD_
|
---|
| 2 | #define DOMLocator_HEADER_GUARD_
|
---|
| 3 |
|
---|
| 4 | /*
|
---|
| 5 | * The Apache Software License, Version 1.1
|
---|
| 6 | *
|
---|
| 7 | * Copyright (c) 2002 The Apache Software Foundation. All rights
|
---|
| 8 | * reserved.
|
---|
| 9 | *
|
---|
| 10 | * Redistribution and use in source and binary forms, with or without
|
---|
| 11 | * modification, are permitted provided that the following conditions
|
---|
| 12 | * are met:
|
---|
| 13 | *
|
---|
| 14 | * 1. Redistributions of source code must retain the above copyright
|
---|
| 15 | * notice, this list of conditions and the following disclaimer.
|
---|
| 16 | *
|
---|
| 17 | * 2. Redistributions in binary form must reproduce the above copyright
|
---|
| 18 | * notice, this list of conditions and the following disclaimer in
|
---|
| 19 | * the documentation and/or other materials provided with the
|
---|
| 20 | * distribution.
|
---|
| 21 | *
|
---|
| 22 | * 3. The end-user documentation included with the redistribution,
|
---|
| 23 | * if any, must include the following acknowledgment:
|
---|
| 24 | * "This product includes software developed by the
|
---|
| 25 | * Apache Software Foundation (http://www.apache.org/)."
|
---|
| 26 | * Alternately, this acknowledgment may appear in the software itself,
|
---|
| 27 | * if and wherever such third-party acknowledgments normally appear.
|
---|
| 28 | *
|
---|
| 29 | * 4. The names "Xerces" and "Apache Software Foundation" must
|
---|
| 30 | * not be used to endorse or promote products derived from this
|
---|
| 31 | * software without prior written permission. For written
|
---|
| 32 | * permission, please contact apache\@apache.org.
|
---|
| 33 | *
|
---|
| 34 | * 5. Products derived from this software may not be called "Apache",
|
---|
| 35 | * nor may "Apache" appear in their name, without prior written
|
---|
| 36 | * permission of the Apache Software Foundation.
|
---|
| 37 | *
|
---|
| 38 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
---|
| 39 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
---|
| 40 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
---|
| 41 | * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
|
---|
| 42 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
---|
| 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
---|
| 44 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
---|
| 45 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
---|
| 46 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
---|
| 47 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
---|
| 48 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
---|
| 49 | * SUCH DAMAGE.
|
---|
| 50 | * ====================================================================
|
---|
| 51 | *
|
---|
| 52 | * This software consists of voluntary contributions made by many
|
---|
| 53 | * individuals on behalf of the Apache Software Foundation, and was
|
---|
| 54 | * originally based on software copyright (c) 1999, International
|
---|
| 55 | * Business Machines, Inc., http://www.ibm.com . For more information
|
---|
| 56 | * on the Apache Software Foundation, please see
|
---|
| 57 | * <http://www.apache.org/>.
|
---|
| 58 | */
|
---|
| 59 |
|
---|
| 60 | /*
|
---|
| 61 | * $Log: DOMLocator.hpp,v $
|
---|
| 62 | * Revision 1.7 2003/03/07 19:59:05 tng
|
---|
| 63 | * [Bug 11692] Unimplement the hidden constructors and assignment operator to remove warnings from gcc.
|
---|
| 64 | *
|
---|
| 65 | * Revision 1.6 2002/11/04 15:09:24 tng
|
---|
| 66 | * C++ Namespace Support.
|
---|
| 67 | *
|
---|
| 68 | * Revision 1.5 2002/08/22 15:04:57 tng
|
---|
| 69 | * Remove unused parameter variables in inline functions.
|
---|
| 70 | *
|
---|
| 71 | * Revision 1.4 2002/06/06 20:53:06 tng
|
---|
| 72 | * Documentation Fix: Update the API Documentation for DOM headers
|
---|
| 73 | *
|
---|
| 74 | * Revision 1.3 2002/05/30 19:24:48 knoaman
|
---|
| 75 | * documentation update
|
---|
| 76 | *
|
---|
| 77 | * Revision 1.2 2002/05/27 18:28:26 tng
|
---|
| 78 | * To get ready for 64 bit large file, use XMLSSize_t to represent line and column number.
|
---|
| 79 | *
|
---|
| 80 | * Revision 1.1 2002/05/23 15:47:24 knoaman
|
---|
| 81 | * DOM L3 core - support for DOMError, DOMErrorHandler and DOMLocator
|
---|
| 82 | *
|
---|
| 83 | */
|
---|
| 84 |
|
---|
| 85 | #include <xercesc/util/XercesDefs.hpp>
|
---|
| 86 |
|
---|
| 87 | XERCES_CPP_NAMESPACE_BEGIN
|
---|
| 88 |
|
---|
| 89 |
|
---|
| 90 | class DOMNode;
|
---|
| 91 |
|
---|
| 92 |
|
---|
| 93 | /**
|
---|
| 94 | * DOMLocator is an interface that describes a location. (e.g. where an error
|
---|
| 95 | * occured).
|
---|
| 96 | *
|
---|
| 97 | * @see DOMError#DOMError
|
---|
| 98 | * @since DOM Level 3
|
---|
| 99 | */
|
---|
| 100 |
|
---|
| 101 | class CDOM_EXPORT DOMLocator
|
---|
| 102 | {
|
---|
| 103 | protected:
|
---|
| 104 | // -----------------------------------------------------------------------
|
---|
| 105 | // Hidden constructors
|
---|
| 106 | // -----------------------------------------------------------------------
|
---|
| 107 | /** @name Hidden constructors */
|
---|
| 108 | //@{
|
---|
| 109 | DOMLocator() {};
|
---|
| 110 | //@}
|
---|
| 111 |
|
---|
| 112 | private:
|
---|
| 113 | // -----------------------------------------------------------------------
|
---|
| 114 | // Unimplemented constructors and operators
|
---|
| 115 | // -----------------------------------------------------------------------
|
---|
| 116 | /** @name Unimplemented constructors and operators */
|
---|
| 117 | //@{
|
---|
| 118 | DOMLocator(const DOMLocator &);
|
---|
| 119 | DOMLocator & operator = (const DOMLocator &);
|
---|
| 120 | //@}
|
---|
| 121 |
|
---|
| 122 | public:
|
---|
| 123 | // -----------------------------------------------------------------------
|
---|
| 124 | // All constructors are hidden, just the destructor is available
|
---|
| 125 | // -----------------------------------------------------------------------
|
---|
| 126 | /** @name Destructor */
|
---|
| 127 | //@{
|
---|
| 128 | /**
|
---|
| 129 | * Destructor
|
---|
| 130 | *
|
---|
| 131 | */
|
---|
| 132 | virtual ~DOMLocator() {};
|
---|
| 133 | //@}
|
---|
| 134 |
|
---|
| 135 | // -----------------------------------------------------------------------
|
---|
| 136 | // Virtual DOMLocator interface
|
---|
| 137 | // -----------------------------------------------------------------------
|
---|
| 138 | /** @name Functions introduced in DOM Level 3 */
|
---|
| 139 | //@{
|
---|
| 140 | // -----------------------------------------------------------------------
|
---|
| 141 | // Getter methods
|
---|
| 142 | // -----------------------------------------------------------------------
|
---|
| 143 | /**
|
---|
| 144 | * Get the line number where the error occured. The value is -1 if there is
|
---|
| 145 | * no line number available.
|
---|
| 146 | *
|
---|
| 147 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
| 148 | *
|
---|
| 149 | * @see #setLineNumber
|
---|
| 150 | * @since DOM Level 3
|
---|
| 151 | */
|
---|
| 152 | virtual XMLSSize_t getLineNumber() const = 0;
|
---|
| 153 |
|
---|
| 154 | /**
|
---|
| 155 | * Get the column number where the error occured. The value is -1 if there
|
---|
| 156 | * is no column number available.
|
---|
| 157 | *
|
---|
| 158 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
| 159 | *
|
---|
| 160 | * @see #setColumnNumber
|
---|
| 161 | * @since DOM Level 3
|
---|
| 162 | */
|
---|
| 163 | virtual XMLSSize_t getColumnNumber() const = 0;
|
---|
| 164 |
|
---|
| 165 | /**
|
---|
| 166 | * Get the byte or character offset into the input source, if we're parsing
|
---|
| 167 | * a file or a byte stream then this will be the byte offset into that
|
---|
| 168 | * stream, but if a character media is parsed then the offset will be the
|
---|
| 169 | * character offset. The value is -1 if there is no offset available.
|
---|
| 170 | *
|
---|
| 171 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
| 172 | *
|
---|
| 173 | * @see #setOffset
|
---|
| 174 | * @since DOM Level 3
|
---|
| 175 | */
|
---|
| 176 | virtual XMLSSize_t getOffset() const = 0;
|
---|
| 177 |
|
---|
| 178 | /**
|
---|
| 179 | * Get the DOMNode where the error occured, or <code>null</code> if there
|
---|
| 180 | * is no node available.
|
---|
| 181 | *
|
---|
| 182 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
| 183 | *
|
---|
| 184 | * @see #setErrorNode
|
---|
| 185 | * @since DOM Level 3
|
---|
| 186 | */
|
---|
| 187 | virtual DOMNode* getErrorNode() const = 0;
|
---|
| 188 |
|
---|
| 189 | /**
|
---|
| 190 | * Get the URI where the error occured, or <code>null</code> if there is no
|
---|
| 191 | * URI available.
|
---|
| 192 | *
|
---|
| 193 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
| 194 | *
|
---|
| 195 | * @see #setURI
|
---|
| 196 | * @since DOM Level 3
|
---|
| 197 | */
|
---|
| 198 | virtual const XMLCh* getURI() const = 0;
|
---|
| 199 |
|
---|
| 200 | // -----------------------------------------------------------------------
|
---|
| 201 | // Setter methods
|
---|
| 202 | // -----------------------------------------------------------------------
|
---|
| 203 | /**
|
---|
| 204 | * Set the line number of the error
|
---|
| 205 | *
|
---|
| 206 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
| 207 | *
|
---|
| 208 | * @param lineNumber the line number to set
|
---|
| 209 | *
|
---|
| 210 | * @see #getLinNumner
|
---|
| 211 | * @since DOM Level 3
|
---|
| 212 | */
|
---|
| 213 | virtual void setLineNumber(const XMLSSize_t lineNumber) = 0;
|
---|
| 214 |
|
---|
| 215 | /**
|
---|
| 216 | * Set the column number of the error
|
---|
| 217 | *
|
---|
| 218 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
| 219 | *
|
---|
| 220 | * @param columnNumber the column number to set.
|
---|
| 221 | *
|
---|
| 222 | * @see #getColumnNumner
|
---|
| 223 | * @since DOM Level 3
|
---|
| 224 | */
|
---|
| 225 | virtual void setColumnNumber(const XMLSSize_t columnNumber) = 0;
|
---|
| 226 |
|
---|
| 227 | /**
|
---|
| 228 | * Set the byte/character offset.
|
---|
| 229 | *
|
---|
| 230 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
| 231 | *
|
---|
| 232 | * @param offset the byte/characte offset to set.
|
---|
| 233 | *
|
---|
| 234 | * @see #getOffset
|
---|
| 235 | * @since DOM Level 3
|
---|
| 236 | */
|
---|
| 237 | virtual void setOffset(const XMLSSize_t offset) = 0;
|
---|
| 238 |
|
---|
| 239 | /**
|
---|
| 240 | * Set the DOMNode where the error occured
|
---|
| 241 | *
|
---|
| 242 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
| 243 | *
|
---|
| 244 | * @param errorNode the DOMNode to set
|
---|
| 245 | *
|
---|
| 246 | * @see #getErrorNode
|
---|
| 247 | * @since DOM Level 3
|
---|
| 248 | */
|
---|
| 249 | virtual void setErrorNode(DOMNode* const errorNode) = 0;
|
---|
| 250 |
|
---|
| 251 | /**
|
---|
| 252 | * Set the URI where the error occured
|
---|
| 253 | *
|
---|
| 254 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
| 255 | *
|
---|
| 256 | * @param uri the URI to set.
|
---|
| 257 | *
|
---|
| 258 | * @see #getURI
|
---|
| 259 | * @since DOM Level 3
|
---|
| 260 | */
|
---|
| 261 | virtual void setURI(const XMLCh* const uri) = 0;
|
---|
| 262 |
|
---|
| 263 | //@}
|
---|
| 264 | };
|
---|
| 265 |
|
---|
| 266 | XERCES_CPP_NAMESPACE_END
|
---|
| 267 |
|
---|
| 268 | #endif
|
---|