<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>
&gt; Hey,<br>
&gt; <br>
&gt; last time I faced this problem I had to hack that into some <br>
&gt; attribute of a class. Dirty trick but works. This functionality <br>
&gt; would be definitely useful, but I guess it could be used to pass <br>
&gt; information without following the event passing semantics.<br>
&gt; <br>
&gt; Gabe<br>
&gt; <br>
&gt; -----Original Message-----<br>
&gt; From: Gábor Bátori (IJ/ETH) [mailto:Gabor.Batori@ericsson.com] <br>
&gt; Sent: Tuesday, April 05, 2005 11:22 AM<br>
&gt; To: great-users<br>
&gt; Subject: [great-users] global variable<br>
&gt; <br>
&gt; <br>
&gt; Is it possible to create 'global variables' in GReat, which are <br>
&gt; accessible in the AtrributeMappings of different rules? For instance<br>
&gt; a counter which counts the sub-tree elements of a model, but the <br>
&gt; counter is not part of the source and the target meta-models.<br>
&gt; <br>
&gt; Thanks in advance,<br>
&gt; <br>
&gt; Gabor Batori<br>
&gt; <br>
&gt; _______________________________________________<br>
&gt; great-users mailing list<br>
&gt; great-users@list.isis.vanderbilt.edu<br>
&gt; http://list.isis.vanderbilt.edu/mailman/listinfo/great-users<br>
&gt; _______________________________________________<br>
&gt; great-users mailing list<br>
&gt; great-users@list.isis.vanderbilt.edu<br>
&gt; http://list.isis.vanderbilt.edu/mailman/listinfo/great-users<br>
</tt></font>