making a map of map [message #915588] |
Mon, 17 September 2012 15:39 |
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 ???
|
|
|
Powered by
FUDForum. Page generated in 0.03239 seconds