[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.mdt.ocl] Re: How to check the types of containment?

Hi, Gilbert,

Oops, yes, I did.  I always get confused by the fact that this is the one boolean-valued iterator that uses "is" in the name.  Unlike exists, forAll, one.  :-)

Until OCL 2.1 is implemented, the Ecore-specific eClass() is the only work-around available to the problem of access to the type of an object (unless, of course, you define an operation or an attribute in your model that gets the object's type, but I can't recommend that).  OCL 1.x had the OclAny::oclType attribute, OCL 2.0 removed it, and OCL 2.1 will restore it in the form of an operation:  OclAny::oclType().

Cheers,

Christian

On Fri, 2009-09-11 at 15:41 +0200, Gilbert Mirenque wrote:
Hi Christian,
didn't you mean the containedModel->isUnique(..) method?

>   context CompositionModel
>   inv: containedModel->unique(eClass())

eClass() is emf specific and not pure ocl spec isn't it?