[great-users] Debug via attribute mapping
Feng Shi
fengshi at isis.vanderbilt.edu
Fri Aug 10 11:51:40 CDT 2007
Hi Joe,
CrossLink is just a form of simple association. You can create or access
the CrossLink in the same way as other association. For example,
ClassA <(cl_src---------------------------------(cl_dst)> ClassB
There is a CrossLink defined between ClassA object and ClassB object
with association end role names as "cl_src" and "cl_dst".
To create a crosslink from ClassA object to ClassB object, the code
would look like:
ClassA.cl_dst_end() += ClassB; (note: using "+=" or "=" depends on the
cardinality defined at the association end.)
To access the crosslink from either end( say ClassA here):
set<ClassB> classBs = ClassA.cl_src();
Hope this helps,
Thanks,
Feng
-----Original Message-----
From: great-users-bounces at list.isis.vanderbilt.edu
[mailto:great-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Joe
Porter
Sent: Friday, August 10, 2007 10:51 AM
To: great-users
Subject: [great-users] Debug via attribute mapping
I'm trying to debug a rule that creates crosslinks, which are then
used in later rule. I need to see whether the crosslinks were actually
created, but the GR debugger can't do that. Due to a bug in the
code generator (see previous e-mails), I can't generate code for this
tranformation and step through it.
Now down to the question -- Gabor suggested that we might be able to
add attribute mapping code to the rule that creates the crosslinks in
order to see whether they were created. My problem is that the
UDM code generated for the crosslinks provides no clues about how they
could be referenced or accessed. Is this a relatively easy thing to do?
What would be the form of CrossLink references created this way?
Thanks for all of your help,
-Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/great-users/attachments/20070810/de03159a/attachment.htm
More information about the great-users
mailing list