Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] : module datatype declaration
[ATL] : module datatype declaration [message #31294] Fri, 13 April 2007 12:57 Go to next message
Eclipse UserFriend
Originally posted by: laurent.belmonte.argia.fr

Hello,

I am looking for create a tempory datatype. I have lot of context helper
which return TupleType and i would like to declare the definition of the
TupleType to avoid the multiplication of the same definition :

helper context MM!Foo def :
bar() : Sequence( TupleType( type: String , name:String) ) ...


helper context MM!Foo def :
h() : Sequence( TupleType( type: String , name:String) ) ...

so i would like to rewrite this :

declare MyType : TupleType( type: String , name:String)
helper context MM!Foo def :
bar() : Sequence( MyType ) ...


helper context MM!Foo def :
h() : Sequence( MyType ) ...

Thanks,
Laurent
Re: [ATL] : module datatype declaration [message #31756 is a reply to message #31294] Sat, 14 April 2007 16:35 Go to previous message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hello,

This is a problem I also encountered.

To my knowledge, OCL (and therefore ATL) does not provide any means to
make alias for types (like typedef in C).

We should probably try to work something out.
You may create a bugzilla entry to track this issue.


Regards,

Frédéric Jouault


Laurent Belmonte wrote:
> Hello,
>
> I am looking for create a tempory datatype. I have lot of context helper
> which return TupleType and i would like to declare the definition of the
> TupleType to avoid the multiplication of the same definition :
>
> helper context MM!Foo def :
> bar() : Sequence( TupleType( type: String , name:String) ) ...
>
>
> helper context MM!Foo def :
> h() : Sequence( TupleType( type: String , name:String) ) ...
>
> so i would like to rewrite this :
>
> declare MyType : TupleType( type: String , name:String)
> helper context MM!Foo def :
> bar() : Sequence( MyType ) ...
>
>
> helper context MM!Foo def :
> h() : Sequence( MyType ) ...
>
> Thanks,
> Laurent
Previous Topic:ATL conforms to MOF?
Next Topic:author to Person
Goto Forum:
  


Current Time: Tue Mar 19 09:56:12 GMT 2024

Powered by FUDForum. Page generated in 0.02148 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top