W3cubDocs

/Kotlin

CValue

Platform and version requirements: Native (1.3)
abstract class CValue<T : CVariable> : CValues<T>

The single immutable C value. It is self-contained and doesn't depend on native memory.

TODO: consider providing an adapter instead of subtyping CValues.

Constructors

Platform and version requirements: Native (1.3)

<init>

The single immutable C value. It is self-contained and doesn't depend on native memory.

CValue()

Extension Functions

Platform and version requirements: Native (1.3)

copy

fun <T : CStructVar> CValue<T>.copy(
    modify: T.() -> Unit
): CValue<T>
Platform and version requirements: Native (1.3)

getBytes

fun <T : CVariable> CValues<T>.getBytes(): ByteArray
Platform and version requirements: Native (1.3)

placeTo

fun <T : CVariable> CValues<T>.placeTo(
    scope: AutofreeScope
): CPointer<T>
Platform and version requirements: Native (1.3)

useContents

Calls the block with temporary copy if this value as receiver.

fun <T : CStructVar, R> CValue<T>.useContents(
    block: T.() -> R
): R
Platform and version requirements: Native (1.3)

write

fun <T : CVariable> CValue<T>.write(location: NativePtr)

© 2010–2019 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlinx.cinterop/-c-value/index.html