Skip to content

Commit 5f830df

Browse files
cferreiragonzmergify[bot]
authored andcommitted
Docs - Apply custom templates to included IDL files (#1066)
* Refs #23150: Apply custom templates to included IDL files Signed-off-by: cferreiragonz <carlosferreira@eprosima.com> * Refs #23150: Apply suggestion Signed-off-by: cferreiragonz <carlosferreira@eprosima.com> --------- Signed-off-by: cferreiragonz <carlosferreira@eprosima.com> (cherry picked from commit bf0dfe6) # Conflicts: # code/FastDDSGenCodeTester.cpp # docs/fastddsgen/dataTypes/dataTypes.rst
1 parent cef40fb commit 5f830df

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

code/FastDDSGenCodeTester.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,17 @@ enum MyBitMask : uint8_t
133133
//!
134134

135135
/*
136+
<<<<<<< HEAD
136137
// INCLUDE_MORE_IDL_FILES
137138
#include "OtherFile.idl"
138139
#include <AnotherFile.idl>
139140
//!
140141
/**/
142+
=======
143+
// INCLUDE_MORE_IDL_FILES
144+
#include "OtherFile.idl"
145+
#include <AnotherFile.idl>
146+
#include <IncludedIDL.idl>
147+
//!
148+
/**/
149+
>>>>>>> bf0dfe6 (Docs - Apply custom templates to included IDL files (#1066))

docs/fastddsgen/dataTypes/dataTypes.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,25 @@ If *Fast DDS-Gen* does not find a C/C++ preprocessor in default system paths, th
373373
using parameter ``-ppPath``.
374374
The parameter ``-ppDisable`` can be used to disable the usage of the C/C++ preprocessor.
375375

376+
<<<<<<< HEAD
377+
=======
378+
The parameter ``-extrastg`` can also be used to apply custom templates to included IDL files.
379+
To enable this feature, the output file name passed to ``-extrastg`` must include the character ``@``, which will be
380+
replaced by the name of the included file to generate the output file.
381+
382+
The following command will generate two custom templates, one for the main IDL file and another for the included one:
383+
384+
- ``MainIDL_Custom.cpp``
385+
- ``IncludedIDL_Custom.cpp``
386+
387+
Where ``IncludedIDL.idl`` is included in ``MainIDL.idl`` file.
388+
389+
.. code-block:: bash
390+
391+
<path/to/Fast DDS-Gen>/scripts/fastddsgen MainIDL.idl -I <path/to/idls> -extrastg <path/to/template>/Custom.stg @_Custom.cpp
392+
393+
Check :ref:`fastddsgen_supported_options` for more information about the ``-extrastg`` option.
394+
>>>>>>> bf0dfe6 (Docs - Apply custom templates to included IDL files (#1066))
376395

377396
Annotations
378397
--------------

0 commit comments

Comments
 (0)