[gme-users] Ordering of sets in Bon
Peter Volgyesi
peter.volgyesi at vanderbilt.edu
Tue Apr 6 18:45:16 CDT 2004
Hi,
Collections coming from the model database are never ordered. (This is a
property of our modeling engine and not BON specific, and it is because of
internal caching mechanisms.) One can argue, why don't we order these lists,
however it seems a better (general) approach to me to provide data as fast
as possible that can be sorted by the upper layers on demand.
Anyway, the MONTraverser interpreter (Paradigms/MetaGME folder) does
implement some kind of sorting (MONDialog.cpp). Feel free to use that code.
For retrieving graphical position of an object in a given aspect, use this:
fco->getRegistry()->getLocation("AspectName");
fco must be a BON FCO object (eg.: BON::Atom)
Regards,
--
peter
> -----Original Message-----
> From: gme-users-bounces at list.isis.vanderbilt.edu
> [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf
> Of Jacques Kerner
> Sent: Tuesday, April 06, 2004 9:45 AM
> To: A list for GME users to share thoughts and discuss bugs and fixes.
> Subject: [gme-users] Ordering of sets in Bon
>
> Hi,
>
> I would like to know how the std::set<...> returned by
> BONExtender generated functions are ordered. For instance, I
> have a model named "Container" that aggregates "Contained"
> Atoms "contained1", "contained2"
> and "contained3" and I was uable to figure out how the
> ordering was made. Sometimes the order is by creation of the
> contained elements, sometimes not, ...
>
> Is there a way to impose the ordering on the returned sets ?
> Do I have to define a specific operator < for this ? Could
> BonExtender generate one from a rule in the meta model ?
>
> I also wondered if one can retrieve the position of elements
> in diagrams in BON .
>
> Thank you in advance.
>
> Jacques Kerner.
> _______________________________________________
> 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