BoolPointer#
Annotations: @Since.new('2.15')
Extension on Pointer specialized for the type argument Bool.
Properties#
value extension read / write#
The bool at address.
Available on Pointer<T extends NativeType>, provided by the BoolPointer extension
Implementation
external bool get value;
external void set value(bool value);
Methods#
deprecated elementAt() extension#
DEPRECATED
Use operator + instead
Pointer arithmetic (takes element size into account).
Available on Pointer<T extends NativeType>, provided by the BoolPointer extension
Implementation
@Deprecated('Use operator + instead')
Pointer<Bool> elementAt(int index) =>
Pointer.fromAddress(address + sizeOf<Bool>() * index);
Operators#
operator +() extension#
A pointer to the offsetth Bool
after this one.
Returns a pointer to the Bool
whose address is
offset times the size of Bool
after the address of this pointer.
That is (this + offset).address == this.address + offset * sizeOf<Bool>().
Also (this + offset).value is equivalent to this[offset],
and similarly for setting.
Available on Pointer<T extends NativeType>, provided by the BoolPointer extension
Implementation
@Since('3.3')
@pragma("vm:prefer-inline")
Pointer<Bool> operator +(int offset) =>
Pointer.fromAddress(address + sizeOf<Bool>() * offset);
operator -() extension#
A pointer to the offsetth Bool
before this one.
Equivalent to this + (-offset).
Returns a pointer to the Bool
whose address is
offset times the size of Bool
before the address of this pointer.
That is, (this - offset).address == this.address - offset * sizeOf<Bool>().
Also, (this - offset).value is equivalent to this[-offset],
and similarly for setting,
Available on Pointer<T extends NativeType>, provided by the BoolPointer extension
Implementation
@Since('3.3')
@pragma("vm:prefer-inline")
Pointer<Bool> operator -(int offset) =>
Pointer.fromAddress(address - sizeOf<Bool>() * offset);
operator []() extension#
The bool at address + sizeOf<Bool>() * index.
Available on Pointer<T extends NativeType>, provided by the BoolPointer extension
Implementation
external bool operator [](int index);
operator []=() extension#
The bool at address + sizeOf<Bool>() * index.
Available on Pointer<T extends NativeType>, provided by the BoolPointer extension
Implementation
external void operator []=(int index, bool value);