[gme-users] how to compare enumeration values in ocl
Sumant Tambe
sutambe at dre.vanderbilt.edu
Mon Feb 25 22:26:52 CST 2008
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.
More information about the gme-users
mailing list