Book a Demo

Author Topic: C++ namespaces?  (Read 2825 times)

medved

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
C++ namespaces?
« on: February 02, 2011, 06:52:32 am »
Hi -

How do I assign a namespace to a group of classes?

M

medved

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: C++ namespaces?
« Reply #1 on: February 02, 2011, 07:16:52 am »
The question may be better stated as follows - is it possible to have a bunch of classes which exist in a heirarchy of packages all reside in the same namespace?  Lets say I have three levels of nested packages and all the classes live in the third level but I want them all to be in one namespace.  Can EA handle this?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: C++ namespaces?
« Reply #2 on: February 02, 2011, 08:56:59 am »
The package structure in Enterprise Architect must match the namespace structure in code.  However, you can create as many namespace root packages as you desire and build the namespace hierarchy under each of them.

Project root nodes, and packages containing a space in the name are implicitly namespace root packages.