[gme-users] how to compare enumeration values in ocl
sutambe at dre.vanderbilt.edu
Tue Feb 26 00:18:41 CST 2008
I figured it out!
(self.Color = #Red)
Thanks for reading.
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?
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
More information about the gme-users