|C++ code generator namespace in java format [message #1699192]
||Mon, 22 June 2015 12:41
| vincent valvona
Registered: June 2015
I am using papyrus to generate code for an AVR microcontroller in C++.|
I have solved or found workarounds for most issues and it works very well, but there are a few left.
The most annoying one is that the C++ codegenerator outputs namespace references to function call parameters and properties etc in a java style package reference:
but the compiler does not see 'myApp' as a top level namespace and expects references to be relative to the top folder:
I can work around this by doing a global find/replace in all the generated files to remove the prefix and it does the job, but it means that I cannot use a linked CDT editor window (using the right click option on a class diagram) because the global replacements are seen as code changes which are back annotated to the model, the model then cannot find the referenced parameter. The result is that the class properties and function call parameter types are removed as they become 'unknown', return types are replaced with 'void'; new opaque function methods are created and sent to the code.
So the only choice is to use a normal unlinked CDT editor and copy / paste any code changes back into the model. This is OK (although there are pasting issues which occasionally cause the the editor windows to lock up) but if someone knows how to change the behaviour of either the code generator so as not to add the top level prefix, or get the C++ complier to recognise it, I would be very grateful.
Powered by FUDForum
. Page generated in 0.01499 seconds