Skip to content
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

[20733] Document how to annotate members as key in XML types (backport #746) #755

Merged
merged 1 commit into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions code/XMLTester.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4250,6 +4250,9 @@
</struct>
<!--><-->
<struct name="MembersExample">
<!-->XML-MEMBER_WITH_KEY<-->
<member name="my_long" type="int32" key="true"/>
<!--><-->
<!-->XML-BOUNDEDSTRINGS<-->
<member name="my_large_string" type="string" stringMaxLength="41925"/>
<member name="my_large_wstring" type="wstring" stringMaxLength="20925"/>
Expand Down
6 changes: 6 additions & 0 deletions docs/fastdds/xml_configuration/dynamic_types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ Member types
Member types are defined as any type that can belong to a `Struct`_ or a `Union`_, or be aliased by a
`Typedef`_.
These can be defined by the ``<member>`` XML tag.
A member can be annotated as ``key`` (equivalent of the IDL's ``@key``) by setting the ``key`` attribute to ``"true"``.

.. literalinclude:: /../code/XMLTester.xml
:language: xml
:start-after: <!-->XML-MEMBER_WITH_KEY<-->
:end-before: <!--><-->

Primitive types
***************
Expand Down