1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  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,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef DOM_DOMIMPLEMENTATION_HXX
25 #define DOM_DOMIMPLEMENTATION_HXX
26 
27 #include <sal/types.h>
28 
29 #include <com/sun/star/uno/Reference.h>
30 #include <com/sun/star/xml/dom/XDocument.hpp>
31 #include <com/sun/star/xml/dom/XDocumentType.hpp>
32 #include <com/sun/star/xml/dom/XDOMImplementation.hpp>
33 
34 #include <cppuhelper/implbase1.hxx>
35 
36 
37 using ::rtl::OUString;
38 using namespace com::sun::star::uno;
39 using namespace com::sun::star::xml::dom;
40 
41 namespace DOM
42 {
43     class CDOMImplementation
44         : public cppu::WeakImplHelper1< XDOMImplementation >
45     {
46 
47     public:
48         static CDOMImplementation* get();
49 
50         // there is just 1 static instance, so these must not delete it!
51         virtual void SAL_CALL acquire() throw ();
52         virtual void SAL_CALL release() throw ();
53 
54         /**
55         Creates a DOM Document object of the specified type with its document element.
56         */
57         virtual Reference <XDocument > SAL_CALL createDocument(const OUString& namespaceURI, const OUString& qualifiedName, const Reference< XDocumentType >& doctype)
58             throw (RuntimeException);
59 
60         /**
61         Creates an empty DocumentType node.
62         */
63         virtual Reference< XDocumentType > SAL_CALL createDocumentType(const OUString& qualifiedName, const OUString& publicId, const OUString& systemId)
64             throw (RuntimeException);
65 
66         /**
67         Test if the DOM implementation implements a specific feature.
68         */
69         virtual sal_Bool SAL_CALL hasFeature(const OUString& feature, const OUString& ver)
70             throw (RuntimeException);
71         };
72 }
73 #endif
74