avl._core.component module
- class avl._core.component.Component(*args: Any, **kwargs: Any)[source]
- __init__(name: str, parent: Component) None[source]
Initialize Component.
- Parameters:
name (str) – Name of the component.
parent (Component) – Parent component.
- add_child(child: Component) None[source]
Add a child component.
- Parameters:
child (Component) – Child component to add.
- get_child(name: str) Component | None[source]
Get a child component by name.
- Parameters:
name (str) – Name of the child component.
- Returns:
Child component.
- Return type:
- get_num_children() int[source]
Get the number of child components.
- Returns:
Number of child components.
- Return type:
int
- get_children() list[Component][source]
Get all child components.
- Returns:
List of child components.
- Return type:
list