[great-users] global variable

Attila Vizhanyo viza at isis.vanderbilt.edu
Tue Apr 5 12:57:32 CDT 2005


Global namespaces introduce model objects into the scope of each and every rule in a transformation.
These model objects are neither instances of your source or target metamodel. Their types are specified in a dedicated, separate class diagram.
>From these global accesible objects, other model objects can be traversed, whose type in turn can be part of any metamodel, such as your source or target metamodel.
Data variables, like those in ordinary programming languages, can be modeled with UML class attributes in GReAT. 
This applies for global objects as well, and you can certainly set their values in AttributeMapping code specifications.

HTH,
Attila


> -----Original Message-----
> From: Gábor Bátori (IJ/ETH) [mailto:Gabor.Batori at ericsson.com] 
> Sent: Tuesday, April 05, 2005 11:22
> To: great-users
> Subject: [great-users] global variable
> 
> 
> Is it possible to create 'global variables' in GReat, which 
> are accessible in the AtrributeMappings of different rules? 
> For instance a counter which counts the sub-tree elements of 
> a model, but the counter is not part of the source and the 
> target meta-models.
> 
> Thanks in advance,
> 
> Gabor Batori
> 
> _______________________________________________
> great-users mailing list
> great-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/great-users
> 


More information about the great-users mailing list