source: icXML/icXML-devel/src/xercesc/dom/DOMImplementationLS.hpp @ 2722

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

Original Xerces files with import mods for icxercesc

File size: 7.0 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: DOMImplementationLS.hpp 932887 2010-04-11 13:04:59Z borisk $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_DOMIMPLEMENTATIONLS_HPP)
23#define XERCESC_INCLUDE_GUARD_DOMIMPLEMENTATIONLS_HPP
24
25#include <icxercesc/util/PlatformUtils.hpp>
26
27XERCES_CPP_NAMESPACE_BEGIN
28
29
30class DOMLSParser;
31class DOMLSSerializer;
32class DOMLSInput;
33class DOMLSOutput;
34class MemoryManager;
35class XMLGrammarPool;
36
37/**
38  * <p><code>DOMImplementationLS</code> contains the factory methods for
39  * creating Load and Save objects.</p>
40  *
41  * <p>An object that implements DOMImplementationLS is obtained by doing a
42  * binding specific cast from DOMImplementation to DOMImplementationLS.
43  * Implementations supporting the Load and Save feature must implement the
44  * DOMImplementationLS interface on whatever object implements the
45  * DOMImplementation interface.</p>
46  *
47  * @since DOM Level 3
48  */
49class CDOM_EXPORT DOMImplementationLS
50{
51protected:
52    // -----------------------------------------------------------------------
53    //  Hidden constructors
54    // -----------------------------------------------------------------------
55    /** @name Hidden constructors */
56    //@{
57    DOMImplementationLS() {};
58    //@}
59
60private:
61    // -----------------------------------------------------------------------
62    // Unimplemented constructors and operators
63    // -----------------------------------------------------------------------
64    /** @name Unimplemented constructors and operators */
65    //@{
66    DOMImplementationLS(const DOMImplementationLS &);
67    DOMImplementationLS & operator = (const DOMImplementationLS &);
68    //@}
69
70public:
71    // -----------------------------------------------------------------------
72    //  All constructors are hidden, just the destructor is available
73    // -----------------------------------------------------------------------
74    /** @name Destructor */
75    //@{
76    /**
77     * Destructor
78     *
79     */
80    virtual ~DOMImplementationLS() {};
81    //@}
82
83    // -----------------------------------------------------------------------
84    //  Public constants
85    // -----------------------------------------------------------------------
86    /** @name Public constants */
87    //@{
88    /**
89     * Create a synchronous or an asynchronous <code>DOMLSParser</code>.
90     * @see createLSParser(const DOMImplementationLSMode mode, const XMLCh* const schemaType)
91     * @since DOM Level 3
92     *
93     */
94    enum DOMImplementationLSMode
95    {
96        MODE_SYNCHRONOUS = 1,
97        MODE_ASYNCHRONOUS = 2
98    };
99    //@}
100
101    // -----------------------------------------------------------------------
102    // Virtual DOMImplementationLS interface
103    // -----------------------------------------------------------------------
104    /** @name Functions introduced in DOM Level 3 */
105    //@{
106    // -----------------------------------------------------------------------
107    //  Factory create methods
108    // -----------------------------------------------------------------------
109    /**
110     * Create a new DOMLSParser. The newly constructed parser may then be configured
111     * by means of its DOMConfiguration object, and used to parse documents by
112     * means of its parse method.
113     *
114     * @param mode      The mode argument is either <code>MODE_SYNCHRONOUS</code>
115     * or <code>MODE_ASYNCHRONOUS</code>, if mode is <code>MODE_SYNCHRONOUS</code>
116     * then the <code>DOMLSParser</code> that is created will operate in synchronous
117     * mode, if it's <code>MODE_ASYNCHRONOUS</code> then the <code>DOMLSParser</code>
118     * that is created will operate in asynchronous mode.
119     * @param schemaType An absolute URI representing the type of the schema
120     * language used during the load of a <code>DOMDocument</code> using the newly
121     * created <code>DOMLSParser</code>. Note that no lexical checking is done on
122     * the absolute URI. In order to create a <code>DOMLSParser</code> for any kind
123     * of schema types (i.e. the <code>DOMLSParser</code> will be free to use any
124     * schema found), use the value <code>NULL</code>.
125     * <b>Note</b>: For W3C XML Schema [XML Schema Part 1], applications must use
126     * the value "http://www.w3.org/2001/XMLSchema". For XML DTD [XML 1.0],
127     * applications must use the value "http://www.w3.org/TR/REC-xml".
128     * Other Schema languages are outside the scope of the W3C and therefore should
129     * recommend an absolute URI in order to use this method.
130     * @param manager    Pointer to the memory manager to be used to allocate objects.
131     * @param gramPool   The collection of cached grammars.
132     * @return The newly created <code>DOMLSParser</code> object. This
133     * <code>DOMLSParser</code> is either synchronous or asynchronous depending
134     * on the value of the <code>mode</code> argument.
135     * @exception DOMException NOT_SUPPORTED_ERR: Raised if the requested mode
136     * or schema type is not supported.
137     *
138     * @see DOMLSParser
139     * @since DOM Level 3
140     */
141    virtual DOMLSParser* createLSParser(const DOMImplementationLSMode mode,
142                                        const XMLCh* const     schemaType,
143                                        MemoryManager* const   manager = XMLPlatformUtils::fgMemoryManager,
144                                        XMLGrammarPool*  const gramPool = 0) = 0;
145
146
147    /**
148     * Create a new DOMLSSerializer. DOMLSSerializer is used to serialize a DOM tree
149     * back into an XML document.
150     *
151     * @return The newly created <code>DOMLSSerializer</code> object.
152     *
153     * @see DOMLSSerializer
154     * @since DOM Level 3
155     */
156    virtual DOMLSSerializer* createLSSerializer(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) = 0;
157
158    /**
159     * Create a new "empty" DOMLSInput.
160     *
161     * @return The newly created <code>DOMLSInput</code> object.
162     *
163     * @see DOMLSInput
164     * @since DOM Level 3
165     */
166    virtual DOMLSInput* createLSInput(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) = 0;
167
168    /**
169     * Create a new "empty" LSOutput.
170     *
171     * @return The newly created <code>LSOutput</code> object.
172     *
173     * @see LSOutput
174     * @since DOM Level 3
175     */
176    virtual DOMLSOutput* createLSOutput(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) = 0;
177    //@}
178};
179
180
181XERCES_CPP_NAMESPACE_END
182
183#endif
Note: See TracBrowser for help on using the repository browser.