|
||||
File indexing completed on 2025-01-18 10:15:20
0001 /* 0002 * Licensed to the Apache Software Foundation (ASF) under one or more 0003 * contributor license agreements. See the NOTICE file distributed with 0004 * this work for additional information regarding copyright ownership. 0005 * The ASF licenses this file to You under the Apache License, Version 2.0 0006 * (the "License"); you may not use this file except in compliance with 0007 * the License. You may obtain a copy of the License at 0008 * 0009 * http://www.apache.org/licenses/LICENSE-2.0 0010 * 0011 * Unless required by applicable law or agreed to in writing, software 0012 * distributed under the License is distributed on an "AS IS" BASIS, 0013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0014 * See the License for the specific language governing permissions and 0015 * limitations under the License. 0016 */ 0017 0018 /* 0019 * $Id$ 0020 */ 0021 0022 #if !defined(XERCESC_INCLUDE_GUARD_XSDLOCATOR_HPP) 0023 #define XERCESC_INCLUDE_GUARD_XSDLOCATOR_HPP 0024 0025 /** 0026 * A Locator implementation 0027 */ 0028 0029 #include <xercesc/util/XMemory.hpp> 0030 #include <xercesc/sax/Locator.hpp> 0031 0032 XERCES_CPP_NAMESPACE_BEGIN 0033 0034 class VALIDATORS_EXPORT XSDLocator: public XMemory, public Locator 0035 { 0036 public: 0037 0038 /** @name Constructors and Destructor */ 0039 //@{ 0040 /** Default constructor */ 0041 XSDLocator(); 0042 0043 /** Destructor */ 0044 virtual ~XSDLocator() 0045 { 0046 } 0047 0048 //@} 0049 0050 /** @name The locator interface */ 0051 //@{ 0052 /** 0053 * Return the public identifier for the current document event. 0054 * <p>This will be the public identifier 0055 * @return A string containing the public identifier, or 0056 * null if none is available. 0057 * @see #getSystemId 0058 */ 0059 virtual const XMLCh* getPublicId() const; 0060 0061 /** 0062 * Return the system identifier for the current document event. 0063 * 0064 * <p>If the system identifier is a URL, the parser must resolve it 0065 * fully before passing it to the application.</p> 0066 * 0067 * @return A string containing the system identifier, or null 0068 * if none is available. 0069 * @see #getPublicId 0070 */ 0071 virtual const XMLCh* getSystemId() const; 0072 0073 /** 0074 * Return the line number where the current document event ends. 0075 * Note that this is the line position of the first character 0076 * after the text associated with the document event. 0077 * @return The line number, or 0 if none is available. 0078 * @see #getColumnNumber 0079 */ 0080 virtual XMLFileLoc getLineNumber() const; 0081 0082 /** 0083 * Return the column number where the current document event ends. 0084 * Note that this is the column number of the first 0085 * character after the text associated with the document 0086 * event. The first column in a line is position 1. 0087 * @return The column number, or 0 if none is available. 0088 * @see #getLineNumber 0089 */ 0090 virtual XMLFileLoc getColumnNumber() const; 0091 //@} 0092 0093 // ----------------------------------------------------------------------- 0094 // Setter methods 0095 // ----------------------------------------------------------------------- 0096 void setValues(const XMLCh* const systemId, 0097 const XMLCh* const publicId, 0098 const XMLFileLoc lineNo, const XMLFileLoc columnNo); 0099 0100 private : 0101 // ----------------------------------------------------------------------- 0102 // Unimplemented constructors and destructor 0103 // ----------------------------------------------------------------------- 0104 XSDLocator(const XSDLocator&); 0105 XSDLocator& operator=(const XSDLocator&); 0106 0107 // ----------------------------------------------------------------------- 0108 // Private data members 0109 // ----------------------------------------------------------------------- 0110 XMLFileLoc fLineNo; 0111 XMLFileLoc fColumnNo; 0112 const XMLCh* fSystemId; 0113 const XMLCh* fPublicId; 0114 }; 0115 0116 // --------------------------------------------------------------------------- 0117 // XSDLocator: Getter methods 0118 // --------------------------------------------------------------------------- 0119 inline XMLFileLoc XSDLocator::getLineNumber() const 0120 { 0121 return fLineNo; 0122 } 0123 0124 inline XMLFileLoc XSDLocator::getColumnNumber() const 0125 { 0126 return fColumnNo; 0127 } 0128 0129 inline const XMLCh* XSDLocator::getPublicId() const 0130 { 0131 return fPublicId; 0132 } 0133 0134 inline const XMLCh* XSDLocator::getSystemId() const 0135 { 0136 return fSystemId; 0137 } 0138 0139 XERCES_CPP_NAMESPACE_END 0140 0141 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |