More pdm object collections#13985
Merged
Merged
Conversation
RimEnsembleFileSetCollection, RimJobCollection, RimQuickAccessCollection, RimRefinementRegionCollection and RimFractureTemplateCollection now inherit from the templated caf::PdmObjectCollection<T> base, reusing the shared add/insert/delete/items plumbing introduced for RimValveTemplateCollection. XML field keywords are preserved on every collection so existing project files continue to load.
…on<T> Migrated to the templated base, preserving each collection's existing XML field keyword for project-file backward compatibility: - RimEnsembleFractureStatisticsCollection - RimEclipseInputPropertyCollection - RimPlotDataFilterCollection - RimGeoMechContourMapViewCollection - RimIntersectionResultsDefinitionCollection - RimCustomObjectiveFunctionCollection - RimStimPlanModelTemplateCollection - RimEnsembleWellLogsCollection - RimEclipseContourMapViewCollection - RimSeismicViewCollection - RimGridInfoCollection - RimEclipseStatisticsCaseCollection - RimWellIASettingsCollection - RimVfpDataCollection External callers that accessed the old public/named array fields directly (RimEclipseInputPropertyCollection::inputProperties, RimEclipseStatisticsCaseCollection::cases) now use addItem/items() from the base. RimCustomObjectiveFunction.h replaced its include of the collection header with a forward declaration to break the new include cycle introduced by the migration.
Collaborator
|
Is there a way to avoid the #include statements for the object type that the collection is used for? Previously there used to be only forward defines in the collection header file, i.e. class RimGenericJob; not #include "RimGenericJob.h" |
Replace the class-level static_assert with a DerivedFromPdmObject concept checked inside the constructor body. The constructor is lazily instantiated, so T can be forward-declared at the point PdmObjectCollection<T> is used as a base class.
Move the RimGenericJob include from the header to the .cpp now that PdmObjectCollection<T> permits forward-declared template parameters.
Member
Yes, this is possible. I fixed this during work with the nested collections. Added two commits that fixes this issue. |
Move the element-type include from each migrated collection header into its .cpp, leaving only a forward declaration in the header. Follows the pattern from 9e4d791 for RimJobCollection, made possible by the constructor-time PdmObject base check.
magnesj
approved these changes
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.