Skip to content

Commit 2d10cde

Browse files
authored
Add support @value annotation on fastddsgen (#917)
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
1 parent 5e9e5db commit 2d10cde

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

code/FastDDSGenCodeTester.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ enum Enumeration : int32_t
163163
{
164164
RED,
165165
GREEN,
166-
BLUE
166+
BLUE = 3
167167
};
168168
//!
169169

docs/fastdds/xml_configuration/dynamic_types.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ Optionally, unsigned integer attribute :code:`value` might be added to set a spe
150150

151151
.. note::
152152

153-
:code:`value` attribute is equivalent to :code:`@value` builtin annotation which is not still supported in neither
154-
the plain (IDL) nor |DynamicTypes|.
153+
:code:`value` attribute is equivalent to :code:`@value` builtin annotation.
155154

156155
Please, refer to :ref:`xtypes_supportedtypes_enumeration` for more information on enumeration types.
157156

docs/fastdds/xtypes/language_binding.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,6 @@ For the enumeration type to be consistent, the remaining enumeration literals mu
298298
Additionally, the enumeration literal value might be set using |MemberDescriptor-api| :code:`default_value` property.
299299
The behavior is the same as setting the :code:`@value` :ref:`builtin annotation<builtin_annotations>`.
300300

301-
.. note::
302-
303-
Currently, Fast DDS-Gen does not support :code:`@value` builtin annotation.
304-
305301
As the enumeration type is basically a signed integer type which might take only some specific values defined with the
306302
enumeration literals, the corresponding DynamicData getters and setters are the ones corresponding to the underlying
307303
signed integer type (and any other method promotable to that specific primitive type).

docs/fastddsgen/dataTypes/dataTypes.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ The following IDL enumeration:
362362
{
363363
RED,
364364
GREEN,
365+
@value(3)
365366
BLUE
366367
};
367368
@@ -572,7 +573,7 @@ annotations might be applied without the need of defining them).
572573
- ❌
573574
* - :code:`@value`
574575
- Set constant value to `enumerations`_ literal.
575-
-
576+
-
576577
* - :code:`@verbatim`
577578
- Add comment or text to the element.
578579
- ❌

0 commit comments

Comments
 (0)