summaryrefslogtreecommitdiffstats
path: root/tdehtml/dom/dom_xml.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-26 13:17:21 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-26 13:17:21 -0600
commitdfe289850f068f19ba4a83ab4e7e22a7e09c13c9 (patch)
treec297348a55df66c571de4525646e0b9762427353 /tdehtml/dom/dom_xml.cpp
parentb7658a0d5eca24a9d37c6e04f88298ef02389db0 (diff)
downloadtdelibs-dfe289850f068f19ba4a83ab4e7e22a7e09c13c9.tar.gz
tdelibs-dfe289850f068f19ba4a83ab4e7e22a7e09c13c9.zip
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'tdehtml/dom/dom_xml.cpp')
-rw-r--r--tdehtml/dom/dom_xml.cpp293
1 files changed, 293 insertions, 0 deletions
diff --git a/tdehtml/dom/dom_xml.cpp b/tdehtml/dom/dom_xml.cpp
new file mode 100644
index 000000000..524bbe218
--- /dev/null
+++ b/tdehtml/dom/dom_xml.cpp
@@ -0,0 +1,293 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999 Lars Knoll (knoll@kde.org)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+
+#include "dom/dom_xml.h"
+#include "dom/dom_exception.h"
+#include "xml/dom_textimpl.h"
+#include "xml/dom_xmlimpl.h"
+
+using namespace DOM;
+
+CDATASection::CDATASection()
+{
+}
+
+CDATASection::CDATASection(const CDATASection &) : Text()
+{
+}
+
+CDATASection &CDATASection::operator = (const Node &other)
+{
+ NodeImpl* ohandle = other.handle();
+ if ( impl != ohandle ) {
+ if (!ohandle || ohandle->nodeType() != CDATA_SECTION_NODE) {
+ if ( impl ) impl->deref();
+ impl = 0;
+ } else {
+ Node::operator =(other);
+ }
+ }
+ return *this;
+}
+
+CDATASection &CDATASection::operator = (const CDATASection &other)
+{
+ Node::operator =(other);
+ return *this;
+}
+
+CDATASection::~CDATASection()
+{
+}
+
+CDATASection::CDATASection(CDATASectionImpl *i) : Text(i)
+{
+}
+
+// ----------------------------------------------------------------------------
+Entity::Entity()
+{
+}
+
+Entity::Entity(const Entity &) : Node()
+{
+}
+
+Entity &Entity::operator = (const Node &other)
+{
+ NodeImpl* ohandle = other.handle();
+ if ( impl != ohandle ) {
+ if (!ohandle || ohandle->nodeType() != ENTITY_NODE) {
+ if ( impl ) impl->deref();
+ impl = 0;
+ } else {
+ Node::operator =(other);
+ }
+ }
+ return *this;
+}
+
+Entity &Entity::operator = (const Entity &other)
+{
+ Node::operator =(other);
+ return *this;
+}
+
+Entity::~Entity()
+{
+}
+
+DOMString Entity::publicId() const
+{
+ if (!impl)
+ return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
+
+ return ((EntityImpl*)impl)->publicId();
+}
+
+DOMString Entity::systemId() const
+{
+ if (!impl)
+ return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
+
+ return ((EntityImpl*)impl)->systemId();
+}
+
+DOMString Entity::notationName() const
+{
+ if (!impl)
+ return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
+
+ return ((EntityImpl*)impl)->notationName();
+}
+
+Entity::Entity(EntityImpl *i) : Node(i)
+{
+}
+
+// ----------------------------------------------------------------------------
+
+EntityReference::EntityReference()
+{
+}
+
+EntityReference::EntityReference(const EntityReference &) : Node()
+{
+}
+
+EntityReference &EntityReference::operator = (const Node &other)
+{
+ NodeImpl* ohandle = other.handle();
+ if ( impl != ohandle ) {
+ if (!ohandle || ohandle->nodeType() != ENTITY_REFERENCE_NODE) {
+ if ( impl ) impl->deref();
+ impl = 0;
+ } else {
+ Node::operator =(other);
+ }
+ }
+ return *this;
+}
+
+EntityReference &EntityReference::operator = (const EntityReference &other)
+{
+ Node::operator =(other);
+ return *this;
+}
+
+EntityReference::~EntityReference()
+{
+}
+
+EntityReference::EntityReference(EntityReferenceImpl *i) : Node(i)
+{
+}
+
+// ----------------------------------------------------------------------------
+
+Notation::Notation()
+{
+}
+
+Notation::Notation(const Notation &) : Node()
+{
+}
+
+Notation &Notation::operator = (const Node &other)
+{
+ NodeImpl* ohandle = other.handle();
+ if ( impl != ohandle ) {
+ if (!ohandle || ohandle->nodeType() != NOTATION_NODE) {
+ if ( impl ) impl->deref();
+ impl = 0;
+ } else {
+ Node::operator =(other);
+ }
+ }
+ return *this;
+}
+
+Notation &Notation::operator = (const Notation &other)
+{
+ Node::operator =(other);
+ return *this;
+}
+
+Notation::~Notation()
+{
+}
+
+DOMString Notation::publicId() const
+{
+ if (!impl)
+ return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
+
+ return ((NotationImpl*)impl)->publicId();
+}
+
+DOMString Notation::systemId() const
+{
+ if (!impl)
+ return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
+
+ return ((NotationImpl*)impl)->systemId();
+}
+
+Notation::Notation(NotationImpl *i) : Node(i)
+{
+}
+
+
+// ----------------------------------------------------------------------------
+
+ProcessingInstruction::ProcessingInstruction()
+{
+}
+
+ProcessingInstruction::ProcessingInstruction(const ProcessingInstruction &)
+ : Node()
+{
+}
+
+ProcessingInstruction &ProcessingInstruction::operator = (const Node &other)
+{
+ NodeImpl* ohandle = other.handle();
+ if ( impl != ohandle ) {
+ if (!ohandle || ohandle->nodeType() != PROCESSING_INSTRUCTION_NODE) {
+ if ( impl ) impl->deref();
+ impl = 0;
+ } else {
+ Node::operator =(other);
+ }
+ }
+ return *this;
+}
+
+ProcessingInstruction &ProcessingInstruction::operator = (const ProcessingInstruction &other)
+{
+ Node::operator =(other);
+ return *this;
+}
+
+ProcessingInstruction::~ProcessingInstruction()
+{
+}
+
+DOMString ProcessingInstruction::target() const
+{
+ if (!impl)
+ return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
+
+ return ((ProcessingInstructionImpl*)impl)->target();
+}
+
+DOMString ProcessingInstruction::data() const
+{
+ if (!impl)
+ return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
+
+ return ((ProcessingInstructionImpl*)impl)->data();
+}
+
+void ProcessingInstruction::setData( const DOMString &_data )
+{
+ if (!impl)
+ return; // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
+
+ int exceptioncode = 0;
+ ((ProcessingInstructionImpl*)impl)->setData(_data, exceptioncode);
+ if (exceptioncode)
+ throw DOMException(exceptioncode);
+}
+
+ProcessingInstruction::ProcessingInstruction(ProcessingInstructionImpl *i) : Node(i)
+{
+}
+
+StyleSheet ProcessingInstruction::sheet() const
+{
+ if (impl) return ((ProcessingInstructionImpl*)impl)->sheet();
+ return 0;
+}
+
+