Package lemon :: Package external :: Package epydoc :: Module objdoc :: Class ClassDoc
[show private | hide private]
[frames | no frames]

Class ClassDoc

ObjDoc --+
         |
        ClassDoc


The documentation for a class. This documentation consists of standard pieces of documentation (as defined in ObjDoc), and the following class-specific pieces of documentation:
Method Summary
  __init__(self, uid, verbosity)
  __repr__(self)
  _process_field(self, tag, arg, descr, warnings)
Process a field from this object's docstring.
    Accessors
list of Link allmethods(self)
Return a list of all instance, class, and static methods defined by the class documented by this ClassDoc, sorted by name.
list of UID base_order(self)
Return a list of all base ancestors of the class documented by this ClassDoc, listed in the order that they are searched by Python for members.
list of Link bases(self)
Return a list of all base classes for the class documented by this ClassDoc, sorted by name.
list of Link classmethods(self)
Return a list of all class methods defined by the class documented by this ClassDoc, sorted by name.
list of Var cvariables(self)
Return a list of all class variables defined by the class documented by this ClassDoc, sorted by name.
boolean is_exception(self)
Return true if this ClassDoc documents an exception class.
list of Var ivariables(self)
Return a list of all instance variables defined by the class documented by this ClassDoc, sorted by name.
list of Link methods(self)
Return a list of all (instance) methods defined by the class documented by this ClassDoc, sorted by name.
list of Link properties(self)
Return a list of all properties defined by the class documented by this ClassDoc, sorted by name.
markup.ParsedDocstring or None property_type(self, uid)
Return the type for the given property, as specified by the docstring of the class documented by this ClassDoc.
list of Link staticmethods(self)
Return a list of all static methods defined by the class documented by this ClassDoc, sorted by name.
list of Link subclasses(self)
Return a list of known subclasses for the class documented by this ClassDoc, sorted by name.
    Inheritance
None add_subclasses(self, classes)
Register subclasses for the class doumented by this ClassDoc.
None inherit(self, base_docs, inheritance_groups, inherit_groups)
Add inherited variables and groups to this ClassDoc.
  _add_inheritance_groups(self)
For each base class that this class inherits from, create a group that includes all methods, properties, and variables that were inherited from that base.
None _inherit_groups(self, base_docs)
Inherit groups from the given list of ClassDocs.
None _inherit_vars(self, base_docs)
Add inherited class and instance variables to this ClassDoc.
    Inherited from ObjDoc
list of (string, elt) by_group(self, elts)
Divide a set of elements into groups.
boolean defines_groups(self)
Return true if the object documented by this ObjDoc defines any groups.
markup.ParsedDocstring descr(self)
Return a description of the object documented by this ObjDoc.
list of markup.ParsedDocstring field_values(self, field)
Return a list of the values that are specified for the given field in the docstring of the object documented by this ObjDoc.
list of DocField fields(self)
Return a list of the fields that are given values in the docstring of the object documented by this ObjDoc.
list of string groups(self)
Return a list of the names of the groups that are defined for the object documented by this ObjDoc.
boolean has_docstring(self)
Return true if the object documented by this ObjDoc has a docstring.
list of string sortorder(self)
Return a list specifying the sort order that should be used for the object's children.
markup.ParsedDocstring summary(self)
Return a summary of the description of the object documented by this ObjDoc.
UID uid(self)
Return the UID of the object documented by this ObjDoc.
None _print_errors(self, stream)
Print any errors that were encountered while constructing this ObjDoc to stream.
  _sort(self, items)
Return a copy of the list items, sorted first by sortorder, and then by name.

Instance Variable Summary
list of Link _bases: A list of the identifiers of this class's bases.
list of Var _cvariables: A list of all class variables defined by this class.
list of Var _ivariables: A list of all instance variables defined by this class.
list of Link _methods: A list of all methods contained in this class.
    Inherited from ObjDoc
markup.ParsedDocstring _descr: The object's description, encoded as epytext.
  _field_warnings: Warnings generated when processing the object's docstring's fields.
dictionary from DocField to list of markup.ParsedDocstring _fields: Documentation fields that were extracted from the object's docstring.
  _misc_warnings: Warnings that are not related to the object's docstring.
  _parse_errors: Errors generated when parsing the object's docstring.
  _parse_warnings: Warnings generated when parsing the object's docstring.
UID _uid: The object's unique identifier

Class Variable Summary
    Inherited from ObjDoc
List of DocField STANDARD_FIELDS: The list of standard docstring fields that epydoc accepts.

Method Details

add_subclasses(self, classes)

Register subclasses for the class doumented by this ClassDoc. This must be done externally, since we can't determine a class's subclasses through introspection alone. This is automatically called by DocMap.add when new classes are added to a DocMap.
Parameters:
classes - A list of subclasses.
           (type=list of UID)
Returns:
None

allmethods(self)

Returns:
A list of all instance, class, and static methods defined by the class documented by this ClassDoc, sorted by name.
           (type=list of Link)
See Also:
methods, staticmethods, classmethods

base_order(self)

Returns:
A list of all base ancestors of the class documented by this ClassDoc, listed in the order that they are searched by Python for members. The first element of this list will always be the UID of the class documented by this ClassDoc.
           (type=list of UID)

bases(self)

Returns:
A list of all base classes for the class documented by this ClassDoc, sorted by name.
           (type=list of Link)

classmethods(self)

Returns:
A list of all class methods defined by the class documented by this ClassDoc, sorted by name.
           (type=list of Link)

cvariables(self)

Returns:
A list of all class variables defined by the class documented by this ClassDoc, sorted by name.
           (type=list of Var)

inherit(self, base_docs, inheritance_groups, inherit_groups)

Add inherited variables and groups to this ClassDoc. To search for inherited variables and groups, inherit uses a list of the documentation objects for every base ancestor of the class documented by this ClassDoc. Typical usage is:
>>> doc.inherit([docmap[b] for b in doc.base_order()])
Parameters:
base_docs - A list of the ClassDocs for every base ancestor of the class documented by this ClassDoc. These should be the ClassDocs for the classes returned by base_order, in the order that they are returned by base_order.
           (type=list of ClassDoc)
inheritance_groups - If true, then create a group for each base ancestor, containing the members that are inherited from that base. These groups have names of the form 'Inherited from base'.
           (type=boolean)
inherit_groups - If true, then inherit groups from the base ancestors.
           (type=boolean)
Returns:
None

is_exception(self)

Returns:
True if this ClassDoc documents an exception class.
           (type=boolean)

ivariables(self)

Returns:
A list of all instance variables defined by the class documented by this ClassDoc, sorted by name.
           (type=list of Var)

methods(self)

Returns:
A list of all (instance) methods defined by the class documented by this ClassDoc, sorted by name.
           (type=list of Link)

properties(self)

Returns:
A list of all properties defined by the class documented by this ClassDoc, sorted by name.
           (type=list of Link)

property_type(self, uid)

Returns:
The type for the given property, as specified by the docstring of the class documented by this ClassDoc. If the docstring doesn't specify a type, then None is returned. (But note that the property can also specify its type in its own docstring).
           (type=markup.ParsedDocstring or None)

staticmethods(self)

Returns:
A list of all static methods defined by the class documented by this ClassDoc, sorted by name.
           (type=list of Link)

subclasses(self)

Returns:
A list of known subclasses for the class documented by this ClassDoc, sorted by name.
           (type=list of Link)

_add_inheritance_groups(self)

For each base class that this class inherits from, create a group that includes all methods, properties, and variables that were inherited from that base.

_inherit_groups(self, base_docs)

Inherit groups from the given list of ClassDocs. These should be the ClassDocs for the classes returned by base_order, in the order that they are returned by base_order.
Parameters:
base_docs - The documentation for the
           (type=list of ClassDoc)
Returns:
None

_inherit_vars(self, base_docs)

Add inherited class and instance variables to this ClassDoc. To search for inherited variables, inherit_vars uses a list of the documentation objects for every base ancestor of the class documented by this ClassDoc.
Parameters:
base_docs - A list of the ClassDocs for every base ancestor of the class documented by this ClassDoc. These should be the ClassDocs for the classes returned by base_order, in the order that they are returned by base_order.
           (type=list of ClassDoc)
Returns:
None

_process_field(self, tag, arg, descr, warnings)

Process a field from this object's docstring. ObjDoc._process_field be overridden by child classes of ObjDoc, and called as the default case.
Parameters:
tag - The field's tag name
           (type=string)
arg - The field's optional argument (or None if no argument was specified).
           (type=string)
descr - The field's body.
           (type=markup.ParsedDocstring)
warnings - A list of warnings that have been encountered. If any new warnings are encountered, then they should be appended to this list.
Overrides:
lemon.external.epydoc.objdoc.ObjDoc._process_field (inherited documentation)

Instance Variable Details

_bases

A list of the identifiers of this class's bases.
Type:
list of Link

_cvariables

A list of all class variables defined by this class.
Type:
list of Var

_ivariables

A list of all instance variables defined by this class.
Type:
list of Var

_methods

A list of all methods contained in this class.
Type:
list of Link

Generated by Epydoc 2.0 on Mon Nov 10 15:08:08 2003 http://epydoc.sf.net