[Uml-user] Code generation for associations

Nicolas.Castagne at imag.fr Nicolas.Castagne at imag.fr
Wed Feb 9 11:03:33 UTC 2005


Hi,

I just found out the TIP - and post the solution here for keeping it in
the list archive.

Here it is :
===> In order to generate associations in the code,
===> one need to name the correspounding associations roles.

Hop, it was that simple !

Now... I still have a pb.
I wonder why the generated does not comply with the std::vector syntax...

For a composition of class B in class A, with a role named "linkb" with
"0..*" multiplicity, I get in class A :

   vector linkbVector;

instead of

   vector <B> linkB;

Did I do, or understand, something wrong again, or is that some kind of
**bug** i should register on the bug tracker ?

Thx,
Nicolas


> Hi there,
>
> thanks for the work on Umbrello - I installed it a couple of days ago, and
> so far it really looks like what I was looking for.
>
> However, I am unable to generate any c++ code for associations between
> classes.
>
> As an example, I enclosed with this mail a simple class diagram, and the
> generated code for class A. As you will see, the code for class A does not
> feature any composition with class B or D - though they are composed in
> the uml diagram. I supose A and D classes should be enclosed in class A as
> static classes...
>
> I did not find any info in the list archive or in the doc, or on the Net,
> though I had a close look the previous days.
>
> Is there a simple reason for that ? What did I do wrong ?
>
> Thx !
> Nicolas





More information about the umbrello mailing list