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

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

xerces added

Line 
1#ifndef DOMImplementationRegistry_HEADER_GUARD_
2#define DOMImplementationRegistry_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 * $Id: DOMImplementationRegistry.hpp,v 1.6 2004/09/08 13:55:39 peiyongz Exp $
22 */
23
24/**
25  * This class holds the list of registered DOMImplementations.  Implementation
26  * or application can register DOMImplementationSource to the registry, and
27  * then can query DOMImplementation based on a list of requested features.
28  *
29  * <p>This provides an application with an implementation independent starting
30  * point.
31  *
32  * @see DOMImplementation
33  * @see DOMImplementationSource
34  * @since DOM Level 3
35  */
36
37#include <xercesc/util/XercesDefs.hpp>
38
39XERCES_CPP_NAMESPACE_BEGIN
40
41
42class DOMImplementation;
43class DOMImplementationSource;
44
45class CDOM_EXPORT DOMImplementationRegistry
46{
47public:
48    // -----------------------------------------------------------------------
49    //  Static DOMImplementationRegistry interface
50    // -----------------------------------------------------------------------
51    /** @name Functions introduced in DOM Level 3 */
52    //@{
53    /**
54     * Return the first registered implementation that has the desired features,
55     * or null if none is found.
56     *
57     * <p><b>"Experimental - subject to change"</b></p>
58     *
59     * @param features A string that specifies which features are required.
60     *                 This is a space separated list in which each feature is
61     *                 specified by its name optionally followed by a space
62     *                 and a version number.
63     *                 This is something like: "XML 1.0 Traversal 2.0"
64     * @return An implementation that has the desired features, or
65     *   <code>null</code> if this source has none.
66     * @since DOM Level 3
67     */
68    static DOMImplementation* getDOMImplementation(const XMLCh* features);
69
70    /**
71     * Register an implementation.
72     *
73     * <p><b>"Experimental - subject to change"</b></p>
74     *
75     * @param source   A DOMImplementation Source object to be added to the registry.
76     *                 The registry does NOT adopt the source object.  Users still own it.
77     * @since DOM Level 3
78     */
79    static void addSource(DOMImplementationSource* source);
80    //@}
81
82private:
83    DOMImplementationRegistry();
84};
85
86XERCES_CPP_NAMESPACE_END
87
88#endif
Note: See TracBrowser for help on using the repository browser.