[show private | hide private]

epydoc.objdoc
Class epydoc.objdoc.DocMap

UserDict --+
           |
          DocMap


A dictionary mapping each object to the object's documentation. Typically, modules or classes are added to the DocMap using add, which adds an object and everything it contains. For example, the following code constructs a documentation map, adds the module "epydoc.epytext" to it, and looks up the documentation for "epydoc.epytext.parse":
>>> docmap = DocMap()               # Construct a docmap
>>> docmap.add(epydoc.epytext)      # Add epytext to it
>>> docmap[epydoc.epytext.parse]    # Look up epytext.parse
<FuncDoc: epydoc.epytext.parse (3 parameters; 1 exceptions)>

Method Summary
  __init__(self, verbosity, document_bases)
Create a new empty documentation map.
  __cmp__(self, dict)
(inherited from UserDict)
  __delitem__(self, key)
(inherited from UserDict)
ObjDoc __getitem__(self, key)
Return the documentation for the given object; or the object identified by key, if key is a UID.
  __len__(self)
(inherited from UserDict)
  __repr__(self)
  __setitem__(self, key, item)
(inherited from UserDict)
None add(self, obj)
Add the documentation for an object, and everything contained by that object, to this documentation map.
None add_one(self, obj)
Add an object's documentation to this documentation map.
  clear(self)
(inherited from UserDict)
  copy(self)
(inherited from UserDict)
  get(self, key, failobj)
(inherited from UserDict)
  has_key(self, key)
(inherited from UserDict)
  items(self)
(inherited from UserDict)
  keys(self)
(inherited from UserDict)
  popitem(self)
(inherited from UserDict)
  setdefault(self, key, failobj)
(inherited from UserDict)
list of UID top(self)
Return the list of top-level objects documented by this documentation map.
  update(self, dict)
(inherited from UserDict)
  values(self)
(inherited from UserDict)

Method Details

Constructor

__init__(self, verbosity=0, document_bases=1)

Create a new empty documentation map.
Parameters:
verbosity - The verbosity of output produced when creating documentation for objects. More positive numbers produce more verbose output; negative numbers supress warnings and errors.
           (type=int)
document_bases - Whether or not documentation should automatically be built for the bases of classes that are added to the documentation map.
           (type=boolean)
Overrides:
UserDict.UserDict.__init__

Indexing operator

__getitem__(self, key)

Parameters:
key - The object whose documentation should be returned.
           (type=any)
Returns:
The documentation for the given object; or the object identified by key, if key is a UID.
           (type=ObjDoc)
Raises:
KeyError - If the documentation for the object identified by key is not contained in this documentation map.
Overrides:
UserDict.UserDict.__getitem__

Representation operator

__repr__(self)

Overrides:
UserDict.UserDict.__repr__ (inherited documentation)

add

add(self, obj)

Add the documentation for an object, and everything contained by that object, to this documentation map.
Parameters:
obj - The object whose documentation should be added to this documentation map.
           (type=any)
Returns:
None

add_one

add_one(self, obj)

Add an object's documentation to this documentation map. If you also want to include the objects contained by obj, then use add.
Parameters:
obj - The object whose documentation should be added to this documentation map.
           (type=any)
Returns:
None

top

top(self)

Returns:
The list of top-level objects documented by this documentation map. The top-level objects are those that are not contained (as sub-packages, module contents, class contents, etc) by any other objects in the documentation map.
           (type=list of UID)

Generated by Epydoc on Sun Oct 6 03:32:13 2002 http://epydoc.sf.net