Compartment
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
}
Type members
Classlikes
Inherited classlikes
Wrapper class to add basic functionality to roles and its players as unified types.
Wrapper class to add basic functionality to roles and its players as unified types.
- Type Params
- W
type of wrapped object
- Value Params
- wrapped
the player or role that is wrapped into this dynamic type
- Inherited from
- AbstractCompartment