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)
Inherited from ObjDoc: _sort
    Accessors
boolean is_exception(self)
Return true if this ClassDoc documents an exception class.
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 classmethods(self)
Return a list of all class methods defined by the class documented by this ClassDoc, sorted by name.
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 properties(self)
Return a list of all properties defined by the class documented by this ClassDoc, sorted by name.
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 Var cvariables(self)
Return a list of all class variables defined by the class documented by this ClassDoc, sorted by name.
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 bases(self)
Return a list of all base classes for 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.
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 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.
Inherited from ObjDoc: by_group, defines_groups, descr, field_values, fields, groups, has_docstring, sortorder, summary, uid
    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.
None _inherit_vars(self, base_docs)
Add inherited class and instance variables to this ClassDoc.
None _inherit_groups(self, base_docs)
Inherit groups from the given list of ClassDocs.
  _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.
    Error Handling
Inherited from ObjDoc: _print_errors
    Docstring Parsing
  _process_field(self, tag, arg, descr, warnings)
Process a field from this object's docstring.

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: _uid
    Error Handling
Inherited from ObjDoc: _field_warnings, _misc_warnings, _parse_errors, _parse_warnings
    Docstring Parsing
Inherited from ObjDoc: _descr, _fields

Class Variable Summary
    Docstring Parsing
Inherited from ObjDoc: STANDARD_FIELDS

Method Details

is_exception(self)

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

methods(self)

Returns:
A list of all (instance) methods defined by 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)

staticmethods(self)

Returns:
A list of all static 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)

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

cvariables(self)

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

ivariables(self)

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

bases(self)

Returns:
A list of all base classes for 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)

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)

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)

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

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

_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

_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

_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.

_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:
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.1 on Sat Mar 20 17:46:16 2004 http://epydoc.sf.net