[gme-users] How to use Guards with EnumAttributes

Tobias Welp TobiasWelp at gmx.de
Tue Nov 29 16:14:47 CST 2005


Currently, Im trying to use GReAT in order to make a transformation.

I want a rule only to be executed if certain conditions are fulfilled. >From the tutorial I learnt that this can be done by a guard. Unfortunately, I have serious problems to express the condition.

The rule should be executed if a certain EnumAttribute of a Class has a specific value. I tried to use

return (<className>.<EnumAttributeName>() == <Value>);

e.g. return (person.martialStatus() == "single");

This does not function, I get an error message.

I wondered if someone could tell me, what I have to do in order to achieve my aim.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20051129/6d0db0d9/attachment.htm

More information about the gme-users mailing list