dom2_traversalimpl.h Source File (khtml Library)

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

# dom2_traversalimpl.h

    00001 /*
    00002  * This file is part of the DOM implementation for KDE.
    00003  *
    00004  * (C) 1999 Lars Knoll (knoll@kde.org)
    00005  * (C) 2000 Frederik Holljen (frederik.holljen@hig.no)
    00006  * (C) 2001 Peter Kelly (pmk@post.com)
    00007  *
    00008  * This library is free software; you can redistribute it and/or
    00009  * modify it under the terms of the GNU Library General Public
    00010  * License as published by the Free Software Foundation; either
    00011  * version 2 of the License, or (at your option) any later version.
    00012  *
    00013  * This library is distributed in the hope that it will be useful,
    00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00016  * Library General Public License for more details.
    00017  *
    00018  * You should have received a copy of the GNU Library General Public License
    00019  * along with this library; see the file COPYING.LIB.  If not, write to
    00020  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00021  * Boston, MA 02111-1307, USA.
    00022  *
    00023  * $Id: dom2_traversalimpl.h,v 1.6.2.1 2003/05/18 12:34:40 mueller Exp $
    00024  */
    00025
    00026 #ifndef _DOM2_TraversalImpl_h_
    00027 #define _DOM2_TraversalImpl_h_
    00028
    00029 #include "dom/dom2_traversal.h"
    00030 #include "misc/shared.h"
    00031
    00032 namespace DOM {
    00033
    00034 class NodeImpl;
    00035 class DocumentImpl;
    00036
    00037 class NodeIteratorImpl : public khtml::Shared<NodeIteratorImpl>
    00038 {
    00039 public:
    00040     NodeIteratorImpl(NodeImpl *_root, unsigned long _whatToShow, NodeFilter _filter, bool _entityReferenceExpansion);
    00041     ~NodeIteratorImpl();
    00042
    00043
    00044     NodeImpl *root();
    00045     unsigned long whatToShow();
    00046     NodeFilter filter();
    00047     bool expandEntityReferences();
    00048
    00049     NodeImpl *nextNode(int &exceptioncode);
    00050     NodeImpl *previousNode(int &exceptioncode);
    00051     void detach(int &exceptioncode);
    00052
    00053
    00054
    00055
    00061     void notifyBeforeNodeRemoval(NodeImpl *removed);
    00062
    00063     short isAccepted(NodeImpl *n);
    00064     NodeImpl *getNextNode(NodeImpl *n);
    00065     NodeImpl *getPreviousNode(NodeImpl *n);
    00066 protected:
    00067     NodeImpl *m_root;
    00068     long m_whatToShow;
    00069     NodeFilter m_filter;
    00070     bool m_expandEntityReferences;
    00071
    00072     bool m_inFront;
    00073     NodeImpl *m_referenceNode;
    00074     bool m_detached;
    00075     DocumentImpl *m_doc;
    00076 };
    00077
    00078 class NodeFilterImpl : public khtml::Shared<NodeFilterImpl>
    00079 {
    00080 public:
    00081     NodeFilterImpl();
    00082     ~NodeFilterImpl();
    00083
    00084     short acceptNode(const Node &n);
    00085
    00086     void setCustomNodeFilter(CustomNodeFilter *custom);
    00087     CustomNodeFilter *customNodeFilter();
    00088 protected:
    00089     CustomNodeFilter *m_customNodeFilter;
    00090
    00091 };
    00092
    00093 class TreeWalkerImpl : public khtml::Shared<TreeWalkerImpl>
    00094 {
    00095 public:
    00096     TreeWalkerImpl();
    00097     TreeWalkerImpl(const TreeWalkerImpl &other);
    00098     TreeWalkerImpl(Node n, NodeFilter *f=0);
    00099     TreeWalkerImpl(Node n, long _whatToShow, NodeFilter *f=0);
    00100     TreeWalkerImpl & operator = (const TreeWalkerImpl &other);
    00101
    00102
    00103     ~TreeWalkerImpl();
    00104
    00105     Node getRoot();
    00106
    00107     unsigned long getWhatToShow();
    00108
    00109     NodeFilter getFilter();
    00110
    00111     bool getExpandEntityReferences();
    00112
    00113     Node getCurrentNode();
    00114
    00115     void setCurrentNode(const Node _currentNode);
    00116
    00117     Node parentNode();
    00118
    00119     Node firstChild();
    00120
    00121     Node lastChild ();
    00122
    00123     Node previousSibling ();
    00124
    00125     Node nextSibling();
    00126
    00127     Node previousNode();
    00128
    00129     Node nextNode();
    00130
    00131
    00135     void setWhatToShow(long _whatToShow);
    00136     void setFilter(NodeFilter *_filter);
    00137     void setExpandEntityReferences(bool value);
    00138
    00139     Node getParentNode(Node n);
    00140     Node getFirstChild(Node n);
    00141     Node getLastChild(Node n);
    00142     Node getPreviousSibling(Node n);
    00143     Node getNextSibling(Node n);
    00144
    00145     short isAccepted(Node n);
    00146
    00147 protected:
    00153     long m_whatToShow;
    00154
    00159     NodeFilter *m_filter;
    00160
    00174     bool m_expandEntityReferences;
    00175
    00186     Node m_currentNode;
    00187
    00188     Node m_rootNode;
    00189 };
    00190
    00191
    00192 } // namespace
    00193
    00194 #endif
    00195

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