To get some link between a software model and the C code, my idea is to model interfaces and classes and generate *.h and *.c files just containing the declarations and function definitions with empty bodies.
The implementation of the functions shall be done by "classic" programming using that generated skeleton plus additional information from some specification (which also could be a EA diagram or state machine or whatever).
My first experiments on this show that "synchronization" between model and code works this way that previously generated code is not touched but only additional model elements are added.
This means also that changing existing elements simply adds new code to reflect the change but keeps the already existing code.
For instance:
From the very basic model below three files "Class A.c", "Class A.h" and "Interface1.h" are generated and they look perfectly fine.

If I add a second operation "A_operation_2" to Class A, its declaration is added as expected.
Now I change "A_operation_2" to take an int parameter "a". The "Class A.h" then has two declarations for operation "A_operation_2":
void A_operation_2();
void A_operation_2(int a);
Also, the implementation of "A_operation_2(int a)" is added to "Class A.c".
What I would like: Just add the new parameter to the existing generated code.
When removing A_operation_2(int a) from "Class A" and doing a new generation, the files don't change at all.
What I would like: Remove A_operation_2(int a) declaration and definition from generated code.
I know that "Overwrite" instead of "Synchronize" would solve that problem, but this would also overwrite any implementation done e.g. in "A_operation_2"'s body after the function parameter has been added.
Is there a way to make code generation more intelligent, i.e. to check for the same name(s) and update only the function declarations and headers?
Or is there a better strategy to force the developers to stick to the model but not burden them the load of dealing with EA for every single detail in code?
Best regards,
EAabecedarian