TreeWalker Class Reference
Last updated: 05-Mar-2025
Public Member Functions |
|
def | __init__ (self, max_arc_depth, max_depth, writable_only, post_order) |
Static Public Member Functions |
|
def | walk (nodes, observers, max_arc_depth=-1, max_depth=-1, children_start=False, writable_only=False, post_order=False) |
Performs a depth-first / pre-order walk through the node calling observers callbacks. More... |
Data Fields |
|
observers | |
max_arc_depth | |
max_depth | |
writable_only | |
post_order |
Constructor & Destructor Documentation
◆ __init__()
def __init__ | ( | self, | |
max_arc_depth, | |||
max_depth, | |||
writable_only, | |||
post_order | |||
) |
Member Function Documentation
◆ walk()
|
static |
Performs a depth-first / pre-order walk through the node calling observers callbacks.
- Parameters
-
node start traversal from these nodes (single or list) observers list of observers to be called max_arc_depth maximum archive recursion depth, negative is infinite max_depth maximum recursion depth, negative is infinite children_start start with node's children instead of node itself writable_only call observers only on writable nodes post_order post-order traversal if True, pre-order traversal if False
Field Documentation
◆ max_arc_depth
max_arc_depth |
◆ max_depth
max_depth |
◆ observers
observers |
◆ post_order
post_order |
◆ writable_only
writable_only |
The documentation for this class was generated from the following file:
- packman/packmanlib/treewalk.py
Rate this article: