OCL equal (=) operator , comparing identities



Date view Thread view Subject view Author view Attachment view

From: Ahmad Hani (ahmad_gaafar@mail.com.eg)
Date: Thu 24 Jun 2004 - 10:57:23 BST


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