Compartment

scroll.internal.compartment.impl.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
}

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Classlikes

implicit class Player[W <: AnyRef](val wrapped: W)(using evidence$1: ClassTag[W]) extends IPlayer[W, Player[W]], SCROLLDynamic

Attributes

Supertypes
class Compartment.this.IPlayer[W, Compartment.this.Player[W]]
trait Dynamic
trait Dispatchable
class Object
trait Matchable
class Any
Show all

Inherited and Abstract classlikes

abstract class IPlayer[+W <: AnyRef, +T <: AbstractCompartment.this.IPlayer[W, T]](val wrapped: W)(using evidence$1: ClassTag[W]) extends SCROLLDispatchable, Dynamic

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 parameters

W

type of wrapped object

Value parameters

wrapped

the player or role that is wrapped into this dynamic type

Attributes

Inherited from:
AbstractCompartment
Supertypes
trait Dynamic
trait Dispatchable
class Object
trait Matchable
class Any
Show all
Known subtypes
class Compartment.this.Player[W]

Value members

Concrete methods

override def newPlayer[W <: AnyRef : ClassTag](obj: W): Player[W]

Explicit helper factory method for creating a new Player instance without the need to relying on the implicit mechanics of Scala.

Explicit helper factory method for creating a new Player instance without the need to relying on the implicit mechanics of Scala.

Value parameters

obj

the player or role that is wrapped into this dynamic player type

Attributes

Returns

a new Player instance wrapping the given object

Definition Classes

Inherited methods

protected def applyDispatchQuery(dispatchQuery: DispatchQuery, on: AnyRef): Seq[AnyRef]

Attributes

Inherited from:
AbstractCompartment

Inherited fields

lazy override val playerEquality: PlayerEqualityApi

Attributes

Inherited from:
AbstractCompartment
lazy override val roleConstraints: RoleConstraintsApi

Attributes

Inherited from:
AbstractCompartment
lazy override val roleGraph: RoleGraphProxyApi

Attributes

Inherited from:
AbstractCompartment
lazy override val roleGroups: RoleGroupsApi

Attributes

Inherited from:
AbstractCompartment
lazy override val rolePlaying: RolePlayingApi

Attributes

Inherited from:
AbstractCompartment
lazy override val roleQueries: RoleQueriesApi

Attributes

Inherited from:
AbstractCompartment
lazy override val roleRelationships: RelationshipsApi

Attributes

Inherited from:
AbstractCompartment

Attributes

Inherited from:
AbstractCompartment

Implicits

Implicits

final implicit def Player[W <: AnyRef : ClassTag](wrapped: W): Player[W]

Inherited implicits

implicit def either2TorException[E <: SCROLLError, T](either: Either[E, T]): T

Attributes

Inherited from:
AbstractCompartment