ObservableMutableMeta

A Meta which is both observable and mutable

Functions

attach
Link copied to clipboard
common
abstract fun attach(name: Name, node: ObservableMutableMeta)

Zero-copy (if possible) attach or replace existing node. Node is used with any additional state, listeners, etc. In some cases it is possible to have the same node as a child to several others

equals
Link copied to clipboard
common
abstract operator override fun equals(other: Any?): Boolean
getMeta
Link copied to clipboard
common
open override fun getMeta(name: Name): ObservableMutableMeta?
getOrCreate
Link copied to clipboard
common
abstract override fun getOrCreate(name: Name): ObservableMutableMeta

Get existing node or create a new one

getValue
Link copied to clipboard
common
open override fun getValue(name: Name): Value?
hashCode
Link copied to clipboard
common
abstract override fun hashCode(): Int
invalidate
Link copied to clipboard
common
abstract fun invalidate(name: Name)

Force-send invalidation signal for given name to all listeners

onChange
Link copied to clipboard
common
abstract fun onChange(owner: Any?, callback: Meta.(name: Name) -> Unit)

Add change listener to this meta. Owner is declared to be able to remove listeners later. Listener without owner could not be removed

put
Link copied to clipboard
common
open infix fun String.put(boolean: Boolean)
open infix fun String.put(array: DoubleArray)
open infix fun String.put(enum: Enum<*>)
open infix fun String.put(builder: MutableMeta.() -> Unit)
open infix fun String.put(number: Number)
open infix fun String.put(string: String)
open infix fun String.put(meta: Meta)
open infix fun String.put(repr: MetaRepr)
open infix fun String.put(value: Value?)
open infix fun Name.put(boolean: Boolean)
open infix fun Name.put(enum: Enum<*>)
open infix fun Name.put(mutableMeta: MutableMeta.() -> Unit)
open infix fun Name.put(number: Number)
open infix fun Name.put(string: String)
open infix fun Name.put(meta: Meta)
open infix fun Name.put(repr: MetaRepr)
open infix fun Name.put(value: Value?)
putIndexed
Link copied to clipboard
common
open infix fun String.putIndexed(iterable: Iterable<Meta>)
open infix fun Name.putIndexed(iterable: Iterable<Meta>)
removeListener
Link copied to clipboard
common
abstract fun removeListener(owner: Any?)

Remove all listeners belonging to given owner

setMeta
Link copied to clipboard
common
abstract fun setMeta(name: Name, node: Meta?)
setValue
Link copied to clipboard
common
open override fun setValue(name: Name, value: Value?)
toMeta
Link copied to clipboard
common
open override fun toMeta(): Meta
toString
Link copied to clipboard
common
abstract override fun toString(): String

Properties

items
Link copied to clipboard
common
abstract val items: Map<NameToken, Meta>
value
Link copied to clipboard
common
abstract val value: Value?