Package
Code generation is done on a per-package basis.
The code generator generates code for every class, struct, interface, enumeration,... and their behaviors inside the package and its sub packages.
To setup a package for code generation use the LL Embedded
Stereotype and set the GenSrcDir
and GenerationLanguage
Tagged Values.
You can select either the LL Embedded
flagged package or any of it subpackages (on all levels) for code generation.
Embedded Engineer will generate code only for the selected package and its subpackages, but the directory stucture and all settings will be resolved to fit.
Settings
All settings for Embedded Engineer can be stored on the package level. All settings get "inerited" from the parent package and can be overwritten on any level.
LL Embedded Stereotype
By using the LL Embedded
stereotype the package will automatically receive all necessary tagged values for code generation.
Open the tagged values or properties dialog of the package to specify the LL Embedded::GenerationLanguage
& LL Embedded::GenSrcDir
tagged value settings.
Open the properties dialog of the package, go to Tags
and select the Embedded Engineer Profile
to filter for the LL Embedded::GenerationLanguage
& LL Embedded::GenSrcDir
tagged values.
GenerationLanguage
The GenerationLanguage
tagged value allows you to specify the code generation languages which will be used to generate the elements contained in this package (and sub package). It can be set/overwritten on any package level and will be considered during generation.
Currently available:
- C++
- AnsiC
GenSrcDir
The GenSrcDir
tagged value allows you to control in which directory the code generator writes the output files of this package (and sub packages).
If you don't specify this value, or if the specified directory does not exist, the code generator will ask you interactively for a directory.
Local paths
(only for Enterprise Architect)
Since the first version of Embedded Engineer, Enterprise Architect local paths were supported These paths can be set via the Configure Local Paths dialog in Enterprise Architect.
Enterprise Architect Ribbon
Code
Configure
Options
Configure Local Paths
Relative paths
Embedded Engineer supports relative paths in the GenSrcDir
tagged value.
This relative path can be combined with a localpath.
If a "pure" relative path is provided Embedded Engineer will use the path of the Project file as the working directory.
Examples
%GuessingGameSrcGen%
Will result in Path:C:\Users\[youruser]\Documents\LieberLieber\EmbeddedEngineer22\Examples\GuessingGame_VC++\GuessingGame_VC++\Generated
- .\GuessingGame_VC++\GuessingGame_VC++\myGenFolder
Will result in Path:
C:\Users\[youruser]\Documents\LieberLieber\EmbeddedEngineer22\Examples\GuessingGame_VC++\GuessingGame_VC++\myGenFolder
%GuessingGameSrcGen%\..\
Will result in Path:C:\Users\[youruser]\Documents\LieberLieber\EmbeddedEngineer22\Examples\GuessingGame_VC++\GuessingGame_VC++\
%GuessingGameSrcGen%\..\myGenFolder
Will result in Path:C:\Users\[youruser]\Documents\LieberLieber\EmbeddedEngineer22\Examples\GuessingGame_VC++\GuessingGame_VC++\myGenFolder
(all provided examples are working on the assumption the project file path is: C:\Users\[youruser]\Documents\LieberLieber\EmbeddedEngineer22\Examples\embedded_engineer_examples.eap
)
See also