NativeMemoryPointer<X extends RType> class
- Inheritance
-
- Object
- MemoryPointer<
X> - NativeMemoryPointer
- Available extensions
- BoolPointer
- Float32Pointer
- Float64Pointer
- Int8Pointer
- Int16Pointer
- Int32Pointer
- Int64Pointer
- MemoryPointerAsNativePointer
- MemoryPointerMatrixIO
- MemoryPointerStringIO
- PointerArrayOnPointer
- SizePointer
- Uint8Pointer
- Uint16Pointer
- Uint32Pointer
- Uint64Pointer
- Utf8StringPointer
- Utf16StringPointer
- Utf32StringPointer
Constructors
-
NativeMemoryPointer(Pointer<
NativeType> _ptr)
Properties
- address → int
-
Debug/logging only. Do NOT branch logic on this.
no setteroverride
- allocationKey → String?
-
The key of the temporary allocation backing this pointer.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hex → String
-
address in hexadecimal format.
no setterinherited
- isFreed ↔ bool
-
If the underlying allocation has been freed.
getter/setter pairinherited
- isNull → bool
-
Check if the pointer is a
nullptr.no setteroverride - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ bool
-
Available on MemoryPointer<
RBool> , provided by the BoolPointer extensiongetter/setter pair - value ↔ double
-
Available on MemoryPointer<
RFloat32> , provided by the Float32Pointer extensiongetter/setter pair - value ↔ double
-
Available on MemoryPointer<
RFloat64> , provided by the Float64Pointer extensiongetter/setter pair - value ↔ int
-
Available on MemoryPointer<
RInt8> , provided by the Int8Pointer extensiongetter/setter pair - value ↔ int
-
Available on MemoryPointer<
RInt16> , provided by the Int16Pointer extensiongetter/setter pair - value ↔ int
-
Available on MemoryPointer<
RInt32> , provided by the Int32Pointer extensiongetter/setter pair - value ↔ int
-
Available on MemoryPointer<
RInt64> , provided by the Int64Pointer extensiongetter/setter pair - value ↔ int
-
Available on MemoryPointer<
RSize> , provided by the SizePointer extensiongetter/setter pair - value ↔ int
-
Available on MemoryPointer<
RUint8> , provided by the Uint8Pointer extensiongetter/setter pair - value ↔ int
-
Available on MemoryPointer<
RUint16> , provided by the Uint16Pointer extensiongetter/setter pair - value ↔ int
-
Available on MemoryPointer<
RUint32> , provided by the Uint32Pointer extensiongetter/setter pair - value ↔ int
-
Available on MemoryPointer<
RUint64> , provided by the Uint64Pointer extensiongetter/setter pair
Methods
-
asCopy<
T extends TypedDataList> (int length) → T -
Copies
lengthbytes, viewed asT.override -
asNativePointer<
R extends NativeType> () → Pointer< R> -
Available on MemoryPointer<
RType> , provided by the MemoryPointerAsNativePointer extension -
asPointer<
R extends NativeType> () → Pointer< R> -
asView<
T extends TypedDataList> (int length) → T -
Zero-copy view as
T.override -
cast<
Y extends RType> () → MemoryPointer< Y> -
Reinterprets this pointer as pointing to
Yinstead ofX.inherited -
compareBytes(
MemoryPointer< RType> other, int length, {int offset = 0, int otherOffset = 0}) → int -
memcmp-style comparison of
lengthbytes.inherited -
computeByteHash(
int byteSize) → int -
Hashes the bytes until
byteSize.inherited -
copyBytesFrom(
MemoryPointer< RType> src, int length, {int destOffset = 0, int srcOffset = 0}) → void -
Bulk-copies
lengthbytes fromsrcinto this pointer.inherited -
fillBytes(
int value, int length, [int byteOffset = 0]) → void -
Fills
lengthbytes starting atbyteOffsetwith the low byte ofvalue.inherited -
free(
) → void -
Frees the underlying allocation. Only call this if you
actually own it.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
offsetBy<
Y extends RType> (int byteOffset) → NativeMemoryPointer< Y> -
Same buffer, address advanced by
byteOffsetbytes. Same typeX. Backends implement via pointer arithmetic (native) or address+offset (wasm).override -
readArray(
int count) → List< int> -
Available on MemoryPointer<
RInt16> , provided by the Int16Pointer extension -
readArray(
int count) → List< bool> -
Available on MemoryPointer<
RBool> , provided by the BoolPointer extension -
readArray(
int count) → List< int> -
Available on MemoryPointer<
RInt32> , provided by the Int32Pointer extension -
readArray(
int count) → List< int> -
Available on MemoryPointer<
RInt64> , provided by the Int64Pointer extension -
readArray(
int count) → List< int> -
Available on MemoryPointer<
RUint64> , provided by the Uint64Pointer extension -
readArray(
int count) → List< double> -
Available on MemoryPointer<
RFloat32> , provided by the Float32Pointer extension -
readArray(
int count) → List< int> -
Available on MemoryPointer<
RUint32> , provided by the Uint32Pointer extension -
readArray(
int count) → List< int> -
Available on MemoryPointer<
RUint16> , provided by the Uint16Pointer extension -
readArray(
int count) → List< int> -
Available on MemoryPointer<
RUint8> , provided by the Uint8Pointer extension -
readArray(
int count) → List< int> -
Available on MemoryPointer<
RInt8> , provided by the Int8Pointer extension -
readArray(
int count) → List< double> -
Available on MemoryPointer<
RFloat64> , provided by the Float64Pointer extension -
readArray(
int count) → List< int> -
Available on MemoryPointer<
RSize> , provided by the SizePointer extension -
readBool(
[int byteOffset = 0]) → bool -
Reads a value of type RBool at given
address + byteOffset.override -
readBytes(
int byteOffset, int length) → Uint8List -
Reads
lengthbytes atbyteOffset.override -
readChar(
[int byteOffset = 0]) → int -
Reads a value of type RChar at given
address + byteOffset.override -
readDouble(
[int byteOffset = 0]) → double -
Reads a value of type RDouble at given
address + byteOffset.override -
readFloat(
[int byteOffset = 0]) → double -
Reads a value of type RFloat at given
address + byteOffset.override -
readFloat32(
[int byteOffset = 0]) → double -
Reads a value of type RFloat32 at given
address + byteOffset.override -
readFloat64(
[int byteOffset = 0]) → double -
Reads a value of type RFloat64 at given
address + byteOffset.override -
readInt(
[int byteOffset = 0]) → int -
Reads a value of type RInt at given
address + byteOffset.override -
readInt16(
[int byteOffset = 0]) → int -
Reads a value of type RInt16 at given
address + byteOffset.override -
readInt32(
[int byteOffset = 0]) → int -
Reads a value of type RInt32 at given
address + byteOffset.override -
readInt64(
[int byteOffset = 0]) → int -
Reads a value of type RInt64 at given
address + byteOffset.override -
readInt8(
[int byteOffset = 0]) → int -
Reads a value of type RInt8 at given
address + byteOffset.override -
readMatrix<
D extends RaylibStruct< (D> >int rowCount, int rowLength, {bool owned = false, bool materialize = false}) → List< StructLiveList< D, RStruct> > -
Available on MemoryPointer<
RPointer< , provided by the MemoryPointerMatrixIO extensionRStruct> > -
readPtr<
Y extends RType> ([int byteOffset = 0]) → NativeMemoryPointer< Y> -
Reads a pointer value at
address + byteOffsetand returns it typed as pointing toY.override -
readPtrArray<
X extends RType> (int count) → List< MemoryPointer< X> > -
Available on MemoryPointer<
ReadsRPointer< , provided by the PointerArrayOnPointer extensionRType> >countpointers from this pointer array. -
readShort(
[int byteOffset = 0]) → int -
Reads a value of type RShort at given
address + byteOffset.override -
readSize(
[int byteOffset = 0]) → int -
Reads a value of type RSize at given
address + byteOffset.override -
readStringArray(
int count) → List< String> -
Available on MemoryPointer<
ReadsRPointer< , provided by the MemoryPointerStringIO extensionRChar> >countC strings from achar**-style pointer (this pointer points at an array of char* pointers, each read and decoded). -
readStringUTF16(
[int? maxLength, int byteOffset = 0]) → String -
Reads a fixed-size char-buffer field as a UTF-16 string, stopping early at NUL if present.
inherited
-
readStringUTF32(
[int? maxLength, int byteOffset = 0]) → String -
Reads a fixed-size char-buffer field as a UTF-32 string, stopping early at NUL if present.
inherited
-
readStringUTF8(
[int? maxLength, int byteOffset = 0]) → String -
Reads a fixed-size char-buffer field as a UTF-8 string, stopping early at NUL if present.
inherited
-
readUint16(
[int byteOffset = 0]) → int -
Reads a value of type RUint16 at given
address + byteOffset.override -
readUint32(
[int byteOffset = 0]) → int -
Reads a value of type RUint32 at given
address + byteOffset.override -
readUint64(
[int byteOffset = 0]) → int -
Reads a value of type RUint64 at given
address + byteOffset.override -
readUint8(
[int byteOffset = 0]) → int -
Reads a value of type RUint8 at given
address + byteOffset.override -
readUnsignedChar(
[int byteOffset = 0]) → int -
Reads a value of type RUnsignedChar at given
address + byteOffset.override -
readUnsignedInt(
[int byteOffset = 0]) → int -
Reads a value of type RUnsignedInt at given
address + byteOffset.override -
readUnsignedShort(
[int byteOffset = 0]) → int -
Reads a value of type RUnsignedShort at given
address + byteOffset.override -
toDartString(
[int? maxLength]) → String -
Available on MemoryPointer<
RInt32> , provided by the Utf32StringPointer extension -
toDartString(
[int? maxLength]) → String -
Available on MemoryPointer<
RInt16> , provided by the Utf16StringPointer extension -
toDartString(
[int? maxLength]) → String -
Available on MemoryPointer<
Reads a NUL-terminated C string starting at this pointer, decoded as UTF-8. Scans for the NUL byte itself, no length needed.RInt8> , provided by the Utf8StringPointer extension -
toString(
) → String -
A string representation of this object.
inherited
-
writeArray(
List< int> values) → void -
Available on MemoryPointer<
RUint16> , provided by the Uint16Pointer extension -
writeArray(
List< int> values) → void -
Available on MemoryPointer<
RUint8> , provided by the Uint8Pointer extension -
writeArray(
List< int> values) → void -
Available on MemoryPointer<
RSize> , provided by the SizePointer extension -
writeArray(
List< int> values) → void -
Available on MemoryPointer<
RInt64> , provided by the Int64Pointer extension -
writeArray(
List< int> values) → void -
Available on MemoryPointer<
RInt32> , provided by the Int32Pointer extension -
writeArray(
List< int> values) → void -
Available on MemoryPointer<
RInt16> , provided by the Int16Pointer extension -
writeArray(
List< int> values) → void -
Available on MemoryPointer<
RInt8> , provided by the Int8Pointer extension -
writeArray(
List< int> values) → void -
Available on MemoryPointer<
RUint64> , provided by the Uint64Pointer extension -
writeArray(
List< bool> values) → void -
Available on MemoryPointer<
RBool> , provided by the BoolPointer extension -
writeArray(
List< int> values) → void -
Available on MemoryPointer<
RUint32> , provided by the Uint32Pointer extension -
writeArray(
List< double> values) → void -
Available on MemoryPointer<
RFloat64> , provided by the Float64Pointer extension -
writeArray(
List< double> values) → void -
Available on MemoryPointer<
RFloat32> , provided by the Float32Pointer extension -
writeBool(
bool value, [int byteOffset = 0]) → void -
Writes a
valueof type RBool at givenaddress + byteOffset.override -
writeChar(
int value, [int byteOffset = 0]) → void -
Writes a
valueof type RChar at givenaddress + byteOffset.override -
writeDouble(
double value, [int byteOffset = 0]) → void -
Writes a
valueof type RDouble at givenaddress + byteOffset.override -
writeFloat(
double value, [int byteOffset = 0]) → void -
Writes a
valueof type RFloat at givenaddress + byteOffset.override -
writeFloat32(
double value, [int byteOffset = 0]) → void -
Writes a
valueof type RFloat32 at givenaddress + byteOffset.override -
writeFloat64(
double value, [int byteOffset = 0]) → void -
Writes a
valueof type RFloat64 at givenaddress + byteOffset.override -
writeInt(
int value, [int byteOffset = 0]) → void -
Writes a
valueof type RInt at givenaddress + byteOffset.override -
writeInt16(
int value, [int byteOffset = 0]) → void -
Writes a
valueof type RInt16 at givenaddress + byteOffset.override -
writeInt32(
int value, [int byteOffset = 0]) → void -
Writes a
valueof type RInt32 at givenaddress + byteOffset.override -
writeInt64(
int value, [int byteOffset = 0]) → void -
Writes a
valueof type RInt64 at givenaddress + byteOffset.override -
writeInt8(
int value, [int byteOffset = 0]) → void -
Writes a
valueof type RInt8 at givenaddress + byteOffset.override -
writeMatrix<
D extends RaylibStruct< (D> >List< List< rows) → voidD> > -
Available on MemoryPointer<
RPointer< , provided by the MemoryPointerMatrixIO extensionRStruct> > -
writePtr(
MemoryPointer< RType> ? value, [int byteOffset = 0]) → void -
Writes a pointer at given
address + byteOffset.override -
writeShort(
int value, [int byteOffset = 0]) → void -
Writes a
valueof type RShort at givenaddress + byteOffset.override -
writeSize(
int value, [int byteOffset = 0]) → void -
Writes a
valueof type RSize at givenaddress + byteOffset.override -
writeString(
String text, [int? maxLength, int byteOffset = 0]) → void -
Available on MemoryPointer<
WritesRInt8> , provided by the Utf8StringPointer extensiontextinto a buffer field ataddress + byteOffset. IfmaxLengthis null, it's derived from the UTF-8 byte length oftext(caller is responsible for the field actually being that size). Truncates iftextexceedsmaxLength; otherwise NUL-terminates and zero-pads the remainder. -
writeString(
String text, [int? maxLength, int elementOffset = 0]) → void -
Available on MemoryPointer<
WritesRInt16> , provided by the Utf16StringPointer extensiontextinto a buffer field ataddress + elementOffset*2. IfmaxLengthis null, it's derived from the UTF-16 code unit length oftext(caller is responsible for the field actually being that size). -
writeString(
String text, [int? maxLength, int elementOffset = 0]) → void -
Available on MemoryPointer<
WritesRInt32> , provided by the Utf32StringPointer extensiontextinto a buffer field ataddress + elementOffset*4. IfmaxLengthis null, it's derived from the UTF-32 code unit (rune) length oftext(caller is responsible for the field actually being that size). -
writeStringArray(
List< String> strings, [List<int> ? slotSizes]) → void -
Available on MemoryPointer<
WritesRPointer< , provided by the MemoryPointerStringIO extensionRChar> >stringsinto this pre-allocated char**-sized buffer. Both the outer array (strings.length pointer slots) and each inner char* target buffer must already exist. [slotSizesi] is the real allocated byte capacity of slot i's buffer (bytes available, terminator included), if not provided, string's length is used instead. -
writeStringUTF16(
String text, [int? maxLength, int byteOffset = 0]) → void -
Writes a UTF-16
textinto a fixed-sizemaxLength-byte buffer field ataddress + byteOffset. Truncates if too long; otherwise NUL-terminates and zero-pads the remainder.inherited -
writeStringUTF32(
String text, [int? maxLength, int byteOffset = 0]) → void -
Writes a UTF-32
textinto a fixed-sizemaxLength-byte buffer field ataddress + byteOffset. Truncates if too long; otherwise NUL-terminates and zero-pads the remainder.inherited -
writeStringUTF8(
String text, [int? maxLength, int byteOffset = 0]) → void -
Writes a UTF-8
textinto a fixed-sizemaxLength-byte buffer field ataddress + byteOffset. Truncates if too long; otherwise NUL-terminates and zero-pads the remainder.inherited -
writeUint16(
int value, [int byteOffset = 0]) → void -
Writes a
valueof type RUint16 at givenaddress + byteOffset.override -
writeUint32(
int value, [int byteOffset = 0]) → void -
Writes a
valueof type RUint32 at givenaddress + byteOffset.override -
writeUint64(
int value, [int byteOffset = 0]) → void -
Writes a
valueof type RUint64 at givenaddress + byteOffset.override -
writeUint8(
int value, [int byteOffset = 0]) → void -
Writes a
valueof type RUint8 at givenaddress + byteOffset.override -
writeUnsignedChar(
int value, [int byteOffset = 0]) → void -
Writes a
valueof type RUnsignedChar at givenaddress + byteOffset.override -
writeUnsignedInt(
int value, [int byteOffset = 0]) → void -
Writes a
valueof type RUnsignedInt at givenaddress + byteOffset.override -
writeUnsignedShort(
int value, [int byteOffset = 0]) → void -
Writes a
valueof type RUnsignedShort at givenaddress + byteOffset.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
int i) → bool -
Available on MemoryPointer<
RBool> , provided by the BoolPointer extension -
operator [](
int i) → double -
Available on MemoryPointer<
RFloat32> , provided by the Float32Pointer extension -
operator [](
int i) → double -
Available on MemoryPointer<
RFloat64> , provided by the Float64Pointer extension -
operator [](
int i) → int -
Available on MemoryPointer<
RInt8> , provided by the Int8Pointer extension -
operator [](
int i) → int -
Available on MemoryPointer<
RInt16> , provided by the Int16Pointer extension -
operator [](
int i) → int -
Available on MemoryPointer<
RInt32> , provided by the Int32Pointer extension -
operator [](
int i) → int -
Available on MemoryPointer<
RInt64> , provided by the Int64Pointer extension -
operator [](
int i) → int -
Available on MemoryPointer<
RSize> , provided by the SizePointer extension -
operator [](
int i) → int -
Available on MemoryPointer<
RUint8> , provided by the Uint8Pointer extension -
operator [](
int i) → int -
Available on MemoryPointer<
RUint16> , provided by the Uint16Pointer extension -
operator [](
int i) → int -
Available on MemoryPointer<
RUint32> , provided by the Uint32Pointer extension -
operator [](
int i) → int -
Available on MemoryPointer<
RUint64> , provided by the Uint64Pointer extension -
operator []=(
int i, bool v) → void -
Available on MemoryPointer<
RBool> , provided by the BoolPointer extension -
operator []=(
int i, double v) → void -
Available on MemoryPointer<
RFloat32> , provided by the Float32Pointer extension -
operator []=(
int i, double v) → void -
Available on MemoryPointer<
RFloat64> , provided by the Float64Pointer extension -
operator []=(
int i, int v) → void -
Available on MemoryPointer<
RInt8> , provided by the Int8Pointer extension -
operator []=(
int i, int v) → void -
Available on MemoryPointer<
RInt16> , provided by the Int16Pointer extension -
operator []=(
int i, int v) → void -
Available on MemoryPointer<
RInt32> , provided by the Int32Pointer extension -
operator []=(
int i, int v) → void -
Available on MemoryPointer<
RInt64> , provided by the Int64Pointer extension -
operator []=(
int i, int v) → void -
Available on MemoryPointer<
RSize> , provided by the SizePointer extension -
operator []=(
int i, int v) → void -
Available on MemoryPointer<
RUint8> , provided by the Uint8Pointer extension -
operator []=(
int i, int v) → void -
Available on MemoryPointer<
RUint16> , provided by the Uint16Pointer extension -
operator []=(
int i, int v) → void -
Available on MemoryPointer<
RUint32> , provided by the Uint32Pointer extension -
operator []=(
int i, int v) → void -
Available on MemoryPointer<
RUint64> , provided by the Uint64Pointer extension
Static Methods
-
orNull<
Y extends RType> (Pointer< NativeType> ? p) → NativeMemoryPointer<Y> ?