CADETProcess.dataStructure.cache.CachedPropertiesMixin

CADETProcess.dataStructure.cache.CachedPropertiesMixin#

class CADETProcess.dataStructure.cache.CachedPropertiesMixin(_lock)[source]#

Mixin class for caching properties in a structured object.

This class is designed to be used as a mixin in conjunction with other classes inheriting from Structure. It provides functionality for caching properties and managing a lock state to control the caching behavior.

Attributes:
aggregated_parameters

dict: Aggregated parameters of the instance.

lock

bool: If True, properties are cached. False otherwise.

missing_parameters

list: Parameters that are required but not set.

parameters

dict: Parameters of the instance.

polynomial_parameters

dict: Polynomial parameters of the instance.

required_parameters

list: Parameters that have no default value.

sized_parameters

dict: Sized parameters of the instance.

Methods

check_required_parameters()

Verify if all required parameters are set.

Notes

  • To prevent the return of outdated state, the cache is cleared whenever the lock state is changed.