epydoc.objdoc.ClassDoc

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:

- bases: A list of the class's base classes.
- subclasses: A list of the class's known subclasses.
- methods: A list of the methods defined by the class.
- staticmethods: A list of static methods defined by the class.
- classmethods: A list of class methods defined by the class.
- properties: A list of properties defined by the class.
- ivariables: A list of the instance variables defined by the class.
- cvariables: A list of the class variables defined by the class.
- module: The module that defines the class.

Method Summary
| `__init__(self, uid, verbosity)`
| `__repr__(self)`
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`.

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 `ClassDoc`s for every base ancestor of the class documented by this `ClassDoc`. These should be the `ClassDoc`s 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`

Generated by Epydoc 2.1 on Sat Mar 20 17:46:16 2004 | http://epydoc.sf.net