[gme-users] how to compare enumeration values in ocl
sutambe at dre.vanderbilt.edu
Mon Feb 25 22:26:52 CST 2008
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.
self.Color = ocl::Enumeration(Red)
but it does not work.
Any suggestions from OCL gurus out there?
More information about the gme-users