[QVTo] global variables for transformation [message #539426] |
Thu, 10 June 2010 12:59  |
Eclipse User |
|
|
|
Hi @all:
I need to do a switch case in my transformation. Something like, if x:= true do ttransformation xyz else tranformation xyz'
due to the fact that in my case the differences between xyz and xyz' are pretty small I want to use an additional input parameter of boolean for my transformation.
I did not find a lot of information about global variables in QVTo at all. just the following:
Quote: |
transformation UmlCleaning(inout umlmodel:UML14)
extends MyUmlFacilities(UML14),
access MathUtils;
var allSuper : Set(Class); // a global variable
main () {
allSuper := umlmodel.objectsOfType(Class)->collect(i|i.getAllBaseClasses());
// ....
}
|
(taken from QVT Specification 2.0 chapter 8.1.3)
so I tried the following:
transformation Arsep2Tsp(in arsep : ARSEP, out tsp : TSP);
var complMode_ : Boolean;
main() {
complMode_ := true;
// ...
}
this does not work anyway.
So does anybody know how to use global variables?
Or even better: how to use additional parameters for a transformation?
Thanks!
Chris
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07738 seconds