Router: Have a routes collection interface & support in Tracy router panel - #94
Open
Andrewsville wants to merge 4 commits into
Open
Router: Have a routes collection interface & support in Tracy router panel#94Andrewsville wants to merge 4 commits into
Andrewsville wants to merge 4 commits into
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, the only way to have a collection of routes and have them displayed in the Tracy panel is to use the
RouteListclass.This PR generalizes this logic to allow developers to implement their own route collections maybe with some logic inside (the
RouteListis just a simple hashmap), maybe immutable (RouteListis mutable), etc. It comes from our use case but I believe it could be useful for others, too.IteratorAggregate(which is the easiest way to implement aTraversable) and adds thegetModule()method that is required by the Tracy panel.RouteListis implemented, it can implement this new interface without any changes.instanceoftypecheck in the Panel to display a routes collection.