[gme-users] Controlling the order in which children are returned,decorators

Zoltan Molnar zoltan.molnar at vanderbilt.edu
Thu Jul 8 12:36:41 CDT 2004


If you use GME+BON2 then with the latest BON extender you are able to
generate template getters (which as Jacques proposed earlier) accept as
incoming parameter the comparison function and give back an ordered set.

Zoli

> -----Original Message-----
> From: gme-users-bounces at list.isis.vanderbilt.edu 
> [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf 
> Of Krishnakumar B
> Sent: Thursday, July 08, 2004 11:23 AM
> To: A list for GME users to share thoughts and discuss bugs and fixes.
> Cc: Douglas C. Schmidt; Jeff Parsons
> Subject: RE: [gme-users] Controlling the order in which 
> children are returned,decorators
> 
> 
> On Wednesday, 7 July 2004, Aditya Agrawal wrote:
> > Kitty wrote:
> > > I would like to know if there is a way in GME to control 
> the order 
> > > in which children of a Model are returned. Specifically, I have a 
> > > Model which represents a IDL interface's method. I would like to 
> > > preserve the order in which the children of this model, i.e., the 
> > > parameters of the method, are stored and retrieved. I 
> need this so 
> > > that the parameters in the generated IDL always appear in 
> the same 
> > > order. Is this possible?
> > > 
> > > Assume that the above is not possible, and I add an attribute to 
> > > every child that governs the order of the children. Is 
> there a way 
> > > that I can automatically assign a value to this attribute 
> everytime 
> > > a child is created in the model? I would like to keep 
> track of the 
> > > count and increment/decrement the count on child 
> creation/deletion. 
> > > Is this achieved with a decorator?
> >  
> > [Adi]
> > Usually the visual information is used to give a 
> deterministic order to
> > the object. The most common approach is to sort the 
> children based on
> > the y co-ordinate.
> 
> When you say that the most common approach, do you imply that 
> the functions in BON2/UDM already return children of a Model 
> sorted by their ordinates, or is this something that the 
> interpreter should do, for example, using the *_sorted 
> functions in UDM?
> 
> > This allows the user to control the order and not have to 
> worry about 
> > the unique numbering.
> 
> OK. But this brings one more question. When I have huge 
> models i.e about 50 to 60 Models in a single sheet each with 
> atleast 8 ports with heavy connections between them, export 
> them and then re-import them, GME doesn't preserve the 
> location information, and it is a big mess. It takes about an 
> hour or so to bring back the original layout by moving it 
> again manually (Will auto-layout help here?). Even then it 
> seems that it wouldn't take a lot of changes to store the 
> co-ordinates in the XML export and use them when re-importing 
> back into GME. I wonder why this is not done. If I rely on 
> the ordinate to control the order, I would assume that just 
> exporting to XML and re-importing will break the order. No?
> 
> 
> > If you still want to add an attribute and provide automatic 
> numbering 
> > you will have to do so with the help of an add-on that will be 
> > triggered on the object created/deleted event and then manage the 
> > numbers.
> 
> OK.
> 
> > > Essentially we have a Component Assembly (a Model) which 
> shows the 
> > > components in the assembly and the connections between them. But 
> > > currently there is no support for composition, i.e, one cannot 
> > > create an assembly of Component assemblies. But experience with 
> > > using the tool to make models which have many instances 
> of the same 
> > > grouping of components i.e, an assembly, shows that the 
> current view 
> > > where one has to scroll the sheet to view the bigger 
> assembly is not 
> > > very intuitive. Hence my queries.
> > > 
> > > Any suggestions/pointers/ideas are very welcome.
> > 
> > [Adi]
> > I spoke to Peter about this a long time ago and it seems that this
> > project would require a lot of effort and would probably 
> have to be a
> > part of GME. This is because the decorator should be able 
> to call GME's
> > internal draw method, scale it and the return the image.
> 
> Judging from Peter's silence, I guess he agrees with you. If 
> I understand what you say correctly, this doesn't involve big 
> architectural changes to GME.
> 
> Akos, is there any way that support for this feature can be 
> added in the near future? Please let me know if I should file 
> an enhancement request in JIRA. There is a lot of interest 
> for such a capability from some of our sponsors.
> 
> Thanks,
> kitty.
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
> 



More information about the gme-users mailing list