Re: OCL equal (=) operator , comparing identities



Date view Thread view Subject view Author view Attachment view

From: Shashank (shashank@icmgworld.com)
Date: Thu 24 Jun 2004 - 13:40:00 BST


try something like this:

object.oclIsTypeOf(type : OclType) : Boolean
True if type is equal to one of the types of object.

Ahmad Hani wrote:

> Hello All, I am sure that the OCL equal (=) operator is capable of
> comparing operands that conform to the same data type either
> predefined or userdefined The thing I am not sure of : is it also
> capable of comparing objects based on their identity ? Example Let c1
> an instance of Class C, and b1 an instance of Class B, is the
> following a valid expression, regardless it evaluates to true or
> false c1 = b1?? and if the = can not compare objects based on ObjectID
> is it possible to compare between instances that belong to different
> classes, That might sound crazy , but I need
> confirmation Thanks  Ahmad

Date view Thread view Subject view Author view Attachment view