From f37e9597dae2a41299094142b8664e0fb61e7e8f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 13:13:00 +0200 Subject: [PATCH] Document how to annotate member as key in XMl types (#746) (#756) Signed-off-by: eduponz (cherry picked from commit f95e5c960f5ac57e53b7f2bafb85292f2ba25333) Co-authored-by: Eduardo Ponz Segrelles --- code/XMLTester.xml | 3 +++ docs/fastdds/xml_configuration/dynamic_types.rst | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/code/XMLTester.xml b/code/XMLTester.xml index fc97e0a72..c6281d54f 100644 --- a/code/XMLTester.xml +++ b/code/XMLTester.xml @@ -3907,6 +3907,9 @@ <--> +XML-MEMBER_WITH_KEY<--> + +<--> XML-BOUNDEDSTRINGS<--> diff --git a/docs/fastdds/xml_configuration/dynamic_types.rst b/docs/fastdds/xml_configuration/dynamic_types.rst index 2732f0752..df1cc6f4e 100644 --- a/docs/fastdds/xml_configuration/dynamic_types.rst +++ b/docs/fastdds/xml_configuration/dynamic_types.rst @@ -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 ```` 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 ***************