Home | Trees | Indices | Help |
|
---|
|
object --+ | dict --+ | Registry
The registry store a set of implementations associated to identifier: * to each identifier are associated a list of implementations * to select an implementation of a given identifier, you should use one of the :meth:`select` or :meth:`select_or_none` method * to select a list of implementations for a context, you should use the :meth:`possible_objects` method * dictionary like access to an identifier will return the bare list of implementations for this identifier. To be usable in a registry, the only requirement is to have a `__select__` attribute. At the end of the registration process, the :meth:`__registered__` method is called on each registered object which have them, given the registry in which it's registered as argument. Registration methods: .. automethod: register .. automethod: unregister Selection methods: .. automethod: select .. automethod: select_or_none .. automethod: possible_objects .. automethod: object_by_id
Instance Methods | |||
new empty dictionary |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
Properties | |
Inherited from |
Method Details |
x.__init__(...) initializes x; see help(type(x)) for signature
|
return the registry (list of implementation objects) associated to this name
|
return object with the `oid` identifier. Only one object is expected to be found. raise :exc:`ObjectNotFound` if not object with id <oid> in <registry> raise :exc:`AssertionError` if there is more than one object there |
return the most specific object among those with the given oid according to the given context. raise :exc:`ObjectNotFound` if not object with id <oid> in <registry> raise :exc:`NoSelectableObject` if not object apply |
return an iterator on possible objects in this registry for the given context |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Jun 9 16:06:30 2012 | http://epydoc.sourceforge.net |