Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:27:03

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_DOMLSOUTPUT_HPP)
0023 #define XERCESC_INCLUDE_GUARD_DOMLSOUTPUT_HPP
0024 
0025 #include <xercesc/util/XercesDefs.hpp>
0026 
0027 XERCES_CPP_NAMESPACE_BEGIN
0028 
0029 
0030 class XMLFormatTarget;
0031 
0032 
0033 /**
0034   * This interface represents an output destination for data.
0035   *
0036   * @see XMLFormatTarget
0037   * @since DOM Level 3
0038   */
0039 class CDOM_EXPORT DOMLSOutput
0040 {
0041 protected:
0042     // -----------------------------------------------------------------------
0043     //  Hidden constructors
0044     // -----------------------------------------------------------------------
0045     /** @name Hidden constructors */
0046     //@{    
0047     DOMLSOutput() {};
0048     //@}
0049 
0050 private:
0051     // -----------------------------------------------------------------------
0052     // Unimplemented constructors and operators
0053     // -----------------------------------------------------------------------
0054     /** @name Unimplemented constructors and operators */
0055     //@{
0056     DOMLSOutput(const DOMLSOutput &);
0057     DOMLSOutput & operator = (const DOMLSOutput &);
0058     //@}
0059 
0060 public:
0061     // -----------------------------------------------------------------------
0062     //  All constructors are hidden, just the destructor is available
0063     // -----------------------------------------------------------------------
0064     /** @name Destructor */
0065     //@{
0066     /**
0067      * Destructor
0068      *
0069      */
0070     virtual ~DOMLSOutput() {};
0071     //@}
0072 
0073     // -----------------------------------------------------------------------
0074     //  Virtual DOMLSOutput interface
0075     // -----------------------------------------------------------------------
0076     /** @name Functions introduced in DOM Level 3 */
0077     //@{
0078     // -----------------------------------------------------------------------
0079     //  Getter methods
0080     // -----------------------------------------------------------------------
0081     /**
0082      * Returns the byte stream for this input source.
0083      *
0084      * @see InputSource
0085      */
0086     virtual XMLFormatTarget* getByteStream() const = 0;
0087 
0088     /**
0089      * An input source can be set to force the parser to assume a particular
0090      * encoding for the data that input source reprsents, via the setEncoding()
0091      * method. This method returns name of the encoding that is to be forced.
0092      * If the encoding has never been forced, it returns a null pointer.
0093      *
0094      * @return The forced encoding, or null if none was supplied.
0095      * @see #setEncoding
0096      * @since DOM Level 3
0097      */
0098     virtual const XMLCh* getEncoding() const = 0;
0099 
0100     /**
0101      * Get the system identifier for this input source.
0102      *
0103      * <p>If the system ID is a URL, it will be fully resolved.</p>
0104      *
0105      * @return The system identifier.
0106      * @see #setSystemId
0107      * @since DOM Level 3
0108      */
0109     virtual const XMLCh* getSystemId() const = 0;
0110 
0111     // -----------------------------------------------------------------------
0112     //  Setter methods
0113     // -----------------------------------------------------------------------
0114     /**
0115      * Sets the byte stream for this input source.
0116      *
0117      * @see BinInputStream
0118      */
0119     virtual void setByteStream(XMLFormatTarget* stream) = 0;
0120 
0121     /**
0122      * Set the encoding which will be required for use with the XML text read
0123      * via a stream opened by this input source.
0124      *
0125      * <p>This is usually not set, allowing the encoding to be sensed in the
0126      * usual XML way. However, in some cases, the encoding in the file is known
0127      * to be incorrect because of intermediate transcoding, for instance
0128      * encapsulation within a MIME document.
0129      *
0130      * @param encodingStr The name of the encoding to force.
0131      * @since DOM Level 3
0132      */
0133     virtual void setEncoding(const XMLCh* const encodingStr) = 0;
0134 
0135     /**
0136      * Set the system identifier for this input source.
0137      *
0138      * <p>The system id is always required. The public id may be used to map
0139      * to another system id, but the system id must always be present as a fall
0140      * back.</p>
0141      *
0142      * <p>If the system ID is a URL, it must be fully resolved.</p>
0143      *
0144      * @param systemId The system identifier as a string.
0145      * @see #getSystemId
0146      * @since DOM Level 3
0147      */
0148     virtual void setSystemId(const XMLCh* const systemId) = 0;
0149     //@}
0150 
0151     // -----------------------------------------------------------------------
0152     //  Non-standard Extension
0153     // -----------------------------------------------------------------------
0154     /** @name Non-standard Extension */
0155     //@{
0156     /**
0157      * Called to indicate that this DOMLSOutput is no longer in use
0158      * and that the implementation may relinquish any resources associated with it.
0159      *
0160      * Access to a released object will lead to unexpected result.
0161      */
0162     virtual void              release() = 0;
0163     //@}
0164 };
0165 
0166 
0167 XERCES_CPP_NAMESPACE_END
0168 
0169 #endif