[gme-users] In OCL, gme::FCO::baseType throws exception
zolmol at isis.vanderbilt.edu
Fri Sep 2 17:25:32 CDT 2005
I checked in mga.idl which says that
interface IMgaFCO : IMgaObject
BaseType (fails for all instances; returns NULL if object is not derived
The ocl method baseType() uses the IMgaFCO.BaseType method.
The ocl method type() uses IMgaFCO.DerivedFrom method, which succeeds
for instances, so this is what you have to use.
From: gme-users-bounces at list.isis.vanderbilt.edu
[mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Matthew
Sent: Wednesday, August 31, 2005 1:45 PM
Subject: [gme-users] In OCL, gme::FCO::baseType throws exception
I'm having some problems with the constraint function
gme::FCO::baseType. Any time I use this in a constraint equation, it
throws an exception and returns undefined.
For example, I have the constraint:
let base = self.baseType() in
let type = self.type() in
On one of my model elements as a test. For types, the if-clause
evaluates to false and the constraint does not fail. However, for
instances the constraint checker attempts to find a type and a base
The constraint checker has no problem correctly identifying the type of
an instance. However, in all cases (even when I'm checking the
constraint for an instance of an instance of an instance),
self.baseType() throws an exception and returns undefined. I attached
an example .xme of a metamodel and test model so you can play with it.
Is this a bug?
I also included a user-defined constraint which accomplishes the
functionality that should be provided by gme::FCO::baseType. Will the
constraint system complain if I just overload the baseType name with my
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gme-users