AbstractArea

abstract class AbstractArea : IArea

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun addListener(l: IAreaListener)
Link copied to clipboard
open override fun canRead(): Boolean
Link copied to clipboard
open override fun canWrite(): Boolean
Link copied to clipboard
open override fun collectAreas(): List<IArea>
Link copied to clipboard
open override fun <T> executeRead(f: () -> T): T
Link copied to clipboard
open override fun <T> executeWrite(f: () -> T): T
Link copied to clipboard

bigger numbers are locked first

Link copied to clipboard
Link copied to clipboard
abstract fun getRoot(): INode

The root of an area is not allowed to change

Link copied to clipboard
open override fun removeListener(l: IAreaListener)
Link copied to clipboard
open override fun resolveArea(ref: IAreaReference): IArea?
Link copied to clipboard
open override fun resolveBranch(id: String): IBranch?
Link copied to clipboard
Link copied to clipboard
open override fun resolveNode(ref: INodeReference): INode?

The area should not delegate to INodeReference.resolveNode. If it can't handle the type of reference it should just return null.

Link copied to clipboard

This method allows resolveOriginalNode().getArea() != this

Link copied to clipboard
open fun <T> runWith(body: () -> T): T

All node references inside the body are resolved against this scope. Compared to runWithAlso, the existing scopes in the current context are not used, meaning they are replaced.

Link copied to clipboard
open fun <T> runWithAdditionalScope(body: () -> T): T

All node references inside the body are resolved against this scope and if that fails against any other scope in the current context.

Link copied to clipboard
open suspend fun <T> runWithAdditionalScopeInCoroutine(body: suspend () -> T): T

Does the same as runWithAlso, but with support for suspendable functions.

Link copied to clipboard
open suspend fun <T> runWithInCoroutine(body: suspend () -> T): T

Does the same as runWithOnly, but with support for suspendable functions.