Sparx Systems Forum
Enterprise Architect => Bugs and Issues => Topic started by: g.makulik on November 30, 2012, 08:04:45 am
-
Am I right that importing function pointer typedefs like the following aren't supported for C rev. engineering?
typedef void (*FuncSig1)(int, char*);
typedef int (*FuncSig2)(int);
For C++ this is the recommended approach following the User Guide (http://www.sparxsystems.com/enterprise_architect_user_guide/software_development/notes_on_source_code_import.html).
How is it possible to make use of function pointer definitions for C code generation/synchronization?
Best regards,
Günther
-
Unless something has changed since I last looked at it, function pointer typdefs are intentionally skipped because there's no corresponding UML representation.
-
... because there's no corresponding UML representation
Hmmm, how are for instance C# delegate types represented in an UML model? As an operation with a particular tagged value, right?
I C/C++ function pointers represent the same, may be as part of a (degenerate) interface. This (interfacing) is exactly their use case.
Best regards,
Günther
-
Hmmm, how are for instance C# delegate types represented in an UML model?
Badly.
As stereotyped operations, which means that they too are ignored if outside of a class. Even when they are imported there's no way to select them as a parameter type or anything else. Effectively it allows for round-tripping but not meaningful use within a model.