SourceForge.net Logo
DOMLSInput.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 /*
19  * $Id$
20  */
21 
22 #if !defined(XERCESC_INCLUDE_GUARD_DOMLSINPUT_HPP)
23 #define XERCESC_INCLUDE_GUARD_DOMLSINPUT_HPP
24 
25 #include <xercesc/util/XercesDefs.hpp>
26 
27 XERCES_CPP_NAMESPACE_BEGIN
28 
29 
30 class InputSource;
31 
32 
59 class CDOM_EXPORT DOMLSInput
60 {
61 protected:
62  // -----------------------------------------------------------------------
63  // Hidden constructors
64  // -----------------------------------------------------------------------
67  DOMLSInput() {};
69 
70 private:
71  // -----------------------------------------------------------------------
72  // Unimplemented constructors and operators
73  // -----------------------------------------------------------------------
76  DOMLSInput(const DOMLSInput &);
77  DOMLSInput & operator = (const DOMLSInput &);
79 
80 public:
81  // -----------------------------------------------------------------------
82  // All constructors are hidden, just the destructor is available
83  // -----------------------------------------------------------------------
90  virtual ~DOMLSInput() {};
92 
93  // -----------------------------------------------------------------------
94  // Virtual DOMLSInput interface
95  // -----------------------------------------------------------------------
98  // -----------------------------------------------------------------------
99  // Getter methods
100  // -----------------------------------------------------------------------
107  virtual const XMLCh* getStringData() const = 0;
108 
114  virtual InputSource* getByteStream() const = 0;
115 
126  virtual const XMLCh* getEncoding() const = 0;
127 
128 
136  virtual const XMLCh* getPublicId() const = 0;
137 
138 
148  virtual const XMLCh* getSystemId() const = 0;
149 
150 
160  virtual const XMLCh* getBaseURI() const = 0;
161 
162  // -----------------------------------------------------------------------
163  // Setter methods
164  // -----------------------------------------------------------------------
165  // -----------------------------------------------------------------------
170  virtual void setStringData(const XMLCh* data) = 0;
171 
177  virtual void setByteStream(InputSource* stream) = 0;
178 
191  virtual void setEncoding(const XMLCh* const encodingStr) = 0;
192 
193 
204  virtual void setPublicId(const XMLCh* const publicId) = 0;
205 
219  virtual void setSystemId(const XMLCh* const systemId) = 0;
220 
230  virtual void setBaseURI(const XMLCh* const baseURI) = 0;
232 
233  // -----------------------------------------------------------------------
234  // Non-standard Extension
235  // -----------------------------------------------------------------------
238 
248  virtual void setIssueFatalErrorIfNotFound(bool flag) = 0;
249 
250 
259  virtual bool getIssueFatalErrorIfNotFound() const = 0;
260 
267  virtual void release() = 0;
269 };
270 
271 
272 XERCES_CPP_NAMESPACE_END
273 
274 #endif
xercesc::DOMLSInput::setStringData
virtual void setStringData(const XMLCh *data)=0
Sets the UTF-16 string for this input source.
xercesc::DOMLSInput::getIssueFatalErrorIfNotFound
virtual bool getIssueFatalErrorIfNotFound() const =0
Get the flag that indicates if the parser should issue fatal error if this input source is not found.
xercesc::DOMLSInput::getSystemId
virtual const XMLCh * getSystemId() const =0
Get the system identifier for this input source.
xercesc::DOMLSInput::getEncoding
virtual const XMLCh * getEncoding() const =0
An input source can be set to force the parser to assume a particular encoding for the data that inpu...
xercesc::DOMLSInput::~DOMLSInput
virtual ~DOMLSInput()
Destructor.
Definition: DOMLSInput.hpp:90
xercesc::DOMLSInput::setByteStream
virtual void setByteStream(InputSource *stream)=0
Sets the byte stream for this input source.
xercesc::DOMLSInput::getBaseURI
virtual const XMLCh * getBaseURI() const =0
Get the base URI to be used for resolving relative URIs to absolute URIs.
xercesc::DOMLSInput::getPublicId
virtual const XMLCh * getPublicId() const =0
Get the public identifier for this input source.
xercesc::DOMLSInput::setIssueFatalErrorIfNotFound
virtual void setIssueFatalErrorIfNotFound(bool flag)=0
Indicates if the parser should issue fatal error if this input source is not found.
xercesc::DOMLSInput::setPublicId
virtual void setPublicId(const XMLCh *const publicId)=0
Set the public identifier for this input source.
xercesc::DOMLSInput::setBaseURI
virtual void setBaseURI(const XMLCh *const baseURI)=0
Set the base URI to be used for resolving relative URIs to absolute URIs.
xercesc::DOMLSInput::setSystemId
virtual void setSystemId(const XMLCh *const systemId)=0
Set the system identifier for this input source.
xercesc::DOMLSInput
This interface represents a single input source for an XML entity.
Definition: DOMLSInput.hpp:60
xercesc::DOMLSInput::release
virtual void release()=0
Called to indicate that this DOMLSInput is no longer in use and that the implementation may relinquis...
xercesc::DOMLSInput::getByteStream
virtual InputSource * getByteStream() const =0
Returns the byte stream for this input source.
xercesc::DOMLSInput::getStringData
virtual const XMLCh * getStringData() const =0
String data to parse.
xercesc::DOMLSInput::DOMLSInput
DOMLSInput()
Definition: DOMLSInput.hpp:67
xercesc::DOMLSInput::setEncoding
virtual void setEncoding(const XMLCh *const encodingStr)=0
Set the encoding which will be required for use with the XML text read via a stream opened by this in...