[TCS] two-step reference [message #487018] |
Mon, 21 September 2009 13:56 |
Eclipse User |
|
|
|
Originally posted by: ivanomalavolta.gmail.com
Hello everybody, I m having problems to get elements reltaed by a
two-stpe reference.
This is an examplary metamodel in km3:
package pack {
class A {
attribute name : String;
reference r1[*] container : B oppositeOf r2;
}
class B {
reference r2[1-1] : A oppositeOf r1;
reference r3[*] container : C oppositeOf r4;
}
class C {
reference r4[1-1] : B oppositeOf r3;
}
}
----
in TCS I want to refer the name attribute of A while matching
instances of the C metaclass, like this:
template A
: ...
;
template B
: ...
;
template C
: r4.r2{refersTo = name, autoCreate = never}
;
I know that this is not syntactically correct, but my question is:
is it possible to do something like that??
An alternative could be to access the "owner" of an element, like for
example using something like refImmediateComposite() in ATL... is there
something similar in TCS?
Best regards,
Ivano
|
|
|
Powered by
FUDForum. Page generated in 0.02689 seconds