Book a Demo

Author Topic: Import class and global functions from one header.  (Read 3766 times)

deldan

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Import class and global functions from one header.
« 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.



Is there any solution to import also global functions?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Import class and global functions from one hea
« Reply #1 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.
« Last Edit: December 20, 2014, 02:48:35 am by qwerty »

deldan

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Import class and global functions from one hea
« Reply #2 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?
« Last Edit: January 12, 2015, 11:50:39 pm by deldan »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Import class and global functions from one hea
« Reply #3 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.