source: icXML/icXML-devel/src/xercesc/dom/DOMLSOutput.hpp @ 6297

Last change on this file since 6297 was 2722, checked in by cameron, 7 years ago

Original Xerces files with import mods for icxercesc

File size: 5.5 KB
Line 
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: DOMLSOutput.hpp 527149 2007-04-10 14:56:39Z amassari $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_DOMLSOUTPUT_HPP)
23#define XERCESC_INCLUDE_GUARD_DOMLSOUTPUT_HPP
24
25#include <xercesc/util/XercesDefs.hpp>
26
27XERCES_CPP_NAMESPACE_BEGIN
28
29
30class XMLFormatTarget;
31
32
33/**
34  * This interface represents an output destination for data.
35  *
36  * @see XMLFormatTarget
37  * @since DOM Level 3
38  */
39class CDOM_EXPORT DOMLSOutput
40{
41protected:
42    // -----------------------------------------------------------------------
43    //  Hidden constructors
44    // -----------------------------------------------------------------------
45    /** @name Hidden constructors */
46    //@{   
47    DOMLSOutput() {};
48    //@}
49
50private:
51    // -----------------------------------------------------------------------
52    // Unimplemented constructors and operators
53    // -----------------------------------------------------------------------
54    /** @name Unimplemented constructors and operators */
55    //@{
56    DOMLSOutput(const DOMLSOutput &);
57    DOMLSOutput & operator = (const DOMLSOutput &);
58    //@}
59
60public:
61    // -----------------------------------------------------------------------
62    //  All constructors are hidden, just the destructor is available
63    // -----------------------------------------------------------------------
64    /** @name Destructor */
65    //@{
66    /**
67     * Destructor
68     *
69     */
70    virtual ~DOMLSOutput() {};
71    //@}
72
73    // -----------------------------------------------------------------------
74    //  Virtual DOMLSOutput interface
75    // -----------------------------------------------------------------------
76    /** @name Functions introduced in DOM Level 3 */
77    //@{
78    // -----------------------------------------------------------------------
79    //  Getter methods
80    // -----------------------------------------------------------------------
81    /**
82     * Returns the byte stream for this input source.
83     *
84     * @see InputSource
85     */
86    virtual XMLFormatTarget* getByteStream() const = 0;
87
88    /**
89     * An input source can be set to force the parser to assume a particular
90     * encoding for the data that input source reprsents, via the setEncoding()
91     * method. This method returns name of the encoding that is to be forced.
92     * If the encoding has never been forced, it returns a null pointer.
93     *
94     * @return The forced encoding, or null if none was supplied.
95     * @see #setEncoding
96     * @since DOM Level 3
97     */
98    virtual const XMLCh* getEncoding() const = 0;
99
100    /**
101     * Get the system identifier for this input source.
102     *
103     * <p>If the system ID is a URL, it will be fully resolved.</p>
104     *
105     * @return The system identifier.
106     * @see #setSystemId
107     * @since DOM Level 3
108     */
109    virtual const XMLCh* getSystemId() const = 0;
110
111    // -----------------------------------------------------------------------
112    //  Setter methods
113    // -----------------------------------------------------------------------
114    /**
115     * Sets the byte stream for this input source.
116     *
117     * @see BinInputStream
118     */
119    virtual void setByteStream(XMLFormatTarget* stream) = 0;
120
121    /**
122     * Set the encoding which will be required for use with the XML text read
123     * via a stream opened by this input source.
124     *
125     * <p>This is usually not set, allowing the encoding to be sensed in the
126     * usual XML way. However, in some cases, the encoding in the file is known
127     * to be incorrect because of intermediate transcoding, for instance
128     * encapsulation within a MIME document.
129     *
130     * @param encodingStr The name of the encoding to force.
131     * @since DOM Level 3
132     */
133    virtual void setEncoding(const XMLCh* const encodingStr) = 0;
134
135    /**
136     * Set the system identifier for this input source.
137     *
138     * <p>The system id is always required. The public id may be used to map
139     * to another system id, but the system id must always be present as a fall
140     * back.</p>
141     *
142     * <p>If the system ID is a URL, it must be fully resolved.</p>
143     *
144     * @param systemId The system identifier as a string.
145     * @see #getSystemId
146     * @since DOM Level 3
147     */
148    virtual void setSystemId(const XMLCh* const systemId) = 0;
149    //@}
150
151    // -----------------------------------------------------------------------
152    //  Non-standard Extension
153    // -----------------------------------------------------------------------
154    /** @name Non-standard Extension */
155    //@{
156    /**
157     * Called to indicate that this DOMLSOutput is no longer in use
158     * and that the implementation may relinquish any resources associated with it.
159     *
160     * Access to a released object will lead to unexpected result.
161     */
162    virtual void              release() = 0;
163    //@}
164};
165
166
167XERCES_CPP_NAMESPACE_END
168
169#endif
Note: See TracBrowser for help on using the repository browser.