scroll.internal.compartment.impl

Type members

Classlikes

abstract

Partly implements the API for Compartments. See the subclasses Compartment and MultiCompartment for examples of a full implementation.

Partly implements the API for Compartments. See the subclasses Compartment and MultiCompartment for examples of a full implementation.

This Trait allows for implementing an objectified collaboration with a limited number of participating roles and a fixed scope.

This Trait allows for implementing an objectified collaboration with a limited number of participating roles and a fixed scope.

==Overview== Roles are dependent on some sort of context. We call them compartments. A typical example of a compartment is a university, which contains the roles Student and Teacher collaborating in Courses. Everything in SCROLL happens inside of Compartments but roles (implemented as standard Scala classes) can be defined or imported from everywhere. Just mix in this Trait into your own specific compartment class or create an anonymous instance.

==Example==

val player = new Player()
new Compartment {
 class RoleA
 class RoleB

 player play new RoleA()
 player play new RoleB()

 // call some behaviour
}

This Trait allows for implementing an objectified collaboration with a limited number of participating roles and a fixed scope. In contrast to the normal Compartment, in case of ambiguities all role methods will be called in sequence.

This Trait allows for implementing an objectified collaboration with a limited number of participating roles and a fixed scope. In contrast to the normal Compartment, in case of ambiguities all role methods will be called in sequence.