Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:51

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_DOMIMPLEMENTATIONLS_HPP)
0023 #define XERCESC_INCLUDE_GUARD_DOMIMPLEMENTATIONLS_HPP
0024 
0025 #include <xercesc/util/PlatformUtils.hpp>
0026 
0027 XERCES_CPP_NAMESPACE_BEGIN
0028 
0029 
0030 class DOMLSParser;
0031 class DOMLSSerializer;
0032 class DOMLSInput;
0033 class DOMLSOutput;
0034 class MemoryManager;
0035 class XMLGrammarPool;
0036 
0037 /**
0038   * <p><code>DOMImplementationLS</code> contains the factory methods for
0039   * creating Load and Save objects.</p>
0040   *
0041   * <p>An object that implements DOMImplementationLS is obtained by doing a
0042   * binding specific cast from DOMImplementation to DOMImplementationLS.
0043   * Implementations supporting the Load and Save feature must implement the
0044   * DOMImplementationLS interface on whatever object implements the
0045   * DOMImplementation interface.</p>
0046   *
0047   * @since DOM Level 3
0048   */
0049 class CDOM_EXPORT DOMImplementationLS
0050 {
0051 protected:
0052     // -----------------------------------------------------------------------
0053     //  Hidden constructors
0054     // -----------------------------------------------------------------------
0055     /** @name Hidden constructors */
0056     //@{
0057     DOMImplementationLS() {};
0058     //@}
0059 
0060 private:
0061     // -----------------------------------------------------------------------
0062     // Unimplemented constructors and operators
0063     // -----------------------------------------------------------------------
0064     /** @name Unimplemented constructors and operators */
0065     //@{
0066     DOMImplementationLS(const DOMImplementationLS &);
0067     DOMImplementationLS & operator = (const DOMImplementationLS &);
0068     //@}
0069 
0070 public:
0071     // -----------------------------------------------------------------------
0072     //  All constructors are hidden, just the destructor is available
0073     // -----------------------------------------------------------------------
0074     /** @name Destructor */
0075     //@{
0076     /**
0077      * Destructor
0078      *
0079      */
0080     virtual ~DOMImplementationLS() {};
0081     //@}
0082 
0083     // -----------------------------------------------------------------------
0084     //  Public constants
0085     // -----------------------------------------------------------------------
0086     /** @name Public constants */
0087     //@{
0088     /**
0089      * Create a synchronous or an asynchronous <code>DOMLSParser</code>.
0090      * @see createLSParser(const DOMImplementationLSMode mode, const XMLCh* const schemaType)
0091      * @since DOM Level 3
0092      *
0093      */
0094     enum DOMImplementationLSMode
0095     {
0096         MODE_SYNCHRONOUS = 1,
0097         MODE_ASYNCHRONOUS = 2
0098     };
0099     //@}
0100 
0101     // -----------------------------------------------------------------------
0102     // Virtual DOMImplementationLS interface
0103     // -----------------------------------------------------------------------
0104     /** @name Functions introduced in DOM Level 3 */
0105     //@{
0106     // -----------------------------------------------------------------------
0107     //  Factory create methods
0108     // -----------------------------------------------------------------------
0109     /**
0110      * Create a new DOMLSParser. The newly constructed parser may then be configured
0111      * by means of its DOMConfiguration object, and used to parse documents by
0112      * means of its parse method.
0113      *
0114      * @param mode      The mode argument is either <code>MODE_SYNCHRONOUS</code>
0115      * or <code>MODE_ASYNCHRONOUS</code>, if mode is <code>MODE_SYNCHRONOUS</code>
0116      * then the <code>DOMLSParser</code> that is created will operate in synchronous
0117      * mode, if it's <code>MODE_ASYNCHRONOUS</code> then the <code>DOMLSParser</code>
0118      * that is created will operate in asynchronous mode.
0119      * @param schemaType An absolute URI representing the type of the schema
0120      * language used during the load of a <code>DOMDocument</code> using the newly
0121      * created <code>DOMLSParser</code>. Note that no lexical checking is done on
0122      * the absolute URI. In order to create a <code>DOMLSParser</code> for any kind
0123      * of schema types (i.e. the <code>DOMLSParser</code> will be free to use any
0124      * schema found), use the value <code>NULL</code>.
0125      * <b>Note</b>: For W3C XML Schema [XML Schema Part 1], applications must use
0126      * the value "http://www.w3.org/2001/XMLSchema". For XML DTD [XML 1.0],
0127      * applications must use the value "http://www.w3.org/TR/REC-xml".
0128      * Other Schema languages are outside the scope of the W3C and therefore should
0129      * recommend an absolute URI in order to use this method.
0130      * @param manager    Pointer to the memory manager to be used to allocate objects.
0131      * @param gramPool   The collection of cached grammars.
0132      * @return The newly created <code>DOMLSParser</code> object. This
0133      * <code>DOMLSParser</code> is either synchronous or asynchronous depending
0134      * on the value of the <code>mode</code> argument.
0135      * @exception DOMException NOT_SUPPORTED_ERR: Raised if the requested mode
0136      * or schema type is not supported.
0137      *
0138      * @see DOMLSParser
0139      * @since DOM Level 3
0140      */
0141     virtual DOMLSParser* createLSParser(const DOMImplementationLSMode mode,
0142                                         const XMLCh* const     schemaType,
0143                                         MemoryManager* const   manager = XMLPlatformUtils::fgMemoryManager,
0144                                         XMLGrammarPool*  const gramPool = 0) = 0;
0145 
0146 
0147     /**
0148      * Create a new DOMLSSerializer. DOMLSSerializer is used to serialize a DOM tree
0149      * back into an XML document.
0150      *
0151      * @return The newly created <code>DOMLSSerializer</code> object.
0152      *
0153      * @see DOMLSSerializer
0154      * @since DOM Level 3
0155      */
0156     virtual DOMLSSerializer* createLSSerializer(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) = 0;
0157 
0158     /**
0159      * Create a new "empty" DOMLSInput.
0160      *
0161      * @return The newly created <code>DOMLSInput</code> object.
0162      *
0163      * @see DOMLSInput
0164      * @since DOM Level 3
0165      */
0166     virtual DOMLSInput* createLSInput(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) = 0;
0167 
0168     /**
0169      * Create a new "empty" LSOutput.
0170      *
0171      * @return The newly created <code>LSOutput</code> object.
0172      *
0173      * @see LSOutput
0174      * @since DOM Level 3
0175      */
0176     virtual DOMLSOutput* createLSOutput(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) = 0;
0177     //@}
0178 };
0179 
0180 
0181 XERCES_CPP_NAMESPACE_END
0182 
0183 #endif