Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: EAButNotForGames on September 17, 2024, 06:10:43 pm
-
I got a problem:
I have a question:
When I import a Source Directory to store C code in a model and then generate the code of the model, I get some mismatches.
#define, #if define or similar are completely missing. Also, some includes are either missing or changed.
The code generation also rewrites the source code of the class.
I have some questions:
Is this an error in the import or the code generation?
And, if it is an import error, is there someway to customize the code import of EA?
-
Cross compilation is complex. #-instructions are meant for the compiler and not for runtime. EA simply ignores them. That'a a good idea since keeping track of them would imply a huge meta-model to be stored on top. When EA reads code, it just reads the header files or that part which defines classes. Getting the code into the behavior is tricky (see above) and works only partially. Long story short: code engineering sounds sweet, but reality is harsh. I simply dropped the idea years ago. Nowadays I eventually use the import to create documentation manually.
q.
-
Dam. I asked the EA-Support and they gave a similar answer. Sadly EA doesn't have the option to customize the code import...
-
It's quite fun to write a compiler (I did so for my diploma) but it's nothing you can do on a free aftrenoon. And honestly a Cxx compiler with pre-compiler for the macros would give me the creeps rather than enjoyment.
q.