Generating Source Code
To generate the source code for the component defined, use the generate
command as follows:
- Windows
- Browse to %TEMPLATE_ENGINE%
- Run templates-console.bat; a command prompt opens in directory pointed to %TEMPLATE_ENGINE%.
Run the following command specifying the destination directory:
Usage
Figure 1: Run templates-console.bat
- Linux
Browse to %TEMPLATE_ENGINE% in Linux console
Run the following command specifying the destination directory:
Usage
Code for Asynchronous (EDBC) Component
To generate code for asynchronous component, use generate
command. Though, by default, it assumes that the code is generated for the asynchronous component, to specify particularly that the code generated should be for asynchronous component, use –language
option with value java
The generated component code has the structure as shown in figure below; it shows the description/purpose of each file generated.
Figure 2: Structure of asynchronous component
Code for Synchronous (BC) Component
To generate code for synchronous component, use generate
command specifying the language using –language
option followed by the value representing the language as shown in the below example.
The generated component code has the structure as shown in figure below.
Figure 3: Structure of synchronous component
Code for C Component
To generate code for C component, use generate
command specifying the language using -language
option followed by the value representing the language, that is, 'c'.
Figure below shows the structure of the code generated for an asynchronous component defined in C.
Figure 4: Structure of C component
Code for C++ component
To generate code for C++ component, use generate
command specifying the language using -language
option followed by the value representing the language, that is, 'cpp'.
Figure below shows the structure of the code generated for an asynchronous component defined in C++.
Figure 5: Structure of C++ component
Code for C# Component
To generate code for C# component, use generate
command specifying the language using -language
option followed by the value representing the language, that is, 'csharp'.
Figure 6: Structure of C# component