[great-users] Type Inheritance with GReAT

Gürkan Özhan gurkanozhan at gmail.com
Mon May 18 16:35:31 CDT 2009


Thanks Daniel, it worked smoothly. You've been very helpful.

  Best regards,

Gurkan

On Fri, May 15, 2009 at 11:57 PM, Daniel Balasubramanian
<daniel at isis.vanderbilt.edu> wrote:
> Gurkan,
>
> There's not a way using the graphical part of the language, but it can still be accomplished in the following way:
>
> (1): Create a new element (call it X) in some rule.
> (2): Match X in a subsequent rule, along with the element Y in which you want to create instances (or subtypes) of X.  Next, drag an AttributeMapping block into the rule.  In the AttributeMapping block, you have access to both the variables bound to X and Y, so you can write a line such as:
> X.CreateInstance(Y); //create an instance of X in Y
>
> Hope this helps,
> Daniel
>
> -----Original Message-----
> From: great-users-bounces at list.isis.vanderbilt.edu on behalf of Gürkan Özhan
> Sent: Thu 5/14/2009 5:50 PM
> To: great-users
> Subject: [great-users] Type Inheritance with GReAT
>
> Dear GReAT Community,
>   Is there a way to create subtypes or instances of model elements in
> GReAT? For example we may newly create an element in a rule and then
> in a subsequent rule we may want to create an instance of that
> previously created element. This is a powerful mechanism to use in our
> transformations,,,
>
> Best regards,
>
> Gurkan Ozhan
> _______________________________________________
> great-users mailing list
> great-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/great-users
>
>
> _______________________________________________
> 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