-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visitor API for style entities #30522
Conversation
6cc6baf
to
808b624
Compare
Good stuff! One thing that I wonder is if it would be possible and useful to add nesting information / parent information to leafs and nodes, so you could see e.g. where in a nested rule structure you are which I think is currently not possible. |
That was my intention with the enter/exit calls - but it's up to the visitor to utilise these and track the tree traversal if they need this info. I don't think there's a straightforward way to do this automatically. I guess we could have a built in "trackingvisitor" subclass which has a different virtual visit method which adds provides this extra info, but that's getting rather confusing! Let's revisit this topic if/when there's a need for that. |
I was thinking of a |
Adds a new visitor pattern API for creation of visitors which visit all the style entities (symbols, color ramps, text formats, and label styles) associated with different objects. Can be used on a renderer, map layer, or project wide level. E.g. on a project wide level, allows collection of ALL the style symbols/color ramps/text settings inside a project, including those in layouts or annotations!
Adds a new visitor pattern API for creation of visitors which visit all the style entities (symbols, color ramps, text formats, and label styles) associated with different objects. Can be used on a renderer, map layer, or project wide level.
E.g. on a project wide level, allows collection of ALL the style symbols/color ramps/text settings inside a project, including those in layouts or annotations!
This opens up lots of possibilities. E.g. scripts (or processing algorithms!) which:
...etc etc
(a nice follow up would be a visitor which allows symbols to be modified, but that's an order of magnitude more complex).