Skip to content

Commit

Permalink
Document how to annotate members as key in XML types (#757)
Browse files Browse the repository at this point in the history
* Document how to annotate member as key in XMl types (#746)

Signed-off-by: eduponz <eduardoponz@eprosima.com>
(cherry picked from commit f95e5c9)

# Conflicts:
#	code/XMLTester.xml

* Refs #21244: Solve conflicts

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Co-authored-by: Eduardo Ponz Segrelles <eduardoponz@eprosima.com>
Co-authored-by: Mario Dominguez <mariodominguez@eprosima.com>
  • Loading branch information
3 people authored Jun 27, 2024
1 parent 40f4548 commit ac8f365
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/XMLTester.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1441,6 +1441,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"/>

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 @@ -161,6 +161,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

0 comments on commit ac8f365

Please sign in to comment.