Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Modeling with KM3: How to model an enumeration that uses numeric values.
[ATL] Modeling with KM3: How to model an enumeration that uses numeric values. [message #40370] Tue, 22 May 2007 14:14 Go to next message
Eclipse UserFriend
Originally posted by: erik_becker.gmx.de

Hi all,

I'm trying to create a meta model with KM3 and need a enumeration that
uses numbers as values.
I tried several things but didn't find a solution.

Any help is appreciated. :-)

Greetings

Erik
Re: [ATL] Modeling with KM3: How to model an enumeration that uses numeric values. [message #40401 is a reply to message #40370] Tue, 22 May 2007 14:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: freddy.allilaire.univ-nantes.fr

Hi Erik,

You should use the following syntax:

enumeration MyEnum {
literal sample1;
literal sample2;
}

Regards,
Freddy.

Erik Becker a écrit :
> Hi all,
>
> I'm trying to create a meta model with KM3 and need a enumeration that
> uses numbers as values.
> I tried several things but didn't find a solution.
>
> Any help is appreciated. :-)
>
> Greetings
>
> Erik


--
Freddy Allilaire - ATLAS Group (INRIA & LINA)
http://www.sciences.univ-nantes.fr/lina/atl/contrib/allilair e
Re: [ATL] Modeling with KM3: How to model an enumeration that uses numeric values. [message #40463 is a reply to message #40401] Tue, 22 May 2007 14:25 Go to previous message
Eclipse UserFriend
Originally posted by: freddy.allilaire.univ-nantes.fr

To use numbers as values you should add ""

-------------
class SampleClass {
attribute myEnum : Enum;
}

enumeration Enum {
literal "0";
literal "1";
}
-------------

Regards,
Freddy.

Freddy Allilaire a écrit :
> Hi Erik,
>
> You should use the following syntax:
>
> enumeration MyEnum {
> literal sample1;
> literal sample2;
> }
>
> Regards,
> Freddy.
>
> Erik Becker a écrit :
>> Hi all,
>>
>> I'm trying to create a meta model with KM3 and need a enumeration that
>> uses numbers as values.
>> I tried several things but didn't find a solution.
>>
>> Any help is appreciated. :-)
>>
>> Greetings
>>
>> Erik
>
>


--
Freddy Allilaire - ATLAS Group (INRIA & LINA)
http://www.sciences.univ-nantes.fr/lina/atl/contrib/allilair e
Previous Topic:References in iterative target model elements
Next Topic:Problem with rules with "distinct"
Goto Forum:
  


Current Time: Wed Apr 24 16:28:22 GMT 2024

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

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

Back to the top