Класс 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
- Реализации
- Аннотации
-
- @Since('2.16')
Конструкторы
-
AbiSpecificInteger()
const
Свойства экземпляра
-
hashCode → int
только для чтения, унаследованное
- Хэш-код этого объекта.
-
runtimeType → Type
только для чтения, унаследованное
- Представление типа объекта во время выполнения.
Методы экземпляра
-
noSuchMethod(
Invocation invocation) → dynamic унаследованное - Вызывается при попытке обратиться к несуществующему методу или свойству.
-
toString(
) → String унаследованное - Строковое представление этого объекта.
Операторы
-
operator ==(
Object other) → bool унаследованное - Оператор равенства.
© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-ffi/AbiSpecificInteger-class.html