Re: UML Class Connection Point PATCH against CVS

Le Fri, Jun 28, 2002, à 11:03:46AM -0700, Tim Ellis a écrit:

This patch indeed works. However, the effect is that you can't control
how the connection points are spaced. Wouldn't it be better to allow a
variable number of points (like, for instance, "SADT - Box" -- try to
middle click on one of the edges) ?

So instead of Obj1 knowing it's connected to Obj2 at connection point
nr.3, it knows it's connected at a connection point nr.X from the

The trick is that while they're in memory, they're not connected to
"connection point #X from the corner", they are connected to "the connection
point at address 0x12345FED" which knows which objects are connected to it
(so that when it's destroyed, it can tell objects to disconnect).

The numbering is done only when the diagram is about to be saved -- so if
the number of CP's has changed, the numbering will be very different.

In any case, my patch replaces the ambiguous "8" with
"UMLCLASS_CONNECTIONPOINTS" which is a bit less ambiguous. If you apply
this patch as is, it'll be a lot easier to modify the Class object in the

Indeed. This makes a lot of sense, and I will merge this ASAP (which may be
in a couple of hours)

I'm still undecided; either going to a full connpoint_line

I guess I don't know what a connpoint_line is... :(

This is a subobject which manages a variable number of connection points. An
object can hold several such connpoint_line (this is what the objects I
mentioned use to handle a variable number of connection points).

should go in shortly. The only problem I see with including your patch
is: should we go afterwards to connpoint_line, how do we handle the
conversion(the cpl should then default to 1 point for pre-patch, and 7
points for post-patch.

I think I could hack together a Perl script in pretty short order that
would allow you to pass it 1 or 7 and it'd convert accordingly. Perl groks
XML like you wouldn't believe (all bow down and praise XML::DOM). The end
user would only need to know if she's upgrading her diagrams from 0.95 (or
whatever version gets this patch) or from <=0.90.

The ideal way is that the diagram "just loads", no funky conversion tool to

Might be a leeetle tricky to handle, so going CPL
right away would be better. I'm ready to help you on this, of course

...okay? I guess if I'm going to hack in cpl, I'd love to know where I can
see some working code with connpoint_line -- is this SADT - Box thing a
good start? I'll wander off to a CVS snapshot and check it out.

Yes, SADT Box is a good start.

I'll warn you, I'm not a C hacker, as you've probably already surmised.
I'm a Database Administrator, and this idea hacking dynamic numbers of
connection points in C is making me jittery... :)

Don't worry ! we all begin one day :-)

(and after all, C isn't really that worse than perl, is it ?)

        -- Cyrille 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]