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

Report/Statistic code can use some cleanup/refactoring #457

Open
klingaard opened this issue Nov 20, 2023 · 0 comments
Open

Report/Statistic code can use some cleanup/refactoring #457

klingaard opened this issue Nov 20, 2023 · 0 comments
Labels
component: sparta Issue is related to sparta framework enhancement Enhancement or request

Comments

@klingaard
Copy link
Member

klingaard commented Nov 20, 2023

From PR #456 , a few design items popped up worth fixing (much thanks to @bdutro ):

Report::add might be worth templatizing. It looks like several of the overrides share the same code.

Originally posted by @bdutro in #456 (comment)

...maybe add overloads for this method for the cases where already_used and/or report_si aren't needed.

Originally posted by @bdutro in #456 (comment)

It looks like these three members are never used at the same time. Either sdef_ is used, or ctr_ is used, or par_ is used. If these don't share a common base class with virtual methods, it might make sense to add a templatized wrapper class that can handle this instead of having if-else-if-else-if everywhere.

Originally posted by @bdutro in #456 (comment)

@klingaard klingaard added enhancement Enhancement or request component: sparta Issue is related to sparta framework labels Nov 20, 2023
@klingaard klingaard changed the title Report::add might be worth templatizing. Report/Statistic code can use some cleanup/refactoring Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: sparta Issue is related to sparta framework enhancement Enhancement or request
Projects
None yet
Development

No branches or pull requests

1 participant