[Core] Rename BaseObject to BaseComponent#5934
Open
alxbilger wants to merge 7 commits intosofa-framework:masterfrom
Open
[Core] Rename BaseObject to BaseComponent#5934alxbilger wants to merge 7 commits intosofa-framework:masterfrom
alxbilger wants to merge 7 commits intosofa-framework:masterfrom
Conversation
bakpaul
approved these changes
Feb 4, 2026
Contributor
|
[ci-build][with-all-tests] |
Collaborator
|
[ci-depends-on] detected during build #5. All dependencies are merged/closed. Congrats! 👍 |
70326ce to
41376e3
Compare
Collaborator
|
[ci-depends-on] detected during build #6. To unlock the merge button, you must
|
Collaborator
|
[ci-depends-on] detected during build #7. To unlock the merge button, you must
|
c108dd7 to
eecf4db
Compare
Collaborator
|
[ci-depends-on] detected during build #8. To unlock the merge button, you must
|
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.
This PR implements a backward-compatible transition of the core object base type from
BaseObjecttoBaseComponentwhile ensuring existing code continues to compile during migration:BaseComponent(the new type).BaseObjectis a deprecated alias forBaseComponent(ensures existing code compiles without changes).#include <BaseObject.h>is a deprecated alias for#include <BaseComponent.h>(via header shim).toBaseObject()is a deprecated alias fortoBaseComponent()(forwarded internally to avoid breaking core builds).This deprecation layer does not work for code using its own forward-declared
BaseObject. Such code will fail with a redefinition error (e.g.,BaseObjectalready defined). Instead of the forward declaration ofBaseObject, we recommand to include<sofa/core/fwd.h>. Then, you can renameBaseObjectwithBaseComponent, although the deprecation layer should work.[ci-depends-on https://github.com/sofa-framework/SofaPython3/pull/575]
[ci-depends-on https://github.com/sofa-framework/Sofa.Qt/pull/30]
[ci-build][with-all-tests]
By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).
Reviewers will merge this pull-request only if