[Uml-devel] Doubts time!

Gopala Krishna krishna.ggk at gmail.com
Mon Sep 15 15:16:35 UTC 2008


Hi,
> > 1) Is there possible for more than one AssociatonWidget of same type
> > between two widgets ?
>
> This used to be a wound spot, i.e. in early Umbrello versions it was not
> allowed. Then somebody did a code import of the following C++:
>
> class A;
> class B {
>   A *firstAssoc, *secondAssoc;
> };
>
> and then we realized that we need to allow multiple associations of the same
> type between two objects. I'm not sure whether the whole code has actually
> been adapted to allow it - there may still be places where it is assumed that
> there can be only one association per type between objects. But the import
> of the above code should be working.

So I assume these two associations between same two widgets are two
*different* association widgets, right ?
(looks obvious but just to confirm ;) )

> > 2) Is the operator= and operator== needed for purpose other than cut/copy ?
>
> Ouch, difficult question. That is hard to say.
> If you want, I will try to do an in-depth research of the usages.
> Probably we should be moving the code from those operators to separate
> methods, and leave the builtin operators alone.
> Reason: Right now the usages of the builtin operators are hard to find;
> much easier to grep for a special name like "assignAssocWidget()"
> or "compareAssocWidget()" or something like that.

Ok. So the best way is to temporarily remove these methods and the
compiler will help us. As you said descriptive names are easier than
the operators. I will do that during the port process.

> > 3) Can someone just list all FloatingTextWidget constraints implemented in
> > AssociationWidget so that it will be easier to me rather than studying and
> > experimenting ?
>
> The main constraint that I can think of works as follows:
>
> * Single line association
> The line is divided into two halves and a circle is opened around each half,
> i.e. the first circle center is at linelen/4 and the second center is at
> 3*linelen/4. The center of the role/multiplicity/changeability texts must be
> within the circle of their role, else the text center is constrained to the
> nearest point on the role's circle.
>
> * Association line consisting of multiple segments
> The role circles are located around the starting and ending line segment,
> respectively. Other logic as above.

Thanks for this. I was really getting paranoid going through the code
!!  I now understand.

So my approach is to rewrite AssociationWidget and LinePath in "New"
namespace and then finally move these outside the namespace after its
done. Its really hard to completely understand complex logic embedded
in 4k lines in a file! But fortunately the pseudocode comments are
great!

Therefore just a small challenge for myself for this week. Get
AssociationWidget ported by 21st of this month :)
And I can't do anything else while porting AssociationWidget, so sorry
for the temporary slow down.

> > Thanks :)
>
> You're very welcome,
>
> -- Oliver
>



--
Cheers,
Gopala Krishna A




More information about the umbrello-devel mailing list