update credits
[LibreOffice.git] / unoxml / source / dom / documenttype.hxx
blob17ca8fb942da50e79eb7e2576138d8b90ce9363b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef DOM_DOCUMENTTYPE_HXX
21 #define DOM_DOCUMENTTYPE_HXX
23 #include <libxml/tree.h>
25 #include <sal/types.h>
27 #include <com/sun/star/uno/Reference.h>
28 #include <com/sun/star/xml/dom/XDocumentType.hpp>
29 #include <com/sun/star/xml/dom/XNodeList.hpp>
30 #include <com/sun/star/xml/dom/XNamedNodeMap.hpp>
32 #include <node.hxx>
35 using namespace com::sun::star::uno;
36 using namespace com::sun::star::xml::dom;
38 namespace DOM
40 typedef ::cppu::ImplInheritanceHelper1< CNode, XDocumentType >
41 CDocumentType_Base;
43 class CDocumentType
44 : public CDocumentType_Base
46 private:
47 friend class CDocument;
49 private:
50 xmlDtdPtr m_aDtdPtr;
52 protected:
53 CDocumentType(CDocument const& rDocument, ::osl::Mutex const& rMutex,
54 xmlDtdPtr const pDtd);
56 public:
57 /**
58 A NamedNodeMap containing the general entities, both external and
59 internal, declared in the DTD.
61 virtual Reference< XNamedNodeMap > SAL_CALL getEntities() throw (RuntimeException);
63 /**
64 The internal subset as a string, or null if there is none.
66 virtual OUString SAL_CALL getInternalSubset() throw (RuntimeException);
68 /**
69 The name of DTD; i.e., the name immediately following the DOCTYPE
70 keyword.
72 virtual OUString SAL_CALL getName() throw (RuntimeException);
74 /**
75 A NamedNodeMap containing the notations declared in the DTD.
77 virtual Reference< XNamedNodeMap > SAL_CALL getNotations() throw (RuntimeException);
79 /**
80 The public identifier of the external subset.
82 virtual OUString SAL_CALL getPublicId() throw (RuntimeException);
84 /**
85 The system identifier of the external subset.
87 virtual OUString SAL_CALL getSystemId() throw (RuntimeException);
89 // ---- resolve uno inheritance problems...
90 // overrides for XNode base
91 virtual OUString SAL_CALL getNodeName()
92 throw (RuntimeException);
93 virtual OUString SAL_CALL getNodeValue()
94 throw (RuntimeException);
95 // --- delegation for XNde base.
96 virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild)
97 throw (RuntimeException, DOMException)
99 return CNode::appendChild(newChild);
101 virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep)
102 throw (RuntimeException)
104 return CNode::cloneNode(deep);
106 virtual Reference< XNamedNodeMap > SAL_CALL getAttributes()
107 throw (RuntimeException)
109 return CNode::getAttributes();
111 virtual Reference< XNodeList > SAL_CALL getChildNodes()
112 throw (RuntimeException)
114 return CNode::getChildNodes();
116 virtual Reference< XNode > SAL_CALL getFirstChild()
117 throw (RuntimeException)
119 return CNode::getFirstChild();
121 virtual Reference< XNode > SAL_CALL getLastChild()
122 throw (RuntimeException)
124 return CNode::getLastChild();
126 virtual OUString SAL_CALL getLocalName()
127 throw (RuntimeException)
129 return CNode::getLocalName();
131 virtual OUString SAL_CALL getNamespaceURI()
132 throw (RuntimeException)
134 return CNode::getNamespaceURI();
136 virtual Reference< XNode > SAL_CALL getNextSibling()
137 throw (RuntimeException)
139 return CNode::getNextSibling();
141 virtual NodeType SAL_CALL getNodeType()
142 throw (RuntimeException)
144 return CNode::getNodeType();
146 virtual Reference< XDocument > SAL_CALL getOwnerDocument()
147 throw (RuntimeException)
149 return CNode::getOwnerDocument();
151 virtual Reference< XNode > SAL_CALL getParentNode()
152 throw (RuntimeException)
154 return CNode::getParentNode();
156 virtual OUString SAL_CALL getPrefix()
157 throw (RuntimeException)
159 return CNode::getPrefix();
161 virtual Reference< XNode > SAL_CALL getPreviousSibling()
162 throw (RuntimeException)
164 return CNode::getPreviousSibling();
166 virtual sal_Bool SAL_CALL hasAttributes()
167 throw (RuntimeException)
169 return CNode::hasAttributes();
171 virtual sal_Bool SAL_CALL hasChildNodes()
172 throw (RuntimeException)
174 return CNode::hasChildNodes();
176 virtual Reference< XNode > SAL_CALL insertBefore(
177 const Reference< XNode >& newChild, const Reference< XNode >& refChild)
178 throw (RuntimeException, DOMException)
180 return CNode::insertBefore(newChild, refChild);
182 virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
183 throw (RuntimeException)
185 return CNode::isSupported(feature, ver);
187 virtual void SAL_CALL normalize()
188 throw (RuntimeException)
190 CNode::normalize();
192 virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild)
193 throw (RuntimeException, DOMException)
195 return CNode::removeChild(oldChild);
197 virtual Reference< XNode > SAL_CALL replaceChild(
198 const Reference< XNode >& newChild, const Reference< XNode >& oldChild)
199 throw (RuntimeException, DOMException)
201 return CNode::replaceChild(newChild, oldChild);
203 virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
204 throw (RuntimeException, DOMException)
206 return CNode::setNodeValue(nodeValue);
208 virtual void SAL_CALL setPrefix(const OUString& prefix)
209 throw (RuntimeException, DOMException)
211 return CNode::setPrefix(prefix);
216 #endif
218 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */