|
|
|
|
|
Re: "Many-Model to Model" transformation with qvto? [message #1013001 is a reply to message #1012978] |
Fri, 22 February 2013 15:40 |
Miriam Hundemer Messages: 12 Registered: February 2013 |
Junior Member |
|
|
Ok,
now I've found the chapter you ment Ed, but as I use the specification Fabio mentioned above, it is indeed on page 94, sorry for the confusion.
But if I'm interpreting this right, the "@" is not exactly what I need. As I understand , the "@" is only used for the parameters of a mapping in order to specify the precise in or out model they "belong to". But the in and out models still have to be defined in the transformation declaration above and are fixed afterwards.
transformation T(in src:S, out dest1:D, out dest2:D);
mapping X::foo(inout Y@dest1) : Y@dest2;
// 'X' is a class of 'S' metamodel and 'Y' is a class of 'D' metamodel
Here, the inmodels src and the outmodels dest1 and dest2 are defined in the transformation declaration and used later as parameter type in the mapping operation.
Perhaps I didn't explain my problem properly:
What I would need in my project (I think) is kind of beeing able to have a list (of variable length) of in models in the transformation declaration because from one execution of the transformation to the next, it is possible that the number of in models (xml files) changes.
Is there something like the second example?
//transformation with more than one but fixed number of inmodels
transformation T1 (in inModel1:Metamodel, inModel2:Metamodel, out outModel:UML);
//transformation with variable number of inmodels
transformation T (<list_of_inModels>, out outModel:UML);
All of the inmodels will be of the same metamodel.
|
|
|
|
Re: &amp;quot;Many-Model to Model&amp;quot; transformation with qvto? [message #1013029 is a reply to message #1013001] |
Fri, 22 February 2013 16:17 |
Ed Willink Messages: 7670 Registered: July 2009 |
Senior Member |
|
|
Hi
If it's a variable number of models, I suggest creating a super-model
that references all the others.
Regards
Ed Willink
On 22/02/2013 15:40, Miriam Hundemer wrote:
> Ok,
>
> now I've found the chapter you ment Ed, but as I use the specification
> Fabio mentioned above, it is indeed on page 94, sorry for the confusion.
>
> But if I'm interpreting this right, the "@" is not exactly what I
> need. As I understand , the "@" is only used for the parameters of a
> mapping in order to specify the precise in or out model they "belong
> to". But the in and out models still have to be defined in the
> transformation declaration above and are fixed afterwards.
>
> transformation T(in src:S, out dest1:D, out dest2:D);
> mapping X::foo(inout Y@dest1) : Y@dest2;
> // 'X' is a class of 'S' metamodel and 'Y' is a class of 'D' metamodel
>
> Here, the inmodels src and the outmodels dest1 and dest2 are defined
> in the transformation declaration and used later as parameter type in
> the mapping operation.
>
> Perhaps I didn't explain my problem properly:
>
> What I would need in my project (I think) is kind of beeing able to
> have a list (of variable length) of in models in the transformation
> declaration because from one execution of the transformation to the
> next, it is possible that the number of in models (xml files) changes.
> Is there something like the second example?
>
> //transformation with more than one but fixed number of inmodels
> transformation T1 (in inModel1:Metamodel, inModel2:Metamodel, out
> outModel:UML);
>
> //transformation with variable number of inmodels
> transformation T (<list_of_inModels>, out outModel:UML);
>
> All of the inmodels will be of the same metamodel.
|
|
|
Powered by
FUDForum. Page generated in 0.07292 seconds