source: NonGTP/Xerces/xerces/include/xercesc/dom/DOMImplementationLS.hpp @ 358

Revision 358, 7.7 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
1#ifndef DOMImplementationLS_HEADER_GUARD_
2#define DOMImplementationLS_HEADER_GUARD_
3
4/*
5 * Copyright 2002,2004 The Apache Software Foundation.
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 *      http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19
20/*
21 * $Log: DOMImplementationLS.hpp,v $
22 * Revision 1.12  2004/09/08 13:55:39  peiyongz
23 * Apache License Version 2.0
24 *
25 * Revision 1.11  2004/09/02 19:08:09  cargilld
26 * Fix API Doc warning message
27 *
28 * Revision 1.10  2003/12/01 23:23:25  neilg
29 * fix for bug 25118; thanks to Jeroen Witmond
30 *
31 * Revision 1.9  2003/06/20 18:47:21  peiyongz
32 * Stateless Grammar Pool :: Part I
33 *
34 * Revision 1.8  2003/05/15 18:25:53  knoaman
35 * Partial implementation of the configurable memory manager.
36 *
37 * Revision 1.7  2003/03/07 19:59:05  tng
38 * [Bug 11692] Unimplement the hidden constructors and assignment operator to remove warnings from gcc.
39 *
40 * Revision 1.6  2002/11/04 15:09:24  tng
41 * C++ Namespace Support.
42 *
43 * Revision 1.5  2002/08/22 15:04:57  tng
44 * Remove unused parameter variables in inline functions.
45 *
46 * Revision 1.4  2002/06/06 20:53:06  tng
47 * Documentation Fix: Update the API Documentation for DOM headers
48 *
49 * Revision 1.3  2002/05/30 19:24:48  knoaman
50 * documentation update
51 *
52 * Revision 1.2  2002/05/30 16:39:06  knoaman
53 * DOM L3 LS.
54 *
55 * Revision 1.1  2002/05/29 21:28:02  knoaman
56 * DOM L3 LS: DOMInputSource, DOMEntityResolver, DOMImplementationLS and DOMBuilder
57 *
58 */
59
60
61#include <xercesc/util/PlatformUtils.hpp>
62
63XERCES_CPP_NAMESPACE_BEGIN
64
65
66class DOMBuilder;
67class DOMWriter;
68class DOMInputSource;
69class MemoryManager;
70class XMLGrammarPool;
71
72/**
73  * <p><code>DOMImplementationLS</code> contains the factory methods for
74  * creating objects that implement the <code>DOMBuilder</code> (parser) and
75  * <code>DOMWriter</code> (serializer) interfaces.</p>
76  *
77  * <p>An object that implements DOMImplementationLS is obtained by doing a
78  * binding specific cast from DOMImplementation to DOMImplementationLS.
79  * Implementations supporting the Load and Save feature must implement the
80  * DOMImplementationLS interface on whatever object implements the
81  * DOMImplementation interface.</p>
82  *
83  * @since DOM Level 3
84  */
85class CDOM_EXPORT DOMImplementationLS
86{
87protected:
88    // -----------------------------------------------------------------------
89    //  Hidden constructors
90    // -----------------------------------------------------------------------
91    /** @name Hidden constructors */
92    //@{   
93    DOMImplementationLS() {};
94    //@}
95
96private:
97    // -----------------------------------------------------------------------
98    // Unimplemented constructors and operators
99    // -----------------------------------------------------------------------
100    /** @name Unimplemented constructors and operators */
101    //@{
102    DOMImplementationLS(const DOMImplementationLS &);
103    DOMImplementationLS & operator = (const DOMImplementationLS &);
104    //@}
105
106public:
107    // -----------------------------------------------------------------------
108    //  All constructors are hidden, just the destructor is available
109    // -----------------------------------------------------------------------
110    /** @name Destructor */
111    //@{
112    /**
113     * Destructor
114     *
115     */
116    virtual ~DOMImplementationLS() {};
117    //@}
118
119    // -----------------------------------------------------------------------
120    //  Public constants
121    // -----------------------------------------------------------------------
122    /** @name Public constants */
123    //@{
124    /**
125     * Create a synchronous or an asynchronous <code>DOMBuilder</code>.
126     * @see createDOMBuilder(const short mode, const XMLCh* const schemaType)
127     * @since DOM Level 3
128     *
129     */
130    enum
131    {
132        MODE_SYNCHRONOUS = 1,
133        MODE_ASYNCHRONOUS = 2
134    };
135    //@}
136
137    // -----------------------------------------------------------------------
138    // Virtual DOMImplementation LS interface
139    // -----------------------------------------------------------------------
140    /** @name Functions introduced in DOM Level 3 */
141    //@{
142    // -----------------------------------------------------------------------
143    //  Factory create methods
144    // -----------------------------------------------------------------------
145    /**
146     * Create a new DOMBuilder. The newly constructed parser may then be
147     * configured by means of its setFeature method, and used to parse
148     * documents by means of its parse method.
149     *
150     * <p><b>"Experimental - subject to change"</b></p>
151     *
152     * @param mode The mode argument is either <code>MODE_SYNCHRONOUS</code> or
153     * <code>MODE_ASYNCHRONOUS</code>, if mode is <code>MODE_SYNCHRONOUS</code>
154     * then the <code>DOMBuilder</code> that is created will operate in
155     * synchronous mode, if it's <code>MODE_ASYNCHRONOUS</code> then the
156     * <code>DOMBuilder</code> that is created will operate in asynchronous
157     * mode.
158     * @param schemaType An absolute URI representing the type of the schema
159     * language used during the load of a DOMDocument using the newly created
160     * <code>DOMBuilder</code>. Note that no lexical checking is done on the
161     * absolute URI. In order to create a DOMBuilder for any kind of schema
162     * types (i.e. the DOMBuilder will be free to use any schema found), use
163     * the value <code>null</code>.
164     * @param manager    Pointer to the memory manager to be used to
165     *                   allocate objects.
166     * @param gramPool   The collection of cached grammers.
167     * @return The newly created <code>DOMBuilder</code> object. This
168     * <code>DOMBuilder</code> is either synchronous or asynchronous depending
169     * on the value of the <code>mode</code> argument.
170     * @exception DOMException NOT_SUPPORTED_ERR: Raised if the requested mode
171     * or schema type is not supported.
172     *
173     * @see DOMBuilder
174     * @since DOM Level 3
175     */
176    virtual DOMBuilder* createDOMBuilder(const short            mode,
177                                         const XMLCh* const     schemaType,
178                                         MemoryManager* const   manager = XMLPlatformUtils::fgMemoryManager,
179                                         XMLGrammarPool*  const gramPool = 0) = 0;
180
181
182    /**
183     * Create a new DOMWriter. DOMWriters are used to serialize a DOM tree
184     * back into an XML document.
185     *
186     * <p><b>"Experimental - subject to change"</b></p>
187     *
188     * @return The newly created <code>DOMWriter</code> object.
189     *
190     * @see DOMWriter
191     * @since DOM Level 3
192     */
193    virtual DOMWriter* createDOMWriter(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) = 0;
194
195    /**
196     * Create a new "empty" DOMInputSource.
197     *
198     * <p><b>"Experimental - subject to change"</b></p>
199     *
200     * @return The newly created <code>DOMInputSource</code> object.
201     * @exception DOMException NOT_SUPPORTED_ERR: Raised if this function is not
202     * supported by implementation
203     *
204     * @see DOMInputSource
205     * @since DOM Level 3
206     */
207    virtual DOMInputSource* createDOMInputSource() = 0;
208
209    //@}
210};
211
212
213XERCES_CPP_NAMESPACE_END
214
215#endif
Note: See TracBrowser for help on using the repository browser.