pyxc.core.layer_manager
Module Contents
Classes
Manages layer objects in an ordered dictionary for easy access and operation. |
- class pyxc.core.layer_manager.LayerRegistry[source]
Bases:
collections.OrderedDictManages layer objects in an ordered dictionary for easy access and operation.
- register(layer_object: Type[pyxc.core.layer.Layer], desired_name: str | None = None)[source]
Register a Layer object in the LayerRegistry.
The registered layer can be accessed iteratively and be manipulated using other LayerRegistry methods.
- Parameters:
- layer_object
Layer Layer object to be registered.
- desired_name
str, optional Desired name of the layer. If not specified, the default name will be assigned.
- layer_object
- Raises:
KeyErrorIf the layer is already registered.
ValueErrorIf the desired name is already occupied.
- broadcast(action: str, *args, **kwargs) NoReturn[source]
Perform a specified action on all registered layers.
This function can be used to apply any method supported by the Layer class to all registered layers.
- Parameters:
- action
str Action to be performed on all registered layers.
- *args
Arguments to be passed on the action.
- **kwargs
Keyword arguments to be passed on the action.
- action
- scan(*desired_properties) dict[source]
Get specified properties from all registered Layer objects.
This function can be used to access any property supported by the Layer class from all registered layers.
- Parameters:
- *desired_properties
str Properties to be accessed from all registered layers.
- *desired_properties
- abstract static status_update(during_operation: str, after_completion: str = 'idle')[source]
Update the status of the LayerRegistry. Currently not implemented.
- request_deletion(layer_object: pyxc.core.layer.Layer) NoReturn[source]
Delete a registered layer from the LayerRegistry.
- Parameters:
- layer_object
Layer Layer object to be deleted.
- layer_object
- Raises:
KeyErrorIf the layer is not found in the LayerRegistry.