W3cubDocs

/Kotlin

CPointer

Platform and version requirements: Native (1.3)
class CPointer<T : CPointed> : CValuesRef<T>

C pointer.

Properties

Platform and version requirements: Native (1.3)

rawValue

val rawValue: NativePtr

Functions

Platform and version requirements: Native (1.3)

equals

Indicates whether some other object is "equal to" this one. Implementations must fulfil the following requirements:

fun equals(other: Any?): Boolean
Platform and version requirements: Native (1.3)

getPointer

If this reference is CPointer, returns this pointer, otherwise allocate storage value in the scope and return it.

fun getPointer(scope: AutofreeScope): CPointer<T>
Platform and version requirements: Native (1.3)

hashCode

Returns a hash code value for the object. The general contract of hashCode is:

fun hashCode(): Int
Platform and version requirements: Native (1.3)

toString

Returns a string representation of the object.

fun toString(): String

Extension Properties

Platform and version requirements: Native (1.3)

pointed

Returns the corresponding CPointed.

val <T : CPointed> CPointer<T>.pointed: T
Platform and version requirements: Native (1.3)

rawValue

val CPointer<*>?.rawValue: NativePtr

Extension Functions

Platform and version requirements: Native (1.3)

asStableRef

Converts to StableRef this opaque pointer produced by StableRef.asCPointer.

fun <T : Any> CPointer<*>.asStableRef(): StableRef<T>
Platform and version requirements: Native (1.3)

callContinuation0

fun COpaquePointer.callContinuation0()
Platform and version requirements: Native (1.3)

callContinuation1

fun <T1> COpaquePointer.callContinuation1()
Platform and version requirements: Native (1.3)

callContinuation2

fun <T1, T2> COpaquePointer.callContinuation2()
Platform and version requirements: Native (1.3)

get

operator fun <T : Byte> CPointer<ByteVarOf<T>>.get(
    index: Int
): T
operator fun <T : Byte> CPointer<ByteVarOf<T>>.get(
    index: Long
): T
operator fun <T : Short> CPointer<ShortVarOf<T>>.get(
    index: Int
): T
operator fun <T : Short> CPointer<ShortVarOf<T>>.get(
    index: Long
): T
operator fun <T : Int> CPointer<IntVarOf<T>>.get(
    index: Int
): T
operator fun <T : Int> CPointer<IntVarOf<T>>.get(
    index: Long
): T
operator fun <T : Long> CPointer<LongVarOf<T>>.get(
    index: Int
): T
operator fun <T : Long> CPointer<LongVarOf<T>>.get(
    index: Long
): T
operator fun <T : UByte> CPointer<UByteVarOf<T>>.get(
    index: Int
): T
operator fun <T : UByte> CPointer<UByteVarOf<T>>.get(
    index: Long
): T
operator fun <T : UShort> CPointer<UShortVarOf<T>>.get(
    index: Int
): T
operator fun <T : UShort> CPointer<UShortVarOf<T>>.get(
    index: Long
): T
operator fun <T : UInt> CPointer<UIntVarOf<T>>.get(
    index: Int
): T
operator fun <T : UInt> CPointer<UIntVarOf<T>>.get(
    index: Long
): T
operator fun <T : ULong> CPointer<ULongVarOf<T>>.get(
    index: Int
): T
operator fun <T : ULong> CPointer<ULongVarOf<T>>.get(
    index: Long
): T
operator fun <T : Float> CPointer<FloatVarOf<T>>.get(
    index: Int
): T
operator fun <T : Float> CPointer<FloatVarOf<T>>.get(
    index: Long
): T
operator fun <T : Double> CPointer<DoubleVarOf<T>>.get(
    index: Int
): T
operator fun <T : Double> CPointer<DoubleVarOf<T>>.get(
    index: Long
): T
operator fun <T : CVariable> CPointer<T>.get(index: Long): T
operator fun <T : CVariable> CPointer<T>.get(index: Int): T
operator fun <T : CPointer<*>> CPointer<CPointerVarOf<T>>.get(
    index: Int
): T?
operator fun <T : CPointer<*>> CPointer<CPointerVarOf<T>>.get(
    index: Long
): T?
Platform and version requirements: Native (1.3)

getRawValue

fun CPointer<*>.getRawValue(): NativePtr
Platform and version requirements: Native (1.3)

invoke

operator fun <R> CPointer<CFunction<() -> R>>.invoke(): R
operator fun <P1, R> CPointer<CFunction<(P1) -> R>>.invoke(
    p1: P1
): R
operator fun <P1, P2, R> CPointer<CFunction<(P1, P2) -> R>>.invoke(
    p1: P1, 
    p2: P2
): R
operator fun <P1, P2, P3, R> CPointer<CFunction<(P1, P2, P3) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3
): R
operator fun <P1, P2, P3, P4, R> CPointer<CFunction<(P1, P2, P3, P4) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4
): R
operator fun <P1, P2, P3, P4, P5, R> CPointer<CFunction<(P1, P2, P3, P4, P5) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5
): R
operator fun <P1, P2, P3, P4, P5, P6, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12, 
    p13: P13
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12, 
    p13: P13, 
    p14: P14
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12, 
    p13: P13, 
    p14: P14, 
    p15: P15
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12, 
    p13: P13, 
    p14: P14, 
    p15: P15, 
    p16: P16
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12, 
    p13: P13, 
    p14: P14, 
    p15: P15, 
    p16: P16, 
    p17: P17
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12, 
    p13: P13, 
    p14: P14, 
    p15: P15, 
    p16: P16, 
    p17: P17, 
    p18: P18
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12, 
    p13: P13, 
    p14: P14, 
    p15: P15, 
    p16: P16, 
    p17: P17, 
    p18: P18, 
    p19: P19
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12, 
    p13: P13, 
    p14: P14, 
    p15: P15, 
    p16: P16, 
    p17: P17, 
    p18: P18, 
    p19: P19, 
    p20: P20
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12, 
    p13: P13, 
    p14: P14, 
    p15: P15, 
    p16: P16, 
    p17: P17, 
    p18: P18, 
    p19: P19, 
    p20: P20, 
    p21: P21
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12, 
    p13: P13, 
    p14: P14, 
    p15: P15, 
    p16: P16, 
    p17: P17, 
    p18: P18, 
    p19: P19, 
    p20: P20, 
    p21: P21, 
    p22: P22
): R
Platform and version requirements: Native (1.3)

plus

operator fun <T : ByteVarOf<*>> CPointer<T>?.plus(
    index: Long
): CPointer<T>?
operator fun <T : ByteVarOf<*>> CPointer<T>?.plus(
    index: Int
): CPointer<T>?
Platform and version requirements: Native (1.3)

readBytes

fun COpaquePointer.readBytes(count: Int): ByteArray
Platform and version requirements: Native (1.3)

reinterpret

fun <T : CPointed> CPointer<*>.reinterpret(): CPointer<T>
Platform and version requirements: Native (1.3)

set

operator fun <T : Byte> CPointer<ByteVarOf<T>>.set(
    index: Int, 
    value: T)
operator fun <T : Byte> CPointer<ByteVarOf<T>>.set(
    index: Long, 
    value: T)
operator fun <T : Short> CPointer<ShortVarOf<T>>.set(
    index: Int, 
    value: T)
operator fun <T : Short> CPointer<ShortVarOf<T>>.set(
    index: Long, 
    value: T)
operator fun <T : Int> CPointer<IntVarOf<T>>.set(
    index: Int, 
    value: T)
operator fun <T : Int> CPointer<IntVarOf<T>>.set(
    index: Long, 
    value: T)
operator fun <T : Long> CPointer<LongVarOf<T>>.set(
    index: Int, 
    value: T)
operator fun <T : Long> CPointer<LongVarOf<T>>.set(
    index: Long, 
    value: T)
operator fun <T : UByte> CPointer<UByteVarOf<T>>.set(
    index: Int, 
    value: T)
operator fun <T : UByte> CPointer<UByteVarOf<T>>.set(
    index: Long, 
    value: T)
operator fun <T : UShort> CPointer<UShortVarOf<T>>.set(
    index: Int, 
    value: T)
operator fun <T : UShort> CPointer<UShortVarOf<T>>.set(
    index: Long, 
    value: T)
operator fun <T : UInt> CPointer<UIntVarOf<T>>.set(
    index: Int, 
    value: T)
operator fun <T : UInt> CPointer<UIntVarOf<T>>.set(
    index: Long, 
    value: T)
operator fun <T : ULong> CPointer<ULongVarOf<T>>.set(
    index: Int, 
    value: T)
operator fun <T : ULong> CPointer<ULongVarOf<T>>.set(
    index: Long, 
    value: T)
operator fun <T : Float> CPointer<FloatVarOf<T>>.set(
    index: Int, 
    value: T)
operator fun <T : Float> CPointer<FloatVarOf<T>>.set(
    index: Long, 
    value: T)
operator fun <T : Double> CPointer<DoubleVarOf<T>>.set(
    index: Int, 
    value: T)
operator fun <T : Double> CPointer<DoubleVarOf<T>>.set(
    index: Long, 
    value: T)
operator fun <T : CPointer<*>> CPointer<CPointerVarOf<T>>.set(
    index: Int, 
    value: T?)
operator fun <T : CPointer<*>> CPointer<CPointerVarOf<T>>.set(
    index: Long, 
    value: T?)
Platform and version requirements: Native (1.3)

toKString

fun CPointer<ByteVar>.toKString(): String
fun CPointer<ShortVar>.toKString(): String
fun CPointer<UShortVar>.toKString(): String
Platform and version requirements: Native (1.3)

toKStringFromUtf16

fun CPointer<ShortVar>.toKStringFromUtf16(): String
fun CPointer<UShortVar>.toKStringFromUtf16(): String
Platform and version requirements: Native (1.3)

toKStringFromUtf32

fun CPointer<IntVar>.toKStringFromUtf32(): String
Platform and version requirements: Native (1.3)

toKStringFromUtf8

fun CPointer<ByteVar>.toKStringFromUtf8(): String
Platform and version requirements: Native (1.3)

toLong

fun <T : CPointed> CPointer<T>?.toLong(): Long

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlinx.cinterop/-c-pointer/index.html