CADETProcess.dataStructure.parameter.ParameterBase

Contents

CADETProcess.dataStructure.parameter.ParameterBase#

class CADETProcess.dataStructure.parameter.ParameterBase(*args, default=None, is_optional=False, unit=None, description=None, **kwargs)[source]#

Base class for model parameters with potential constraints or type-casting.

Unlike mere data members, parameters can have default values, support type constraints, and cast from certain types to their target type.

See also

Descriptor
Structure
Constant
Switch
Typed
Bool
Integer
Tuple
Float
String
Dictionary

Notes

  1. Supports deep copying of default values, allowing mutable defaults without side effects.

  2. Subclasses can further specify type constraints (like Typed).

  3. They can also define immutable parameters (like Constant) and options-based parameters (Switch).

Attributes:
defaultAny

Any: Get or set the default value of the parameter.

unitstr

Unit of the parameter.

descriptionstr

Description or context of the parameter.

Methods

get_default_value(instance)

Return default values if necessary.