eric7/Documentation/Source/eric7.WebBrowser.AdBlock.AdBlockSearchTree.html

branch
eric7
changeset 8372
e0227a7c850e
child 8596
d64760b2da50
equal deleted inserted replaced
8371:d6062691d424 8372:e0227a7c850e
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.WebBrowser.AdBlock.AdBlockSearchTree</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body>
22 <a NAME="top" ID="top"></a>
23 <h1>eric7.WebBrowser.AdBlock.AdBlockSearchTree</h1>
24
25 <p>
26 Module implementing the AdBlock search tree.
27 </p>
28 <h3>Global Attributes</h3>
29
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <h3>Classes</h3>
34
35 <table>
36
37 <tr>
38 <td><a href="#AdBlockSearchTree">AdBlockSearchTree</a></td>
39 <td>Class implementing the AdBlock search tree.</td>
40 </tr>
41 <tr>
42 <td><a href="#AdBlockSearchTreeNode">AdBlockSearchTreeNode</a></td>
43 <td>Class implementing the AdBlock search tree node.</td>
44 </tr>
45 </table>
46 <h3>Functions</h3>
47
48 <table>
49 <tr><td>None</td></tr>
50 </table>
51 <hr />
52 <hr />
53 <a NAME="AdBlockSearchTree" ID="AdBlockSearchTree"></a>
54 <h2>AdBlockSearchTree</h2>
55
56 <p>
57 Class implementing the AdBlock search tree.
58 </p>
59 <h3>Derived from</h3>
60 None
61 <h3>Class Attributes</h3>
62
63 <table>
64 <tr><td>None</td></tr>
65 </table>
66 <h3>Class Methods</h3>
67
68 <table>
69 <tr><td>None</td></tr>
70 </table>
71 <h3>Methods</h3>
72
73 <table>
74
75 <tr>
76 <td><a href="#AdBlockSearchTree.__init__">AdBlockSearchTree</a></td>
77 <td>Constructor</td>
78 </tr>
79 <tr>
80 <td><a href="#AdBlockSearchTree.__deleteNode">__deleteNode</a></td>
81 <td>Private method to delete a search tree node.</td>
82 </tr>
83 <tr>
84 <td><a href="#AdBlockSearchTree.__prefixSearch">__prefixSearch</a></td>
85 <td>Private method to perform a prefix search.</td>
86 </tr>
87 <tr>
88 <td><a href="#AdBlockSearchTree.add">add</a></td>
89 <td>Public method to add a rule to the search tree.</td>
90 </tr>
91 <tr>
92 <td><a href="#AdBlockSearchTree.clear">clear</a></td>
93 <td>Public method to clear the search tree.</td>
94 </tr>
95 <tr>
96 <td><a href="#AdBlockSearchTree.find">find</a></td>
97 <td>Public method to find a matching rule.</td>
98 </tr>
99 </table>
100 <h3>Static Methods</h3>
101
102 <table>
103 <tr><td>None</td></tr>
104 </table>
105
106 <a NAME="AdBlockSearchTree.__init__" ID="AdBlockSearchTree.__init__"></a>
107 <h4>AdBlockSearchTree (Constructor)</h4>
108 <b>AdBlockSearchTree</b>(<i></i>)
109
110 <p>
111 Constructor
112 </p>
113 <a NAME="AdBlockSearchTree.__deleteNode" ID="AdBlockSearchTree.__deleteNode"></a>
114 <h4>AdBlockSearchTree.__deleteNode</h4>
115 <b>__deleteNode</b>(<i>node</i>)
116
117 <p>
118 Private method to delete a search tree node.
119 </p>
120 <dl>
121
122 <dt><i>node</i> (AdBlockSearchTreeNode)</dt>
123 <dd>
124 reference to the node to be deleted
125 </dd>
126 </dl>
127 <a NAME="AdBlockSearchTree.__prefixSearch" ID="AdBlockSearchTree.__prefixSearch"></a>
128 <h4>AdBlockSearchTree.__prefixSearch</h4>
129 <b>__prefixSearch</b>(<i>request, domain, urlString, string, length</i>)
130
131 <p>
132 Private method to perform a prefix search.
133 </p>
134 <dl>
135
136 <dt><i>request</i> (QWebEngineUrlRequestInfo)</dt>
137 <dd>
138 URL request to be matched
139 </dd>
140 <dt><i>domain</i> (str)</dt>
141 <dd>
142 domain of the URL
143 </dd>
144 <dt><i>urlString</i> (str)</dt>
145 <dd>
146 requested URL as a lowercase string
147 </dd>
148 <dt><i>string</i> (str)</dt>
149 <dd>
150 prefix string to search for
151 </dd>
152 <dt><i>length</i> (int)</dt>
153 <dd>
154 length to be considered
155 </dd>
156 </dl>
157 <dl>
158 <dt>Return:</dt>
159 <dd>
160 reference to the matched rule
161 </dd>
162 </dl>
163 <dl>
164 <dt>Return Type:</dt>
165 <dd>
166 AdBlockRule
167 </dd>
168 </dl>
169 <a NAME="AdBlockSearchTree.add" ID="AdBlockSearchTree.add"></a>
170 <h4>AdBlockSearchTree.add</h4>
171 <b>add</b>(<i>rule</i>)
172
173 <p>
174 Public method to add a rule to the search tree.
175 </p>
176 <dl>
177
178 <dt><i>rule</i> (AdBlockRule)</dt>
179 <dd>
180 rule to be added
181 </dd>
182 </dl>
183 <dl>
184 <dt>Return:</dt>
185 <dd>
186 flag indicating a successful addition
187 </dd>
188 </dl>
189 <dl>
190 <dt>Return Type:</dt>
191 <dd>
192 bool
193 </dd>
194 </dl>
195 <a NAME="AdBlockSearchTree.clear" ID="AdBlockSearchTree.clear"></a>
196 <h4>AdBlockSearchTree.clear</h4>
197 <b>clear</b>(<i></i>)
198
199 <p>
200 Public method to clear the search tree.
201 </p>
202 <a NAME="AdBlockSearchTree.find" ID="AdBlockSearchTree.find"></a>
203 <h4>AdBlockSearchTree.find</h4>
204 <b>find</b>(<i>request, domain, urlString</i>)
205
206 <p>
207 Public method to find a matching rule.
208 </p>
209 <dl>
210
211 <dt><i>request</i> (QWebEngineUrlRequestInfo)</dt>
212 <dd>
213 URL request to be matched
214 </dd>
215 <dt><i>domain</i> (str)</dt>
216 <dd>
217 domain of the URL
218 </dd>
219 <dt><i>urlString</i> (str)</dt>
220 <dd>
221 requested URL as a lowercase string
222 </dd>
223 </dl>
224 <dl>
225 <dt>Return:</dt>
226 <dd>
227 reference to the matched rule
228 </dd>
229 </dl>
230 <dl>
231 <dt>Return Type:</dt>
232 <dd>
233 AdBlockRule
234 </dd>
235 </dl>
236 <div align="right"><a href="#top">Up</a></div>
237 <hr />
238 <hr />
239 <a NAME="AdBlockSearchTreeNode" ID="AdBlockSearchTreeNode"></a>
240 <h2>AdBlockSearchTreeNode</h2>
241
242 <p>
243 Class implementing the AdBlock search tree node.
244 </p>
245 <h3>Derived from</h3>
246 None
247 <h3>Class Attributes</h3>
248
249 <table>
250 <tr><td>None</td></tr>
251 </table>
252 <h3>Class Methods</h3>
253
254 <table>
255 <tr><td>None</td></tr>
256 </table>
257 <h3>Methods</h3>
258
259 <table>
260
261 <tr>
262 <td><a href="#AdBlockSearchTreeNode.__init__">AdBlockSearchTreeNode</a></td>
263 <td>Constructor</td>
264 </tr>
265 </table>
266 <h3>Static Methods</h3>
267
268 <table>
269 <tr><td>None</td></tr>
270 </table>
271
272 <a NAME="AdBlockSearchTreeNode.__init__" ID="AdBlockSearchTreeNode.__init__"></a>
273 <h4>AdBlockSearchTreeNode (Constructor)</h4>
274 <b>AdBlockSearchTreeNode</b>(<i></i>)
275
276 <p>
277 Constructor
278 </p>
279 <div align="right"><a href="#top">Up</a></div>
280 <hr />
281 </body></html>

eric ide

mercurial