Home | Trees | Indices | Help |
|
---|
|
object --+ | ClassWithParameters
Base class for any class that uses parameters. Any class that uses parameters potentially modifiable in realtime should be a subclass of ClassWithParameters. This class enforces type checking and sets default values. Any subclass of ClassWithParameters can define two class (not instance) attributes, "parameters_and_defaults" and "constant_parameters_and_defaults". These are dictionaries where the key is a string containing the name of the parameter and the the value is a tuple of length 2 containing the default value and the type. For example, an acceptable dictionary would be {"parameter1" : (1.0, ve_types.Real)} See the ParameterTypes module for more information about types.
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
Class Variables | |
parameters_and_defaults = ParameterDefinition({})
|
|
constant_parameters_and_defaults = ParameterDefinition({})
|
|
__safe_for_unpickling__ = True
|
Properties | |
Inherited from |
Method Details |
Create self.parameters and set values.
|
Set a parameter with type-checked value This is the slow but safe way to set parameters. It is recommended to use this method in all but speed-critical portions of code. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Sat Jun 7 09:06:46 2008 | http://epydoc.sourceforge.net |