Using collection in an imperative block section [message #53488] |
Thu, 19 July 2007 14:18 |
Eclipse User |
|
|
|
Originally posted by: mefloricel.yahoo.com
Hello,
In an ATL transformation can I use Collection in an imperative block,
things like :
helper def : listClass : Sequence(UML!Class) = Sequence {};
and then use them during the transformation to memorise elements, like :
do
{
thisModule.listClass <- thisModule.listClass -> append(ruleClass);
}
or like
do
{
thisModule.listClass -> append(ruleClass);
}
where ruleClass is a UML!Class.
I've tried both variants and it doesn't seems to work.
Do you know where I could find more documentation or examples on the
imperative of ATL?
Thank you!
Best regards,
Flori
|
|
|
|
Re: Using collection in an imperative block section [message #54023 is a reply to message #53488] |
Fri, 20 July 2007 12:07 |
Eclipse User |
|
|
|
Originally posted by: Hugo.Bruneliere.univ-nantes.fr
Flori Glitia a écrit :
> Hello,
>
Hi Flori,
> In an ATL transformation can I use Collection in an imperative block,
> things like :
>
> helper def : listClass : Sequence(UML!Class) = Sequence {};
>
> and then use them during the transformation to memorise elements, like :
>
> do
> {
> thisModule.listClass <- thisModule.listClass -> append(ruleClass);
> }
>
Have you already tried to do something like this:
do {
thisModule.listClass <- thisModule.listClass->union(Sequence{ruleClass});
}
>
> or like
>
> do
> {
> thisModule.listClass -> append(ruleClass);
> }
>
>
> where ruleClass is a UML!Class.
>
> I've tried both variants and it doesn't seems to work.
>
> Do you know where I could find more documentation or examples on the
> imperative of ATL?
>
> Thank you!
>
> Best regards,
>
> Flori
>
Best regards,
Hugo
--
--------------------------------------------------------
Hugo Bruneliere - R&D Engineer
ATLAS Group (INRIA & LINA) - 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@univ-nantes.fr
http://www.sciences.univ-nantes.fr/lina/atl/
--------------------------------------------------------
|
|
|
Powered by
FUDForum. Page generated in 0.03921 seconds