Sparx Systems Forum
Enterprise Architect => Bugs and Issues => Topic started by: g.makulik on November 25, 2012, 08:28:55 am
-
Hi,
Can someone tell me how these templates apply exactly, I cannot find any general documentation for these.
I can see though these have code for languages like Java or C#. I just guess you can use these to have more fine grained control over single import statements (e.g. realized by #include or extern statements in C/C++).
1. Is there a possibility to use these from C/C++ code generation?
2. Is there further possibility to control the contents produced by the %fileImports% CTF macro anyhow?
I'd like to have #include statements generated for standard framework classes like std::string or std::vector<int>
The include statements for such classes always look like this:
#include "string.h"
#include "vector.h"
These #include statements should rather render as
#include <string>
#include <vector>
Does anyone know a solution how to achieve this for C/C++ code generation (without using class level code generation Import(s)/Header(s) settings)?
Best regards,
Günther
-
OK I've got it!
You'll simply need need to add the %Import% / %ImportImpl% CTF template expansions to the standard 'File' / 'File Impl' templates.
Then these are considered and you can change / override them as necessary.
HTH anyone else,
Günther