IArea

interface IArea

An IArea is similar to an IBranch. They both provide transactional access to nodes, but the IBranch can only be used with an ITree. An IArea can be used with any INode. IArea is a higher level replacement for IBranch. The goal is to provide access to different independent models through one virtual model. It's like a unix filesystem with mount points. The model inside an area can also be an MPS model that is not a persistent data structure.

Inheritors

Functions

Link copied to clipboard
abstract fun addListener(l: IAreaListener)
Link copied to clipboard
abstract fun canRead(): Boolean
Link copied to clipboard
abstract fun canWrite(): Boolean
Link copied to clipboard
abstract fun collectAreas(): List<IArea>
Link copied to clipboard
abstract fun <T> executeRead(f: () -> T): T
Link copied to clipboard
abstract 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
abstract fun removeListener(l: IAreaListener)
Link copied to clipboard
abstract fun resolveArea(ref: IAreaReference): IArea?
Link copied to clipboard
abstract fun resolveBranch(id: String): IBranch?
Link copied to clipboard
Link copied to clipboard
abstract 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