diff --git a/code/FastDDSGenCodeTester.cpp b/code/FastDDSGenCodeTester.cpp index 8829bea92..54fc8b0ba 100644 --- a/code/FastDDSGenCodeTester.cpp +++ b/code/FastDDSGenCodeTester.cpp @@ -182,5 +182,6 @@ enum MyBitMask : uint8_t // INCLUDE_MORE_IDL_FILES #include "OtherFile.idl" #include + #include //! /**/ diff --git a/docs/fastddsgen/dataTypes/dataTypes.rst b/docs/fastddsgen/dataTypes/dataTypes.rst index 3028904b7..bd11a3063 100644 --- a/docs/fastddsgen/dataTypes/dataTypes.rst +++ b/docs/fastddsgen/dataTypes/dataTypes.rst @@ -450,6 +450,23 @@ If *Fast DDS-Gen* does not find a C/C++ preprocessor in default system paths, th using parameter ``-ppPath``. The parameter ``-ppDisable`` can be used to disable the usage of the C/C++ preprocessor. +The parameter ``-extrastg`` can also be used to apply custom templates to included IDL files. +To enable this feature, the output file name passed to ``-extrastg`` must include the character ``@``, which will be +replaced by the name of the included file to generate the output file. + +The following command will generate two custom templates, one for the main IDL file and another for the included one: + +- ``MainIDL_Custom.cpp`` +- ``IncludedIDL_Custom.cpp`` + +Where ``IncludedIDL.idl`` is included in ``MainIDL.idl`` file. + +.. code-block:: bash + + /scripts/fastddsgen MainIDL.idl -I -extrastg /Custom.stg @_Custom.cpp + +Check :ref:`fastddsgen_supported_options` for more information about the ``-extrastg`` option. + Annotations --------------