|
gstlal 1.13.0
|
Classes | |
| class | ElementRegistry |
| class | RegisteredElement |
Functions | |
| str | module_name (types.FunctionType func) |
| str | generate_registered_method_source (List[RegisteredElement] elements=None) |
Variables | |
| lloidparts = None | |
| list | PIPEPARTS_ELEMENTS |
| list | CONDITION_ELEMENTS |
| list | LLOIDPARTS_ELEMENTS |
| list | ALL_ELEMENTS = PIPEPARTS_ELEMENTS + CONDITION_ELEMENTS + LLOIDPARTS_ELEMENTS |
Utilities for registering elements to a mixin class that can call elements as methods
Motivation:
1. Inspectability
By making each method statically as opposed to dynamically (from registry list), the full traceback is inspectable
before runtime, allowing for easier development and clearer, more concise readability.
1. Performance
Dynamically setting methods on import is inefficient, though it is clever
| str generate_registered_method_source | ( | List[RegisteredElement] | elements = None | ) |
This function is only to be used when making changes to the element registry, though it is also
allowed to edit the ElementRegistry class directly. This function helps automatically generate the method
source code for the ElementRegistry class using the attributes of the registered elements.
Args:
elements:
List[RegisteredElement], default None, if None use ALL_ELEMENTS registered below
Returns:
str
Definition at line 460 of file element_registry.py.
| str module_name | ( | types.FunctionType | func | ) |
Get a functions module name
Args:
func:
Function, the function for which to find module name
Returns:
str, the name of the module where the function is defined
Definition at line 413 of file element_registry.py.
| list python.utilities.element_registry.ALL_ELEMENTS = PIPEPARTS_ELEMENTS + CONDITION_ELEMENTS + LLOIDPARTS_ELEMENTS |
Definition at line 575 of file element_registry.py.
| list python.utilities.element_registry.CONDITION_ELEMENTS |
Definition at line 556 of file element_registry.py.
| python.utilities.element_registry.lloidparts = None |
Definition at line 20 of file element_registry.py.
| list LLOIDPARTS_ELEMENTS |
Definition at line 565 of file element_registry.py.
| list python.utilities.element_registry.PIPEPARTS_ELEMENTS |
Definition at line 477 of file element_registry.py.