Home | Trees | Indices | Help |
|
---|
|
object --+ | DelegatorFactory
Allows easy creation of delegators with `Profile`s. It also supports a form of inheritance. By specifying base factories, a factory extends its bases' profiles (it takes the union of all base profiles and its own). Using the inheritance you can add new profiles and add attributes to existing profiles; you cannot, however, override attributes. Instance methods: - `add_delegator_profile`: Add a `Profile` - `Delegator`: Construct a `Delegator` from a stored profile - `has_profile`: See if we have a particular profile - `get_profile`: Get profile by name Class invariants: - Every profile has a unique name
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
Construct a `DelegatorFactory`, optionally with bases to inherit from. Parameters: `bases` :: (::DelegatorFactory...) base factories for the created factory
|
Add a new delegator factory `Profile` to the factory. Parameters: `name` :: string name of the profile `profile` :: Profile the profile to add |
Construct a delegator with a stored `Profile`. Parameters: `profile_name` :: string name of the `Profile` to use to set up the delegator with `target` = None target of the newly created delegator Returns newly created delegator :: Delegator Raises: - `ValueError` when no profile with name `profile_name` exists |
See if profile with given name exists. Parameters: `name` :: string name of the profile to look for Returns True if the factory can find a profile by that name, False otherwise |
Get profile by name. Parameters: `name` :: string name of the profile Returns profile by name, taking into account base factories' profiles :: Profile Raises: - `ValueError` when profile isn't found |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0 on Mon Jul 19 11:49:29 2010 | http://epydoc.sourceforge.net |