Sparx Systems Forum
Enterprise Architect => Suggestions and Requests => Topic started by: Evan Carew on November 16, 2008, 02:10:03 pm
-
I noticed that EA can do C, sort of. The big downer is that there is no way to import functions, or indeed to represent them in the class view. It would be rather useful if EA could import existing C projects, getting all functions, structs, and globals so that said project could be refactored into C++
-
Spend a bit of time searching the forum, and perhaps perusing the Resources page on the Sparx site. EA can do more with C than first meets the eye.
I cannot point you to the specifics of what you've asked though; I really don't use C, let alone model it in EA.
-
I just finished searching the forums with the phrase 'C functions'. The only result on the search was this thread.
-
Sorry Evan,
I failed to mention that the YABB - that's the forum software used here - has a very literal search feature. Sometimes the 'obvious' phrase turns out to be unexpectedly limiting.
Perhaps instead of searching for the exact phrase you chould try something like the two (separate) keywords C and import. That might be a place to start.
As I mentioned earlier I don't use EA for C, so I have not had the need to search for this subject.
-
I did finally find a couple of references from a while back. Turns out that the developers of EA are not considering functions (in any language) not contained in a class. So, that means that C functions can only be imported if they are either OO C, or in the case where someone has written a special filter which converts C functions in a header file into a class. Incidentally, this also means that C++ friend functions aren't imported.
As one of my original purposes for purchasing EA was to use it as a way to move legacy code foreword, this restriction is a little disapointing.
-
I did finally find a couple of references from a while back. Turns out that the developers of EA are not considering functions (in any language) not contained in a class. So, that means that C functions can only be imported if they are either OO C, or in the case where someone has written a special filter which converts C functions in a header file into a class.
I don't know where you got that impression from. (And I'm sorry if it was me.) The C importer creates a class from every file by default. There is also an option for the C to enable object oriented C support. (Tools | Options | Source Code Engineering | C)
Certainly for any other language (ie. any supported language that actually has classes) functions are only imported from inside a class, but C is an exception.