-
Notifications
You must be signed in to change notification settings - Fork 277
Variable sensitivity object factory rework #5610
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
Variable sensitivity object factory rework #5610
Conversation
Plugged it into the vsd analysis. This is going to be the place where we can hook in the appropriately configured variable_sensitivity_object_factory.
Add temporary default constructor until we can sort out derived classes
Switch variable_sensitivity_domain_factoryt to an explicit template specialisation. Without this, we get link errors from the ait default constructor. This is ever used by when variable_sensitivity_domaint, but still get generated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be merged as-is. I think the simplification of avoiding ai_domain_factory_default_constructort
is worth doing but I won't insist on it.
src/analyses/variable-sensitivity/variable_sensitivity_domain.h
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## develop #5610 +/- ##
========================================
Coverage 69.33% 69.33%
========================================
Files 1242 1242
Lines 100405 100416 +11
========================================
+ Hits 69612 69623 +11
Misses 30793 30793
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
I was almost going to hit merge on this one, but I'd like to ask for the churn in those commits to be cleaned up first. There are several changes in later commits that just fix code only introduced in this PR. Also, it would be nice if each commit did still fully compile, i.e., updates to the unit test should be merged into the commit that breaks the unit test. |
aba885c
to
f7c513c
Compare
@tautschnig I've cleaned up the history around those last steps - you're right about the unit tests and that was an oversight on my part. I'm happy to do more, but I'd like to keep the earlier history as is because collapsing that feels like it makes the change a bit too magical - it was like this, now it's like that - when it was a little bit of a voyage of discovery. |
Pass variable_sensitivity_object_factoryt_ptr to abstract_environmenti constructor, which uses it to create the domain objects. Update unit tests now static variable_sensitivity_object_factoryt is gone Remove redundant forward declaration
f7c513c
to
dfb0e0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fixes.
This PR removes the variable_sensitivity_object_factoryt static instance.
Now, a configured variable_sensitivity_object_factoryt instance is passed into the variable_sensitivity_domain_factoryt, which in turn passes down into the variable_sensitivity_domaint objects it creates. Those pass the object factory to their abstract_environments and, finally, they use the factory to
build the objects they need.
The variable_sensitivity_object_factoryt are created and passed as shared pointers.