|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>Plugin_Extension_Protobuf.ExtensionProtobuf.protoclbr</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>Plugin_Extension_Protobuf.ExtensionProtobuf.protoclbr</h1> |
|
10 |
|
11 <p> |
|
12 Parse a ProtoBuf protocol file and retrieve messages, enums, services and |
|
13 rpc methods. |
|
14 </p> |
|
15 <p> |
|
16 It is based on the Python class browser found in this package. |
|
17 </p> |
|
18 <h3>Global Attributes</h3> |
|
19 |
|
20 <table> |
|
21 <tr><td>_commentsub</td></tr><tr><td>_getnext</td></tr><tr><td>_normalize</td></tr> |
|
22 </table> |
|
23 <h3>Classes</h3> |
|
24 |
|
25 <table> |
|
26 |
|
27 <tr> |
|
28 <td><a href="#Enum">Enum</a></td> |
|
29 <td>Class to represent a ProtoBuf Enum.</td> |
|
30 </tr> |
|
31 <tr> |
|
32 <td><a href="#Message">Message</a></td> |
|
33 <td>Class to represent a ProtoBuf Message.</td> |
|
34 </tr> |
|
35 <tr> |
|
36 <td><a href="#Service">Service</a></td> |
|
37 <td>Class to represent a ProtoBuf Service.</td> |
|
38 </tr> |
|
39 <tr> |
|
40 <td><a href="#ServiceMethod">ServiceMethod</a></td> |
|
41 <td>Class to represent a ProtoBuf Service Method.</td> |
|
42 </tr> |
|
43 <tr> |
|
44 <td><a href="#VisibilityMixin">VisibilityMixin</a></td> |
|
45 <td>Mixin class implementing the notion of visibility.</td> |
|
46 </tr> |
|
47 </table> |
|
48 <h3>Functions</h3> |
|
49 |
|
50 <table> |
|
51 |
|
52 <tr> |
|
53 <td><a href="#calculateEndline">calculateEndline</a></td> |
|
54 <td>Function to calculate the end line.</td> |
|
55 </tr> |
|
56 <tr> |
|
57 <td><a href="#readmodule_ex">readmodule_ex</a></td> |
|
58 <td>Read a ProtoBuf protocol file and return a dictionary of messages, enums, services and rpc methods.</td> |
|
59 </tr> |
|
60 <tr> |
|
61 <td><a href="#scan">scan</a></td> |
|
62 <td>Public method to scan the given source text.</td> |
|
63 </tr> |
|
64 </table> |
|
65 <hr /> |
|
66 <hr /> |
|
67 <a NAME="Enum" ID="Enum"></a> |
|
68 <h2>Enum</h2> |
|
69 |
|
70 <p> |
|
71 Class to represent a ProtoBuf Enum. |
|
72 </p> |
|
73 <h3>Derived from</h3> |
|
74 ClbrBaseClasses.Enum, VisibilityMixin |
|
75 <h3>Class Attributes</h3> |
|
76 |
|
77 <table> |
|
78 <tr><td>None</td></tr> |
|
79 </table> |
|
80 <h3>Class Methods</h3> |
|
81 |
|
82 <table> |
|
83 <tr><td>None</td></tr> |
|
84 </table> |
|
85 <h3>Methods</h3> |
|
86 |
|
87 <table> |
|
88 |
|
89 <tr> |
|
90 <td><a href="#Enum.__init__">Enum</a></td> |
|
91 <td>Constructor</td> |
|
92 </tr> |
|
93 </table> |
|
94 <h3>Static Methods</h3> |
|
95 |
|
96 <table> |
|
97 <tr><td>None</td></tr> |
|
98 </table> |
|
99 |
|
100 <a NAME="Enum.__init__" ID="Enum.__init__"></a> |
|
101 <h4>Enum (Constructor)</h4> |
|
102 <b>Enum</b>(<i>module, name, file, lineno</i>) |
|
103 |
|
104 <p> |
|
105 Constructor |
|
106 </p> |
|
107 <dl> |
|
108 |
|
109 <dt><i>module</i> (str)</dt> |
|
110 <dd> |
|
111 name of the module containing this enum |
|
112 </dd> |
|
113 <dt><i>name</i> (str)</dt> |
|
114 <dd> |
|
115 name of this enum |
|
116 </dd> |
|
117 <dt><i>file</i> (str)</dt> |
|
118 <dd> |
|
119 filename containing this enum |
|
120 </dd> |
|
121 <dt><i>lineno</i> (int)</dt> |
|
122 <dd> |
|
123 linenumber of the message enum |
|
124 </dd> |
|
125 </dl> |
|
126 <div align="right"><a href="#top">Up</a></div> |
|
127 <hr /> |
|
128 <hr /> |
|
129 <a NAME="Message" ID="Message"></a> |
|
130 <h2>Message</h2> |
|
131 |
|
132 <p> |
|
133 Class to represent a ProtoBuf Message. |
|
134 </p> |
|
135 <h3>Derived from</h3> |
|
136 ClbrBaseClasses.Module, VisibilityMixin |
|
137 <h3>Class Attributes</h3> |
|
138 |
|
139 <table> |
|
140 <tr><td>None</td></tr> |
|
141 </table> |
|
142 <h3>Class Methods</h3> |
|
143 |
|
144 <table> |
|
145 <tr><td>None</td></tr> |
|
146 </table> |
|
147 <h3>Methods</h3> |
|
148 |
|
149 <table> |
|
150 |
|
151 <tr> |
|
152 <td><a href="#Message.__init__">Message</a></td> |
|
153 <td>Constructor</td> |
|
154 </tr> |
|
155 </table> |
|
156 <h3>Static Methods</h3> |
|
157 |
|
158 <table> |
|
159 <tr><td>None</td></tr> |
|
160 </table> |
|
161 |
|
162 <a NAME="Message.__init__" ID="Message.__init__"></a> |
|
163 <h4>Message (Constructor)</h4> |
|
164 <b>Message</b>(<i>module, name, file, lineno</i>) |
|
165 |
|
166 <p> |
|
167 Constructor |
|
168 </p> |
|
169 <dl> |
|
170 |
|
171 <dt><i>module</i> (str)</dt> |
|
172 <dd> |
|
173 name of the module containing this message |
|
174 </dd> |
|
175 <dt><i>name</i> (str)</dt> |
|
176 <dd> |
|
177 name of this message |
|
178 </dd> |
|
179 <dt><i>file</i> (str)</dt> |
|
180 <dd> |
|
181 filename containing this message |
|
182 </dd> |
|
183 <dt><i>lineno</i> (int)</dt> |
|
184 <dd> |
|
185 linenumber of the message definition |
|
186 </dd> |
|
187 </dl> |
|
188 <div align="right"><a href="#top">Up</a></div> |
|
189 <hr /> |
|
190 <hr /> |
|
191 <a NAME="Service" ID="Service"></a> |
|
192 <h2>Service</h2> |
|
193 |
|
194 <p> |
|
195 Class to represent a ProtoBuf Service. |
|
196 </p> |
|
197 <h3>Derived from</h3> |
|
198 ClbrBaseClasses.Class, VisibilityMixin |
|
199 <h3>Class Attributes</h3> |
|
200 |
|
201 <table> |
|
202 <tr><td>None</td></tr> |
|
203 </table> |
|
204 <h3>Class Methods</h3> |
|
205 |
|
206 <table> |
|
207 <tr><td>None</td></tr> |
|
208 </table> |
|
209 <h3>Methods</h3> |
|
210 |
|
211 <table> |
|
212 |
|
213 <tr> |
|
214 <td><a href="#Service.__init__">Service</a></td> |
|
215 <td>Constructor</td> |
|
216 </tr> |
|
217 </table> |
|
218 <h3>Static Methods</h3> |
|
219 |
|
220 <table> |
|
221 <tr><td>None</td></tr> |
|
222 </table> |
|
223 |
|
224 <a NAME="Service.__init__" ID="Service.__init__"></a> |
|
225 <h4>Service (Constructor)</h4> |
|
226 <b>Service</b>(<i>module, name, file, lineno</i>) |
|
227 |
|
228 <p> |
|
229 Constructor |
|
230 </p> |
|
231 <dl> |
|
232 |
|
233 <dt><i>module</i> (str)</dt> |
|
234 <dd> |
|
235 name of the module containing this service |
|
236 </dd> |
|
237 <dt><i>name</i> (str)</dt> |
|
238 <dd> |
|
239 name of this service |
|
240 </dd> |
|
241 <dt><i>file</i> (str)</dt> |
|
242 <dd> |
|
243 filename containing this service |
|
244 </dd> |
|
245 <dt><i>lineno</i> (int)</dt> |
|
246 <dd> |
|
247 linenumber of the service definition |
|
248 </dd> |
|
249 </dl> |
|
250 <div align="right"><a href="#top">Up</a></div> |
|
251 <hr /> |
|
252 <hr /> |
|
253 <a NAME="ServiceMethod" ID="ServiceMethod"></a> |
|
254 <h2>ServiceMethod</h2> |
|
255 |
|
256 <p> |
|
257 Class to represent a ProtoBuf Service Method. |
|
258 </p> |
|
259 <h3>Derived from</h3> |
|
260 ClbrBaseClasses.Function, VisibilityMixin |
|
261 <h3>Class Attributes</h3> |
|
262 |
|
263 <table> |
|
264 <tr><td>None</td></tr> |
|
265 </table> |
|
266 <h3>Class Methods</h3> |
|
267 |
|
268 <table> |
|
269 <tr><td>None</td></tr> |
|
270 </table> |
|
271 <h3>Methods</h3> |
|
272 |
|
273 <table> |
|
274 |
|
275 <tr> |
|
276 <td><a href="#ServiceMethod.__init__">ServiceMethod</a></td> |
|
277 <td>Constructor</td> |
|
278 </tr> |
|
279 </table> |
|
280 <h3>Static Methods</h3> |
|
281 |
|
282 <table> |
|
283 <tr><td>None</td></tr> |
|
284 </table> |
|
285 |
|
286 <a NAME="ServiceMethod.__init__" ID="ServiceMethod.__init__"></a> |
|
287 <h4>ServiceMethod (Constructor)</h4> |
|
288 <b>ServiceMethod</b>(<i>name, file, lineno, signature, returns</i>) |
|
289 |
|
290 <p> |
|
291 Constructor |
|
292 </p> |
|
293 <dl> |
|
294 |
|
295 <dt><i>name</i> (str)</dt> |
|
296 <dd> |
|
297 name of this service method |
|
298 </dd> |
|
299 <dt><i>file</i> (str)</dt> |
|
300 <dd> |
|
301 filename containing this service method |
|
302 </dd> |
|
303 <dt><i>lineno</i> (int)</dt> |
|
304 <dd> |
|
305 linenumber of the service method definition |
|
306 </dd> |
|
307 <dt><i>signature</i> (str)</dt> |
|
308 <dd> |
|
309 parameter list of the service method |
|
310 </dd> |
|
311 <dt><i>returns</i> (str)</dt> |
|
312 <dd> |
|
313 return type of the service method |
|
314 </dd> |
|
315 </dl> |
|
316 <div align="right"><a href="#top">Up</a></div> |
|
317 <hr /> |
|
318 <hr /> |
|
319 <a NAME="VisibilityMixin" ID="VisibilityMixin"></a> |
|
320 <h2>VisibilityMixin</h2> |
|
321 |
|
322 <p> |
|
323 Mixin class implementing the notion of visibility. |
|
324 </p> |
|
325 <h3>Derived from</h3> |
|
326 ClbrBaseClasses.ClbrVisibilityMixinBase |
|
327 <h3>Class Attributes</h3> |
|
328 |
|
329 <table> |
|
330 <tr><td>None</td></tr> |
|
331 </table> |
|
332 <h3>Class Methods</h3> |
|
333 |
|
334 <table> |
|
335 <tr><td>None</td></tr> |
|
336 </table> |
|
337 <h3>Methods</h3> |
|
338 |
|
339 <table> |
|
340 |
|
341 <tr> |
|
342 <td><a href="#VisibilityMixin.__init__">VisibilityMixin</a></td> |
|
343 <td>Constructor</td> |
|
344 </tr> |
|
345 </table> |
|
346 <h3>Static Methods</h3> |
|
347 |
|
348 <table> |
|
349 <tr><td>None</td></tr> |
|
350 </table> |
|
351 |
|
352 <a NAME="VisibilityMixin.__init__" ID="VisibilityMixin.__init__"></a> |
|
353 <h4>VisibilityMixin (Constructor)</h4> |
|
354 <b>VisibilityMixin</b>(<i></i>) |
|
355 |
|
356 <p> |
|
357 Constructor |
|
358 </p> |
|
359 <div align="right"><a href="#top">Up</a></div> |
|
360 <hr /> |
|
361 <hr /> |
|
362 <a NAME="calculateEndline" ID="calculateEndline"></a> |
|
363 <h2>calculateEndline</h2> |
|
364 <b>calculateEndline</b>(<i>lineno, lines</i>) |
|
365 |
|
366 <p> |
|
367 Function to calculate the end line. |
|
368 </p> |
|
369 <dl> |
|
370 |
|
371 <dt><i>lineno</i> (int)</dt> |
|
372 <dd> |
|
373 line number to start at (one based) |
|
374 </dd> |
|
375 <dt><i>lines</i> (list of str)</dt> |
|
376 <dd> |
|
377 list of source lines |
|
378 </dd> |
|
379 </dl> |
|
380 <dl> |
|
381 <dt>Return:</dt> |
|
382 <dd> |
|
383 end line (one based) |
|
384 </dd> |
|
385 </dl> |
|
386 <dl> |
|
387 <dt>Return Type:</dt> |
|
388 <dd> |
|
389 int |
|
390 </dd> |
|
391 </dl> |
|
392 <div align="right"><a href="#top">Up</a></div> |
|
393 <hr /> |
|
394 <hr /> |
|
395 <a NAME="readmodule_ex" ID="readmodule_ex"></a> |
|
396 <h2>readmodule_ex</h2> |
|
397 <b>readmodule_ex</b>(<i>module, path=None</i>) |
|
398 |
|
399 <p> |
|
400 Read a ProtoBuf protocol file and return a dictionary of messages, enums, |
|
401 services and rpc methods. |
|
402 </p> |
|
403 <dl> |
|
404 |
|
405 <dt><i>module</i> (str)</dt> |
|
406 <dd> |
|
407 name of the ProtoBuf protocol file |
|
408 </dd> |
|
409 <dt><i>path</i> (list of str)</dt> |
|
410 <dd> |
|
411 path the file should be searched in |
|
412 </dd> |
|
413 </dl> |
|
414 <dl> |
|
415 <dt>Return:</dt> |
|
416 <dd> |
|
417 the resulting dictionary |
|
418 </dd> |
|
419 </dl> |
|
420 <dl> |
|
421 <dt>Return Type:</dt> |
|
422 <dd> |
|
423 dict |
|
424 </dd> |
|
425 </dl> |
|
426 <div align="right"><a href="#top">Up</a></div> |
|
427 <hr /> |
|
428 <hr /> |
|
429 <a NAME="scan" ID="scan"></a> |
|
430 <h2>scan</h2> |
|
431 <b>scan</b>(<i>src, file, module</i>) |
|
432 |
|
433 <p> |
|
434 Public method to scan the given source text. |
|
435 </p> |
|
436 <dl> |
|
437 |
|
438 <dt><i>src</i> (str)</dt> |
|
439 <dd> |
|
440 source text to be scanned |
|
441 </dd> |
|
442 <dt><i>file</i> (str)</dt> |
|
443 <dd> |
|
444 file name associated with the source text |
|
445 </dd> |
|
446 <dt><i>module</i> (str)</dt> |
|
447 <dd> |
|
448 module name associated with the source text |
|
449 </dd> |
|
450 </dl> |
|
451 <dl> |
|
452 <dt>Return:</dt> |
|
453 <dd> |
|
454 dictionary containing the extracted data |
|
455 </dd> |
|
456 </dl> |
|
457 <dl> |
|
458 <dt>Return Type:</dt> |
|
459 <dd> |
|
460 dict |
|
461 </dd> |
|
462 </dl> |
|
463 <div align="right"><a href="#top">Up</a></div> |
|
464 <hr /> |
|
465 </body></html> |