Home | Trees | Index | Help |
---|
Package twisted :: Package python :: Module components |
|
Classes | |
---|---|
Interface |
Base class for interfaces. |
Componentized |
I am a mixin to allow you to be adapted in various ways persistently. |
Adapter |
I am the default implementation of an Adapter for some interface. |
_default |
|
_Nothing |
Function Summary | |
---|---|
Return boolean indicating if obj implements the given interface. | |
Return list of all interfaces a class implements. | |
Given an interface, return list of super-interfaces (including itself). | |
Register an adapter class. | |
Return registered adapter for a given class and interface. | |
Return an object that implements the given interface. | |
Return registered adapter for a given class and interface. | |
Convert an instance, or tree of tuples, into list. |
Variable Summary | |
---|---|
dictionary |
adapterRegistry
|
Function Details |
---|
getAdapter(obj, interfaceClass, default=<class twisted.python.components._default at..., adapterClassLocator=None)Return an object that implements the given interface. The result will be a wrapper around the object passed as a paramter, or the parameter itself if it already implements the interface. If no adapter can be found, the 'default' parameter will be returned. |
getAdapterClass(klass, interfaceClass, default)Return registered adapter for a given class and interface. |
getAdapterClassWithInheritance(klass, interfaceClass, default)Return registered adapter for a given class and interface. |
getInterfaces(obj)Return list of all interfaces a class implements. |
implements(obj, interfaceClass)Return boolean indicating if obj implements the given interface. |
registerAdapter(adapterClass, origClass, interfaceClass)Register an adapter class. An adapter class is expected to implement the given interface, by adapting instances of paramter 'origClass'. An adapter class's __init__ method should accept one parameter, an instance of 'origClass'. |
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 |
---|
Home | Trees | Index | Help |
---|
Generated by Epydoc 1.1 on Sat Feb 15 21:19:16 2003 | http://epydoc.sf.net |