Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [mdt-ocl.dev] When use Operations and Def?

Hi Andreza,
 
First, I would ask you to raise such questions in the OCL newsgroup (now known as forum).
 
To answer your question, operations declared in the metamodels are the actual operations that the metaclasses have. You can use them in any OCL scripts/environments - they are always available since they belong to the metaclasses.
Operations declared with "def" are defined on a metaclass context but do not actually belong to the metaclass. Inside your OCL environment you can use them the same way you use operations declared in metaclasses. However, they are not available outside your environment, i.e. in other OCL scripts. You can think of "def"-operations as of some additional queries which you can use for the purposes of your script.
 
Regards,
- Alex.


From: mdt-ocl.dev-bounces@xxxxxxxxxxx [mailto:mdt-ocl.dev-bounces@xxxxxxxxxxx] On Behalf Of Andreza de Sousa Vieira
Sent: Thursday, October 29, 2009 12:42 PM
To: mdt-ocl.dev@xxxxxxxxxxx
Subject: [mdt-ocl.dev] When use Operations and Def?

Hello everybody,

I have seen several metamodels and I have noted that some of them declare operations in its metaclasses (with the attributes) and some of them declare operations using "def".
I want to know the difference for defining operations using "def" and declaring operations in the metaclass.
Thanks.

--
Andreza Vieira


Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes

Back to the top