-
-
Notifications
You must be signed in to change notification settings - Fork 12
Implementation Role Feature 2
Max Leuthäuser edited this page Nov 18, 2021
·
9 revisions
Roles depend on relationships
Roles are only useful in the context of a relationship.
Although there is no mandatory restriction to use relationships between roles or role playing objects in SCROLL one can create them at any time within a Compartment.
E.g.:
val p = new CoreA
new SomeCompartment {
val rA = new RoleA
val rB = new RoleB
val rC = new RoleC
p play rA
p play rB
val rel1 = Relationship("rel1").from[RoleA](1).to[RoleB](1)
val rel2 = Relationship("rel2").from[RoleA](1).to[RoleC](1)
// ...
}
(From: RelationshipTest.scala)
Different types of multiplicities are supported. See Relationships.scala.