Skip to content

Commit

Permalink
Add support @value annotation on fastddsgen (#917)
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo González Moreno <[email protected]>
  • Loading branch information
richiware authored Sep 26, 2024
1 parent 5e9e5db commit 2d10cde
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion code/FastDDSGenCodeTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ enum Enumeration : int32_t
{
RED,
GREEN,
BLUE
BLUE = 3
};
//!

Expand Down
3 changes: 1 addition & 2 deletions docs/fastdds/xml_configuration/dynamic_types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ Optionally, unsigned integer attribute :code:`value` might be added to set a spe

.. note::

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

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

Expand Down
4 changes: 0 additions & 4 deletions docs/fastdds/xtypes/language_binding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,6 @@ For the enumeration type to be consistent, the remaining enumeration literals mu
Additionally, the enumeration literal value might be set using |MemberDescriptor-api| :code:`default_value` property.
The behavior is the same as setting the :code:`@value` :ref:`builtin annotation<builtin_annotations>`.

.. note::

Currently, Fast DDS-Gen does not support :code:`@value` builtin annotation.

As the enumeration type is basically a signed integer type which might take only some specific values defined with the
enumeration literals, the corresponding DynamicData getters and setters are the ones corresponding to the underlying
signed integer type (and any other method promotable to that specific primitive type).
Expand Down
3 changes: 2 additions & 1 deletion docs/fastddsgen/dataTypes/dataTypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ The following IDL enumeration:
{
RED,
GREEN,
@value(3)
BLUE
};
Expand Down Expand Up @@ -572,7 +573,7 @@ annotations might be applied without the need of defining them).
- ❌
* - :code:`@value`
- Set constant value to `enumerations`_ literal.
-
-
* - :code:`@verbatim`
- Add comment or text to the element.
- ❌
Expand Down

0 comments on commit 2d10cde

Please sign in to comment.