khtml Library API Documentation

dom_xml.cpp

00001 
00025 #include "dom/dom_xml.h"
00026 #include "dom/dom_exception.h"
00027 #include "xml/dom_textimpl.h"
00028 #include "xml/dom_xmlimpl.h"
00029 
00030 using namespace DOM;
00031 
00032 CDATASection::CDATASection()
00033 {
00034 }
00035 
00036 CDATASection::CDATASection(const CDATASection &) : Text()
00037 {
00038 }
00039 
00040 CDATASection &CDATASection::operator = (const Node &other)
00041 {
00042     NodeImpl* ohandle = other.handle();
00043     if ( impl != ohandle ) {
00044         if (!ohandle || ohandle->nodeType() != CDATA_SECTION_NODE) {
00045         if ( impl ) impl->deref();
00046             impl = 0;
00047     } else {
00048             Node::operator =(other);
00049     }
00050     }
00051     return *this;
00052 }
00053 
00054 CDATASection &CDATASection::operator = (const CDATASection &other)
00055 {
00056     Node::operator =(other);
00057     return *this;
00058 }
00059 
00060 CDATASection::~CDATASection()
00061 {
00062 }
00063 
00064 CDATASection::CDATASection(CDATASectionImpl *i) : Text(i)
00065 {
00066 }
00067 
00068 // ----------------------------------------------------------------------------
00069 Entity::Entity()
00070 {
00071 }
00072 
00073 Entity::Entity(const Entity &) : Node()
00074 {
00075 }
00076 
00077 Entity &Entity::operator = (const Node &other)
00078 {
00079     NodeImpl* ohandle = other.handle();
00080     if ( impl != ohandle ) {
00081         if (!ohandle || ohandle->nodeType() != ENTITY_NODE) {
00082         if ( impl ) impl->deref();
00083             impl = 0;
00084     } else {
00085             Node::operator =(other);
00086     }
00087     }
00088     return *this;
00089 }
00090 
00091 Entity &Entity::operator = (const Entity &other)
00092 {
00093     Node::operator =(other);
00094     return *this;
00095 }
00096 
00097 Entity::~Entity()
00098 {
00099 }
00100 
00101 DOMString Entity::publicId() const
00102 {
00103     if (!impl)
00104     return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
00105 
00106     return ((EntityImpl*)impl)->publicId();
00107 }
00108 
00109 DOMString Entity::systemId() const
00110 {
00111     if (!impl)
00112     return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
00113 
00114     return ((EntityImpl*)impl)->systemId();
00115 }
00116 
00117 DOMString Entity::notationName() const
00118 {
00119     if (!impl)
00120     return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
00121 
00122     return ((EntityImpl*)impl)->notationName();
00123 }
00124 
00125 Entity::Entity(EntityImpl *i) : Node(i)
00126 {
00127 }
00128 
00129 // ----------------------------------------------------------------------------
00130 
00131 EntityReference::EntityReference()
00132 {
00133 }
00134 
00135 EntityReference::EntityReference(const EntityReference &) : Node()
00136 {
00137 }
00138 
00139 EntityReference &EntityReference::operator = (const Node &other)
00140 {
00141     NodeImpl* ohandle = other.handle();
00142     if ( impl != ohandle ) {
00143         if (!ohandle || ohandle->nodeType() != ENTITY_REFERENCE_NODE) {
00144         if ( impl ) impl->deref();
00145             impl = 0;
00146     } else {
00147             Node::operator =(other);
00148     }
00149     }
00150     return *this;
00151 }
00152 
00153 EntityReference &EntityReference::operator = (const EntityReference &other)
00154 {
00155     Node::operator =(other);
00156     return *this;
00157 }
00158 
00159 EntityReference::~EntityReference()
00160 {
00161 }
00162 
00163 EntityReference::EntityReference(EntityReferenceImpl *i) : Node(i)
00164 {
00165 }
00166 
00167 // ----------------------------------------------------------------------------
00168 
00169 Notation::Notation()
00170 {
00171 }
00172 
00173 Notation::Notation(const Notation &) : Node()
00174 {
00175 }
00176 
00177 Notation &Notation::operator = (const Node &other)
00178 {
00179     NodeImpl* ohandle = other.handle();
00180     if ( impl != ohandle ) {
00181         if (!ohandle || ohandle->nodeType() != NOTATION_NODE) {
00182         if ( impl ) impl->deref();
00183             impl = 0;
00184     } else {
00185             Node::operator =(other);
00186     }
00187     }
00188     return *this;
00189 }
00190 
00191 Notation &Notation::operator = (const Notation &other)
00192 {
00193     Node::operator =(other);
00194     return *this;
00195 }
00196 
00197 Notation::~Notation()
00198 {
00199 }
00200 
00201 DOMString Notation::publicId() const
00202 {
00203     if (!impl)
00204     return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
00205 
00206     return ((NotationImpl*)impl)->publicId();
00207 }
00208 
00209 DOMString Notation::systemId() const
00210 {
00211     if (!impl)
00212     return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
00213 
00214     return ((NotationImpl*)impl)->systemId();
00215 }
00216 
00217 Notation::Notation(NotationImpl *i) : Node(i)
00218 {
00219 }
00220 
00221 
00222 // ----------------------------------------------------------------------------
00223 
00224 ProcessingInstruction::ProcessingInstruction()
00225 {
00226 }
00227 
00228 ProcessingInstruction::ProcessingInstruction(const ProcessingInstruction &)
00229     : Node()
00230 {
00231 }
00232 
00233 ProcessingInstruction &ProcessingInstruction::operator = (const Node &other)
00234 {
00235     NodeImpl* ohandle = other.handle();
00236     if ( impl != ohandle ) {
00237         if (!ohandle || ohandle->nodeType() != PROCESSING_INSTRUCTION_NODE) {
00238         if ( impl ) impl->deref();
00239             impl = 0;
00240     } else {
00241             Node::operator =(other);
00242     }
00243     }
00244     return *this;
00245 }
00246 
00247 ProcessingInstruction &ProcessingInstruction::operator = (const ProcessingInstruction &other)
00248 {
00249     Node::operator =(other);
00250     return *this;
00251 }
00252 
00253 ProcessingInstruction::~ProcessingInstruction()
00254 {
00255 }
00256 
00257 DOMString ProcessingInstruction::target() const
00258 {
00259     if (!impl)
00260     return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
00261 
00262     return ((ProcessingInstructionImpl*)impl)->target();
00263 }
00264 
00265 DOMString ProcessingInstruction::data() const
00266 {
00267     if (!impl)
00268     return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
00269 
00270     return ((ProcessingInstructionImpl*)impl)->data();
00271 }
00272 
00273 void ProcessingInstruction::setData( const DOMString &_data )
00274 {
00275     if (!impl)
00276     return; // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
00277 
00278     int exceptioncode = 0;
00279     ((ProcessingInstructionImpl*)impl)->setData(_data, exceptioncode);
00280     if (exceptioncode)
00281     throw DOMException(exceptioncode);
00282 }
00283 
00284 ProcessingInstruction::ProcessingInstruction(ProcessingInstructionImpl *i) : Node(i)
00285 {
00286 }
00287 
00288 StyleSheet ProcessingInstruction::sheet() const
00289 {
00290     if (impl) return ((ProcessingInstructionImpl*)impl)->sheet();
00291     return 0;
00292 }
00293 
00294 
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 27 22:16:33 2005 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001