[188] | 1 | #ifndef DOMImplementationLS_HEADER_GUARD_
|
---|
| 2 | #define DOMImplementationLS_HEADER_GUARD_
|
---|
| 3 |
|
---|
| 4 | /*
|
---|
| 5 | * The Apache Software License, Version 1.1
|
---|
| 6 | *
|
---|
| 7 | * Copyright (c) 2002 The Apache Software Foundation. All rights
|
---|
| 8 | * reserved.
|
---|
| 9 | *
|
---|
| 10 | * Redistribution and use in source and binary forms, with or without
|
---|
| 11 | * modification, are permitted provided that the following conditions
|
---|
| 12 | * are met:
|
---|
| 13 | *
|
---|
| 14 | * 1. Redistributions of source code must retain the above copyright
|
---|
| 15 | * notice, this list of conditions and the following disclaimer.
|
---|
| 16 | *
|
---|
| 17 | * 2. Redistributions in binary form must reproduce the above copyright
|
---|
| 18 | * notice, this list of conditions and the following disclaimer in
|
---|
| 19 | * the documentation and/or other materials provided with the
|
---|
| 20 | * distribution.
|
---|
| 21 | *
|
---|
| 22 | * 3. The end-user documentation included with the redistribution,
|
---|
| 23 | * if any, must include the following acknowledgment:
|
---|
| 24 | * "This product includes software developed by the
|
---|
| 25 | * Apache Software Foundation (http://www.apache.org/)."
|
---|
| 26 | * Alternately, this acknowledgment may appear in the software itself,
|
---|
| 27 | * if and wherever such third-party acknowledgments normally appear.
|
---|
| 28 | *
|
---|
| 29 | * 4. The names "Xerces" and "Apache Software Foundation" must
|
---|
| 30 | * not be used to endorse or promote products derived from this
|
---|
| 31 | * software without prior written permission. For written
|
---|
| 32 | * permission, please contact apache\@apache.org.
|
---|
| 33 | *
|
---|
| 34 | * 5. Products derived from this software may not be called "Apache",
|
---|
| 35 | * nor may "Apache" appear in their name, without prior written
|
---|
| 36 | * permission of the Apache Software Foundation.
|
---|
| 37 | *
|
---|
| 38 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
---|
| 39 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
---|
| 40 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
---|
| 41 | * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
|
---|
| 42 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
---|
| 43 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
---|
| 44 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
---|
| 45 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
---|
| 46 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
---|
| 47 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
---|
| 48 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
---|
| 49 | * SUCH DAMAGE.
|
---|
| 50 | * ====================================================================
|
---|
| 51 | *
|
---|
| 52 | * This software consists of voluntary contributions made by many
|
---|
| 53 | * individuals on behalf of the Apache Software Foundation, and was
|
---|
| 54 | * originally based on software copyright (c) 1999, International
|
---|
| 55 | * Business Machines, Inc., http://www.ibm.com . For more information
|
---|
| 56 | * on the Apache Software Foundation, please see
|
---|
| 57 | * <http://www.apache.org/>.
|
---|
| 58 | */
|
---|
| 59 |
|
---|
| 60 | /*
|
---|
| 61 | * $Log: DOMImplementationLS.hpp,v $
|
---|
| 62 | * Revision 1.10 2003/12/01 23:23:25 neilg
|
---|
| 63 | * fix for bug 25118; thanks to Jeroen Witmond
|
---|
| 64 | *
|
---|
| 65 | * Revision 1.9 2003/06/20 18:47:21 peiyongz
|
---|
| 66 | * Stateless Grammar Pool :: Part I
|
---|
| 67 | *
|
---|
| 68 | * Revision 1.8 2003/05/15 18:25:53 knoaman
|
---|
| 69 | * Partial implementation of the configurable memory manager.
|
---|
| 70 | *
|
---|
| 71 | * Revision 1.7 2003/03/07 19:59:05 tng
|
---|
| 72 | * [Bug 11692] Unimplement the hidden constructors and assignment operator to remove warnings from gcc.
|
---|
| 73 | *
|
---|
| 74 | * Revision 1.6 2002/11/04 15:09:24 tng
|
---|
| 75 | * C++ Namespace Support.
|
---|
| 76 | *
|
---|
| 77 | * Revision 1.5 2002/08/22 15:04:57 tng
|
---|
| 78 | * Remove unused parameter variables in inline functions.
|
---|
| 79 | *
|
---|
| 80 | * Revision 1.4 2002/06/06 20:53:06 tng
|
---|
| 81 | * Documentation Fix: Update the API Documentation for DOM headers
|
---|
| 82 | *
|
---|
| 83 | * Revision 1.3 2002/05/30 19:24:48 knoaman
|
---|
| 84 | * documentation update
|
---|
| 85 | *
|
---|
| 86 | * Revision 1.2 2002/05/30 16:39:06 knoaman
|
---|
| 87 | * DOM L3 LS.
|
---|
| 88 | *
|
---|
| 89 | * Revision 1.1 2002/05/29 21:28:02 knoaman
|
---|
| 90 | * DOM L3 LS: DOMInputSource, DOMEntityResolver, DOMImplementationLS and DOMBuilder
|
---|
| 91 | *
|
---|
| 92 | */
|
---|
| 93 |
|
---|
| 94 |
|
---|
| 95 | #include <xercesc/util/PlatformUtils.hpp>
|
---|
| 96 |
|
---|
| 97 | XERCES_CPP_NAMESPACE_BEGIN
|
---|
| 98 |
|
---|
| 99 |
|
---|
| 100 | class DOMBuilder;
|
---|
| 101 | class DOMWriter;
|
---|
| 102 | class DOMInputSource;
|
---|
| 103 | class MemoryManager;
|
---|
| 104 | class XMLGrammarPool;
|
---|
| 105 |
|
---|
| 106 | /**
|
---|
| 107 | * <p><code>DOMImplementationLS</code> contains the factory methods for
|
---|
| 108 | * creating objects that implement the <code>DOMBuilder</code> (parser) and
|
---|
| 109 | * <code>DOMWriter</code> (serializer) interfaces.</p>
|
---|
| 110 | *
|
---|
| 111 | * <p>An object that implements DOMImplementationLS is obtained by doing a
|
---|
| 112 | * binding specific cast from DOMImplementation to DOMImplementationLS.
|
---|
| 113 | * Implementations supporting the Load and Save feature must implement the
|
---|
| 114 | * DOMImplementationLS interface on whatever object implements the
|
---|
| 115 | * DOMImplementation interface.</p>
|
---|
| 116 | *
|
---|
| 117 | * @since DOM Level 3
|
---|
| 118 | */
|
---|
| 119 | class CDOM_EXPORT DOMImplementationLS
|
---|
| 120 | {
|
---|
| 121 | protected:
|
---|
| 122 | // -----------------------------------------------------------------------
|
---|
| 123 | // Hidden constructors
|
---|
| 124 | // -----------------------------------------------------------------------
|
---|
| 125 | /** @name Hidden constructors */
|
---|
| 126 | //@{
|
---|
| 127 | DOMImplementationLS() {};
|
---|
| 128 | //@}
|
---|
| 129 |
|
---|
| 130 | private:
|
---|
| 131 | // -----------------------------------------------------------------------
|
---|
| 132 | // Unimplemented constructors and operators
|
---|
| 133 | // -----------------------------------------------------------------------
|
---|
| 134 | /** @name Unimplemented constructors and operators */
|
---|
| 135 | //@{
|
---|
| 136 | DOMImplementationLS(const DOMImplementationLS &);
|
---|
| 137 | DOMImplementationLS & operator = (const DOMImplementationLS &);
|
---|
| 138 | //@}
|
---|
| 139 |
|
---|
| 140 | public:
|
---|
| 141 | // -----------------------------------------------------------------------
|
---|
| 142 | // All constructors are hidden, just the destructor is available
|
---|
| 143 | // -----------------------------------------------------------------------
|
---|
| 144 | /** @name Destructor */
|
---|
| 145 | //@{
|
---|
| 146 | /**
|
---|
| 147 | * Destructor
|
---|
| 148 | *
|
---|
| 149 | */
|
---|
| 150 | virtual ~DOMImplementationLS() {};
|
---|
| 151 | //@}
|
---|
| 152 |
|
---|
| 153 | // -----------------------------------------------------------------------
|
---|
| 154 | // Public constants
|
---|
| 155 | // -----------------------------------------------------------------------
|
---|
| 156 | /** @name Public constants */
|
---|
| 157 | //@{
|
---|
| 158 | /**
|
---|
| 159 | * Create a synchronous or an asynchronous <code>DOMBuilder</code>.
|
---|
| 160 | * @see createDOMBuilder(const short mode, const XMLCh* const schemaType)
|
---|
| 161 | * @since DOM Level 3
|
---|
| 162 | *
|
---|
| 163 | */
|
---|
| 164 | enum
|
---|
| 165 | {
|
---|
| 166 | MODE_SYNCHRONOUS = 1,
|
---|
| 167 | MODE_ASYNCHRONOUS = 2
|
---|
| 168 | };
|
---|
| 169 | //@}
|
---|
| 170 |
|
---|
| 171 | // -----------------------------------------------------------------------
|
---|
| 172 | // Virtual DOMImplementation LS interface
|
---|
| 173 | // -----------------------------------------------------------------------
|
---|
| 174 | /** @name Functions introduced in DOM Level 3 */
|
---|
| 175 | //@{
|
---|
| 176 | // -----------------------------------------------------------------------
|
---|
| 177 | // Factory create methods
|
---|
| 178 | // -----------------------------------------------------------------------
|
---|
| 179 | /**
|
---|
| 180 | * Create a new DOMBuilder. The newly constructed parser may then be
|
---|
| 181 | * configured by means of its setFeature method, and used to parse
|
---|
| 182 | * documents by means of its parse method.
|
---|
| 183 | *
|
---|
| 184 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
| 185 | *
|
---|
| 186 | * @param mode The mode argument is either <code>MODE_SYNCHRONOUS</code> or
|
---|
| 187 | * <code>MODE_ASYNCHRONOUS</code>, if mode is <code>MODE_SYNCHRONOUS</code>
|
---|
| 188 | * then the <code>DOMBuilder</code> that is created will operate in
|
---|
| 189 | * synchronous mode, if it's <code>MODE_ASYNCHRONOUS</code> then the
|
---|
| 190 | * <code>DOMBuilder</code> that is created will operate in asynchronous
|
---|
| 191 | * mode.
|
---|
| 192 | * @param schemaType An absolute URI representing the type of the schema
|
---|
| 193 | * language used during the load of a DOMDocument using the newly created
|
---|
| 194 | * <code>DOMBuilder</code>. Note that no lexical checking is done on the
|
---|
| 195 | * absolute URI. In order to create a DOMBuilder for any kind of schema
|
---|
| 196 | * types (i.e. the DOMBuilder will be free to use any schema found), use
|
---|
| 197 | * the value <code>null</code>.
|
---|
| 198 | * @param manager Pointer to the memory manager to be used to
|
---|
| 199 | * allocate objects.
|
---|
| 200 | * @param gramPool The collection of cached grammers.
|
---|
| 201 | * @return The newly created <code>DOMBuilder<code> object. This
|
---|
| 202 | * <code>DOMBuilder</code> is either synchronous or asynchronous depending
|
---|
| 203 | * on the value of the <code>mode<code> argument.
|
---|
| 204 | * @exception DOMException NOT_SUPPORTED_ERR: Raised if the requested mode
|
---|
| 205 | * or schema type is not supported.
|
---|
| 206 | *
|
---|
| 207 | * @see DOMBuilder
|
---|
| 208 | * @since DOM Level 3
|
---|
| 209 | */
|
---|
| 210 | virtual DOMBuilder* createDOMBuilder(const short mode,
|
---|
| 211 | const XMLCh* const schemaType,
|
---|
| 212 | MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager,
|
---|
| 213 | XMLGrammarPool* const gramPool = 0) = 0;
|
---|
| 214 |
|
---|
| 215 |
|
---|
| 216 | /**
|
---|
| 217 | * Create a new DOMWriter. DOMWriters are used to serialize a DOM tree
|
---|
| 218 | * back into an XML document.
|
---|
| 219 | *
|
---|
| 220 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
| 221 | *
|
---|
| 222 | * @return The newly created <code>DOMWriter<code> object.
|
---|
| 223 | *
|
---|
| 224 | * @see DOMWriter
|
---|
| 225 | * @since DOM Level 3
|
---|
| 226 | */
|
---|
| 227 | virtual DOMWriter* createDOMWriter(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) = 0;
|
---|
| 228 |
|
---|
| 229 | /**
|
---|
| 230 | * Create a new "empty" DOMInputSource.
|
---|
| 231 | *
|
---|
| 232 | * <p><b>"Experimental - subject to change"</b></p>
|
---|
| 233 | *
|
---|
| 234 | * @return The newly created <code>DOMInputSource<code> object.
|
---|
| 235 | * @exception DOMException NOT_SUPPORTED_ERR: Raised if this function is not
|
---|
| 236 | * supported by implementation
|
---|
| 237 | *
|
---|
| 238 | * @see DOMInputSource
|
---|
| 239 | * @since DOM Level 3
|
---|
| 240 | */
|
---|
| 241 | virtual DOMInputSource* createDOMInputSource() = 0;
|
---|
| 242 |
|
---|
| 243 | //@}
|
---|
| 244 | };
|
---|
| 245 |
|
---|
| 246 |
|
---|
| 247 | XERCES_CPP_NAMESPACE_END
|
---|
| 248 |
|
---|
| 249 | #endif
|
---|