<div>Thanks Matthew, Zoli, Akos</div>
<div> </div>
<div>I applied Zoli's advice below and it worked for me. Metthew's post was is very helpful.</div>
<div> </div>
<div>Regards</div>
<div>Zawar<br><br> </div>
<div><span class="gmail_quote">On 2/23/06, <b class="gmail_sendername">Zoltan Molnar</b> <<a href="mailto:zolmol@isis.vanderbilt.edu">zolmol@isis.vanderbilt.edu</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<br>If you specify 0..1 on the containment line the paradigm will have a constraint defined automatically.
<br>However if you'd like to make that constraint preventive, you<br>-either specify events for all automatic constraints in the Options dialog shown during MetaInterpretation [select the Event button near Containment and tick the newchild event]
<br>-or create a custom constraint on the Constraint aspect attached to the Any container and select it to be checked on every OnNewChild event<br><br><br>If you chose the 1st option, any container/contaiment which is not 0..* will be checked on the NewChild event.
<br>In the 2nd case your custom constraint can be defined so that it will check only Any models, upon NewChild event arrivals.<br><br>Br,Zoli<br><br>><br>> Zawar Qayyum wrote:<br>> > Akos<br>> ><br>> > I am using GME as part of my research in modelling an architectural
<br>> > definition language Pi-ADL at Université de Bretagne-Sud. I<br>> must say<br>> > that its a very robust and well written tool. I have a<br>> little question<br>> > however: In my meta model I have a <<Model>> called Any, which can
<br>> > contain (through a containment relationship) atmost one instance of<br>> > <<Atom>> BaseType. How do I express that in the subset of<br>> OCL that GME<br>> > implements? Customizing the multiplicity doesn't seem to have the
<br>> > desired effect since I want to /*prevent*/ the addition of<br>> more than one<br>> > BaseTypes.<br>> ><br>> > I would have liked to post this question on a relevant discussion<br>> > forum
<br>> > but didn't find any. Could you point me to any such forum<br>> that you know of?<br>> ><br>> > Thanks in advance.<br>> > Zawar<br>><br>> _______________________________________________
<br>> gme-users mailing list<br>> <a href="mailto:gme-users@list.isis.vanderbilt.edu">gme-users@list.isis.vanderbilt.edu</a><br>> <a href="http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users">http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
</a><br>><br>_______________________________________________<br>gme-users mailing list<br><a href="mailto:gme-users@list.isis.vanderbilt.edu">gme-users@list.isis.vanderbilt.edu</a><br><a href="http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users">
http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users</a><br></blockquote></div><br>