OpaquePointerArrayBuffer¶
class OpaquePointerArrayBuffer : ArrayBuffer
Properties¶
pointer¶
val pointer: COpaquePointer
**Parameters**
- pointer: The opaque C pointer to the native memory
size¶
Functions¶
getByte¶
Reads a byte at the specified offset.
**Return**
the byte value
**Parameters**
- offset: the byte offset
getDouble¶
Reads a double at the specified offset.
**Return**
the double value
**Parameters**
- offset: the byte offset (must be aligned to 8 bytes)
getFloat¶
Reads a float at the specified offset.
**Return**
the float value
**Parameters**
- offset: the byte offset (must be aligned to 4 bytes)
getInt¶
Reads an int at the specified offset.
**Return**
the int value
**Parameters**
- offset: the byte offset (must be aligned to 4 bytes)
getShort¶
Reads a short at the specified offset.
**Return**
the short value
**Parameters**
- offset: the byte offset (must be aligned to 2 bytes)
getUByte¶
Reads an unsigned byte at the specified offset.
**Return**
the unsigned byte value
**Parameters**
- offset: the byte offset
getUInt¶
Reads an unsigned int at the specified offset.
**Return**
the unsigned int value
**Parameters**
- offset: the byte offset (must be aligned to 4 bytes)
getUShort¶
Reads an unsigned short at the specified offset.
**Return**
the unsigned short value
**Parameters**
- offset: the byte offset (must be aligned to 2 bytes)
setByte¶
Writes a byte at the specified offset.
**Parameters**
- offset: the byte offset
- value: the byte value to write
setBytes¶
Writes a ByteArray into the buffer at the specified offset.
**Parameters**
- offset: the byte offset where to start writing
- array: the byte array to write
setDouble¶
Writes a double at the specified offset.
**Parameters**
- offset: the byte offset (must be aligned to 8 bytes)
- value: the double value to write
setDoubles¶
open override fun setDoubles(offset: ULong, array: DoubleArray)
Writes a DoubleArray into the buffer at the specified offset.
**Parameters**
- offset: the byte offset where to start writing (must be aligned to 8 bytes)
- array: the double array to write
setFloat¶
Writes a float at the specified offset.
**Parameters**
- offset: the byte offset (must be aligned to 4 bytes)
- value: the float value to write
setFloats¶
open override fun setFloats(offset: ULong, array: FloatArray)
Writes a FloatArray into the buffer at the specified offset.
**Parameters**
- offset: the byte offset where to start writing (must be aligned to 4 bytes)
- array: the float array to write
setInt¶
Writes an int at the specified offset.
**Parameters**
- offset: the byte offset (must be aligned to 4 bytes)
- value: the int value to write
setInts¶
Writes an IntArray into the buffer at the specified offset.
**Parameters**
- offset: the byte offset where to start writing (must be aligned to 4 bytes)
- array: the int array to write
setShort¶
Writes a short at the specified offset.
**Parameters**
- offset: the byte offset (must be aligned to 2 bytes)
- value: the short value to write
setShorts¶
open override fun setShorts(offset: ULong, array: ShortArray)
Writes a ShortArray into the buffer at the specified offset.
**Parameters**
- offset: the byte offset where to start writing (must be aligned to 2 bytes)
- array: the short array to write
setUByte¶
Writes an unsigned byte at the specified offset.
**Parameters**
- offset: the byte offset
- value: the unsigned byte value to write
setUBytes¶
open override fun setUBytes(offset: ULong, array: UByteArray)
Writes a UByteArray into the buffer at the specified offset.
**Parameters**
- offset: the byte offset where to start writing
- array: the unsigned byte array to write
setUInt¶
Writes an unsigned int at the specified offset.
**Parameters**
- offset: the byte offset (must be aligned to 4 bytes)
- value: the unsigned int value to write
setUInts¶
Writes a UIntArray into the buffer at the specified offset.
**Parameters**
- offset: the byte offset where to start writing (must be aligned to 4 bytes)
- array: the unsigned int array to write
setUShort¶
Writes an unsigned short at the specified offset.
**Parameters**
- offset: the byte offset (must be aligned to 2 bytes)
- value: the unsigned short value to write
setUShorts¶
open override fun setUShorts(offset: ULong, array: UShortArray)
Writes a UShortArray into the buffer at the specified offset.
**Parameters**
- offset: the byte offset where to start writing (must be aligned to 2 bytes)
- array: the unsigned short array to write
toByteArray¶
open override fun toByteArray(): ByteArray
Converts the buffer to a ByteArray.
**Return**
a ByteArray containing the buffer's data
toDoubleArray¶
open override fun toDoubleArray(): DoubleArray
Converts the buffer to a DoubleArray.
**Return**
a DoubleArray containing the buffer's data (size must be multiple of 8)
toFloatArray¶
open override fun toFloatArray(): FloatArray
Converts the buffer to a FloatArray.
**Return**
a FloatArray containing the buffer's data (size must be multiple of 4)
toIntArray¶
open override fun toIntArray(): IntArray
Converts the buffer to an IntArray.
**Return**
an IntArray containing the buffer's data (size must be multiple of 4)
toShortArray¶
open override fun toShortArray(): ShortArray
Converts the buffer to a ShortArray.
**Return**
a ShortArray containing the buffer's data (size must be multiple of 2)
toUByteArray¶
open override fun toUByteArray(): UByteArray
Converts the buffer to a UByteArray.
**Return**
a UByteArray containing the buffer's data
toUIntArray¶
open override fun toUIntArray(): UIntArray
Converts the buffer to a UIntArray.
**Return**
a UIntArray containing the buffer's data (size must be multiple of 4)
toUShortArray¶
open override fun toUShortArray(): UShortArray
Converts the buffer to a UShortArray.
**Return**
a UShortArray containing the buffer's data (size must be multiple of 2)