• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • DOM
  • CustomNodeFilter
Public Member Functions | Protected Attributes | List of all members
DOM::CustomNodeFilter Class Reference

#include <dom2_traversal.h>

Inheritance diagram for DOM::CustomNodeFilter:
Inheritance graph
[legend]

Public Member Functions

 CustomNodeFilter ()
 
virtual ~CustomNodeFilter ()
 
virtual short acceptNode (const Node &n)
 
virtual DOMString customNodeFilterType ()
 
virtual bool isNull ()
 
- Public Member Functions inherited from DOM::DomShared
 DomShared ()
 
virtual ~DomShared ()
 
virtual bool deleteMe ()
 
void deref ()
 
bool hasOneRef () const
 
void ref ()
 
unsigned int refCount () const
 

Protected Attributes

CustomNodeFilterImpl * impl
 
- Protected Attributes inherited from DOM::DomShared
unsigned int _ref
 

Detailed Description

CustomNodeFilter can be used to define your own NodeFilter for use with NodeIterators and TreeWalkers.

You can create a custom filter by doing the following:

class MyCustomNodeFilter { ..... virtual short acceptNode (const Node &n); ..... }

Then in your program:

short MyCustomNodeFilter::acceptNode (const Node &n) { if (condition) return NodeFilter::FILTER_ACCEPT; else .... }

MyCustomFilter *filter = new MyCustomFilter(); NodeFilter nf = NodeFilter::createCustom(filter); NodeIterator ni = document.createNodeIterator(document,NodeFilter.SHOW_ALL,nf,false);

The default implementation of acceptNode() returns NodeFilter::FILTER_ACCEPT for all nodes.

Definition at line 294 of file dom2_traversal.h.

Constructor & Destructor Documentation

CustomNodeFilter::CustomNodeFilter ( )

Definition at line 205 of file dom2_traversal.cpp.

CustomNodeFilter::~CustomNodeFilter ( )
virtual

Definition at line 210 of file dom2_traversal.cpp.

Member Function Documentation

short CustomNodeFilter::acceptNode ( const Node &  n)
virtual

Definition at line 214 of file dom2_traversal.cpp.

DOMString CustomNodeFilter::customNodeFilterType ( )
virtual

not part of the DOM

Returns a name specifying the type of custom node filter. Useful for checking if an custom node filter is of a particular sublass.

Definition at line 224 of file dom2_traversal.cpp.

bool CustomNodeFilter::isNull ( )
virtual

Definition at line 219 of file dom2_traversal.cpp.

Member Data Documentation

CustomNodeFilterImpl* DOM::CustomNodeFilter::impl
protected

Reserved. Do not use in your subclasses.

Definition at line 316 of file dom2_traversal.h.


The documentation for this class was generated from the following files:
  • dom2_traversal.h
  • dom2_traversal.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:23 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal