[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.m2m] Re: [QVTO] How to cast and do a return?
|
- From: Gilbert Mirenque <formatzeh@xxxxxx>
- Date: Thu, 10 Sep 2009 09:36:42 +0200
- Newsgroups: eclipse.modeling.m2m
- Organization: EclipseCorner
- User-agent: Thunderbird 2.0.0.21 (Windows/20090302)
Hi Radek,
Ok thank you. Yes I can restructure the mapping. But you mentioned that
mappings normally should return something. Maybe it would be better in
my case that I refactor my mapping into a helper? I fear that I can read
about the exact intention of mapping and helper in the QVT spec from the
OMG :(
best regards,
Gilbert
radek dvorak wrote:
> Hi Gilbert,
>
> Using 'return' from mapping operations is limitation of the current QVTO
> release.
> The reason is that a mapping typically has a return type and consequently
> a predefined 'result' variable, which receives its final value within or
> just
> in the end of 'init' section.
> It might be a bit confusing if a mapping returned (via explicit return
> expression)
> a value different from the one already recorded in traces.
>
> The OMG spec is not clear about this situation so we imposed this
> limitation,
> thinking it can always be solved in an alternative way.
>
> In your mapping we actually could allow explicit return as there is no
> result
> variable involved.
>
> However, for now, I assume you can just restructure your mapping to
> avoid the need for
> return expression.
>
> We also have to rethink some other cases to make things more flexible.
>
> Regards,
> /Radek
>
>
>