Component Interface
This module provides an interface to the ComponentManager.
- class vivarium.engine.framework.components.interface.ComponentInterface(manager)[source]
The builder interface for the component manager system.
- Parameters:
manager (ComponentManager)
- get_component(name)[source]
Get the component or manager that has
nameif presently held by the component manager. Names are guaranteed to be unique.
- get_components_by_type(component_type)[source]
Get all components that are an instance of
component_type.
- get_current_component()[source]
Get the component currently being set up, if any.
This method is primarily used internally by the framework to support automatic component injection in interface methods.
- Return type:
- Returns:
The component currently being set up.
- Raises:
LifeCycleError – If there is no component currently being set up.
- get_current_component_or_manager()[source]
Get the component or manager currently being set up, if any.
This method exists to allow for cases where a manager is needed during setup, such as if a manager creates a Value Pipeline.
- Return type:
- Returns:
The component or manager currently being set up.
- Raises:
LifeCycleError – If there is no component or manager currently being set up.