Book a Demo

Author Topic: How to draw diagrams for union and struct  (Read 14884 times)

stoic1979

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
How to draw diagrams for union and struct
« on: March 13, 2007, 08:52:35 pm »
hi guys,

I am using Enterprise Architect to make design for a source code in C++.

I need to draw diagrams for some important structures and unions , i am confused here.

sholud i use the class entity in class diagram or some other entity.

regards
nEo

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: How to draw diagrams for union and struct
« Reply #1 on: March 13, 2007, 09:12:11 pm »
For structs, AFAIR yes a stereotyped class is the answer.  There is some info somewhere in the help on this but IBD if I remember where.  Also search here (using the usual blah blah).

For unions, don know - never used em.

bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: How to draw diagrams for union and struct
« Reply #2 on: March 13, 2007, 09:27:21 pm »
As always, a good check is to create some sample elements and reverse engineer them into EA.

(...and then forward engineer them back to to confirm you get the same result  ;))

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

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How to draw diagrams for union and struct
« Reply #3 on: March 14, 2007, 01:04:26 pm »
It's also a good idea to look at the manual.

You'll find instructions on how to model any C++ construct handled by EA at http://www.sparxsystems.com.au/EAUserGuide/index.html?cpp_conventions.htm.

shaima

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: How to draw diagrams for union and struct
« Reply #4 on: March 22, 2007, 07:33:19 pm »
A struct is just like a class, all you have to do is make its stereo type <<struct>>.
Shaimaa Elk
Senior Software Developer