[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmt] Re: [Epsilon] [Eugenia] EnumType Attributes

Sami wrote:
How can we declare enum type attributes.
For example;

@gmf.node(label="type")
abstract class NamedElement {
   attr String type;
}

type : type1, type2, type3


Hi Sami,

Apologies for the late reply; Dimitrios is on vacation, and I've been unwell this week.

To specify an enumeration type, use the following Emfatic syntax:

gmf.node(label="type")
abstract class File {
  attr YourEnumType type;
}

enum YourEnumType {
  type1 = 0;
  type2 = 1;
  type2 = 2;
}

Full reference documentation for Emfatic can be found at: http://www.alphaworks.ibm.com/tech/emfatic/download

Many thanks,
Louis.