<br><font size=2 face="sans-serif">Global namespace in GReAT are defined
using a UML Package with a root element. This package is marked as global
which means that GReAT will manage the single instance of this namespace
within the rules. </font>
<br>
<br><font size=2 face="sans-serif">you can create an arbitrary type system
in the global package. For example, you could have new classes with attributes,
associations and all the works of a normal UML class diagram. Then in the
rules you can access the root element of this global namespace without
having to get it from an input port.</font>
<br>
<br><font size=2 face="sans-serif">If you have a reference of the root
type in the rule GReAT will provide you this root element. From here on
it is regular great semantics, you can find other entities of your type
system by traversing through the global root element and access these types
and their attributes in the Guard and Attribute mapping code. </font>
<br>
<br><font size=2 face="sans-serif">Attila, please correct me if I am wrong.</font>
<br>
<br><font size=2 face="sans-serif">Thanks,</font>
<br><font size=2 face="sans-serif">Adi</font>
<br>
<br><font size=2 face="sans-serif">-----------------------------------<br>
Aditya Agrawal<br>
Researcher<br>
IBM T. J. Watson<br>
mailto:aagrawa@us.ibm.com<br>
+1 (914) 784-6068 (TL 863)<br>
</font>
<br>
<br><font size=2><tt>great-users-bounces@list.isis.vanderbilt.edu wrote
on 04/05/2005 12:27:58 PM:<br>
<br>
> Hey,<br>
> <br>
> last time I faced this problem I had to hack that into some <br>
> attribute of a class. Dirty trick but works. This functionality <br>
> would be definitely useful, but I guess it could be used to pass <br>
> information without following the event passing semantics.<br>
> <br>
> Gabe<br>
> <br>
> -----Original Message-----<br>
> From: Gábor Bátori (IJ/ETH) [mailto:Gabor.Batori@ericsson.com] <br>
> Sent: Tuesday, April 05, 2005 11:22 AM<br>
> To: great-users<br>
> Subject: [great-users] global variable<br>
> <br>
> <br>
> Is it possible to create 'global variables' in GReat, which are <br>
> accessible in the AtrributeMappings of different rules? For instance<br>
> a counter which counts the sub-tree elements of a model, but the <br>
> counter is not part of the source and the target meta-models.<br>
> <br>
> Thanks in advance,<br>
> <br>
> Gabor Batori<br>
> <br>
> _______________________________________________<br>
> great-users mailing list<br>
> great-users@list.isis.vanderbilt.edu<br>
> http://list.isis.vanderbilt.edu/mailman/listinfo/great-users<br>
> _______________________________________________<br>
> great-users mailing list<br>
> great-users@list.isis.vanderbilt.edu<br>
> http://list.isis.vanderbilt.edu/mailman/listinfo/great-users<br>
</tt></font>