[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,

Ah!  I see ... I misunderstood your original statement on that subject.  I see that Ed has the correct context declaration, then.  So the following is, perhaps, the most succinct definition:

context AbstractModel
inv: containedModel->isUnique(oclType())

or, until OCL 2.1 is implemented,

context AbstractModel
inv: containedModel->isUnique(eClass())

cW


On Mon, 2009-09-14 at 23:55 +0200, Gilbert Mirenque wrote:
Hi Christian,

> still the covering condition to consider:  the other requirement was to
> check that all concrete subclasses of AbstractModel are instantiated in
> the containedModel collection.

no - not all concrete sublasses have to isntantiated but this who are
only must be instantiated once.

cheers
Gilbert