Source Code (Use browser search to find items of interest.)

Class Index

kdelibs'NodeFilter (./kdelibs/khtml/dom/dom2_traversal.h:204)

class NodeFilter
{
public:
    NodeFilter();
    NodeFilter(const NodeFilter &other);
    
    NodeFilter & operator = (const NodeFilter &other);

    virtual ~NodeFilter();
    /**
     * The following constants are returned by the acceptNode()
     * method:
     *
     */
    enum acceptNode {
        FILTER_ACCEPT = 1,
        FILTER_REJECT = 2,
        FILTER_SKIP = 3
    };

    /**
     * Test whether a specified node is visible in the logical view of
     * a TreeWalker or NodeIterator. This function will be called by
     * the implementation of TreeWalker and NodeIterator; it is not
     * intended to be called directly from user code.
     *
     * @param n The node to check to see if it passes the filter or
     * not.
     *
     * @return a constant to determine whether the node is accepted,
     * rejected, or skipped, as defined <a
     * href="#Traversal-NodeFilter-acceptNode-constants"> above </a> .
     *
     */
    virtual short acceptNode ( const Node &n );
};


/**
 * <code> TreeWalker </code> objects are used to navigate a document
 * tree or subtree using the view of the document defined by its
 * <code> whatToShow </code> flags and any filters that are defined
 * for the <code> TreeWalker </code> . Any function which performs
 * navigation using a <code> TreeWalker </code> will automatically
 * support any view defined by a <code> TreeWalker </code> .
 *
 *  Omitting nodes from the logical view of a subtree can result in a
 * structure that is substantially different from the same subtree in
 * the complete, unfiltered document. Nodes that are siblings in the
 * TreeWalker view may be children of different, widely separated
 * nodes in the original view. For instance, consider a Filter that
 * skips all nodes except for Text nodes and the root node of a
 * document. In the logical view that results, all text nodes will be
 * siblings and appear as direct children of the root node, no matter
 * how deeply nested the structure of the original document.
 *
 */

kdelibs'NodeFilter::NodeFilter() (./kdelibs/khtml/dom/dom2_traversal.cpp:274)

NodeFilter::NodeFilter()
{
}


kdelibs'NodeFilter::NodeFilter() (./kdelibs/khtml/dom/dom2_traversal.cpp:278)

NodeFilter::NodeFilter(const NodeFilter &/*other*/)
{
}


kdelibs'NodeFilter::~NodeFilter() (./kdelibs/khtml/dom/dom2_traversal.cpp:287)

NodeFilter::~NodeFilter()
{
}


kdelibs'NodeFilter::acceptNode() (./kdelibs/khtml/dom/dom2_traversal.cpp:291)

short NodeFilter::acceptNode( const Node &/*n*/ )
{
    return NodeFilter::FILTER_ACCEPT;
}

// --------------------------------------------------------------