-
Notifications
You must be signed in to change notification settings - Fork 100
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
ParserConfig: add ToElementUseIncludeTag policy #887
Conversation
This adds a new policy to the ParserConfig class to replace the boolean parameter in the Model, Root, and World ToElement methods that specifies whether include tags should be used or the complete model. ParserConfig objects are then passed to the ToElement methods instead of the bool, allowing the ParserConfig to be used in additional sdf::initFile API calls. This changes only unreleased parts of the API, which is permitted. Signed-off-by: Steve Peters <[email protected]>
Codecov Report
@@ Coverage Diff @@
## sdf12 #887 +/- ##
=======================================
Coverage 88.16% 88.16%
=======================================
Files 100 100
Lines 14629 14634 +5
=======================================
+ Hits 12897 12902 +5
Misses 1732 1732
Continue to review full report at Codecov.
|
Signed-off-by: Steve Peters <[email protected]>
@scpeters the use of ParserConfig seems a bit odd here. The I can create a new class that is tailored for ToElement conversion. |
@scpeters and I were just talking about this yesterday. I had mentioned to him that there was precedent for using |
that sounds fine to me |
This pull request has been mentioned on Gazebo Community. There might be relevant details there: https://community.gazebosim.org/t/new-ignition-releases-2022-04-13-fortress-edifice/1367/1 |
🦟 Bug fix
Part of #881 and should be reviewed before the 12.4.0 release.
Summary
This adds a new policy to the ParserConfig class to replace
the boolean parameter in the Model, Root, and World
ToElement methods that specifies whether include tags should
be used or the complete model. ParserConfig objects are then
passed to the ToElement methods instead of the bool,
allowing the ParserConfig to be used in additional
sdf::initFile API calls. This changes only unreleased
parts of the API, which is permitted.
I don't love the
SetToElementUseIncludeTag
andToElementUseIncludeTag
method names, but it's the best I could think of on short notice. Suggestions are welcome.Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.