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

[21750] Add support @value annotation on fastddsgen #917

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
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