[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2m] Re: [ATL]2 target objects from one source object

Hi Alexandre,

Alexandre Torres a écrit :

Solved with resolveTemp:

--p_out union g_out

rule A {
from   c_in: S:class
to
 c_out: O:class (
   c_out.elements<-c_in.properties<-collect(p|resolveTemp(p,'p_out'))
     <-union(c_in.properties<-collect(p|resolveTemp(p,'g_out')))
 )
}

The above expression, which is a bit more simple, should also give the same result:


c_out.elements <- c_in.properties <-union(c_in.properties<-collect(p|resolveTemp(p,'g_out')))


Best regards,

Hugo

rule B {
from   p_in: S:property
to
 p_out: O:field (
   ...
 ),
 g_out: O:method (
   ...
 )
}



--
--------------------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod (INRIA & EMN)
University of Nantes
2, rue de la Houssiniere
44322 Nantes Cedex 3 - France
office +33 2 51 12 58 10 /\ cell.+33 6 07 42 45 30
EMail: hugo.bruneliere@xxxxxxxx
http://www.sciences.univ-nantes.fr/lina/atl/
--------------------------------------------------------