Package twisted :: Package python :: Module components |
[show private | hide private]
[frames | no frames]

## Module twisted.python.components

Component architecture for Twisted.

Classes
`Componentized` | I am a mixin to allow you to be adapted in various ways persistently.
`AdapterRegistry` |
`Adapter` | I am the default implementation of an Adapter for some interface.
`MetaInterface` |
`_Nothing` | An alternative to None - default value for functions which raise if default not passed.
`_ThingWithTwoSlots` |

Exceptions
`CannotAdapt` | Can't adapt some object to some Interface.

Function Summary
| ``implements`(obj, interfaceClass)` Return boolean indicating if obj implements the given interface.
| ``getInterfaces`(obj)` Return list of all interfaces a class implements.
| ``superInterfaces`(interface)` Given an interface, return list of super-interfaces (including itself).
| `classToInterfaces(k)`
| `getRegistry(r)`
| ``tupleTreeToList`(t, l)` Convert an instance, or tree of tuples, into list.

Variable Summary
`MetaInterface` | `Interface`
`instance method` | `registerAdapter`
`instance method` | `getAdapter`
`int` | `ALLOW_DUPLICATES`
`instance method` | `getAdapterClassWithInheritance`
`instance method` | `getAdapterFactory`
`AdapterRegistry` | `theAdapterRegistry`

Function Details

### getInterfaces(obj) Return list of all interfaces a class implements.

### implements(obj, interfaceClass) Return boolean indicating if obj implements the given interface.

### superInterfaces(interface) Given an interface, return list of super-interfaces (including itself).

### tupleTreeToList(t, l=None) Convert an instance, or tree of tuples, into list.

Variable Details

    ### ALLOW_DUPLICATES Type: `int` Value:
        0

### getAdapter `getAdapter` = `twisted.python.components.AdapterRegistry.getAdapter`

### getAdapterClassWithInheritance `getAdapterClassWithInheritance` = `twisted.python.components.AdapterRegistry.getAdapterClassWithInheritance`

### getAdapterFactory `getAdapterFactory` = `twisted.python.components.AdapterRegistry.getAdapterFactory`

    ### Interface Type: `MetaInterface` Value:
        <class 'twisted.python.components.Interface'>

### registerAdapter `registerAdapter` = `twisted.python.components.AdapterRegistry.registerAdapter`

    ### theAdapterRegistry Type: `AdapterRegistry` Value:
        <twisted.python.components.AdapterRegistry instance at 0x82b2de4>

Generated by Epydoc 1.1 on Thu May 8 13:18:56 2003 | http://epydoc.sf.net