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 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>epydoc.objdoc.ObjDoc</title>
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
<tr valign="center">
<th class="navbar"> <a class="navbar" href="epydoc-module.html">Home</a> </th>
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center">
<p class="nomargin">
<a class="navbar" target="_top" href="http://epydoc.sourceforge.net">epydoc 2.0</a>
</p></th></tr></table>
</th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<font size="-1"><b class="breadcrumbs">
<a href="epydoc-module.html">Package epydoc</a> ::
<a href="epydoc.objdoc-module.html">Module objdoc</a> ::
Class ObjDoc
</b></font></br>
</td>
<td><table cellpadding="0" cellspacing="0">
<tr><td align="right"><font size="-2">[<a href="../private/epydoc.objdoc.ObjDoc-class.html">show private</a> | hide private]</font></td></tr>
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="epydoc.objdoc.ObjDoc-class.html" target="_top">no frames</a>]</font></td></tr>
</table></td>
</tr></table>
<!-- =========== START OF CLASS DESCRIPTION =========== -->
<h2 class="class">Class ObjDoc</h2>
<dl><dt><b>Known Subclasses:</b></dt>
<dd>
<a href="epydoc.objdoc.ClassDoc-class.html"><code>ClassDoc</code></a>,
<a href="epydoc.objdoc.FuncDoc-class.html"><code>FuncDoc</code></a>,
<a href="epydoc.objdoc.ModuleDoc-class.html"><code>ModuleDoc</code></a>,
<a href="epydoc.objdoc.PropertyDoc-class.html"><code>PropertyDoc</code></a></dd></dl>
<hr/>
A base class for encoding the information about a Python object that
is necessary to create its documentation. This base class defines the
following pieces of documentation:
<ul>
<li>
<a name="index-uid"></a><i class="indexterm">uid</i>: The object's
unique identifier.
</li>
<li>
<a name="index-descr"></a><i class="indexterm">descr</i>: A full
description of the object.
</li>
<li>
<a name="index-summary"></a><i class="indexterm">summary</i>: A
summary description of the object.
</li>
<li>
<a name="index-fields"></a><i class="indexterm">fields</i>: A list
of generic docstring fields, such as authors, version, and notes. The
list of standard generic docstring fields is defined by the variable
<a href="epydoc.objdoc.ObjDoc-class.html#STANDARD_FIELDS"
class="link"><code>ObjDoc.STANDARD_FIELDS</code></a>; but the user
may also add new generic docstring fields (via
<code>@newfield</code> or
<code>__extra_epydoc_fields__</code>).
</li>
<li>
<a name="index-sortorder"></a><i class="indexterm">sortorder</i>:
The object's sort order, as defined by the <code>@sort</code>
field.
</li>
<li>
<a name="index-groups"></a><i class="indexterm">groups</i>:
Groupings for contained objects (or parameters).
</li>
</ul>
<hr/>
<!-- =========== START OF METHOD SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
<th colspan="2">Method Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="epydoc.objdoc.ObjDoc-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>uid</span>,
<span class=summary-sig-arg>verbosity</span>,
<span class=summary-sig-arg>docstring</span>)</span></code>
<br />
Create the documentation for the given object.</td></tr>
<tr bgcolor="#e8f0f8" class="group">
<th colspan="2"> Accessors</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> <a href="epydoc.uid.UID-class.html"
class="link"><code>UID</code></a>
</font></td>
<td><code><span class="summary-sig"><a href="epydoc.objdoc.ObjDoc-class.html#uid" class="summary-sig-name"><code>uid</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
Return the UID of the object documented by this <code>ObjDoc</code>.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> <a href="epydoc.markup.ParsedDocstring-class.html"
class="link"><code>markup.ParsedDocstring</code></a>
</font></td>
<td><code><span class="summary-sig"><a href="epydoc.objdoc.ObjDoc-class.html#descr" class="summary-sig-name"><code>descr</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
Return a description of the object documented by this
<code>ObjDoc</code>.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> <code>list</code> of <a
href="epydoc.objdoc.DocField-class.html"
class="link"><code>DocField</code></a>
</font></td>
<td><code><span class="summary-sig"><a href="epydoc.objdoc.ObjDoc-class.html#fields" class="summary-sig-name"><code>fields</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
Return a list of the fields that are given values in the docstring of the
object documented by this <code>ObjDoc</code>.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> <code>list</code> of <a
href="epydoc.markup.ParsedDocstring-class.html"
class="link"><code>markup.ParsedDocstring</code></a>
</font></td>
<td><code><span class="summary-sig"><a href="epydoc.objdoc.ObjDoc-class.html#field_values" class="summary-sig-name"><code>field_values</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>field</span>)</span></code>
<br />
Return a list of the values that are specified for the given field in the
docstring of the object documented by this <code>ObjDoc</code>.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> <code>list</code> of <code>string</code>
</font></td>
<td><code><span class="summary-sig"><a href="epydoc.objdoc.ObjDoc-class.html#sortorder" class="summary-sig-name"><code>sortorder</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
Return a list specifying the sort order that should be used for the object's
children.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> <code>list</code> of <code>string</code>
</font></td>
<td><code><span class="summary-sig"><a href="epydoc.objdoc.ObjDoc-class.html#groups" class="summary-sig-name"><code>groups</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
Return a list of the names of the groups that are defined for the object
documented by this <code>ObjDoc</code>.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> <code>list</code> of <code>(string, elt)</code>
</font></td>
<td><code><span class="summary-sig"><a href="epydoc.objdoc.ObjDoc-class.html#by_group" class="summary-sig-name"><code>by_group</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>elts</span>)</span></code>
<br />
Divide a set of elements into groups.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> <code>boolean</code>
</font></td>
<td><code><span class="summary-sig"><a href="epydoc.objdoc.ObjDoc-class.html#has_docstring" class="summary-sig-name"><code>has_docstring</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
Return true if the object documented by this <code>ObjDoc</code> has a
docstring.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> <a href="epydoc.markup.ParsedDocstring-class.html"
class="link"><code>markup.ParsedDocstring</code></a>
</font></td>
<td><code><span class="summary-sig"><a href="epydoc.objdoc.ObjDoc-class.html#summary" class="summary-sig-name"><code>summary</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
Return a summary of the description of the object documented by this
<code>ObjDoc</code>.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> <code>boolean</code>
</font></td>
<td><code><span class="summary-sig"><a href="epydoc.objdoc.ObjDoc-class.html#defines_groups" class="summary-sig-name"><code>defines_groups</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
Return true if the object documented by this <code>ObjDoc</code> defines any
groups.</td></tr>
</table><br />
<!-- =========== START OF CLASS VARIABLE SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
<th colspan="2">Class Variable Summary</th></tr>
<tr bgcolor="#e8f0f8" class="group">
<th colspan="2"> Docstring Parsing</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>List</code> of <a
href="epydoc.objdoc.DocField-class.html"
class="link"><code>DocField</code></a></font></td>
<td><b><a href="epydoc.objdoc.ObjDoc-class.html#STANDARD_FIELDS"><code>STANDARD_FIELDS</code></a></b>: The list of standard docstring fields that epydoc accepts.</td></tr>
</table><br />
<!-- =========== START OF METHOD DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
<th colspan="2">Method Details</th></tr>
</table>
<a name="uid"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">uid</span>(<span class=sig-arg>self</span>)</span>
</h3>
<dl><dt></dt><dd>
<dl><dt><b>Returns:</b></dt>
<dd>
The UID of the object documented by this
<code>ObjDoc</code>.
<br /><i>
(type=<a href="epydoc.uid.UID-class.html"
class="link"><code>UID</code></a>)</i>
</dd>
</dl>
</dd></dl>
</td></tr></table>
<a name="descr"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">descr</span>(<span class=sig-arg>self</span>)</span>
</h3>
<dl><dt></dt><dd>
<dl><dt><b>Returns:</b></dt>
<dd>
A description of the object documented by this
<code>ObjDoc</code>.
<br /><i>
(type=<a href="epydoc.markup.ParsedDocstring-class.html"
class="link"><code>markup.ParsedDocstring</code></a>)</i>
</dd>
</dl>
</dd></dl>
</td></tr></table>
<a name="fields"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">fields</span>(<span class=sig-arg>self</span>)</span>
</h3>
<dl><dt></dt><dd>
<dl><dt><b>Returns:</b></dt>
<dd>
A list of the fields that are given values in the docstring of
the object documented by this <code>ObjDoc</code>. The fields are
listed in the order that they first appear in the docstring.
<br /><i>
(type=<code>list</code> of <a
href="epydoc.objdoc.DocField-class.html"
class="link"><code>DocField</code></a>)</i>
</dd>
</dl>
</dd></dl>
</td></tr></table>
<a name="field_values"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">field_values</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>field</span>)</span>
</h3>
<dl><dt></dt><dd>
<dl><dt><b>Returns:</b></dt>
<dd>
A list of the values that are specified for the given field in
the docstring of the object documented by this
<code>ObjDoc</code>. Values are listed in the order that they
appear in the docstring.
<br /><i>
(type=<code>list</code> of <a
href="epydoc.markup.ParsedDocstring-class.html"
class="link"><code>markup.ParsedDocstring</code></a>)</i>
</dd>
</dl>
</dd></dl>
</td></tr></table>
<a name="sortorder"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">sortorder</span>(<span class=sig-arg>self</span>)</span>
</h3>
<dl><dt></dt><dd>
<dl><dt><b>Returns:</b></dt>
<dd>
A list specifying the sort order that should be used for the
object's children. Elements that are in this list should appear
before elements that are not in this list; and elements that are
in this list should appear in the order that they appear in this
list.
<br /><i>
(type=<code>list</code> of <code>string</code>)</i>
</dd>
</dl>
</dd></dl>
</td></tr></table>
<a name="groups"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">groups</span>(<span class=sig-arg>self</span>)</span>
</h3>
<dl><dt></dt><dd>
<dl><dt><b>Returns:</b></dt>
<dd>
A list of the names of the groups that are defined for the
object documented by this <code>ObjDoc</code>. To divide a set of
children into groups, use <a
href="epydoc.objdoc.ObjDoc-class.html#by_group"
class="link"><code>by_group</code></a>.
<br /><i>
(type=<code>list</code> of <code>string</code>)</i>
</dd>
</dl>
</dd></dl>
</td></tr></table>
<a name="by_group"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">by_group</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>elts</span>)</span>
</h3>
Divide a set of elements into groups. Typical usage:
<pre class="doctestblock">
<span class="py-src"><span class="py-prompt">>>> </span>grouped_funcs = fdoc.by_group(fdoc.functions())
<span class="py-prompt">>>> </span><span class="py-keyword">for</span> (group, members) <span class="py-keyword">in</span> grouped_funcs:
<span class="py-prompt">... </span> <span class="py-keyword">print</span> group, members</span></pre>
<dl><dt></dt><dd>
<dl><dt><b>Parameters:</b></dt>
<dd><code><b>elts</b></code> -
The set of elements that should be divided into groups. These
elements should be <code>Link</code>s, <code>Var</code>s, or
<code>Param</code>s specifying child objects of the object
documented by this <code>ObjDoc</code>.
<br /><i>
(type=<code>list</code> of (<a
href="epydoc.uid.Link-class.html"
class="link"><code>Link</code></a> or <a
href="epydoc.objdoc.Var-class.html"
class="link"><code>Var</code></a> or <a
href="epydoc.objdoc.ObjDoc-class.html"
class="link"><code>ObjDoc</code></a>))</i>
</dd>
</dl>
<dl><dt><b>Returns:</b></dt>
<dd>
A list of tuples of the form <code>(name, members)</code>,
where <code>name</code> is the name of a group; and
<code>members</code> is a list of the elements in
<code>elts</code> that are in the group. Group membership is
tested with the <code>elt.name()</code> method, so every element
in <code>elts</code> must define that method.
<br /><i>
(type=<code>list</code> of <code>(string, elt)</code>)</i>
</dd>
</dl>
</dd></dl>
</td></tr></table>
<a name="has_docstring"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">has_docstring</span>(<span class=sig-arg>self</span>)</span>
</h3>
<dl><dt></dt><dd>
<dl><dt><b>Returns:</b></dt>
<dd>
True if the object documented by this <code>ObjDoc</code> has
a docstring.
<br /><i>
(type=<code>boolean</code>)</i>
</dd>
</dl>
</dd></dl>
</td></tr></table>
<a name="summary"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">summary</span>(<span class=sig-arg>self</span>)</span>
</h3>
<dl><dt></dt><dd>
<dl><dt><b>Returns:</b></dt>
<dd>
A summary of the description of the object documented by this
<code>ObjDoc</code>.
<br /><i>
(type=<a href="epydoc.markup.ParsedDocstring-class.html"
class="link"><code>markup.ParsedDocstring</code></a>)</i>
</dd>
</dl>
</dd></dl>
</td></tr></table>
<a name="defines_groups"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">defines_groups</span>(<span class=sig-arg>self</span>)</span>
</h3>
<dl><dt></dt><dd>
<dl><dt><b>Returns:</b></dt>
<dd>
True if the object documented by this <code>ObjDoc</code>
defines any groups.
<br /><i>
(type=<code>boolean</code>)</i>
</dd>
</dl>
</dd></dl>
</td></tr></table>
<a name="__init__"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">__init__</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>uid</span>,
<span class=sig-arg>verbosity</span>=<span class=sig-default>0</span>,
<span class=sig-arg>docstring</span>=<span class=sig-default>None</span>)</span>
<br /><i>(Constructor)</i>
</h3>
Create the documentation for the given object.
<dl><dt></dt><dd>
<dl><dt><b>Parameters:</b></dt>
<dd><code><b>uid</b></code> -
The UID of the object to document.
<br /><i>
(type=<a href="epydoc.uid.UID-class.html"
class="link"><code>UID</code></a>)</i>
<dd><code><b>verbosity</b></code> -
The verbosity of output produced when creating documentation
for the object. More positive numbers produce more verbose
output; negative numbers supress warnings and errors.
<br /><i>
(type=<code>int</code>)</i>
</dd>
</dl>
</dd></dl>
</td></tr></table>
<br />
<!-- =========== START OF CLASS VARIABLE DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
<th colspan="2">Class Variable Details</th></tr>
</table>
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
<a name="STANDARD_FIELDS"></a>
<h3>STANDARD_FIELDS</h3>
The list of standard docstring fields that epydoc accepts. The order
of fields is significant: when the fields are rendered, they will be
listed in the order that they are given in this list. Note that this list
does <a name="index-not"></a><i class="indexterm">not</i> include special
fields, such as "group"; it just includes "simple"
fields, which contain a single textual description or a list of textual
descriptions.
<dl>
<dt></dt>
<dd>
<dl>
<dt><b>Type:</b></dt>
<dd>
<code>List</code> of <a
href="epydoc.objdoc.DocField-class.html"
class="link"><code>DocField</code></a>
</dd>
<span title="[<Field: depreciated>, <Field: version>, <Field: date>, <Field: status>, <Field: author>, <Field: contact>, <Field: organization>, <Field: copyright>, <Field: license>, <Field: bug>, <Field: warning>, <Field: attention>, <Field: note>, <Field: requires>, <Field: precondition>, <Field: postcondition>, <Field: invariant>, <Field: since>, <Field: see>, <Field: todo>]"> <dt><b>Value:</b></dt>
<dd><table><tr><td>
<pre class="variable">
[<Field: depreciated>,
<Field: version>,
<Field: date>,
<Field: status>,
<Field: author>,
<Field: contact>,
<Field: organization>,
<Field: copyright>,
<span class="variable-ellipsis">...</span> </pre>
</td></tr></table></dd>
</span> </dl>
</dd>
</dl></td></tr></table>
<br />
<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
<tr valign="center">
<th class="navbar"> <a class="navbar" href="epydoc-module.html">Home</a> </th>
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center">
<p class="nomargin">
<a class="navbar" target="_top" href="http://epydoc.sourceforge.net">epydoc 2.0</a>
</p></th></tr></table>
</th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left"><font size="-2">Generated by Epydoc 2.1 on Sat Mar 20 17:46:17 2004</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
</table>
</body>
</html>
|