SlotMap
The property table behind a ScriptableObject. It is iterable but is not a Map, because a real map brings overhead this does not need.
The shape of this interface is odd and its dealings with ScriptableObject are involved. Upstream says plainly that tidier versions of it cost real performance, so it stays as it is.
Inheritors
Types
Functions
Link copied to clipboard
Puts a slot straight in. Both its name and its index hash have to be set already. ScriptableObject normally goes through modify instead.
Link copied to clipboard
open fun <S : Slot> compute(owner: SlotMapOwner, key: Any?, index: Int, compute: SlotMap.SlotComputer<S>): S?
Replaces what key maps to with whatever compute returns: null removes the mapping, and anything else replaces or creates it. If compute throws, nothing changes.
abstract fun <S : Slot> compute(owner: SlotMapOwner?, mutableMap: CompoundOperationMap, key: Any?, index: Int, compute: SlotMap.SlotComputer<S>): S?
Link copied to clipboard
Opens a compound operation over this map.