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

Piro: can we make the observers follow some inheritance chain? #13447

Open
bartgol opened this issue Sep 12, 2024 · 3 comments
Open

Piro: can we make the observers follow some inheritance chain? #13447

bartgol opened this issue Sep 12, 2024 · 3 comments
Labels
pkg: Piro type: enhancement Issue is an enhancement, not a bug

Comments

@bartgol
Copy link
Contributor

bartgol commented Sep 12, 2024

Enhancement

RIght now, the three classes ObserverBase, ROL_ObserverBase, and SolutionObserverBase are unrelated. In my app, I want to write a single observer class that covers all needs, since there is a lot of overlap here. However, these classes often declare a method with the same name and similar (sometime same) signature, making it confusing and possibly bug prone.

Can we do away with some observers and have just one, or at the very least make them inherit from each other? Is there a reason why we have these 3 completely unrelated classes?

@mperego

@bartgol bartgol added type: enhancement Issue is an enhancement, not a bug pkg: Piro labels Sep 12, 2024
@mperego
Copy link
Contributor

mperego commented Sep 12, 2024

Good question. I think we can merge them or derive them from a base class.
@kliegeois @jewatkins, do you see any issues with that?

@kliegeois
Copy link
Contributor

I do not see any issues of doing that as of now.

@jewatkins
Copy link
Contributor

single base class seems fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: Piro type: enhancement Issue is an enhancement, not a bug
Projects
None yet
Development

No branches or pull requests

4 participants