[gme-users] Problem with enum in OCL

Zoltan Molnar zolmol at isis.vanderbilt.edu
Wed Aug 23 12:00:21 CDT 2006

For me it works although i used the "meta::" prefix for Signals and
Semaphore like: 
self.connectedFCOs( "dst", meta::Signals )-> forAll( c: meta::Semaphore
| c.semaphoreType = #Blocking )

-----Original Message-----
From: gme-users-bounces at list.isis.vanderbilt.edu
[mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Jesper
Sent: Tuesday, August 22, 2006 2:56 PM
To: gme-users
Subject: [gme-users] Problem with enum in OCL

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:
l in order to figure out that enums are represented using #.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20060823/1ac966e1/attachment.htm

More information about the gme-users mailing list