On Thu, Oct 24, 2002 at 06:36:19PM +0200, ml wrote: > OK, I try to resume: > > 1. A restriction on possible connections seems to be a good > idea. Think of network diagrams, not to speak of > UML/Database/SDL/... code generation. > > 2. Of course, this must be an option to the user. Maybe a > diagram specific or a global option? > > 3. The method to check has to be a new object function. > Something like: > > typedef gboolean (*AllowConnectFunc) (Object* obj_me, > Object* obj_other, > ... /* ? */ );
It should also say whether the called object is the source or the destination. e.g. gboolean is_source Now thinking of it .... The problem is even more hairy, since also the connection can be an object, right? So in general, the function has to be called three times and their args should contain all three objects and their handles Not pretty :) But, maybe, the function could be called only once - for the connection object. If the connection object wants, it can call some function in the two connected objects. (But that would mean that it has to be able to find about objects' classes. Can it do it now?) so e.g.: gboolean can_connect_objects (Object *self, Object *from, Handle *from_h, Object *to, Handle *to_h) Jarda Benkovsky -- GCM/IT d- s:+ a- C++(+++) ULOI++++$ P++ L+++>++++ E+ W++ N w--- PS+ PE++ Y+ PGP R+ tv- b+++ D+ e+++ y+ _______________________________________________ Dia-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/dia-list FAQ at http://www.lysator.liu.se/~alla/dia/faq.html Main page at http://www.lysator.liu.se/~alla/dia