| Home | Trees | Indices | Help |
|
|---|
|
|
Various decorators to ease delegation
|
|||
|
|||
|
|||
|
|||
_logger = logging.getLogger("pytilities.delegation")
|
|||
__package__ =
|
|||
|
|||
Makes a `DelegatorFactory` on the class and adds profiles to it.
The factory is stored as a class attribute with name _delegator_factory.
`Profile`s are created based on the annotations left by `delegated`.
After the `Profile`s are created, __init_delegation_profiles(profiles) is
called, if it exists. It is a static method found on the decorated class.
The `profiles` parameter is of type {name::string: ::Profile}. You can
modify the profiles as you like, these are the profiles that will be added
to the DelegatorFactory after the call. At the time of this call
_delegator_factory does not exist yet.
Parameters:
`bases` :: iter(cls...)
classes that have a _delegator_factory attribute. Classes that
contain base factories for this factory, see `DelegatorFactory` for
more info on base factories.
|
Includes the decorated attribute in the specified delegation profile.
Parameters:
`profile_name` :: string
name of the `Profile` to add the attribute to
`modifiers` :: string
the types of access to delegate to the target. Possible modifiers
are combinations of:
- `r`: read
- `w`: write
- `d`: delete
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0 on Mon Jul 19 11:49:29 2010 | http://epydoc.sourceforge.net |