yasmin_editor.runtime.traversal module
Helpers for traversing live YASMIN runtime container objects.
The runtime interacts with Python and C++ backed state containers. These helpers normalize that mixed API surface so the runtime code can reason about paths and nested containers without scattering compatibility checks.
- yasmin_editor.runtime.traversal.child_state(container: Any, state_name: str) Any | None
Return one named child state from a container if it exists.
- yasmin_editor.runtime.traversal.container_states(container: Any) dict[str, Any]
Return a normalized mapping of child state names to runtime objects.
- yasmin_editor.runtime.traversal.expand_to_deepest_known_path(root_container: Any, base_path: tuple[str, ...]) tuple[str, ...]
Follow container entry states until the deepest known active path is reached.
- yasmin_editor.runtime.traversal.get_container_entry_state_name(container: Any) str | None
Return the entry state name used when stepping into a container.
- yasmin_editor.runtime.traversal.is_concurrence_object(state: Any) bool
Return whether the runtime object behaves like a concurrence.
- yasmin_editor.runtime.traversal.is_container_object(state: Any) bool
Return whether the runtime object exposes container child-state access.
- yasmin_editor.runtime.traversal.resolve_container(root_container: Any, path: tuple[str, ...]) Any | None
Resolve a nested container path from the runtime root object.