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
Unified DynamicData implementation for both reader and writer #4278
Merged
Conversation
This file contains 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
mitza-oci
reviewed
Sep 29, 2023
mitza-oci
reviewed
Nov 9, 2023
iguessthislldo
added a commit
to iguessthislldo/OpenDDS
that referenced
this pull request
Nov 16, 2023
This was made in response to upcoming changes to make `DynamicDataImpl` unions work more like C++ unions in OpenDDS#4278. This also works around a problem in `DynamicDataAdaptor` when using `get_complex_value` on union branches that haven't been initialized.
mitza-oci
reviewed
Nov 27, 2023
iguessthislldo
requested changes
Nov 28, 2023
jrw972
requested changes
Nov 29, 2023
jrw972
requested changes
Dec 1, 2023
mitza-oci
reviewed
Dec 1, 2023
jrw972
approved these changes
Dec 4, 2023
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.
The following changes are made to the
DynamicData
implementations:DynamicDataXcdrReadImpl
is used as a backing store (read-only) withinDynamicDataImpl
. With this change,DynamicDataImpl
can be used on both reader and writer sides. This will enable support for read-modify-write use cases when a peer can read a received sample, modify the sample, and write the modified sample using a singleDynamicDataImpl
instance.DynamicDataImpl
so that the user can distinguish between when a member is missing (NO_DATA
code is returned) and when it is present (OK
code is returned) in the instance. Expandable collection types such as strings and sequences are updated to only allow it to expand one element at a time.DynamicData
is rewritten to rely only on the public APIs ofDynamicData
-- this simplifies the code rather significantly and should work with any implementation ofDynamicData
. The serialization code is also moved completely out ofDynamicDataImpl
. This will allow changes made to it so that the same serialization code can be reused for different serialization formats in addition to XCDR.