[gme-users] Problem with enum in OCL
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
self.connectedFCOs( "dst", meta::Signals )-> forAll( c: meta::Semaphore
| c.semaphoreType = #Blocking )
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
Subject: [gme-users] Problem with enum in OCL
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...
More information about the gme-users