#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();
return ((EntityImpl*)impl)->publicId();
}
DOMString Entity::systemId() const
{
if (!impl)
return DOMString();
return ((EntityImpl*)impl)->systemId();
}
DOMString Entity::notationName() const
{
if (!impl)
return DOMString();
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();
return ((NotationImpl*)impl)->publicId();
}
DOMString Notation::systemId() const
{
if (!impl)
return DOMString();
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();
return ((ProcessingInstructionImpl*)impl)->target();
}
DOMString ProcessingInstruction::data() const
{
if (!impl)
return DOMString();
return ((ProcessingInstructionImpl*)impl)->data();
}
void ProcessingInstruction::setData( const DOMString &_data )
{
if (!impl)
return;
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;
}