Book a Demo

Author Topic: Packages and namespace root  (Read 2979 times)

Mitch

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Packages and namespace root
« on: September 13, 2005, 06:22:18 am »
I have a question about the "Set as Namespace Root" option for packages. I am attempting to sync some C++ code, and I can't tell if I am wrong or if EA is wrong and would appreciate any help anyone can offer.

Say I have a package, "Logical Model -> PackageA" and set it as namespace root, and create a sub-package "Logical Model -> PackageA -> PackageB" and don't set it as a namespace root (it is purely organizational). If I have a class in a completely different package that inherits something in PackageB, my C++ code is defined as class TheClass : public A::TheBase.

EA's reverse engineering does not think that these classes are related in any way, and does not create the inheritance that I think it should. Isn't this what the namespace root option is supposed to take care of? Is it not taken into account during reverse engineering? Or am I simply using packages incorrectly?

(I am using build 768)

Thanks in advance,
mitch

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Packages and namespace root
« Reply #1 on: September 13, 2005, 06:56:57 am »
Quote
[size=13][SNIP][/size]
Say I have a package, "Logical Model -> PackageA" and set it as namespace root, and create a sub-package "Logical Model -> PackageA -> PackageB" and don't set it as a namespace root (it is purely organizational).
[size=13][SNIP][/size]
Mitch,
At present EA can't handle purely organizational packages.  EA fully implements the UML2 requirement that every Package is a Namespace (or a Namespace root)  You can't have a package that is neither a Namespace root nor a Namespace - which is what I understood by your "purely Organisational" requirement.

The posting: Model elements organization: packages?
covers a similar area...

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Mitch

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Packages and namespace root
« Reply #2 on: September 14, 2005, 04:41:20 am »
Thanks Paolo, that is exactly what I was talking about. I hate having all of these classes stuck in their "project" namespace, as it makes it very difficult to find things. I don't dare create all these as real C++ namespaces, as that would be an implementation nightmare that I don't really want to get into.

Setting the package as abstract doesn't affect reverse engineering, so I guess I am stuck without a good solution (for organizing, anyways). If it is compliant, then I shall abide by it, I suppose.

Sorry about this post, by the way, and I'm very puzzled as to why my forum search didn't turn up that thread (the one you linked to); it is pretty much the same question I asked...

Thanks again,
mitch