[gme-users] Problem with enum in OCL

Jesper Berthing jbe at cfsi.dk
Tue Aug 22 22:56:16 CDT 2006


Hi there,

I have two FCOs that can be connected via "Signals", the destination FCO has a enum with the name semaphoreType (Non Blocking = 0, Blocking = 1). The constraint is used to allow connections when the semaphoreType is Blocking and not Non Blocking.

Therefore I have made the following constraint, but it keeps returning false when I create the connection between the two FCOs. Some how the c.semaphoreType is not equal to #Blocking, how come?

self.connectedFCOs( "dst", Signals )->forAll( c : Semaphore | 
c.semaphoreType = #Blocking)

I have used this previous post: http://list.isis.vanderbilt.edu/pipermail/gme-users/2005-July/000812.html in order to figure out that enums are represented using #.


Regards,
Jesper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20060822/cb454582/attachment.htm


More information about the gme-users mailing list