dart:ffi
庫中AbiSpecificInteger
類的用法介紹如下。
所有 Abi 特定整數類型的超類型。
Abi 特定的整數應該擴展這個類並用 AbiSpecificIntegerMapping 對其進行注釋,以聲明 Abi.values 的整數大小和符號。
例如:
/// The C `uintptr_t` type.
///
/// The [UintPtr] type is a native type, and should not be constructed in
/// Dart code.
/// It occurs only in native type signatures and as annotation on [Struct]
/// and [Union] fields.
@AbiSpecificIntegerMapping({
Abi.androidArm: Uint32(),
Abi.androidArm64: Uint64(),
Abi.androidIA32: Uint32(),
Abi.androidX64: Uint64(),
Abi.fuchsiaArm64: Uint64(),
Abi.fuchsiaX64: Uint64(),
Abi.iosArm: Uint32(),
Abi.iosArm64: Uint64(),
Abi.linuxArm: Uint32(),
Abi.linuxArm64: Uint64(),
Abi.linuxIA32: Uint32(),
Abi.linuxX64: Uint64(),
Abi.linuxRiscv32: Uint32(),
Abi.linuxRiscv64: Uint64(),
Abi.macosArm64: Uint64(),
Abi.macosX64: Uint64(),
Abi.windowsIA32: Uint32(),
Abi.windowsX64: Uint64(),
})
class UintPtr extends AbiSpecificInteger {
const UintPtr();
}
- 繼承
-
Object > NativeType > AbiSpecificInteger
- 實施者
-
Char > Int > IntPtr > Long > LongLong > Short > SignedChar > Size > UintPtr > UnsignedChar > UnsignedInt > UnsignedLong > UnsignedLongLong > UnsignedShort > WChar
相關用法
- Dart AttributeClassSet.intersection用法及代碼示例
- Dart AudioParamMap.forEach用法及代碼示例
- Dart AttributeClassSet.clear用法及代碼示例
- Dart AttributeClassSet.fold用法及代碼示例
- Dart AttributeClassSet.forEach用法及代碼示例
- Dart AttributeClassSet.every用法及代碼示例
- Dart Array構造函數用法及代碼示例
- Dart AsciiDecoder用法及代碼示例
- Dart AttributeClassSet.map用法及代碼示例
- Dart AudioParamMap.containsKey用法及代碼示例
- Dart AttributeClassSet.removeWhere用法及代碼示例
- Dart AudioParamMap.putIfAbsent用法及代碼示例
- Dart AttributeClassSet.containsAll用法及代碼示例
- Dart AttributeClassSet.join用法及代碼示例
- Dart AttributeClassSet.retainWhere用法及代碼示例
- Dart AttributeClassSet.singleWhere用法及代碼示例
- Dart AsciiEncoder用法及代碼示例
- Dart AudioParamMap.addAll用法及代碼示例
- Dart ArgumentError.value用法及代碼示例
- Dart Array.multi用法及代碼示例
- Dart AudioParamMap.remove用法及代碼示例
- Dart AudioParamMap.clear用法及代碼示例
- Dart AttributeClassSet.toList用法及代碼示例
- Dart AttributeClassSet.takeWhile用法及代碼示例
- Dart AttributeClassSet.lastWhere用法及代碼示例
注:本文由純淨天空篩選整理自dart.dev大神的英文原創作品 AbiSpecificInteger class。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。