File: Poco.XML.NodeFilter.html

package info (click to toggle)
poco-doc 1.3.6-1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 10,076 kB
  • ctags: 9,611
  • sloc: makefile: 31
file content (124 lines) | stat: -rw-r--r-- 11,073 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Class Poco::XML::NodeFilter</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.XML.html" class="namespace">Poco::XML</a></h1>
<h1 class="symbol">class NodeFilter</h1>
</div>
<div class="body">
<p>
<b>Library:</b> XML<br />
<b>Package:</b> DOM<br />
<b>Header:</b> Poco/DOM/NodeFilter.h</p>
<h2>Description</h2>
<div class="description">
<p>Filters are objects that know how to &quot;filter out&quot; nodes. If a <a href="Poco.XML.NodeIterator.html" title="class Poco::XML::NodeIterator">NodeIterator</a> or <a href="Poco.XML.TreeWalker.html" title="class Poco::XML::TreeWalker">TreeWalker</a> is given a <a href="Poco.XML.NodeFilter.html" title="class Poco::XML::NodeFilter">NodeFilter</a>, it applies the filter before it returns the next node. If the filter says to accept the node, the traversal logic returns it; otherwise, traversal looks for the next node and pretends that the node that was rejected was not there. </p>
<p>The DOM does not provide any filters. <a href="Poco.XML.NodeFilter.html" title="class Poco::XML::NodeFilter">NodeFilter</a> is just an interface that users can implement to provide their own filters. </p>
<p>NodeFilters do not need to know how to traverse from node to node, nor do they need to know anything about the data structure that is being traversed. This makes it very easy to write filters, since the only thing they have to know how to do is evaluate a single node. One filter may be used with a number of different kinds of traversals, encouraging code reuse. </p>
</div>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.XML.NodeFilter.html#18568" title="Poco::XML::NodeFilter::acceptNode()">acceptNode</a></p>
<h2>Enumerations</h2>
<h3><i>Anonymous</i></h3>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="18551">FILTER_ACCEPT</a> = 1</p>
<div class="description">
<p>Accept the node. Navigation methods defined for <a href="Poco.XML.NodeIterator.html" title="class Poco::XML::NodeIterator">NodeIterator</a> or <a href="Poco.XML.TreeWalker.html" title="class Poco::XML::TreeWalker">TreeWalker</a> will return this node. </p>
</div>
<p class="decl"><a name="18552">FILTER_REJECT</a> = 2</p>
<div class="description">
<p>Reject the node. Navigation methods defined for <a href="Poco.XML.NodeIterator.html" title="class Poco::XML::NodeIterator">NodeIterator</a> or <a href="Poco.XML.TreeWalker.html" title="class Poco::XML::TreeWalker">TreeWalker</a> will not return this node. For <a href="Poco.XML.TreeWalker.html" title="class Poco::XML::TreeWalker">TreeWalker</a>, the children of this node will also be rejected. NodeIterators treat this as a synonym for <a href="Poco.XML.NodeFilter.html#18553" title="Poco::XML::NodeFilter::FILTER_SKIP">FILTER_SKIP</a>. </p>
</div>
<p class="decl"><a name="18553">FILTER_SKIP</a> = 3</p>
<div class="description">
<p>Skip this single node. Navigation methods defined for <a href="Poco.XML.NodeIterator.html" title="class Poco::XML::NodeIterator">NodeIterator</a> or <a href="Poco.XML.TreeWalker.html" title="class Poco::XML::TreeWalker">TreeWalker</a> will not return this node. For both <a href="Poco.XML.NodeIterator.html" title="class Poco::XML::NodeIterator">NodeIterator</a> and <a href="Poco.XML.TreeWalker.html" title="class Poco::XML::TreeWalker">TreeWalker</a>, the children of this node will still be considered. </p>
</div>
<h3><a name="18554">WhatToShow</a></h3>
<div class="description">
<p>These are the available values for the whatToShow parameter used in TreeWalkers and NodeIterators. They are the same as the set of possible types for <a href="Poco.XML.Node.html" title="class Poco::XML::Node">Node</a>, and their values are derived by using a bit position corresponding to the value of nodeType for the equivalent node type. If a bit in whatToShow is set false, that will be taken as a request to skip over this type of node; the behavior in that case is similar to that of <a href="Poco.XML.NodeFilter.html#18553" title="Poco::XML::NodeFilter::FILTER_SKIP">FILTER_SKIP</a>. </p>
<p>Note that if node types greater than 32 are ever introduced, they may not be individually testable via whatToShow. If that need should arise, it can be handled by selecting <a href="Poco.XML.NodeFilter.html#18555" title="Poco::XML::NodeFilter::SHOW_ALL">SHOW_ALL</a> together with an appropriate <a href="Poco.XML.NodeFilter.html" title="class Poco::XML::NodeFilter">NodeFilter</a>. </p>
</div>
<p class="decl"><a name="18555">SHOW_ALL</a> = 0xFFFFFFFF</p>
<div class="description">
<p>Show all Nodes. </p>
</div>
<p class="decl"><a name="18556">SHOW_ELEMENT</a> = 0x00000001</p>
<div class="description">
<p>Show <a href="Poco.XML.Element.html" title="class Poco::XML::Element">Element</a> nodes. </p>
</div>
<p class="decl"><a name="18557">SHOW_ATTRIBUTE</a> = 0x00000002</p>
<div class="description">
<p>Show <a href="Poco.XML.Attr.html" title="class Poco::XML::Attr">Attr</a> nodes. This is meaningful only when creating an iterator or tree-walker with an attribute node as its root; in this case, it means that the attribute node will appear in the first position of the iteration or traversal. Since attributes are never children of other nodes, they do not appear when traversing over the document tree. </p>
</div>
<p class="decl"><a name="18558">SHOW_TEXT</a> = 0x00000004</p>
<div class="description">
<p>Show <a href="Poco.XML.Text.html" title="class Poco::XML::Text">Text</a> nodes. </p>
</div>
<p class="decl"><a name="18559">SHOW_CDATA_SECTION</a> = 0x00000008</p>
<div class="description">
<p>Show <a href="Poco.XML.CDATASection.html" title="class Poco::XML::CDATASection">CDATASection</a> nodes. </p>
</div>
<p class="decl"><a name="18560">SHOW_ENTITY_REFERENCE</a> = 0x00000010</p>
<div class="description">
<p>Show <a href="Poco.XML.EntityReference.html" title="class Poco::XML::EntityReference">EntityReference</a> nodes. </p>
</div>
<p class="decl"><a name="18561">SHOW_ENTITY</a> = 0x00000020</p>
<div class="description">
<p>Show <a href="Poco.XML.Entity.html" title="class Poco::XML::Entity">Entity</a> nodes. This is meaningful only when creating an iterator or tree-walker with an <a href="Poco.XML.Entity.html" title="class Poco::XML::Entity">Entity</a> node as its root; in this case, it means that the <a href="Poco.XML.Entity.html" title="class Poco::XML::Entity">Entity</a> node will appear in the first position of the traversal. Since entities are not part of the document tree, they do not appear when traversing over the document tree. </p>
</div>
<p class="decl"><a name="18562">SHOW_PROCESSING_INSTRUCTION</a> = 0x00000040</p>
<div class="description">
<p>Show <a href="Poco.XML.ProcessingInstruction.html" title="class Poco::XML::ProcessingInstruction">ProcessingInstruction</a> nodes. </p>
</div>
<p class="decl"><a name="18563">SHOW_COMMENT</a> = 0x00000080</p>
<div class="description">
<p>Show <a href="Poco.XML.Comment.html" title="class Poco::XML::Comment">Comment</a> nodes. </p>
</div>
<p class="decl"><a name="18564">SHOW_DOCUMENT</a> = 0x00000100</p>
<div class="description">
<p>Show <a href="Poco.XML.Document.html" title="class Poco::XML::Document">Document</a> nodes. </p>
</div>
<p class="decl"><a name="18565">SHOW_DOCUMENT_TYPE</a> = 0x00000200</p>
<div class="description">
<p>Show <a href="Poco.XML.DocumentType.html" title="class Poco::XML::DocumentType">DocumentType</a> nodes. </p>
</div>
<p class="decl"><a name="18566">SHOW_DOCUMENT_FRAGMENT</a> = 0x00000400</p>
<div class="description">
<p>Show <a href="Poco.XML.DocumentFragment.html" title="class Poco::XML::DocumentFragment">DocumentFragment</a> nodes. </p>
</div>
<p class="decl"><a name="18567">SHOW_NOTATION</a> = 0x00000800</p>
<div class="description">
<p>Show <a href="Poco.XML.Notation.html" title="class Poco::XML::Notation">Notation</a> nodes. This is meaningful only when creating an iterator or tree-walker with a <a href="Poco.XML.Notation.html" title="class Poco::XML::Notation">Notation</a> node as its root; in this case, it means that the <a href="Poco.XML.Notation.html" title="class Poco::XML::Notation">Notation</a> node will appear in the first position of the traversal. Since notations are not part of the document tree, they do not appear when traversing over the document tree. </p>
</div>
<h2>Destructor</h2>
<h3><a name="18570">~NodeFilter</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" />  <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual ~<a href="Poco.XML.NodeFilter.html" title="class Poco::XML::NodeFilter">NodeFilter</a>();</p>
<div class="description">
<p></p>
</div>
<h2>Member Functions</h2>
<h3><a name="18568">acceptNode</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual short acceptNode(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.XML.Node.html" title="class Poco::XML::Node">Node</a> * node<br />) = 0;</p>
<div class="description">
<p>Test whether a specified node is visible in the logical view of a <a href="Poco.XML.TreeWalker.html" title="class Poco::XML::TreeWalker">TreeWalker</a> or <a href="Poco.XML.NodeIterator.html" title="class Poco::XML::NodeIterator">NodeIterator</a>. This function will be called by the implementation of <a href="Poco.XML.TreeWalker.html" title="class Poco::XML::TreeWalker">TreeWalker</a> and <a href="Poco.XML.NodeIterator.html" title="class Poco::XML::NodeIterator">NodeIterator</a>; it is not normally called directly from user code. (Though you could do so if you wanted to use the same filter to guide your own application logic.) </p>
<p>Returns <a href="Poco.XML.NodeFilter.html#18551" title="Poco::XML::NodeFilter::FILTER_ACCEPT">FILTER_ACCEPT</a>, <a href="Poco.XML.NodeFilter.html#18552" title="Poco::XML::NodeFilter::FILTER_REJECT">FILTER_REJECT</a> or <a href="Poco.XML.NodeFilter.html#18553" title="Poco::XML::NodeFilter::FILTER_SKIP">FILTER_SKIP</a>. </p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright &copy; 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>

</div>
</body>
</html>