|
Re: [QVTo] runtime operation resolution [message #487323 is a reply to message #487295] |
Tue, 22 September 2009 18:37 |
Eclipse User |
|
|
|
Originally posted by: dvorak.radek.gmail.com
Hi dhiraj,
See comments in-lined bellow.
Regards,
/Radek
On Tue, 22 Sep 2009 19:04:24 +0200, Dhiraj <dhiraj@gmail.com> wrote:
> I have started using QVTo in our application and I wasn't able
> to understand if QVTo supported runtime polymorphism for
> operations, the way Java does.
> Basically I have inheritance in my model and I want to define
> a mappning operation on the base type and also the subtype.
> I want that at the time of executing the transformation, QVTo should
> decide the correct operation to execute depending
> on the type of the model object.
Yes, QVTO supports this. The OMG specification refers to this as virtual
invocation
semantics. See section '8.2.1.15 MappingOperation' for details,
specifically
the paragraph 'Executing a mapping operation'.
> Also is it possible that I contribute the mapping operation
> of the sub-type in another transformation, that is contributed
> through the QVTo transformation extension point, and QVTo will still be
> able to resolve this?
Yes, you can do it with QVTO, if you extend the transformation where you
want
to contribute a mapping for a specific type.
See OMG specification, section '8.2.1.1 OperationalTransformation', there
are examples
about extending imported transformation at the end of the section.
Beware of signature compatibility of the extending and extended
transformations.
Note, it generally works for any imported transformation (the extension
point just publishes
a qvto compilation unit (file) under a known qualified name, which can be
imported).
|
|
|
|
Re: [QVTo] runtime operation resolution [message #487457 is a reply to message #487449] |
Wed, 23 September 2009 10:28 |
Eclipse User |
|
|
|
Originally posted by: dvorak.radek.gmail.com
Hi dhiraj,
- virtual invocation is supported since 1.0.0
- extending transformation is supported since 2.0.0
I recommend to switch to the latest 2.0.0 release as we have made a
significant
step forward.
Regards,
/Radek
On Wed, 23 Sep 2009 12:02:19 +0200, Dhiraj <dhiraj@gmail.com> wrote:
> Hi Radek,
>
> Thanks for the detailed information. But is this available in QVTO 1.0?
> I tried writing a transformation which extends another transformation,
> and the QVTO editor shows a warning saying 'Transformation model usages
> not supported'.
> Does this mean that the QVTO 1.0 runtime does not support this facility?
|
|
|
Powered by
FUDForum. Page generated in 0.02828 seconds