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。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。