Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » making a map of map
making a map of map [message #915588] Mon, 17 September 2012 15:39
noi poi is currently offline noi poi
Messages: 29
Registered: June 2012
Junior Member
Hey hi there.

Well i have
eclass = component having
attributes 1. ref as Estring 2. val as Estring

component class contains many behaviors (ereference with containment) with eclass Abstract behavior(which is an Abstract class),

now eclass behavior inherits from eclass Abstract behavior

eclass behavior has attributes 1. ref as Estring 2. val as Estring .

Now i want to create a map that contains Map(component.ref,Map(behavior.ref, eclass behavior).

The code snippet is shown below:
helper def: componentBehaviorMap(): Map(String, Map(String, MM!Behavior)) =
MM!Component.allInstances() -> collect(c | Map{(c.ref,
c.behaviors -> collect(b | Map{(b.getbehaviorelement.ref,
b.getbehaviorelement)}) -> flatten() -> iterate(m; map:
Map(String, MM!Behavior) =
Map{} | map -> union(m)))}) ->
flatten() -> iterate(m; map:
Map(String, Map(String,
MM!Behavior)) = Map{} | map
-> union(m));

getbehaviorelement returns the metamodel element behavior.

When i try retriving the MM!Behavior. This does not work. What am i doing wrong ???
Previous Topic:class is not found or is abstract
Next Topic:[ATL] Help with lazy rule
Goto Forum:
  


Current Time: Tue Sep 23 00:25:55 GMT 2014

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

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