SharedPointerBytes<T> class abstract

A SharedPointer that allocates a bytes (fixed length) that can be mapped to another type, like Uint32List or Uint32.

See SharedPointerUInt8List, SharedPointerUInt32List, SharedPointerUInt64List, SharedPointerUint32, SharedPointerUint64.

Inheritance
Implementers

Constructors

SharedPointerBytes(int allocatedBytesLength, int bytesPerValue, bool initializeZeroed)
SharedPointerBytes.fromAddress(int allocatedBytesLength, int bytesPerValue, bool initializeZeroed, SharedPointerAddress address)

Properties

address SharedPointerAddress
latefinalinherited
allocatedBytesLength int
Amount of bytes allocated by this instance.
final
byteData ByteData
The ByteData of this Pointer memory.
no setter
bytes Uint8List
The Uint8List bytes viewer of this Pointer memory.
no setter
bytesPerValue int
Amount of bytes per value of this implementation.
final
endian Endian
The endianness of this pointer.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
initializeZeroed bool
If true will initialize the instance with zeroes, removing any garbage in the allocated memory.
final
isClosed bool
Returns true if this instance is closed (in the current Isolate).
no setterinherited
isEmpty bool
Returns true if this instance is of length 0.
no setter
isInitializer bool
Returns true if this instance is the initializer instance, that actually allocated the pointer. Only the initializer instance can free the pointer.
no setteroverride
isNotEmpty bool
Returns true if this instance is NOT of length 0.
no setter
length int
Returns the fixed length of elements in this instance.
getter/setter pair
requiresSerializationToBeShared bool
Forces serialization and deserialization even when SharedData.noSerializationOnDartNative is true.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkClosed() → void
Checks if the instance is NOT closed, or throws a StateError.
inherited
computeSignature() String
Computes the signature of this instance.
inherited
copy() SerializableData<SharedPointer<T>, SharedPointerAddress>
Creates a copy of this instance.
inherited
deserialize(SharedPointerAddress serial) SerializableData<SharedPointer<T>, SharedPointerAddress>
Deserializes serial to a instance of this type.
inherited
deserializeData(SharedPointerAddress serial) SharedPointer<T>
Deserializes serial to D.
inherited
free() → void
Closes this instance and calls malloc.free for the Pointer if this is the initializer instance. See isInitializer.
override
instantiate(SharedPointer<T> data) SerializableData<SharedPointer<T>, SharedPointerAddress>
Creates a new instance with data.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read() → T?
Reads a value from the Pointer memory.
override
readAt(int index) → T?
Reads a value from index.
readFromByteData(ByteData byteData, int offset) → T?
Implementation to read a value from the byteData of this instance Pointer.
readNewValue({T? lastValue, Duration? interval, Duration? timeout, bool acceptsNullValue = true}) FutureOr<T?>
Reads a new value, different from lastValue, performing a pooling with interval (default: 10ms) and a timeout (default: 10s) that checks for a new value if needed.
inherited
serialize() SharedPointerAddress
Serializes this instance to S.
inherited
toString() String
A string representation of this object.
inherited
write(T value) → void
Writes a value to the Pointer memory.
override
writeAt(int index, T value) → void
Writes a value at index.
writeToByteData(ByteData byteData, int offset, T value) → void
Implementation to write a value to the byteData of this instance Pointer.

Operators

operator ==(Object other) bool
The equality operator.
inherited