[gme-users] how to compare enumeration values in ocl
Sumant Tambe
sutambe at dre.vanderbilt.edu
Tue Feb 26 00:18:41 CST 2008
Hi folks,
I figured it out!
(self.Color = #Red)
Thanks for reading.
Sumant.
Sumant Tambe wrote:
> Hi folks,
>
> What is the way of comparing an attribute that is an enumeration against
> an enumeration constant in OCL? For example,
>
> I have a model called Car, which has an enumeration attribute "Color"
> with 3 possible values: Green, Red, and Black. How do I write an OCL
> constraint that makes sure that all the cars are of Red color.
>
> I tried
>
> self.Color = ocl::Enumeration(Red)
>
> but it does not work.
>
> Any suggestions from OCL gurus out there?
>
> Thanks,
>
> Sumant.
>
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
More information about the gme-users
mailing list