synthpic2.recipe.registries¶
Module for registries and Registry class, used to register recipe components.
Submodules¶
Package Contents¶
Classes¶
Registry for objects. |
|
Mixin for attrs classes, so that they register themselves in a predefined |
Functions¶
|
Attributes¶
- synthpic2.recipe.registries.clear_all_registries() None¶
- synthpic2.recipe.registries.CRITERION_REGISTRY¶
- synthpic2.recipe.registries.FEATURE_VARIABILITY_REGISTRY¶
- synthpic2.recipe.registries.GEOMETRY_PROTOTYPE_REGISTRY¶
- synthpic2.recipe.registries.MATERIAL_PROTOTYPE_REGISTRY¶
- synthpic2.recipe.registries.MEASUREMENT_TECHNIQUE_BLUEPRINT_REGISTRY¶
- synthpic2.recipe.registries.MEASUREMENT_TECHNIQUE_PROTOTYPE_REGISTRY¶
- synthpic2.recipe.registries.MEASUREMENT_TECHNIQUE_REGISTRY¶
- synthpic2.recipe.registries.PARTICLE_BLUEPRINT_REGISTRY¶
- synthpic2.recipe.registries.PARTICLE_REGISTRY¶
- synthpic2.recipe.registries.REGISTRIES¶
- synthpic2.recipe.registries.SET_REGISTRY¶
- synthpic2.recipe.registries.STATE_REGISTRY¶
- class synthpic2.recipe.registries.Registry(name: str | None = None)¶
Registry for objects.
- clear() None¶
- register(item: Any) None¶
Register a new item.
- Args:
item (Any): item to be registered
- validate(item: Any) None¶
Validate a new item.
- Args:
item (Any): item to be validated
- query(name: Index | None, strict: bool = False) Any¶
Return an item with a given name from the registry.
- Args:
name (Index): name or integer index of the desired item, optional strict (bool): if True, then an error will be raised if the item is not
found in the registry
- Returns:
- Optional[_Prototype]: Item or None, if the item does not exist in the
registry.
- delete_item(index: Index) None¶
- __iter__() Iterator¶
- __next__() Any¶
- __getitem__(index: Index | None) Any¶
- __len__() int¶
- __contains__(name: str) bool¶
- class synthpic2.recipe.registries.SelfRegisteringAttrsMixin¶
Bases:
abc.ABCMixin for attrs classes, so that they register themselves in a predefined registry, after they have been initialized.
- abstract property _registry: synthpic2.recipe.registries.registry.Registry¶
- __attrs_post_init__() None¶