Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: deldan on December 19, 2014, 10:08:24 pm

Title: Import class and global functions from one header.
Post by: deldan on December 19, 2014, 10:08:24 pm
Hello,


When I import C++ header then EA creates only classes(with attributes and methods), structures and enums. EA doesn't import global functions.

I have prepared easy example of the problem.

(http://i.imgur.com/pz4Tc92.png)

Is there any solution to import also global functions?
Title: Re: Import class and global functions from one hea
Post by: qwerty on December 20, 2014, 02:48:21 am
Since they do not belong to any class, I guess not. What would you expect them to be in UML?

q.
Title: Re: Import class and global functions from one hea
Post by: deldan on January 12, 2015, 08:54:10 pm
To be honest I don't know what kind of result should be. UML is object oriented so this doesn't fit to UML standard.

In real C++ production code we have mostly object oriented code and a little bit not object oriented code (function that belongs only to namespace, not to any class). So it means that we can't document it on EA?
Title: Re: Import class and global functions from one hea
Post by: qwerty on January 12, 2015, 10:53:11 pm
You could create a (e.g. <<static func>>) stereotyped class for them. I don't know if you could modify the syntax file so it eats that kind of stuff. At least you could add it manually and (quite sure) you can adapt the code generator to produce code stubs for them.

q.