RE: question on OCL



Date view Thread view Subject view Author view

GERARD Sebastien 166342 (GERARD@ortolan.cea.fr)
Mon, 3 Apr 2000 16:27:00 +0200


thank you, yours sebastien. -----Message d'origine----- De : Jos Warmer [mailto:J.Warmer@klasse.nl] Envoyé : lundi 3 avril 2000 14:53 À : puml-list@cs.york.ac.uk Cc : 'puml-list@cs.york.ac.uk' Objet : Re: question on OCL Hi Gerard, At 03:31 PM 31-03-00 +0200, GERARD Sebastien 166342 wrote: >Hy, > >I would like to express that the trigger event of a transition is always of >type CallEvent. >Is it right to write : > >Transiton: >self.trigger.oclAsType(CallEvent) > The operation 'oclAsType()' is a typecast and results in an object of the argument type. The statemanet above results in an object of type CallEvent. If you want to state that an object must be of a certain type you should use oclIsTypeOf() or oclIsKindOf(). The above expression becvomes: context Transition inv: self.trigger.isTypeOf(CallEvent) This results in true of the 'self.trigger' object is an instance of CallEvent. Jos _____________________________________________________ Klasse Objecten tel : +31 (0)35 6037646 Chalonhof 153 fax : +31 (0)35 6037647 3762 CT Soest email : J.Warmer@klasse.nl The Netherlands internet: http://www.klasse.nl To remove yourself from this list please mail puml-list-request@cs.york.ac.uk with a message containing the word "unsubscribe".


Date view Thread view Subject view Author view