Skip to content

termination_condition_adapter

TerminationConditionAdapterClassFactory

Acts as a proxy to the the 'class maker' function by returning a memoized class.

Source code in src/artificial_artwork/termination_condition_adapter.py
72
73
74
75
76
77
78
79
class TerminationConditionAdapterClassFactory:
    """Acts as a proxy to the the 'class maker' function by returning a memoized class."""

    classes_pool = ObjectsPool(new_class)

    @classmethod
    def create(cls, adapter_type: str):
        return cls.classes_pool.get_object(adapter_type)