View Question

How to represent a c++ parameter whose type is in another namespace in class diagram?

I use package to represent c++ namespace

for example here is the structure :

Code
 tools 
    |------security (package)
    |                 |--------security_manager (class)          //what if there is a operation in sercurity_manager class that will use eType, how to represent it ?
    |------thread (package)
    |------common (package)
                      |--------state (class)
                                         |---------eType (subclass)

Product: Astah Professional

Hi Dangle,

Thanks for your post.

First, this is your model structure.

Image Text

  1. Drag and drop the security_manager class to a diagram, click the green icon to add an operation Image Text
  2. Select the operation, and go down to the left-bottom pane to open the operation's property view. Choose [Parameters] tab and click [Add] button to add a parameter Image Text
  3. When you specify the type, a drop-down menu appears, choose "eType" Image Text
  4. Now the "eType" is represented in the the security_manager class on the diagram Image Text

Hope this helps. If this isn't what you are asking for, let me know!

Cheers, SJ

Answer Question

This content has the following tags: