| # khtml Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# dom2_views.cpp

    00001
    00024 #include "dom/dom2_views.h"
    00025 #include "dom/dom_exception.h"
    00026 #include "dom/dom_doc.h"
    00027 #include "xml/dom_elementimpl.h"
    00028 #include "xml/dom2_viewsimpl.h"
    00029
    00030 using namespace DOM;
    00031
    00032
    00033 AbstractView::AbstractView()
    00034 {
    00035     impl = 0;
    00036 }
    00037
    00038
    00039 AbstractView::AbstractView(const AbstractView &other)
    00040 {
    00041     impl = other.impl;
    00042     if (impl) impl->ref();
    00043 }
    00044
    00045
    00046 AbstractView::AbstractView(AbstractViewImpl *i)
    00047 {
    00048     impl = i;
    00049     if (impl) impl->ref();
    00050 }
    00051
    00052 AbstractView::~AbstractView()
    00053 {
    00054     if (impl)
    00055         impl->deref();
    00056 }
    00057
    00058 AbstractView &AbstractView::operator = (const AbstractView &other)
    00059 {
    00060     if ( impl != other.impl ) {
    00061     if(impl) impl->deref();
    00062     impl = other.impl;
    00063     if(impl) impl->ref();
    00064     }
    00065     return *this;
    00066 }
    00067
    00068 Document AbstractView::document() const
    00069 {
    00070     if (!impl)
    00071         throw DOMException(DOMException::INVALID_STATE_ERR);
    00072
    00073     return impl->document();
    00074 }
    00075
    00076 CSSStyleDeclaration AbstractView::getComputedStyle(const Element &elt, const DOMString &pseudoElt)
    00077 {
    00078     if (!impl)
    00079         throw DOMException(DOMException::INVALID_STATE_ERR);
    00080
    00081     return impl->getComputedStyle(static_cast<ElementImpl*>(elt.handle()),pseudoElt.implementation());
    00082 }
    00083
    00084
    00085 AbstractViewImpl *AbstractView::handle() const
    00086 {
    00087     return impl;
    00088 }
    00089
    00090 bool AbstractView::isNull() const
    00091 {
    00092     return (impl == 0);
    00093 }
    00094
    00095
    00096

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:33:38 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001