Skip to content
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

Rebrand some filters as query modifiers #908

Merged
merged 2 commits into from
Aug 22, 2021

Conversation

KingOfSquares
Copy link
Contributor

No description provided.

Signed-off-by: KingSimon <19822231+KingOfSquares@users.noreply.github.com>
Signed-off-by: KingSimon <19822231+KingOfSquares@users.noreply.github.com>
@Electroid
Copy link
Member

This looks good, but could you explain the motivation/what the changes will do?

@KingOfSquares
Copy link
Contributor Author

This looks good, but could you explain the motivation/what the changes will do?

The filters i changed gave no good indication that they have children, having common interfaces/abstract implementations (SingleFilterFunction MultiFilterFunction QueryModifier) makes it easier to know how the filters will behave.

The next step I want to commit is a toString implementation on QueryModifier that matches the other two classes to make debugging during xml parsing(or anywhere really) easier for scenarios you want to prevent usage of some filters. An example of a scenario where this would be beneficial is when accepting only dynamic filters for something like a portal trigger. If the user provides an invalid filter inside one of the filters that has children its easy to tell the user what's wrong.

I know a toString could easily be implemented on all the filters I changed in this commit, but then it would be unnecessary boilerplate.

@Electroid Electroid merged commit d39d0ed into PGMDev:dev Aug 22, 2021
@KingOfSquares KingOfSquares deleted the relation-modifiers branch August 22, 2021 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants