CADETProcess.dataStructure.dataStructure.StructMeta

Contents

CADETProcess.dataStructure.dataStructure.StructMeta#

class CADETProcess.dataStructure.dataStructure.StructMeta(clsname, bases, clsdict)[source]#

Metaclass for creating classes that use Descriptors.

This metaclass enables classes to have ordered descriptors and provides additional functionality related to descriptor management. The underlying structure uses an OrderedDict to maintain the order of class attributes.

The metaclass mainly interacts with the Descriptor class, and classes that use this metaclass can benefit from this specialized handling of descriptors.

See also

Structure

Base class that typically uses this metaclass.

Descriptor

Class that represents the descriptors this metaclass operates on.

Parameters

Base class for model parameters with e.g. type or bound constraints.

Attributes:
_descriptorslist

List of descriptors associated with a class.

_parameterslist

List of parameters aggregated from the class and its bases.

_sized_parameterslist

List of parameters that have a size attribute.

_polynomial_parameterslist

List of parameters with fill_values attribute.

_aggregated_parameterslist

List of parameters that aggregate other instances parameters.

_required_parameterslist

List of parameters that have a default value of None.

Methods

__prepare__(name, bases) -> OrderedDict

Prepares the namespace for the class body to be executed.