secureswitools/swisistools/source/xmlparser/xerces/include/xercesc/dom/DOMImplementationLS.hpp
changeset 0 ba25891c3a9e
child 1 c42dffbd5b4f
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 #ifndef DOMImplementationLS_HEADER_GUARD_
       
    18 #define DOMImplementationLS_HEADER_GUARD_
       
    19 
       
    20 /*
       
    21  * Licensed to the Apache Software Foundation (ASF) under one or more
       
    22  * contributor license agreements.  See the NOTICE file distributed with
       
    23  * this work for additional information regarding copyright ownership.
       
    24  * The ASF licenses this file to You under the Apache License, Version 2.0
       
    25  * (the "License"); you may not use this file except in compliance with
       
    26  * the License.  You may obtain a copy of the License at
       
    27  * 
       
    28  *      http://www.apache.org/licenses/LICENSE-2.0
       
    29  * 
       
    30  * Unless required by applicable law or agreed to in writing, software
       
    31  * distributed under the License is distributed on an "AS IS" BASIS,
       
    32  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       
    33  * See the License for the specific language governing permissions and
       
    34  * limitations under the License.
       
    35  */
       
    36 
       
    37 /*
       
    38  * $Id: DOMImplementationLS.hpp 568078 2007-08-21 11:43:25Z amassari $
       
    39  */
       
    40 
       
    41 
       
    42 #include <xercesc/util/PlatformUtils.hpp>
       
    43 
       
    44 XERCES_CPP_NAMESPACE_BEGIN
       
    45 
       
    46 
       
    47 class DOMBuilder;
       
    48 class DOMWriter;
       
    49 class DOMInputSource;
       
    50 class MemoryManager;
       
    51 class XMLGrammarPool;
       
    52 
       
    53 /**
       
    54   * <p><code>DOMImplementationLS</code> contains the factory methods for
       
    55   * creating objects that implement the <code>DOMBuilder</code> (parser) and
       
    56   * <code>DOMWriter</code> (serializer) interfaces.</p>
       
    57   *
       
    58   * <p>An object that implements DOMImplementationLS is obtained by doing a
       
    59   * binding specific cast from DOMImplementation to DOMImplementationLS.
       
    60   * Implementations supporting the Load and Save feature must implement the
       
    61   * DOMImplementationLS interface on whatever object implements the
       
    62   * DOMImplementation interface.</p>
       
    63   *
       
    64   * @since DOM Level 3
       
    65   */
       
    66 class CDOM_EXPORT DOMImplementationLS
       
    67 {
       
    68 protected:
       
    69     // -----------------------------------------------------------------------
       
    70     //  Hidden constructors
       
    71     // -----------------------------------------------------------------------
       
    72     /** @name Hidden constructors */
       
    73     //@{    
       
    74     DOMImplementationLS() {};
       
    75     //@}
       
    76 
       
    77 private:
       
    78     // -----------------------------------------------------------------------
       
    79     // Unimplemented constructors and operators
       
    80     // -----------------------------------------------------------------------
       
    81     /** @name Unimplemented constructors and operators */
       
    82     //@{
       
    83     DOMImplementationLS(const DOMImplementationLS &);
       
    84     DOMImplementationLS & operator = (const DOMImplementationLS &);
       
    85     //@}
       
    86 
       
    87 public:
       
    88     // -----------------------------------------------------------------------
       
    89     //  All constructors are hidden, just the destructor is available
       
    90     // -----------------------------------------------------------------------
       
    91     /** @name Destructor */
       
    92     //@{
       
    93     /**
       
    94      * Destructor
       
    95      *
       
    96      */
       
    97     virtual ~DOMImplementationLS() {};
       
    98     //@}
       
    99 
       
   100     // -----------------------------------------------------------------------
       
   101     //  Public constants
       
   102     // -----------------------------------------------------------------------
       
   103     /** @name Public constants */
       
   104     //@{
       
   105     /**
       
   106      * Create a synchronous or an asynchronous <code>DOMBuilder</code>.
       
   107      * @see createDOMBuilder(const short mode, const XMLCh* const schemaType)
       
   108      * @since DOM Level 3
       
   109      *
       
   110      */
       
   111     enum
       
   112     {
       
   113         MODE_SYNCHRONOUS = 1,
       
   114         MODE_ASYNCHRONOUS = 2
       
   115     };
       
   116     //@}
       
   117 
       
   118     // -----------------------------------------------------------------------
       
   119     // Virtual DOMImplementation LS interface
       
   120     // -----------------------------------------------------------------------
       
   121     /** @name Functions introduced in DOM Level 3 */
       
   122     //@{
       
   123     // -----------------------------------------------------------------------
       
   124     //  Factory create methods
       
   125     // -----------------------------------------------------------------------
       
   126     /**
       
   127      * Create a new DOMBuilder. The newly constructed parser may then be
       
   128      * configured by means of its setFeature method, and used to parse
       
   129      * documents by means of its parse method.
       
   130      *
       
   131      * <p><b>"Experimental - subject to change"</b></p>
       
   132      *
       
   133      * @param mode The mode argument is either <code>MODE_SYNCHRONOUS</code> or
       
   134      * <code>MODE_ASYNCHRONOUS</code>, if mode is <code>MODE_SYNCHRONOUS</code>
       
   135      * then the <code>DOMBuilder</code> that is created will operate in
       
   136      * synchronous mode, if it's <code>MODE_ASYNCHRONOUS</code> then the
       
   137      * <code>DOMBuilder</code> that is created will operate in asynchronous
       
   138      * mode.
       
   139      * @param schemaType An absolute URI representing the type of the schema
       
   140      * language used during the load of a DOMDocument using the newly created
       
   141      * <code>DOMBuilder</code>. Note that no lexical checking is done on the
       
   142      * absolute URI. In order to create a DOMBuilder for any kind of schema
       
   143      * types (i.e. the DOMBuilder will be free to use any schema found), use
       
   144      * the value <code>null</code>.
       
   145      * @param manager    Pointer to the memory manager to be used to
       
   146      *                   allocate objects.
       
   147      * @param gramPool   The collection of cached grammers.
       
   148      * @return The newly created <code>DOMBuilder</code> object. This
       
   149      * <code>DOMBuilder</code> is either synchronous or asynchronous depending
       
   150      * on the value of the <code>mode</code> argument.
       
   151      * @exception DOMException NOT_SUPPORTED_ERR: Raised if the requested mode
       
   152      * or schema type is not supported.
       
   153      *
       
   154      * @see DOMBuilder
       
   155      * @since DOM Level 3
       
   156      */
       
   157     virtual DOMBuilder* createDOMBuilder(const short            mode,
       
   158                                          const XMLCh* const     schemaType,
       
   159                                          MemoryManager* const   manager = XMLPlatformUtils::fgMemoryManager,
       
   160                                          XMLGrammarPool*  const gramPool = 0) = 0;
       
   161 
       
   162 
       
   163     /**
       
   164      * Create a new DOMWriter. DOMWriters are used to serialize a DOM tree
       
   165      * back into an XML document.
       
   166      *
       
   167      * <p><b>"Experimental - subject to change"</b></p>
       
   168      *
       
   169      * @return The newly created <code>DOMWriter</code> object.
       
   170      *
       
   171      * @see DOMWriter
       
   172      * @since DOM Level 3
       
   173      */
       
   174     virtual DOMWriter* createDOMWriter(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) = 0;
       
   175 
       
   176     /**
       
   177      * Create a new "empty" DOMInputSource.
       
   178      *
       
   179      * <p><b>"Experimental - subject to change"</b></p>
       
   180      *
       
   181      * @return The newly created <code>DOMInputSource</code> object.
       
   182      * @exception DOMException NOT_SUPPORTED_ERR: Raised if this function is not
       
   183      * supported by implementation
       
   184      *
       
   185      * @see DOMInputSource
       
   186      * @since DOM Level 3
       
   187      */
       
   188     virtual DOMInputSource* createDOMInputSource() = 0;
       
   189 
       
   190     //@}
       
   191 };
       
   192 
       
   193 
       
   194 XERCES_CPP_NAMESPACE_END
       
   195 
       
   196 #endif