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

changeset 6942
2602857055c5
parent 6028
859f6894eed9
child 7273
391d6b7b1eff
equal deleted inserted replaced
6941:f99d60d6b59b 6942:2602857055c5
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.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><a NAME="top" ID="top"></a>
22 <h1>eric6.WebBrowser.AdBlock.AdBlockSearchTree</h1>
23 <p>
24 Module implementing the AdBlock search tree.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>None</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#AdBlockSearchTree">AdBlockSearchTree</a></td>
34 <td>Class implementing the AdBlock search tree.</td>
35 </tr><tr>
36 <td><a href="#AdBlockSearchTreeNode">AdBlockSearchTreeNode</a></td>
37 <td>Class implementing the AdBlock search tree node.</td>
38 </tr>
39 </table>
40 <h3>Functions</h3>
41 <table>
42 <tr><td>None</td></tr>
43 </table>
44 <hr /><hr />
45 <a NAME="AdBlockSearchTree" ID="AdBlockSearchTree"></a>
46 <h2>AdBlockSearchTree</h2>
47 <p>
48 Class implementing the AdBlock search tree.
49 </p>
50 <h3>Derived from</h3>
51 object
52 <h3>Class Attributes</h3>
53 <table>
54 <tr><td>None</td></tr>
55 </table>
56 <h3>Class Methods</h3>
57 <table>
58 <tr><td>None</td></tr>
59 </table>
60 <h3>Methods</h3>
61 <table>
62 <tr>
63 <td><a href="#AdBlockSearchTree.__init__">AdBlockSearchTree</a></td>
64 <td>Constructor</td>
65 </tr><tr>
66 <td><a href="#AdBlockSearchTree.__deleteNode">__deleteNode</a></td>
67 <td>Private method to delete a search tree node.</td>
68 </tr><tr>
69 <td><a href="#AdBlockSearchTree.__prefixSearch">__prefixSearch</a></td>
70 <td>Private method to perform a prefix search.</td>
71 </tr><tr>
72 <td><a href="#AdBlockSearchTree.add">add</a></td>
73 <td>Public method to add a rule to the search tree.</td>
74 </tr><tr>
75 <td><a href="#AdBlockSearchTree.clear">clear</a></td>
76 <td>Public method to clear the search tree.</td>
77 </tr><tr>
78 <td><a href="#AdBlockSearchTree.find">find</a></td>
79 <td>Public method to find a matching rule.</td>
80 </tr>
81 </table>
82 <h3>Static Methods</h3>
83 <table>
84 <tr><td>None</td></tr>
85 </table>
86 <a NAME="AdBlockSearchTree.__init__" ID="AdBlockSearchTree.__init__"></a>
87 <h4>AdBlockSearchTree (Constructor)</h4>
88 <b>AdBlockSearchTree</b>(<i></i>)
89 <p>
90 Constructor
91 </p><a NAME="AdBlockSearchTree.__deleteNode" ID="AdBlockSearchTree.__deleteNode"></a>
92 <h4>AdBlockSearchTree.__deleteNode</h4>
93 <b>__deleteNode</b>(<i>node</i>)
94 <p>
95 Private method to delete a search tree node.
96 </p><dl>
97 <dt><i>node</i> (AdBlockSearchTreeNode)</dt>
98 <dd>
99 reference to the node to be deleted
100 </dd>
101 </dl><a NAME="AdBlockSearchTree.__prefixSearch" ID="AdBlockSearchTree.__prefixSearch"></a>
102 <h4>AdBlockSearchTree.__prefixSearch</h4>
103 <b>__prefixSearch</b>(<i>request, domain, urlString, string, length</i>)
104 <p>
105 Private method to perform a prefix search.
106 </p><dl>
107 <dt><i>request</i> (QWebEngineUrlRequestInfo)</dt>
108 <dd>
109 URL request to be matched
110 </dd><dt><i>domain</i> (str)</dt>
111 <dd>
112 domain of the URL
113 </dd><dt><i>urlString</i> (str)</dt>
114 <dd>
115 requested URL as a lowercase string
116 </dd><dt><i>string</i> (str)</dt>
117 <dd>
118 prefix string to search for
119 </dd><dt><i>length</i> (int)</dt>
120 <dd>
121 length to be considered
122 </dd>
123 </dl><dl>
124 <dt>Returns:</dt>
125 <dd>
126 reference to the matched rule
127 </dd>
128 </dl><dl>
129 <dt>Return Type:</dt>
130 <dd>
131 AdBlockRule
132 </dd>
133 </dl><a NAME="AdBlockSearchTree.add" ID="AdBlockSearchTree.add"></a>
134 <h4>AdBlockSearchTree.add</h4>
135 <b>add</b>(<i>rule</i>)
136 <p>
137 Public method to add a rule to the search tree.
138 </p><dl>
139 <dt><i>rule</i> (AdBlockRule)</dt>
140 <dd>
141 rule to be added
142 </dd>
143 </dl><dl>
144 <dt>Returns:</dt>
145 <dd>
146 flag indicating a successful addition
147 </dd>
148 </dl><dl>
149 <dt>Return Type:</dt>
150 <dd>
151 bool
152 </dd>
153 </dl><a NAME="AdBlockSearchTree.clear" ID="AdBlockSearchTree.clear"></a>
154 <h4>AdBlockSearchTree.clear</h4>
155 <b>clear</b>(<i></i>)
156 <p>
157 Public method to clear the search tree.
158 </p><a NAME="AdBlockSearchTree.find" ID="AdBlockSearchTree.find"></a>
159 <h4>AdBlockSearchTree.find</h4>
160 <b>find</b>(<i>request, domain, urlString</i>)
161 <p>
162 Public method to find a matching rule.
163 </p><dl>
164 <dt><i>request</i> (QWebEngineUrlRequestInfo)</dt>
165 <dd>
166 URL request to be matched
167 </dd><dt><i>domain</i> (str)</dt>
168 <dd>
169 domain of the URL
170 </dd><dt><i>urlString</i> (str)</dt>
171 <dd>
172 requested URL as a lowercase string
173 </dd>
174 </dl><dl>
175 <dt>Returns:</dt>
176 <dd>
177 reference to the matched rule
178 </dd>
179 </dl><dl>
180 <dt>Return Type:</dt>
181 <dd>
182 AdBlockRule
183 </dd>
184 </dl>
185 <div align="right"><a href="#top">Up</a></div>
186 <hr /><hr />
187 <a NAME="AdBlockSearchTreeNode" ID="AdBlockSearchTreeNode"></a>
188 <h2>AdBlockSearchTreeNode</h2>
189 <p>
190 Class implementing the AdBlock search tree node.
191 </p>
192 <h3>Derived from</h3>
193 object
194 <h3>Class Attributes</h3>
195 <table>
196 <tr><td>None</td></tr>
197 </table>
198 <h3>Class Methods</h3>
199 <table>
200 <tr><td>None</td></tr>
201 </table>
202 <h3>Methods</h3>
203 <table>
204 <tr>
205 <td><a href="#AdBlockSearchTreeNode.__init__">AdBlockSearchTreeNode</a></td>
206 <td>Constructor</td>
207 </tr>
208 </table>
209 <h3>Static Methods</h3>
210 <table>
211 <tr><td>None</td></tr>
212 </table>
213 <a NAME="AdBlockSearchTreeNode.__init__" ID="AdBlockSearchTreeNode.__init__"></a>
214 <h4>AdBlockSearchTreeNode (Constructor)</h4>
215 <b>AdBlockSearchTreeNode</b>(<i></i>)
216 <p>
217 Constructor
218 </p>
219 <div align="right"><a href="#top">Up</a></div>
220 <hr />
221 </body></html>

eric ide

mercurial