MemoryWriter

interface MemoryWriter

The interface to write primitive types into this memory.

Functions

equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
release
Link copied to clipboard
common
abstract fun release()
Disposes this writer if needed.
toString
Link copied to clipboard
common
open fun toString(): String
writeByte
Link copied to clipboard
common
abstract fun writeByte(offset: Int, value: Byte)
Writes Byte at certain offset.
writeDouble
Link copied to clipboard
common
abstract fun writeDouble(offset: Int, value: Double)
Writes Double at certain offset.
writeFloat
Link copied to clipboard
common
abstract fun writeFloat(offset: Int, value: Float)
Writes Float at certain offset.
writeInt
Link copied to clipboard
common
abstract fun writeInt(offset: Int, value: Int)
Writes Int at certain offset.
writeLong
Link copied to clipboard
common
abstract fun writeLong(offset: Int, value: Long)
Writes Long at certain offset.
writeShort
Link copied to clipboard
common
abstract fun writeShort(offset: Int, value: Short)
Writes Short at certain offset.

Properties

memory
Link copied to clipboard
common
abstract val memory: Memory
The underlying memory.

Extensions

write
Link copied to clipboard
common
fun <T : Any> MemoryWriter.write(spec: MemorySpec<T>, offset: Int, value: T)
Writes the object value with spec starting from offset.
writeArray
Link copied to clipboard
common
fun <T : Any> MemoryWriter.writeArray(spec: MemorySpec<T>, offset: Int, array: Array<T>)
Writes array of objects mapped by spec at certain offset.