pcdshub / superscore

Configuration Management for EPICS PVs
Other
1 stars 3 forks source link

[Prospective] MNT: consolidate different Entry traversal use cases in Visitor #106

Open shilorigins opened 4 hours ago

shilorigins commented 4 hours ago

We re-implement the logic of traversing an Entry graph multiple times in our codebase, performing a different action at each node or tracking different metadata. These use cases could potentially be streamlined by implementing an EntryVisitor class containing the common logic, with subclasses performing the different specific functions.

Possible visitor subclasses:

tangkong commented 3 hours ago

Or possibly a visitor + post-visit hook structure? I realize that's the normal way you handle graph/tree traversal in school